Skip to content

Commit

Permalink
system-test: require gpg1 for internal openpgp tests
Browse files Browse the repository at this point in the history
Internal openpgp implementation without gpg1 installed now fails due to
golang/go#29082, and that's unlikely going to
be addressed ever, because x/crypto/openpgp has been deprecated as
stated in golang/go#44226. While aptly can
still be used on legacy environments, marking the dependency inbetween
and declare the obsolete status instead.

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
  • Loading branch information
vicamo committed Jan 28, 2022
1 parent e1e8ac0 commit 661cb5b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions man/aptly.1
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ don\(cqt verify remote mirrors with gpg(1), also can be disabled on per\-mirror
.
.TP
\fBgpgProvider\fR
implementation of PGP signing/validation \- \fBgpg\fR for external \fBgpg\fR utility or \fBinternal\fR to use Go internal implementation; \fBgpg1\fR might be used to force use of GnuPG 1\.x, \fBgpg2\fR enables GnuPG 2\.x only; default is to use GnuPG 1\.x if available and GnuPG 2\.x otherwise
implementation of PGP signing/validation \- \fBgpg\fR for external \fBgpg\fR utility or \fBinternal\fR to use Go internal implementation (deprecated); \fBgpg1\fR might be used to force use of GnuPG 1\.x, \fBgpg2\fR enables GnuPG 2\.x only; default is to use GnuPG 1\.x if available and GnuPG 2\.x otherwise
.
.TP
\fBdownloadSourcePackages\fR
Expand Down Expand Up @@ -444,7 +444,7 @@ when processing dependencies, print detailed logs
.
.TP
\-\fBgpg\-provider\fR=
PGP implementation ("gpg", "gpg1", "gpg2" for external gpg or "internal" for Go internal implementation)
PGP implementation ("gpg", "gpg1", "gpg2" for external gpg or "internal" for deprecated Go internal implementation)
.
.SH "CREATE NEW MIRROR"
\fBaptly\fR \fBmirror\fR \fBcreate\fR \fIname\fR \fIarchive url\fR \fIdistribution\fR [\fIcomponent1\fR \|\.\|\.\|\.]
Expand Down
3 changes: 3 additions & 0 deletions system/t04_mirror/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ class CreateMirror29Test(BaseTest):
"""
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror9 http://cdn-fastly.deb.debian.org/debian/ stretch-backports"
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True
fixtureGpg = True

def outputMatchPrepare(self, s):
Expand All @@ -382,6 +383,7 @@ class CreateMirror30Test(BaseTest):
"""
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror10 http://cdn-fastly.deb.debian.org/debian/ stretch"
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True
gold_processor = BaseTest.expand_environ
fixtureGpg = False
expectedCode = 1
Expand All @@ -396,6 +398,7 @@ class CreateMirror31Test(BaseTest):
"""
runCmd = "aptly mirror create --keyring=aptlytest.gpg mirror11 http://cdn-fastly.deb.debian.org/debian/ stretch"
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True
fixtureGpg = True

def outputMatchPrepare(self, s):
Expand Down
3 changes: 3 additions & 0 deletions system/t04_mirror/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ class UpdateMirror20Test(BaseTest):
"aptly mirror create --keyring=aptlytest.gpg -architectures=amd64 --filter='r-cran-class' flat https://cloud.r-project.org/bin/linux/debian jessie-cran35/",
]
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True
runCmd = "aptly mirror update --keyring=aptlytest.gpg flat"
output_processor = filterOutSignature
outputMatchPrepare = sortOutput
Expand All @@ -355,6 +356,7 @@ class UpdateMirror21Test(BaseTest):
"""
longTest = False
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True
fixtureGpg = True
fixtureCmds = [
"aptly mirror create --keyring=aptlytest.gpg pagerduty http://packages.pagerduty.com/pdagent deb/"
Expand All @@ -371,6 +373,7 @@ class UpdateMirror22Test(BaseTest):
update mirrors: SHA512 checksums only
"""
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True
fixtureGpg = True
fixtureCmds = [
"aptly mirror create --keyring=aptlytest.gpg --filter=nomatch libnvidia-container https://nvidia.github.io/libnvidia-container/ubuntu16.04/amd64 ./"
Expand Down
2 changes: 2 additions & 0 deletions system/t06_publish/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ class PublishRepo30Test(BaseTest):
runCmd = "aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick local-repo"
gold_processor = BaseTest.expand_environ
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True

def check(self):
super(PublishRepo30Test, self).check()
Expand All @@ -830,6 +831,7 @@ class PublishRepo31Test(BaseTest):
runCmd = "aptly publish repo -keyring=${files}/aptly_passphrase.pub -secret-keyring=${files}/aptly_passphrase.sec -passphrase=verysecret -distribution=maverick local-repo"
gold_processor = BaseTest.expand_environ
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True

def outputMatchPrepare(_, s):
return re.sub(r' \d{4}-\d{2}-\d{2}', '', s)
Expand Down
2 changes: 2 additions & 0 deletions system/t09_repo/include.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ class IncludeRepo20Test(BaseTest):
runCmd = "aptly repo include -no-remove-files -keyring=${files}/aptly.pub ${changes}"
outputMatchPrepare = gpgRemove
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True


class IncludeRepo21Test(BaseTest):
Expand All @@ -492,6 +493,7 @@ class IncludeRepo21Test(BaseTest):
runCmd = "aptly repo include -keyring=${files}/aptly.pub "
expectedCode = 1
configOverride = {"gpgProvider": "internal"}
requiresGPG1 = True

def outputMatchPrepare(self, s):
return gpgRemove(self, tempDirRemove(self, s))
Expand Down

0 comments on commit 661cb5b

Please sign in to comment.