Installing systemd specific files

Rical Jasan ricaljasan at pacific.net
Tue Feb 28 00:37:17 UTC 2017


On 02/27/2017 08:32 AM, Daiki Ueno wrote:
> Hello,
> 
> Roman Bogorodskiy <bogorodskiy at gmail.com> writes:
> 
>> Currently p11-kit installs some systemd specific files:
>>
>>  - p11-kit-remote.socket
>>  - p11-kit/p11-kit-remote.socket
>>  - p11-kit/p11-kit-remote at .service
>>
>> and maybe something else I don't recall.
>>
>> As those are specific to systemd which only runs on Linux (AFAIK), I was
>> thinking about disabling installation of these files on FreeBSD. I see
>> two options:
>>
>>  - Detect if we're building for Linux and define something like
>>    WITH_LINUX and install these files only if it's True
>>  - More granular approach like adding configure arg '--with-systemd'
>>    or somethings like that. I'm not sure, however, if that makes
>>    much sense as it looks like most of the major distros have switched
>>    over to systemd
>>
>> Which one is preferred?
> I would prefer the latter; we could enable the option only if systemd is
> installed, which can be checked with pkg-config.

Autodetection would be great.  I run a variety of GNU/Linux systems, and
not all use systemd.  --with[out]-systemd would be nice for manual control.

For packages that handle systemd, I also see a
--with-systemdsystemunitdir configure option.  I use it when --prefix
might put the unit files somewhere non-standard; e.g.,
--prefix=/usr/local and --with-systemdsystemunitdir=/etc/systemd/system.
 You can get that variable through pkg-config as well:

$ pkg-config --variable=systemdsystemunitdir systemd
/usr/lib/systemd/system

Rical


More information about the p11-glue mailing list