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
1diff --git a/packages/bddeb b/packages/bddeb
2index 3c77ce1..46c07c8 100755
3--- a/packages/bddeb
4+++ b/packages/bddeb
5@@ -180,13 +180,10 @@ def main():
6
7 with util.tempdir() as tdir:
8
9- cmd = [util.abs_join(find_root(), 'tools', 'read-version')]
10+ # output like 0.7.6-1022-g36e92d3
11+ cmd = ['git', 'describe', '--long']
12 (sysout, _stderr) = util.subp(cmd)
13- version = sysout.strip()
14-
15- cmd = ['bzr', 'revno']
16- (sysout, _stderr) = util.subp(cmd)
17- revno = sysout.strip()
18+ version, extra = sysout.strip().split("-", 1)
19
20 # This is really only a temporary archive
21 # since we will extract it then add in the debian
22@@ -212,12 +209,12 @@ def main():
23 append_requires=['cloud-utils | cloud-guest-utils']
24 else:
25 append_requires=[]
26- write_debian_folder(xdir, version, revno, pkgmap,
27+ write_debian_folder(xdir, version, extra, pkgmap,
28 pyver=pyver, append_requires=append_requires)
29
30 # The naming here seems to follow some debian standard
31 # so it will whine if it is changed...
32- tar_fn = "cloud-init_%s~bzr%s.orig.tar.gz" % (version, revno)
33+ tar_fn = "cloud-init_%s+%s~bddeb.orig.tar.gz" % (version, extra)
34 print("Archiving the adjusted source into %r" %
35 (util.abs_join(tdir, tar_fn)))
36 cmd = ['tar', '-czvf',
37diff --git a/packages/debian/changelog.in b/packages/debian/changelog.in
38index c9affe4..544d23c 100644
39--- a/packages/debian/changelog.in
40+++ b/packages/debian/changelog.in
41@@ -1,5 +1,5 @@
42 ## template:basic
43-cloud-init (${version}~bzr${revision}-1) UNRELEASED; urgency=low
44+cloud-init (${version}+${revision}~bddeb-1) UNRELEASED; urgency=low
45
46 * build
47
48diff --git a/tests/unittests/test_handler/test_handler_mcollective.py b/tests/unittests/test_handler/test_handler_mcollective.py
49index 6aefb93..8fa0147 100644
50--- a/tests/unittests/test_handler/test_handler_mcollective.py
51+++ b/tests/unittests/test_handler/test_handler_mcollective.py
52@@ -49,7 +49,7 @@ class TestConfig(t_help.FilesystemMockingTestCase):
53 self.tmp, "./" + cc_mcollective.SERVER_CFG)
54 self.pubcert_file = os.path.join(
55 self.tmp, "./" + cc_mcollective.PUBCERT_FILE)
56- self.pricert_file= os.path.join(
57+ self.pricert_file = os.path.join(
58 self.tmp, self.tmp, "./" + cc_mcollective.PRICERT_FILE)
59
60 def test_basic_config(self):
61@@ -86,7 +86,8 @@ class TestConfig(t_help.FilesystemMockingTestCase):
62 cc_mcollective.configure(config=cfg, server_cfg=self.server_cfg)
63 self.assertTrue(os.path.exists(self.server_cfg))
64 self.assertTrue(os.path.exists(self.server_cfg + ".old"))
65- self.assertEqual(util.load_file(self.server_cfg + ".old"), STOCK_CONFIG)
66+ self.assertEqual(util.load_file(self.server_cfg + ".old"),
67+ STOCK_CONFIG)
68
69 def test_existing_updated(self):
70 cfg = {'loglevel': 'warn'}
71@@ -101,9 +102,9 @@ class TestConfig(t_help.FilesystemMockingTestCase):
72 'public-cert': "this is my public-certificate",
73 'private-cert': "secret private certificate"}
74
75- cc_mcollective.configure(config=cfg,
76- server_cfg=self.server_cfg, pricert_file=self.pricert_file,
77- pubcert_file=self.pubcert_file)
78+ cc_mcollective.configure(
79+ config=cfg, server_cfg=self.server_cfg,
80+ pricert_file=self.pricert_file, pubcert_file=self.pubcert_file)
81
82 found = configobj.ConfigObj(self.server_cfg)
83
84diff --git a/tools/make-tarball b/tools/make-tarball
85index 25d6f93..c99f551 100755
86--- a/tools/make-tarball
87+++ b/tools/make-tarball
88@@ -2,6 +2,7 @@
89 set -e
90
91 rev=${1:-HEAD}
92+<<<<<<< tools/make-tarball
93 if [ "$rev" = HEAD ]; then
94 revname=$(git describe --tags)
95 else
96@@ -10,6 +11,18 @@ fi
97
98 archive_base="cloud-init-$revname"
99
100+=======
101+revname=$(git describe $rev)
102+
103+# revname could be 0.7.5 or 0.7.5-NNN-gHASH
104+# turn that into 0.7.5 or 0.7.5+NNN.gHASH
105+case "$revname" in
106+ *-*) revname=$(echo "$revname" | sed -e 's/-/+/' -e 's/-/./')
107+esac
108+
109+archive_base="cloud-init-$revname"
110+
111+>>>>>>> tools/make-tarball
112 # when building an archiving from HEAD, ensure that there aren't any
113 # uncomitted changes in the working directory (because these would not
114 # end up in the archive).
115@@ -24,8 +37,16 @@ if [ "$rev" = HEAD ] && ! git diff-index --quiet HEAD --; then
116 fi
117
118 git archive \
119+<<<<<<< tools/make-tarball
120 --format=tar \
121 --prefix "$archive_base/" $rev > "$archive_base.tar"
122 gzip -f9 ${archive_base}.tar
123
124 echo ${archive_base}.tar.gz
125+=======
126+ --format=tar.gz \
127+ --prefix="$archive_base/" "$rev" \
128+ "--output=$archive_base.tar.gz"
129+
130+echo "${archive_base}.tar.gz"
131+>>>>>>> tools/make-tarball

Subscribers

People subscribed via source and target branches