mirror of
https://github.com/ublue-os/akmods.git
synced 2026-11-03 14:59:42 -09:00
fix: Normalize build paths to ensure RPMs built here are reproducible (#610)
* fix: Normalize build paths to ensure RPMs built here are reproducible * chore: Fix empty variable
This commit is contained in:
parent
7c9f9274d3
commit
6cda5f6fba
1 changed files with 11 additions and 0 deletions
|
|
@ -92,6 +92,17 @@ fi
|
|||
# Install RPMs
|
||||
dnf install -y --allowerasing "${RPMS_TO_INSTALL[@]}"
|
||||
|
||||
# Normalize random akmods build roots before linking
|
||||
original_build_pre="$(rpm --eval '%{macrobody:__spec_build_pre}')"
|
||||
|
||||
{
|
||||
printf '%%__spec_build_pre '
|
||||
printf '%s\n' "$original_build_pre" | sed 's/$/\\/'
|
||||
cat <<'EOF'
|
||||
export KCFLAGS="${KCFLAGS:+${KCFLAGS} }-ffile-prefix-map=%{_builddir}=/usr/src/akmods"
|
||||
EOF
|
||||
} > /etc/rpm/macros.akmods-reproducible
|
||||
|
||||
# Configure Dual Signing
|
||||
if [[ "${DUAL_SIGN}" == 'true' ]]; then
|
||||
if [[ ! -s "/tmp/certs/private_key_2.priv" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue