Skip to content

Commit

Permalink
fix(aur): only check gpg signature after gpg import . fixes #2165 (#2239
Browse files Browse the repository at this point in the history
)

only check gpg on install
  • Loading branch information
Jguer authored Jul 10, 2023
1 parent dadc8c0 commit 23b053b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion aur_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions aur_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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{},
}
Expand Down
12 changes: 6 additions & 6 deletions local_install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 23b053b

Please sign in to comment.