Add support for mirroring, showing, and editing remote repos with .udebs. #108

This commit is contained in:
Andrey Smirnov
2014-09-25 22:12:59 +04:00
parent 7ad1bb387b
commit 7d8600b840
13 changed files with 155 additions and 2 deletions
@@ -0,0 +1,4 @@
Downloading http://mirror.yandex.ru/debian/dists/wheezy/Release...
Mirror [mirror25]: http://mirror.yandex.ru/debian/ wheezy [udeb] successfully added.
You can run 'aptly mirror update mirror25' to download repository contents.
@@ -0,0 +1,20 @@
Name: mirror25
Archive Root URL: http://mirror.yandex.ru/debian/
Distribution: wheezy
Components: main, contrib, non-free
Architectures: i386
Download Sources: no
Download .udebs: yes
Last update: never
Information from release file:
Architectures: amd64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 s390x sparc
Codename: wheezy
Components: main contrib non-free
Date: Sat, 12 Jul 2014 10:59:25 UTC
Description: Debian 7.6 Released 12 July 2014
Label: Debian
Origin: Debian
Suite: stable
Version: 7.6
@@ -0,0 +1 @@
ERROR: unable to create mirror: debian-installer udebs aren't supported for flat repos
+1
View File
@@ -0,0 +1 @@
Mirror [wheezy-main]: http://mirror.yandex.ru/debian/ wheezy [udeb] successfully updated.
@@ -0,0 +1,20 @@
Name: wheezy-main
Archive Root URL: http://mirror.yandex.ru/debian/
Distribution: wheezy
Components: main
Architectures: i386, amd64
Download Sources: no
Download .udebs: yes
Number of packages: 56121
Information from release file:
Architectures: amd64 armel armhf i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc s390 s390x sparc
Codename: wheezy
Components: main contrib non-free
Date: Sat, 26 Apr 2014 09:27:11 UTC
Description: Debian 7.5 Released 26 April 2014
Label: Debian
Origin: Debian
Suite: stable
Version: 7.5
+1
View File
@@ -0,0 +1 @@
ERROR: unable to edit: flat mirrors don't support udebs
+33
View File
@@ -0,0 +1,33 @@
Applying filter...
Building download queue...
Download queue: 10 items (0.76 MiB)
Downloading & parsing package files...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/InRelease...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/Release...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/Release.gpg...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/main/binary-amd64/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/main/binary-i386/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/main/debian-installer/binary-amd64/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/main/debian-installer/binary-i386/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/non-free/binary-amd64/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/non-free/binary-i386/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/non-free/debian-installer/binary-amd64/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/dists/squeeze/non-free/debian-installer/binary-i386/Packages.bz2...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/dmraid-udeb_1.0.0.rc16-4.1_amd64.udeb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/dmraid-udeb_1.0.0.rc16-4.1_i386.udeb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/dmraid_1.0.0.rc16-4.1_amd64.deb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/dmraid_1.0.0.rc16-4.1_i386.deb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/libdmraid-dev_1.0.0.rc16-4.1_amd64.deb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/libdmraid-dev_1.0.0.rc16-4.1_i386.deb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/libdmraid1.0.0.rc16-udeb_1.0.0.rc16-4.1_amd64.udeb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/libdmraid1.0.0.rc16-udeb_1.0.0.rc16-4.1_i386.udeb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/libdmraid1.0.0.rc16_1.0.0.rc16-4.1_amd64.deb...
Downloading http://mirror.yandex.ru/debian/pool/main/d/dmraid/libdmraid1.0.0.rc16_1.0.0.rc16-4.1_i386.deb...
Mirror `squeeze` has been successfully updated.
Packages filtered: 45830 -> 10.
gpgv: Good signature from "Debian Archive Automatic Signing Key (6.0/squeeze) <ftpmaster@debian.org>"
gpgv: Good signature from "Squeeze Stable Release Key <debian-release@lists.debian.org>"
gpgv: RSA key ID 473041FA
gpgv: RSA key ID B98321F9
+21 -1
View File
@@ -277,7 +277,7 @@ class CreateMirror23Test(BaseTest):
class CreateMirror24Test(BaseTest):
"""
create mirror: mirror with wrong filter
create mirror: disable config value with option
"""
runCmd = "aptly mirror create -ignore-signatures=false -keyring=aptlytest.gpg mirror24 http://security.debian.org/ wheezy/updates main"
fixtureGpg = True
@@ -286,3 +286,23 @@ class CreateMirror24Test(BaseTest):
configOverride = {
"gpgDisableVerify": True
}
class CreateMirror25Test(BaseTest):
"""
create mirror: mirror with udebs enabled
"""
runCmd = "aptly -architectures=i386 mirror create -ignore-signatures -with-udebs mirror25 http://mirror.yandex.ru/debian/ wheezy"
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show mirror25", "mirror_show")
class CreateMirror26Test(BaseTest):
"""
create mirror: flat mirror with udebs
"""
runCmd = "aptly mirror create -keyring=aptlytest.gpg -with-udebs mirror26 http://pkg.jenkins-ci.org/debian-stable binary/"
fixtureGpg = True
expectedCode = 1
+22
View File
@@ -79,3 +79,25 @@ class EditMirror7Test(BaseTest):
fixtureDB = True
runCmd = "aptly mirror edit -architectures=amd64,x56 wheezy-main"
expectedCode = 1
class EditMirror8Test(BaseTest):
"""
edit mirror: enable udebs
"""
fixtureDB = True
runCmd = "aptly mirror edit -with-udebs wheezy-main"
def check(self):
self.check_output()
self.check_cmd_output("aptly mirror show wheezy-main", "mirror_show", match_prepare=lambda s: re.sub(r"Last update: [0-9:+A-Za-z -]+\n", "", s))
class EditMirror9Test(BaseTest):
"""
edit mirror: flat mirror with udebs
"""
fixtureCmds = ["aptly mirror create -keyring=aptlytest.gpg mirror9 http://pkg.jenkins-ci.org/debian-stable binary/"]
fixtureGpg = True
runCmd = "aptly mirror edit -with-udebs mirror9"
expectedCode = 1
+16
View File
@@ -156,3 +156,19 @@ class UpdateMirror11Test(BaseTest):
def output_processor(self, output):
return "\n".join(sorted(output.split("\n")))
class UpdateMirror12Test(BaseTest):
"""
update mirrors: update with udebs
"""
longTest = False
fixtureGpg = True
fixtureCmds = [
"aptly -architectures=i386,amd64 mirror create -keyring=aptlytest.gpg -filter='$$Source (dmraid)' -with-udebs squeeze http://mirror.yandex.ru/debian/ squeeze main non-free",
]
runCmd = "aptly mirror update -keyring=aptlytest.gpg squeeze"
outputMatchPrepare = lambda _, s: re.sub(r'Signature made .* using', '', s)
def output_processor(self, output):
return "\n".join(sorted(output.split("\n")))