Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdk v0.5: Add SELinux tools and GCC/Rust license files #678

Merged
merged 3 commits into from
Jan 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 14 additions & 1 deletion extras/sdk-container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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/ /
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion extras/sdk-container/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down