Merge lp:~dholbach/ubuntu-dev-tools/permissions-reorg into lp:~ubuntu-dev/ubuntu-dev-tools/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
Reviewer Review Type Date Requested Status
Ubuntu Development Team Pending
Review via email: mp+21355@code.launchpad.net
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
=== modified file 'debian/changelog'
--- debian/changelog 2010-03-08 23:34:59 +0000
+++ debian/changelog 2010-03-15 09:25:31 +0000
@@ -6,7 +6,14 @@
6 [ Emmet Hikory ]6 [ Emmet Hikory ]
7 * mk-sbuild: Really don't use build-arm-chroot7 * mk-sbuild: Really don't use build-arm-chroot
88
9 -- Emmet Hikory <persia@ubuntu.com> Tue, 09 Mar 2010 08:32:50 +09009 [ Daniel Holbach ]
10 * hugdaylist, requestsync, doc/requestsync.1:
11 ubuntu-{main,universe}-sponsors → ubuntu-sponsors,
12 {ubuntu,motu}-release → ubuntu-release.
13 * ubuntutools/ppaput.py: removed, not necessary any more.
14 * debian/copyright: removed references to ppaput.
15
16 -- Daniel Holbach <daniel.holbach@ubuntu.com> Mon, 15 Mar 2010 10:21:31 +0100
1017
11ubuntu-dev-tools (0.95) lucid; urgency=low18ubuntu-dev-tools (0.95) lucid; urgency=low
1219
1320
=== modified file 'debian/copyright'
--- debian/copyright 2010-03-08 09:59:50 +0000
+++ debian/copyright 2010-03-15 09:25:31 +0000
@@ -71,7 +71,7 @@
7171
72dch-repeat, get-branches, get-build-deps, grab-attachments, grab-merge,72dch-repeat, get-branches, get-build-deps, grab-attachments, grab-merge,
73hugdaylist, manage-credentials, massfile, mk-sbuild, pbuilder-dist-simple,73hugdaylist, manage-credentials, massfile, mk-sbuild, pbuilder-dist-simple,
74ppaput, pull-debian-debdiff, pull-debian-source, pull-lp-source, pull-revu-source,74pull-debian-debdiff, pull-debian-source, pull-lp-source, pull-revu-source,
75setup-packaging-environment, suspicious-source, ubuntu-build and what-patch are75setup-packaging-environment, suspicious-source, ubuntu-build and what-patch are
76licensed under the GNU General Public License, version 3:76licensed under the GNU General Public License, version 3:
7777
7878
=== modified file 'doc/requestsync.1'
--- doc/requestsync.1 2009-11-02 18:20:56 +0000
+++ doc/requestsync.1 2010-03-15 09:25:31 +0000
@@ -23,9 +23,8 @@
23.PP23.PP
24\fBrequestsync\fR checks if you have the permissions to request the sync from24\fBrequestsync\fR checks if you have the permissions to request the sync from
25the archive administrators directly by checking if you are a member of the25the archive administrators directly by checking if you are a member of the
26\fI~ubuntu\-dev\fR team (for universe/multiverse syncs) or a member of the26\fI~ubuntu\-dev\fR team on Launchpad.
27\fI~ubuntu\-core\-dev\fR team (for main/restricted syncs) on Launchpad.27If you are not a member of the team, the script will subscribe
28If you are not a member of the appropriate team, the script will subscribe
29the necessary team with approval rights to the bug report for you.28the necessary team with approval rights to the bug report for you.
3029
31.PP30.PP
@@ -58,14 +57,12 @@
58.TP57.TP
59.B \-s58.B \-s
60Specifies that you require sponsorship.59Specifies that you require sponsorship.
61You need this option if you are not a member of ubuntu-dev for universe or60You need this option if you are not a member of ubuntu-dev. This shall disable the
62multiverse, or ubuntu-core-dev for main or restricted. This shall disable the
63Launchpad team membership checking described above. 61Launchpad team membership checking described above.
64.TP62.TP
65.B \-e63.B \-e
66Use this flag after FeatureFreeze for non-bug fix syncs. \fBrequestsync\fR will64Use this flag after FeatureFreeze for non-bug fix syncs. \fBrequestsync\fR will
67subscribe ubuntu-release team (for main/restricted packages) or motu-release65subscribe ubuntu-release team instead of sponsorship team.
68team (for universe/multiverse packages) instead of sponsorship team.
69.TP66.TP
70.B <source package>67.B <source package>
71This is the source package that you would like to be synced from Debian.68This is the source package that you would like to be synced from Debian.
7269
=== modified file 'hugdaylist'
--- hugdaylist 2009-11-07 19:34:59 +0000
+++ hugdaylist 2010-03-15 09:25:31 +0000
@@ -75,8 +75,7 @@
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?
76 if (task.status != "Fix Committed" and76 if (task.status != "Fix Committed" and
77 (not task.assignee or task.assignee.name in ['motu','desktop-bugs']) and77 (not task.assignee or task.assignee.name in ['motu','desktop-bugs']) and
78 'ubuntu-main-sponsors' not in subscriptions and78 'ubuntu-sponsors' not in subscriptions and
79 'ubuntu-universe-sponsors' not in subscriptions and
80 'ubuntu-archive' not in subscriptions):79 'ubuntu-archive' not in subscriptions):
81 return True80 return True
82 return False81 return False
8382
=== modified file 'requestsync'
--- requestsync 2010-03-05 16:59:46 +0000
+++ requestsync 2010-03-15 09:25:31 +0000
@@ -213,10 +213,7 @@
213 subscribe = 'ubuntu-archive'213 subscribe = 'ubuntu-archive'
214 if sponsorship:214 if sponsorship:
215 status = 'new'215 status = 'new'
216 if ubuntu_component in ('main', 'restricted'):216 subscribe = 'ubuntu-sponsors'
217 subscribe = 'ubuntu-main-sponsors'
218 else:
219 subscribe = 'ubuntu-universe-sponsors'
220 if ffe:217 if ffe:
221 status = 'new'218 status = 'new'
222 subscribe = 'ubuntu-release'219 subscribe = 'ubuntu-release'
223220
=== removed file 'ubuntutools/ppaput.py'
--- ubuntutools/ppaput.py 2008-02-17 22:39:10 +0000
+++ ubuntutools/ppaput.py 1970-01-01 00:00:00 +0000
@@ -1,194 +0,0 @@
1# -*- coding: utf-8 -*-
2#
3# Copyright 2007, Canonical, Daniel Holbach
4# Modified by Andrew Hunter
5# License: GPLv3
6
7import re
8import os
9import sys
10import string
11
12try:
13 import launchpadbugs.connector as Connector
14except:
15 raise ImportError, "You need python-launchpad-bugs (>= 0.2.14) installed to use ppaput."
16 sys.exit(1)
17
18#try:
19# import apt
20#except:
21# raise ImportError, "You need python-apt installed to use ppaput."
22# sys.exit(1)
23
24def dput_check():
25 if not os.path.exists("/usr/bin/dput"):
26 print >> sys.stderr, "You need to install the dput package."
27 sys.exit(1)
28
29
30def find_fixed_launchpad_bug(changesfile):
31 changes = open(changesfile).readlines()
32 for line in changes:
33 if line.startswith("Launchpad-Bugs-Fixed"):
34 return line.split(":")[1].split()
35 return []
36
37
38def call_dput(location, changes):
39 dput_check()
40
41 incoming = ""
42 res = False
43
44 (dummy, output, dummy) = os.popen3("dput --debug %s %s" % (location, changes))
45 text = output.readlines()
46 for line in text:
47 if line.startswith("D: Incoming: "):
48 incoming = line.split("D: Incoming: ")[1].strip()
49 if incoming[-1] == "/":
50 incoming = incoming[:-1]
51 if line.startswith("Successfully uploaded packages."):
52 res = True
53 return (res, incoming)
54
55
56def lookup_dput_host(host):
57 dput_check()
58 (dummy, output, dummy) = os.popen3("dput -H | grep ^%s" % host)
59 text = output.read()
60 if text:
61 return text.split()[2]
62 return ""
63
64
65def call_debuild(options):
66# FIXME: this requires magic, that figures out when to use --native --working,
67# etc.
68# if os.path.exists(".bzr") and os.path.exists("/usr/bin/bzr-buildpackage"):
69# return os.system("bzr bd -S --builder='-k%s %s'" % \
70# (os.getenv("DEBEMAIL"), \
71# string.join(options, " "))) == 0
72# else:
73 return os.system("debuild -S -k%s %s" % \
74 (os.getenv("DEBEMAIL"), \
75 string.join(options, " "))) == 0
76
77def get_name_version_section_and_release():
78 changelogfile = "debian/changelog"
79 if not os.path.exists(changelogfile):
80 print >> sys.stderr, "%s not found." % changelogfile
81 sys.exit(1)
82 controlfile = "debian/control"
83 if not os.path.exists(controlfile):
84 print >> sys.stderr, "%s not found." % controlfile
85 sys.exit(1)
86
87 head = open(changelogfile).readline()
88 (name, \
89 version, \
90 release) = re.findall(r'^(.*)\ \((.*)\)\ (.*?)\;\ .*', head)[0]
91 section = "main"
92
93#
94#Is this nessicary? All ppa install to main now.
95#
96
97# for line in open(controlfile).readlines():
98# if line.startswith("Section"):
99# if line.split("Section: ")[1].count("/")>0:
100# section = line.split("Section: ")[1].split("/")[0].strip()
101# return (name, version, section)
102
103 return (name, version, section, release)
104
105def assemble_bug_comment_text(host, incoming, section, sourcepackage, version,
106 release):
107 if host == "ppa.launchpad.net":
108 dsc_file_location = "http://%s/%s/pool/%s/%s/%s/%s_%s.dsc" % \
109 (host, incoming[1:], section, sourcepackage[0], sourcepackage, \
110 sourcepackage, version)
111 else:
112# FIXME: this needs to be much much cleverer at some stage
113 dsc_file_location = "http://%s/%s/pool/%s/%s/%s/%s_%s.dsc" % \
114 (host, incoming, section, sourcepackage[0], sourcepackage, version)
115 return """A new version of %s was uploaded to fix this bug.
116
117To review the source the current version, please run
118
119 dget -x %s
120
121
122The package will get built by Launchpad in a while. If you want to test it,
123please run the following commands:
124
125 sudo -s
126 echo >> /etc/apt/sources.list
127 echo "deb http://%s/%s %s main universe multiverse restricted" >> /etc/apt/sources.list
128 apt-get update
129 apt-get install <package>
130""" % (sourcepackage, dsc_file_location, host, incoming[1:], release)
131
132
133def deal_with_bugreport(bugnumbers, host, section, incoming, sourcepackage,
134 version, release):
135 if not os.path.exists(os.path.expanduser("~/.lpcookie")):
136 print >> sys.stderr, \
137 "You need your Launchpad Cookie to be stored in ~/.lpcookie"
138 sys.exit(1)
139
140 #print apt.Cache()[sourcepackage].section.split("/")[0].count("verse")
141 (dummy, output, dummy) = os.popen3(
142"apt-cache showsrc %s | grep Directory | cut -d' ' -f2 | cut -d'/' -f2" % \
143 sourcepackage)
144 component = output.read().strip()
145
146 Bug = Connector.ConnectBug()
147 Bug.authentication = os.path.expanduser("~/.lpcookie")
148
149 for bugnumber in bugnumbers:
150 bug = Bug(int(bugnumber))
151 if component in ["main", "restricted"] and \
152 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers]:
153 bug.subscribers.add('ubuntu-main-sponsors')
154 if component in ["universe", "multiverse"] and \
155 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]:
156 bug.subscribers.add('ubuntu-universe-sponsors')
157 if not component:
158 bug.tags.append("needs-packaging")
159
160 comment = Bug.NewComment(text=assemble_bug_comment_text(host, incoming,
161 section,
162 sourcepackage,
163 version,
164 release),
165 subject="Fix in %s (%s)" % \
166 (sourcepackage, version))
167 bug.comments.add(comment)
168
169 if bug.status != "Fix Committed":
170 bug.status = "Fix Committed"
171 bug.commit()
172
173
174def file_bug(sourcepackage, version):
175 Bug = Connector.ConnectBug()
176 Bug.authentication = os.path.expanduser("~/.lpcookie")
177
178 try:
179 bug = Bug.New(product={"name": sourcepackage, "target": "ubuntu"},
180 summary="Please sponsor %s %s" % \
181 (sourcepackage, version),
182 description=\
183 "The new package will be uploaded to PPA shortly.")
184 except:
185 bug = Bug.New(product={"name": "ubuntu"},
186 summary="Please sponsor %s %s" % \
187 (sourcepackage, version),
188 description=\
189 "The new package will be uploaded to PPA shortly.")
190
191 print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \
192 (bug.bugnumber, bug.bugnumber)
193
194 return bug.bugnumber

Subscribers

People subscribed via source and target branches

to status/vote changes: