diff --git a/Makefile.toml b/Makefile.toml index 351d7acfa7b..27e69460e46 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -19,7 +19,7 @@ DOCKER_BUILDKIT = "1" [env.development] # Defined here to allow us to override ${BUILDSYS_ARCH} on the command line. -BUILDSYS_SDK_IMAGE = "thar/sdk-${BUILDSYS_ARCH}:v0.4" +BUILDSYS_SDK_IMAGE = "thar/sdk-${BUILDSYS_ARCH}:v0.5" # Permit pulling directly Upstream URLs when lookaside cache results in MISSes. BUILDSYS_ALLOW_UPSTREAM_SOURCE_URL = "true" # Extra flags used when spawning containers. diff --git a/extras/sdk-container/Dockerfile b/extras/sdk-container/Dockerfile index e5952f6425d..84a0ab0d963 100644 --- a/extras/sdk-container/Dockerfile +++ b/extras/sdk-container/Dockerfile @@ -11,7 +11,8 @@ RUN \ bc hostname intltool grub2-tools gperf kmod rsync wget \ elfutils-devel libcap-devel openssl-devel \ createrepo_c e2fsprogs gdisk grub2-tools \ - kpartx lz4 veritysetup dosfstools mtools && \ + kpartx lz4 veritysetup dosfstools mtools \ + policycoreutils secilc && \ dnf clean all && \ useradd builder @@ -54,6 +55,9 @@ RUN \ make O=output/${ARCH}-gnu toolchain && \ find output/${ARCH}-gnu/build/linux-headers-${KVER}/usr/include -name '.*' -delete +RUN \ + install -p -m 0644 -Dt licenses output/${ARCH}-gnu/build/host-gcc-final-*/{COPYING3,COPYING.RUNTIME} + # =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= FROM toolchain as toolchain-musl @@ -80,6 +84,9 @@ COPY --from=toolchain-gnu \ COPY --from=toolchain-gnu \ /home/builder/buildroot/output/${ARCH}-gnu/build/linux-headers-${KVER}/usr/include/ \ /${ARCH}-thar-linux-gnu/sys-root/usr/include/ +COPY --from=toolchain-gnu \ + /home/builder/buildroot/licenses/ \ + /${ARCH}-thar-linux-gnu/sys-root/usr/share/licenses/thar-${ARCH}-libgcc/ COPY --from=toolchain-musl \ /home/builder/buildroot/output/${ARCH}-musl/toolchain/ / @@ -261,6 +268,9 @@ RUN \ cp config-${ARCH}.toml config.toml && \ ./x.py install +RUN \ + install -p -m 0644 -Dt licenses COPYRIGHT LICENSE-* + # Set appropriate environment for using this Rust compiler to build tools ENV PATH="/usr/libexec/rust/bin:$PATH" LD_LIBRARY_PATH="/usr/libexec/rust/lib" @@ -369,6 +379,9 @@ COPY --chown=0:0 --from=sdk-musl ${MUSL_SYSROOT}/ ${MUSL_SYSROOT}/ # "sdk-rust" has our Rust toolchain with the required targets. COPY --chown=0:0 --from=sdk-rust /usr/libexec/rust/ /usr/libexec/rust/ +COPY --chown=0:0 --from=sdk-rust \ + /home/builder/rust/licenses/ \ + /${ARCH}-thar-linux-gnu/sys-root/usr/share/licenses/thar-${ARCH}-libstd-rust/ # "sdk-go" has the Go toolchain and standard library builds. COPY --chown=0:0 --from=sdk-go /home/builder/go/bin /usr/libexec/go/bin/ diff --git a/extras/sdk-container/Makefile b/extras/sdk-container/Makefile index ae135920d74..0c3ec4f4573 100644 --- a/extras/sdk-container/Makefile +++ b/extras/sdk-container/Makefile @@ -1,6 +1,6 @@ ARCH ?= $(shell uname -m) -VERSION := v0.4 +VERSION := v0.5 TAG := thar/sdk-$(ARCH):$(VERSION) ARCHIVE := thar-sdk-$(ARCH)-$(VERSION).tar.gz