Allow to customize Origin/Label during publishing. #29

This commit is contained in:
Andrey Smirnov
2014-04-15 11:47:21 +04:00
parent 108dc235a7
commit b85f46547b
12 changed files with 118 additions and 4 deletions
+2
View File
@@ -1,3 +1,5 @@
Published repositories:
* ./maverick (main) [amd64, i386] publishes [snap1]: Snapshot from mirror [gnuplot-maverick]: http://ppa.launchpad.net/gladky-anton/gnuplot/ubuntu/ maverick
* ppa/smira/wheezy (contrib) [amd64] publishes [snap2]: Merged from sources: 'snap1'
* ppa/tr1/maverick (main, origin: origin1) [amd64, i386] publishes [snap2]: Merged from sources: 'snap1'
* ppa/tr2/maverick (main, label: label1) [amd64, i386] publishes [snap2]: Merged from sources: 'snap1'
+13
View File
@@ -0,0 +1,13 @@
Loading packages...
Generating metadata files and linking package files...
Signing file '${HOME}/.aptly/public/dists/maverick/Release' with gpg, please enter your passphrase when prompted:
Clearsigning file '${HOME}/.aptly/public/dists/maverick/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 contrib
deb-src http://your-server/ maverick contrib
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,9 @@
Origin: . maverick
Label: label15
Codename: maverick
Architectures: i386
Components: contrib
Description: Generated by aptly
MD5Sum:
SHA1:
SHA256:
@@ -0,0 +1,12 @@
Loading packages...
Generating metadata files and linking package files...
Signing file '${HOME}/.aptly/public/dists/squeeze/Release' with gpg, please enter your passphrase when prompted:
Clearsigning file '${HOME}/.aptly/public/dists/squeeze/Release' with gpg, please enter your passphrase when prompted:
Snapshot snap24 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/ squeeze 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,9 @@
Origin: aptly24
Label: . squeeze
Codename: squeeze
Architectures: amd64 i386
Components: main
Description: Generated by aptly
MD5Sum:
SHA1:
SHA256:
+3 -1
View File
@@ -10,7 +10,7 @@ class PublishList1Test(BaseTest):
class PublishList2Test(BaseTest):
"""
publish list: several snapshots list
publish list: several repos list
"""
fixtureDB = True
fixturePool = True
@@ -19,5 +19,7 @@ class PublishList2Test(BaseTest):
"aptly snapshot merge snap2 snap1",
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec snap1",
"aptly -architectures=amd64 publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=wheezy -component=contrib snap2 ppa/smira",
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -origin=origin1 snap2 ppa/tr1",
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -label=label1 snap2 ppa/tr2",
]
runCmd = "aptly publish list"
+16
View File
@@ -340,3 +340,19 @@ class PublishRepo14Test(BaseTest):
self.check_exists('public/pool/contrib/b/boost-defaults/libboost-program-options-dev_1.49.0.1_i386.deb')
class PublishRepo15Test(BaseTest):
"""
publish repo: custom label
"""
fixtureCmds = [
"aptly repo create local-repo",
"aptly repo add local-repo ${files}",
]
runCmd = "aptly publish repo -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick -component=contrib -label=label15 local-repo"
gold_processor = BaseTest.expand_environ
def check(self):
super(PublishRepo15Test, self).check()
# verify contents except of sums
self.check_file_contents('public/dists/maverick/Release', 'release', match_prepare=strip_processor)
+19
View File
@@ -556,3 +556,22 @@ class PublishSnapshot23Test(BaseTest):
]
runCmd = "aptly publish snapshot -skip-signing snap3"
gold_processor = BaseTest.expand_environ
class PublishSnapshot24Test(BaseTest):
"""
publish snapshot: custom origin
"""
fixtureDB = True
fixturePool = True
fixtureCmds = [
"aptly snapshot create snap24 from mirror gnuplot-maverick",
]
runCmd = "aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=squeeze -origin=aptly24 snap24"
gold_processor = BaseTest.expand_environ
def check(self):
super(PublishSnapshot24Test, self).check()
# verify contents except of sums
self.check_file_contents('public/dists/squeeze/Release', 'release', match_prepare=strip_processor)