Merge ~smoser/cloud-init:feature/move-to-git into ~larsks/cloud-init:feature/move-to-git

Proposed by Scott Moser
Status: Merged
Merge reported by: Scott Moser
Merged at revision: not available
Proposed branch: ~smoser/cloud-init:feature/move-to-git
Merge into: ~larsks/cloud-init:feature/move-to-git
Diff against target: 131 lines (+33/-14) (has conflicts)
4 files modified
packages/bddeb (+5/-8)
packages/debian/changelog.in (+1/-1)
tests/unittests/test_handler/test_handler_mcollective.py (+6/-5)
tools/make-tarball (+21/-0)
Conflict in tools/make-tarball
Reviewer Review Type Date Requested Status
Lars Kellogg-Stedman Pending
Review via email: mp+301547@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

i pulled this into trunk.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/packages/bddeb b/packages/bddeb
index 3c77ce1..46c07c8 100755
--- a/packages/bddeb
+++ b/packages/bddeb
@@ -180,13 +180,10 @@ def main():
180180
181 with util.tempdir() as tdir:181 with util.tempdir() as tdir:
182182
183 cmd = [util.abs_join(find_root(), 'tools', 'read-version')]183 # output like 0.7.6-1022-g36e92d3
184 cmd = ['git', 'describe', '--long']
184 (sysout, _stderr) = util.subp(cmd)185 (sysout, _stderr) = util.subp(cmd)
185 version = sysout.strip()186 version, extra = sysout.strip().split("-", 1)
186
187 cmd = ['bzr', 'revno']
188 (sysout, _stderr) = util.subp(cmd)
189 revno = sysout.strip()
190187
191 # This is really only a temporary archive188 # This is really only a temporary archive
192 # since we will extract it then add in the debian189 # since we will extract it then add in the debian
@@ -212,12 +209,12 @@ def main():
212 append_requires=['cloud-utils | cloud-guest-utils']209 append_requires=['cloud-utils | cloud-guest-utils']
213 else:210 else:
214 append_requires=[]211 append_requires=[]
215 write_debian_folder(xdir, version, revno, pkgmap,212 write_debian_folder(xdir, version, extra, pkgmap,
216 pyver=pyver, append_requires=append_requires)213 pyver=pyver, append_requires=append_requires)
217214
218 # The naming here seems to follow some debian standard215 # The naming here seems to follow some debian standard
219 # so it will whine if it is changed...216 # so it will whine if it is changed...
220 tar_fn = "cloud-init_%s~bzr%s.orig.tar.gz" % (version, revno)217 tar_fn = "cloud-init_%s+%s~bddeb.orig.tar.gz" % (version, extra)
221 print("Archiving the adjusted source into %r" %218 print("Archiving the adjusted source into %r" %
222 (util.abs_join(tdir, tar_fn)))219 (util.abs_join(tdir, tar_fn)))
223 cmd = ['tar', '-czvf',220 cmd = ['tar', '-czvf',
diff --git a/packages/debian/changelog.in b/packages/debian/changelog.in
index c9affe4..544d23c 100644
--- a/packages/debian/changelog.in
+++ b/packages/debian/changelog.in
@@ -1,5 +1,5 @@
1## template:basic1## template:basic
2cloud-init (${version}~bzr${revision}-1) UNRELEASED; urgency=low2cloud-init (${version}+${revision}~bddeb-1) UNRELEASED; urgency=low
33
4 * build4 * build
55
diff --git a/tests/unittests/test_handler/test_handler_mcollective.py b/tests/unittests/test_handler/test_handler_mcollective.py
index 6aefb93..8fa0147 100644
--- a/tests/unittests/test_handler/test_handler_mcollective.py
+++ b/tests/unittests/test_handler/test_handler_mcollective.py
@@ -49,7 +49,7 @@ class TestConfig(t_help.FilesystemMockingTestCase):
49 self.tmp, "./" + cc_mcollective.SERVER_CFG)49 self.tmp, "./" + cc_mcollective.SERVER_CFG)
50 self.pubcert_file = os.path.join(50 self.pubcert_file = os.path.join(
51 self.tmp, "./" + cc_mcollective.PUBCERT_FILE)51 self.tmp, "./" + cc_mcollective.PUBCERT_FILE)
52 self.pricert_file= os.path.join(52 self.pricert_file = os.path.join(
53 self.tmp, self.tmp, "./" + cc_mcollective.PRICERT_FILE)53 self.tmp, self.tmp, "./" + cc_mcollective.PRICERT_FILE)
5454
55 def test_basic_config(self):55 def test_basic_config(self):
@@ -86,7 +86,8 @@ class TestConfig(t_help.FilesystemMockingTestCase):
86 cc_mcollective.configure(config=cfg, server_cfg=self.server_cfg)86 cc_mcollective.configure(config=cfg, server_cfg=self.server_cfg)
87 self.assertTrue(os.path.exists(self.server_cfg))87 self.assertTrue(os.path.exists(self.server_cfg))
88 self.assertTrue(os.path.exists(self.server_cfg + ".old"))88 self.assertTrue(os.path.exists(self.server_cfg + ".old"))
89 self.assertEqual(util.load_file(self.server_cfg + ".old"), STOCK_CONFIG)89 self.assertEqual(util.load_file(self.server_cfg + ".old"),
90 STOCK_CONFIG)
9091
91 def test_existing_updated(self):92 def test_existing_updated(self):
92 cfg = {'loglevel': 'warn'}93 cfg = {'loglevel': 'warn'}
@@ -101,9 +102,9 @@ class TestConfig(t_help.FilesystemMockingTestCase):
101 'public-cert': "this is my public-certificate",102 'public-cert': "this is my public-certificate",
102 'private-cert': "secret private certificate"}103 'private-cert': "secret private certificate"}
103104
104 cc_mcollective.configure(config=cfg,105 cc_mcollective.configure(
105 server_cfg=self.server_cfg, pricert_file=self.pricert_file,106 config=cfg, server_cfg=self.server_cfg,
106 pubcert_file=self.pubcert_file)107 pricert_file=self.pricert_file, pubcert_file=self.pubcert_file)
107108
108 found = configobj.ConfigObj(self.server_cfg)109 found = configobj.ConfigObj(self.server_cfg)
109110
diff --git a/tools/make-tarball b/tools/make-tarball
index 25d6f93..c99f551 100755
--- a/tools/make-tarball
+++ b/tools/make-tarball
@@ -2,6 +2,7 @@
2set -e2set -e
33
4rev=${1:-HEAD}4rev=${1:-HEAD}
5<<<<<<< tools/make-tarball
5if [ "$rev" = HEAD ]; then6if [ "$rev" = HEAD ]; then
6 revname=$(git describe --tags)7 revname=$(git describe --tags)
7else8else
@@ -10,6 +11,18 @@ fi
1011
11archive_base="cloud-init-$revname"12archive_base="cloud-init-$revname"
1213
14=======
15revname=$(git describe $rev)
16
17# revname could be 0.7.5 or 0.7.5-NNN-gHASH
18# turn that into 0.7.5 or 0.7.5+NNN.gHASH
19case "$revname" in
20 *-*) revname=$(echo "$revname" | sed -e 's/-/+/' -e 's/-/./')
21esac
22
23archive_base="cloud-init-$revname"
24
25>>>>>>> tools/make-tarball
13# when building an archiving from HEAD, ensure that there aren't any26# when building an archiving from HEAD, ensure that there aren't any
14# uncomitted changes in the working directory (because these would not27# uncomitted changes in the working directory (because these would not
15# end up in the archive).28# end up in the archive).
@@ -24,8 +37,16 @@ if [ "$rev" = HEAD ] && ! git diff-index --quiet HEAD --; then
24fi37fi
2538
26git archive \39git archive \
40<<<<<<< tools/make-tarball
27 --format=tar \41 --format=tar \
28 --prefix "$archive_base/" $rev > "$archive_base.tar"42 --prefix "$archive_base/" $rev > "$archive_base.tar"
29gzip -f9 ${archive_base}.tar43gzip -f9 ${archive_base}.tar
3044
31echo ${archive_base}.tar.gz45echo ${archive_base}.tar.gz
46=======
47 --format=tar.gz \
48 --prefix="$archive_base/" "$rev" \
49 "--output=$archive_base.tar.gz"
50
51echo "${archive_base}.tar.gz"
52>>>>>>> tools/make-tarball

Subscribers

People subscribed via source and target branches