mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-20 13:21:28 +00:00
Merge with Iain Lane's branch and some other changes.
This commit is contained in:
commit
fcb0d7166a
14
debian/changelog
vendored
14
debian/changelog
vendored
@ -1,12 +1,24 @@
|
|||||||
ubuntu-dev-tools (0.35) intrepid; urgency=low
|
ubuntu-dev-tools (0.35) intrepid; urgency=low
|
||||||
|
|
||||||
|
[ Siegfried-Angel Gevatter Pujals ]
|
||||||
* doc/update-maintainer.1:
|
* doc/update-maintainer.1:
|
||||||
- Remove the reference to the --no-changelog option from the manpage.
|
- Remove the reference to the --no-changelog option from the manpage.
|
||||||
* requestsync:
|
* requestsync:
|
||||||
- If the email interface is used, check if DEBEMAIL is set before anything
|
- If the email interface is used, check if DEBEMAIL is set before anything
|
||||||
else (LP: #254632).
|
else (LP: #254632).
|
||||||
|
* massfile, examples/massfile.instructions:
|
||||||
|
- Make it possible to give the created bugs a determined status.
|
||||||
|
|
||||||
-- Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com> Mon, 04 Aug 2008 14:50:15 +0200
|
[ Iain Lane ]
|
||||||
|
* Add pull-lp-source, which get source packages from LP to avoid mirror lag.
|
||||||
|
* pbuilder-dist.new:
|
||||||
|
- Set mirror and component for Debian distros.
|
||||||
|
- Use local apt cache if available.
|
||||||
|
* massfile:
|
||||||
|
- Modify it to work with Firefox 3 cookies, taking code from requestsync.
|
||||||
|
- Set the status to Confirmed, by default.
|
||||||
|
|
||||||
|
-- Iain Lane <iain@orangesquash.org.uk> Mon, 04 Aug 2008 18:29:46 +0100
|
||||||
|
|
||||||
ubuntu-dev-tools (0.34) intrepid; urgency=low
|
ubuntu-dev-tools (0.34) intrepid; urgency=low
|
||||||
|
|
||||||
|
9
debian/copyright
vendored
9
debian/copyright
vendored
@ -18,6 +18,7 @@ Upstream Authors:
|
|||||||
Soren Hansen <soren@ubuntu.com>
|
Soren Hansen <soren@ubuntu.com>
|
||||||
Steve Kowalik <stevenk@ubuntu.com>
|
Steve Kowalik <stevenk@ubuntu.com>
|
||||||
Terence Simpson <stdin@stdin.me.uk>
|
Terence Simpson <stdin@stdin.me.uk>
|
||||||
|
Iain Lane <iain@orangesquash.org.uk>
|
||||||
|
|
||||||
Copyright:
|
Copyright:
|
||||||
|
|
||||||
@ -32,6 +33,7 @@ Copyright:
|
|||||||
(C) 2006-2007, Pete Savage <petesavage@ubuntu.com>
|
(C) 2006-2007, Pete Savage <petesavage@ubuntu.com>
|
||||||
(C) 2007-2008, Siegfried-A. Gevatter <rainct@ubuntu.com>
|
(C) 2007-2008, Siegfried-A. Gevatter <rainct@ubuntu.com>
|
||||||
(C) 2007, Terence Simpson <stdin@stdin.me.uk>
|
(C) 2007, Terence Simpson <stdin@stdin.me.uk>
|
||||||
|
(C) 2008, Iain Lane <iain@orangesquash.org.uk>
|
||||||
|
|
||||||
Licenses:
|
Licenses:
|
||||||
|
|
||||||
@ -51,8 +53,8 @@ and what-patch are licensed under GPLv2:
|
|||||||
On Debian systems, the complete text of the GNU General Public License v2
|
On Debian systems, the complete text of the GNU General Public License v2
|
||||||
can be found in `/usr/share/common-licenses/GPL-2'.
|
can be found in `/usr/share/common-licenses/GPL-2'.
|
||||||
|
|
||||||
get-branches, get-build-deps, debian-pull-debdiff, massfile, ppaput and
|
get-branches, get-build-deps, debian-pull-debdiff, massfile, ppaput,
|
||||||
suspicious-source are licensed under GPLv3:
|
suspicious-source and pull-lp-source are licensed under GPLv3:
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -68,4 +70,5 @@ can be found in `/usr/share/common-licenses/GPL-3'.
|
|||||||
|
|
||||||
The following of the scripts can be used, at your option, regarding any
|
The following of the scripts can be used, at your option, regarding any
|
||||||
later version of the previously specified license: 404main, pbuilder-dist,
|
later version of the previously specified license: 404main, pbuilder-dist,
|
||||||
dgetlp, reverse-build-depends, suspicious-source and get-build-deps.
|
dgetlp, reverse-build-depends, suspicious-source, pull-lp-source and
|
||||||
|
get-build-deps.
|
||||||
|
39
doc/pull-lp-source.1
Normal file
39
doc/pull-lp-source.1
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
.TH PULL-LP-SOURCE "1" "4 August 2008" "ubuntu-dev-tools"
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
pull-lp-source \- download a source package from Launchpad
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B pull-lp-source [-h] <\fBsource package\fR> [\fItarget release\fR]
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
\fBpull-lp-source\fR downloads and extracts the latest version of
|
||||||
|
<\fBsource package\fR> from Launchpad. If the optional parameter
|
||||||
|
[\fItarget release\fR] is specified, the latest version in that release
|
||||||
|
will be downloaded instead.
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
|
.PP
|
||||||
|
Listed below are the command line options for requestsync:
|
||||||
|
.TP
|
||||||
|
.B \-h, --help
|
||||||
|
Display a help message and exit.
|
||||||
|
.TP
|
||||||
|
.B <source package>
|
||||||
|
This is the source package that you would like to be downloaded from Launchpad.
|
||||||
|
.TP
|
||||||
|
.B [target release]
|
||||||
|
This is the release that you would like the source package to be downloaded from.
|
||||||
|
This value defaults to the current development release.
|
||||||
|
|
||||||
|
.SH ENVIRONMENT VARIABLES
|
||||||
|
.TP
|
||||||
|
DIST
|
||||||
|
Specifies the default target.
|
||||||
|
|
||||||
|
.SH AUTHOR
|
||||||
|
.PP
|
||||||
|
\fBpull-lp-source\fR and this manual page were written by Iain Lane
|
||||||
|
<iain@orangesquash.org.uk>. Both are released under the GNU General Public
|
||||||
|
License, version 3 or later.
|
@ -1,5 +1,6 @@
|
|||||||
subject: [UNMETDEPS] $pack has unmet dependencies
|
subject: [UNMETDEPS] $pack has unmet dependencies
|
||||||
assignee:
|
assignee:
|
||||||
|
status: confirmed
|
||||||
subscribers: motu
|
subscribers: motu
|
||||||
tags: unmetdeps
|
tags: unmetdeps
|
||||||
buglist-url: http://bugs.launchpad.net/ubuntu/+bugs?field.tag=unmetdeps
|
buglist-url: http://bugs.launchpad.net/ubuntu/+bugs?field.tag=unmetdeps
|
||||||
@ -13,4 +14,3 @@ text:
|
|||||||
installable (on AMD64) at the moment.
|
installable (on AMD64) at the moment.
|
||||||
.
|
.
|
||||||
Please have a look and make sure it's installable again.
|
Please have a look and make sure it's installable again.
|
||||||
|
|
||||||
|
44
massfile
44
massfile
@ -2,11 +2,15 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# (C) Canonical, 2007, GPL v3
|
# (C) Canonical, 2007, GPL v3
|
||||||
|
#
|
||||||
|
# Modified by Iain Lane <iain@orangesquash.org.uk>, taking some code written by
|
||||||
|
# Daniel Hahler <ubuntu@thequod.de>
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import email
|
import email
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import glob
|
||||||
|
|
||||||
import launchpadbugs.connector as Connector
|
import launchpadbugs.connector as Connector
|
||||||
|
|
||||||
@ -18,7 +22,7 @@ def read_config():
|
|||||||
instr = dict()
|
instr = dict()
|
||||||
|
|
||||||
for field in "subject", "assignee", "subscribers", "tags", "text", \
|
for field in "subject", "assignee", "subscribers", "tags", "text", \
|
||||||
"buglist-url":
|
"buglist-url", "status":
|
||||||
instr[field] = instructions.get(field)
|
instr[field] = instructions.get(field)
|
||||||
|
|
||||||
return instr
|
return instr
|
||||||
@ -66,7 +70,7 @@ def check_configfiles():
|
|||||||
|
|
||||||
def file_bug(config):
|
def file_bug(config):
|
||||||
Bug = Connector.ConnectBug()
|
Bug = Connector.ConnectBug()
|
||||||
Bug.authentication = os.path.expanduser("~/.lpcookie")
|
Bug.authentication = cookie
|
||||||
|
|
||||||
try:
|
try:
|
||||||
summary = config["subject"].replace("$pack", config["sourcepackage"])
|
summary = config["subject"].replace("$pack", config["sourcepackage"])
|
||||||
@ -85,6 +89,10 @@ def file_bug(config):
|
|||||||
if tag.strip("\n").strip():
|
if tag.strip("\n").strip():
|
||||||
bug.tags.append(tag.strip("\n").strip())
|
bug.tags.append(tag.strip("\n").strip())
|
||||||
bug.assignee = config["assignee"]
|
bug.assignee = config["assignee"]
|
||||||
|
if config["status"]:
|
||||||
|
bug.status = config["status"].capitalize()
|
||||||
|
else:
|
||||||
|
bug.status = "Confirmed"
|
||||||
bug.commit()
|
bug.commit()
|
||||||
except:
|
except:
|
||||||
"Bug for '%s' was not filed." % config["sourcepackage"]
|
"Bug for '%s' was not filed." % config["sourcepackage"]
|
||||||
@ -100,16 +108,38 @@ def read_buglist(url):
|
|||||||
|
|
||||||
return packages
|
return packages
|
||||||
|
|
||||||
|
def lp_cookie():
|
||||||
|
global cookie
|
||||||
|
cookie = None
|
||||||
|
|
||||||
|
# Search cookiefile (for authentication to lp)
|
||||||
|
if cookie == None:
|
||||||
|
try_globs = ('~/.lpcookie.txt', '~/.mozilla/*/*/cookies.sqlite', '~/.mozilla/*/*/cookies.txt')
|
||||||
|
for try_glob in try_globs:
|
||||||
|
try:
|
||||||
|
cookiefile = glob.glob(os.path.expanduser(try_glob))[0]
|
||||||
|
except IndexError:
|
||||||
|
continue
|
||||||
|
# Found:
|
||||||
|
print "Using cookie file at «%s».\n" % cookiefile
|
||||||
|
cookie = cookiefile
|
||||||
|
break
|
||||||
|
|
||||||
|
if cookie == None:
|
||||||
|
raise RuntimeError("Could not find cookie file for Launchpad \
|
||||||
|
(looked in %s). You should be able to create a valid file by logging into \
|
||||||
|
Launchpad with Firefox") % ", ".join(try_globs)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if not check_configfiles():
|
if not check_configfiles():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if not os.path.exists(os.path.expanduser("~/.lpcookie")):
|
try:
|
||||||
print >> sys.stderr, \
|
lp_cookie()
|
||||||
"Launchpad cookie not found in ~/.lpcookie."
|
except RuntimeError, e:
|
||||||
|
print e
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
config = read_config()
|
config = read_config()
|
||||||
pack_list = read_list()
|
pack_list = read_list()
|
||||||
buglist = read_buglist(config["buglist-url"])
|
buglist = read_buglist(config["buglist-url"])
|
||||||
|
@ -17,6 +17,8 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
debian_distros = ['etch', 'lenny', 'sid', 'stable', 'testing', 'unstable']
|
||||||
|
|
||||||
class pbuilder_dist:
|
class pbuilder_dist:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -182,8 +184,19 @@ class pbuilder_dist:
|
|||||||
'--logfile "%(logfile)s"' % self,
|
'--logfile "%(logfile)s"' % self,
|
||||||
'--aptcache "/var/cache/apt/archives/"',
|
'--aptcache "/var/cache/apt/archives/"',
|
||||||
### --mirror "${ARCHIVE}" \
|
### --mirror "${ARCHIVE}" \
|
||||||
|
'--bindmounts "/var/cache/archive/"',
|
||||||
|
'--override-config',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
localrepo = '/var/cache/archive/%(target_distro)s' % self
|
||||||
|
if os.path.exists(localrepo):
|
||||||
|
arguments.append('--othermirror ' +\
|
||||||
|
'"deb file:///var/cache/archive/ %(target_distro)s/"' % self)
|
||||||
|
|
||||||
|
if self.target_distro in debian_distros:
|
||||||
|
arguments.append('--mirror "ftp://ftp.debian.org/debian"')
|
||||||
|
arguments.append('--components "main contrib non-free"')
|
||||||
|
|
||||||
if self.build_architecture != self.system_architecture:
|
if self.build_architecture != self.system_architecture:
|
||||||
arguments.append('--debootstrapopts --arch')
|
arguments.append('--debootstrapopts --arch')
|
||||||
arguments.append('--debootstrapopts "%(build_architecture)s"' % self)
|
arguments.append('--debootstrapopts "%(build_architecture)s"' % self)
|
||||||
|
87
pull-lp-source
Executable file
87
pull-lp-source
Executable file
@ -0,0 +1,87 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
# pull-lp-source -- pull a source package from Launchpad
|
||||||
|
# Basic usage: pull-lp-source <source package> [<distro>]
|
||||||
|
#
|
||||||
|
# Copyright (C) 2008 Iain Lane <iain@orangesquash.org.uk>
|
||||||
|
#
|
||||||
|
# BackportFromLP class taken from prevu tool, which has
|
||||||
|
# copyright (C) 2006 John Dong <jdong@ubuntu.com>.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 3
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
|
||||||
|
# TODO: Determine before going to LP whether a source package and distro exist or not.
|
||||||
|
# TODO: Determine current development distro programatically
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
|
||||||
|
class BackportFromLP:
|
||||||
|
|
||||||
|
def __getitem__(self, name):
|
||||||
|
return getattr(self, name)
|
||||||
|
|
||||||
|
def __init__(self, package, target_distro):
|
||||||
|
self.package = package
|
||||||
|
self.target_distro = target_distro
|
||||||
|
self.__prepare_sources()
|
||||||
|
|
||||||
|
def __prepare_sources(self):
|
||||||
|
# Scrape the source package from Launchpad :)
|
||||||
|
import re
|
||||||
|
|
||||||
|
contents = os.popen('wget -q https://launchpad.net/ubuntu/%(target_distro)s/+source/%(package)s -O-' % self).read()
|
||||||
|
links = re.findall('a href=\"(.*\.dsc)\"', contents)
|
||||||
|
|
||||||
|
if len(links) == 1 and \
|
||||||
|
(os.system('dget -x http://launchpad.net%s' % links[0])) == 0:
|
||||||
|
print '\nSuccess!'
|
||||||
|
else:
|
||||||
|
raise ValueError, '\nFailed to fetch and extract the source. ' +\
|
||||||
|
'Ensure that the package specified is a valid source ' +\
|
||||||
|
'package name and that Launchpad is not down.'
|
||||||
|
|
||||||
|
default_distro = 'intrepid'
|
||||||
|
|
||||||
|
def usage():
|
||||||
|
print 'Usage: %s <package> [distro]' % sys.argv[0]
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
args = sys.argv[1:] or []
|
||||||
|
|
||||||
|
if args == [] or args[0] in ('-h', '--help'):
|
||||||
|
usage()
|
||||||
|
sys.exit(0)
|
||||||
|
|
||||||
|
if len(args) >= 1:
|
||||||
|
package = args[0]
|
||||||
|
|
||||||
|
if len(args) == 2:
|
||||||
|
distro = args[1]
|
||||||
|
elif len(args) == 1:
|
||||||
|
distro = os.getenv('DIST') or default_distro
|
||||||
|
else: # incorrect args
|
||||||
|
usage()
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
# Correct-ish args, can proceed
|
||||||
|
try:
|
||||||
|
print 'Attempting to get %s from distro %s...' % \
|
||||||
|
(package, distro.capitalize())
|
||||||
|
BackportFromLP(package, distro)
|
||||||
|
except ValueError, e:
|
||||||
|
print 'Error when downloading package %s from distro %s: %s' % \
|
||||||
|
(package, distro, e)
|
Loading…
x
Reference in New Issue
Block a user