-
Notifications
You must be signed in to change notification settings - Fork 85
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
netatalk2 uses wrong path for systemd unit files #404
Comments
Thanks for reporting! The hard coding is my fault. I agree that we need a more portable solution. Perhaps we can try porting the Line 495 in 7dbde0c
If you have a better idea, or want to take a stab at porting, please don't hesitate to raise a PR. |
Thanks for the quick response. I figured out a workaround for now: make DESTDIR="$pkgdir/" servicedir=/usr/lib/systemd/system install I'll freely admit is a hack, but it will work for now. I'm not sure that it would make sense to auto detect OS/distro: There are so many of them, are you going to have an up-to-date list of all of them and what their policies for systemd files are? If you could auto detect where systemd files go, that would be fine (e.g. if something like pkg-config could tell you). I just think it would be madness to detect distro and have a table based on that. |
Looking at the code you linked, it looks to me like there is no difference between |
Fair point. The KISS principle should be kept in mind. No need to over-engineer a solution for a simple problem. By virtue of not changing the current behavior, how about:
|
Sounds good to me |
Here's another approach that would be a bit more sophisticated: Have a single Or perhaps even simpler, I did an empirical investigation with Debian 11, 12 and Ubuntu 22.04. All three are actually symlinking So, how about doing a check for existence of the |
I believe debian is still in the process of transitioning to merged /usr? New installs default to merged users, but old installs that you keep updating to not. I remember reading an article this year about it on lwn.net. Seemed to be a bit of a mess. |
Can you test if this solution works for you on Arch? #417 |
For the record, I changed my mind about the aggressive auto-detection of systemd and removed it. Having to opt out of systemd is probably counterintuitive for a lot of users, plus it introduced issues with distcheck. |
Seems to work yes. |
Cheers, I've merged the PR now. |
I'm trying to create a package for ArchLinux AUR of the 2.2 version of netatalk (to be able to use with my retro computers). I noticed that
make install
puts the systemd units in the wrong location:/lib/systemd
as opposed to/usr/lib/systemd
.I made sure to pass
--prefix=/usr
and--enable-systemd
to configure, so I don't know why this is happening. I also don't see any separate prefix variable for systemd unit files inconfigure --help
.Looking at
distrib/initscripts/Makefile.in
it does in fact seem like servicedir is hard coded to/lib/systemd/system
which is wrong on distros that have done the/usr
-merge. On Arch/lib
is a symlink to/usr/lib
. Presumably a configure option needs to be added for this.The text was updated successfully, but these errors were encountered: