Merge remote-tracking branch 'origin/lance/tpm2-tools' into staging
This commit is contained in:
commit
4f9cfdb62e
5 changed files with 256 additions and 0 deletions
34
packages/autoconf-archive/Containerfile
Normal file
34
packages/autoconf-archive/Containerfile
Normal file
|
@ -0,0 +1,34 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=2023.02.20
|
||||
ENV SRC_HASH=71d4048479ae28f1f5794619c3d72df9c01df49b1c628ef85fde37596dc31a33
|
||||
ENV SRC_FILE=autoconf-archive-${VERSION}.tar.xz
|
||||
ENV SRC_SITE=https://ftp.gnu.org/gnu/autoconf-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/gcc . /
|
||||
#COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/make . /
|
||||
COPY --from=stagex/musl . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR autoconf-archive-${VERSION}
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
./configure \
|
||||
--build=x86_64-linux-musl \
|
||||
--host=x86_64-linux-musl \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--prefix=/usr
|
||||
make -j "$(nproc)"
|
||||
EOF
|
||||
|
||||
from build as install
|
||||
RUN --network=none make DESTDIR=/rootfs install
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/. /
|
42
packages/json-c/Containerfile
Normal file
42
packages/json-c/Containerfile
Normal file
|
@ -0,0 +1,42 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=0.17
|
||||
ENV SRC_HASH=7550914d58fb63b2c3546f3ccfbe11f1c094147bd31a69dcd23714d7956159e6
|
||||
ENV SRC_FILE=json-c-${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://s3.amazonaws.com/json-c_releases/releases/${SRC_FILE}
|
||||
|
||||
FROM base as fetch
|
||||
ADD --checksum=sha256:${SRC_HASH} ${SRC_SITE} .
|
||||
|
||||
FROM fetch as build
|
||||
COPY --from=stagex/busybox . /
|
||||
COPY --from=stagex/binutils . /
|
||||
COPY --from=stagex/cmake . /
|
||||
COPY --from=stagex/ninja . /
|
||||
COPY --from=stagex/musl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/gcc . /
|
||||
COPY --from=stagex/zlib . /
|
||||
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR json-c-${VERSION}
|
||||
RUN <<-EOF
|
||||
set -eux
|
||||
cmake \
|
||||
-B build \
|
||||
-G Ninja \
|
||||
-Wno-dev \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr/ \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DBUILD_STATIC_LIBS=ON \
|
||||
-DCMAKE_SYSTEM_NAME=Linux \
|
||||
-DCMAKE_HOST_SYSTEM_NAME=Linux
|
||||
cmake --build build --target all
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN --network=none DESTDIR="/rootfs" cmake --install build
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/. /
|
50
packages/tpm2-tools/Containerfile
Normal file
50
packages/tpm2-tools/Containerfile
Normal file
|
@ -0,0 +1,50 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=5.6
|
||||
ENV SRC_HASH=7169fac7b5afb3ce20091b8d66ee13a69cf0b107ea1e17f5d1aa087d99bcf8e2
|
||||
ENV SRC_FILE=${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/tpm2-software/tpm2-tools/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
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/linux-headers . /
|
||||
COPY --from=stagex/util-linux . /
|
||||
COPY --from=stagex/perl . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/autoconf . /
|
||||
COPY --from=stagex/autoconf-archive . /
|
||||
COPY --from=stagex/automake . /
|
||||
COPY --from=stagex/libtool . /
|
||||
COPY --from=stagex/pkgconf . /
|
||||
COPY --from=stagex/m4 . /
|
||||
COPY --from=stagex/curl . /
|
||||
COPY --from=stagex/tpm2-tss . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR tpm2-tools-${VERSION}
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
printf "${VERSION}" > VERSION
|
||||
cat bootstrap | grep -ve ^git > bootstrap-nogit
|
||||
sh bootstrap-nogit
|
||||
./configure \
|
||||
--build=x86_64-unknown-linux-musl \
|
||||
--host=x86_64-unknown-linux-musl \
|
||||
--prefix=/usr
|
||||
make -j "$(nproc)"
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
make DESTDIR=/rootfs install
|
||||
rm -rf /rootfs/var/run
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/. /
|
55
packages/tpm2-tss/Containerfile
Normal file
55
packages/tpm2-tss/Containerfile
Normal file
|
@ -0,0 +1,55 @@
|
|||
FROM scratch as base
|
||||
ENV VERSION=4.1.0
|
||||
ENV SRC_HASH=4f6c53010b9f422107235d748178daf77817bd2bbe856befa3d54cab9f2f07e4
|
||||
ENV SRC_FILE=${VERSION}.tar.gz
|
||||
ENV SRC_SITE=https://github.com/tpm2-software/tpm2-tss/archive/refs/tags/${SRC_FILE}
|
||||
|
||||
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/linux-headers . /
|
||||
COPY --from=stagex/util-linux . /
|
||||
COPY --from=stagex/perl . /
|
||||
COPY --from=stagex/openssl . /
|
||||
COPY --from=stagex/autoconf . /
|
||||
COPY --from=stagex/autoconf-archive . /
|
||||
COPY --from=stagex/automake . /
|
||||
COPY --from=stagex/libtool . /
|
||||
COPY --from=stagex/pkgconf . /
|
||||
COPY --from=stagex/m4 . /
|
||||
COPY --from=stagex/curl . /
|
||||
COPY --from=stagex/json-c . /
|
||||
RUN tar -xf ${SRC_FILE}
|
||||
WORKDIR tpm2-tss-${VERSION}
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
printf "${VERSION}" > VERSION
|
||||
cat bootstrap | grep -ve ^git > bootstrap-nogit
|
||||
sh bootstrap-nogit
|
||||
./configure \
|
||||
--build=x86_64-unknown-linux-musl \
|
||||
--host=x86_64-unknown-linux-musl \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--with-tctidefaultmodule=device \
|
||||
--with-tctidefaultconfig=/dev/tpmrm0 \
|
||||
--with-crypto=ossl
|
||||
make -j "$(nproc)"
|
||||
EOF
|
||||
|
||||
FROM build as install
|
||||
RUN --network=none <<-EOF
|
||||
set -eux
|
||||
make DESTDIR=/rootfs install
|
||||
rm -rf /rootfs/var/run
|
||||
EOF
|
||||
|
||||
FROM stagex/filesystem as package
|
||||
COPY --from=install /rootfs/. /
|
|
@ -29,6 +29,18 @@ out/autoconf/index.json: \
|
|||
out/perl/index.json
|
||||
$(call build,autoconf)
|
||||
|
||||
.PHONY: autoconf-archive
|
||||
autoconf-archive: out/autoconf-archive/index.json
|
||||
out/autoconf-archive/index.json: \
|
||||
packages/autoconf-archive/Containerfile \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/make/index.json \
|
||||
out/musl/index.json
|
||||
$(call build,autoconf-archive)
|
||||
|
||||
.PHONY: automake
|
||||
automake: out/automake/index.json
|
||||
out/automake/index.json: \
|
||||
|
@ -628,6 +640,21 @@ out/iputils/index.json: \
|
|||
out/zlib/index.json
|
||||
$(call build,iputils)
|
||||
|
||||
.PHONY: json-c
|
||||
json-c: out/json-c/index.json
|
||||
out/json-c/index.json: \
|
||||
packages/json-c/Containerfile \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/cmake/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/musl/index.json \
|
||||
out/ninja/index.json \
|
||||
out/openssl/index.json \
|
||||
out/zlib/index.json
|
||||
$(call build,json-c)
|
||||
|
||||
.PHONY: k9s
|
||||
k9s: out/k9s/index.json
|
||||
out/k9s/index.json: \
|
||||
|
@ -1996,6 +2023,54 @@ out/tofu/index.json: \
|
|||
out/go/index.json
|
||||
$(call build,tofu)
|
||||
|
||||
.PHONY: tpm2-tools
|
||||
tpm2-tools: out/tpm2-tools/index.json
|
||||
out/tpm2-tools/index.json: \
|
||||
packages/tpm2-tools/Containerfile \
|
||||
out/autoconf/index.json \
|
||||
out/autoconf-archive/index.json \
|
||||
out/automake/index.json \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/curl/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/libtool/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/tpm2-tss/index.json \
|
||||
out/util-linux/index.json
|
||||
$(call build,tpm2-tools)
|
||||
|
||||
.PHONY: tpm2-tss
|
||||
tpm2-tss: out/tpm2-tss/index.json
|
||||
out/tpm2-tss/index.json: \
|
||||
packages/tpm2-tss/Containerfile \
|
||||
out/autoconf/index.json \
|
||||
out/autoconf-archive/index.json \
|
||||
out/automake/index.json \
|
||||
out/binutils/index.json \
|
||||
out/busybox/index.json \
|
||||
out/curl/index.json \
|
||||
out/filesystem/index.json \
|
||||
out/gcc/index.json \
|
||||
out/json-c/index.json \
|
||||
out/libtool/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/util-linux/index.json
|
||||
$(call build,tpm2-tss)
|
||||
|
||||
.PHONY: util-linux
|
||||
util-linux: out/util-linux/index.json
|
||||
out/util-linux/index.json: \
|
||||
|
|
Loading…
Reference in a new issue