diff --git a/.gitignore b/.gitignore index ae75426d89b..0a1b2da0284 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ etc/conf etc/conf.* etc/virtual etc/xbps.d/custom +etc/repo-keys diff --git a/README.md b/README.md index a63ee5e8082..b52198c98dd 100644 --- a/README.md +++ b/README.md @@ -340,6 +340,9 @@ Each time a binary package is created, a package signature must be created with > It is not possible to sign a repository with multiple RSA keys. +If packages in `hostdir/binpkgs` are signed, the key in `.plist` format (as imported by xbps) can be placed +in `etc/repo-keys/` to prevent xbps-src from prompting to import that key. + ### Rebuilding and overwriting existing local packages diff --git a/common/xbps-src/shutils/chroot.sh b/common/xbps-src/shutils/chroot.sh index d65d8d7e307..69ca6b78f58 100644 --- a/common/xbps-src/shutils/chroot.sh +++ b/common/xbps-src/shutils/chroot.sh @@ -309,6 +309,9 @@ chroot_sync_repodata() { # Copy xbps repository keys to the masterdir. mkdir -p $XBPS_MASTERDIR/var/db/xbps/keys cp -f $XBPS_COMMONDIR/repo-keys/*.plist $XBPS_MASTERDIR/var/db/xbps/keys + if [ -n "$(shopt -s nullglob; echo "$XBPS_DISTDIR"/etc/repo-keys/*.plist)" ]; then + cp -f "$XBPS_DISTDIR"/etc/repo-keys/*.plist "$XBPS_MASTERDIR"/var/db/xbps/keys + fi # Make sure to sync index for remote repositories. if [ -z "$XBPS_SKIP_REMOTEREPOS" ]; then