2024-08-17 04:41:04 +00:00
|
|
|
FROM scratch AS base
|
2024-08-16 19:26:04 +00:00
|
|
|
ARG ARCH=x86_64
|
|
|
|
ENV VERSION=1.21.2
|
|
|
|
ENV SRC_HASH=9560941a9d843c0243a71b17a7ac6fe31c7cebb5bce3983db79e52ae7e850491
|
|
|
|
ENV SRC_FILE=krb5-${VERSION}.tar.gz
|
|
|
|
ENV SRC_SITE=https://kerberos.org/dist/krb5/1.21/${SRC_FILE}
|
|
|
|
|
2024-08-17 04:41:04 +00:00
|
|
|
FROM base AS fetch
|
2024-08-16 19:26:04 +00:00
|
|
|
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
|
2024-08-17 04:41:04 +00:00
|
|
|
|
|
|
|
FROM fetch AS build
|
2024-08-16 19:26:04 +00:00
|
|
|
COPY --from=stagex/perl . /
|
|
|
|
COPY --from=stagex/bash . /
|
|
|
|
COPY --from=stagex/m4 . /
|
|
|
|
COPY --from=stagex/curl . /
|
|
|
|
COPY --from=stagex/linux-headers . /
|
|
|
|
COPY --from=stagex/util-linux . /
|
|
|
|
COPY --from=stagex/autoconf . /
|
|
|
|
COPY --from=stagex/automake . /
|
|
|
|
COPY --from=stagex/busybox . /
|
|
|
|
COPY --from=stagex/musl . /
|
|
|
|
COPY --from=stagex/gcc . /
|
|
|
|
COPY --from=stagex/binutils . /
|
|
|
|
COPY --from=stagex/make . /
|
|
|
|
COPY --from=stagex/e2fsprogs . /
|
|
|
|
COPY --from=stagex/python . /
|
|
|
|
COPY --from=stagex/openldap . /
|
|
|
|
COPY --from=stagex/openssl . /
|
|
|
|
COPY --from=stagex/groff . /
|
|
|
|
COPY --from=stagex/libevent . /
|
|
|
|
COPY --from=stagex/bison . /
|
|
|
|
COPY --from=stagex/libtool . /
|
|
|
|
COPY --from=stagex/libverto . /
|
|
|
|
COPY --from=stagex/pkgconf . /
|
|
|
|
RUN tar -xf $SRC_FILE
|
2024-08-26 01:18:52 +00:00
|
|
|
WORKDIR /krb5-${VERSION}/src
|
2024-08-16 19:26:04 +00:00
|
|
|
RUN --network=none <<-EOF
|
|
|
|
set -eux
|
|
|
|
./configure \
|
|
|
|
CPPFLAGS="-fPIC -I/usr/include/et" \
|
|
|
|
WARN_CFLAGS= \
|
|
|
|
--build=${ARCH}-linux-musl \
|
|
|
|
--host=${ARCH}-linux-musl \
|
|
|
|
--prefix=/usr \
|
|
|
|
--localstatedir=/var/lib \
|
|
|
|
--enable-shared \
|
|
|
|
--disable-nls \
|
|
|
|
--disable-static \
|
|
|
|
--disable-rpath \
|
|
|
|
--with-system-et \
|
|
|
|
--with-system-ss \
|
|
|
|
--with-system-verto \
|
|
|
|
--without-tcl \
|
|
|
|
--with-ldap
|
|
|
|
make -j "$(nproc)"
|
|
|
|
EOF
|
|
|
|
|
2024-08-17 04:41:04 +00:00
|
|
|
FROM build AS install
|
2024-08-16 19:26:04 +00:00
|
|
|
RUN make DESTDIR=/rootfs install
|
|
|
|
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
|
|
|
|
2024-08-17 04:41:04 +00:00
|
|
|
FROM stagex/filesystem AS package
|
2024-08-16 19:26:04 +00:00
|
|
|
COPY --from=install /rootfs/. /
|