FS#75194 - [nut] Missing nutshutdown file in package due to missing systemd dep

Attached to Project: Community Packages
Opened by Charles Vejnar (vejnar) - Thursday, 30 June 2022, 03:19 GMT
Last edited by Maxime Gauduin (Alucryd) - Thursday, 18 August 2022, 10:33 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Maxime Gauduin (Alucryd)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

While testing nut 2.8.0, I noticed that my system wasn't sending a power off order to my UPS. The file /usr/lib/systemd/system-shutdown/nutshutdown is missing from the nut 2.8.0-1 package. Strangely, by just remaking the package, that file gets included.

Steps to reproduce:
1. Install nut
2. Remove power from UPS
3. UPS doesn't shut down

Solution:
Issue a recompile order to create nut 2.8.0-2 package. Please check that /usr/lib/systemd/system-shutdown/nutshutdown gets included.
This task depends upon

Closed by  Maxime Gauduin (Alucryd)
Thursday, 18 August 2022, 10:33 GMT
Reason for closing:  Fixed
Additional comments about closing:  2.8.0-2
Comment by Toolybird (Toolybird) - Wednesday, 20 July 2022, 06:59 GMT
> Strangely, by just remaking the package, that file gets included

Not quite. Official Arch pkgs are built inside a clean chroot [1]. The problem here is that there is a missing dep on systemd. The build log shows:

"checking whether to install systemd shutdown files... no"

Delving deeper you can see the key command from the configure script:

"pkg-config --variable=systemdshutdowndir systemd"

That command only returns output when systemd is installed.

Essentially, this is a recurrence of an age old problem which has been raised many times. Quite frankly, I disagree with the Arch devs on this point, it's just illogical...but I digress.

 FS#68595   FS#69830   FS#72236   FS#73646 

[1] https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot
Comment by Charles Vejnar (vejnar) - Thursday, 21 July 2022, 01:34 GMT
Thanks so much for your detailed explanation.

I also use a container to build my packages but I use Apptainer (I find it more user-friendly). When building my Arch container, base and base-devel are installed. It's my understanding that the "clean chroot" includes only base-devel and not base. Since base includes systemd, it explains why shutdown file isn't included in the official package, but was when I built it.

So the nut package should be dependent on systemd. At least in makedepends. Or am I missing something?

Loading...