Skip to content

add ability to add gnupg public keys in building git packages#898

Open
Dylan1496 wants to merge 2 commits intoactionless:masterfrom
Dylan1496:master
Open

add ability to add gnupg public keys in building git packages#898
Dylan1496 wants to merge 2 commits intoactionless:masterfrom
Dylan1496:master

Conversation

@Dylan1496
Copy link
Contributor

Useful for certain packages that have publicpgpkey arrays in their PKGBUILD file. Enables one to avoid having to quit out of the pikaur process to add the key using gpg.

This requires the python-gnupg package - the PKGBUILD file has been updated to reflect this.

@actionless
Copy link
Owner

actionless commented Sep 23, 2025

thanks!

This requires the python-gnupg package

please make it an optional dependency instead (and optional import, right before your second prompt, if can't import - just print that opt dep missing -> re-show main recovery prompt again)

and add to makedeps here: https://github.com/actionless/pikaur/blob/master/pikaur_static/PKGBUILD

and also resolve CI linting errors

gnupghome = self.build_gpgdir
logger.debug("Using gnupg directory: {}", gnupghome)
gpg = GPG(gnupghome=gnupghome, verbose=True)
gpg.recv_keys("keyserver.ubuntu.com", answer2)
Copy link
Owner

Choose a reason for hiding this comment

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

shouldn't keyserver be configurable?

self.get_latest_dev_sources(check_dev_pkgs=check_dev_pkgs)
return
if answer == translate("g"): # pragma: no cover
prompt2 = translate("Enter a valid GnuPG key: ")
Copy link
Owner

Choose a reason for hiding this comment

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

also would be better to extract it to a function

@@ -375,6 +377,7 @@ def get_latest_dev_sources(
"\n".join((
Copy link
Owner

@actionless actionless Sep 24, 2025

Choose a reason for hiding this comment

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

(to make possible re-showing prompt, the easiest way is to extract this code starting from prompt = "{} {}\n{}\n> ".format( into new checkout_recovery_prompt() func, so it could call itself recursively to re-show without action

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