Skip to content

Commit

Permalink
chore: update DIGEST process to reflect upstream name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oddlama committed Feb 28, 2022
1 parent 871f962 commit 02db85b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function load_default_config() {
GENTOO_MIRROR="https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo"
GENTOO_ARCH="amd64"

SELECT_MIRRORS=true
SELECT_MIRRORS=false
SELECT_MIRRORS_LARGE_FILE=false

ADDITIONAL_PACKAGES=()
Expand Down
10 changes: 5 additions & 5 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ function download_stage3() {
else
einfo "Downloading $STAGE3_BASENAME tarball"
download "$STAGE3_RELEASES/${CURRENT_STAGE3}" "${CURRENT_STAGE3}"
download "$STAGE3_RELEASES/${CURRENT_STAGE3}.DIGESTS.asc" "${CURRENT_STAGE3}.DIGESTS.asc"
download "$STAGE3_RELEASES/${CURRENT_STAGE3}.asc" "${CURRENT_STAGE3}.asc"

# Import gentoo keys
einfo "Importing gentoo gpg key"
Expand All @@ -803,14 +803,14 @@ function download_stage3() {
|| die "Could not import gentoo gpg key"

# Verify DIGESTS signature
einfo "Verifying DIGEST.asc signature"
gpg --quiet --verify "${CURRENT_STAGE3}.DIGESTS.asc" \
|| die "Signature of '${CURRENT_STAGE3}.DIGESTS.asc' invalid!"
einfo "Verifying tarball signature"
gpg --quiet --verify "${CURRENT_STAGE3}.asc" \
|| die "Signature of '${CURRENT_STAGE3}.asc' invalid!"

# Check hashes
einfo "Verifying tarball integrity"
# Replace any absolute paths in the digest file with just the stage3 basename, so it will be found by rhash
rhash -P --check <(grep -B 1 'tar.xz$' "${CURRENT_STAGE3}.DIGESTS.asc" | sed -e 's/ .*stage3-/ stage3-/') \
rhash -P --check <(grep -B 1 'tar.xz$' "${CURRENT_STAGE3}.DIGESTS" | sed -e 's/ .*stage3-/ stage3-/') \
|| die "Checksum mismatch!"

# Create verification file in case the script is restarted
Expand Down
2 changes: 2 additions & 0 deletions scripts/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ function configure_portage() {
einfo "Adding ~$GENTOO_ARCH to ACCEPT_KEYWORDS"
echo "ACCEPT_KEYWORDS=\"~$GENTOO_ARCH\"" >> /etc/portage/make.conf \
|| die "Could not modify /etc/portage/make.conf"
chmod 644 /etc/portage/make.conf \
|| die "Could not chmod 644 /etc/portage/make.conf"
fi
}

Expand Down

0 comments on commit 02db85b

Please sign in to comment.