usbmuxd icon indicating copy to clipboard operation
usbmuxd copied to clipboard

Move PIDFile to /run

Open opoplawski opened this issue 4 years ago • 5 comments

systemd on Fedora complains:

/usr/lib/systemd/system/usbmuxd.service:7: PIDFile= references a path below legacy directory /var/run/, updating /var/run/usbmuxd.pid → /run/usbmuxd.pid; please update the unit file accordingly.

opoplawski avatar Nov 03 '20 21:11 opoplawski

this will work only for fedora, not for other distributions. this needs to be done by fedora package maintainer as distribution specific patch.

mexmer avatar Nov 07 '20 12:11 mexmer

I thought all systemd systems had /run?

opoplawski avatar Jan 26 '21 03:01 opoplawski

on debian i still have /var/run, so idk. there should probly be option for configure script to set path, where pid file should be stored.

also not everyone runs systemd (i use debian and devuan, while debian has systemd, devuan doesn't, still both use /var/run )

mexmer avatar Jan 26 '21 23:01 mexmer

We now have a bug for this on openSUSE/SLE, too.
I don't think that this patch is sufficient, since the /var/run path is also hard-coded in main.c.
I see that there is now an option to specify the pid via the command line, although we would still need to modify the service file in order to use it.

mgorse avatar Apr 22 '21 16:04 mgorse

Keep in mind that the tools around libimobiledevice (specifically libusbmuxd) expect the unix socket to be in /var/run/usbmuxd. While this can be changed I don't see a big issue having a symlink /var/run -> /run for these cases, and in fact most distributions that I saw already have that. As for the pidfile, there's actually a command line switch --pidfile now that lets you specify a different pidfile. A hardcoded path isn't really what would be desired here, I would rather find a better @rundir@ variable for autoconf that would solve this issue...

nikias avatar May 08 '21 11:05 nikias

Looks like autoconf 2.70 added --runstatedir and @runstatedir@.

opoplawski avatar Dec 20 '22 16:12 opoplawski

yes, i think 2.70 added some state macros, not just runstatedir, overall was quite nice update. good point that it can be done this way, this will also help distribution package maintainers, since they should have this things set already.

mexmer avatar Dec 20 '22 20:12 mexmer

Should be solved with 2707534fc99e706114bcc6f6f4cfa20cc68156af.

nikias avatar Sep 18 '23 10:09 nikias