fix: deterministic kernels and gmp

This commit is contained in:
Lance R. Vick 2024-03-04 18:52:31 -08:00
parent 3648dd1c10
commit c86d1d0a9c
No known key found for this signature in database
GPG key ID: 8E47A1EC35A1551D
4 changed files with 13 additions and 4 deletions

View file

@ -1,5 +1,5 @@
FROM scratch AS base
# https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz
ARG ARCH=x86_64
ENV VERSION=6.3.0
ENV SRC_HASH=a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
ENV SRC_FILE=gmp-${VERSION}.tar.xz
@ -22,9 +22,11 @@ COPY --from=stagex/gcc . /
RUN --network=none tar -xf ${SRC_FILE}
WORKDIR gmp-${VERSION}
RUN --network=none <<EOF
set -eux
./configure --prefix=/usr
make
set -eux
./configure \
--prefix=/usr \
--build=${ARCH}-linux-musl
make
EOF
FROM build AS install

View file

@ -37,6 +37,8 @@ COPY --from=stagex/bash /bin/bash /bin/sh
RUN tar -xf ${SRC_FILE}
WORKDIR linux-${VERSION}
ADD linux.config .config
ENV KBUILD_BUILD_HOST=stagex
ENV KBUILD_BUILD_USER=user
ENV KBUILD_BUILD_TIMESTAMP=1
RUN <<-EOF
set -eux

View file

@ -36,6 +36,9 @@ COPY --from=stagex/bash . /
COPY --from=stagex/bash /bin/bash /bin/sh
RUN tar -xf ${SRC_FILE}
WORKDIR linux-${VERSION}
ENV KBUILD_BUILD_HOST=stagex
ENV KBUILD_BUILD_USER=user
ENV KBUILD_BUILD_TIMESTAMP=1
RUN <<-EOF
set -eux
make oldconfig

View file

@ -44,6 +44,8 @@ RUN tar -xf ${NSM_SRC_FILE} -C nitro-bootstrap --strip-components 1
RUN tar -xf ${SRC_FILE}
WORKDIR linux-${VERSION}
ADD linux.config .config
ENV KBUILD_BUILD_HOST=stagex
ENV KBUILD_BUILD_USER=user
ENV KBUILD_BUILD_TIMESTAMP=1
RUN <<-EOF
set -eux