Skip to content

Commit 666ef77

Browse files
committed
ci: update acceptance tests to debian:trixie, remove dpkg-sig from tests
1 parent 08822ca commit 666ef77

File tree

5 files changed

+22
-49
lines changed

5 files changed

+22
-49
lines changed

acceptance_test.go

+18-23
Original file line numberDiff line numberDiff line change
@@ -318,30 +318,25 @@ func TestRPMSign(t *testing.T) {
318318
func TestDebSign(t *testing.T) {
319319
t.Parallel()
320320
for _, arch := range formatArchs["deb"] {
321-
for _, sigtype := range []string{"dpkg-sig", "debsign"} {
322-
func(t *testing.T, testSigtype, testArch string) {
323-
t.Run(fmt.Sprintf("deb/%s/%s", testArch, testSigtype), func(t *testing.T) {
324-
t.Parallel()
325-
target := "signed"
326-
if testSigtype == "dpkg-sig" {
327-
target = "dpkg-signed"
328-
}
329-
if testArch == "ppc64le" && os.Getenv("NO_TEST_PPC64LE") == "true" {
330-
t.Skip("ppc64le arch not supported in pipeline")
331-
}
332-
accept(t, acceptParms{
333-
Name: fmt.Sprintf("%s_sign_%s", testSigtype, testArch),
334-
Conf: fmt.Sprintf("deb.%s.sign.yaml", testSigtype),
335-
Format: "deb",
336-
Docker: dockerParams{
337-
File: "deb.dockerfile",
338-
Target: target,
339-
Arch: testArch,
340-
},
341-
})
321+
func(t *testing.T, testArch string) {
322+
t.Run(fmt.Sprintf("deb/%s", testArch), func(t *testing.T) {
323+
t.Parallel()
324+
target := "signed"
325+
if testArch == "ppc64le" && os.Getenv("NO_TEST_PPC64LE") == "true" {
326+
t.Skip("ppc64le arch not supported in pipeline")
327+
}
328+
accept(t, acceptParms{
329+
Name: "debsign_sign_" + testArch,
330+
Conf: "deb.debsign.sign.yaml",
331+
Format: "deb",
332+
Docker: dockerParams{
333+
File: "deb.dockerfile",
334+
Target: target,
335+
Arch: testArch,
336+
},
342337
})
343-
}(t, sigtype, arch)
344-
}
338+
})
339+
}(t, arch)
345340
}
346341
}
347342

nfpm.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,8 @@ type Deb struct {
442442

443443
type DebSignature struct {
444444
PackageSignature `yaml:",inline" json:",inline"`
445-
// debsign, or dpkg-sig (defaults to debsign)
446-
Method string `yaml:"method,omitempty" json:"method,omitempty" jsonschema:"title=method role,enum=debsign,enum=dpkg-sig,default=debsign"`
445+
// Only debsign still supported
446+
Method string `yaml:"method,omitempty" json:"method,omitempty" jsonschema:"title=method role,enum=debsign,default=debsign"`
447447
// origin, maint or archive (defaults to origin)
448448
Type string `yaml:"type,omitempty" json:"type,omitempty" jsonschema:"title=signer role,enum=origin,enum=maint,enum=archive,default=origin"`
449449
Signer string `yaml:"signer,omitempty" json:"signer,omitempty" jsonschema:"title=signer"`

testdata/acceptance/deb.dockerfile

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:11 AS test_base
1+
FROM debian:trixie AS test_base
22
ARG package
33
RUN echo "${package}"
44
COPY ${package} /tmp/foo.deb
@@ -85,14 +85,6 @@ RUN debsig-verify /tmp/foo.deb | grep "debsig: Verified package from 'Test packa
8585
RUN echo "" > /etc/dpkg/dpkg.cfg
8686
RUN dpkg -i /tmp/foo.deb
8787

88-
# ---- signed dpkg-sig test ----
89-
FROM test_base AS dpkg-signed
90-
RUN apt update -y
91-
RUN apt install -y dpkg-sig
92-
# TODO: we should properly check the signature here, not sure how to do so.
93-
RUN dpkg-sig --verify /tmp/foo.deb | grep "UNKNOWNSIG _gpgbuilder 15BD80B3"
94-
RUN dpkg -i /tmp/foo.deb
95-
9688
# ---- overrides test ----
9789
FROM min AS overrides
9890
RUN test -e /usr/bin/fake

testdata/acceptance/deb.dpkg-sig.sign.yaml

-15
This file was deleted.

www/docs/configuration.md

+1
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ deb:
413413
signature:
414414
# Signature method, either "dpkg-sig" or "debsign".
415415
# Defaults to "debsign"
416+
# "dpkg-sig" is not supported in newer Debian versions.
416417
method: dpkg-sig
417418

418419
# PGP secret key (can also be ASCII-armored). The passphrase is taken

0 commit comments

Comments
 (0)