mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-08 05:50:47 +00:00
Add support to mirror non package installer files
This commit is contained in:
Binary file not shown.
@@ -84,6 +84,7 @@ class BaseTest(object):
|
||||
fixtureDBDir = os.path.join(os.environ["HOME"], "aptly-fixture-db")
|
||||
fixturePoolDir = os.path.join(os.environ["HOME"], "aptly-fixture-pool")
|
||||
fixtureGpgKeys = ["debian-archive-keyring.gpg",
|
||||
"ubuntu-archive-keyring.gpg",
|
||||
"launchpad.key",
|
||||
"flat.key",
|
||||
"pagerduty.key",
|
||||
|
||||
@@ -28,6 +28,7 @@ Options:
|
||||
-gpg-provider="": PGP implementation ("gpg" for external gpg or "internal" for Go internal implementation)
|
||||
-ignore-signatures: disable verification of Release file signatures
|
||||
-keyring=: gpg keyring to use when verifying Release file (could be specified multiple times)
|
||||
-with-installer: download additional not packaged installer files
|
||||
-with-sources: download source packages in addition to binary packages
|
||||
-with-udebs: download .udeb packages (Debian installer support)
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ Options:
|
||||
-gpg-provider="": PGP implementation ("gpg" for external gpg or "internal" for Go internal implementation)
|
||||
-ignore-signatures: disable verification of Release file signatures
|
||||
-keyring=: gpg keyring to use when verifying Release file (could be specified multiple times)
|
||||
-with-installer: download additional not packaged installer files
|
||||
-with-sources: download source packages in addition to binary packages
|
||||
-with-udebs: download .udeb packages (Debian installer support)
|
||||
ERROR: unable to parse command
|
||||
|
||||
@@ -20,6 +20,7 @@ Options:
|
||||
-gpg-provider="": PGP implementation ("gpg" for external gpg or "internal" for Go internal implementation)
|
||||
-ignore-signatures: disable verification of Release file signatures
|
||||
-keyring=: gpg keyring to use when verifying Release file (could be specified multiple times)
|
||||
-with-installer: download additional not packaged installer files
|
||||
-with-sources: download source packages in addition to binary packages
|
||||
-with-udebs: download .udeb packages (Debian installer support)
|
||||
ERROR: unable to parse flags
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
|
||||
|
||||
Applying filter...
|
||||
Building download queue...
|
||||
Download queue: 12 items (25.14 MiB)
|
||||
Downloading & parsing package files...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/InRelease...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release.gpg...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/binary-s390x/Packages.bz2...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/MANIFEST...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/MANIFEST.udebs...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/MD5SUMS...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/SHA256SUMS...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/generic/debian.exec...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/generic/initrd.debian...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/generic/kernel.debian...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/generic/parmfile.debian...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/tape/initrd.debian...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/tape/kernel.debian-nolabel...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/tape/kernel.debian...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/tape/parmfile.debian...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/main/installer-s390x/current/images/udeb.list...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/non-free/binary-s390x/Packages.bz2...
|
||||
Downloading http://mirror.yandex.ru/debian/dists/wheezy/non-free/installer-s390x/current/images/SHA256SUMS...
|
||||
Mirror `wheezy` has been successfully updated.
|
||||
Packages filtered: 35003 -> 1.
|
||||
gpgv: Good signature from "Debian Archive Automatic Signing Key (7.0/wheezy) <ftpmaster@debian.org>"
|
||||
gpgv: Good signature from "Debian Archive Automatic Signing Key (8/jessie) <ftpmaster@debian.org>"
|
||||
gpgv: Good signature from "Wheezy Stable Release Key <debian-release@lists.debian.org>"
|
||||
gpgv: RSA key ID 2B90D010
|
||||
gpgv: RSA key ID 46925553
|
||||
gpgv: RSA key ID 65FFB764
|
||||
@@ -0,0 +1,61 @@
|
||||
|
||||
|
||||
Applying filter...
|
||||
Building download queue...
|
||||
Download queue: 37 items (166.14 MiB)
|
||||
Downloading & parsing package files...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/InRelease...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/Release...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/Release.gpg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/binary-amd64/Packages.bz2...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/MANIFEST...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/MANIFEST.udebs...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/SHA256SUMS...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/SHA256SUMS.gpg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/cdrom/debian-cd_info.tar.gz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/cdrom/initrd.gz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/cdrom/vmlinuz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/cdrom/xen/xm-debian.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/hd-media/boot.img.gz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/hd-media/initrd.gz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/hd-media/vmlinuz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/boot.img.gz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/mini.iso...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/netboot.tar.gz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/adtxt.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/exithelp.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f1.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f10.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f2.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f3.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f4.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f5.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f6.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f7.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f8.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/f9.txt...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/menu.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/prompt.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/rqtxt.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/splash.png...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/stdmenu.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/syslinux.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/txt.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/boot-screens/vesamenu.c32...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/initrd.gz...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/linux...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/pxelinux.0...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/main/installer-amd64/current/images/udeb.list...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/restricted/binary-amd64/Packages.bz2...
|
||||
Downloading http://mirror.yandex.ru/ubuntu/dists/trusty/restricted/installer-amd64/current/images/SHA256SUMS...
|
||||
Mirror `trusty` has been successfully updated.
|
||||
Packages filtered: 8616 -> 1.
|
||||
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
|
||||
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu.com>"
|
||||
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>"
|
||||
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>"
|
||||
gpgv: DSA key ID 437D05B5
|
||||
gpgv: RSA key ID C0B21F32
|
||||
gpgv: DSA key ID 437D05B5
|
||||
gpgv: RSA key ID C0B21F32
|
||||
@@ -376,3 +376,35 @@ class UpdateMirror22Test(BaseTest):
|
||||
|
||||
def outputMatchPrepare(_, s):
|
||||
return re.sub(r'Signature made .* using|Packages filtered: .* -> 0.', '', s)
|
||||
|
||||
|
||||
class UpdateMirror23Test(BaseTest):
|
||||
"""
|
||||
update mirrors: update with installer
|
||||
"""
|
||||
longTest = False
|
||||
fixtureGpg = True
|
||||
fixtureCmds = [
|
||||
"aptly -architectures=s390x mirror create -keyring=aptlytest.gpg -filter='installer' -with-installer wheezy http://mirror.yandex.ru/debian/ wheezy main non-free",
|
||||
]
|
||||
runCmd = "aptly mirror update -keyring=aptlytest.gpg wheezy"
|
||||
outputMatchPrepare = filterOutSignature
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
|
||||
class UpdateMirror24Test(BaseTest):
|
||||
"""
|
||||
update mirrors: update with installer with separate gpg file
|
||||
"""
|
||||
longTest = False
|
||||
fixtureGpg = True
|
||||
fixtureCmds = [
|
||||
"aptly -architectures=amd64 mirror create -keyring=aptlytest.gpg -filter='installer' -with-installer trusty http://mirror.yandex.ru/ubuntu/ trusty main restricted",
|
||||
]
|
||||
runCmd = "aptly mirror update -keyring=aptlytest.gpg trusty"
|
||||
outputMatchPrepare = filterOutSignature
|
||||
|
||||
def output_processor(self, output):
|
||||
return "\n".join(sorted(output.split("\n")))
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
Loading packages...
|
||||
Generating metadata files and linking package files...
|
||||
Finalizing metadata files...
|
||||
Signing file 'Release' with gpg, please enter your passphrase when prompted:
|
||||
Clearsigning file 'Release' with gpg, please enter your passphrase when prompted:
|
||||
|
||||
Snapshot wheezy has been successfully published.
|
||||
Please setup your webserver to serve directory '${HOME}/.aptly/public' with autoindexing.
|
||||
Now you can add following line to apt sources:
|
||||
deb http://your-server/ wheezy main
|
||||
Don't forget to add your GPG key to apt with apt-key.
|
||||
|
||||
You can also use `aptly serve` to publish your repositories over HTTP quickly.
|
||||
@@ -0,0 +1,12 @@
|
||||
a29b0c17f98afb5ebc5a65bd03411e430dd372223d931b2c2441604fd6942472 ./MD5SUMS
|
||||
a5a8e9029fc31df4a892644524a28c7d31f12a012d72cf1ac5672178b982ecac ./udeb.list
|
||||
d592bca155b709066bcd48070358e6a2dd4f401c09f594b37b15caaf9fc45d80 ./tape/parmfile.debian
|
||||
5e4d45f22a87e36d21685043f85106a6380b3ae7fbdccff70097ccbf6757a287 ./tape/kernel.debian-nolabel
|
||||
57afafa42e61248d96e9d26efb2db075a17f484c51445c6420a32220b05c1fb2 ./tape/initrd.debian
|
||||
0ca15998b2156af0a2ecffc771f9a418b4918956049fac4250c01d163b143006 ./tape/kernel.debian
|
||||
1a907f670fc825f70827608ec32bb8a194971d0e1126d1caf33de87fc27d0d08 ./MANIFEST.udebs
|
||||
62ba2aaafac85c163c3cbf25ee52724a59b12d805382a0122080b6a86e229b0a ./MANIFEST
|
||||
d592bca155b709066bcd48070358e6a2dd4f401c09f594b37b15caaf9fc45d80 ./generic/parmfile.debian
|
||||
48d2cbebbc8582f546232c1acf68b1b73125731441fda528f8d71795a60e14a4 ./generic/debian.exec
|
||||
5194c4cfc1d527ce6aa45ced5a7f5102a3c85851ac8409c32b53c1004d0717da ./generic/kernel.debian
|
||||
57afafa42e61248d96e9d26efb2db075a17f484c51445c6420a32220b05c1fb2 ./generic/initrd.debian
|
||||
@@ -1021,3 +1021,25 @@ class PublishSnapshot37Test(BaseTest):
|
||||
]
|
||||
runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec wheezy"
|
||||
gold_processor = BaseTest.expand_environ
|
||||
|
||||
|
||||
class PublishSnapshot38Test(BaseTest):
|
||||
"""
|
||||
publish snapshot: mirror with installer
|
||||
"""
|
||||
fixtureGpg = True
|
||||
fixtureCmds = [
|
||||
"aptly -architectures=s390x mirror create -keyring=aptlytest.gpg -filter='installer' -with-installer wheezy http://mirror.yandex.ru/debian/ wheezy main",
|
||||
"aptly mirror update -keyring=aptlytest.gpg wheezy",
|
||||
"aptly snapshot create wheezy from mirror wheezy",
|
||||
]
|
||||
runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec wheezy"
|
||||
gold_processor = BaseTest.expand_environ
|
||||
|
||||
def check(self):
|
||||
super(PublishSnapshot38Test, self).check()
|
||||
self.check_exists('public/dists/wheezy/main/installer-s390x/current/images/SHA256SUMS')
|
||||
self.check_exists('public/dists/wheezy/main/installer-s390x/current/images/generic/debian.exec')
|
||||
self.check_exists('public/dists/wheezy/main/installer-s390x/current/images/MANIFEST')
|
||||
|
||||
self.check_file_contents('public/dists/wheezy/main/installer-s390x/current/images/SHA256SUMS', "installer_s390x", match_prepare=sorted_processor)
|
||||
|
||||
Reference in New Issue
Block a user