fix(aur): only check gpg signature after gpg import . fixes #2165 (#2239)

only check gpg on install
This commit is contained in:
Jo 2023-07-10 09:54:43 +02:00 committed by GitHub
parent dadc8c0d98
commit 23b053bccf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View file

@ -32,7 +32,7 @@ func (e *ErrDownloadSource) Unwrap() error {
func downloadPKGBUILDSource(ctx context.Context,
cmdBuilder exe.ICmdBuilder, pkgBuildDir string, installIncompatible bool,
) error {
args := []string{"--verifysource", "-Ccf"}
args := []string{"--verifysource", "--skippgpcheck", "-Ccf"}
if installIncompatible {
args = append(args, "--ignorearch")

View file

@ -54,7 +54,7 @@ func Test_downloadPKGBUILDSource(t *testing.T) {
cmdBuilder := &TestMakepkgBuilder{
parentBuilder: &exe.CmdBuilder{MakepkgConfPath: "/etc/not.conf", MakepkgFlags: []string{"--nocheck"}, MakepkgBin: "makepkg"},
test: t,
want: "makepkg --nocheck --config /etc/not.conf --verifysource -Ccf",
want: "makepkg --nocheck --config /etc/not.conf --verifysource --skippgpcheck -Ccf",
wantDir: "/tmp/yay-bin",
}
err := downloadPKGBUILDSource(context.Background(), cmdBuilder, filepath.Join("/tmp", "yay-bin"), false)
@ -70,7 +70,7 @@ func Test_downloadPKGBUILDSourceError(t *testing.T) {
cmdBuilder := &TestMakepkgBuilder{
parentBuilder: &exe.CmdBuilder{MakepkgConfPath: "/etc/not.conf", MakepkgFlags: []string{"--nocheck"}, MakepkgBin: "makepkg"},
test: t,
want: "makepkg --nocheck --config /etc/not.conf --verifysource -Ccf",
want: "makepkg --nocheck --config /etc/not.conf --verifysource --skippgpcheck -Ccf",
wantDir: "/tmp/yay-bin",
showError: &exec.ExitError{},
}

View file

@ -49,7 +49,7 @@ func TestIntegrationLocalInstall(t *testing.T) {
}
wantShow := []string{
"makepkg --verifysource -Ccf",
"makepkg --verifysource --skippgpcheck -Ccf",
"pacman -S --config /etc/pacman.conf -- community/dotnet-sdk-6.0 community/dotnet-runtime-6.0",
"pacman -D -q --asdeps --config /etc/pacman.conf -- dotnet-runtime-6.0 dotnet-sdk-6.0",
"makepkg --nobuild -fC --ignorearch",
@ -318,7 +318,7 @@ func TestIntegrationLocalInstallNeeded(t *testing.T) {
}
wantShow := []string{
"makepkg --verifysource -Ccf",
"makepkg --verifysource --skippgpcheck -Ccf",
"pacman -S --config /etc/pacman.conf -- community/dotnet-sdk-6.0 community/dotnet-runtime-6.0",
"pacman -D -q --asdeps --config /etc/pacman.conf -- dotnet-runtime-6.0 dotnet-sdk-6.0",
"makepkg --nobuild -fC --ignorearch",
@ -486,7 +486,7 @@ func TestIntegrationLocalInstallGenerateSRCINFO(t *testing.T) {
}
wantShow := []string{
"makepkg --verifysource -Ccf",
"makepkg --verifysource --skippgpcheck -Ccf",
"pacman -S --config /etc/pacman.conf -- community/dotnet-sdk-6.0 community/dotnet-runtime-6.0",
"pacman -D -q --asdeps --config /etc/pacman.conf -- dotnet-runtime-6.0 dotnet-sdk-6.0",
"makepkg --nobuild -fC --ignorearch",
@ -777,7 +777,7 @@ func TestIntegrationLocalInstallWithDepsProvides(t *testing.T) {
}
wantShow := []string{
"makepkg --verifysource -Ccf",
"makepkg --verifysource --skippgpcheck -Ccf",
"makepkg --nobuild -fC --ignorearch",
"makepkg -c --nobuild --noextract --ignorearch",
"pacman -U --config /etc/pacman.conf -- /testdir/ceph-libs-bin-17.2.6-2-x86_64.pkg.tar.zst",
@ -904,8 +904,8 @@ func TestIntegrationLocalInstallTwoSrcInfosWithDeps(t *testing.T) {
}
wantShow := []string{
"makepkg --verifysource -Ccf",
"makepkg --verifysource -Ccf",
"makepkg --verifysource --skippgpcheck -Ccf",
"makepkg --verifysource --skippgpcheck -Ccf",
"makepkg --nobuild -fC --ignorearch",
"makepkg -c --nobuild --noextract --ignorearch",
"pacman -U --config /etc/pacman.conf -- /testdir1/libzip-git-1.9.2.r166.gd2c47d0f-1-x86_64.pkg.tar.zst",

View file

@ -553,7 +553,7 @@ pkgname = python-vosk
}
wantShow := []string{
"pacman -S -y --config /etc/pacman.conf --",
"makepkg --verifysource -Ccf", "makepkg --nobuild -fC --ignorearch",
"makepkg --verifysource --skippgpcheck -Ccf", "makepkg --nobuild -fC --ignorearch",
"makepkg -c --nobuild --noextract --ignorearch",
"pacman -U --config /etc/pacman.conf -- /testdir/vosk-api-0.3.45-1-x86_64.pkg.tar.zst",
"makepkg --nobuild -fC --ignorearch", "makepkg -c --nobuild --noextract --ignorearch",