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>
This commit is contained in:
Carlos Alexandro Becker
2025-01-11 15:45:12 -03:00
committed by GitHub
parent 641bcf2d63
commit f9d9d19266
8 changed files with 21 additions and 13 deletions
+6 -3
View File
@@ -296,11 +296,14 @@ func TestIPKSpecific(t *testing.T) {
}
func TestRPMSign(t *testing.T) {
t.Parallel()
for _, os := range []string{"centos9", "fedora34", "fedora36", "fedora38"} {
for _, os := range []string{
// "centos9", // XXX: RPM v4.16, doesn't work with newer versions of go-openpgp.
"centos10",
"fedora40",
"fedora41",
} {
os := os
t.Run(fmt.Sprintf("rpm/amd64/sign/%s", os), func(t *testing.T) {
t.Parallel()
accept(t, acceptParms{
Name: fmt.Sprintf("sign_%s_amd64", os),
Conf: "core.signed.yaml",
+1 -1
View File
@@ -6,7 +6,7 @@ require (
dario.cat/mergo v1.0.1
github.com/AlekSi/pointer v1.2.0
github.com/Masterminds/semver/v3 v3.3.1
github.com/ProtonMail/go-crypto v1.1.3
github.com/ProtonMail/go-crypto v1.1.4
github.com/ProtonMail/gopenpgp/v2 v2.7.1
github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb
github.com/caarlos0/go-version v0.2.0
+2 -2
View File
@@ -14,8 +14,8 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/ProtonMail/go-crypto v0.0.0-20230321155629-9a39f2531310/go.mod h1:8TI4H3IbrackdNgv+92dI+rhpCaLqM0IfpgCgenFvRE=
github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk=
github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/ProtonMail/go-crypto v1.1.4 h1:G5U5asvD5N/6/36oIw3k2bOfBn5XVcZrb7PBjzzKKoE=
github.com/ProtonMail/go-crypto v1.1.4/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE=
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f h1:tCbYj7/299ekTTXpdwKYF8eBlsYsDVoggDAuAjoK66k=
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f/go.mod h1:gcr0kNtGBqin9zDW9GOHcVntrwnjrK+qdJ06mWYBybw=
github.com/ProtonMail/gopenpgp/v2 v2.7.1 h1:Awsg7MPc2gD3I7IFac2qE3Gdls0lZW8SzrFZ3k1oz0s=
+8 -4
View File
@@ -91,10 +91,14 @@ func PGPClearSignWithKeyID(message io.Reader, keyFile, passphrase string, hexKey
var signature bytes.Buffer
writeCloser, err := clearsign.Encode(&signature, key.PrivateKey, &packet.Config{
SigningKeyId: keyID,
DefaultHash: crypto.SHA256,
})
writeCloser, err := clearsign.Encode(
&signature,
key.PrivateKey,
&packet.Config{
SigningKeyId: keyID,
DefaultHash: crypto.SHA256,
},
)
if err != nil {
return nil, fmt.Errorf("clear sign: %w", err)
}
@@ -1,4 +1,4 @@
FROM fedora:38 AS test_base
FROM quay.io/centos/centos:stream10 AS test_base
RUN yum install -y createrepo yum-utils
ARG package
RUN echo "${package}"
+1
View File
@@ -6,6 +6,7 @@ COPY ${package} /tmp/foo.rpm
FROM test_base AS signed
COPY keys/pubkey.asc /tmp/pubkey.asc
RUN rpm --version
RUN rpm --import /tmp/pubkey.asc
RUN rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'
RUN rpm -vK /tmp/foo.rpm
@@ -1,4 +1,4 @@
FROM fedora:34 AS test_base
FROM fedora:40 AS test_base
RUN yum install -y createrepo yum-utils
ARG package
RUN echo "${package}"
@@ -1,4 +1,4 @@
FROM fedora:36 AS test_base
FROM fedora:41 AS test_base
RUN yum install -y createrepo yum-utils
ARG package
RUN echo "${package}"