Merge lp:~dholbach/ubuntu-dev-tools/permissions-reorg into lp:~ubuntu-dev/ubuntu-dev-tools/trunk
- permissions-reorg
- Merge into trunk
Proposed by
Daniel Holbach
Status: | Merged |
---|---|
Merge reported by: | Daniel Holbach |
Merged at revision: | not available |
Proposed branch: | lp:~dholbach/ubuntu-dev-tools/permissions-reorg |
Merge into: | lp:~ubuntu-dev/ubuntu-dev-tools/trunk |
Diff against target: |
294 lines (+15/-209) 6 files modified
debian/changelog (+8/-1) debian/copyright (+1/-1) doc/requestsync.1 (+4/-7) hugdaylist (+1/-2) requestsync (+1/-4) ubuntutools/ppaput.py (+0/-194) |
To merge this branch: | bzr merge lp:~dholbach/ubuntu-dev-tools/permissions-reorg |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Development Team | Pending | ||
Review via email: mp+21355@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2010-03-08 23:34:59 +0000 | |||
3 | +++ debian/changelog 2010-03-15 09:25:31 +0000 | |||
4 | @@ -6,7 +6,14 @@ | |||
5 | 6 | [ Emmet Hikory ] | 6 | [ Emmet Hikory ] |
6 | 7 | * mk-sbuild: Really don't use build-arm-chroot | 7 | * mk-sbuild: Really don't use build-arm-chroot |
7 | 8 | 8 | ||
9 | 9 | -- Emmet Hikory <persia@ubuntu.com> Tue, 09 Mar 2010 08:32:50 +0900 | 9 | [ Daniel Holbach ] |
10 | 10 | * hugdaylist, requestsync, doc/requestsync.1: | ||
11 | 11 | ubuntu-{main,universe}-sponsors → ubuntu-sponsors, | ||
12 | 12 | {ubuntu,motu}-release → ubuntu-release. | ||
13 | 13 | * ubuntutools/ppaput.py: removed, not necessary any more. | ||
14 | 14 | * debian/copyright: removed references to ppaput. | ||
15 | 15 | |||
16 | 16 | -- Daniel Holbach <daniel.holbach@ubuntu.com> Mon, 15 Mar 2010 10:21:31 +0100 | ||
17 | 10 | 17 | ||
18 | 11 | ubuntu-dev-tools (0.95) lucid; urgency=low | 18 | ubuntu-dev-tools (0.95) lucid; urgency=low |
19 | 12 | 19 | ||
20 | 13 | 20 | ||
21 | === modified file 'debian/copyright' | |||
22 | --- debian/copyright 2010-03-08 09:59:50 +0000 | |||
23 | +++ debian/copyright 2010-03-15 09:25:31 +0000 | |||
24 | @@ -71,7 +71,7 @@ | |||
25 | 71 | 71 | ||
26 | 72 | dch-repeat, get-branches, get-build-deps, grab-attachments, grab-merge, | 72 | dch-repeat, get-branches, get-build-deps, grab-attachments, grab-merge, |
27 | 73 | hugdaylist, manage-credentials, massfile, mk-sbuild, pbuilder-dist-simple, | 73 | hugdaylist, manage-credentials, massfile, mk-sbuild, pbuilder-dist-simple, |
29 | 74 | ppaput, pull-debian-debdiff, pull-debian-source, pull-lp-source, pull-revu-source, | 74 | pull-debian-debdiff, pull-debian-source, pull-lp-source, pull-revu-source, |
30 | 75 | setup-packaging-environment, suspicious-source, ubuntu-build and what-patch are | 75 | setup-packaging-environment, suspicious-source, ubuntu-build and what-patch are |
31 | 76 | licensed under the GNU General Public License, version 3: | 76 | licensed under the GNU General Public License, version 3: |
32 | 77 | 77 | ||
33 | 78 | 78 | ||
34 | === modified file 'doc/requestsync.1' | |||
35 | --- doc/requestsync.1 2009-11-02 18:20:56 +0000 | |||
36 | +++ doc/requestsync.1 2010-03-15 09:25:31 +0000 | |||
37 | @@ -23,9 +23,8 @@ | |||
38 | 23 | .PP | 23 | .PP |
39 | 24 | \fBrequestsync\fR checks if you have the permissions to request the sync from | 24 | \fBrequestsync\fR checks if you have the permissions to request the sync from |
40 | 25 | the archive administrators directly by checking if you are a member of the | 25 | the archive administrators directly by checking if you are a member of the |
44 | 26 | \fI~ubuntu\-dev\fR team (for universe/multiverse syncs) or a member of the | 26 | \fI~ubuntu\-dev\fR team on Launchpad. |
45 | 27 | \fI~ubuntu\-core\-dev\fR team (for main/restricted syncs) on Launchpad. | 27 | If you are not a member of the team, the script will subscribe |
43 | 28 | If you are not a member of the appropriate team, the script will subscribe | ||
46 | 29 | the necessary team with approval rights to the bug report for you. | 28 | the necessary team with approval rights to the bug report for you. |
47 | 30 | 29 | ||
48 | 31 | .PP | 30 | .PP |
49 | @@ -58,14 +57,12 @@ | |||
50 | 58 | .TP | 57 | .TP |
51 | 59 | .B \-s | 58 | .B \-s |
52 | 60 | Specifies that you require sponsorship. | 59 | Specifies that you require sponsorship. |
55 | 61 | You need this option if you are not a member of ubuntu-dev for universe or | 60 | You need this option if you are not a member of ubuntu-dev. This shall disable the |
54 | 62 | multiverse, or ubuntu-core-dev for main or restricted. This shall disable the | ||
56 | 63 | Launchpad team membership checking described above. | 61 | Launchpad team membership checking described above. |
57 | 64 | .TP | 62 | .TP |
58 | 65 | .B \-e | 63 | .B \-e |
59 | 66 | Use this flag after FeatureFreeze for non-bug fix syncs. \fBrequestsync\fR will | 64 | Use this flag after FeatureFreeze for non-bug fix syncs. \fBrequestsync\fR will |
62 | 67 | subscribe ubuntu-release team (for main/restricted packages) or motu-release | 65 | subscribe ubuntu-release team instead of sponsorship team. |
61 | 68 | team (for universe/multiverse packages) instead of sponsorship team. | ||
63 | 69 | .TP | 66 | .TP |
64 | 70 | .B <source package> | 67 | .B <source package> |
65 | 71 | This is the source package that you would like to be synced from Debian. | 68 | This is the source package that you would like to be synced from Debian. |
66 | 72 | 69 | ||
67 | === modified file 'hugdaylist' | |||
68 | --- hugdaylist 2009-11-07 19:34:59 +0000 | |||
69 | +++ hugdaylist 2010-03-15 09:25:31 +0000 | |||
70 | @@ -75,8 +75,7 @@ | |||
71 | 75 | subscriptions = set(s.person.name for s in task.bug.subscriptions) #this is expensive, parse name out of self_link instead? | 75 | subscriptions = set(s.person.name for s in task.bug.subscriptions) #this is expensive, parse name out of self_link instead? |
72 | 76 | if (task.status != "Fix Committed" and | 76 | if (task.status != "Fix Committed" and |
73 | 77 | (not task.assignee or task.assignee.name in ['motu','desktop-bugs']) and | 77 | (not task.assignee or task.assignee.name in ['motu','desktop-bugs']) and |
76 | 78 | 'ubuntu-main-sponsors' not in subscriptions and | 78 | 'ubuntu-sponsors' not in subscriptions and |
75 | 79 | 'ubuntu-universe-sponsors' not in subscriptions and | ||
77 | 80 | 'ubuntu-archive' not in subscriptions): | 79 | 'ubuntu-archive' not in subscriptions): |
78 | 81 | return True | 80 | return True |
79 | 82 | return False | 81 | return False |
80 | 83 | 82 | ||
81 | === modified file 'requestsync' | |||
82 | --- requestsync 2010-03-05 16:59:46 +0000 | |||
83 | +++ requestsync 2010-03-15 09:25:31 +0000 | |||
84 | @@ -213,10 +213,7 @@ | |||
85 | 213 | subscribe = 'ubuntu-archive' | 213 | subscribe = 'ubuntu-archive' |
86 | 214 | if sponsorship: | 214 | if sponsorship: |
87 | 215 | status = 'new' | 215 | status = 'new' |
92 | 216 | if ubuntu_component in ('main', 'restricted'): | 216 | subscribe = 'ubuntu-sponsors' |
89 | 217 | subscribe = 'ubuntu-main-sponsors' | ||
90 | 218 | else: | ||
91 | 219 | subscribe = 'ubuntu-universe-sponsors' | ||
93 | 220 | if ffe: | 217 | if ffe: |
94 | 221 | status = 'new' | 218 | status = 'new' |
95 | 222 | subscribe = 'ubuntu-release' | 219 | subscribe = 'ubuntu-release' |
96 | 223 | 220 | ||
97 | === removed file 'ubuntutools/ppaput.py' | |||
98 | --- ubuntutools/ppaput.py 2008-02-17 22:39:10 +0000 | |||
99 | +++ ubuntutools/ppaput.py 1970-01-01 00:00:00 +0000 | |||
100 | @@ -1,194 +0,0 @@ | |||
101 | 1 | # -*- coding: utf-8 -*- | ||
102 | 2 | # | ||
103 | 3 | # Copyright 2007, Canonical, Daniel Holbach | ||
104 | 4 | # Modified by Andrew Hunter | ||
105 | 5 | # License: GPLv3 | ||
106 | 6 | |||
107 | 7 | import re | ||
108 | 8 | import os | ||
109 | 9 | import sys | ||
110 | 10 | import string | ||
111 | 11 | |||
112 | 12 | try: | ||
113 | 13 | import launchpadbugs.connector as Connector | ||
114 | 14 | except: | ||
115 | 15 | raise ImportError, "You need python-launchpad-bugs (>= 0.2.14) installed to use ppaput." | ||
116 | 16 | sys.exit(1) | ||
117 | 17 | |||
118 | 18 | #try: | ||
119 | 19 | # import apt | ||
120 | 20 | #except: | ||
121 | 21 | # raise ImportError, "You need python-apt installed to use ppaput." | ||
122 | 22 | # sys.exit(1) | ||
123 | 23 | |||
124 | 24 | def dput_check(): | ||
125 | 25 | if not os.path.exists("/usr/bin/dput"): | ||
126 | 26 | print >> sys.stderr, "You need to install the dput package." | ||
127 | 27 | sys.exit(1) | ||
128 | 28 | |||
129 | 29 | |||
130 | 30 | def find_fixed_launchpad_bug(changesfile): | ||
131 | 31 | changes = open(changesfile).readlines() | ||
132 | 32 | for line in changes: | ||
133 | 33 | if line.startswith("Launchpad-Bugs-Fixed"): | ||
134 | 34 | return line.split(":")[1].split() | ||
135 | 35 | return [] | ||
136 | 36 | |||
137 | 37 | |||
138 | 38 | def call_dput(location, changes): | ||
139 | 39 | dput_check() | ||
140 | 40 | |||
141 | 41 | incoming = "" | ||
142 | 42 | res = False | ||
143 | 43 | |||
144 | 44 | (dummy, output, dummy) = os.popen3("dput --debug %s %s" % (location, changes)) | ||
145 | 45 | text = output.readlines() | ||
146 | 46 | for line in text: | ||
147 | 47 | if line.startswith("D: Incoming: "): | ||
148 | 48 | incoming = line.split("D: Incoming: ")[1].strip() | ||
149 | 49 | if incoming[-1] == "/": | ||
150 | 50 | incoming = incoming[:-1] | ||
151 | 51 | if line.startswith("Successfully uploaded packages."): | ||
152 | 52 | res = True | ||
153 | 53 | return (res, incoming) | ||
154 | 54 | |||
155 | 55 | |||
156 | 56 | def lookup_dput_host(host): | ||
157 | 57 | dput_check() | ||
158 | 58 | (dummy, output, dummy) = os.popen3("dput -H | grep ^%s" % host) | ||
159 | 59 | text = output.read() | ||
160 | 60 | if text: | ||
161 | 61 | return text.split()[2] | ||
162 | 62 | return "" | ||
163 | 63 | |||
164 | 64 | |||
165 | 65 | def call_debuild(options): | ||
166 | 66 | # FIXME: this requires magic, that figures out when to use --native --working, | ||
167 | 67 | # etc. | ||
168 | 68 | # if os.path.exists(".bzr") and os.path.exists("/usr/bin/bzr-buildpackage"): | ||
169 | 69 | # return os.system("bzr bd -S --builder='-k%s %s'" % \ | ||
170 | 70 | # (os.getenv("DEBEMAIL"), \ | ||
171 | 71 | # string.join(options, " "))) == 0 | ||
172 | 72 | # else: | ||
173 | 73 | return os.system("debuild -S -k%s %s" % \ | ||
174 | 74 | (os.getenv("DEBEMAIL"), \ | ||
175 | 75 | string.join(options, " "))) == 0 | ||
176 | 76 | |||
177 | 77 | def get_name_version_section_and_release(): | ||
178 | 78 | changelogfile = "debian/changelog" | ||
179 | 79 | if not os.path.exists(changelogfile): | ||
180 | 80 | print >> sys.stderr, "%s not found." % changelogfile | ||
181 | 81 | sys.exit(1) | ||
182 | 82 | controlfile = "debian/control" | ||
183 | 83 | if not os.path.exists(controlfile): | ||
184 | 84 | print >> sys.stderr, "%s not found." % controlfile | ||
185 | 85 | sys.exit(1) | ||
186 | 86 | |||
187 | 87 | head = open(changelogfile).readline() | ||
188 | 88 | (name, \ | ||
189 | 89 | version, \ | ||
190 | 90 | release) = re.findall(r'^(.*)\ \((.*)\)\ (.*?)\;\ .*', head)[0] | ||
191 | 91 | section = "main" | ||
192 | 92 | |||
193 | 93 | # | ||
194 | 94 | #Is this nessicary? All ppa install to main now. | ||
195 | 95 | # | ||
196 | 96 | |||
197 | 97 | # for line in open(controlfile).readlines(): | ||
198 | 98 | # if line.startswith("Section"): | ||
199 | 99 | # if line.split("Section: ")[1].count("/")>0: | ||
200 | 100 | # section = line.split("Section: ")[1].split("/")[0].strip() | ||
201 | 101 | # return (name, version, section) | ||
202 | 102 | |||
203 | 103 | return (name, version, section, release) | ||
204 | 104 | |||
205 | 105 | def assemble_bug_comment_text(host, incoming, section, sourcepackage, version, | ||
206 | 106 | release): | ||
207 | 107 | if host == "ppa.launchpad.net": | ||
208 | 108 | dsc_file_location = "http://%s/%s/pool/%s/%s/%s/%s_%s.dsc" % \ | ||
209 | 109 | (host, incoming[1:], section, sourcepackage[0], sourcepackage, \ | ||
210 | 110 | sourcepackage, version) | ||
211 | 111 | else: | ||
212 | 112 | # FIXME: this needs to be much much cleverer at some stage | ||
213 | 113 | dsc_file_location = "http://%s/%s/pool/%s/%s/%s/%s_%s.dsc" % \ | ||
214 | 114 | (host, incoming, section, sourcepackage[0], sourcepackage, version) | ||
215 | 115 | return """A new version of %s was uploaded to fix this bug. | ||
216 | 116 | |||
217 | 117 | To review the source the current version, please run | ||
218 | 118 | |||
219 | 119 | dget -x %s | ||
220 | 120 | |||
221 | 121 | |||
222 | 122 | The package will get built by Launchpad in a while. If you want to test it, | ||
223 | 123 | please run the following commands: | ||
224 | 124 | |||
225 | 125 | sudo -s | ||
226 | 126 | echo >> /etc/apt/sources.list | ||
227 | 127 | echo "deb http://%s/%s %s main universe multiverse restricted" >> /etc/apt/sources.list | ||
228 | 128 | apt-get update | ||
229 | 129 | apt-get install <package> | ||
230 | 130 | """ % (sourcepackage, dsc_file_location, host, incoming[1:], release) | ||
231 | 131 | |||
232 | 132 | |||
233 | 133 | def deal_with_bugreport(bugnumbers, host, section, incoming, sourcepackage, | ||
234 | 134 | version, release): | ||
235 | 135 | if not os.path.exists(os.path.expanduser("~/.lpcookie")): | ||
236 | 136 | print >> sys.stderr, \ | ||
237 | 137 | "You need your Launchpad Cookie to be stored in ~/.lpcookie" | ||
238 | 138 | sys.exit(1) | ||
239 | 139 | |||
240 | 140 | #print apt.Cache()[sourcepackage].section.split("/")[0].count("verse") | ||
241 | 141 | (dummy, output, dummy) = os.popen3( | ||
242 | 142 | "apt-cache showsrc %s | grep Directory | cut -d' ' -f2 | cut -d'/' -f2" % \ | ||
243 | 143 | sourcepackage) | ||
244 | 144 | component = output.read().strip() | ||
245 | 145 | |||
246 | 146 | Bug = Connector.ConnectBug() | ||
247 | 147 | Bug.authentication = os.path.expanduser("~/.lpcookie") | ||
248 | 148 | |||
249 | 149 | for bugnumber in bugnumbers: | ||
250 | 150 | bug = Bug(int(bugnumber)) | ||
251 | 151 | if component in ["main", "restricted"] and \ | ||
252 | 152 | 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers]: | ||
253 | 153 | bug.subscribers.add('ubuntu-main-sponsors') | ||
254 | 154 | if component in ["universe", "multiverse"] and \ | ||
255 | 155 | 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]: | ||
256 | 156 | bug.subscribers.add('ubuntu-universe-sponsors') | ||
257 | 157 | if not component: | ||
258 | 158 | bug.tags.append("needs-packaging") | ||
259 | 159 | |||
260 | 160 | comment = Bug.NewComment(text=assemble_bug_comment_text(host, incoming, | ||
261 | 161 | section, | ||
262 | 162 | sourcepackage, | ||
263 | 163 | version, | ||
264 | 164 | release), | ||
265 | 165 | subject="Fix in %s (%s)" % \ | ||
266 | 166 | (sourcepackage, version)) | ||
267 | 167 | bug.comments.add(comment) | ||
268 | 168 | |||
269 | 169 | if bug.status != "Fix Committed": | ||
270 | 170 | bug.status = "Fix Committed" | ||
271 | 171 | bug.commit() | ||
272 | 172 | |||
273 | 173 | |||
274 | 174 | def file_bug(sourcepackage, version): | ||
275 | 175 | Bug = Connector.ConnectBug() | ||
276 | 176 | Bug.authentication = os.path.expanduser("~/.lpcookie") | ||
277 | 177 | |||
278 | 178 | try: | ||
279 | 179 | bug = Bug.New(product={"name": sourcepackage, "target": "ubuntu"}, | ||
280 | 180 | summary="Please sponsor %s %s" % \ | ||
281 | 181 | (sourcepackage, version), | ||
282 | 182 | description=\ | ||
283 | 183 | "The new package will be uploaded to PPA shortly.") | ||
284 | 184 | except: | ||
285 | 185 | bug = Bug.New(product={"name": "ubuntu"}, | ||
286 | 186 | summary="Please sponsor %s %s" % \ | ||
287 | 187 | (sourcepackage, version), | ||
288 | 188 | description=\ | ||
289 | 189 | "The new package will be uploaded to PPA shortly.") | ||
290 | 190 | |||
291 | 191 | print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \ | ||
292 | 192 | (bug.bugnumber, bug.bugnumber) | ||
293 | 193 | |||
294 | 194 | return bug.bugnumber |