[nut-Patches][313927] systemd system unit dir is mangled by configure script

nut-patches at alioth.debian.org nut-patches at alioth.debian.org
Tue Jan 15 13:23:33 UTC 2013


nut-Patches item #313927, was changed at 2013-01-15 14:23 by Michal Hlavinka
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=411544&aid=313927&group_id=30602

Status: Open
Priority: 3
Submitted By: Calvin Walton (kepstin-guest)
Assigned to: Michal Hlavinka (mihl-guest)
Summary: systemd system unit dir is mangled by configure script 
Category: None
Group: None
Resolution: None


Initial Comment:
I'm building nut with the following configuration options in a package:

./configure --prefix=/usr --libdir=/usr/lib64 --with-systemdsystemunitdir=/usr/lib64/systemd/system [...]

However, the systemd units are actually being installed to the path "/usr/usr/lib6464/systemd/system" instead of the requested "/usr/lib64/systemd/system". I've traced this down to the line in configure.in that says:

systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`"

which is obviously not correct in general. There's a note about this fixing 'make distcheck' somehow, but I don't see how this change is relevant... If files are being written to the real root during distcheck, that's a makefile installation rule bug, not a reason to mangle user-provided paths.

I'm currently testing the trivial patch, attached.

(As an aside, systemd does install pkg-config files, and it wouldn't be hard to add some user-friendly autodetection to nut's configure script. Note that "pkg-config --variable=systemdsystemunitdir systemd" will print the correct installation path.)

----------------------------------------------------------------------

>Comment By: Michal Hlavinka (mihl-guest)
Date: 2013-01-15 14:23

Message:
OK, looking at it... huh... it's wrong. I just talked with systemd developers, to confirm my suspicion.
systemd unit dir has nothing related with libraries.
Even on systems, where lib64 is used, it should be always just lib.
Also if your distribution uses separate /lib and /usr/lib (distributions that does not have "usrmove") it should be always /lib. Only on systems where /lib does not exist (or is just as symlink to /usr/lib), it should go to /usr/lib. If you put it anywhere else, systemd will ignore it unless you made non-standard changes in your systemd.
Like /dev directory, you can't put it anywhere you like or it won't work.

Both commits r3665 and r3666 should be reverted. I guess the problem you were trying to solve was that you need to install everything to some prefix in distcheck, but it does not work well with systemd unit directory that can't have any prefix.
 
I'm not sure how to fix the distcheck issue

----------------------------------------------------------------------

Comment By: Arnaud Quette (aquette)
Date: 2013-01-11 23:13

Message:
@Michal: can you please have a look at this one, while considering commits r3665 and r3666?
thanks.

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=411544&aid=313927&group_id=30602



More information about the NUT-tracker mailing list