Fix guile.

- The date reproducibility issue was not actually set to any date, which
  could cause issues in the fiture, fix that sed.
- Fix a reproducibility issue (under QEMU), where the ordering of files
  within libguile can be random. This also affects guile binary so we
  need to rebuild that.
- Some change in kernel versions means that guile binary is
  significantly different in newer kernel versions. Because we cannot
  know the version of the host under chroot mode we must disable guile
  checksum entirely.
- Update checksums accordingly.
This commit is contained in:
fosslinux 2021-10-08 15:03:18 +11:00 committed by Andrius Štikonas
parent 0b7b11f415
commit 622b4de875
2 changed files with 30 additions and 9 deletions

View file

@ -6,12 +6,20 @@
src_prepare() {
default
# If we are in chroot mode, we can make no assumptions about the host
# kernel. It appears the resulting binary is at least somewhat
# kernel-specific (in ways other than hardcoded string). Hence disable
# checksumming for guile binary under chroot.
if [ "$CHROOT" = True ]; then
sed -i '/guile$/d' ../../checksums
fi
find . -name '*.info*' -delete
../../import-gnulib.sh
# Remove buildstamp
sed -i "s/date -u +'%Y-%m-%d %T'/1970-01-01 00:00:00/" libguile/Makefile.am
sed -i "s/\`date -u +'%Y-%m-%d %T'.*\`/1970-01-01 00:00:00/" libguile/Makefile.am
autoreconf-2.71 -fi
@ -32,9 +40,9 @@ src_prepare() {
src_configure() {
PKG_CONFIG_PATH="${PREFIX}/lib/musl/pkgconfig" ./configure \
--prefix="${PREFIX}" \
--libdir="${PREFIX}/lib/musl" \
--disable-shared \
--disable-jit
--libdir="${PREFIX}/lib/musl" \
--disable-shared \
--disable-jit
}
src_compile() {
@ -57,4 +65,16 @@ src_compile() {
# Now proceed with the build
default
# Ordering of libguile.a is messed up
mkdir libguile/.libs/order
pushd libguile/.libs/order
ar x ../libguile-3.0.a
rm ../libguile-3.0.a
ar cr ../libguile-3.0.a *.o
popd
# Recompile guile with fixed libguile
rm libguile/guile
make
}