Skip to content

Commit f9d9d19

Browse files
authored
test: test centos10, fedora 40+ (#899)
* test: test centos10, fedora 40+ Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * chore: typos * fix: typo --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
1 parent 641bcf2 commit f9d9d19

File tree

8 files changed

+21
-13
lines changed

8 files changed

+21
-13
lines changed

acceptance_test.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,14 @@ func TestIPKSpecific(t *testing.T) {
296296
}
297297

298298
func TestRPMSign(t *testing.T) {
299-
t.Parallel()
300-
for _, os := range []string{"centos9", "fedora34", "fedora36", "fedora38"} {
299+
for _, os := range []string{
300+
// "centos9", // XXX: RPM v4.16, doesn't work with newer versions of go-openpgp.
301+
"centos10",
302+
"fedora40",
303+
"fedora41",
304+
} {
301305
os := os
302306
t.Run(fmt.Sprintf("rpm/amd64/sign/%s", os), func(t *testing.T) {
303-
t.Parallel()
304307
accept(t, acceptParms{
305308
Name: fmt.Sprintf("sign_%s_amd64", os),
306309
Conf: "core.signed.yaml",

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
dario.cat/mergo v1.0.1
77
github.com/AlekSi/pointer v1.2.0
88
github.com/Masterminds/semver/v3 v3.3.1
9-
github.com/ProtonMail/go-crypto v1.1.3
9+
github.com/ProtonMail/go-crypto v1.1.4
1010
github.com/ProtonMail/gopenpgp/v2 v2.7.1
1111
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
1212
github.com/caarlos0/go-version v0.2.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v
1414
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
1515
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
1616
github.com/ProtonMail/go-crypto v0.0.0-20230321155629-9a39f2531310/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE=
17-
github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk=
18-
github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
17+
github.com/ProtonMail/go-crypto v1.1.4 h1:G5U5asvD5N/6/36oIw3k2bOfBn5XVcZrb7PBjzzKKoE=
18+
github.com/ProtonMail/go-crypto v1.1.4/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
1919
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f h1:tCbYj7/299ekTTXpdwKYF8eBlsYsDVoggDAuAjoK66k=
2020
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f/go.mod h1:gcr0kNtGBqin9zDW9GOHcVntrwnjrK+qdJ06mWYBybw=
2121
github.com/ProtonMail/gopenpgp/v2 v2.7.1 h1:Awsg7MPc2gD3I7IFac2qE3Gdls0lZW8SzrFZ3k1oz0s=

internal/sign/pgp.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,14 @@ func PGPClearSignWithKeyID(message io.Reader, keyFile, passphrase string, hexKey
9191

9292
var signature bytes.Buffer
9393

94-
writeCloser, err := clearsign.Encode(&signature, key.PrivateKey, &packet.Config{
95-
SigningKeyId: keyID,
96-
DefaultHash: crypto.SHA256,
97-
})
94+
writeCloser, err := clearsign.Encode(
95+
&signature,
96+
key.PrivateKey,
97+
&packet.Config{
98+
SigningKeyId: keyID,
99+
DefaultHash: crypto.SHA256,
100+
},
101+
)
98102
if err != nil {
99103
return nil, fmt.Errorf("clear sign: %w", err)
100104
}

testdata/acceptance/rpm_fedora38.dockerfile renamed to testdata/acceptance/rpm_centos10.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM fedora:38 AS test_base
1+
FROM quay.io/centos/centos:stream10 AS test_base
22
RUN yum install -y createrepo yum-utils
33
ARG package
44
RUN echo "${package}"

testdata/acceptance/rpm_centos9.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ COPY ${package} /tmp/foo.rpm
66

77
FROM test_base AS signed
88
COPY keys/pubkey.asc /tmp/pubkey.asc
9+
RUN rpm --version
910
RUN rpm --import /tmp/pubkey.asc
1011
RUN rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'
1112
RUN rpm -vK /tmp/foo.rpm

testdata/acceptance/rpm_fedora34.dockerfile renamed to testdata/acceptance/rpm_fedora40.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM fedora:34 AS test_base
1+
FROM fedora:40 AS test_base
22
RUN yum install -y createrepo yum-utils
33
ARG package
44
RUN echo "${package}"

testdata/acceptance/rpm_fedora36.dockerfile renamed to testdata/acceptance/rpm_fedora41.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM fedora:36 AS test_base
1+
FROM fedora:41 AS test_base
22
RUN yum install -y createrepo yum-utils
33
ARG package
44
RUN echo "${package}"

0 commit comments

Comments
 (0)