Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#64351 - [linux-hardened] current 5.3.7.b does not build in Archiso or any environment due to PKGBUILD

Attached to Project: Arch Linux
Opened by Sp1d3rmxn (sp1d3rmxn) - Friday, 01 November 2019, 22:27 GMT
Last edited by Doug Newgard (Scimmia) - Saturday, 02 November 2019, 01:37 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


PKGBUILD appears incomplete/incorrect causing package creation failure.

The particular sections needing attention are:

Line 96:
rm "$modulesdir"/{source,build}

Using the variable that sets "modulesdir" I decided to make the version manually in just this section. Changing this to the version manually allows the package to build (wait there is more):
rm "$pkgdir/usr/lib/modules/5.3.7.b-3-hardened"/{source,build}

After building it was discovered the package did not have the "vmlinuz-hardened" kernel in the /boot installed like it should. Comparing to another linux-hardened package from version 5.0.17 shows that there is a line missing.

Line 88 is missing:
install -Dm644 "$modulesdir/vmlinuz" "$pkgdir/boot/vmlinuz-$pkgbase"

After adding that back in based upon seeing this in every other kernel package currently available for Arch, for some reason this was all-of-a-sudden missing.

Now after doing those changes it still does not install things correctly. Upon attempted reboot systemd fails and complains about being unable to find "/lib/modules/5.3.7.b-3-hardened/modules.devname" which is not true because a simple directory listing shows it exists and the contents are easily viewable. In an attempt to rerun mkinitcpio -p linux-hardened as it seems to have not happened it then became known that the mkinitcpio config file is missing from the "/etc/mkinitcpio.d/" directory although the stock kernel and every other kernel available has this without issue. At this point I gave up troubleshooting because it appears the PKGBUILD is incorrect or incomplete and chasing down the various failures is becoming quite time consuming. I have reverted to 5.0.x which is where these comparisons are derived. In addition this is easily reproduced using just the archiso, running "asp export linux-hardened" (don't forget the devtools package) and simply run "makepkg -rs". It fails every time.

Additional info:
* package version(s)
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:

Simply run makepkg and it fails on a fresh/stock install of Archlinux, even fails when attempting to build from Archiso.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Saturday, 02 November 2019, 01:37 GMT
Reason for closing:  Works for me
Comment by Doug Newgard (Scimmia) - Saturday, 02 November 2019, 01:37 GMT
Package builds fine in a clean chroot. As for the rest, partial updates are not supported.