Skip to content

Commit

Permalink
gentoo: get base building & testing package
Browse files Browse the repository at this point in the history
Not yet testing the current repository state though.

Signed-off-by: Sam James <sam@gentoo.org>
  • Loading branch information
thesamesam authored and radarhere committed Feb 22, 2022
1 parent 67f7055 commit 16d14a1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions gentoo/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM gentoo/stage3:desktop

# Disable bits which don't work within Docker.
RUN echo 'FEATURES="-ipc-sandbox -pid-sandbox -network-sandbox -usersandbox -mount-sandbox -sandbox"' | cat >> /etc/portage/make.conf
# Speed things up a bit.
RUN echo 'FEATURES="${FEATURES} parallel-install parallel-fetch -merge-sync"' | cat >> /etc/portage/make.conf

# TODO: May be able to drop this once changed to desktop docker images?
# https://dilfridge.blogspot.com/2021/09/experimental-binary-gentoo-package.html
RUN echo -e "[binhost]\npriority = 9999\nsync-uri = https://gentoo.osuosl.org/experimental/amd64/binpkg/default/linux/17.1/x86-64/\n" | cat >> /etc/portage/binrepos.conf

RUN echo 'EMERGE_DEFAULT_OPTS="--binpkg-respect-use=n --getbinpkg=y --autounmask-write --autounmask-continue --autounmask-keep-keywords=y --autounmask-use=y"' | cat >> /etc/portage/make.conf
RUN echo 'USE="elogind -polkit"' | cat >> /etc/portage/make.conf
RUN cat /etc/portage/make.conf

RUN emerge-webrsync --quiet || true
RUN eselect news read --quiet all || true

# Make sure everything is consistent first.
RUN emerge --quiet -uDU @world

# Install some useful bits.
RUN emerge --quiet --oneshot --jobs=$(nproc) media-libs/libjpeg-turbo sys-libs/zlib app-text/ghostscript-gpl

# Try install as many of our (test) dependencies as possible with fewer flags on
RUN emerge --quiet --oneshot --onlydeps --jobs=$(nproc) --with-test-deps dev-python/pillow || true

# Then install the remaining (test) dependencies with more flags (because they clearly didn't get picked up before)
# ... and these more flags are needed to run tests anyway.
RUN USE="jpeg jpeg2k tiff truetype xvfb X elogind" emerge --quiet --oneshot --onlydeps --with-test-deps --getbinpkg=n dev-python/pillow

# Actually build & run the tests.
# TODO: change this to use the mounted version of Pillow (so the commit to be tested)
RUN FEATURES="test" USE="jpeg jpeg2k tiff truetype xvfb X elogind" emerge --verbose --oneshot --getbinpkg=n dev-python/pillow
1 change: 1 addition & 0 deletions gentoo/Makefile

0 comments on commit 16d14a1

Please sign in to comment.