Netgear / wsdd2

WSD/LLMNR Discovery/Name Service Daemon
GNU General Public License v3.0
154 stars 33 forks source link

Adjust debian/rules for b2d1098 #30

Open marcosfrm opened 3 years ago

marcosfrm commented 3 years ago

b2d1098715b8ed27bb8bade026a11d549dca5533 changed LIBDIR to /usr/lib (for systemd service file), default in the RPM world (Fedora/RH, SUSE, Mageia). But I forgot about the Debian packaging. AFAIK Debian is still using /lib, right?

Can anyone with expertise in Debian packaging adjust debian/rules if necessary? I think export LIBDIR=/lib is enough, please take a look.

Thanks.

koitsu commented 1 year ago

@marcosfrm Some things to say, in no particular order:

  1. Please see systemd.unit(5) man page in your distro for details of what paths are read and in what order. Here are some for you to look at, including official docs:
  2. On Ubuntu 20.04 and 22.04, /lib is a symlink to /usr/lib. Ubuntu is a Debian fork, but this could be an Ubuntu-ism. I forget what it is on Ubuntu 18.04, but Ubuntu 18.04's systemd integration was "early" (better than 16.04 but still not as well-refined as 20.04)
  3. On the topic of Debian:
    • I point you to https://www.debian.org/doc/debian-policy/ch-opersys.html#example which mentions the same man page I just mentioned
    • I examined several packages and found that most things went into /lib/systemd/system, however:
    • There is talk about /lib vs. /usr/lib systemd services in this recent thread with some Linux kernel developers: https://groups.google.com/g/linux.debian.devel/c/XCg-o11qU_I -- if you read it in full, you will see it really doesn't matter and they conclude /usr/lib is the ideal place (also be sure to look closely at the official systemd documentation I linked)
    • If someone was to make a wsdd2 package, then they'd just patch or override the path anyway; that's 100% common with Debian (and Ubuntu) packages. Not all public open-source projects have time to cater to every single Linux distro in various ways in their Makefiles
    • If you you want me to check Debian for sure, I can launch a VM and check -- just please tell me what release/version of Debian to try. If you already have one, ls -l /lib and see if it's an actual directory rather than a symlink. I suspect it's a symlink

TL;DR -- At the end of the day it probably doesn't matter. But changing it to /lib would work on Ubuntu (ends up going into /usr/lib anyway due to symlink) and Debian (undetermined). No idea for Arch, Mint, nix, AlmaLinux, Amazon Linux 2, etc. etc. (again, see my above comment about distros patching).

Hope this helps, and hopefully can resolve your concerns, thus this ticket.