Merge pull request #318875 from athre0z/kernel-build-ids

linuxPackages: bring back GNU build ID for kernels
This commit is contained in:
K900 2024-06-16 17:20:08 +03:00 committed by GitHub
commit c3b89ba0b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -172,12 +172,6 @@ let
# Ensure that depmod gets resolved through PATH
sed -i Makefile -e 's|= /sbin/depmod|= depmod|'
# Don't include a (random) NT_GNU_BUILD_ID, to make the build more deterministic.
# This way kernels can be bit-by-bit reproducible depending on settings
# (e.g. MODULE_SIG and SECURITY_LOCKDOWN_LSM need to be disabled).
# See also https://kernelnewbies.org/BuildId
sed -i Makefile -e 's|--build-id=[^ ]*|--build-id=none|'
# Some linux-hardened patches now remove certain files in the scripts directory, so the file may not exist.
[[ -f scripts/ld-version.sh ]] && patchShebangs scripts/ld-version.sh