[syslog-ng] [Bug 126] [systemd] Add installation of systemd unit file via build-sys

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Mon Jun 27 07:59:14 CEST 2011


https://bugzilla.balabit.com/show_bug.cgi?id=126





--- Comment #7 from Balazs Scheidler <bazsi at balabit.hu>  2011-06-27 07:59:13 ---

Hmm.. I've found this description:

https://fedoraproject.org/wiki/User:Johannbg/QA/Systemd/Daemon

It states that:

"At the build installation time (e.g. make install during package build) packages are recommended to 
install their systemd unit files in the directory returned by pkg-config systemd 
--variable=systemdsystemunitdir (for system services), resp. pkg-config systemd 
--variable=systemdsessionunitdir (for session services). This will make the services 
available in the system on explicit request but not activate them automatically during 
boot. Optionally, during package installation (e.g. rpm -i by the administrator) 
symlinks should be created in the systemd configuration directories via the enable 
command of the systemctl(1) tool, to activate them automatically on boot. "

I'm not sure I agree, however I wouldn't want to create a non-standard option, 
that looks like a standard one.

I have another concern: if systemd is present on the system, and my development 
computer would support it, then the Makefiles would try to install it unconditionally to
/lib/systemd/system, which would cause permission denied errors, since I'm doing 
development as a non-root user.

Also, the hooks you used don't support "make uninstall", which automake otherwise does.

Here's the currently experimental patch I've came up with, which:
  * does nothing with the unit file by default
  * if --with-systemdsystemunitdir is specified without arguments, it tries to autodetect it using pkg-config
  * if --without-systemdsystemunitdir is specified, it does nothing
  * if --with-systemdsystemunitdir is specified with an argument, it uses that directory

Can you please check if this works for you? Also, can you please voice my concerns 
about the suggested implementation to the systemd developers? Thanks.

Here's the patch currently (not yet on master):

http://git.balabit.hu/?p=bazsi/syslog-ng-3.3.git;a=shortlog;h=systemd-unit-install


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list