Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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