mirror of
https://github.com/xcat2/xcat-dep.git
synced 2026-06-24 00:01:05 +00:00
a2378ba780
Port SOURCE_DATE_EPOCH patterns from xcat-core to all xcat-dep build scripts. RPM and Debian packages now produce identical output given the same Gitepoch timestamp, regardless of build host or time. EL (RPM) changes: - mockbuild-all.pl: --build-timestamp flag, deterministic run_id, tar --sort/--owner/--group/--mtime, createrepo --revision - All mockbuild.pl: SOURCE_DATE_EPOCH cascade (CLI > Gitepoch > git > time), deterministic mock config with SOURCE_DATE_EPOCH in chroot env, RPM macros for timestamp clamping and fixed buildhost - goconserver: -trimpath -buildvcs=false, canonical rpmbuild path - xnba: canonical rpmbuild path - syslinux: ZERO_AR_DATE=1 in mock env Ubuntu (Debian) changes: - All make_deb.sh: SOURCE_DATE_EPOCH fallback from Gitepoch - goconserver: deterministic SNAP_TS and changelog from epoch, -trimpath -buildvcs=false in debian/rules - syslinux: -fdebug-prefix-map for path-independent debug info - build-apt-repo.sh: gzip -n, Release Date: from SOURCE_DATE_EPOCH Verified: 31/33 package artifacts produce identical SHA256 hashes across independent builds. 2 syslinux sub-packages (devel, debugsource) have known limitations from upstream build system.
35 lines
1.3 KiB
Bash
35 lines
1.3 KiB
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
if [ -z "${SOURCE_DATE_EPOCH:-}" ]; then
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
if [ -f "$REPO_ROOT/Gitepoch" ]; then
|
|
export SOURCE_DATE_EPOCH=$(cat "$REPO_ROOT/Gitepoch")
|
|
fi
|
|
fi
|
|
|
|
tar xvfj syslinux-3.86.tar.bz2
|
|
cd syslinux-3.86
|
|
cp -rL ../debian .
|
|
|
|
# GCC >= 10 defaults to -fno-common; syslinux 3.86 relies on common symbols
|
|
# GCC 15 promotes implicit-function-declaration and incompatible-pointer-types to errors
|
|
sed -i '/^GCCWARN := -W -Wall/s/$/ -fcommon -Wno-error=implicit-function-declaration -Wno-error=incompatible-pointer-types -Wno-error=int-conversion/' MCONFIG
|
|
sed -i "s|^GCCWARN := .*|& -fdebug-prefix-map=$(pwd)=.|" MCONFIG
|
|
|
|
# glibc >= 2.28 moved major()/minor() to sys/sysmacros.h
|
|
# extlinux/main.c:843 calls major()/minor() unconditionally in 3.86
|
|
sed -i '/#include <sys\/types.h>/a #include <sys/sysmacros.h>' extlinux/main.c
|
|
|
|
# com32/cmenu/Makefile uses python2 menugen.py for test .menu files — not needed for build
|
|
rm -f com32/cmenu/*.menu
|
|
|
|
# vpd.c:67 passes &vpd->base_address (char(*)[6]) not char*; format %X wrong for char* arg
|
|
sed -i 's/snprintf(&vpd->base_address, 5, "%X", q)/snprintf(vpd->base_address, sizeof(vpd->base_address), "%s", q)/' com32/gpllib/vpd/vpd.c
|
|
|
|
export NO_WERROR=1
|
|
dpkg-buildpackage -uc -us
|
|
|
|
cd -
|
|
rm -rf syslinux-3.86
|