Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust debian/rules for b2d1098 #30

Open
marcosfrm opened this issue Aug 3, 2021 · 1 comment
Open

Adjust debian/rules for b2d1098 #30

marcosfrm opened this issue Aug 3, 2021 · 1 comment

Comments

@marcosfrm
Copy link
Contributor

marcosfrm commented Aug 3, 2021

b2d1098 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
Copy link

koitsu commented Dec 1, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants