-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the log file generated by application daemon configurable in RPM based SystemV #656
Conversation
#619 is related to this. If you could make this modifiable, then it could be configured for conductr and other things. |
62cd310
to
e79ffc8
Compare
@muuki88 - I have made this configurable with I'm not sure how I should update the documentation since this change impacts Redhat only, not all Linux. |
@@ -13,6 +13,7 @@ trait LinuxKeys { | |||
val daemonGroup = SettingKey[String]("daemon-group", "Group to start application daemon") | |||
val daemonGroupGid = SettingKey[Option[String]]("daemon-group-gid", "GID of daemonGroup") | |||
val daemonShell = SettingKey[String]("daemon-shell", "Shell provided for the daemon user") | |||
val daemonLogFile = SettingKey[String]("daemon-log-file", "Name of the log file generated by the application daemon") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be an rpm only key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for what reason? Not sure if other packages/system start daemons may use this as well. debian systemv for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Felix and I spoke about this and concluded that it was only needed for rpm. You can't have this choice for Debian as the log is already named with the dpkg-ing and there is no ability to change it.
@huntc if you have no objections, feel free to merge. |
Thanks @muuki88. I believe Felix has some more changes to push so no merge is required immediately. |
8784294
to
2c6b4cc
Compare
@huntc & @muuki88 - I have created a rpm specific settings called This settings will allow overriding the log file name generated by the application daemon in rpm based install. I have performed manual test for this change using the |
2c6b4cc
to
9527777
Compare
"""|Replacements of template parameters used in linux rpm scripts. | ||
| Default supported templates: | ||
| rpmDaemonLogFile - name of the log file generated by application daemon | ||
""".stripMargin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rpmScriptReplacements
should be rpm-script-replacements
821ed3e
to
f387d55
Compare
@@ -80,7 +80,11 @@ object RpmPlugin extends AutoPlugin { | |||
target in Rpm <<= target(_ / "rpm"), | |||
name in Rpm <<= name in Linux, | |||
packageName in Rpm <<= packageName in Linux, | |||
executableScriptName in Rpm <<= executableScriptName in Linux | |||
executableScriptName in Rpm <<= executableScriptName in Linux, | |||
rpmDaemonLogFile := s"${(packageName in Linux).value}.log", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quoting @huntc + cc @muuki88 as commit has been updated:
For consistency I recommend using the name as per Debian packaging, and not daemon.log, unless there is some Fedora style precedence for this. This change of ours was motivated by the fact that we came upon daemon.log unexpectedly.
@muuki88 WDYT?
@@ -60,4 +60,15 @@ trait RpmKeys { | |||
// Building | |||
val rpmLint = TaskKey[Unit]("rpm-lint", "Runs rpmlint program against the genreated RPM, if available.") | |||
|
|||
val rpmDaemonLogFile = SettingKey[String]("rpm-daemon-log-file", "Name of the log file generated by application daemon") | |||
|
|||
val rpmScriptReplacements = SettingKey[Seq[(String, String)]]( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why introduce this new setting? linuxScriptReplacements in Rpm
should be sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that rpmScriptReplacements
is declared here because it is specific to RPM i.e. it isn't a script replacement destined for Linux.
If there was a key named just scriptReplacements
then that'd be different...
Make sense @muuki88 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that makes sense @huntc and I like the idea for a general purpose setting scriptReplacements
and scoping it to the different configurations. This will be easier if there were less settings ;)
IMHO we should not introduce a new key as removing these is much harder.
… based SystemV Introduce a new settings key called `rpmDaemonLogFile` which will be used to configure the name of the log file generated by application daemon in RPM based SystemV. Make the default value of the `rpmDaemonLogFile` settings to be `${{app_name}}.log`.
f387d55
to
6c07b85
Compare
LGTM |
Make the log file generated by application daemon configurable in RPM based SystemV
Introduce a new settings key called
rpmDaemonLogFile
which will be used to configurethe name of the log file generated by application daemon in RPM based SystemV.
Make the default value of the
rpmDaemonLogFile
settings to be${{app_name}}.log
.