From 5a4b65b146410b8fbd4e34912a1871212668b7c7 Mon Sep 17 00:00:00 2001 From: Arthur Zamarin Date: Wed, 17 Apr 2024 20:34:25 +0300 Subject: updater: use pmaint instead of egencache Signed-off-by: Arthur Zamarin --- Dockerfile.updater | 17 +---------------- bin/fullupdate.sh | 9 +-------- bin/update.sh | 9 +-------- 3 files changed, 3 insertions(+), 32 deletions(-) diff --git a/Dockerfile.updater b/Dockerfile.updater index eb21921..0514cda 100644 --- a/Dockerfile.updater +++ b/Dockerfile.updater @@ -5,22 +5,7 @@ COPY . /go/src/soko RUN templ generate && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o bin . -FROM gentoo/stage3:latest as gentoobuilder -# Need a portage tree to build, use last nights. -COPY --from=gentoo/portage:latest /var/db/repos/gentoo /var/db/repos/gentoo -# Sandbox doesn't work well in docker. -ENV FEATURES="-userpriv -usersandbox -sandbox binpkg-ignore-signature" -ENV USE="-bindist" -ENV PORTAGE_BINHOST="https://gentoo.osuosl.org/releases/amd64/binpackages/17.1/x86-64/" -RUN emerge -C openssh -RUN emerge -v -g --quiet-build dev-vcs/git -RUN echo 'FEATURES="-userpriv -usersandbox -sandbox binpkg-ignore-signature"' >> /etc/portage/make.conf -RUN rm -rf /var/db/repos/gentoo - -# We can't start from scratch and copy / due to: -# https://github.com/GoogleContainerTools/kaniko/issues/2033 -# FROM scratch -# COPY --from=gentoobuilder / / +FROM ghcr.io/pkgcore/pkgcheck:latest COPY --from=builder /go/src/soko/assets /go/src/soko/assets COPY --from=builder /go/src/soko/bin /go/src/soko/bin diff --git a/bin/fullupdate.sh b/bin/fullupdate.sh index a4627a3..c4d5be3 100755 --- a/bin/fullupdate.sh +++ b/bin/fullupdate.sh @@ -27,15 +27,8 @@ update_repository(){ update_md5cache(){ mkdir -p /var/cache/pgo-egencache - cd /mnt/packages-tree/gentoo/ || exit 1 - - #echo 'FEATURES="-userpriv -usersandbox -sandbox"' >> /etc/portage/make.conf - - egencache -j "${JOBS}" --cache-dir /var/cache/pgo-egencache --repo gentoo --repositories-configuration '[gentoo] - location = /mnt/packages-tree/gentoo' --update - egencache -j "${JOBS}" --cache-dir /var/cache/pgo-egencache --repo gentoo --repositories-configuration '[gentoo] - location = /mnt/packages-tree/gentoo' --update-use-local-desc + pmaint regen --threads "${JOBS}" --use-local-desc --pkg-desc-index /mnt/packages-tree/gentoo/ } fullupdate_database(){ diff --git a/bin/update.sh b/bin/update.sh index 1774e34..77ac70e 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -27,15 +27,8 @@ update_repository(){ update_md5cache(){ mkdir -p /var/cache/pgo-egencache - cd /mnt/packages-tree/gentoo/ || exit 1 - - #echo 'FEATURES="-userpriv -usersandbox -sandbox"' >> /etc/portage/make.conf - - egencache -j "${JOBS}" --cache-dir /var/cache/pgo-egencache --repo gentoo --repositories-configuration '[gentoo] - location = /mnt/packages-tree/gentoo' --update - egencache -j "${JOBS}" --cache-dir /var/cache/pgo-egencache --repo gentoo --repositories-configuration '[gentoo] - location = /mnt/packages-tree/gentoo' --update-use-local-desc + pmaint regen --threads "${JOBS}" --use-local-desc --pkg-desc-index /mnt/packages-tree/gentoo/ } update_database(){ -- cgit v1.2.3-65-gdbad