From d9b23167bc908d6fc1f6a1bfd64be6245e626c5b Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Tue, 30 Sep 2014 21:51:38 +0400 Subject: [PATCH] Test on publishing repo with .udebs. #108 --- .../t06_publish/PublishRepo26Test_udeb_binary | 20 ++++++++++ system/t06_publish/PublishRepo27Test_gold | 14 +++++++ .../t06_publish/PublishRepo27Test_udeb_binary | 20 ++++++++++ system/t06_publish/PublishSnapshot35Test_gold | 2 +- system/t06_publish/repo.py | 38 +++++++++++++++++++ 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 system/t06_publish/PublishRepo26Test_udeb_binary create mode 100644 system/t06_publish/PublishRepo27Test_gold create mode 100644 system/t06_publish/PublishRepo27Test_udeb_binary diff --git a/system/t06_publish/PublishRepo26Test_udeb_binary b/system/t06_publish/PublishRepo26Test_udeb_binary new file mode 100644 index 00000000..3f13340f --- /dev/null +++ b/system/t06_publish/PublishRepo26Test_udeb_binary @@ -0,0 +1,20 @@ +Package: dmraid-udeb +Version: 1.0.0.rc16-4.1 +Installed-Size: 36 +Priority: optional +Section: debian-installer +Maintainer: Giuseppe Iuculano +Architecture: i386 +Description: Device-Mapper Software RAID support tool (udeb) + dmraid discovers, activates, deactivates and displays properties + of software RAID sets (eg, ATARAID) and contained DOS partitions. + . + This is the minimal package (udeb) used by debian-installer +MD5sum: 4d8bb4dafb0ef9059dac75846e162784 +SHA1: fd5c73e08d4c5381b1136c2ff170332d77526246 +SHA256: fe4ff3351186f03039f8cd6f78e8e4f473a75b613f950caac06fa21dda2d59e8 +Source: dmraid +Size: 11022 +Depends: libc6-udeb (>= 2.11), libdmraid1.0.0.rc16-udeb (>= 1.0.0.rc16), dmsetup-udeb +Filename: pool/main/d/dmraid/dmraid-udeb_1.0.0.rc16-4.1_i386.udeb + diff --git a/system/t06_publish/PublishRepo27Test_gold b/system/t06_publish/PublishRepo27Test_gold new file mode 100644 index 00000000..365295fa --- /dev/null +++ b/system/t06_publish/PublishRepo27Test_gold @@ -0,0 +1,14 @@ +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: + +Local repo local-repo 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/ maverick main + deb-src http://your-server/ maverick 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. diff --git a/system/t06_publish/PublishRepo27Test_udeb_binary b/system/t06_publish/PublishRepo27Test_udeb_binary new file mode 100644 index 00000000..dbfc3986 --- /dev/null +++ b/system/t06_publish/PublishRepo27Test_udeb_binary @@ -0,0 +1,20 @@ +Package: dmraid-udeb +Version: 1.0.0.rc16-4.1 +Installed-Size: 36 +Priority: optional +Section: debian-installer +Maintainer: Giuseppe Iuculano +Architecture: i386 +Description: Device-Mapper Software RAID support tool (udeb) + dmraid discovers, activates, deactivates and displays properties + of software RAID sets (eg, ATARAID) and contained DOS partitions. + . + This is the minimal package (udeb) used by debian-installer +MD5sum: 4d8bb4dafb0ef9059dac75846e162784 +SHA1: fd5c73e08d4c5381b1136c2ff170332d77526246 +SHA256: fe4ff3351186f03039f8cd6f78e8e4f473a75b613f950caac06fa21dda2d59e8 +Filename: pool/main/d/dmraid/dmraid-udeb_1.0.0.rc16-4.1_i386.udeb +Size: 11022 +Source: dmraid +Depends: libc6-udeb (>= 2.11), libdmraid1.0.0.rc16-udeb (>= 1.0.0.rc16), dmsetup-udeb + diff --git a/system/t06_publish/PublishSnapshot35Test_gold b/system/t06_publish/PublishSnapshot35Test_gold index ad21a86e..ad5dad8d 100644 --- a/system/t06_publish/PublishSnapshot35Test_gold +++ b/system/t06_publish/PublishSnapshot35Test_gold @@ -5,7 +5,7 @@ Signing file 'Release' with gpg, please enter your passphrase when prompted: Clearsigning file 'Release' with gpg, please enter your passphrase when prompted: Snapshot squeeze has been successfully published. -Please setup your webserver to serve directory '/Users/smira/.aptly/public' with autoindexing. +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/ squeeze main Don't forget to add your GPG key to apt with apt-key. diff --git a/system/t06_publish/repo.py b/system/t06_publish/repo.py index e0fdc6ac..b29d4623 100644 --- a/system/t06_publish/repo.py +++ b/system/t06_publish/repo.py @@ -608,3 +608,41 @@ class PublishRepo26Test(BaseTest): "--verify", os.path.join(os.environ["HOME"], ".aptly", 'public/dists/maverick/Release.gpg'), os.path.join(os.environ["HOME"], ".aptly", 'public/dists/maverick/Release')]) + +class PublishRepo27Test(BaseTest): + """ + publish repo: with udebs + """ + fixtureCmds = [ + "aptly repo create local-repo", + "aptly repo add local-repo ${files} ${udebs}", + ] + runCmd = "aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick local-repo" + gold_processor = BaseTest.expand_environ + + def check(self): + super(PublishRepo27Test, self).check() + + self.check_exists('public/dists/maverick/InRelease') + self.check_exists('public/dists/maverick/Release') + self.check_exists('public/dists/maverick/Release.gpg') + + self.check_exists('public/dists/maverick/main/binary-i386/Release') + self.check_exists('public/dists/maverick/main/binary-i386/Packages') + self.check_exists('public/dists/maverick/main/binary-i386/Packages.gz') + self.check_exists('public/dists/maverick/main/binary-i386/Packages.bz2') + self.check_exists('public/dists/maverick/main/source/Release') + self.check_exists('public/dists/maverick/main/source/Sources') + self.check_exists('public/dists/maverick/main/source/Sources.gz') + self.check_exists('public/dists/maverick/main/source/Sources.bz2') + + self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1-1.3.dsc') + self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1-1.3.diff.gz') + self.check_exists('public/pool/main/p/pyspi/pyspi_0.6.1.orig.tar.gz') + self.check_exists('public/pool/main/p/pyspi/pyspi-0.6.1-1.3.stripped.dsc') + self.check_exists('public/pool/main/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb') + self.check_exists('public/pool/main/d/dmraid/dmraid-udeb_1.0.0.rc16-4.1_amd64.udeb') + self.check_exists('public/pool/main/d/dmraid/dmraid-udeb_1.0.0.rc16-4.1_i386.udeb') + + # verify contents except of sums + self.check_file_contents('public/dists/maverick/main/debian-installer/binary-i386/Packages', 'udeb_binary', match_prepare=lambda s: "\n".join(sorted(s.split("\n"))))