Merge lp:~unity-api-team/click/scope-facing-apis into lp:click
- scope-facing-apis
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp:~unity-api-team/click/scope-facing-apis |
Merge into: | lp:click |
Diff against target: |
1045 lines (+356/-118) 21 files modified
click/chroot.py (+11/-0) click/commands/build.py (+20/-0) click/install.py (+9/-0) click/tests/integration/helpers.py (+37/-8) click/tests/integration/test_build_core_apps.py (+11/-6) click/tests/integration/test_chroot.py (+14/-5) click/tests/integration/test_contents.py (+1/-1) click/tests/integration/test_frameworks.py (+10/-11) click/tests/integration/test_hook.py (+8/-11) click/tests/integration/test_info.py (+13/-2) click/tests/integration/test_install.py (+41/-39) click/tests/integration/test_list.py (+33/-0) click/tests/integration/test_signatures.py (+32/-16) click/tests/integration/test_verify.py (+42/-2) click/tests/test_build.py (+13/-13) debian/changelog (+43/-0) debian/control (+2/-1) debian/tests/control (+1/-1) debian/tests/run-tests.sh (+8/-1) doc/manpage.rst (+2/-0) pk-plugin/pk-plugin-click.c (+5/-1) |
To merge this branch: | bzr merge lp:~unity-api-team/click/scope-facing-apis |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Colin Watson | Needs Resubmitting | ||
Michael Vogt | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+233539@code.launchpad.net |
This proposal has been superseded by a proposal from 2014-09-09.
Commit message
Add scope-facing APIs to chroot build
Description of the change
Add scope-facing APIs to chroot build
Pete Woods (pete-woods) wrote : | # |
- 512. By Daniel Holbach
-
Run click-review from click-reviewers
-tools as part of the "click build" run. Offer --no-validate option. Approved by PS Jenkins bot, zbenjamin, Colin Watson.
- 513. By Colin Watson
-
typo
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:444
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://
- 514. By Michael Vogt
-
Make the PackageKit plugin honour the PK_TRANSACTION_
FLAG_ENUM_ ONLY_TRUSTED flag. Fixes: https:/ /bugs.launchpad .net/bugs/ 1360582. Approved by Colin Watson, PS Jenkins bot.
Michael Vogt (mvo) wrote : | # |
This looks good, however there are two libraries that are in universe right now, I'm not sure what our policy is here and if we need a MIR (Colin will know).
- 515. By Colin Watson
-
merge 0.4.32 release
- 516. By Colin Watson
-
[r=cjwatson] Fix autopkgtests
Colin Watson (cjwatson) wrote : | # |
We don't need an MIR for these at this point - we have other things in universe.
Michael Vogt (mvo) : | # |
Sergio Schvezov (sergiusens) wrote : | # |
isn't this supposed to target the staging/devel click?
Colin Watson (cjwatson) wrote : | # |
Er, yes, please resubmit this against lp:click/devel.
- 517. By Pete Woods
-
Add scope-facing libraries
Unmerged revisions
Preview Diff
1 | === modified file 'click/chroot.py' | |||
2 | --- click/chroot.py 2014-08-06 22:38:57 +0000 | |||
3 | +++ click/chroot.py 2014-09-09 18:07:23 +0000 | |||
4 | @@ -77,6 +77,11 @@ | |||
5 | 77 | ], | 77 | ], |
6 | 78 | "ubuntu-sdk-14.04": [ | 78 | "ubuntu-sdk-14.04": [ |
7 | 79 | "cmake", | 79 | "cmake", |
8 | 80 | "google-mock:TARGET", | ||
9 | 81 | "libboost1.55-dev:TARGET", | ||
10 | 82 | "libjsoncpp-dev:TARGET", | ||
11 | 83 | "libprocess-cpp-dev:TARGET", | ||
12 | 84 | "libproperties-cpp-dev:TARGET", | ||
13 | 80 | "libqt5svg5-dev:TARGET", | 85 | "libqt5svg5-dev:TARGET", |
14 | 81 | "libqt5webkit5-dev:TARGET", | 86 | "libqt5webkit5-dev:TARGET", |
15 | 82 | "libqt5xmlpatterns5-dev:TARGET", | 87 | "libqt5xmlpatterns5-dev:TARGET", |
16 | @@ -99,7 +104,13 @@ | |||
17 | 99 | ], | 104 | ], |
18 | 100 | "ubuntu-sdk-14.10": [ | 105 | "ubuntu-sdk-14.10": [ |
19 | 101 | "cmake", | 106 | "cmake", |
20 | 107 | "google-mock:TARGET", | ||
21 | 108 | "libboost1.55-dev:TARGET", | ||
22 | 102 | "libcontent-hub-dev:TARGET", | 109 | "libcontent-hub-dev:TARGET", |
23 | 110 | "libjsoncpp-dev:TARGET", | ||
24 | 111 | "libnet-cpp-dev:TARGET", | ||
25 | 112 | "libprocess-cpp-dev:TARGET", | ||
26 | 113 | "libproperties-cpp-dev:TARGET", | ||
27 | 103 | "libqt5keychain0:TARGET", | 114 | "libqt5keychain0:TARGET", |
28 | 104 | "libqt5sensors5-dev:TARGET", | 115 | "libqt5sensors5-dev:TARGET", |
29 | 105 | "libqt5svg5-dev:TARGET", | 116 | "libqt5svg5-dev:TARGET", |
30 | 106 | 117 | ||
31 | === modified file 'click/commands/build.py' | |||
32 | --- click/commands/build.py 2013-12-06 11:04:47 +0000 | |||
33 | +++ click/commands/build.py 2014-09-09 18:07:23 +0000 | |||
34 | @@ -20,7 +20,9 @@ | |||
35 | 20 | from optparse import OptionParser | 20 | from optparse import OptionParser |
36 | 21 | import os | 21 | import os |
37 | 22 | import sys | 22 | import sys |
38 | 23 | import subprocess | ||
39 | 23 | 24 | ||
40 | 25 | from gi.repository import Click | ||
41 | 24 | from click.build import ClickBuildError, ClickBuilder | 26 | from click.build import ClickBuildError, ClickBuilder |
42 | 25 | 27 | ||
43 | 26 | 28 | ||
44 | @@ -29,6 +31,9 @@ | |||
45 | 29 | parser.add_option( | 31 | parser.add_option( |
46 | 30 | "-m", "--manifest", metavar="PATH", default="manifest.json", | 32 | "-m", "--manifest", metavar="PATH", default="manifest.json", |
47 | 31 | help="read package manifest from PATH (default: manifest.json)") | 33 | help="read package manifest from PATH (default: manifest.json)") |
48 | 34 | parser.add_option( | ||
49 | 35 | "--no-validate", action="store_false", default=True, dest="validate", | ||
50 | 36 | help="Don't run click-reviewers-tools check on resulting .click") | ||
51 | 32 | options, args = parser.parse_args(argv) | 37 | options, args = parser.parse_args(argv) |
52 | 33 | if len(args) < 1: | 38 | if len(args) < 1: |
53 | 34 | parser.error("need directory") | 39 | parser.error("need directory") |
54 | @@ -48,5 +53,20 @@ | |||
55 | 48 | except ClickBuildError as e: | 53 | except ClickBuildError as e: |
56 | 49 | print(e, file=sys.stderr) | 54 | print(e, file=sys.stderr) |
57 | 50 | return 1 | 55 | return 1 |
58 | 56 | if options.validate and Click.find_on_path('click-review'): | ||
59 | 57 | print("Now executing: click-review %s" % path) | ||
60 | 58 | try: | ||
61 | 59 | subprocess.check_call(['click-review', path]) | ||
62 | 60 | except subprocess.CalledProcessError: | ||
63 | 61 | # qtcreator-plugin-ubuntu relies on return code 0 | ||
64 | 62 | # to establish if a .click package has been built | ||
65 | 63 | # at all. | ||
66 | 64 | # | ||
67 | 65 | # If we want to distinguish between | ||
68 | 66 | # - click build failed | ||
69 | 67 | # - click build succeeded, but validation failed | ||
70 | 68 | # both tools will have to learn this at the same | ||
71 | 69 | # time. | ||
72 | 70 | pass | ||
73 | 51 | print("Successfully built package in '%s'." % path) | 71 | print("Successfully built package in '%s'." % path) |
74 | 52 | return 0 | 72 | return 0 |
75 | 53 | 73 | ||
76 | === modified file 'click/install.py' | |||
77 | --- click/install.py 2014-08-20 17:45:26 +0000 | |||
78 | +++ click/install.py 2014-09-09 18:07:23 +0000 | |||
79 | @@ -177,6 +177,15 @@ | |||
80 | 177 | logging.warning( | 177 | logging.warning( |
81 | 178 | "debsig-verify not available; cannot check signatures") | 178 | "debsig-verify not available; cannot check signatures") |
82 | 179 | 179 | ||
83 | 180 | # fail early if the file cannot be opened | ||
84 | 181 | try: | ||
85 | 182 | with closing(DebFile(filename=path)) as package: | ||
86 | 183 | pass | ||
87 | 184 | except Exception as e: | ||
88 | 185 | raise ClickInstallerError("Failed to read %s: %s" % ( | ||
89 | 186 | path, str(e))) | ||
90 | 187 | |||
91 | 188 | # then perform the audit | ||
92 | 180 | with closing(DebFile(filename=path)) as package: | 189 | with closing(DebFile(filename=path)) as package: |
93 | 181 | control_fields = package.control.debcontrol() | 190 | control_fields = package.control.debcontrol() |
94 | 182 | 191 | ||
95 | 183 | 192 | ||
96 | === renamed directory 'tests/integration' => 'click/tests/integration' | |||
97 | === modified file 'click/tests/integration/helpers.py' | |||
98 | --- tests/integration/helpers.py 2014-08-03 13:10:48 +0000 | |||
99 | +++ click/tests/integration/helpers.py 2014-09-09 18:07:23 +0000 | |||
100 | @@ -27,13 +27,17 @@ | |||
101 | 27 | import unittest | 27 | import unittest |
102 | 28 | 28 | ||
103 | 29 | 29 | ||
111 | 30 | def is_root(): | 30 | def require_root(): |
112 | 31 | return os.getuid() == 0 | 31 | if os.getuid() != 0: |
113 | 32 | 32 | raise unittest.SkipTest("This test needs to run as root") | |
114 | 33 | 33 | ||
115 | 34 | def has_network(): | 34 | |
116 | 35 | return subprocess.call( | 35 | def require_network(): |
117 | 36 | ["ping", "-c1", "archive.ubuntu.com"]) == 0 | 36 | try: |
118 | 37 | if subprocess.call(["ping", "-c1", "archive.ubuntu.com"]) != 0: | ||
119 | 38 | raise unittest.SkipTest("Need network") | ||
120 | 39 | except Exception: | ||
121 | 40 | pass | ||
122 | 37 | 41 | ||
123 | 38 | 42 | ||
124 | 39 | @contextlib.contextmanager | 43 | @contextlib.contextmanager |
125 | @@ -46,10 +50,21 @@ | |||
126 | 46 | os.chdir(curdir) | 50 | os.chdir(curdir) |
127 | 47 | 51 | ||
128 | 48 | 52 | ||
129 | 53 | def cmdline_for_user(username): | ||
130 | 54 | """Helper to get the click commandline for the given username""" | ||
131 | 55 | if username == "@all": | ||
132 | 56 | user = "--all-users" | ||
133 | 57 | else: | ||
134 | 58 | user = "--user=%s" % username | ||
135 | 59 | return user | ||
136 | 60 | |||
137 | 61 | |||
138 | 49 | class ClickTestCase(unittest.TestCase): | 62 | class ClickTestCase(unittest.TestCase): |
139 | 50 | 63 | ||
140 | 51 | @classmethod | 64 | @classmethod |
141 | 52 | def setUpClass(cls): | 65 | def setUpClass(cls): |
142 | 66 | if "TEST_INTEGRATION" not in os.environ: | ||
143 | 67 | raise unittest.SkipTest("Skipping integration tests") | ||
144 | 53 | cls.click_binary = os.environ.get("CLICK_BINARY", "/usr/bin/click") | 68 | cls.click_binary = os.environ.get("CLICK_BINARY", "/usr/bin/click") |
145 | 54 | 69 | ||
146 | 55 | def setUp(self): | 70 | def setUp(self): |
147 | @@ -63,6 +78,20 @@ | |||
148 | 63 | self.doCleanups() | 78 | self.doCleanups() |
149 | 64 | shutil.rmtree(self.temp_dir) | 79 | shutil.rmtree(self.temp_dir) |
150 | 65 | 80 | ||
151 | 81 | def click_install(self, path_to_click, click_name, username, | ||
152 | 82 | allow_unauthenticated=True): | ||
153 | 83 | cmd = [self.click_binary, "install", cmdline_for_user(username)] | ||
154 | 84 | if allow_unauthenticated: | ||
155 | 85 | cmd.append("--allow-unauthenticated") | ||
156 | 86 | cmd.append(path_to_click) | ||
157 | 87 | subprocess.check_call(cmd) | ||
158 | 88 | self.addCleanup(self.click_unregister, click_name, username) | ||
159 | 89 | |||
160 | 90 | def click_unregister(self, click_name, username): | ||
161 | 91 | subprocess.check_call( | ||
162 | 92 | [self.click_binary, "unregister", cmdline_for_user(username), | ||
163 | 93 | click_name]) | ||
164 | 94 | |||
165 | 66 | def _create_manifest(self, target, name, version, framework, hooks={}): | 95 | def _create_manifest(self, target, name, version, framework, hooks={}): |
166 | 67 | with open(target, "w") as f: | 96 | with open(target, "w") as f: |
167 | 68 | json.dump({ | 97 | json.dump({ |
168 | @@ -77,7 +106,7 @@ | |||
169 | 77 | def _make_click(self, name=None, version=1.0, | 106 | def _make_click(self, name=None, version=1.0, |
170 | 78 | framework="ubuntu-sdk-13.10", hooks={}): | 107 | framework="ubuntu-sdk-13.10", hooks={}): |
171 | 79 | if name is None: | 108 | if name is None: |
173 | 80 | name = "com.ubuntu.%s" % "".join( | 109 | name = "com.example.%s" % "".join( |
174 | 81 | random.choice(string.ascii_lowercase) for i in range(10)) | 110 | random.choice(string.ascii_lowercase) for i in range(10)) |
175 | 82 | tmpdir = tempfile.mkdtemp() | 111 | tmpdir = tempfile.mkdtemp() |
176 | 83 | self.addCleanup(lambda: shutil.rmtree(tmpdir)) | 112 | self.addCleanup(lambda: shutil.rmtree(tmpdir)) |
177 | 84 | 113 | ||
178 | === modified file 'click/tests/integration/test_build_core_apps.py' | |||
179 | --- tests/integration/test_build_core_apps.py 2014-08-03 13:10:48 +0000 | |||
180 | +++ click/tests/integration/test_build_core_apps.py 2014-09-09 18:07:23 +0000 | |||
181 | @@ -20,12 +20,13 @@ | |||
182 | 20 | import os | 20 | import os |
183 | 21 | import shutil | 21 | import shutil |
184 | 22 | import subprocess | 22 | import subprocess |
186 | 23 | import unittest | 23 | |
187 | 24 | from six import with_metaclass | ||
188 | 24 | 25 | ||
189 | 25 | from .helpers import ( | 26 | from .helpers import ( |
190 | 26 | chdir, | 27 | chdir, |
193 | 27 | has_network, | 28 | require_network, |
194 | 28 | is_root, | 29 | require_root, |
195 | 29 | ClickTestCase, | 30 | ClickTestCase, |
196 | 30 | ) | 31 | ) |
197 | 31 | 32 | ||
198 | @@ -63,9 +64,13 @@ | |||
199 | 63 | return type.__new__(cls, name, bases, dct) | 64 | return type.__new__(cls, name, bases, dct) |
200 | 64 | 65 | ||
201 | 65 | 66 | ||
205 | 66 | @unittest.skipIf(not is_root(), "This tests needs to run as root") | 67 | class TestBuildCoreApps(with_metaclass(AddBranchTestFunctions, ClickTestCase)): |
206 | 67 | @unittest.skipIf(not has_network(), "Need network") | 68 | |
207 | 68 | class TestBuildCoreApps(ClickTestCase, metaclass=AddBranchTestFunctions): | 69 | @classmethod |
208 | 70 | def setUpClass(cls): | ||
209 | 71 | super(TestBuildCoreApps, cls).setUpClass() | ||
210 | 72 | require_root() | ||
211 | 73 | require_network() | ||
212 | 69 | 74 | ||
213 | 70 | def _run_in_chroot(self, cmd): | 75 | def _run_in_chroot(self, cmd): |
214 | 71 | """Run the given cmd in a click chroot""" | 76 | """Run the given cmd in a click chroot""" |
215 | 72 | 77 | ||
216 | === modified file 'click/tests/integration/test_chroot.py' | |||
217 | --- tests/integration/test_chroot.py 2014-08-03 13:10:48 +0000 | |||
218 | +++ click/tests/integration/test_chroot.py 2014-09-09 18:07:23 +0000 | |||
219 | @@ -16,22 +16,21 @@ | |||
220 | 16 | """Integration tests for the click chroot feature.""" | 16 | """Integration tests for the click chroot feature.""" |
221 | 17 | 17 | ||
222 | 18 | import subprocess | 18 | import subprocess |
223 | 19 | import unittest | ||
224 | 20 | 19 | ||
225 | 21 | from .helpers import ( | 20 | from .helpers import ( |
228 | 22 | has_network, | 21 | require_network, |
229 | 23 | is_root, | 22 | require_root, |
230 | 24 | ClickTestCase, | 23 | ClickTestCase, |
231 | 25 | ) | 24 | ) |
232 | 26 | 25 | ||
233 | 27 | 26 | ||
234 | 28 | @unittest.skipIf(not is_root(), "This tests needs to run as root") | ||
235 | 29 | @unittest.skipIf(not has_network(), "Need network") | ||
236 | 30 | class TestChroot(ClickTestCase): | 27 | class TestChroot(ClickTestCase): |
237 | 31 | 28 | ||
238 | 32 | @classmethod | 29 | @classmethod |
239 | 33 | def setUpClass(cls): | 30 | def setUpClass(cls): |
240 | 34 | super(TestChroot, cls).setUpClass() | 31 | super(TestChroot, cls).setUpClass() |
241 | 32 | require_root() | ||
242 | 33 | require_network() | ||
243 | 35 | cls.arch = subprocess.check_output( | 34 | cls.arch = subprocess.check_output( |
244 | 36 | ["dpkg", "--print-architecture"], universal_newlines=True).strip() | 35 | ["dpkg", "--print-architecture"], universal_newlines=True).strip() |
245 | 37 | subprocess.check_call([ | 36 | subprocess.check_call([ |
246 | @@ -67,3 +66,13 @@ | |||
247 | 67 | self.click_binary, "chroot", "-a", self.arch, | 66 | self.click_binary, "chroot", "-a", self.arch, |
248 | 68 | "maint", "id"], universal_newlines=True) | 67 | "maint", "id"], universal_newlines=True) |
249 | 69 | self.assertEqual(output, "uid=0(root) gid=0(root) groups=0(root)\n") | 68 | self.assertEqual(output, "uid=0(root) gid=0(root) groups=0(root)\n") |
250 | 69 | |||
251 | 70 | def test_exists_ok(self): | ||
252 | 71 | subprocess.check_call([ | ||
253 | 72 | self.click_binary, "chroot", "-a", self.arch, "exists"]) | ||
254 | 73 | |||
255 | 74 | def test_exists_no(self): | ||
256 | 75 | with self.assertRaises(subprocess.CalledProcessError): | ||
257 | 76 | subprocess.check_call([ | ||
258 | 77 | self.click_binary, | ||
259 | 78 | "chroot", "-a", "arch-that-does-not-exist"]) | ||
260 | 70 | 79 | ||
261 | === modified file 'click/tests/integration/test_contents.py' | |||
262 | --- tests/integration/test_contents.py 2014-06-26 12:00:09 +0000 | |||
263 | +++ click/tests/integration/test_contents.py 2014-09-09 18:07:23 +0000 | |||
264 | @@ -23,7 +23,7 @@ | |||
265 | 23 | 23 | ||
266 | 24 | class TestContents(ClickTestCase): | 24 | class TestContents(ClickTestCase): |
267 | 25 | def test_contents(self): | 25 | def test_contents(self): |
269 | 26 | name = "com.ubuntu.contents" | 26 | name = "com.example.contents" |
270 | 27 | path_to_click = self._make_click(name) | 27 | path_to_click = self._make_click(name) |
271 | 28 | output = subprocess.check_output([ | 28 | output = subprocess.check_output([ |
272 | 29 | self.click_binary, "contents", path_to_click], | 29 | self.click_binary, "contents", path_to_click], |
273 | 30 | 30 | ||
274 | === modified file 'click/tests/integration/test_frameworks.py' | |||
275 | --- tests/integration/test_frameworks.py 2014-06-26 12:00:09 +0000 | |||
276 | +++ click/tests/integration/test_frameworks.py 2014-09-09 18:07:23 +0000 | |||
277 | @@ -17,18 +17,17 @@ | |||
278 | 17 | 17 | ||
279 | 18 | import os | 18 | import os |
280 | 19 | import subprocess | 19 | import subprocess |
292 | 20 | import unittest | 20 | |
293 | 21 | 21 | from .helpers import ClickTestCase | |
294 | 22 | from .helpers import ( | 22 | |
295 | 23 | ClickTestCase, | 23 | |
285 | 24 | ) | ||
286 | 25 | |||
287 | 26 | |||
288 | 27 | @unittest.skipIf( | ||
289 | 28 | (not os.path.exists("/usr/share/click/frameworks") or | ||
290 | 29 | not os.listdir("/usr/share/click/frameworks")), | ||
291 | 30 | "Please install ubuntu-sdk-libs") | ||
296 | 31 | class TestFrameworks(ClickTestCase): | 24 | class TestFrameworks(ClickTestCase): |
297 | 25 | def setUp(self): | ||
298 | 26 | super(TestFrameworks, self).setUp() | ||
299 | 27 | if (not os.path.exists("/usr/share/click/frameworks") or | ||
300 | 28 | not os.listdir("/usr/share/click/frameworks")): | ||
301 | 29 | self.skipTest("Please install ubuntu-sdk-libs") | ||
302 | 30 | |||
303 | 32 | def test_framework_list(self): | 31 | def test_framework_list(self): |
304 | 33 | output = subprocess.check_output([ | 32 | output = subprocess.check_output([ |
305 | 34 | self.click_binary, "framework", "list"], universal_newlines=True) | 33 | self.click_binary, "framework", "list"], universal_newlines=True) |
306 | 35 | 34 | ||
307 | === modified file 'click/tests/integration/test_hook.py' | |||
308 | --- tests/integration/test_hook.py 2014-08-22 17:01:08 +0000 | |||
309 | +++ click/tests/integration/test_hook.py 2014-09-09 18:07:23 +0000 | |||
310 | @@ -18,16 +18,20 @@ | |||
311 | 18 | import os | 18 | import os |
312 | 19 | import subprocess | 19 | import subprocess |
313 | 20 | from textwrap import dedent | 20 | from textwrap import dedent |
314 | 21 | import unittest | ||
315 | 22 | 21 | ||
316 | 23 | from .helpers import ( | 22 | from .helpers import ( |
317 | 24 | is_root, | ||
318 | 25 | ClickTestCase, | 23 | ClickTestCase, |
319 | 24 | require_root, | ||
320 | 26 | ) | 25 | ) |
321 | 27 | 26 | ||
322 | 28 | 27 | ||
323 | 29 | @unittest.skipIf(not is_root(), "This tests needs to run as root") | ||
324 | 30 | class TestHook(ClickTestCase): | 28 | class TestHook(ClickTestCase): |
325 | 29 | |||
326 | 30 | @classmethod | ||
327 | 31 | def setUpClass(cls): | ||
328 | 32 | super(TestHook, cls).setUpClass() | ||
329 | 33 | require_root() | ||
330 | 34 | |||
331 | 31 | def _make_hook(self, name): | 35 | def _make_hook(self, name): |
332 | 32 | hook_fname = "/usr/share/click/hooks/%s.hook" % name | 36 | hook_fname = "/usr/share/click/hooks/%s.hook" % name |
333 | 33 | canary_fname = os.path.join(self.temp_dir, "canary.sh") | 37 | canary_fname = os.path.join(self.temp_dir, "canary.sh") |
334 | @@ -63,14 +67,7 @@ | |||
335 | 63 | click_pkg = self._make_click( | 67 | click_pkg = self._make_click( |
336 | 64 | click_pkg_name, framework="", hooks=hooks) | 68 | click_pkg_name, framework="", hooks=hooks) |
337 | 65 | user = os.environ.get("USER", "root") | 69 | user = os.environ.get("USER", "root") |
346 | 66 | subprocess.check_call( | 70 | self.click_install(click_pkg, click_pkg_name, user) |
339 | 67 | [self.click_binary, "install", "--allow-unauthenticated", | ||
340 | 68 | "--user=%s" % user, click_pkg], | ||
341 | 69 | universal_newlines=True) | ||
342 | 70 | self.addCleanup( | ||
343 | 71 | subprocess.check_call, | ||
344 | 72 | [self.click_binary, "unregister", "--user=%s" % user, | ||
345 | 73 | click_pkg_name]) | ||
347 | 74 | # ensure we have the hook | 71 | # ensure we have the hook |
348 | 75 | generated_hook_file = os.path.expanduser( | 72 | generated_hook_file = os.path.expanduser( |
349 | 76 | "~/com.example.hook-1_app1_1.0.test-hook") | 73 | "~/com.example.hook-1_app1_1.0.test-hook") |
350 | 77 | 74 | ||
351 | === modified file 'click/tests/integration/test_info.py' | |||
352 | --- tests/integration/test_info.py 2014-08-22 17:01:08 +0000 | |||
353 | +++ click/tests/integration/test_info.py 2014-09-09 18:07:23 +0000 | |||
354 | @@ -16,19 +16,30 @@ | |||
355 | 16 | """Integration tests for the click CLI info command.""" | 16 | """Integration tests for the click CLI info command.""" |
356 | 17 | 17 | ||
357 | 18 | import json | 18 | import json |
358 | 19 | import os | ||
359 | 19 | import subprocess | 20 | import subprocess |
360 | 20 | 21 | ||
361 | 21 | from .helpers import ClickTestCase | 22 | from .helpers import ClickTestCase |
362 | 22 | 23 | ||
363 | 23 | 24 | ||
364 | 24 | class TestInfo(ClickTestCase): | 25 | class TestInfo(ClickTestCase): |
367 | 25 | def test_info(self): | 26 | def test_info_from_path(self): |
368 | 26 | name = "com.ubuntu.foo" | 27 | name = "com.example.foo" |
369 | 27 | path_to_click = self._make_click(name) | 28 | path_to_click = self._make_click(name) |
370 | 28 | output = subprocess.check_output([ | 29 | output = subprocess.check_output([ |
371 | 29 | self.click_binary, "info", path_to_click], universal_newlines=True) | 30 | self.click_binary, "info", path_to_click], universal_newlines=True) |
372 | 30 | self.assertEqual(name, json.loads(output)["name"]) | 31 | self.assertEqual(name, json.loads(output)["name"]) |
373 | 31 | 32 | ||
374 | 33 | |||
375 | 34 | def test_info_installed_click(self): | ||
376 | 35 | name = "com.example.foo" | ||
377 | 36 | user = os.environ.get("USER", "root") | ||
378 | 37 | path_to_click = self._make_click(name, framework="") | ||
379 | 38 | self.click_install(path_to_click, name, user) | ||
380 | 39 | output = subprocess.check_output([ | ||
381 | 40 | self.click_binary, "info", name], universal_newlines=True) | ||
382 | 41 | self.assertEqual(json.loads(output)["name"], name) | ||
383 | 42 | |||
384 | 32 | def test_info_file_in_package(self): | 43 | def test_info_file_in_package(self): |
385 | 33 | name = "org.example.info" | 44 | name = "org.example.info" |
386 | 34 | version = "1.0" | 45 | version = "1.0" |
387 | 35 | 46 | ||
388 | === modified file 'click/tests/integration/test_install.py' | |||
389 | --- tests/integration/test_install.py 2014-08-22 17:01:08 +0000 | |||
390 | +++ click/tests/integration/test_install.py 2014-09-09 18:07:23 +0000 | |||
391 | @@ -15,11 +15,12 @@ | |||
392 | 15 | 15 | ||
393 | 16 | """Integration tests for the click install feature.""" | 16 | """Integration tests for the click install feature.""" |
394 | 17 | 17 | ||
395 | 18 | import os | ||
396 | 19 | import subprocess | 18 | import subprocess |
397 | 20 | import unittest | ||
398 | 21 | 19 | ||
400 | 22 | from .helpers import ClickTestCase | 20 | from .helpers import ( |
401 | 21 | require_root, | ||
402 | 22 | ClickTestCase, | ||
403 | 23 | ) | ||
404 | 23 | 24 | ||
405 | 24 | 25 | ||
406 | 25 | def add_user(name): | 26 | def add_user(name): |
407 | @@ -31,13 +32,12 @@ | |||
408 | 31 | subprocess.check_call(["userdel", "-r", name]) | 32 | subprocess.check_call(["userdel", "-r", name]) |
409 | 32 | 33 | ||
410 | 33 | 34 | ||
411 | 34 | @unittest.skipIf( | ||
412 | 35 | os.getuid() != 0, "This tests needs to run as root") | ||
413 | 36 | class TestClickInstall(ClickTestCase): | 35 | class TestClickInstall(ClickTestCase): |
414 | 37 | 36 | ||
415 | 38 | @classmethod | 37 | @classmethod |
416 | 39 | def setUpClass(cls): | 38 | def setUpClass(cls): |
417 | 40 | super(TestClickInstall, cls).setUpClass() | 39 | super(TestClickInstall, cls).setUpClass() |
418 | 40 | require_root() | ||
419 | 41 | cls.USER_1 = add_user("click-test-user-1") | 41 | cls.USER_1 = add_user("click-test-user-1") |
420 | 42 | cls.USER_2 = add_user("click-test-user-2") | 42 | cls.USER_2 = add_user("click-test-user-2") |
421 | 43 | 43 | ||
422 | @@ -47,27 +47,16 @@ | |||
423 | 47 | del_user(cls.USER_1) | 47 | del_user(cls.USER_1) |
424 | 48 | del_user(cls.USER_2) | 48 | del_user(cls.USER_2) |
425 | 49 | 49 | ||
426 | 50 | def click_unregister(self, username, click_name): | ||
427 | 51 | if username == "@all": | ||
428 | 52 | user = "--all-users" | ||
429 | 53 | else: | ||
430 | 54 | user = "--user=%s" % username | ||
431 | 55 | subprocess.check_call( | ||
432 | 56 | [self.click_binary, "unregister", user, click_name]) | ||
433 | 57 | |||
434 | 58 | def test_install_for_single_user(self): | 50 | def test_install_for_single_user(self): |
436 | 59 | click_pkg = self._make_click(name="foo-1", framework="") | 51 | name = "foo-1" |
437 | 52 | click_pkg = self._make_click(name=name, framework="") | ||
438 | 60 | # install it | 53 | # install it |
444 | 61 | subprocess.check_call([ | 54 | self.click_install(click_pkg, name, self.USER_1) |
440 | 62 | self.click_binary, "install", "--user=%s" % self.USER_1, | ||
441 | 63 | "--allow-unauthenticated", | ||
442 | 64 | click_pkg], universal_newlines=True) | ||
443 | 65 | self.addCleanup(self.click_unregister, self.USER_1, "foo-1") | ||
445 | 66 | # ensure that user-1 has it | 55 | # ensure that user-1 has it |
446 | 67 | output = subprocess.check_output([ | 56 | output = subprocess.check_output([ |
447 | 68 | "sudo", "-u", self.USER_1, | 57 | "sudo", "-u", self.USER_1, |
448 | 69 | self.click_binary, "list"], universal_newlines=True) | 58 | self.click_binary, "list"], universal_newlines=True) |
450 | 70 | self.assertEqual(output, "foo-1\t1.0\n") | 59 | self.assertEqual(output, "%s\t1.0\n" % name) |
451 | 71 | # but not user-2 | 60 | # but not user-2 |
452 | 72 | output = subprocess.check_output([ | 61 | output = subprocess.check_output([ |
453 | 73 | "sudo", "-u", self.USER_2, | 62 | "sudo", "-u", self.USER_2, |
454 | @@ -77,40 +66,53 @@ | |||
455 | 77 | output = subprocess.check_output( | 66 | output = subprocess.check_output( |
456 | 78 | [self.click_binary, "list", "--user=%s" % self.USER_1], | 67 | [self.click_binary, "list", "--user=%s" % self.USER_1], |
457 | 79 | universal_newlines=True) | 68 | universal_newlines=True) |
459 | 80 | self.assertEqual(output, "foo-1\t1.0\n") | 69 | self.assertEqual(output, "%s\t1.0\n" % name) |
460 | 70 | |||
461 | 71 | def test_install_for_single_user_and_register(self): | ||
462 | 72 | name = "foo-1" | ||
463 | 73 | click_pkg = self._make_click(name=name, framework="") | ||
464 | 74 | self.click_install(click_pkg, name, self.USER_1) | ||
465 | 75 | # not available for user2 | ||
466 | 76 | output = subprocess.check_output([ | ||
467 | 77 | "sudo", "-u", self.USER_2, | ||
468 | 78 | self.click_binary, "list"], universal_newlines=True) | ||
469 | 79 | self.assertEqual(output, "") | ||
470 | 80 | # register it | ||
471 | 81 | subprocess.check_call( | ||
472 | 82 | [self.click_binary, "register", "--user=%s" % self.USER_2, | ||
473 | 83 | name, "1.0", ]) | ||
474 | 84 | self.addCleanup(self.click_unregister, name, self.USER_2) | ||
475 | 85 | # and ensure its available for user2 | ||
476 | 86 | output = subprocess.check_output([ | ||
477 | 87 | "sudo", "-u", self.USER_2, | ||
478 | 88 | self.click_binary, "list"], universal_newlines=True) | ||
479 | 89 | self.assertEqual(output, "%s\t1.0\n" % name) | ||
480 | 81 | 90 | ||
481 | 82 | def test_install_for_all_users(self): | 91 | def test_install_for_all_users(self): |
489 | 83 | click_pkg = self._make_click(name="foo-2", framework="") | 92 | name = "foo-2" |
490 | 84 | # install it | 93 | click_pkg = self._make_click(name=name, framework="") |
491 | 85 | subprocess.check_call( | 94 | self.click_install(click_pkg, name, "@all") |
485 | 86 | [self.click_binary, "install", "--all-users", | ||
486 | 87 | "--allow-unauthenticated", click_pkg], | ||
487 | 88 | universal_newlines=True) | ||
488 | 89 | self.addCleanup(self.click_unregister, "@all", "foo-2") | ||
492 | 90 | # ensure all users see it | 95 | # ensure all users see it |
493 | 91 | for user in (self.USER_1, self.USER_2): | 96 | for user in (self.USER_1, self.USER_2): |
494 | 92 | output = subprocess.check_output( | 97 | output = subprocess.check_output( |
495 | 93 | ["sudo", "-u", user, self.click_binary, "list"], | 98 | ["sudo", "-u", user, self.click_binary, "list"], |
496 | 94 | universal_newlines=True) | 99 | universal_newlines=True) |
498 | 95 | self.assertEqual(output, "foo-2\t1.0\n") | 100 | self.assertEqual(output, "%s\t1.0\n" % name) |
499 | 96 | 101 | ||
500 | 97 | def test_pkgdir_after_install(self): | 102 | def test_pkgdir_after_install(self): |
507 | 98 | click_pkg = self._make_click(name="foo-2", version="1.2", framework="") | 103 | name = "foo-3" |
508 | 99 | subprocess.check_call( | 104 | click_pkg = self._make_click(name=name, version="1.2", framework="") |
509 | 100 | [self.click_binary, "install", "--all-users", | 105 | self.click_install(click_pkg, name, "@all") |
504 | 101 | "--allow-unauthenticated", click_pkg], | ||
505 | 102 | universal_newlines=True) | ||
506 | 103 | self.addCleanup(self.click_unregister, "@all", "foo-2") | ||
510 | 104 | # from the path | 106 | # from the path |
511 | 105 | output = subprocess.check_output( | 107 | output = subprocess.check_output( |
512 | 106 | [self.click_binary, "pkgdir", | 108 | [self.click_binary, "pkgdir", |
514 | 107 | "/opt/click.ubuntu.com/foo-2/1.2/README"], | 109 | "/opt/click.ubuntu.com/%s/1.2/README" % name], |
515 | 108 | universal_newlines=True).strip() | 110 | universal_newlines=True).strip() |
517 | 109 | self.assertEqual(output, "/opt/click.ubuntu.com/foo-2/1.2") | 111 | self.assertEqual(output, "/opt/click.ubuntu.com/%s/1.2" % name) |
518 | 110 | # now test from the click package name | 112 | # now test from the click package name |
519 | 111 | output = subprocess.check_output( | 113 | output = subprocess.check_output( |
521 | 112 | [self.click_binary, "pkgdir", "foo-2"], | 114 | [self.click_binary, "pkgdir", name], |
522 | 113 | universal_newlines=True).strip() | 115 | universal_newlines=True).strip() |
523 | 114 | # note that this is different from above | 116 | # note that this is different from above |
524 | 115 | self.assertEqual( | 117 | self.assertEqual( |
526 | 116 | output, "/opt/click.ubuntu.com/.click/users/@all/foo-2") | 118 | output, "/opt/click.ubuntu.com/.click/users/@all/%s" % name) |
527 | 117 | 119 | ||
528 | === added file 'click/tests/integration/test_list.py' | |||
529 | --- click/tests/integration/test_list.py 1970-01-01 00:00:00 +0000 | |||
530 | +++ click/tests/integration/test_list.py 2014-09-09 18:07:23 +0000 | |||
531 | @@ -0,0 +1,33 @@ | |||
532 | 1 | # Copyright (C) 2014 Canonical Ltd. | ||
533 | 2 | # Author: Michael Vogt <michael.vogt@ubuntu.com> | ||
534 | 3 | |||
535 | 4 | # This program is free software: you can redistribute it and/or modify | ||
536 | 5 | # it under the terms of the GNU General Public License as published by | ||
537 | 6 | # the Free Software Foundation; version 3 of the License. | ||
538 | 7 | # | ||
539 | 8 | # This program is distributed in the hope that it will be useful, | ||
540 | 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
541 | 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
542 | 11 | # GNU General Public License for more details. | ||
543 | 12 | # | ||
544 | 13 | # You should have received a copy of the GNU General Public License | ||
545 | 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
546 | 15 | |||
547 | 16 | """Integration tests for the click CLI list command.""" | ||
548 | 17 | |||
549 | 18 | import os | ||
550 | 19 | import subprocess | ||
551 | 20 | |||
552 | 21 | from .helpers import ClickTestCase | ||
553 | 22 | |||
554 | 23 | |||
555 | 24 | class TestList(ClickTestCase): | ||
556 | 25 | def test_list_simple(self): | ||
557 | 26 | name = "com.ubuntu.verify-ok" | ||
558 | 27 | path_to_click = self._make_click(name, framework="") | ||
559 | 28 | user = os.environ.get("USER", "root") | ||
560 | 29 | self.click_install(path_to_click, name, user) | ||
561 | 30 | output = subprocess.check_output( | ||
562 | 31 | [self.click_binary, "list", "--user=%s" % user], | ||
563 | 32 | universal_newlines=True) | ||
564 | 33 | self.assertIn(name, output) | ||
565 | 0 | 34 | ||
566 | === modified file 'click/tests/integration/test_signatures.py' | |||
567 | --- tests/integration/test_signatures.py 2014-08-22 17:01:08 +0000 | |||
568 | +++ click/tests/integration/test_signatures.py 2014-09-09 18:07:23 +0000 | |||
569 | @@ -20,20 +20,21 @@ | |||
570 | 20 | import shutil | 20 | import shutil |
571 | 21 | import subprocess | 21 | import subprocess |
572 | 22 | import tarfile | 22 | import tarfile |
573 | 23 | import unittest | ||
574 | 24 | from textwrap import dedent | 23 | from textwrap import dedent |
575 | 25 | 24 | ||
576 | 26 | from .helpers import ( | 25 | from .helpers import ( |
578 | 27 | is_root, | 26 | require_root, |
579 | 28 | ClickTestCase, | 27 | ClickTestCase, |
580 | 29 | ) | 28 | ) |
581 | 30 | 29 | ||
582 | 30 | |||
583 | 31 | def makedirs(path): | 31 | def makedirs(path): |
584 | 32 | try: | 32 | try: |
585 | 33 | os.makedirs(path) | 33 | os.makedirs(path) |
586 | 34 | except OSError: | 34 | except OSError: |
587 | 35 | pass | 35 | pass |
588 | 36 | 36 | ||
589 | 37 | |||
590 | 37 | def get_keyid_from_gpghome(gpg_home): | 38 | def get_keyid_from_gpghome(gpg_home): |
591 | 38 | """Return the public keyid of a given gpg home dir""" | 39 | """Return the public keyid of a given gpg home dir""" |
592 | 39 | output = subprocess.check_output( | 40 | output = subprocess.check_output( |
593 | @@ -56,7 +57,7 @@ | |||
594 | 56 | def sign(self, filepath, signature_type="origin"): | 57 | def sign(self, filepath, signature_type="origin"): |
595 | 57 | """Sign the click at filepath""" | 58 | """Sign the click at filepath""" |
596 | 58 | env = copy.copy(os.environ) | 59 | env = copy.copy(os.environ) |
598 | 59 | env["GNUPGHOME"] = os.path.abspath(self.gpghome) | 60 | env["GNUPGHOME"] = os.path.abspath(self.gpghome) |
599 | 60 | subprocess.check_call( | 61 | subprocess.check_call( |
600 | 61 | ["debsigs", | 62 | ["debsigs", |
601 | 62 | "--sign=%s" % signature_type, | 63 | "--sign=%s" % signature_type, |
602 | @@ -74,7 +75,7 @@ | |||
603 | 74 | <Selection> | 75 | <Selection> |
604 | 75 | <Required Type="origin" File="{filename}" id="{keyid}"/> | 76 | <Required Type="origin" File="{filename}" id="{keyid}"/> |
605 | 76 | </Selection> | 77 | </Selection> |
607 | 77 | 78 | ||
608 | 78 | <Verification> | 79 | <Verification> |
609 | 79 | <Required Type="origin" File="{filename}" id="{keyid}"/> | 80 | <Required Type="origin" File="{filename}" id="{keyid}"/> |
610 | 80 | </Verification> | 81 | </Verification> |
611 | @@ -86,7 +87,8 @@ | |||
612 | 86 | self.pubkey_path = ( | 87 | self.pubkey_path = ( |
613 | 87 | "/usr/share/debsig/keyrings/%s/origin.pub" % self.keyid) | 88 | "/usr/share/debsig/keyrings/%s/origin.pub" % self.keyid) |
614 | 88 | makedirs(os.path.dirname(self.pubkey_path)) | 89 | makedirs(os.path.dirname(self.pubkey_path)) |
616 | 89 | shutil.copy(os.path.join(self.gpghome, "pubring.gpg"), self.pubkey_path) | 90 | shutil.copy( |
617 | 91 | os.path.join(self.gpghome, "pubring.gpg"), self.pubkey_path) | ||
618 | 90 | 92 | ||
619 | 91 | def uninstall_signature_policy(self): | 93 | def uninstall_signature_policy(self): |
620 | 92 | # FIXME: update debsig-verify so that it can work from a different | 94 | # FIXME: update debsig-verify so that it can work from a different |
621 | @@ -96,8 +98,13 @@ | |||
622 | 96 | os.remove(self.pubkey_path) | 98 | os.remove(self.pubkey_path) |
623 | 97 | 99 | ||
624 | 98 | 100 | ||
625 | 99 | @unittest.skipIf(not is_root(), "This tests needs to run as root") | ||
626 | 100 | class ClickSignaturesTestCase(ClickTestCase): | 101 | class ClickSignaturesTestCase(ClickTestCase): |
627 | 102 | |||
628 | 103 | @classmethod | ||
629 | 104 | def setUpClass(cls): | ||
630 | 105 | super(ClickSignaturesTestCase, cls).setUpClass() | ||
631 | 106 | require_root() | ||
632 | 107 | |||
633 | 101 | def assertClickNoSignatureError(self, cmd_args): | 108 | def assertClickNoSignatureError(self, cmd_args): |
634 | 102 | with self.assertRaises(subprocess.CalledProcessError) as cm: | 109 | with self.assertRaises(subprocess.CalledProcessError) as cm: |
635 | 103 | output = subprocess.check_output( | 110 | output = subprocess.check_output( |
636 | @@ -120,8 +127,13 @@ | |||
637 | 120 | self.assertIn(expected_error_message, output) | 127 | self.assertIn(expected_error_message, output) |
638 | 121 | 128 | ||
639 | 122 | 129 | ||
640 | 123 | @unittest.skipIf(not is_root(), "This tests needs to run as root") | ||
641 | 124 | class TestSignatureVerificationNoSignature(ClickSignaturesTestCase): | 130 | class TestSignatureVerificationNoSignature(ClickSignaturesTestCase): |
642 | 131 | |||
643 | 132 | @classmethod | ||
644 | 133 | def setUpClass(cls): | ||
645 | 134 | super(TestSignatureVerificationNoSignature, cls).setUpClass() | ||
646 | 135 | require_root() | ||
647 | 136 | |||
648 | 125 | def test_debsig_verify_no_sig(self): | 137 | def test_debsig_verify_no_sig(self): |
649 | 126 | name = "org.example.debsig-no-sig" | 138 | name = "org.example.debsig-no-sig" |
650 | 127 | path_to_click = self._make_click(name, framework="") | 139 | path_to_click = self._make_click(name, framework="") |
651 | @@ -145,8 +157,13 @@ | |||
652 | 145 | "--user=%s" % user, name]) | 157 | "--user=%s" % user, name]) |
653 | 146 | 158 | ||
654 | 147 | 159 | ||
655 | 148 | @unittest.skipIf(not is_root(), "This tests needs to run as root") | ||
656 | 149 | class TestSignatureVerification(ClickSignaturesTestCase): | 160 | class TestSignatureVerification(ClickSignaturesTestCase): |
657 | 161 | |||
658 | 162 | @classmethod | ||
659 | 163 | def setUpClass(cls): | ||
660 | 164 | super(TestSignatureVerification, cls).setUpClass() | ||
661 | 165 | require_root() | ||
662 | 166 | |||
663 | 150 | def setUp(self): | 167 | def setUp(self): |
664 | 151 | super(TestSignatureVerification, self).setUp() | 168 | super(TestSignatureVerification, self).setUp() |
665 | 152 | self.user = os.environ.get("USER", "root") | 169 | self.user = os.environ.get("USER", "root") |
666 | @@ -176,7 +193,7 @@ | |||
667 | 176 | [self.click_binary, "list", "--user=%s" % self.user], | 193 | [self.click_binary, "list", "--user=%s" % self.user], |
668 | 177 | universal_newlines=True) | 194 | universal_newlines=True) |
669 | 178 | self.assertIn(name, output) | 195 | self.assertIn(name, output) |
671 | 179 | 196 | ||
672 | 180 | def test_debsig_install_signature_not_in_keyring(self): | 197 | def test_debsig_install_signature_not_in_keyring(self): |
673 | 181 | name = "org.example.debsig-no-keyring-sig" | 198 | name = "org.example.debsig-no-keyring-sig" |
674 | 182 | path_to_click = self._make_click(name, framework="") | 199 | path_to_click = self._make_click(name, framework="") |
675 | @@ -245,7 +262,7 @@ | |||
676 | 245 | # NOTE: that right now this will not be caught by debsig-verify | 262 | # NOTE: that right now this will not be caught by debsig-verify |
677 | 246 | # but later in audit() by debian.debfile.DebFile() | 263 | # but later in audit() by debian.debfile.DebFile() |
678 | 247 | subprocess.check_call(["ar", | 264 | subprocess.check_call(["ar", |
680 | 248 | "-r", | 265 | "-r", |
681 | 249 | "-b", "data.tar.gz", | 266 | "-b", "data.tar.gz", |
682 | 250 | path_to_click, | 267 | path_to_click, |
683 | 251 | new_data]) | 268 | new_data]) |
684 | @@ -274,12 +291,12 @@ | |||
685 | 274 | new_data = self.make_nasty_data_tar("bz2") | 291 | new_data = self.make_nasty_data_tar("bz2") |
686 | 275 | # replace data.tar.gz with data.tar.bz2 and ensure this is caught | 292 | # replace data.tar.gz with data.tar.bz2 and ensure this is caught |
687 | 276 | subprocess.check_call(["ar", | 293 | subprocess.check_call(["ar", |
689 | 277 | "-d", | 294 | "-d", |
690 | 278 | path_to_click, | 295 | path_to_click, |
691 | 279 | "data.tar.gz", | 296 | "data.tar.gz", |
692 | 280 | ]) | 297 | ]) |
693 | 281 | subprocess.check_call(["ar", | 298 | subprocess.check_call(["ar", |
695 | 282 | "-r", | 299 | "-r", |
696 | 283 | path_to_click, | 300 | path_to_click, |
697 | 284 | new_data]) | 301 | new_data]) |
698 | 285 | output = subprocess.check_output( | 302 | output = subprocess.check_output( |
699 | @@ -290,7 +307,7 @@ | |||
700 | 290 | "control.tar.gz", | 307 | "control.tar.gz", |
701 | 291 | "_gpgorigin", | 308 | "_gpgorigin", |
702 | 292 | "data.tar.bz2", | 309 | "data.tar.bz2", |
704 | 293 | ]) | 310 | ]) |
705 | 294 | with self.assertRaises(subprocess.CalledProcessError) as cm: | 311 | with self.assertRaises(subprocess.CalledProcessError) as cm: |
706 | 295 | output = subprocess.check_output( | 312 | output = subprocess.check_output( |
707 | 296 | [self.click_binary, "install", path_to_click], | 313 | [self.click_binary, "install", path_to_click], |
708 | @@ -305,7 +322,7 @@ | |||
709 | 305 | # this test is probably not really needed, it tries to trick | 322 | # this test is probably not really needed, it tries to trick |
710 | 306 | # the system by prepending a valid signature that is not | 323 | # the system by prepending a valid signature that is not |
711 | 307 | # in the keyring. But given that debsig-verify only reads | 324 | # in the keyring. But given that debsig-verify only reads |
713 | 308 | # the first packet of any given _gpg$foo signature its | 325 | # the first packet of any given _gpg$foo signature it's |
714 | 309 | # equivalent to test_debsig_install_signature_not_in_keyring test | 326 | # equivalent to test_debsig_install_signature_not_in_keyring test |
715 | 310 | name = "org.example.debsig-replaced-data-prepend-sig-click" | 327 | name = "org.example.debsig-replaced-data-prepend-sig-click" |
716 | 311 | path_to_click = self._make_click(name, framework="") | 328 | path_to_click = self._make_click(name, framework="") |
717 | @@ -313,7 +330,7 @@ | |||
718 | 313 | new_data = self.make_nasty_data_tar("gz") | 330 | new_data = self.make_nasty_data_tar("gz") |
719 | 314 | # replace data.tar.gz | 331 | # replace data.tar.gz |
720 | 315 | subprocess.check_call(["ar", | 332 | subprocess.check_call(["ar", |
722 | 316 | "-r", | 333 | "-r", |
723 | 317 | path_to_click, | 334 | path_to_click, |
724 | 318 | new_data, | 335 | new_data, |
725 | 319 | ]) | 336 | ]) |
726 | @@ -345,4 +362,3 @@ | |||
727 | 345 | [self.click_binary, "list", "--user=%s" % self.user], | 362 | [self.click_binary, "list", "--user=%s" % self.user], |
728 | 346 | universal_newlines=True) | 363 | universal_newlines=True) |
729 | 347 | self.assertNotIn(name, output) | 364 | self.assertNotIn(name, output) |
730 | 348 | |||
731 | 349 | 365 | ||
732 | === modified file 'click/tests/integration/test_verify.py' | |||
733 | --- tests/integration/test_verify.py 2014-08-07 21:51:27 +0000 | |||
734 | +++ click/tests/integration/test_verify.py 2014-09-09 18:07:23 +0000 | |||
735 | @@ -15,14 +15,15 @@ | |||
736 | 15 | 15 | ||
737 | 16 | """Integration tests for the click CLI verify command.""" | 16 | """Integration tests for the click CLI verify command.""" |
738 | 17 | 17 | ||
739 | 18 | import os | ||
740 | 18 | import subprocess | 19 | import subprocess |
741 | 19 | 20 | ||
742 | 20 | from .helpers import ClickTestCase | 21 | from .helpers import ClickTestCase |
743 | 21 | 22 | ||
744 | 22 | 23 | ||
745 | 23 | class TestVerify(ClickTestCase): | 24 | class TestVerify(ClickTestCase): |
748 | 24 | def test_verify_ok(self): | 25 | def test_verify_force_missing_framework_ok(self): |
749 | 25 | name = "com.example.verify-ok" | 26 | name = "com.example.verify-missing-framework" |
750 | 26 | path_to_click = self._make_click(name) | 27 | path_to_click = self._make_click(name) |
751 | 27 | output = subprocess.check_output([ | 28 | output = subprocess.check_output([ |
752 | 28 | self.click_binary, "verify", | 29 | self.click_binary, "verify", |
753 | @@ -30,3 +31,42 @@ | |||
754 | 30 | "--allow-unauthenticated", | 31 | "--allow-unauthenticated", |
755 | 31 | path_to_click], universal_newlines=True) | 32 | path_to_click], universal_newlines=True) |
756 | 32 | self.assertEqual(output, "") | 33 | self.assertEqual(output, "") |
757 | 34 | |||
758 | 35 | def test_verify_force_ok(self): | ||
759 | 36 | name = "com.example.verify-ok" | ||
760 | 37 | path_to_click = self._make_click(name, framework="") | ||
761 | 38 | output = subprocess.check_output([ | ||
762 | 39 | self.click_binary, "verify", "--allow-unauthenticated", | ||
763 | 40 | path_to_click], universal_newlines=True) | ||
764 | 41 | self.assertEqual(output, "") | ||
765 | 42 | |||
766 | 43 | def test_verify_missing_framework(self): | ||
767 | 44 | name = "com.example.verify-really-missing-framework" | ||
768 | 45 | path_to_click = self._make_click(name, framework="missing") | ||
769 | 46 | with self.assertRaises(subprocess.CalledProcessError) as cm: | ||
770 | 47 | subprocess.check_output( | ||
771 | 48 | [self.click_binary, "verify", | ||
772 | 49 | "--allow-unauthenticated", | ||
773 | 50 | path_to_click], | ||
774 | 51 | universal_newlines=True, stderr=subprocess.STDOUT) | ||
775 | 52 | expected_error = ( | ||
776 | 53 | 'click.framework.ClickFrameworkInvalid: Framework ' | ||
777 | 54 | '"missing" not present on system (use ' | ||
778 | 55 | '--force-missing-framework option to override)') | ||
779 | 56 | self.assertIn(expected_error, cm.exception.output) | ||
780 | 57 | |||
781 | 58 | def test_verify_no_click_but_invalid(self): | ||
782 | 59 | name = "com.example.verify-no-click" | ||
783 | 60 | path_to_click = os.path.join(self.temp_dir, name+".click") | ||
784 | 61 | with open(path_to_click, "w") as f: | ||
785 | 62 | f.write("something-that-is-not-a-click") | ||
786 | 63 | with self.assertRaises(subprocess.CalledProcessError) as cm: | ||
787 | 64 | subprocess.check_output( | ||
788 | 65 | [self.click_binary, "verify", "--allow-unauthenticated", | ||
789 | 66 | path_to_click], | ||
790 | 67 | universal_newlines=True, stderr=subprocess.STDOUT) | ||
791 | 68 | expected_error = ( | ||
792 | 69 | 'click.install.DebsigVerifyError: Signature verification error: ' | ||
793 | 70 | 'debsig: %s does not appear to be a deb format package' | ||
794 | 71 | ) % path_to_click | ||
795 | 72 | self.assertIn(expected_error, cm.exception.output) | ||
796 | 33 | 73 | ||
797 | === modified file 'click/tests/test_build.py' | |||
798 | --- click/tests/test_build.py 2014-05-13 18:56:57 +0000 | |||
799 | +++ click/tests/test_build.py 2014-09-09 18:07:23 +0000 | |||
800 | @@ -63,14 +63,14 @@ | |||
801 | 63 | with mkfile(manifest_path) as manifest: | 63 | with mkfile(manifest_path) as manifest: |
802 | 64 | print(dedent("""\ | 64 | print(dedent("""\ |
803 | 65 | { | 65 | { |
805 | 66 | "name": "com.ubuntu.test", | 66 | "name": "com.example.test", |
806 | 67 | "version": "1.0", | 67 | "version": "1.0", |
807 | 68 | "maintainer": "Foo Bar <foo@example.org>", | 68 | "maintainer": "Foo Bar <foo@example.org>", |
808 | 69 | "title": "test title", | 69 | "title": "test title", |
809 | 70 | "framework": "ubuntu-sdk-13.10" | 70 | "framework": "ubuntu-sdk-13.10" |
810 | 71 | }"""), file=manifest) | 71 | }"""), file=manifest) |
811 | 72 | self.builder.read_manifest(manifest_path) | 72 | self.builder.read_manifest(manifest_path) |
813 | 73 | self.assertEqual("com.ubuntu.test", self.builder.name) | 73 | self.assertEqual("com.example.test", self.builder.name) |
814 | 74 | self.assertEqual("1.0", self.builder.version) | 74 | self.assertEqual("1.0", self.builder.version) |
815 | 75 | self.assertEqual("Foo Bar <foo@example.org>", self.builder.maintainer) | 75 | self.assertEqual("Foo Bar <foo@example.org>", self.builder.maintainer) |
816 | 76 | self.assertEqual("test title", self.builder.title) | 76 | self.assertEqual("test title", self.builder.title) |
817 | @@ -90,7 +90,7 @@ | |||
818 | 90 | with mkfile(manifest_path) as manifest: | 90 | with mkfile(manifest_path) as manifest: |
819 | 91 | print(dedent("""\ | 91 | print(dedent("""\ |
820 | 92 | { | 92 | { |
822 | 93 | "name": "com.ubuntu.test", | 93 | "name": "com.example.test", |
823 | 94 | "version": "%s", | 94 | "version": "%s", |
824 | 95 | "maintainer": "Foo Bar <foo@example.org>", | 95 | "maintainer": "Foo Bar <foo@example.org>", |
825 | 96 | "title": "test title", | 96 | "title": "test title", |
826 | @@ -106,7 +106,7 @@ | |||
827 | 106 | # The comma after the "name" entry is intentionally missing. | 106 | # The comma after the "name" entry is intentionally missing. |
828 | 107 | print(dedent("""\ | 107 | print(dedent("""\ |
829 | 108 | { | 108 | { |
831 | 109 | "name": "com.ubuntu.test" | 109 | "name": "com.example.test" |
832 | 110 | "version": "1.0" | 110 | "version": "1.0" |
833 | 111 | }"""), file=manifest) | 111 | }"""), file=manifest) |
834 | 112 | self.assertRaises( | 112 | self.assertRaises( |
835 | @@ -136,7 +136,7 @@ | |||
836 | 136 | f.write("test /toplevel\n") | 136 | f.write("test /toplevel\n") |
837 | 137 | with mkfile(os.path.join(scratch, "manifest.json")) as f: | 137 | with mkfile(os.path.join(scratch, "manifest.json")) as f: |
838 | 138 | json.dump({ | 138 | json.dump({ |
840 | 139 | "name": "com.ubuntu.test", | 139 | "name": "com.example.test", |
841 | 140 | "version": "1.0", | 140 | "version": "1.0", |
842 | 141 | "maintainer": "Foo Bar <foo@example.org>", | 141 | "maintainer": "Foo Bar <foo@example.org>", |
843 | 142 | "title": "test title", | 142 | "title": "test title", |
844 | @@ -146,11 +146,11 @@ | |||
845 | 146 | # build() overrides this back to 0o644 | 146 | # build() overrides this back to 0o644 |
846 | 147 | os.fchmod(f.fileno(), 0o600) | 147 | os.fchmod(f.fileno(), 0o600) |
847 | 148 | self.builder.add_file(scratch, "/") | 148 | self.builder.add_file(scratch, "/") |
849 | 149 | path = os.path.join(self.temp_dir, "com.ubuntu.test_1.0_all.click") | 149 | path = os.path.join(self.temp_dir, "com.example.test_1.0_all.click") |
850 | 150 | self.assertEqual(path, self.builder.build(self.temp_dir)) | 150 | self.assertEqual(path, self.builder.build(self.temp_dir)) |
851 | 151 | self.assertTrue(os.path.exists(path)) | 151 | self.assertTrue(os.path.exists(path)) |
852 | 152 | for key, value in ( | 152 | for key, value in ( |
854 | 153 | ("Package", "com.ubuntu.test"), | 153 | ("Package", "com.example.test"), |
855 | 154 | ("Version", "1.0"), | 154 | ("Version", "1.0"), |
856 | 155 | ("Click-Version", "0.4"), | 155 | ("Click-Version", "0.4"), |
857 | 156 | ("Architecture", "all"), | 156 | ("Architecture", "all"), |
858 | @@ -212,7 +212,7 @@ | |||
859 | 212 | touch(os.path.join(scratch, ".click", "evil-file")) | 212 | touch(os.path.join(scratch, ".click", "evil-file")) |
860 | 213 | with mkfile(os.path.join(scratch, "manifest.json")) as f: | 213 | with mkfile(os.path.join(scratch, "manifest.json")) as f: |
861 | 214 | json.dump({ | 214 | json.dump({ |
863 | 215 | "name": "com.ubuntu.test", | 215 | "name": "com.example.test", |
864 | 216 | "version": "1.0", | 216 | "version": "1.0", |
865 | 217 | "maintainer": "Foo Bar <foo@example.org>", | 217 | "maintainer": "Foo Bar <foo@example.org>", |
866 | 218 | "title": "test title", | 218 | "title": "test title", |
867 | @@ -231,7 +231,7 @@ | |||
868 | 231 | scratch = os.path.join(self.temp_dir, "scratch") | 231 | scratch = os.path.join(self.temp_dir, "scratch") |
869 | 232 | with mkfile(os.path.join(scratch, "manifest.json")) as f: | 232 | with mkfile(os.path.join(scratch, "manifest.json")) as f: |
870 | 233 | json.dump({ | 233 | json.dump({ |
872 | 234 | "name": "com.ubuntu.test", | 234 | "name": "com.example.test", |
873 | 235 | "version": "1.0", | 235 | "version": "1.0", |
874 | 236 | "maintainer": "Foo Bar <foo@example.org>", | 236 | "maintainer": "Foo Bar <foo@example.org>", |
875 | 237 | "title": "test title", | 237 | "title": "test title", |
876 | @@ -239,7 +239,7 @@ | |||
877 | 239 | "framework": "ubuntu-sdk-13.10", | 239 | "framework": "ubuntu-sdk-13.10", |
878 | 240 | }, f) | 240 | }, f) |
879 | 241 | self.builder.add_file(scratch, "/") | 241 | self.builder.add_file(scratch, "/") |
881 | 242 | path = os.path.join(self.temp_dir, "com.ubuntu.test_1.0_multi.click") | 242 | path = os.path.join(self.temp_dir, "com.example.test_1.0_multi.click") |
882 | 243 | self.assertEqual(path, self.builder.build(self.temp_dir)) | 243 | self.assertEqual(path, self.builder.build(self.temp_dir)) |
883 | 244 | self.assertTrue(os.path.exists(path)) | 244 | self.assertTrue(os.path.exists(path)) |
884 | 245 | self.assertEqual("multi", self.extract_field(path, "Architecture")) | 245 | self.assertEqual("multi", self.extract_field(path, "Architecture")) |
885 | @@ -260,7 +260,7 @@ | |||
886 | 260 | scratch = os.path.join(self.temp_dir, "scratch") | 260 | scratch = os.path.join(self.temp_dir, "scratch") |
887 | 261 | with mkfile(os.path.join(scratch, "manifest.json")) as f: | 261 | with mkfile(os.path.join(scratch, "manifest.json")) as f: |
888 | 262 | json.dump({ | 262 | json.dump({ |
890 | 263 | "name": "com.ubuntu.test", | 263 | "name": "com.example.test", |
891 | 264 | "version": "1.0", | 264 | "version": "1.0", |
892 | 265 | "maintainer": "Foo Bar <foo@example.org>", | 265 | "maintainer": "Foo Bar <foo@example.org>", |
893 | 266 | "title": "test title", | 266 | "title": "test title", |
894 | @@ -322,7 +322,7 @@ | |||
895 | 322 | touch(os.path.join(scratch, ".git", "config")) | 322 | touch(os.path.join(scratch, ".git", "config")) |
896 | 323 | with mkfile(os.path.join(scratch, "manifest.json")) as f: | 323 | with mkfile(os.path.join(scratch, "manifest.json")) as f: |
897 | 324 | json.dump({ | 324 | json.dump({ |
899 | 325 | "name": "com.ubuntu.test", | 325 | "name": "com.example.test", |
900 | 326 | "version": "1.0", | 326 | "version": "1.0", |
901 | 327 | "maintainer": "Foo Bar <foo@example.org>", | 327 | "maintainer": "Foo Bar <foo@example.org>", |
902 | 328 | "title": "test title", | 328 | "title": "test title", |
903 | @@ -332,7 +332,7 @@ | |||
904 | 332 | # build() overrides this back to 0o644 | 332 | # build() overrides this back to 0o644 |
905 | 333 | os.fchmod(f.fileno(), 0o600) | 333 | os.fchmod(f.fileno(), 0o600) |
906 | 334 | self.builder.add_file(scratch, "./") | 334 | self.builder.add_file(scratch, "./") |
908 | 335 | path = os.path.join(self.temp_dir, "com.ubuntu.test_1.0.tar.gz") | 335 | path = os.path.join(self.temp_dir, "com.example.test_1.0.tar.gz") |
909 | 336 | self.assertEqual(path, self.builder.build(self.temp_dir)) | 336 | self.assertEqual(path, self.builder.build(self.temp_dir)) |
910 | 337 | self.assertTrue(os.path.exists(path)) | 337 | self.assertTrue(os.path.exists(path)) |
911 | 338 | with tarfile.open(path, mode="r:gz") as tar: | 338 | with tarfile.open(path, mode="r:gz") as tar: |
912 | 339 | 339 | ||
913 | === modified file 'debian/changelog' | |||
914 | --- debian/changelog 2014-08-22 17:19:06 +0000 | |||
915 | +++ debian/changelog 2014-09-09 18:07:23 +0000 | |||
916 | @@ -1,3 +1,46 @@ | |||
917 | 1 | click (0.4.32.1) UNRELEASED; urgency=low | ||
918 | 2 | |||
919 | 3 | * fix autopkgtest failure found in 0.4.32 | ||
920 | 4 | |||
921 | 5 | -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 09 Sep 2014 09:56:57 +0200 | ||
922 | 6 | |||
923 | 7 | click (0.4.32) utopic; urgency=medium | ||
924 | 8 | |||
925 | 9 | [ Daniel Holbach ] | ||
926 | 10 | * Run click-review after a successful build of a click package. Offer | ||
927 | 11 | --no-validate as an option. | ||
928 | 12 | |||
929 | 13 | [ Colin Watson ] | ||
930 | 14 | * Move integration tests to a location where they won't end up being | ||
931 | 15 | installed into inappropriate places on the system module path | ||
932 | 16 | (LP: #1337696). | ||
933 | 17 | * Use six.with_metaclass for TestBuildCoreApps, so that it doesn't make | ||
934 | 18 | pyflakes angry when running tests under Python 2. | ||
935 | 19 | |||
936 | 20 | [ Michael Vogt ] | ||
937 | 21 | * Add more integration tests for "click {list,register,verify,info}". | ||
938 | 22 | * Only install trusted click packages by default. To override you | ||
939 | 23 | can run "pkcon --allow-untrusted" (LP: #1360582) | ||
940 | 24 | |||
941 | 25 | -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 08 Sep 2014 09:50:43 +0000 | ||
942 | 26 | |||
943 | 27 | click (0.4.31.3) utopic; urgency=medium | ||
944 | 28 | |||
945 | 29 | * Reinstate most of 0.4.31.2; instead, just always pass | ||
946 | 30 | --allow-unauthenticated to "click install" from the PackageKit plugin | ||
947 | 31 | for now, until we can sort out sideloading (see LP #1360582). | ||
948 | 32 | |||
949 | 33 | -- Colin Watson <cjwatson@ubuntu.com> Mon, 25 Aug 2014 12:25:21 -0700 | ||
950 | 34 | |||
951 | 35 | click (0.4.31.2.is.0.4.30) utopic; urgency=medium | ||
952 | 36 | |||
953 | 37 | * Temporary everting to previous version as the current one makes installing | ||
954 | 38 | click packages locally through pkcon install-local impossible, which is | ||
955 | 39 | breaking some other projects relying on this functionality. Needs to be | ||
956 | 40 | revisited. | ||
957 | 41 | |||
958 | 42 | -- Ćukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> Mon, 25 Aug 2014 17:34:07 +0200 | ||
959 | 43 | |||
960 | 1 | click (0.4.31.2) utopic; urgency=medium | 44 | click (0.4.31.2) utopic; urgency=medium |
961 | 2 | 45 | ||
962 | 3 | [ Michael Vogt ] | 46 | [ Michael Vogt ] |
963 | 4 | 47 | ||
964 | === modified file 'debian/control' | |||
965 | --- debian/control 2014-06-10 17:18:00 +0000 | |||
966 | +++ debian/control 2014-09-09 18:07:23 +0000 | |||
967 | @@ -3,7 +3,7 @@ | |||
968 | 3 | Priority: optional | 3 | Priority: optional |
969 | 4 | Maintainer: Colin Watson <cjwatson@ubuntu.com> | 4 | Maintainer: Colin Watson <cjwatson@ubuntu.com> |
970 | 5 | Standards-Version: 3.9.5 | 5 | Standards-Version: 3.9.5 |
972 | 6 | Build-Depends: debhelper (>= 9~), dh-autoreconf, intltool, python3:any (>= 3.2), python3-all:any, python3-setuptools, python3-apt, python3-debian, python3-gi, python3:any (>= 3.3) | python3-mock, pep8, python3-pep8, pyflakes, python3-sphinx, pkg-config, valac, gobject-introspection (>= 0.6.7), libgirepository1.0-dev (>= 0.6.7), libglib2.0-dev (>= 2.34), gir1.2-glib-2.0, libjson-glib-dev (>= 0.10), libgee-0.8-dev, libpackagekit-glib2-dev (>= 0.7.2), python3-coverage | 6 | Build-Depends: debhelper (>= 9~), dh-autoreconf, intltool, python3:any (>= 3.2), python3-all:any, python3-setuptools, python3-apt, python3-debian, python3-gi, python3:any (>= 3.3) | python3-mock, pep8, python3-pep8, pyflakes, python3-sphinx, pkg-config, valac, gobject-introspection (>= 0.6.7), libgirepository1.0-dev (>= 0.6.7), libglib2.0-dev (>= 2.34), gir1.2-glib-2.0, libjson-glib-dev (>= 0.10), libgee-0.8-dev, libpackagekit-glib2-dev (>= 0.7.2), python3-coverage, python3-six |
973 | 7 | Vcs-Bzr: https://code.launchpad.net/~ubuntu-managed-branches/click/click | 7 | Vcs-Bzr: https://code.launchpad.net/~ubuntu-managed-branches/click/click |
974 | 8 | Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-managed-branches/click/click/files | 8 | Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-managed-branches/click/click/files |
975 | 9 | X-Auto-Uploader: no-rewrite-version | 9 | X-Auto-Uploader: no-rewrite-version |
976 | @@ -16,6 +16,7 @@ | |||
977 | 16 | Pre-Depends: ${misc:Pre-Depends} | 16 | Pre-Depends: ${misc:Pre-Depends} |
978 | 17 | Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, python3-click (= ${binary:Version}), adduser | 17 | Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, python3-click (= ${binary:Version}), adduser |
979 | 18 | Recommends: click-apparmor, ubuntu-app-launch-tools | upstart-app-launch-tools | 18 | Recommends: click-apparmor, ubuntu-app-launch-tools | upstart-app-launch-tools |
980 | 19 | Suggests: click-reviewers-tools (>= 0.9) | ||
981 | 19 | Conflicts: click-package | 20 | Conflicts: click-package |
982 | 20 | Replaces: click-package | 21 | Replaces: click-package |
983 | 21 | Provides: click-package | 22 | Provides: click-package |
984 | 22 | 23 | ||
985 | === modified file 'debian/tests/control' | |||
986 | --- debian/tests/control 2014-07-14 09:10:39 +0000 | |||
987 | +++ debian/tests/control 2014-09-09 18:07:23 +0000 | |||
988 | @@ -1,3 +1,3 @@ | |||
989 | 1 | Tests: run-tests.sh | 1 | Tests: run-tests.sh |
991 | 2 | Depends: @, iputils-ping, click-dev, schroot, debootstrap, sudo, bzr, debsigs, debsig-verify | 2 | Depends: @, @builddeps@, iputils-ping, click-dev, schroot, debootstrap, sudo, bzr, debsigs, debsig-verify, python3-six |
992 | 3 | Restrictions: needs-root allow-stderr | 3 | Restrictions: needs-root allow-stderr |
993 | 4 | 4 | ||
994 | === modified file 'debian/tests/run-tests.sh' | |||
995 | --- debian/tests/run-tests.sh 2014-06-11 12:40:44 +0000 | |||
996 | +++ debian/tests/run-tests.sh 2014-09-09 18:07:23 +0000 | |||
997 | @@ -2,4 +2,11 @@ | |||
998 | 2 | 2 | ||
999 | 3 | set -e | 3 | set -e |
1000 | 4 | 4 | ||
1002 | 5 | python3 -m unittest discover tests.integration | 5 | # some files like config.py are generated from config.py.in |
1003 | 6 | ./autogen.sh | ||
1004 | 7 | ./configure --prefix=/usr \ | ||
1005 | 8 | --sysconfdir=/etc \ | ||
1006 | 9 | --with-systemdsystemunitdir=/lib/systemd/system \ | ||
1007 | 10 | --with-systemduserunitdir=/usr/lib/systemd/user | ||
1008 | 11 | |||
1009 | 12 | TEST_INTEGRATION=1 python3 -m unittest discover -vv click.tests.integration | ||
1010 | 6 | 13 | ||
1011 | === modified file 'doc/manpage.rst' | |||
1012 | --- doc/manpage.rst 2014-05-20 09:04:03 +0000 | |||
1013 | +++ doc/manpage.rst 2014-09-09 18:07:23 +0000 | |||
1014 | @@ -73,6 +73,8 @@ | |||
1015 | 73 | 73 | ||
1016 | 74 | -m PATH, --manifest=PATH Read package manifest from PATH | 74 | -m PATH, --manifest=PATH Read package manifest from PATH |
1017 | 75 | (default: ``manifest.json``). | 75 | (default: ``manifest.json``). |
1018 | 76 | --no-validate Don't run checks from click-reviewers-tools on | ||
1019 | 77 | the resulting .click file. | ||
1020 | 76 | 78 | ||
1021 | 77 | click buildsource DIRECTORY | 79 | click buildsource DIRECTORY |
1022 | 78 | --------------------------- | 80 | --------------------------- |
1023 | 79 | 81 | ||
1024 | === modified file 'pk-plugin/pk-plugin-click.c' | |||
1025 | --- pk-plugin/pk-plugin-click.c 2014-08-19 07:06:25 +0000 | |||
1026 | +++ pk-plugin/pk-plugin-click.c 2014-09-09 18:07:23 +0000 | |||
1027 | @@ -515,10 +515,14 @@ | |||
1028 | 515 | JsonObject *manifest; | 515 | JsonObject *manifest; |
1029 | 516 | gchar *pkid = NULL; | 516 | gchar *pkid = NULL; |
1030 | 517 | 517 | ||
1032 | 518 | argv = g_malloc0_n (6, sizeof (*argv)); | 518 | argv = g_malloc0_n (7, sizeof (*argv)); |
1033 | 519 | i = 0; | 519 | i = 0; |
1034 | 520 | argv[i++] = g_strdup ("click"); | 520 | argv[i++] = g_strdup ("click"); |
1035 | 521 | argv[i++] = g_strdup ("install"); | 521 | argv[i++] = g_strdup ("install"); |
1036 | 522 | if (!pk_bitfield_contain (pk_transaction_get_transaction_flags (transaction), | ||
1037 | 523 | PK_TRANSACTION_FLAG_ENUM_ONLY_TRUSTED)) { | ||
1038 | 524 | argv[i++] = g_strdup ("--allow-unauthenticated"); | ||
1039 | 525 | } | ||
1040 | 522 | username = click_get_username_for_uid | 526 | username = click_get_username_for_uid |
1041 | 523 | (pk_transaction_get_uid (transaction)); | 527 | (pk_transaction_get_uid (transaction)); |
1042 | 524 | if (username) | 528 | if (username) |
1043 | 525 | 529 | ||
1044 | === removed directory 'tests' | |||
1045 | === removed file 'tests/__init__.py' |
I've tried creating a new chroot from this, and it successfully builds the new scopes template from the SDK: https:/ /code.launchpad .net/~pete- woods/qtcreator -plugin- ubuntu/ new-scope- template/ +merge/ 233218