fix: remove redundant grub file
This commit is contained in:
parent
6bf477f38e
commit
2e9ed80d57
1 changed files with 0 additions and 50 deletions
|
@ -1,50 +0,0 @@
|
|||
FROM scratch as base
|
||||
ENV SRC_VERSION=2.06
|
||||
ENV SRC_HASH=23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f
|
||||
ENV SRC_FILE=grub-${SRC_VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://mirrors.kernel.org/gnu/grub/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=busybox . /
|
||||
COPY --from=bison . /
|
||||
COPY --from=flex . /
|
||||
COPY --from=gcc . /
|
||||
COPY --from=binutils . /
|
||||
COPY --from=make . /
|
||||
COPY --from=musl . /
|
||||
COPY --from=python . /
|
||||
COPY --from=m4 . /
|
||||
COPY --from=linux-headers . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR grub-${SRC_VERSION}
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
./configure \
|
||||
--prefix=/usr
|
||||
make CFLAGS="-Wno-error"
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN make DESTDIR=/rootfs install
|
||||
RUN find /rootfs -exec touch -hcd "@0" "{}" +
|
||||
RUN ls -la .
|
||||
|
||||
FROM base as test
|
||||
COPY --from=install /rootfs /
|
||||
COPY --from=musl . /
|
||||
COPY --from=busybox . /
|
||||
RUN grub-install --version
|
||||
RUN /bin/sh <<-EOF
|
||||
set -eux
|
||||
GRUB_VERSION=\$(echo | grub-install --version)
|
||||
if [ "grub-install (GRUB) ${SRC_VERSION}" != "\$GRUB_VERSION" ]; then
|
||||
echo "Expected grub version is \$SRC_VERSION, but got \$GRUB_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
EOF
|
||||
|
||||
FROM scratch as package
|
||||
COPY --from=install /rootfs /
|
Loading…
Reference in a new issue