Skip to content

dev-util/google-antigravity: try making verify-sig more maintainable and fix misc. errors#419

Closed
gonsoos wants to merge 2 commits intogentoo:devfrom
gonsoos:google-a
Closed

dev-util/google-antigravity: try making verify-sig more maintainable and fix misc. errors#419
gonsoos wants to merge 2 commits intogentoo:devfrom
gonsoos:google-a

Conversation

@gonsoos
Copy link
Contributor

@gonsoos gonsoos commented Jan 16, 2026

@falbrechtskirchinger Thank you for your efforts on the package! I fixed the following issues:

  • I found the verify-sig functionality hard to read and there was potential to simplify it by using eclass functions.
  • Pipes pipes cannot be checked with || die.
  • verify-sig sources should be versioned and fetched conditionally on the USE flag.

Please take a look at the commit messages for more context. What do you think?

Fixes: 24744c6
Fixes: b68be6e

* Replace sha256sum --check --strict with verify-sig_unsigned_checksums.

  Use the fact that verify-sig_unsigned_checksums in sha256 mode ignores
  any line in <checksum-file>
  - that doesn't match the expected format "${checksum} ${filename}".
  - whose ${filename} wasn't passed as an argument.

  With that knowledge, we fix the format only for the arguments of
  verify-sig_unsigned_checksums only for that line.
* Check pipe status with eapi9-pipestatus instead of die.

Fixes: 24744c6
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
* Add ${PV} to sources.

Fixes: b68be6e
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Copy link
Contributor

@falbrechtskirchinger falbrechtskirchinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvements! LGTM.

VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/google-artifact-registry.asc

inherit chromium-2 optfeature pax-utils unpacker verify-sig xdg
inherit eapi9-pipestatus chromium-2 optfeature pax-utils unpacker verify-sig xdg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder!

Comment on lines +100 to +111
verify-sig_verify_message InRelease - \
| sed "s,[0-9]\+ main/binary-${ARCH}.*,Packages.${ARCH}," \
| verify-sig_verify_unsigned_checksums - sha256 Packages.${ARCH}
pipestatus || die

cd "${DISTDIR}" > /dev/null || die
local BUILD_ID_ARCH=BUILD_ID_${ARCH^^}
sed -n "/^Version: ${PV}-${!BUILD_ID_ARCH}/,/^SHA256:/p" \
"${WORKDIR}/Packages.${ARCH}" \
| sed "s,^SHA256: \(.*\),\1 ${P}_${ARCH}.deb," \
| verify-sig_verify_unsigned_checksums - sha256 ${P}_${ARCH}.deb
pipestatus || die
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a lot simpler. 👍

SRC_URI="
amd64? ( ${BASE_SRC_URI}/antigravity_${PV}-${BUILD_ID_AMD64}_amd64_${DEB_HASH_AMD64}.deb -> ${P}_amd64.deb )
arm64? ( ${BASE_SRC_URI}/antigravity_${PV}-${BUILD_ID_ARM64}_arm64_${DEB_HASH_ARM64}.deb -> ${P}_arm64.deb )
verify-sig? ( https://home.cit.tum.de/~salu/distfiles/${P}-verify-sig.tar.xz )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping to get away with hosting these inside FILESDIR for a few releases. I plan to automate the verify-sig tarball generation and release notifications in the coming weeks or months. My only concern is handling any new releases in the interim.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some contributors host tarballs in a GitHub repo. In the meantime, I can also host these for you.

gentoo-bot pushed a commit that referenced this pull request Jan 17, 2026
* Replace sha256sum --check --strict with verify-sig_unsigned_checksums.

  Use the fact that verify-sig_unsigned_checksums in sha256 mode ignores
  any line in <checksum-file>
  - that doesn't match the expected format "${checksum} ${filename}".
  - whose ${filename} wasn't passed as an argument.

  With that knowledge, we fix the format only for the arguments of
  verify-sig_unsigned_checksums only for that line.
* Check pipe status with eapi9-pipestatus instead of die.

Fixes: 24744c6
Part-of: #419
Acked-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants