Merge remote-tracking branch 'origin/lance/docker' into staging

This commit is contained in:
Anton Livaja 2024-08-29 15:05:48 -04:00
commit 7b48ba8c85
No known key found for this signature in database
GPG key ID: 44A86CFF1FDF0E85
21 changed files with 5403 additions and 2 deletions

View file

@ -2,6 +2,7 @@ export PLATFORM := linux/amd64
export BUILDER := $(shell which docker)
export REGISTRY_LOCAL := stagex-local
export REGISTRY_REMOTE := stagex
export CHECK ?= 0
export NOCACHE ?= 0
export MIRRORS := \
git.distrust.co \
@ -12,6 +13,13 @@ else
NOCACHE_FLAG=
endif
export NOCACHE_FLAG
ifeq ($(CHECK), 1)
CHECK_FLAG=--check
else
CHECK_FLAG=
endif
export CHECK_FLAG
clean_logs := $(shell rm *.log 2>&1 >/dev/null || :)
DEFAULT_GOAL := default
@ -25,8 +33,11 @@ include src/groups.mk
.PHONY: all
all: \
compat \
$(shell find packages/* -type d -exec sh -c 'basename {} | tr "\n" " "' \; ) \
digests.txt
$(shell find packages/* -type d -exec sh -c 'basename {} | tr "\n" " "' \; )
.PHONY: check
check:
$(MAKE) CHECK=1 all
.PHONY: compat
compat:

View file

@ -0,0 +1,48 @@
FROM scratch AS base
ENV VERSION=0.15.0
ENV SRC_FILE=v${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/moby/buildkit/archive/${SRC_FILE}
ENV SRC_HASH=ebf4b82f7379818d8fcfe5c54034e7f93c062c95f663bfd3c2a622583f62a8a4
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/musl . /
COPY --from=stagex/bash . /
COPY --from=stagex/busybox . /
COPY --from=stagex/go . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/pkgconf . /
RUN tar -xf ${SRC_FILE}
ENV GOPROXY=https://proxy.golang.org,direct
ENV GOSUMDB=sum.golang.org
ENV GOPATH=/cache/go
ENV GOBIN=${GOPATH}/bin
ENV PATH=${GOBIN}:${PATH}
WORKDIR /buildkit-${VERSION}
RUN <<-EOF
set -eux
mkdir -p out
go build -v \
--ldflags=" \
-w -s -buildid= \
-X github.com/moby/buildkit/version.Version=${VERSION} \
-X github.com/moby/buildkit/version.Revision=stagex \
" \
-o out/ \
./cmd/...
rm -r docs/reference
EOF
FROM build AS install
RUN <<-EOF
set -eux
mkdir -p /rootfs
install -Dm755 ./out/* -t /rootfs/usr/bin/
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,55 @@
FROM scratch AS base
ENV VERSION=1.7.20
ENV COMMIT=8fc6bcff51318944179630522a095cc9dbf9f353
ENV SRC_FILE=v${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/containerd/containerd/archive/${SRC_FILE}
ENV SRC_HASH=c4268561e514a2e8322bc8cdd39113d5e164fb31c2cef76f479d683395ea9bd6
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/musl . /
COPY --from=stagex/bash . /
COPY --from=stagex/busybox . /
COPY --from=stagex/go . /
COPY --from=stagex/go-md2man . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/libseccomp . /
RUN tar -xf ${SRC_FILE}
WORKDIR /containerd-${VERSION}
ENV GO11MODULE=on
RUN <<-EOF
set -eux
make \
SHIM_CGO_ENABLED=1 \
VERSION=${VERSION} \
REVISION=${COMMIT} \
BUILDMODE=pie \
EXTRA_LDFLAGS="-s -w -buildid=" \
-j "$(nproc)"
make man
EOF
FROM build AS install
RUN <<-EOF
set -eux
rm ./bin/gen-manpages
install -d /rootfs/usr/bin/
install -Dsm755 ./bin/* /rootfs/usr/bin/
install -d /rootfs/usr/share/man/man5/
install -Dm644 ./man/*.5 /rootfs/usr/share/man/man5/
install -d /rootfs/usr/share/man/man8/
install -Dm644 ./man/*.8 /rootfs/usr/share/man/man8/
install -d /rootfs/etc/containerd/
/rootfs/usr/bin/containerd config default \
| sed "s|/opt/cni/bin|/usr/libexec/cni|g" \
> /rootfs/etc/containerd/config.toml
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,49 @@
FROM scratch AS base
ENV VERSION=10.0.10
ENV SRC_FILE=dhcpcd-${VERSION}.tar.xz
ENV SRC_SITE=https://github.com/NetworkConfiguration/dhcpcd/releases/download/v${VERSION}/${SRC_FILE}
ENV SRC_HASH=d582012992efddd2442bb1213c518a37d90febbcf8b11f8e76448c710dacad27
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/m4 . /
COPY --from=stagex/libmnl . /
COPY --from=stagex/linux-headers . /
RUN tar -xf ${SRC_FILE}
WORKDIR /dhcpcd-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--libexecdir=/usr/lib/dhcpcd \
--dbdir=/var/lib/dhcpcd \
--rundir=/run/dhcpcd \
--enable-ipv6 \
--enable-privsep \
--enable-seccomp \
--without-dev \
--without-udev
make -j "$(nproc)"
EOF
FROM build AS install
RUN <<-EOF
set -eux
make DESTDIR=/rootfs install
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,46 @@
FROM scratch AS base
ENV VERSION=274
ENV SRC_HASH=c5398be0f26cb13344f4e27cf5a53df2b7a246a7b08944d114eee140989e5bb5
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_SITE=https://salsa.debian.org/reproducible-builds/diffoscope/-/archive/${VERSION}/diffoscope-${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/zlib . /
COPY --from=stagex/openssl . /
COPY --from=stagex/python . /
COPY --from=stagex/file . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/cmake . /
COPY --from=stagex/libffi . /
COPY --from=stagex/py-setuptools . /
COPY --from=stagex/py-installer . /
COPY --from=stagex/py-flit . /
COPY --from=stagex/py-gpep517 . /
COPY --from=stagex/py-wheel . /
COPY --from=stagex/py-distro . /
COPY --from=stagex/py-dateutil . /
COPY --from=stagex/py-urllib3 . /
COPY --from=stagex/py-cffi . /
COPY --from=stagex/py-magic . /
COPY --from=stagex/py-libarchive . /
RUN tar -xzf diffoscope-${SRC_FILE}
WORKDIR diffoscope-${VERSION}
RUN gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
#
FROM build AS install
RUN --network=none <<-EOF
set -eu
python -m installer -d /rootfs .dist/*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,46 @@
FROM scratch AS base
ENV VERSION=0.16.2
ENV SRC_FILE=v${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/docker/buildx/archive/${SRC_FILE}
ENV SRC_HASH=f314635765f3dc5efe089244280cd24a577e83d339fec1970fed16977bf28382
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/musl . /
COPY --from=stagex/bash . /
COPY --from=stagex/busybox . /
COPY --from=stagex/go . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/pkgconf . /
RUN tar -xf ${SRC_FILE}
ENV GOPROXY=https://proxy.golang.org,direct
ENV GOSUMDB=sum.golang.org
ENV GOPATH=/cache/go
ENV GOBIN=${GOPATH}/bin
ENV PATH=${GOBIN}:${PATH}
WORKDIR /buildx-${VERSION}
RUN <<-EOF
set -eux
mkdir -p out
go build \
-v \
-modcacherw \
--ldflags=" \
-w -s -buildid= \
-X github.com/moby/buildkit/version.Version=${VERSION} \
-X github.com/moby/buildkit/version.Revision=stagex \
-X github.com/moby/buildkit/version.PKG=github.com/docker/buildx \
" \
-o docker-buildx \
./cmd/buildx
EOF
FROM build AS install
RUN install -Dm755 docker-buildx -t /rootfs/usr/libexec/docker/cli-plugins/
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,88 @@
FROM scratch AS base
ENV VERSION=27.1.2
ENV MOBY_COMMIT=f9522e5e96c3ab5a6b8a643d15a92700ca864da6
ENV CLI_COMMIT=d01f264bccd8bed2e3c038054a04b99533478ab8
ENV SRC_FILE=v${VERSION}.tar.gz
ENV SRC_SITE_CLI=https://github.com/docker/cli/archive/${SRC_FILE}
ENV SRC_HASH_CLI=e60fddb2bd2b4e19790d26b786c930e70fa935168373ef08055f74bbc450bce8
ENV SRC_SITE_MOBY=https://github.com/moby/moby/archive/${SRC_FILE}
ENV SRC_HASH_MOBY=8c9b5fa44f0272726484c925d4d05f0aa189053ed8be9b27447bc116df1e99c9
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH_MOBY} ${SRC_SITE_MOBY} moby-${SRC_FILE}
ADD --checksum=sha256:${SRC_HASH_CLI} ${SRC_SITE_CLI} cli-${SRC_FILE}
FROM fetch AS build
COPY --from=stagex/musl . /
COPY --from=stagex/bash . /
COPY --from=stagex/busybox . /
COPY --from=stagex/go . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/libseccomp . /
COPY --from=stagex/ca-certificates . /
RUN tar -xf moby-${SRC_FILE}
RUN tar -xf cli-${SRC_FILE}
ENV GO11MODULE=off
ENV CGO_ENABLED=1
ENV AUTO_GOPATH=1
ENV GITCOMMIT=${CLI_COMMIT}
ENV DOCKER_GITCOMMIT=${MOBY_COMMIT}
ENV DOCKER_BUILDTAGS=seccomp
ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
ENV GOPROXY=https://proxy.golang.org,direct
ENV GOSUMDB=sum.golang.org
ENV GOPATH=/cache/go
ENV GOBIN=${GOPATH}/bin
ENV PATH=${GOBIN}:${PATH}
ENV SOURCE_DATE_EPOCH=1
ENV LDFLAGS="-w -s -buildid="
ENV GO_LDFLAGS=${LDFLAGS}
WORKDIR /moby-${VERSION}
RUN <<-EOF
set -eux
sed -i '98iLDFLAGS=${GO_LDFLAGS}' hack/make.sh
hack/make.sh dynbinary
EOF
WORKDIR /cli-${VERSION}
RUN <<-EOF
set -eux
mkdir -p "$GOPATH"/src/github.com/docker/
ln -sf /cli-${VERSION} "$GOPATH"/src/github.com/docker/cli
make -j "$(nproc)" VERSION=${VERSION} dynbinary
make manpages
EOF
FROM build AS install
WORKDIR /
RUN <<-EOF
set -eux
install -Dm644 cli-${VERSION}/contrib/completion/fish/docker.fish \
/rootfs/usr/share/fish/vendor_completions.d/docker.fish
install -Dm644 cli-${VERSION}/contrib/completion/zsh/_docker \
/rootfs/usr/share/zsh/site-functions/_docker
install -Dm644 cli-${VERSION}/contrib/completion/bash/docker \
/rootfs/usr/share/bash-completion/completions/docker
install -Dm644 cli-${VERSION}/man/man1/* \
-t /rootfs/usr/share/man/man1/
# 'build/docker' is a symlink to 'docker-linux-$arch' e.g. 'docker-linux-amd64'
install -Dm755 cli-${VERSION}/build/docker \
/rootfs/usr/bin/docker
install -Dm755 -t /rootfs/usr/bin \
moby-${VERSION}/bundles/dynbinary-daemon/dockerd \
moby-${VERSION}/bundles/dynbinary-daemon/docker-proxy
# symlink externally provided tini-static binary
ln -sf /sbin/tini-static /rootfs/usr/bin/docker-init
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,43 @@
FROM scratch AS base
ENV VERSION=1.13
ENV SRC_FILE=fuse-overlayfs-${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/containers/fuse-overlayfs/archive/v${VERSION}/${SRC_FILE}
ENV SRC_HASH=96d10344921d5796bcba7a38580ae14a53c4e60399bb90b238ac5a10b3bb65b2
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/perl . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/m4 . /
COPY --from=stagex/fuse3 . /
COPY --from=stagex/linux-headers . /
RUN tar -xf ${SRC_FILE}
WORKDIR /fuse-overlayfs-${VERSION}
RUN --network=none <<-EOF
set -eux
/usr/bin/autoreconf -fis
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--prefix=/usr \
--mandir=/usr/share/man
make -j "$(nproc)"
EOF
FROM build AS install
RUN <<-EOF
set -eux
make DESTDIR=/rootfs install
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,58 @@
FROM scratch AS base
ARG ARCH=x86_64
ENV VERSION=3.16.2
ENV SRC_HASH=f797055d9296b275e981f5f62d4e32e089614fc253d1ef2985851025b8a0ce87
ENV SRC_FILE=fuse-${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/libfuse/libfuse/releases/download/fuse-${VERSION}/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} ${SRC_FILE}
FROM fetch AS build
COPY --from=stagex/python . /
COPY --from=stagex/zlib . /
COPY --from=stagex/bzip2 . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/meson . /
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/cmake . /
COPY --from=stagex/pcre2 . /
COPY --from=stagex/python . /
COPY --from=stagex/bison . /
COPY --from=stagex/flex . /
COPY --from=stagex/py-packaging . /
COPY --from=stagex/libxslt . /
COPY --from=stagex/libffi . /
COPY --from=stagex/xz . /
COPY --from=stagex/expat . /
COPY --from=stagex/rhash . /
COPY --from=stagex/libxml2 . /
COPY --from=stagex/util-linux . /
COPY --from=stagex/libxslt . /
COPY --from=stagex/gettext . /
COPY --from=stagex/ninja . /
RUN tar -xf ${SRC_FILE}
WORKDIR /fuse-${VERSION}
COPY *.patch .
RUN --network=none <<-EOF
set -eux
meson setup \
--default-library=shared \
--prefix=/usr \
-Dinitscriptdir="" \
. output
meson compile -C output
EOF
FROM build AS install
RUN DESTDIR=/rootfs meson install --no-rebuild -C output
RUN find /rootfs -exec touch -hcd "@0" "{}" +
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,51 @@
FROM scratch AS base
ENV VERSION=1.8.10
ENV SRC_FILE=iptables-${VERSION}.tar.xz
ENV SRC_SITE=https://netfilter.org/projects/iptables/files/${SRC_FILE}
ENV SRC_HASH=5cc255c189356e317d070755ce9371eb63a1b783c34498fb8c30264f3cc59c9c
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/perl . /
COPY --from=stagex/libtool . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/autoconf . /
COPY --from=stagex/automake . /
COPY --from=stagex/m4 . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/libnftnl . /
COPY --from=stagex/libmnl . /
RUN tar -xf ${SRC_FILE}
WORKDIR /iptables-${VERSION}
RUN --network=none <<-EOF
set -eux
/usr/bin/autoreconf -vif
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc \
--sbindir=/usr/sbin \
--without-kernel \
--enable-devel \
--enable-libipq \
--enable-shared
make -j "$(nproc)"
EOF
FROM build AS install
RUN <<-EOF
set -eux
make install DESTDIR=/rootfs
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,41 @@
FROM scratch AS base
ENV VERSION=1.0.5
ENV SRC_FILE=libmnl-${VERSION}.tar.bz2
ENV SRC_SITE=https://netfilter.org/projects/libmnl/files/${SRC_FILE}
ENV SRC_HASH=274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/m4 . /
RUN tar -xf ${SRC_FILE}
WORKDIR /libmnl-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--enable-static
make -j "$(nproc)"
EOF
FROM build AS install
RUN <<-EOF
set -eux
make install DESTDIR=/rootfs
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,42 @@
FROM scratch AS base
ENV VERSION=1.2.7
ENV SRC_FILE=libnftnl-${VERSION}.tar.xz
ENV SRC_SITE=https://netfilter.org/projects/libnftnl/files/${SRC_FILE}
ENV SRC_HASH=9122774f968093d5c0bacddd67de480f31fa4073405a7fc058a34b0f387aecb3
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/musl . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/m4 . /
COPY --from=stagex/libmnl . /
COPY --from=stagex/linux-headers . /
RUN tar -xf ${SRC_FILE}
WORKDIR /libnftnl-${VERSION}
RUN --network=none <<-EOF
set -eux
./configure \
--build=x86_64-linux-musl \
--host=x86_64-linux-musl \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var \
--enable-static
make -j "$(nproc)"
EOF
FROM build AS install
RUN <<-EOF
set -eux
make install DESTDIR=/rootfs
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,57 @@
FROM scratch AS base
ENV VERSION=6.7
ENV SRC_HASH=ef31144a2576d080d8c31698e83ec9f66bf97c677fa2aaf0d5bbb9f3345b1069
ENV SRC_FILE=linux-${VERSION}.tar.xz
ENV SRC_SITE=http://mirrors.edge.kernel.org/pub/linux/kernel/v6.x/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
COPY --from=stagex/binutils . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/elfutils . /
COPY --from=stagex/openssl . /
COPY --from=stagex/perl . /
COPY --from=stagex/m4 . /
COPY --from=stagex/gcc . /
COPY --from=stagex/bison . /
COPY --from=stagex/libzstd . /
COPY --from=stagex/zlib . /
COPY --from=stagex/flex . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/coreutils . /
COPY --from=stagex/findutils . /
COPY --from=stagex/diffutils . /
COPY --from=stagex/tar . /
COPY --from=stagex/gzip . /
COPY --from=stagex/xz . /
COPY --from=stagex/sed . /
COPY --from=stagex/grep . /
COPY --from=stagex/gawk . /
COPY --from=stagex/bc . /
COPY --from=stagex/bash . /
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
make -j "$(nproc)" bzImage
EOF
FROM build AS install
RUN <<-EOF
set -eux
mkdir /rootfs
cp .config /rootfs/linux.config
cp arch/x86_64/boot/bzImage /rootfs
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,43 @@
FROM scratch AS base
ENV VERSION=5.1
ENV SRC_HASH=b8198dd259684f75622112eb3172800780fbedda0a83652d22d36db0d4c0433c
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/Changaco/python-libarchive-c/archive/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/python . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/libarchive . /
COPY --from=stagex/py-setuptools . /
COPY --from=stagex/py-installer . /
COPY --from=stagex/py-flit . /
COPY --from=stagex/py-gpep517 . /
COPY --from=stagex/py-wheel . /
COPY --from=stagex/py-distro . /
COPY --from=stagex/py-dateutil . /
COPY --from=stagex/py-urllib3 . /
COPY --from=stagex/py-cffi . /
COPY --from=stagex/zlib . /
COPY --from=stagex/openssl . /
COPY --from=stagex/libffi . /
COPY --from=stagex/cmake . /
COPY --from=stagex/gcc . /
RUN tar -xzf ${SRC_FILE}
WORKDIR python-libarchive-c-${VERSION}
RUN gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
FROM build AS install
RUN --network=none <<-EOF
set -eu
python -m installer -d /rootfs .dist/*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,43 @@
FROM scratch AS base
ENV VERSION=0.4.27
ENV SRC_HASH=3978a25d43d9a7b8a89ae9d726bd4962fc90dc4f69ae852e399f3c56d4b0bd63
ENV SRC_FILE=${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/ahupp/python-magic/archive/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/busybox . /
COPY --from=stagex/musl . /
COPY --from=stagex/zlib . /
COPY --from=stagex/openssl . /
COPY --from=stagex/python . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/make . /
COPY --from=stagex/cmake . /
COPY --from=stagex/libffi . /
COPY --from=stagex/py-setuptools . /
COPY --from=stagex/py-installer . /
COPY --from=stagex/py-flit . /
COPY --from=stagex/py-gpep517 . /
COPY --from=stagex/py-wheel . /
COPY --from=stagex/py-distro . /
COPY --from=stagex/py-dateutil . /
COPY --from=stagex/py-urllib3 . /
COPY --from=stagex/py-cffi . /
COPY --from=stagex/file . /
RUN tar -xzf ${SRC_FILE}
WORKDIR python-magic-${VERSION}
RUN gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
#
FROM build AS install
RUN --network=none <<-EOF
set -eu
python -m installer -d /rootfs .dist/*.whl
find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -16,6 +16,7 @@ COPY --from=stagex/musl . /
COPY --from=stagex/openssl . /
COPY --from=stagex/zlib . /
COPY --from=stagex/bzip2 . /
COPY --from=stagex/ncurses . /
COPY --from=stagex/sqlite3 . /
COPY --from=stagex/libffi . /
RUN tar -xf ${SRC_FILE}

View file

@ -0,0 +1,40 @@
FROM scratch AS base
ENV VERSION=1.1.13
ENV COMMIT=58aa9203c123022138b22cf96540c284876a7910
ENV SRC_FILE=runc-v${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/opencontainers/runc/archive/v${VERSION}/${SRC_FILE}
ENV SRC_HASH=789d5749a08ef1fbe5d1999b67883206a68a4e58e6ca0151c411d678f3480b25
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/musl . /
COPY --from=stagex/bash . /
COPY --from=stagex/busybox . /
COPY --from=stagex/go . /
COPY --from=stagex/go-md2man . /
COPY --from=stagex/make . /
COPY --from=stagex/gcc . /
COPY --from=stagex/binutils . /
COPY --from=stagex/linux-headers . /
COPY --from=stagex/pkgconf . /
COPY --from=stagex/libseccomp . /
RUN tar -xf ${SRC_FILE}
WORKDIR /runc-${VERSION}
RUN <<-EOF
set -eux
make EXTRA_LDFLAGS="-w -s -buildid=" COMMIT=${COMMIT} -j "$(nproc)"
make man
EOF
FROM build AS install
RUN <<-EOF
set -eux
install -Dsm755 runc /rootfs/usr/bin/runc
install -d /rootfs/usr/share/man/man8
install -Dm644 man/man8/* /rootfs/usr/share/man/man8/
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -0,0 +1,37 @@
FROM scratch AS base
ENV VERSION=0.19.0
ENV SRC_HASH=0fd35a7030052acd9f58948d1d900fe1e432ee37103c5561554408bdac6bbf0d
ENV SRC_FILE=v${VERSION}.tar.gz
ENV SRC_SITE=https://github.com/krallin/tini/archive/${SRC_FILE}
FROM base AS fetch
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
FROM fetch AS build
COPY --from=stagex/binutils . /
COPY --from=stagex/busybox . /
COPY --from=stagex/gcc . /
COPY --from=stagex/openssl . /
COPY --from=stagex/cmake . /
COPY --from=stagex/ninja . /
COPY --from=stagex/musl . /
COPY --from=stagex/make . /
RUN --network=none tar -xf ${SRC_FILE}
WORKDIR /tini-${VERSION}
ENV SOURCE_DATE_EPOCH=1
ENV CFLAGS="-DPR_SET_CHILD_SUBREAPER=36 -DPR_GET_CHILD_SUBREAPER=37"
RUN --network=none <<-EOF
set -eux
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=None
cmake --build build --target all tini-static
EOF
FROM build AS install
RUN --network=none <<-EOF
set -eux
install -Dm755 build/tini /rootfs/usr/sbin/tini
install -Dm755 build/tini-static /rootfs/usr/sbin/tini-static
EOF
FROM stagex/filesystem AS package
COPY --from=install /rootfs/. /

View file

@ -46,6 +46,7 @@ define build
$(shell ./src/context.sh $(NAME)) \
$(EXTRA_ARGS) \
$(NOCACHE_FLAG) \
$(CHECK_FLAG) \
-f packages/$(NAME)/Containerfile \
packages/$(NAME) \
)

View file

@ -290,6 +290,21 @@ out/buf/index.json: \
out/go/index.json
$(call build,buf)
.PHONY: buildkit
buildkit: out/buildkit/index.json
out/buildkit/index.json: \
packages/buildkit/Containerfile \
out/bash/index.json \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/go/index.json \
out/make/index.json \
out/musl/index.json \
out/pkgconf/index.json
$(call build,buildkit)
.PHONY: busybox
busybox: out/busybox/index.json
out/busybox/index.json: \
@ -399,6 +414,24 @@ out/cmake/index.json: \
out/zlib/index.json
$(call build,cmake)
.PHONY: containerd
containerd: out/containerd/index.json
out/containerd/index.json: \
packages/containerd/Containerfile \
out/bash/index.json \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/go/index.json \
out/go-md2man/index.json \
out/libseccomp/index.json \
out/linux-headers/index.json \
out/make/index.json \
out/musl/index.json \
out/pkgconf/index.json
$(call build,containerd)
.PHONY: coreutils
coreutils: out/coreutils/index.json
out/coreutils/index.json: \
@ -465,6 +498,51 @@ out/cython/index.json: \
out/zlib/index.json
$(call build,cython)
.PHONY: dhcpcd
dhcpcd: out/dhcpcd/index.json
out/dhcpcd/index.json: \
packages/dhcpcd/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libmnl/index.json \
out/linux-headers/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/pkgconf/index.json
$(call build,dhcpcd)
.PHONY: diffoscope
diffoscope: out/diffoscope/index.json
out/diffoscope/index.json: \
packages/diffoscope/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/cmake/index.json \
out/file/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libffi/index.json \
out/make/index.json \
out/musl/index.json \
out/openssl/index.json \
out/py-cffi/index.json \
out/py-dateutil/index.json \
out/py-distro/index.json \
out/py-flit/index.json \
out/py-gpep517/index.json \
out/py-installer/index.json \
out/py-libarchive/index.json \
out/py-magic/index.json \
out/py-setuptools/index.json \
out/py-urllib3/index.json \
out/py-wheel/index.json \
out/python/index.json \
out/zlib/index.json
$(call build,diffoscope)
.PHONY: diffutils
diffutils: out/diffutils/index.json
out/diffutils/index.json: \
@ -507,6 +585,39 @@ out/docbook-xsl/index.json: \
out/zlib/index.json
$(call build,docbook-xsl)
.PHONY: docker
docker: out/docker/index.json
out/docker/index.json: \
packages/docker/Containerfile \
out/bash/index.json \
out/binutils/index.json \
out/busybox/index.json \
out/ca-certificates/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/go/index.json \
out/libseccomp/index.json \
out/linux-headers/index.json \
out/make/index.json \
out/musl/index.json \
out/pkgconf/index.json
$(call build,docker)
.PHONY: docker-cli-buildx
docker-cli-buildx: out/docker-cli-buildx/index.json
out/docker-cli-buildx/index.json: \
packages/docker-cli-buildx/Containerfile \
out/bash/index.json \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/go/index.json \
out/make/index.json \
out/musl/index.json \
out/pkgconf/index.json
$(call build,docker-cli-buildx)
.PHONY: dosfstools
dosfstools: out/dosfstools/index.json
out/dosfstools/index.json: \
@ -776,6 +887,58 @@ out/freetds/index.json: \
out/unixodbc/index.json
$(call build,freetds)
.PHONY: fuse-overlayfs
fuse-overlayfs: out/fuse-overlayfs/index.json
out/fuse-overlayfs/index.json: \
packages/fuse-overlayfs/Containerfile \
out/autoconf/index.json \
out/automake/index.json \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/fuse3/index.json \
out/gcc/index.json \
out/linux-headers/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/perl/index.json \
out/pkgconf/index.json
$(call build,fuse-overlayfs)
.PHONY: fuse3
fuse3: out/fuse3/index.json
out/fuse3/index.json: \
packages/fuse3/Containerfile \
out/binutils/index.json \
out/bison/index.json \
out/busybox/index.json \
out/bzip2/index.json \
out/cmake/index.json \
out/expat/index.json \
out/filesystem/index.json \
out/flex/index.json \
out/gcc/index.json \
out/gettext/index.json \
out/libffi/index.json \
out/libxml2/index.json \
out/libxslt/index.json \
out/linux-headers/index.json \
out/make/index.json \
out/meson/index.json \
out/musl/index.json \
out/ncurses/index.json \
out/ninja/index.json \
out/pcre2/index.json \
out/pkgconf/index.json \
out/py-packaging/index.json \
out/python/index.json \
out/rhash/index.json \
out/util-linux/index.json \
out/xz/index.json \
out/zlib/index.json
$(call build,fuse3)
.PHONY: gawk
gawk: out/gawk/index.json
out/gawk/index.json: \
@ -1065,6 +1228,27 @@ out/icu/index.json: \
out/musl/index.json
$(call build,icu)
.PHONY: iptables
iptables: out/iptables/index.json
out/iptables/index.json: \
packages/iptables/Containerfile \
out/autoconf/index.json \
out/automake/index.json \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libmnl/index.json \
out/libnftnl/index.json \
out/libtool/index.json \
out/linux-headers/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/perl/index.json \
out/pkgconf/index.json
$(call build,iptables)
.PHONY: iputils
iputils: out/iputils/index.json
out/iputils/index.json: \
@ -1406,6 +1590,37 @@ out/libksba/index.json: \
out/zlib/index.json
$(call build,libksba)
.PHONY: libmnl
libmnl: out/libmnl/index.json
out/libmnl/index.json: \
packages/libmnl/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/linux-headers/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/pkgconf/index.json
$(call build,libmnl)
.PHONY: libnftnl
libnftnl: out/libnftnl/index.json
out/libnftnl/index.json: \
packages/libnftnl/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libmnl/index.json \
out/linux-headers/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/pkgconf/index.json
$(call build,libnftnl)
.PHONY: libqrencode
libqrencode: out/libqrencode/index.json
out/libqrencode/index.json: \
@ -1636,6 +1851,38 @@ out/linux-generic/index.json: \
out/zlib/index.json
$(call build,linux-generic)
.PHONY: linux-guest
linux-guest: out/linux-guest/index.json
out/linux-guest/index.json: \
packages/linux-guest/Containerfile \
out/bash/index.json \
out/bc/index.json \
out/binutils/index.json \
out/bison/index.json \
out/coreutils/index.json \
out/diffutils/index.json \
out/elfutils/index.json \
out/filesystem/index.json \
out/findutils/index.json \
out/flex/index.json \
out/gawk/index.json \
out/gcc/index.json \
out/grep/index.json \
out/gzip/index.json \
out/libzstd/index.json \
out/linux-headers/index.json \
out/m4/index.json \
out/make/index.json \
out/musl/index.json \
out/openssl/index.json \
out/perl/index.json \
out/pkgconf/index.json \
out/sed/index.json \
out/tar/index.json \
out/xz/index.json \
out/zlib/index.json
$(call build,linux-guest)
.PHONY: linux-headers
linux-headers: out/linux-headers/index.json
out/linux-headers/index.json: \
@ -2861,6 +3108,60 @@ out/py-jmespath/index.json: \
out/zlib/index.json
$(call build,py-jmespath)
.PHONY: py-libarchive
py-libarchive: out/py-libarchive/index.json
out/py-libarchive/index.json: \
packages/py-libarchive/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/cmake/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libarchive/index.json \
out/libffi/index.json \
out/make/index.json \
out/musl/index.json \
out/openssl/index.json \
out/py-cffi/index.json \
out/py-dateutil/index.json \
out/py-distro/index.json \
out/py-flit/index.json \
out/py-gpep517/index.json \
out/py-installer/index.json \
out/py-setuptools/index.json \
out/py-urllib3/index.json \
out/py-wheel/index.json \
out/python/index.json \
out/zlib/index.json
$(call build,py-libarchive)
.PHONY: py-magic
py-magic: out/py-magic/index.json
out/py-magic/index.json: \
packages/py-magic/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/cmake/index.json \
out/file/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/libffi/index.json \
out/make/index.json \
out/musl/index.json \
out/openssl/index.json \
out/py-cffi/index.json \
out/py-dateutil/index.json \
out/py-distro/index.json \
out/py-flit/index.json \
out/py-gpep517/index.json \
out/py-installer/index.json \
out/py-setuptools/index.json \
out/py-urllib3/index.json \
out/py-wheel/index.json \
out/python/index.json \
out/zlib/index.json
$(call build,py-magic)
.PHONY: py-markupsafe
py-markupsafe: out/py-markupsafe/index.json
out/py-markupsafe/index.json: \
@ -3375,6 +3676,7 @@ out/python/index.json: \
out/libffi/index.json \
out/make/index.json \
out/musl/index.json \
out/ncurses/index.json \
out/openssl/index.json \
out/sqlite3/index.json \
out/zlib/index.json
@ -3509,6 +3811,24 @@ out/rhash/index.json: \
out/openssl/index.json
$(call build,rhash)
.PHONY: runc
runc: out/runc/index.json
out/runc/index.json: \
packages/runc/Containerfile \
out/bash/index.json \
out/binutils/index.json \
out/busybox/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/go/index.json \
out/go-md2man/index.json \
out/libseccomp/index.json \
out/linux-headers/index.json \
out/make/index.json \
out/musl/index.json \
out/pkgconf/index.json
$(call build,runc)
.PHONY: rust
rust: out/rust/index.json
out/rust/index.json: \
@ -3749,6 +4069,21 @@ out/tflint/index.json: \
out/go/index.json
$(call build,tflint)
.PHONY: tini
tini: out/tini/index.json
out/tini/index.json: \
packages/tini/Containerfile \
out/binutils/index.json \
out/busybox/index.json \
out/cmake/index.json \
out/filesystem/index.json \
out/gcc/index.json \
out/make/index.json \
out/musl/index.json \
out/ninja/index.json \
out/openssl/index.json
$(call build,tini)
.PHONY: tofu
tofu: out/tofu/index.json
out/tofu/index.json: \