Merge lp:~unity-api-team/click/scope-facing-apis into lp:click

Proposed by Pete Woods
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
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

To post a comment you must log in.
Revision history for this message
Pete Woods (pete-woods) wrote :

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

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

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
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.

Revision history for this message
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

Revision history for this message
Colin Watson (cjwatson) wrote :

We don't need an MIR for these at this point - we have other things in universe.

Revision history for this message
Michael Vogt (mvo) :
review: Approve
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

isn't this supposed to target the staging/devel click?

Revision history for this message
Colin Watson (cjwatson) wrote :

Er, yes, please resubmit this against lp:click/devel.

review: Needs Resubmitting
517. By Pete Woods

Add scope-facing libraries

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'click/chroot.py'
--- click/chroot.py 2014-08-06 22:38:57 +0000
+++ click/chroot.py 2014-09-09 18:07:23 +0000
@@ -77,6 +77,11 @@
77 ],77 ],
78 "ubuntu-sdk-14.04": [78 "ubuntu-sdk-14.04": [
79 "cmake",79 "cmake",
80 "google-mock:TARGET",
81 "libboost1.55-dev:TARGET",
82 "libjsoncpp-dev:TARGET",
83 "libprocess-cpp-dev:TARGET",
84 "libproperties-cpp-dev:TARGET",
80 "libqt5svg5-dev:TARGET",85 "libqt5svg5-dev:TARGET",
81 "libqt5webkit5-dev:TARGET",86 "libqt5webkit5-dev:TARGET",
82 "libqt5xmlpatterns5-dev:TARGET",87 "libqt5xmlpatterns5-dev:TARGET",
@@ -99,7 +104,13 @@
99 ],104 ],
100 "ubuntu-sdk-14.10": [105 "ubuntu-sdk-14.10": [
101 "cmake",106 "cmake",
107 "google-mock:TARGET",
108 "libboost1.55-dev:TARGET",
102 "libcontent-hub-dev:TARGET",109 "libcontent-hub-dev:TARGET",
110 "libjsoncpp-dev:TARGET",
111 "libnet-cpp-dev:TARGET",
112 "libprocess-cpp-dev:TARGET",
113 "libproperties-cpp-dev:TARGET",
103 "libqt5keychain0:TARGET",114 "libqt5keychain0:TARGET",
104 "libqt5sensors5-dev:TARGET",115 "libqt5sensors5-dev:TARGET",
105 "libqt5svg5-dev:TARGET",116 "libqt5svg5-dev:TARGET",
106117
=== modified file 'click/commands/build.py'
--- click/commands/build.py 2013-12-06 11:04:47 +0000
+++ click/commands/build.py 2014-09-09 18:07:23 +0000
@@ -20,7 +20,9 @@
20from optparse import OptionParser20from optparse import OptionParser
21import os21import os
22import sys22import sys
23import subprocess
2324
25from gi.repository import Click
24from click.build import ClickBuildError, ClickBuilder26from click.build import ClickBuildError, ClickBuilder
2527
2628
@@ -29,6 +31,9 @@
29 parser.add_option(31 parser.add_option(
30 "-m", "--manifest", metavar="PATH", default="manifest.json",32 "-m", "--manifest", metavar="PATH", default="manifest.json",
31 help="read package manifest from PATH (default: manifest.json)")33 help="read package manifest from PATH (default: manifest.json)")
34 parser.add_option(
35 "--no-validate", action="store_false", default=True, dest="validate",
36 help="Don't run click-reviewers-tools check on resulting .click")
32 options, args = parser.parse_args(argv)37 options, args = parser.parse_args(argv)
33 if len(args) < 1:38 if len(args) < 1:
34 parser.error("need directory")39 parser.error("need directory")
@@ -48,5 +53,20 @@
48 except ClickBuildError as e:53 except ClickBuildError as e:
49 print(e, file=sys.stderr)54 print(e, file=sys.stderr)
50 return 155 return 1
56 if options.validate and Click.find_on_path('click-review'):
57 print("Now executing: click-review %s" % path)
58 try:
59 subprocess.check_call(['click-review', path])
60 except subprocess.CalledProcessError:
61 # qtcreator-plugin-ubuntu relies on return code 0
62 # to establish if a .click package has been built
63 # at all.
64 #
65 # If we want to distinguish between
66 # - click build failed
67 # - click build succeeded, but validation failed
68 # both tools will have to learn this at the same
69 # time.
70 pass
51 print("Successfully built package in '%s'." % path)71 print("Successfully built package in '%s'." % path)
52 return 072 return 0
5373
=== modified file 'click/install.py'
--- click/install.py 2014-08-20 17:45:26 +0000
+++ click/install.py 2014-09-09 18:07:23 +0000
@@ -177,6 +177,15 @@
177 logging.warning(177 logging.warning(
178 "debsig-verify not available; cannot check signatures")178 "debsig-verify not available; cannot check signatures")
179179
180 # fail early if the file cannot be opened
181 try:
182 with closing(DebFile(filename=path)) as package:
183 pass
184 except Exception as e:
185 raise ClickInstallerError("Failed to read %s: %s" % (
186 path, str(e)))
187
188 # then perform the audit
180 with closing(DebFile(filename=path)) as package:189 with closing(DebFile(filename=path)) as package:
181 control_fields = package.control.debcontrol()190 control_fields = package.control.debcontrol()
182191
183192
=== renamed directory 'tests/integration' => 'click/tests/integration'
=== modified file 'click/tests/integration/helpers.py'
--- tests/integration/helpers.py 2014-08-03 13:10:48 +0000
+++ click/tests/integration/helpers.py 2014-09-09 18:07:23 +0000
@@ -27,13 +27,17 @@
27import unittest27import unittest
2828
2929
30def is_root():30def require_root():
31 return os.getuid() == 031 if os.getuid() != 0:
3232 raise unittest.SkipTest("This test needs to run as root")
3333
34def has_network():34
35 return subprocess.call(35def require_network():
36 ["ping", "-c1", "archive.ubuntu.com"]) == 036 try:
37 if subprocess.call(["ping", "-c1", "archive.ubuntu.com"]) != 0:
38 raise unittest.SkipTest("Need network")
39 except Exception:
40 pass
3741
3842
39@contextlib.contextmanager43@contextlib.contextmanager
@@ -46,10 +50,21 @@
46 os.chdir(curdir)50 os.chdir(curdir)
4751
4852
53def cmdline_for_user(username):
54 """Helper to get the click commandline for the given username"""
55 if username == "@all":
56 user = "--all-users"
57 else:
58 user = "--user=%s" % username
59 return user
60
61
49class ClickTestCase(unittest.TestCase):62class ClickTestCase(unittest.TestCase):
5063
51 @classmethod64 @classmethod
52 def setUpClass(cls):65 def setUpClass(cls):
66 if "TEST_INTEGRATION" not in os.environ:
67 raise unittest.SkipTest("Skipping integration tests")
53 cls.click_binary = os.environ.get("CLICK_BINARY", "/usr/bin/click")68 cls.click_binary = os.environ.get("CLICK_BINARY", "/usr/bin/click")
5469
55 def setUp(self):70 def setUp(self):
@@ -63,6 +78,20 @@
63 self.doCleanups()78 self.doCleanups()
64 shutil.rmtree(self.temp_dir)79 shutil.rmtree(self.temp_dir)
6580
81 def click_install(self, path_to_click, click_name, username,
82 allow_unauthenticated=True):
83 cmd = [self.click_binary, "install", cmdline_for_user(username)]
84 if allow_unauthenticated:
85 cmd.append("--allow-unauthenticated")
86 cmd.append(path_to_click)
87 subprocess.check_call(cmd)
88 self.addCleanup(self.click_unregister, click_name, username)
89
90 def click_unregister(self, click_name, username):
91 subprocess.check_call(
92 [self.click_binary, "unregister", cmdline_for_user(username),
93 click_name])
94
66 def _create_manifest(self, target, name, version, framework, hooks={}):95 def _create_manifest(self, target, name, version, framework, hooks={}):
67 with open(target, "w") as f:96 with open(target, "w") as f:
68 json.dump({97 json.dump({
@@ -77,7 +106,7 @@
77 def _make_click(self, name=None, version=1.0,106 def _make_click(self, name=None, version=1.0,
78 framework="ubuntu-sdk-13.10", hooks={}):107 framework="ubuntu-sdk-13.10", hooks={}):
79 if name is None:108 if name is None:
80 name = "com.ubuntu.%s" % "".join(109 name = "com.example.%s" % "".join(
81 random.choice(string.ascii_lowercase) for i in range(10))110 random.choice(string.ascii_lowercase) for i in range(10))
82 tmpdir = tempfile.mkdtemp()111 tmpdir = tempfile.mkdtemp()
83 self.addCleanup(lambda: shutil.rmtree(tmpdir))112 self.addCleanup(lambda: shutil.rmtree(tmpdir))
84113
=== modified file 'click/tests/integration/test_build_core_apps.py'
--- tests/integration/test_build_core_apps.py 2014-08-03 13:10:48 +0000
+++ click/tests/integration/test_build_core_apps.py 2014-09-09 18:07:23 +0000
@@ -20,12 +20,13 @@
20import os20import os
21import shutil21import shutil
22import subprocess22import subprocess
23import unittest23
24from six import with_metaclass
2425
25from .helpers import (26from .helpers import (
26 chdir,27 chdir,
27 has_network,28 require_network,
28 is_root,29 require_root,
29 ClickTestCase,30 ClickTestCase,
30)31)
3132
@@ -63,9 +64,13 @@
63 return type.__new__(cls, name, bases, dct)64 return type.__new__(cls, name, bases, dct)
6465
6566
66@unittest.skipIf(not is_root(), "This tests needs to run as root")67class TestBuildCoreApps(with_metaclass(AddBranchTestFunctions, ClickTestCase)):
67@unittest.skipIf(not has_network(), "Need network")68
68class TestBuildCoreApps(ClickTestCase, metaclass=AddBranchTestFunctions):69 @classmethod
70 def setUpClass(cls):
71 super(TestBuildCoreApps, cls).setUpClass()
72 require_root()
73 require_network()
6974
70 def _run_in_chroot(self, cmd):75 def _run_in_chroot(self, cmd):
71 """Run the given cmd in a click chroot"""76 """Run the given cmd in a click chroot"""
7277
=== modified file 'click/tests/integration/test_chroot.py'
--- tests/integration/test_chroot.py 2014-08-03 13:10:48 +0000
+++ click/tests/integration/test_chroot.py 2014-09-09 18:07:23 +0000
@@ -16,22 +16,21 @@
16"""Integration tests for the click chroot feature."""16"""Integration tests for the click chroot feature."""
1717
18import subprocess18import subprocess
19import unittest
2019
21from .helpers import (20from .helpers import (
22 has_network,21 require_network,
23 is_root,22 require_root,
24 ClickTestCase,23 ClickTestCase,
25)24)
2625
2726
28@unittest.skipIf(not is_root(), "This tests needs to run as root")
29@unittest.skipIf(not has_network(), "Need network")
30class TestChroot(ClickTestCase):27class TestChroot(ClickTestCase):
3128
32 @classmethod29 @classmethod
33 def setUpClass(cls):30 def setUpClass(cls):
34 super(TestChroot, cls).setUpClass()31 super(TestChroot, cls).setUpClass()
32 require_root()
33 require_network()
35 cls.arch = subprocess.check_output(34 cls.arch = subprocess.check_output(
36 ["dpkg", "--print-architecture"], universal_newlines=True).strip()35 ["dpkg", "--print-architecture"], universal_newlines=True).strip()
37 subprocess.check_call([36 subprocess.check_call([
@@ -67,3 +66,13 @@
67 self.click_binary, "chroot", "-a", self.arch,66 self.click_binary, "chroot", "-a", self.arch,
68 "maint", "id"], universal_newlines=True)67 "maint", "id"], universal_newlines=True)
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")
69
70 def test_exists_ok(self):
71 subprocess.check_call([
72 self.click_binary, "chroot", "-a", self.arch, "exists"])
73
74 def test_exists_no(self):
75 with self.assertRaises(subprocess.CalledProcessError):
76 subprocess.check_call([
77 self.click_binary,
78 "chroot", "-a", "arch-that-does-not-exist"])
7079
=== modified file 'click/tests/integration/test_contents.py'
--- tests/integration/test_contents.py 2014-06-26 12:00:09 +0000
+++ click/tests/integration/test_contents.py 2014-09-09 18:07:23 +0000
@@ -23,7 +23,7 @@
2323
24class TestContents(ClickTestCase):24class TestContents(ClickTestCase):
25 def test_contents(self):25 def test_contents(self):
26 name = "com.ubuntu.contents"26 name = "com.example.contents"
27 path_to_click = self._make_click(name)27 path_to_click = self._make_click(name)
28 output = subprocess.check_output([28 output = subprocess.check_output([
29 self.click_binary, "contents", path_to_click],29 self.click_binary, "contents", path_to_click],
3030
=== modified file 'click/tests/integration/test_frameworks.py'
--- tests/integration/test_frameworks.py 2014-06-26 12:00:09 +0000
+++ click/tests/integration/test_frameworks.py 2014-09-09 18:07:23 +0000
@@ -17,18 +17,17 @@
1717
18import os18import os
19import subprocess19import subprocess
20import unittest20
2121from .helpers import ClickTestCase
22from .helpers import (22
23 ClickTestCase,23
24)
25
26
27@unittest.skipIf(
28 (not os.path.exists("/usr/share/click/frameworks") or
29 not os.listdir("/usr/share/click/frameworks")),
30 "Please install ubuntu-sdk-libs")
31class TestFrameworks(ClickTestCase):24class TestFrameworks(ClickTestCase):
25 def setUp(self):
26 super(TestFrameworks, self).setUp()
27 if (not os.path.exists("/usr/share/click/frameworks") or
28 not os.listdir("/usr/share/click/frameworks")):
29 self.skipTest("Please install ubuntu-sdk-libs")
30
32 def test_framework_list(self):31 def test_framework_list(self):
33 output = subprocess.check_output([32 output = subprocess.check_output([
34 self.click_binary, "framework", "list"], universal_newlines=True)33 self.click_binary, "framework", "list"], universal_newlines=True)
3534
=== modified file 'click/tests/integration/test_hook.py'
--- tests/integration/test_hook.py 2014-08-22 17:01:08 +0000
+++ click/tests/integration/test_hook.py 2014-09-09 18:07:23 +0000
@@ -18,16 +18,20 @@
18import os18import os
19import subprocess19import subprocess
20from textwrap import dedent20from textwrap import dedent
21import unittest
2221
23from .helpers import (22from .helpers import (
24 is_root,
25 ClickTestCase,23 ClickTestCase,
24 require_root,
26)25)
2726
2827
29@unittest.skipIf(not is_root(), "This tests needs to run as root")
30class TestHook(ClickTestCase):28class TestHook(ClickTestCase):
29
30 @classmethod
31 def setUpClass(cls):
32 super(TestHook, cls).setUpClass()
33 require_root()
34
31 def _make_hook(self, name):35 def _make_hook(self, name):
32 hook_fname = "/usr/share/click/hooks/%s.hook" % name36 hook_fname = "/usr/share/click/hooks/%s.hook" % name
33 canary_fname = os.path.join(self.temp_dir, "canary.sh")37 canary_fname = os.path.join(self.temp_dir, "canary.sh")
@@ -63,14 +67,7 @@
63 click_pkg = self._make_click(67 click_pkg = self._make_click(
64 click_pkg_name, framework="", hooks=hooks)68 click_pkg_name, framework="", hooks=hooks)
65 user = os.environ.get("USER", "root")69 user = os.environ.get("USER", "root")
66 subprocess.check_call(70 self.click_install(click_pkg, click_pkg_name, user)
67 [self.click_binary, "install", "--allow-unauthenticated",
68 "--user=%s" % user, click_pkg],
69 universal_newlines=True)
70 self.addCleanup(
71 subprocess.check_call,
72 [self.click_binary, "unregister", "--user=%s" % user,
73 click_pkg_name])
74 # ensure we have the hook71 # ensure we have the hook
75 generated_hook_file = os.path.expanduser(72 generated_hook_file = os.path.expanduser(
76 "~/com.example.hook-1_app1_1.0.test-hook")73 "~/com.example.hook-1_app1_1.0.test-hook")
7774
=== modified file 'click/tests/integration/test_info.py'
--- tests/integration/test_info.py 2014-08-22 17:01:08 +0000
+++ click/tests/integration/test_info.py 2014-09-09 18:07:23 +0000
@@ -16,19 +16,30 @@
16"""Integration tests for the click CLI info command."""16"""Integration tests for the click CLI info command."""
1717
18import json18import json
19import os
19import subprocess20import subprocess
2021
21from .helpers import ClickTestCase22from .helpers import ClickTestCase
2223
2324
24class TestInfo(ClickTestCase):25class TestInfo(ClickTestCase):
25 def test_info(self):26 def test_info_from_path(self):
26 name = "com.ubuntu.foo"27 name = "com.example.foo"
27 path_to_click = self._make_click(name)28 path_to_click = self._make_click(name)
28 output = subprocess.check_output([29 output = subprocess.check_output([
29 self.click_binary, "info", path_to_click], universal_newlines=True)30 self.click_binary, "info", path_to_click], universal_newlines=True)
30 self.assertEqual(name, json.loads(output)["name"])31 self.assertEqual(name, json.loads(output)["name"])
3132
33
34 def test_info_installed_click(self):
35 name = "com.example.foo"
36 user = os.environ.get("USER", "root")
37 path_to_click = self._make_click(name, framework="")
38 self.click_install(path_to_click, name, user)
39 output = subprocess.check_output([
40 self.click_binary, "info", name], universal_newlines=True)
41 self.assertEqual(json.loads(output)["name"], name)
42
32 def test_info_file_in_package(self):43 def test_info_file_in_package(self):
33 name = "org.example.info"44 name = "org.example.info"
34 version = "1.0"45 version = "1.0"
3546
=== modified file 'click/tests/integration/test_install.py'
--- tests/integration/test_install.py 2014-08-22 17:01:08 +0000
+++ click/tests/integration/test_install.py 2014-09-09 18:07:23 +0000
@@ -15,11 +15,12 @@
1515
16"""Integration tests for the click install feature."""16"""Integration tests for the click install feature."""
1717
18import os
19import subprocess18import subprocess
20import unittest
2119
22from .helpers import ClickTestCase20from .helpers import (
21 require_root,
22 ClickTestCase,
23)
2324
2425
25def add_user(name):26def add_user(name):
@@ -31,13 +32,12 @@
31 subprocess.check_call(["userdel", "-r", name])32 subprocess.check_call(["userdel", "-r", name])
3233
3334
34@unittest.skipIf(
35 os.getuid() != 0, "This tests needs to run as root")
36class TestClickInstall(ClickTestCase):35class TestClickInstall(ClickTestCase):
3736
38 @classmethod37 @classmethod
39 def setUpClass(cls):38 def setUpClass(cls):
40 super(TestClickInstall, cls).setUpClass()39 super(TestClickInstall, cls).setUpClass()
40 require_root()
41 cls.USER_1 = add_user("click-test-user-1")41 cls.USER_1 = add_user("click-test-user-1")
42 cls.USER_2 = add_user("click-test-user-2")42 cls.USER_2 = add_user("click-test-user-2")
4343
@@ -47,27 +47,16 @@
47 del_user(cls.USER_1)47 del_user(cls.USER_1)
48 del_user(cls.USER_2)48 del_user(cls.USER_2)
4949
50 def click_unregister(self, username, click_name):
51 if username == "@all":
52 user = "--all-users"
53 else:
54 user = "--user=%s" % username
55 subprocess.check_call(
56 [self.click_binary, "unregister", user, click_name])
57
58 def test_install_for_single_user(self):50 def test_install_for_single_user(self):
59 click_pkg = self._make_click(name="foo-1", framework="")51 name = "foo-1"
52 click_pkg = self._make_click(name=name, framework="")
60 # install it53 # install it
61 subprocess.check_call([54 self.click_install(click_pkg, name, self.USER_1)
62 self.click_binary, "install", "--user=%s" % self.USER_1,
63 "--allow-unauthenticated",
64 click_pkg], universal_newlines=True)
65 self.addCleanup(self.click_unregister, self.USER_1, "foo-1")
66 # ensure that user-1 has it55 # ensure that user-1 has it
67 output = subprocess.check_output([56 output = subprocess.check_output([
68 "sudo", "-u", self.USER_1,57 "sudo", "-u", self.USER_1,
69 self.click_binary, "list"], universal_newlines=True)58 self.click_binary, "list"], universal_newlines=True)
70 self.assertEqual(output, "foo-1\t1.0\n")59 self.assertEqual(output, "%s\t1.0\n" % name)
71 # but not user-260 # but not user-2
72 output = subprocess.check_output([61 output = subprocess.check_output([
73 "sudo", "-u", self.USER_2,62 "sudo", "-u", self.USER_2,
@@ -77,40 +66,53 @@
77 output = subprocess.check_output(66 output = subprocess.check_output(
78 [self.click_binary, "list", "--user=%s" % self.USER_1],67 [self.click_binary, "list", "--user=%s" % self.USER_1],
79 universal_newlines=True)68 universal_newlines=True)
80 self.assertEqual(output, "foo-1\t1.0\n")69 self.assertEqual(output, "%s\t1.0\n" % name)
70
71 def test_install_for_single_user_and_register(self):
72 name = "foo-1"
73 click_pkg = self._make_click(name=name, framework="")
74 self.click_install(click_pkg, name, self.USER_1)
75 # not available for user2
76 output = subprocess.check_output([
77 "sudo", "-u", self.USER_2,
78 self.click_binary, "list"], universal_newlines=True)
79 self.assertEqual(output, "")
80 # register it
81 subprocess.check_call(
82 [self.click_binary, "register", "--user=%s" % self.USER_2,
83 name, "1.0", ])
84 self.addCleanup(self.click_unregister, name, self.USER_2)
85 # and ensure its available for user2
86 output = subprocess.check_output([
87 "sudo", "-u", self.USER_2,
88 self.click_binary, "list"], universal_newlines=True)
89 self.assertEqual(output, "%s\t1.0\n" % name)
8190
82 def test_install_for_all_users(self):91 def test_install_for_all_users(self):
83 click_pkg = self._make_click(name="foo-2", framework="")92 name = "foo-2"
84 # install it93 click_pkg = self._make_click(name=name, framework="")
85 subprocess.check_call(94 self.click_install(click_pkg, name, "@all")
86 [self.click_binary, "install", "--all-users",
87 "--allow-unauthenticated", click_pkg],
88 universal_newlines=True)
89 self.addCleanup(self.click_unregister, "@all", "foo-2")
90 # ensure all users see it95 # ensure all users see it
91 for user in (self.USER_1, self.USER_2):96 for user in (self.USER_1, self.USER_2):
92 output = subprocess.check_output(97 output = subprocess.check_output(
93 ["sudo", "-u", user, self.click_binary, "list"],98 ["sudo", "-u", user, self.click_binary, "list"],
94 universal_newlines=True)99 universal_newlines=True)
95 self.assertEqual(output, "foo-2\t1.0\n")100 self.assertEqual(output, "%s\t1.0\n" % name)
96101
97 def test_pkgdir_after_install(self):102 def test_pkgdir_after_install(self):
98 click_pkg = self._make_click(name="foo-2", version="1.2", framework="")103 name = "foo-3"
99 subprocess.check_call(104 click_pkg = self._make_click(name=name, version="1.2", framework="")
100 [self.click_binary, "install", "--all-users",105 self.click_install(click_pkg, name, "@all")
101 "--allow-unauthenticated", click_pkg],
102 universal_newlines=True)
103 self.addCleanup(self.click_unregister, "@all", "foo-2")
104 # from the path106 # from the path
105 output = subprocess.check_output(107 output = subprocess.check_output(
106 [self.click_binary, "pkgdir",108 [self.click_binary, "pkgdir",
107 "/opt/click.ubuntu.com/foo-2/1.2/README"],109 "/opt/click.ubuntu.com/%s/1.2/README" % name],
108 universal_newlines=True).strip()110 universal_newlines=True).strip()
109 self.assertEqual(output, "/opt/click.ubuntu.com/foo-2/1.2")111 self.assertEqual(output, "/opt/click.ubuntu.com/%s/1.2" % name)
110 # now test from the click package name112 # now test from the click package name
111 output = subprocess.check_output(113 output = subprocess.check_output(
112 [self.click_binary, "pkgdir", "foo-2"],114 [self.click_binary, "pkgdir", name],
113 universal_newlines=True).strip()115 universal_newlines=True).strip()
114 # note that this is different from above116 # note that this is different from above
115 self.assertEqual(117 self.assertEqual(
116 output, "/opt/click.ubuntu.com/.click/users/@all/foo-2")118 output, "/opt/click.ubuntu.com/.click/users/@all/%s" % name)
117119
=== added file 'click/tests/integration/test_list.py'
--- click/tests/integration/test_list.py 1970-01-01 00:00:00 +0000
+++ click/tests/integration/test_list.py 2014-09-09 18:07:23 +0000
@@ -0,0 +1,33 @@
1# Copyright (C) 2014 Canonical Ltd.
2# Author: Michael Vogt <michael.vogt@ubuntu.com>
3
4# This program is free software: you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; version 3 of the License.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16"""Integration tests for the click CLI list command."""
17
18import os
19import subprocess
20
21from .helpers import ClickTestCase
22
23
24class TestList(ClickTestCase):
25 def test_list_simple(self):
26 name = "com.ubuntu.verify-ok"
27 path_to_click = self._make_click(name, framework="")
28 user = os.environ.get("USER", "root")
29 self.click_install(path_to_click, name, user)
30 output = subprocess.check_output(
31 [self.click_binary, "list", "--user=%s" % user],
32 universal_newlines=True)
33 self.assertIn(name, output)
034
=== modified file 'click/tests/integration/test_signatures.py'
--- tests/integration/test_signatures.py 2014-08-22 17:01:08 +0000
+++ click/tests/integration/test_signatures.py 2014-09-09 18:07:23 +0000
@@ -20,20 +20,21 @@
20import shutil20import shutil
21import subprocess21import subprocess
22import tarfile22import tarfile
23import unittest
24from textwrap import dedent23from textwrap import dedent
2524
26from .helpers import (25from .helpers import (
27 is_root,26 require_root,
28 ClickTestCase,27 ClickTestCase,
29)28)
3029
30
31def makedirs(path):31def makedirs(path):
32 try:32 try:
33 os.makedirs(path)33 os.makedirs(path)
34 except OSError:34 except OSError:
35 pass35 pass
3636
37
37def get_keyid_from_gpghome(gpg_home):38def get_keyid_from_gpghome(gpg_home):
38 """Return the public keyid of a given gpg home dir"""39 """Return the public keyid of a given gpg home dir"""
39 output = subprocess.check_output(40 output = subprocess.check_output(
@@ -56,7 +57,7 @@
56 def sign(self, filepath, signature_type="origin"):57 def sign(self, filepath, signature_type="origin"):
57 """Sign the click at filepath"""58 """Sign the click at filepath"""
58 env = copy.copy(os.environ)59 env = copy.copy(os.environ)
59 env["GNUPGHOME"] = os.path.abspath(self.gpghome) 60 env["GNUPGHOME"] = os.path.abspath(self.gpghome)
60 subprocess.check_call(61 subprocess.check_call(
61 ["debsigs",62 ["debsigs",
62 "--sign=%s" % signature_type,63 "--sign=%s" % signature_type,
@@ -74,7 +75,7 @@
74 <Selection>75 <Selection>
75 <Required Type="origin" File="{filename}" id="{keyid}"/>76 <Required Type="origin" File="{filename}" id="{keyid}"/>
76 </Selection>77 </Selection>
77 78
78 <Verification>79 <Verification>
79 <Required Type="origin" File="{filename}" id="{keyid}"/>80 <Required Type="origin" File="{filename}" id="{keyid}"/>
80 </Verification>81 </Verification>
@@ -86,7 +87,8 @@
86 self.pubkey_path = (87 self.pubkey_path = (
87 "/usr/share/debsig/keyrings/%s/origin.pub" % self.keyid)88 "/usr/share/debsig/keyrings/%s/origin.pub" % self.keyid)
88 makedirs(os.path.dirname(self.pubkey_path))89 makedirs(os.path.dirname(self.pubkey_path))
89 shutil.copy(os.path.join(self.gpghome, "pubring.gpg"), self.pubkey_path)90 shutil.copy(
91 os.path.join(self.gpghome, "pubring.gpg"), self.pubkey_path)
9092
91 def uninstall_signature_policy(self):93 def uninstall_signature_policy(self):
92 # FIXME: update debsig-verify so that it can work from a different94 # FIXME: update debsig-verify so that it can work from a different
@@ -96,8 +98,13 @@
96 os.remove(self.pubkey_path)98 os.remove(self.pubkey_path)
9799
98100
99@unittest.skipIf(not is_root(), "This tests needs to run as root")
100class ClickSignaturesTestCase(ClickTestCase):101class ClickSignaturesTestCase(ClickTestCase):
102
103 @classmethod
104 def setUpClass(cls):
105 super(ClickSignaturesTestCase, cls).setUpClass()
106 require_root()
107
101 def assertClickNoSignatureError(self, cmd_args):108 def assertClickNoSignatureError(self, cmd_args):
102 with self.assertRaises(subprocess.CalledProcessError) as cm:109 with self.assertRaises(subprocess.CalledProcessError) as cm:
103 output = subprocess.check_output(110 output = subprocess.check_output(
@@ -120,8 +127,13 @@
120 self.assertIn(expected_error_message, output)127 self.assertIn(expected_error_message, output)
121128
122129
123@unittest.skipIf(not is_root(), "This tests needs to run as root")
124class TestSignatureVerificationNoSignature(ClickSignaturesTestCase):130class TestSignatureVerificationNoSignature(ClickSignaturesTestCase):
131
132 @classmethod
133 def setUpClass(cls):
134 super(TestSignatureVerificationNoSignature, cls).setUpClass()
135 require_root()
136
125 def test_debsig_verify_no_sig(self):137 def test_debsig_verify_no_sig(self):
126 name = "org.example.debsig-no-sig"138 name = "org.example.debsig-no-sig"
127 path_to_click = self._make_click(name, framework="")139 path_to_click = self._make_click(name, framework="")
@@ -145,8 +157,13 @@
145 "--user=%s" % user, name])157 "--user=%s" % user, name])
146158
147159
148@unittest.skipIf(not is_root(), "This tests needs to run as root")
149class TestSignatureVerification(ClickSignaturesTestCase):160class TestSignatureVerification(ClickSignaturesTestCase):
161
162 @classmethod
163 def setUpClass(cls):
164 super(TestSignatureVerification, cls).setUpClass()
165 require_root()
166
150 def setUp(self):167 def setUp(self):
151 super(TestSignatureVerification, self).setUp()168 super(TestSignatureVerification, self).setUp()
152 self.user = os.environ.get("USER", "root")169 self.user = os.environ.get("USER", "root")
@@ -176,7 +193,7 @@
176 [self.click_binary, "list", "--user=%s" % self.user],193 [self.click_binary, "list", "--user=%s" % self.user],
177 universal_newlines=True)194 universal_newlines=True)
178 self.assertIn(name, output)195 self.assertIn(name, output)
179 196
180 def test_debsig_install_signature_not_in_keyring(self):197 def test_debsig_install_signature_not_in_keyring(self):
181 name = "org.example.debsig-no-keyring-sig"198 name = "org.example.debsig-no-keyring-sig"
182 path_to_click = self._make_click(name, framework="")199 path_to_click = self._make_click(name, framework="")
@@ -245,7 +262,7 @@
245 # NOTE: that right now this will not be caught by debsig-verify262 # NOTE: that right now this will not be caught by debsig-verify
246 # but later in audit() by debian.debfile.DebFile()263 # but later in audit() by debian.debfile.DebFile()
247 subprocess.check_call(["ar",264 subprocess.check_call(["ar",
248 "-r", 265 "-r",
249 "-b", "data.tar.gz",266 "-b", "data.tar.gz",
250 path_to_click,267 path_to_click,
251 new_data])268 new_data])
@@ -274,12 +291,12 @@
274 new_data = self.make_nasty_data_tar("bz2")291 new_data = self.make_nasty_data_tar("bz2")
275 # replace data.tar.gz with data.tar.bz2 and ensure this is caught292 # replace data.tar.gz with data.tar.bz2 and ensure this is caught
276 subprocess.check_call(["ar",293 subprocess.check_call(["ar",
277 "-d", 294 "-d",
278 path_to_click,295 path_to_click,
279 "data.tar.gz",296 "data.tar.gz",
280 ])297 ])
281 subprocess.check_call(["ar",298 subprocess.check_call(["ar",
282 "-r", 299 "-r",
283 path_to_click,300 path_to_click,
284 new_data])301 new_data])
285 output = subprocess.check_output(302 output = subprocess.check_output(
@@ -290,7 +307,7 @@
290 "control.tar.gz",307 "control.tar.gz",
291 "_gpgorigin",308 "_gpgorigin",
292 "data.tar.bz2",309 "data.tar.bz2",
293 ])310 ])
294 with self.assertRaises(subprocess.CalledProcessError) as cm:311 with self.assertRaises(subprocess.CalledProcessError) as cm:
295 output = subprocess.check_output(312 output = subprocess.check_output(
296 [self.click_binary, "install", path_to_click],313 [self.click_binary, "install", path_to_click],
@@ -305,7 +322,7 @@
305 # this test is probably not really needed, it tries to trick322 # this test is probably not really needed, it tries to trick
306 # the system by prepending a valid signature that is not323 # the system by prepending a valid signature that is not
307 # in the keyring. But given that debsig-verify only reads324 # in the keyring. But given that debsig-verify only reads
308 # the first packet of any given _gpg$foo signature its 325 # the first packet of any given _gpg$foo signature it's
309 # equivalent to test_debsig_install_signature_not_in_keyring test326 # equivalent to test_debsig_install_signature_not_in_keyring test
310 name = "org.example.debsig-replaced-data-prepend-sig-click"327 name = "org.example.debsig-replaced-data-prepend-sig-click"
311 path_to_click = self._make_click(name, framework="")328 path_to_click = self._make_click(name, framework="")
@@ -313,7 +330,7 @@
313 new_data = self.make_nasty_data_tar("gz")330 new_data = self.make_nasty_data_tar("gz")
314 # replace data.tar.gz331 # replace data.tar.gz
315 subprocess.check_call(["ar",332 subprocess.check_call(["ar",
316 "-r", 333 "-r",
317 path_to_click,334 path_to_click,
318 new_data,335 new_data,
319 ])336 ])
@@ -345,4 +362,3 @@
345 [self.click_binary, "list", "--user=%s" % self.user],362 [self.click_binary, "list", "--user=%s" % self.user],
346 universal_newlines=True)363 universal_newlines=True)
347 self.assertNotIn(name, output)364 self.assertNotIn(name, output)
348
349365
=== modified file 'click/tests/integration/test_verify.py'
--- tests/integration/test_verify.py 2014-08-07 21:51:27 +0000
+++ click/tests/integration/test_verify.py 2014-09-09 18:07:23 +0000
@@ -15,14 +15,15 @@
1515
16"""Integration tests for the click CLI verify command."""16"""Integration tests for the click CLI verify command."""
1717
18import os
18import subprocess19import subprocess
1920
20from .helpers import ClickTestCase21from .helpers import ClickTestCase
2122
2223
23class TestVerify(ClickTestCase):24class TestVerify(ClickTestCase):
24 def test_verify_ok(self):25 def test_verify_force_missing_framework_ok(self):
25 name = "com.example.verify-ok"26 name = "com.example.verify-missing-framework"
26 path_to_click = self._make_click(name)27 path_to_click = self._make_click(name)
27 output = subprocess.check_output([28 output = subprocess.check_output([
28 self.click_binary, "verify",29 self.click_binary, "verify",
@@ -30,3 +31,42 @@
30 "--allow-unauthenticated",31 "--allow-unauthenticated",
31 path_to_click], universal_newlines=True)32 path_to_click], universal_newlines=True)
32 self.assertEqual(output, "")33 self.assertEqual(output, "")
34
35 def test_verify_force_ok(self):
36 name = "com.example.verify-ok"
37 path_to_click = self._make_click(name, framework="")
38 output = subprocess.check_output([
39 self.click_binary, "verify", "--allow-unauthenticated",
40 path_to_click], universal_newlines=True)
41 self.assertEqual(output, "")
42
43 def test_verify_missing_framework(self):
44 name = "com.example.verify-really-missing-framework"
45 path_to_click = self._make_click(name, framework="missing")
46 with self.assertRaises(subprocess.CalledProcessError) as cm:
47 subprocess.check_output(
48 [self.click_binary, "verify",
49 "--allow-unauthenticated",
50 path_to_click],
51 universal_newlines=True, stderr=subprocess.STDOUT)
52 expected_error = (
53 'click.framework.ClickFrameworkInvalid: Framework '
54 '"missing" not present on system (use '
55 '--force-missing-framework option to override)')
56 self.assertIn(expected_error, cm.exception.output)
57
58 def test_verify_no_click_but_invalid(self):
59 name = "com.example.verify-no-click"
60 path_to_click = os.path.join(self.temp_dir, name+".click")
61 with open(path_to_click, "w") as f:
62 f.write("something-that-is-not-a-click")
63 with self.assertRaises(subprocess.CalledProcessError) as cm:
64 subprocess.check_output(
65 [self.click_binary, "verify", "--allow-unauthenticated",
66 path_to_click],
67 universal_newlines=True, stderr=subprocess.STDOUT)
68 expected_error = (
69 'click.install.DebsigVerifyError: Signature verification error: '
70 'debsig: %s does not appear to be a deb format package'
71 ) % path_to_click
72 self.assertIn(expected_error, cm.exception.output)
3373
=== modified file 'click/tests/test_build.py'
--- click/tests/test_build.py 2014-05-13 18:56:57 +0000
+++ click/tests/test_build.py 2014-09-09 18:07:23 +0000
@@ -63,14 +63,14 @@
63 with mkfile(manifest_path) as manifest:63 with mkfile(manifest_path) as manifest:
64 print(dedent("""\64 print(dedent("""\
65 {65 {
66 "name": "com.ubuntu.test",66 "name": "com.example.test",
67 "version": "1.0",67 "version": "1.0",
68 "maintainer": "Foo Bar <foo@example.org>",68 "maintainer": "Foo Bar <foo@example.org>",
69 "title": "test title",69 "title": "test title",
70 "framework": "ubuntu-sdk-13.10"70 "framework": "ubuntu-sdk-13.10"
71 }"""), file=manifest)71 }"""), file=manifest)
72 self.builder.read_manifest(manifest_path)72 self.builder.read_manifest(manifest_path)
73 self.assertEqual("com.ubuntu.test", self.builder.name)73 self.assertEqual("com.example.test", self.builder.name)
74 self.assertEqual("1.0", self.builder.version)74 self.assertEqual("1.0", self.builder.version)
75 self.assertEqual("Foo Bar <foo@example.org>", self.builder.maintainer)75 self.assertEqual("Foo Bar <foo@example.org>", self.builder.maintainer)
76 self.assertEqual("test title", self.builder.title)76 self.assertEqual("test title", self.builder.title)
@@ -90,7 +90,7 @@
90 with mkfile(manifest_path) as manifest:90 with mkfile(manifest_path) as manifest:
91 print(dedent("""\91 print(dedent("""\
92 {92 {
93 "name": "com.ubuntu.test",93 "name": "com.example.test",
94 "version": "%s",94 "version": "%s",
95 "maintainer": "Foo Bar <foo@example.org>",95 "maintainer": "Foo Bar <foo@example.org>",
96 "title": "test title",96 "title": "test title",
@@ -106,7 +106,7 @@
106 # The comma after the "name" entry is intentionally missing.106 # The comma after the "name" entry is intentionally missing.
107 print(dedent("""\107 print(dedent("""\
108 {108 {
109 "name": "com.ubuntu.test"109 "name": "com.example.test"
110 "version": "1.0"110 "version": "1.0"
111 }"""), file=manifest)111 }"""), file=manifest)
112 self.assertRaises(112 self.assertRaises(
@@ -136,7 +136,7 @@
136 f.write("test /toplevel\n")136 f.write("test /toplevel\n")
137 with mkfile(os.path.join(scratch, "manifest.json")) as f:137 with mkfile(os.path.join(scratch, "manifest.json")) as f:
138 json.dump({138 json.dump({
139 "name": "com.ubuntu.test",139 "name": "com.example.test",
140 "version": "1.0",140 "version": "1.0",
141 "maintainer": "Foo Bar <foo@example.org>",141 "maintainer": "Foo Bar <foo@example.org>",
142 "title": "test title",142 "title": "test title",
@@ -146,11 +146,11 @@
146 # build() overrides this back to 0o644146 # build() overrides this back to 0o644
147 os.fchmod(f.fileno(), 0o600)147 os.fchmod(f.fileno(), 0o600)
148 self.builder.add_file(scratch, "/")148 self.builder.add_file(scratch, "/")
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")
150 self.assertEqual(path, self.builder.build(self.temp_dir))150 self.assertEqual(path, self.builder.build(self.temp_dir))
151 self.assertTrue(os.path.exists(path))151 self.assertTrue(os.path.exists(path))
152 for key, value in (152 for key, value in (
153 ("Package", "com.ubuntu.test"),153 ("Package", "com.example.test"),
154 ("Version", "1.0"),154 ("Version", "1.0"),
155 ("Click-Version", "0.4"),155 ("Click-Version", "0.4"),
156 ("Architecture", "all"),156 ("Architecture", "all"),
@@ -212,7 +212,7 @@
212 touch(os.path.join(scratch, ".click", "evil-file"))212 touch(os.path.join(scratch, ".click", "evil-file"))
213 with mkfile(os.path.join(scratch, "manifest.json")) as f:213 with mkfile(os.path.join(scratch, "manifest.json")) as f:
214 json.dump({214 json.dump({
215 "name": "com.ubuntu.test",215 "name": "com.example.test",
216 "version": "1.0",216 "version": "1.0",
217 "maintainer": "Foo Bar <foo@example.org>",217 "maintainer": "Foo Bar <foo@example.org>",
218 "title": "test title",218 "title": "test title",
@@ -231,7 +231,7 @@
231 scratch = os.path.join(self.temp_dir, "scratch")231 scratch = os.path.join(self.temp_dir, "scratch")
232 with mkfile(os.path.join(scratch, "manifest.json")) as f:232 with mkfile(os.path.join(scratch, "manifest.json")) as f:
233 json.dump({233 json.dump({
234 "name": "com.ubuntu.test",234 "name": "com.example.test",
235 "version": "1.0",235 "version": "1.0",
236 "maintainer": "Foo Bar <foo@example.org>",236 "maintainer": "Foo Bar <foo@example.org>",
237 "title": "test title",237 "title": "test title",
@@ -239,7 +239,7 @@
239 "framework": "ubuntu-sdk-13.10",239 "framework": "ubuntu-sdk-13.10",
240 }, f)240 }, f)
241 self.builder.add_file(scratch, "/")241 self.builder.add_file(scratch, "/")
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")
243 self.assertEqual(path, self.builder.build(self.temp_dir))243 self.assertEqual(path, self.builder.build(self.temp_dir))
244 self.assertTrue(os.path.exists(path))244 self.assertTrue(os.path.exists(path))
245 self.assertEqual("multi", self.extract_field(path, "Architecture"))245 self.assertEqual("multi", self.extract_field(path, "Architecture"))
@@ -260,7 +260,7 @@
260 scratch = os.path.join(self.temp_dir, "scratch")260 scratch = os.path.join(self.temp_dir, "scratch")
261 with mkfile(os.path.join(scratch, "manifest.json")) as f:261 with mkfile(os.path.join(scratch, "manifest.json")) as f:
262 json.dump({262 json.dump({
263 "name": "com.ubuntu.test",263 "name": "com.example.test",
264 "version": "1.0",264 "version": "1.0",
265 "maintainer": "Foo Bar <foo@example.org>",265 "maintainer": "Foo Bar <foo@example.org>",
266 "title": "test title",266 "title": "test title",
@@ -322,7 +322,7 @@
322 touch(os.path.join(scratch, ".git", "config"))322 touch(os.path.join(scratch, ".git", "config"))
323 with mkfile(os.path.join(scratch, "manifest.json")) as f:323 with mkfile(os.path.join(scratch, "manifest.json")) as f:
324 json.dump({324 json.dump({
325 "name": "com.ubuntu.test",325 "name": "com.example.test",
326 "version": "1.0",326 "version": "1.0",
327 "maintainer": "Foo Bar <foo@example.org>",327 "maintainer": "Foo Bar <foo@example.org>",
328 "title": "test title",328 "title": "test title",
@@ -332,7 +332,7 @@
332 # build() overrides this back to 0o644332 # build() overrides this back to 0o644
333 os.fchmod(f.fileno(), 0o600)333 os.fchmod(f.fileno(), 0o600)
334 self.builder.add_file(scratch, "./")334 self.builder.add_file(scratch, "./")
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")
336 self.assertEqual(path, self.builder.build(self.temp_dir))336 self.assertEqual(path, self.builder.build(self.temp_dir))
337 self.assertTrue(os.path.exists(path))337 self.assertTrue(os.path.exists(path))
338 with tarfile.open(path, mode="r:gz") as tar:338 with tarfile.open(path, mode="r:gz") as tar:
339339
=== modified file 'debian/changelog'
--- debian/changelog 2014-08-22 17:19:06 +0000
+++ debian/changelog 2014-09-09 18:07:23 +0000
@@ -1,3 +1,46 @@
1click (0.4.32.1) UNRELEASED; urgency=low
2
3 * fix autopkgtest failure found in 0.4.32
4
5 -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 09 Sep 2014 09:56:57 +0200
6
7click (0.4.32) utopic; urgency=medium
8
9 [ Daniel Holbach ]
10 * Run click-review after a successful build of a click package. Offer
11 --no-validate as an option.
12
13 [ Colin Watson ]
14 * Move integration tests to a location where they won't end up being
15 installed into inappropriate places on the system module path
16 (LP: #1337696).
17 * Use six.with_metaclass for TestBuildCoreApps, so that it doesn't make
18 pyflakes angry when running tests under Python 2.
19
20 [ Michael Vogt ]
21 * Add more integration tests for "click {list,register,verify,info}".
22 * Only install trusted click packages by default. To override you
23 can run "pkcon --allow-untrusted" (LP: #1360582)
24
25 -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Mon, 08 Sep 2014 09:50:43 +0000
26
27click (0.4.31.3) utopic; urgency=medium
28
29 * Reinstate most of 0.4.31.2; instead, just always pass
30 --allow-unauthenticated to "click install" from the PackageKit plugin
31 for now, until we can sort out sideloading (see LP #1360582).
32
33 -- Colin Watson <cjwatson@ubuntu.com> Mon, 25 Aug 2014 12:25:21 -0700
34
35click (0.4.31.2.is.0.4.30) utopic; urgency=medium
36
37 * Temporary everting to previous version as the current one makes installing
38 click packages locally through pkcon install-local impossible, which is
39 breaking some other projects relying on this functionality. Needs to be
40 revisited.
41
42 -- Ɓukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> Mon, 25 Aug 2014 17:34:07 +0200
43
1click (0.4.31.2) utopic; urgency=medium44click (0.4.31.2) utopic; urgency=medium
245
3 [ Michael Vogt ]46 [ Michael Vogt ]
447
=== modified file 'debian/control'
--- debian/control 2014-06-10 17:18:00 +0000
+++ debian/control 2014-09-09 18:07:23 +0000
@@ -3,7 +3,7 @@
3Priority: optional3Priority: optional
4Maintainer: Colin Watson <cjwatson@ubuntu.com>4Maintainer: Colin Watson <cjwatson@ubuntu.com>
5Standards-Version: 3.9.55Standards-Version: 3.9.5
6Build-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-coverage6Build-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
7Vcs-Bzr: https://code.launchpad.net/~ubuntu-managed-branches/click/click7Vcs-Bzr: https://code.launchpad.net/~ubuntu-managed-branches/click/click
8Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-managed-branches/click/click/files8Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-managed-branches/click/click/files
9X-Auto-Uploader: no-rewrite-version9X-Auto-Uploader: no-rewrite-version
@@ -16,6 +16,7 @@
16Pre-Depends: ${misc:Pre-Depends}16Pre-Depends: ${misc:Pre-Depends}
17Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, python3-click (= ${binary:Version}), adduser17Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, python3-click (= ${binary:Version}), adduser
18Recommends: click-apparmor, ubuntu-app-launch-tools | upstart-app-launch-tools18Recommends: click-apparmor, ubuntu-app-launch-tools | upstart-app-launch-tools
19Suggests: click-reviewers-tools (>= 0.9)
19Conflicts: click-package20Conflicts: click-package
20Replaces: click-package21Replaces: click-package
21Provides: click-package22Provides: click-package
2223
=== modified file 'debian/tests/control'
--- debian/tests/control 2014-07-14 09:10:39 +0000
+++ debian/tests/control 2014-09-09 18:07:23 +0000
@@ -1,3 +1,3 @@
1Tests: run-tests.sh1Tests: run-tests.sh
2Depends: @, iputils-ping, click-dev, schroot, debootstrap, sudo, bzr, debsigs, debsig-verify2Depends: @, @builddeps@, iputils-ping, click-dev, schroot, debootstrap, sudo, bzr, debsigs, debsig-verify, python3-six
3Restrictions: needs-root allow-stderr3Restrictions: needs-root allow-stderr
44
=== modified file 'debian/tests/run-tests.sh'
--- debian/tests/run-tests.sh 2014-06-11 12:40:44 +0000
+++ debian/tests/run-tests.sh 2014-09-09 18:07:23 +0000
@@ -2,4 +2,11 @@
22
3set -e3set -e
44
5python3 -m unittest discover tests.integration5# some files like config.py are generated from config.py.in
6./autogen.sh
7./configure --prefix=/usr \
8 --sysconfdir=/etc \
9 --with-systemdsystemunitdir=/lib/systemd/system \
10 --with-systemduserunitdir=/usr/lib/systemd/user
11
12TEST_INTEGRATION=1 python3 -m unittest discover -vv click.tests.integration
613
=== modified file 'doc/manpage.rst'
--- doc/manpage.rst 2014-05-20 09:04:03 +0000
+++ doc/manpage.rst 2014-09-09 18:07:23 +0000
@@ -73,6 +73,8 @@
7373
74-m PATH, --manifest=PATH Read package manifest from PATH74-m PATH, --manifest=PATH Read package manifest from PATH
75 (default: ``manifest.json``).75 (default: ``manifest.json``).
76--no-validate Don't run checks from click-reviewers-tools on
77 the resulting .click file.
7678
77click buildsource DIRECTORY79click buildsource DIRECTORY
78---------------------------80---------------------------
7981
=== modified file 'pk-plugin/pk-plugin-click.c'
--- pk-plugin/pk-plugin-click.c 2014-08-19 07:06:25 +0000
+++ pk-plugin/pk-plugin-click.c 2014-09-09 18:07:23 +0000
@@ -515,10 +515,14 @@
515 JsonObject *manifest;515 JsonObject *manifest;
516 gchar *pkid = NULL;516 gchar *pkid = NULL;
517517
518 argv = g_malloc0_n (6, sizeof (*argv));518 argv = g_malloc0_n (7, sizeof (*argv));
519 i = 0;519 i = 0;
520 argv[i++] = g_strdup ("click");520 argv[i++] = g_strdup ("click");
521 argv[i++] = g_strdup ("install");521 argv[i++] = g_strdup ("install");
522 if (!pk_bitfield_contain (pk_transaction_get_transaction_flags (transaction),
523 PK_TRANSACTION_FLAG_ENUM_ONLY_TRUSTED)) {
524 argv[i++] = g_strdup ("--allow-unauthenticated");
525 }
522 username = click_get_username_for_uid526 username = click_get_username_for_uid
523 (pk_transaction_get_uid (transaction));527 (pk_transaction_get_uid (transaction));
524 if (username)528 if (username)
525529
=== removed directory 'tests'
=== removed file 'tests/__init__.py'

Subscribers

People subscribed via source and target branches

to all changes: