← Back to team overview

mythbuntu-dev team mailing list archive

[Merge] lp:~blueyed/ubuntu-dev-tools/mk-sbuild-better-error into lp:ubuntu-dev-tools

 

Daniel Hahler has proposed merging lp:~blueyed/ubuntu-dev-tools/mk-sbuild-better-error into lp:ubuntu-dev-tools.

Requested reviews:
  Ubuntu Development Team (ubuntu-dev)

-- 
https://code.launchpad.net/~blueyed/ubuntu-dev-tools/mk-sbuild-better-error/+merge/27871
Your team Ubuntu Development Team is requested to review the proposed merge of lp:~blueyed/ubuntu-dev-tools/mk-sbuild-better-error into lp:ubuntu-dev-tools.
=== added directory '.bzr-builddeb'
=== added file '.bzr-builddeb/default.conf'
--- .bzr-builddeb/default.conf	1970-01-01 00:00:00 +0000
+++ .bzr-builddeb/default.conf	2010-06-17 18:54:27 +0000
@@ -0,0 +1,2 @@
+[BUILDDEB]
+native = True

=== added file '404main'
--- 404main	1970-01-01 00:00:00 +0000
+++ 404main	2010-06-17 18:54:27 +0000
@@ -0,0 +1,161 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright 2006-2007 (C) Pete Savage <petesavage@xxxxxxxxxx>
+# Copyright 2007 (C) Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+# Copyright 2009 (C) Canonical Ltd. (by Colin Watson <cjwatson@xxxxxxxxxx>)
+#
+# ##################################################################
+#
+# 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 2
+# 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.
+#
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# This script is used to check if a package and all its build
+# dependencies are in main or not.
+
+import subprocess
+import sys
+
+import apt_pkg
+import apt
+
+def process_deps(cache, deps):
+	"""Takes a list of (build) dependencies and processes it."""
+	
+	for basedep in [d.or_dependencies[0] for d in deps]:
+		if not packages.has_key(basedep.name) and basedep.name != '':
+			# Check the (build) dependencies recursively
+			find_main(cache, basedep.name)
+
+
+def get_package_version(cache, distro, pack):
+	if pack not in cache:
+		return None
+	for version in (cache[pack].candidate, cache[pack].installed):
+		if not version:
+			continue
+		for origin in version.origins:
+			if origin.archive == distro:
+				return version
+	return None
+
+
+# Cache::CompTypeDeb isn't exposed via python-apt
+def comp_type_deb(op):
+	ops = ("", "<=", ">=", "<<", ">>", "=", "!=")
+	if (op & 15) < 7:
+		return ops[op & 15]
+	return ""
+
+
+def find_main(cache, pack):
+	"""Searches the dependencies and build dependencies of a package recursively
+	to determine if they are all in the 'main' component or not."""
+	
+	global packages
+	
+	if pack in packages:
+		return
+
+	# Retrieve information about the package
+	version = get_package_version(cache, distro, pack)
+	
+	if not version:
+		packages[pack] = False
+		return
+	elif [origin for origin in version.origins if origin.component == 'main']:
+		packages[pack] = True
+		return
+	else:
+		if not packages.has_key(pack):
+			packages[pack] = False
+		
+		# Retrieve package dependencies
+		process_deps(cache, version.dependencies)
+		
+		# Retrieve package build dependencies. There's no handy
+		# attribute on version for this, so unfortunately we have to
+		# do a lot of messing about with apt.
+		deps = []
+		src_records = apt_pkg.SourceRecords()
+		got_src = False
+		while src_records.lookup(version.source_name):
+			if pack in src_records.binaries:
+				got_src = True
+				break
+		if got_src:
+			for deptype, all_deps in src_records.build_depends.iteritems():
+				for or_deps in all_deps:
+					base_deps = []
+					for (name, ver, op) in or_deps:
+						base_deps.append(apt.package.BaseDependency(name, op, ver, False))
+					deps.append(apt.package.Dependency(base_deps))
+		
+		process_deps(cache, deps)
+
+
+def main():
+	
+	global packages, distro
+	
+	# Check if the amount of arguments is correct
+	if len(sys.argv) < 2 or len(sys.argv) > 3 or sys.argv[1] in ('help', '-h', '--help'):
+		print 'Usage: %s <package name> [<distribution>]' % sys.argv[0]
+		sys.exit(1)
+	
+        cache = apt.cache.Cache()
+
+	if len(sys.argv) == 3 and sys.argv[2]:
+		distro = sys.argv[2]
+		if not get_package_version(cache, distro, 'bash'):
+			print '«%s» is not a valid distribution.' % distro
+			print 'Remember that for 404main to work with a certain distribution it must be in your /etc/apt/sources.list file.'
+			sys.exit(1)
+	else:
+		distro = subprocess.Popen(['lsb_release', '-cs'], stdout=subprocess.PIPE).stdout.read().strip('\n')
+	
+	if not get_package_version(cache, distro, sys.argv[1]):
+		print 'Can\'t find package «%s» in distribution «%s».' % (sys.argv[1], distro)
+		sys.exit(1)
+	
+	print 'Checking package «%s» in distribution «%s»...' % (sys.argv[1], distro)
+	
+	find_main(cache, sys.argv[1])
+	
+	# True if everything checked until the point is in main
+	all_in_main = True
+	
+	for package in packages:
+		if not packages[package]:
+			if all_in_main:
+				print 'The following packages aren\'t in main:'
+				all_in_main = False
+			print '  ', package
+	
+	if all_in_main:
+		print 'Package «%s» and all its dependencies and build dependencies are in main.' % sys.argv[1]
+
+if __name__ == '__main__':
+	
+	# Global variable to hold the status of all packages
+	packages = {}
+	
+	# Global variable to hold the target distribution
+	distro = ''
+	
+	try:
+		main()
+	except KeyboardInterrupt:
+		print 'Aborted.'
+		sys.exit(1)

=== renamed file '404main' => '404main.moved'
=== added file 'GPL-2'
--- GPL-2	1970-01-01 00:00:00 +0000
+++ GPL-2	2010-06-17 18:54:27 +0000
@@ -0,0 +1,339 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 2 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.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.

=== renamed file 'GPL-2' => 'GPL-2.moved'
=== added file 'GPL-3'
--- GPL-3	1970-01-01 00:00:00 +0000
+++ GPL-3	2010-06-17 18:54:27 +0000
@@ -0,0 +1,676 @@
+
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+ 
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+  
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+

=== renamed file 'GPL-3' => 'GPL-3.moved'
=== added file 'README.updates'
--- README.updates	1970-01-01 00:00:00 +0000
+++ README.updates	2010-06-17 18:54:27 +0000
@@ -0,0 +1,51 @@
+Updating the ubuntu-dev-tools package in Ubuntu
+-----------------------------------------------
+
+Here are the steps that are recommended to take when updating the
+ubuntu-dev-tools package in Ubuntu.
+
+1) Make sure that there are no new revisions to the package's trunk in Bazaar:
+
+    bzr pull lp:ubuntu-dev-tools
+
+2) Check to make sure that all approved merges have been merged:
+
+    https://code.launchpad.net/ubuntu-dev-tools/+activereviews
+
+3) Make sure that there is no low lying fruit that can be fixed at:
+
+    https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools
+
+4) Before uploading the package change the UNRELEASED field in the
+   debian/changelog file to the current development release.
+
+   If there is no UNRELEASED entry, make sure that the version for the current
+   one has not been uploaded by someone else already:
+
+    https://launchpad.net/ubuntu/+source/ubuntu-dev-tools/+publishinghistory
+
+   Using: dch -r UNRELEASED - will also set the release to the development
+   version.
+
+5) Once the target release has been changed, commit it to Bazaar (where X.YY is
+   the new package version):
+
+    bzr commit -m "Uploaded X.YY to RELEASE."
+
+6) Tag the new release in Bazaar:
+
+    bzr tag X.YY
+
+   For a full list of tags, please see: 'bzr tags'. This is so we can track
+   which Bazaar revision is in which release and makes bug triaging easier.
+
+7) Create the new source package, without the .bzr directory (this is to
+   reduce the size of the tarball):
+
+    debuild -S -sa -I.bzr
+
+8) Upload the package to Ubuntu with dput as normal:
+
+    dput ubuntu ubuntu-dev-tools_X.YY_source.changes
+
+9) Create a new blank entry with dch -i and mark it as UNRELEASED.

=== renamed file 'README.updates' => 'README.updates.moved'
=== added file 'TODO'
--- TODO	1970-01-01 00:00:00 +0000
+++ TODO	2010-06-17 18:54:27 +0000
@@ -0,0 +1,10 @@
+TODO for the ubuntu-dev-tools package
+-------------------------------------
+
+- Fix all bugs at Launchpad:
+  https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools
+
+- Create missing and improve existing manpages (for all commands).
+
+- Ask all authors who have used GPL if they are happy with using "or any later"
+  versions of the license.

=== renamed file 'TODO' => 'TODO.moved'
=== added directory 'bash_completion'
=== renamed directory 'bash_completion' => 'bash_completion.moved'
=== added file 'bash_completion/pbuilder-dist'
--- bash_completion/pbuilder-dist	1970-01-01 00:00:00 +0000
+++ bash_completion/pbuilder-dist	2010-06-17 18:54:27 +0000
@@ -0,0 +1,35 @@
+# pbuilder-dist completion
+#
+# Copyright 2008 Stephan Hermann <sh@xxxxxxxxxxxxx>, created for
+# the Ubuntu MOTU Team.
+#
+# Released under the GNU General Public License, version 2
+#
+# Based upon cobwuilder's autocompletion, Copyright 2007 Cyril
+# Brulebois <cyril.brulebois@xxxxxxxxxxxxxxxx>
+
+have pbuilder-dist &&
+_pbuilder-dist()
+{
+    local cur prev options
+
+    COMPREPLY=()
+    cur=${COMP_WORDS[COMP_CWORD]}
+    prev=${COMP_WORDS[COMP_CWORD-1]}
+
+    options='create update build clean login execute'
+
+    case $prev in
+        build)
+            COMPREPLY=( $( compgen -o filenames -G "$cur*.dsc" ) )
+            ;;
+        *)
+            COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
+            ;;
+    esac
+
+    return 0
+}
+[ "$have" ] && complete -F _pbuilder-dist -o filenames \
+{pbuilder,cowbuilder}-{dist,dapper,edgy,feisty,gutsy,hardy,intrepid,jaunty,karmic,lucid,maverick,sarge,etch,lenny,squeeze,sid}
+# Make it pbuilder-* if you know how to do it

=== added file 'check-symbols'
--- check-symbols	1970-01-01 00:00:00 +0000
+++ check-symbols	2010-06-17 18:54:27 +0000
@@ -0,0 +1,93 @@
+#!/bin/bash
+#
+# Copyright (C) 2006-2007 Daniel Holbach <daniel.holbach@xxxxxxxxxx>
+# Modified by Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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; version 2.
+# 
+# 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.
+#
+# See file /usr/share/common-licenses/GPL-2 for more details.
+#
+# ##################################################################
+#
+# This script is used to get a diff of the exported symbols of all .so files in
+# every binary package of package $1.
+
+DISTRO=$(lsb_release -c -s)
+VERSION=$(apt-cache madison "$1" | grep -- "$DISTRO"'/.*Sources$' | awk '{print $3}')
+PACKAGES=$(apt-cache showsrc "$1" | grep-dctrl -s Binary -F Version "$VERSION" | sed 's/Binary\:\ //g;s/\,//g' | sort -u)
+DEBLINE=""
+DEBUG=False
+
+if [[ -z $1 ]]; then
+    echo "Missing argument: source package name."
+    exit 1
+fi
+
+if [[ -z $2 ]]; then
+    DEBDIR="/var/cache/pbuilder/result"
+else
+    DEBDIR="$2"
+fi
+
+if [ `id -u` != "0" ]
+then
+    echo
+    echo -n "You might now be asked for your password, as this script requires"
+    echo " sudo privilegies in order to install the packages you want to check."
+    echo
+fi
+
+sudo apt-get install $PACKAGES
+echo
+
+for pack in $PACKAGES;
+do
+    for lib in `dpkg -L $pack | grep -E "\.so$" | sort -u`
+    do
+        LIBNAME=$(basename $lib)
+        nm -D $lib | cut -d' ' -f3 | sort -u > /tmp/$LIBNAME.old
+    done;
+    DEBLINE="$DEBLINE $DEBDIR/$pack*.deb "
+done
+
+if [[ -z $DEBLINE ]]; then
+    echo "Package doesn't exist: $1."
+    exit 1
+fi
+
+NOFILE=True
+for filename in $DEBLINE; do
+    if [[ ${filename: -5} != "*.deb" ]]; then
+        NOFILE=False
+        [[ $DEBUG != True ]] || echo "Found binary file: $filename"
+    fi
+done
+
+if [[ $NOFILE == True ]]; then
+    echo "No matching binary files found in «$DEBDIR»."
+    exit 1
+fi
+
+sudo dpkg -i $DEBLINE;
+echo
+
+for pack in $PACKAGES;
+do
+    for lib in `dpkg -L $pack | grep -E "\.so$" | sort -u`
+    do
+        LIBNAME=$(basename $lib)
+        nm -D $lib | cut -d' ' -f3 | sort -u > /tmp/$LIBNAME.new
+        echo "Checking: $lib"
+        diff -u /tmp/$LIBNAME.{old,new}
+        rm /tmp/$LIBNAME.{old,new}
+    done;
+done  

=== renamed file 'check-symbols' => 'check-symbols.moved'
=== added file 'dch-repeat'
--- dch-repeat	1970-01-01 00:00:00 +0000
+++ dch-repeat	2010-06-17 18:54:27 +0000
@@ -0,0 +1,187 @@
+#!/usr/bin/perl
+#
+# Copyright (C) 2007-2008 Canonical, Ltd.
+# Author: Kees Cook <kees@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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.
+#
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# This script is used to repeat a change log into an older release.  It
+# expects that --build-tree is laid out with each Ubuntu release as a
+# separate directory ("feisty", "edgy", etc).
+#
+# For example, if gimp had a security update prepared for Feisty in
+# $TREE/feisty/gimp-2.2.13, running "dch-repeat" in
+# $TREE/edgy/gimp-2.2.13 would pull in the latest changelog from the Feisty
+# build.
+
+use strict;
+use warnings;
+use Getopt::Long;
+use Cwd;
+use File::Glob ':glob';
+
+sub Usage
+{
+    print <<EOM;
+Usage: $0 [OPTIONS]
+ --build-tree PATH             Base of build trees
+ -s, --source-release RELEASE  Which release to snag a changelog from
+ --target-release RELEASE      Which release to build into
+ --devel-release RELEASE       Which release is the devel release
+ --pocket POCKET               Which pocket to use
+EOM
+    exit(0);
+}
+
+my @releases = ('dapper', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid', 'maverick');
+
+#Getopt::Long::Configure("bundling", "no_ignore_case");
+our $opt_build_tree = "/scratch/ubuntu/build";
+our $opt_devel_release = $releases[$#releases];
+our $opt_pocket = undef;
+our $opt_package = undef;
+our $opt_source_release = undef;
+our $opt_target_release = undef;
+
+our $opt_help = undef;
+our $opt_verbose = undef;
+
+Usage() unless (GetOptions(
+    "build-tree=s",
+    "source-release|s=s",
+    "target-release=s",
+    "package|p=s",
+    "help|h",
+    "verbose|v",
+));
+Usage() if ($opt_help);
+
+sub get_changelog($)
+{
+    my ($path) = @_;
+
+    open(LOG,"<$path/debian/changelog") || die "Cannot find changelog for '$path'\n";
+    my $log="";
+    my $line="";
+    # Skip to package name
+    $line = <LOG>;
+    # Collect changelog
+    while ($line=<LOG>) {
+        last if ($line=~/^\S/); # Stop on next changelog entry
+        $log.=$line;
+    }
+    close(LOG);
+    return $log;
+}
+
+sub replace_changelog($)
+{
+    my ($log) = @_;
+    open(LOG,"<debian/changelog") || die "Cannot find changelog\n";
+    open(NEWLOG,">debian/changelog.new") || die "Cannot write changelog\n";
+    my $line;
+    while ($line=<LOG>) {
+        last if ($line =~ /^\s*$/);
+        print NEWLOG $line || die "Changelog write failed: $!\n";
+    }
+    print NEWLOG $log || die "Changelog write failed: $!\n";
+    # Skip log items
+    while ($line=<LOG>) {
+        last if ($line =~ /^\S/);
+    }
+    print NEWLOG $line || die "Changelog write failed: $!\n";
+    while ($line=<LOG>) {
+        print NEWLOG $line || die "Changelog write failed: $!\n";
+    }
+    close(LOG);
+    close(NEWLOG) || die "Changelog close failed: $!\n";
+    rename("debian/changelog.new","debian/changelog") || die "Changelog rename failed: $!\n";
+}
+
+# By default examine Cwd for target release
+if (!defined($opt_target_release)) {
+    my $dir = getcwd;
+    if ($dir =~ m#^$opt_build_tree/([^/]+)/[^/]+$#) {
+        $opt_target_release = $1;
+    }
+    else {
+        die "No --target-release used, or current directory '$dir' outside of --build-tree of '$opt_build_tree'\n";
+    }
+}
+warn "target-release: '$opt_target_release'\n" if ($opt_verbose);
+
+# By default, examine changelog for package
+if (!defined($opt_package)) {
+    chomp($opt_package=`dpkg-parsechangelog | grep ^"Source: " | cut -d" " -f2`);
+    if ($opt_package eq "") {
+        die "Cannot figure out package name from changelog\n";
+    }
+}
+warn "package: '$opt_package\n" if ($opt_verbose);
+
+# By default, take changelog from newer release
+if (!defined($opt_source_release)) {
+    if ($opt_target_release eq $opt_devel_release) {
+        die "No more recent release than '$opt_devel_release' to take changelog from\n";
+    } 
+    foreach my $i (0 .. $#releases) {
+        if ($releases[$i] eq $opt_target_release) {
+            $opt_source_release = $releases[$i+1];
+        }
+    }
+    if (!defined($opt_source_release)) {
+        die "Could not locate a newer release than '$releases[$#releases]'";
+    }
+}
+warn "source-release: '$opt_source_release\n" if ($opt_verbose);
+warn "devel-release: '$opt_devel_release\n" if ($opt_verbose);
+
+# By default, use "security" pocket for non-devel releases
+if (!defined($opt_pocket)) {
+    if ($opt_target_release eq $opt_devel_release) {
+        $opt_pocket = "";
+    }
+    else {
+        $opt_pocket = "security";
+    }
+}
+warn "pocket: '$opt_pocket'\n" if ($opt_verbose);
+
+# Source location
+my @dirs = grep((-d $_),bsd_glob("$opt_build_tree/$opt_source_release/$opt_package-*"));
+if (scalar(@dirs)==0) {
+    die "Cannot find '$opt_build_tree/$opt_source_release/$opt_package-*'\n";
+}
+elsif (scalar(@dirs)>1) {
+    warn "Multiple possible source dirs, using '$dirs[0]'\n";
+}
+warn "source dir: '$dirs[0]'\n" if ($opt_verbose);
+my $log = get_changelog($dirs[0]);
+my $args = "";
+if ($opt_pocket ne "") {
+    $args = "-s -D $opt_target_release-$opt_pocket";
+}
+else {
+    $args = "-i";
+}
+system("dch $args auto-changelog")==0 || die "dch failed: $!\n";
+replace_changelog($log);
+
+# Report!
+system("dpkg-parsechangelog");
+
+exit(0);

=== renamed file 'dch-repeat' => 'dch-repeat.moved'
=== added directory 'debian'
=== renamed directory 'debian' => 'debian.moved'
=== added file 'debian/changelog'
--- debian/changelog	1970-01-01 00:00:00 +0000
+++ debian/changelog	2010-06-17 18:54:27 +0000
@@ -0,0 +1,1874 @@
+ubuntu-dev-tools (0.99) lucid; urgency=low
+
+  [ Andrey Voronov ]
+  * pbuilder-dist: change requested/system arch order in check (LP: #557097)
+
+  [ Michael Bienia ]
+  * Update the defaults for maverick and let requestsync and
+    pull-debian-source default to unstable (lp: #472837).
+
+ -- Michael Bienia <geser@xxxxxxxxxx>  Thu, 22 Apr 2010 21:31:48 +0200
+
+ubuntu-dev-tools (0.98) lucid; urgency=low
+
+  [ Ryan Kavanagh ]
+  * Added the merge-changelog script from
+    https://lists.ubuntu.com/archives/ubuntu-x/2009-June/000586.html for those
+    who need to manually merge packages.
+  * Fixed typo in doc/grab-merge.1
+
+  [ Soren Hansen ]
+  * Update get-branches to account for changes in LP's web UI. Really, someone
+    should update it to use the LP API, but for now, this will have to do.
+
+  [ Emmet Hikory ]
+  * doc/mk-sbuild.1: add missing options to summary
+
+  [ Michael Bienia ]
+  * lp-shell: Use "udt-lp-shell" as LP API consumer instead of the non-unique
+    "test" (lp: #558531).
+  * get-branches: Use the LP API to obtain a list of branches of a team.
+
+  [ Loïc Minier ]
+  * bash_completion/pbuilder-dist, dch-repeat: list maverick in possible
+    Ubuntu dists; the default dist for reverse-build-depends and
+    submittodebian should be changed in maverick.
+
+ -- Loïc Minier <loic.minier@xxxxxxxxxx>  Fri, 16 Apr 2010 12:58:22 +0200
+
+ubuntu-dev-tools (0.97) lucid; urgency=low
+
+  [ Michael Bienia ]
+  * lp-shell:
+    + Support all known LP service names.
+    + Add support for using different LP API versions.
+    + Add option to login anonymously into LP.
+  * ubuntutools/lp/lpapicache.py, ubuntutools/lp/libsupport.py: Add support
+    for different LP API versions.
+  * ubuntutools/lp/__init__.py: Set the '1.0' LP API version as default.
+  * massfile: Updated to 1.0 LP API.
+  * doc/requestsync.1: Update the paragraph about sponsoring (lp: #538990).
+  * pull-lp-source: Use (anonymously) the LP API to get the URL for the .dsc
+    file instead of screen scraping.
+  * Apply patch from Julian Andres Klode for the python-apt 0.8 API transition
+    (Closes: #572091) 
+  * ubuntutools/requestsync/mail.py: Fix some more encoding issues
+    (lp: #557828).
+  
+  [ Michael Vogt ]
+  * edit-patch:
+    - fix quilt mode when dpkg already applied all the patches 
+      (LP: #556297)
+
+ -- Michael Bienia <geser@xxxxxxxxxx>  Thu, 08 Apr 2010 12:59:59 +0200
+
+ubuntu-dev-tools (0.96) lucid; urgency=low
+
+  [ Michael Bienia ]
+  * ubuntu-build: missed updating a function call.
+
+  [ Emmet Hikory ]
+  * mk-sbuild: Really don't use build-arm-chroot
+
+  [ Daniel Holbach ]
+  * hugdaylist, requestsync, doc/requestsync.1: 
+    ubuntu-{main,universe}-sponsors → ubuntu-sponsors,
+    {ubuntu,motu}-release → ubuntu-release.
+  * ubuntutools/ppaput.py: removed, not necessary any more.
+  * debian/copyright: removed references to ppaput.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Mon, 15 Mar 2010 10:21:31 +0100
+
+ubuntu-dev-tools (0.95) lucid; urgency=low
+
+  * Update reverse-build-depends for lucid
+
+ -- Jonathan Riddell <jriddell@xxxxxxxxxx>  Mon, 08 Mar 2010 13:33:47 +0000
+
+ubuntu-dev-tools (0.94) lucid; urgency=low
+
+  [ Luca Falavigna ]
+  * docs/lp-set-dup.1: add manpage for lp-set-dup.
+  * debian/control: bump Standards-Version to 3.8.4, no changes needed.
+
+  [ Emmet Hikory ]
+  * mk-sbuild: switch to use qemu-debootstrap for foreign chroots
+  * mk-sbuild: allow any foreign chroot (may not work, but we can try)
+  * pbuilder-dist: allow any foreign chroot (may not work, but we can try)
+  * docs/pbuilder-dist.1: update manpage to indicate general architecture
+  * pbuilder-dist: add self. before target_distro in powerpc check
+
+ -- Emmet Hikory <persia@xxxxxxxxxx>  Mon, 08 Mar 2010 20:45:09 +0900
+
+ubuntu-dev-tools (0.93) lucid; urgency=low
+
+  [ Scott Moser ]
+  * rename mk-sbuild-lv to mk-sbuild, support union-type=aufs
+
+  [ Emmet Hikory ]
+  * Support qemu-arm-static -> qemu-kvm-extras-static transition
+  * mk-sbuild: automatically install qemu-kvm-extras-static if requested
+  * mk-sbuild: conditionally install lvm2 only for lvm-snapshot schroots
+  * mk-sbuild: rationalise architecture variables
+  * mk-sbuild: Generalise --type support and add "file" SCHROOT_TYPE
+  * mk-sbuild.1: Document the --type argument
+
+  [ Loïc Minier ]
+  * Demote qemu-kvm-extras-static to a Suggests since most people don't build
+    for armel.
+
+  [ Kees Cook ]
+  * requestsync: add -C to allow manually adding changelog when missing
+    (LP: #518574).
+  * mk-sbuild: clean up and make slight adjustments to new lvm/dir/file logic.
+  * mk-sbuild.1: update documentation to reflect alternative config file
+    names for distro and schroot type overrides.
+  * mk-sbuild, docs/mk-sbuild.1: document DEBOOTSTRAP_MIRROR for good
+    measure, thanks to Paul Holcomb.
+
+  [ Michael Bienia ]
+  * ubuntutools/requestsync/mail.py: Encode the report to utf-8 before passing
+    it to gpg for signing (LP: #522316).
+  * Add support for the other LP service roots (edge is still default)
+  * Depend on python-launchpadlib >= 1.5.4
+  * Also check package sets for upload permissions.
+  * lp-set-dup: Don't crash when accessing private bugs (LP: #525539)
+  * requestsync: Subscribe 'ubuntu-release' to Feature Freeze exceptions
+    (updated to current policy; LP: #532740)
+
+  [ Michael Vogt ]
+  * edit-patch: add wrapper around cdbs-edit-patch, dpatch-edit-patch, quilt
+    to transparently deal with the various patch systems.
+
+  [ Colin Watson ]
+  * lp-shell: Disable default apport excepthook, as this is intended for
+    interactive use.
+
+ -- Steve Langasek <steve.langasek@xxxxxxxxxx>  Fri, 05 Mar 2010 19:16:32 -0800
+
+ubuntu-dev-tools (0.92) lucid; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * bash_completion/pbuilder-dist:
+     - Enable tab-completion for pbuilder-lucid and cowbuilder-lucid.
+
+  [ Emmet Hikory ]
+  * mk-sbuild-lv: support foreign armel schroots
+  * mk-sbuild-lv: use --arch=foo rather than --arch foo for debootstrap
+  * pbuilder-dist: Allow architecture-switching to armel on i386/amd64
+  * pbuilder-dist: use --arch=foo rather than --arch foo for debootstrap
+  * pbuilder-dist: change --mirror logic to use -ports when appropriate
+  * docs/pbuilder-dist.1: Document architecture-switching for armel
+  * debian/control: add qemu-arm-static to Recommends:
+
+  [ Michael Bienia ]
+  * ubuntutools/requestsync/mail.py:
+    Map "sid" back to "unstable" (and "squeeze" to "testing") else rmadison
+    gets a Python traceback from the remote site instead of the expected data
+    (lp: #508794).
+
+  [ Kees Cook ]
+  * mk-sbuild-lv: adjust schroot.conf template to document the -source
+    change further.
+
+ -- Emmet Hikory <persia@xxxxxxxxxx>  Wed, 03 Feb 2010 11:39:12 -0800
+
+ubuntu-dev-tools (0.91) lucid; urgency=low
+
+  * mk-sbuild-lv: drop deprecated keys from schroot.conf template
+  * mk-sbuild-lv: enable -source access after security improvements of
+                  schroot.conf template in 0.88
+  * mk-sbuild-lv: document sudo requirement for -source access in final output
+
+ -- Emmet Hikory <persia@xxxxxxxxxx>  Sun, 17 Jan 2010 11:08:32 +0900
+
+ubuntu-dev-tools (0.90) lucid; urgency=low
+
+  * Include changes which were committed to 0.88, but which I forgot to
+    upload.
+
+ -- Martin Pitt <martin.pitt@xxxxxxxxxx>  Sat, 16 Jan 2010 16:28:54 +0100
+
+ubuntu-dev-tools (0.89) lucid; urgency=low
+
+  * Add lp-shell: Open an interactive Python shell with a
+    launchpadlib.Launchpad object "lp" which is ready for use.
+    If the first command line argument is "staging", this will be on staging
+    instead of production.
+  * Add doc/lp-shell.1: Manpage.
+
+ -- Martin Pitt <martin.pitt@xxxxxxxxxx>  Wed, 13 Jan 2010 14:34:05 +0100
+
+ubuntu-dev-tools (0.88) lucid; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * pbuilder-dist:
+     - Set "--mirror" option also for Ubuntu chroots, so that they work
+       on Debian.
+
+  [ Michael Bienia ]
+  * requestsync: Fix a bug that prevented sync requests for new packages with
+    a version smaller than 0.
+  * ubuntutools/requestsync/common.py: Decode the edited report file back from
+    UTF-8 so it can be encoded again in the next iteration (lp: #504263)
+
+  [ Luca Falavigna ]
+  * Fix some typos in man pages.
+
+  [ Kees Cook ]
+  * mk-sbuild-lv: drop deprecated sbuild configuration fields from template.
+  * what-patch: updated for 3.0 source format.
+
+ -- Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>  Fri, 15 Jan 2010 14:24:51 +0100
+
+ubuntu-dev-tools (0.87) lucid; urgency=low
+
+  * Revert the submittodebian change to inline patches.  This is a style
+    choice, the patch length has nothing to do with it; if there's demand for
+    patch inlining, this should be made a (non-default) option to
+    submittodebian.
+
+ -- Steve Langasek <steve.langasek@xxxxxxxxxx>  Mon, 28 Dec 2009 14:41:31 -0800
+
+ubuntu-dev-tools (0.86) lucid; urgency=low
+
+  [ Emmet Hikory ]
+  * mk-sbuild-lv: Add richer support for ports architectures in Ubuntu
+  * mk-sbuild-lv: Really use -security for SOURCES_SECURITY_SUITE in Ubuntu
+
+  [ Kumar Appaiah ]
+  * submittodebian: if patch is relatively small (shorter than fifty
+    lines), display it inline instead of attaching to the report.
+
+  [ Michael Bienia ]
+  * ubuntutools/requestsync/common.py: convert the changelog into a unicode
+    string (lp: #498349)
+  * ubuntutools/requestsync/mail.py: rmadison() returns now the most recent
+    source line (Closes: #560758) 
+
+  [ Iain Lane ]
+  * pull-debian-source: Return the most recent source line. Depend on
+    libapt-pkg-perl for the Debian version comparison required for this.
+
+  [ Steve Langasek ]
+  * submittodebian: os.system() doesn't throw exceptions, so attempt a
+    'bzr diff' first and check the return value; otherwise we get no output
+    at all from submittodebian in the non-bzr case.
+
+ -- Steve Langasek <steve.langasek@xxxxxxxxxx>  Sun, 27 Dec 2009 13:03:56 -0800
+
+ubuntu-dev-tools (0.85) lucid; urgency=low
+
+  * submittodebian: switch to use lucid as the default distro tag.
+  * submittodebian: if the package is in bzr, look for bzr metadata first
+    before looking for a previous package revision in the parent dir.
+
+ -- Steve Langasek <steve.langasek@xxxxxxxxxx>  Fri, 11 Dec 2009 13:46:31 -0800
+
+ubuntu-dev-tools (0.84) lucid; urgency=low
+
+  [ Michael Bienia ]
+  * update-maintainer: Remove the check for LP credentials again as this
+    script doesn't use the LP API (Closes: #558598).
+  * Rename buildd to ubuntu-build to resolve filename conflict
+    (Closes: #558816).
+
+  [ Manny Vindiola ]
+  * grab-merge: Only download files listed multiple times in REPORT once
+
+  [ Luca Falavigna ]
+  * ubuntutools/lp/lpapicache.py: recent lazr.restfulclient does use of
+    unicode strings, use basestring to catch bot str and unicode.
+  * Depend on python-lazr.restfulclient, package was recently renamed
+    from python-lazr-restfulclient to match Python naming schema.
+
+  [ Jonathan Davies ]
+  * dch-repeat: Added Lucid to releases.
+
+ -- Luca Falavigna <dktrkranz@xxxxxxxxxx>  Mon, 07 Dec 2009 10:18:55 +0100
+
+ubuntu-dev-tools (0.83) lucid; urgency=low
+
+  [ Iain Lane ]
+  * lpapicache: Do not immediately bail out if we have no credentials to
+    login. Clients are now expected to handle the lack of credentials
+    themselves.
+  * pull-lp-source: Make LP API use optional - fall back to a hardcoded
+    default release if we aren't using it. (LP: #477670)
+  * pull-lp-source: Detect more failure conditions and give a nice error
+    instead of a trace
+  * buildd, requestsync, grab-attachments, hugdaylist, update-maintainer: 
+    Detect & bail if we don't have credentials and need them. These scripts
+    cannot continue under those circumstances.
+
+  [ Kees Cook ]
+  * mk-sbuild-lv: switch to ext4 by default.
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * pbuilder-dist, doc/pbuilder-dist.1:
+     - Add "--debug-echo" option which prints the resulting pbuilder/cowbuilder
+       commands instead of executing it.
+
+  [ Martin Pitt ]
+  * lp-project-upload: Generate tarball signature if it is not present yet.
+  * lp-project-upload: Invoke editor to specify changelog and release notes,
+    and add those to the project release.
+
+ -- Martin Pitt <martin.pitt@xxxxxxxxxx>  Fri, 20 Nov 2009 16:59:08 -0600
+
+ubuntu-dev-tools (0.82) lucid; urgency=low
+
+  [ Iain Lane ]
+  * debian/control: Re-add XS-Python-Version - this is more standard
+  * debian/pyversions: Drop
+  * pbuilder-dist: Don't pass --logfile if we are trying to log in to the
+    chroot - the logfile option swallows the prompt, and we probably don't
+    want to log if we are using login anyway.
+
+  [ Nathan Handler ]
+  * debian/control: Mention lp-project-upload in Description
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * debian/control:
+     - Improve description of pbuilder-dist and mention cowbuilder-dist.
+  * pbuilder-dist:
+     - Abort if the host's architecture can't be determined.
+     - Error out instead of showing a traceback if pbuilder-dist is called
+       without any argument.
+  * pbuilder-dist, ubuntutools/misc.py:
+     - Move the functions used to determine the hosts architecture and
+       distribution to the ubuntutools.misc module.
+  * setup-packaging-environment, setup.py, debian/copyright, debian/control:
+     - Add a new script, setup-packaging-environment.
+
+  [ Luca Falavigna ]
+  * ubuntutools/requestsync/lp.py: explicitly import exceptions for
+    backward compatibility with Python 2.5.
+  * debian/control: re-enable support for python2.5.
+  * debian/copyright: update copyright holders.
+
+  [ Michael Bienia ]
+  * requestsync: request syncs from 'testing' by default (should be changed
+    back to 'unstable' for lucid+1)
+  * pull-debian-source: change default release to pull from to 'testing'
+
+ -- Iain Lane <laney@xxxxxxxxxx>  Fri, 06 Nov 2009 10:37:43 +0000
+
+ubuntu-dev-tools (0.81) karmic; urgency=low
+
+  [ Iain Lane ]
+  * requestsync: Give an error message if no changelog entries - happens if,
+    for example, the new package's changelog hasn't yet been published on p.d.o
+  * update-maintainer: Also check if package is in experimental when looking
+    who to update maintainer to. 
+  * update-maintainer: Prefer updating control.in to control; this is used by
+    some Debian packages, notably those maintained by pkg-gnome.
+  * debian/control: Update standards-version to 3.8.3, no changes
+  * debian/control, debian/pyversions: Remove XS-Python version to
+    debian/pyversions to silence a warning
+
+  [ Jonathan Davies ]
+  * debian/control: Included a short description of each script (LP: #406658).
+
+  [ Nathan Handler ]
+  * debian/control: Mention pull-revu-source in description
+
+  [ Joe Bernard ]
+  * Launchpad API changed causing pull-lp-source to fail to parse the .dsc
+    file from the URL contents (LP: #436006).
+
+ -- Iain Lane <laney@xxxxxxxxxx>  Fri, 25 Sep 2009 20:20:49 +0100
+
+ubuntu-dev-tools (0.80) karmic; urgency=low
+
+  * mk-sbuild-lv: Export http_proxy. LP: #416438
+   
+ -- Michael Terry <michael.terry@xxxxxxxxxxxxx>  Thu, 10 Sep 2009 10:53:30 -0400
+
+ubuntu-dev-tools (0.79) karmic; urgency=low
+
+  * Add lp-project-upload: Upload a release tarball to a Launchpad project.
+  * Add doc/lp-project-upload.1: Corresponding manpage.
+  * setup.py: Add lp-project-upload.
+  * debian/copyright: Add lp-project-upload.
+
+ -- Martin Pitt <martin.pitt@xxxxxxxxxx>  Sat, 05 Sep 2009 16:42:10 +0200
+
+ubuntu-dev-tools (0.78) karmic; urgency=low
+
+  [ Nathan Handler ]
+  * setup.py: Add pull-revu-source to list of scripts
+
+  [ Steve Langasek ]
+  * Set XS-Python-Version to 2.6 or better, due to use of 2.6-specific
+    syntax in requestsync.
+  * Bump the python-all-dev build-dep as well
+
+ -- Steve Langasek <steve.langasek@xxxxxxxxxx>  Tue, 01 Sep 2009 12:17:03 -0700
+
+ubuntu-dev-tools (0.77) karmic; urgency=low
+
+  [ Nathan Handler ]
+  * pull-revu-source: Update to use dsc.py to get dsc URL
+
+  [ Michael Bienia ]
+  * Install also the ubuntutools/requestsync/* modules (lp: #421627)
+
+ -- Michael Bienia <geser@xxxxxxxxxx>  Tue, 01 Sep 2009 10:56:29 +0200
+
+ubuntu-dev-tools (0.76) karmic; urgency=low
+
+  [ Nicolas Valcárcel ]
+  * mk-sbuild-lv:
+    - Add check for built-in dm_snapshot (LP: #398414)
+
+  [ Andreas Moog ]
+  * update-maintainer:
+    - Don't silently fail when Maintainer-Field contains a comment
+      in brackets. (LP: #397144)
+    - Don't add second XSBC-Original-Maintainer if Maintainer was set
+      to Motu or Core-Dev.
+
+  [ Michael Bienia ]
+  * Drop python-launchpad-bugs from Depends.
+  * Add python-lazr-restfulclient to Depends.
+  * buildd: Add a --batch mode for batch retrying/rescoring of packages.
+  * requestsync:
+    - Use UBU* environment variables before the DEB* ones (lp: #400133)
+    - Split requestsync into a "mail" module and a "lpapi" module and use
+      the LP API only when --lp was used. In "mail" mode requestsync has
+      to ask some more questions for parts it can't find out without LP API.
+      (lp: #406659, #416955)
+
+  [ Iain Lane ]
+  * requestsync:
+    - Guard some calls when -n is specified
+    - Fetch changelog of specified version, not current version. If an
+      experimenal upload happened after the unstable one we're syncing, this
+      is considered to be current by p.d.o and we would get those changelog
+      entries in the sync request
+    - Remove trailing fullstop from sync bug title
+  * suspicious-source: Add *.hs *.el *.css to whitelist
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * pbuilder-dist:
+     - Expand "~" in PBUILDFOLDER to the user's home directory.
+     - If there's a "etc/<distro>/apt.conf" file inside the build result
+       directory, pass it to pbuilder as --aptconfdir. Thanks to Paul Novotny
+       and Ryan Pavlik (LP: #363043).
+
+  [ Luca Falavigna ]
+  * Switch to python-support to ease initial import into Debian:
+    - debian/control: build-depend on python-support instead of pycentral,
+      also remove unneeded XB-Python-Version field from binary stanza.
+    - debian/rules: set DEB_PYTHON_SYSTEM to pysupport.
+    - ubuntu-dev-tools.preinst: remove stale pycentral files on upgrades.
+
+  [ Nathan Handler ]
+  * Add pull-revu-source and doc/pull-revu-source.1
+  * Update debian/copyright to include pull-revu-source
+
+ -- Nathan Handler <nhandler@xxxxxxxxxx>  Sun, 30 Aug 2009 17:24:23 +0000
+
+ubuntu-dev-tools (0.75) karmic; urgency=low
+
+  [ Michael Bienia ]
+  * buildd:
+    - Use the LP API for retrying or rescoring builds.
+  * requestsync:
+    - Fix check for sponsorship when a new package should get synced.
+    - Add "done" as last email command when emailing the sync request
+      to stop parsing of the email body for further email commands 
+      (lp: #372555)
+
+  [ Jonathan Davies ]
+  * update-maintainer:
+    - Rewrote in Python and adapted to use Maintainer field spec approved by
+      the Technical Board at:
+      - https://lists.ubuntu.com/archives/ubuntu-devel/2009-May/028213.html
+    - Do not make changes if maintainer email is set to an
+      @ubuntu.com email address.
+  * requestsync:
+    - Adapt to use new checkIsInDebian() function in ubuntutools/packages.py.
+    - urlopener module is no longer required here.
+  * pull-lp-source:
+    - Return an error message if dget is not installed.
+    - Use os.path.exists() instead of catching an error message
+      to check if dget is installed.
+  * TODO: pull-lp-source task done.
+  * ubuntutools/packages.py: Created checkIsInDebian() function.
+  * ubuntutools/lp/functions.py: Improved error messages, and made prettier
+    functions.
+  * ubuntutools/lp/libsupport.py: Fail if we're unable to import launchpadlib
+    (we need it to run stuff).
+  * ubuntutools/lp/urlopener.py: Removed - module no longer needed.
+  * ubuntutools/lp/cookie.py: Removed - module no longer needed - we use
+    Launchpad API support now.
+  * buildd:
+    - Use launchpadlib to check the Ubuntu release is valid.
+    - Moved Launchpad module imports here - speed up usage parsing to improve
+      user experience.
+    - Do not display override message if --arch is not used.
+    - Fix permissions warning message and do not mention teams as we check on
+      a per package basis.
+
+  [ Colin Watson ]
+  * Rewrite 404main using python-apt. Note that this requires python-apt
+    0.7.9, not in jaunty.
+  * Get rid of the last remaining use of subprocess.Popen(shell=True) in
+    404main.
+
+  [ Luke Yelavich ]
+  * lp-set-dup: Add missing % needed for string substitution. Thanks to
+    Robert Ancell for the fix.
+
+  [ Iain Lane ]
+  * requestsync: We need to use the output from madison, not just throw it
+    away.
+
+ -- Michael Bienia <geser@xxxxxxxxxx>  Mon, 06 Jul 2009 17:46:21 +0200
+
+ubuntu-dev-tools (0.74) karmic; urgency=low
+
+  [ Kees Cook ]
+  * mk-sbuild-lv:
+    - Skip security repo for Debian unstable, thanks to Ryan Niebur
+      (LP: #371569).
+    - Change directory out of the way of schroot problems.
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * grab-merge:
+     - Show an error message if the package doesn't exist.
+     - Be paraonic and add "--one-file-system" to the rm call.
+     - Delete the directory just after creating it if the package
+       doesn't exist.
+
+  [ Iain Lane ]
+  * ubuntutools/lp/lp_functions.py,
+    ubuntutools/lp/udtexceptions.py:
+    - Add new public functions that expose features from LP API
+    - Modify isLPTeamMember to use LP API
+  * requestsync
+    - Use new functions to check if user can upload requested package directly
+      instead of checking team membership
+    - Default to current development release if no release is specified on
+      commandline
+    - Correct bug supervisor team to ubuntu-bugcontrol (LP: #374563)
+    - Remove team names from sponsorship message - makes the function much
+      simpler
+  * buildd
+    - Check if user has upload privileges instead of checking for team
+      membership when seeing if operations are permitted 
+
+  [ Colin Watson ]
+  * update-maintainer:
+    - Convert to getopt so that '--section main' works as well as
+      '--section=main'.
+
+  [ Anders Kaseorg ]
+  * ubuntutools/lp/functions.py:
+    - Simplify isLPTeamMember.
+
+  [ Nathan Handler ]
+  * pull-debian-source: Modify to work for packages not in main (LP: #379822)
+
+ -- Nathan Handler <nhandler@xxxxxxxxxx>  Sat, 23 May 2009 20:41:50 +0000
+
+ubuntu-dev-tools (0.73) karmic; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * pbuilder-dist:
+    - Fallback to calling lsb_release if /etc/lsb-release doesn't
+       exist; this makes it possible to run pbuilder-dist on Debian.
+
+  [ Nathan Handler ]
+  * pull-debian-source:
+    - Use Getopt::Long
+
+  [ Colin Watson ]
+  * submittodebian:
+    - New release cycle; use "karmic" usertag.
+  * dch-repeat:
+    - Drop EOLed gutsy and add karmic.
+  * pull-lp-source:
+    - Set default release to karmic.
+  * reverse-build-depends:
+    - Set default release to karmic.
+  * bash_completion/pbuilder-dist:
+    - Add karmic.
+    - Add squeeze.
+  * requestsync:
+    - Send a "Content-Type: text/plain; charset=UTF-8" header (LP: #246307).
+
+  [ Daniel Hahler ]
+  * grab-merge: Output error message in case wget/rsync fails.
+
+ -- Daniel Hahler <ubuntu@xxxxxxxxxx>  Thu, 30 Apr 2009 22:18:38 +0200
+
+ubuntu-dev-tools (0.72) jaunty; urgency=low
+
+  [ Jonathan Davies ]
+  * README.updates: Added - lists steps to take when updating this package.
+  * grab-merge: Added --help option and manpage (LP: #349109).
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * pbuilder-dist:
+     - Add squeeze as a Debian distribution. Thanks to Marco Rodrigues.
+
+  [ Nathan Handler ]
+  * pull-debian-source:
+    - Add support for etch/oldstable
+    - Make script work for codenames (etch, lenny, squeeze, sid)
+
+  [ Ryan Kavanagh ]
+  * Ported devscripts' build-rdeps to Ubuntu and replaced
+    reverse-build-depends. Updated it's manpage. (LP: #272273)
+
+  [ Kees Cook ]
+  * mk-sbuild-lv:
+    - Fully handle missing build log directories (LP: #342154).
+    - More generalized approach to Distro-specific logic (LP: #342158).
+
+  [ Scott Kitterman ]
+  * dgetlp:
+    - Port to hashlib module instead of md5 (deprecated in Python 2.6)
+  * Bump minimum python-all-dev version to 2.5
+
+ -- Scott Kitterman <scott@xxxxxxxxxxxxx>  Wed, 15 Apr 2009 22:51:14 -0400
+
+ubuntu-dev-tools (0.71) jaunty; urgency=low
+
+  * requestsync: Fix unclosed string literal (LP: #346794)
+
+ -- Iain Lane <laney@xxxxxxxxxx>  Sun, 22 Mar 2009 14:40:19 +0000
+
+ubuntu-dev-tools (0.70) jaunty; urgency=low
+
+  [ Mitsuya Shibata ]
+  * requestsync: Added -e option for FeatureFreezeException explanations and
+    updated manpage.
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Thu, 19 Mar 2009 19:54:13 +0000
+
+ubuntu-dev-tools (0.69) jaunty; urgency=low
+
+  * mk-sbuild-lv: add --force-yes when installing $BUILD_PKGS (needed for
+    Dapper at least)
+  * mk-sbuild-lv: update sed command to use '-i' instead of redirecting
+    output to the opened file
+
+ -- Jamie Strandboge <jamie@xxxxxxxxxx>  Tue, 17 Mar 2009 11:28:38 -0500
+
+ubuntu-dev-tools (0.68) jaunty; urgency=low
+
+  * debian/control: Moved debootstrap to Recommends from Depends.
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Sun, 15 Mar 2009 15:30:48 +0000
+
+ubuntu-dev-tools (0.67) jaunty; urgency=low
+
+  [ Jonathan Davies ]
+  * mk-sbuild-lv: Changed default behaviour so that the initial build and log
+    directories are not created on first run; instead read settings file and
+    check if they exist (LP: #342154).
+  * requestsync: Reverted old madison.php workaround (LP: #183346).
+
+  [ Ryan Kavanagh ]
+  * mk-sbuild-lv: Added support for Debian chroots. Updated manpage.
+    (LP: #342158)
+
+  [ Mitsuya Shibata ]
+  * pull-debian-source: Detect existence of dget in multi-path environment.
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Sat, 14 Mar 2009 22:40:05 +0000
+
+ubuntu-dev-tools (0.66) jaunty; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * debian/control:
+     - Add "debootstrap" as a Recommends (LP: #334848).
+  * pbuilder-dist:
+     - Better error messages if cowbuilder/pbuilder/debootstrap isn't installed.
+
+  [ Marco Rodrigues ]
+  * Remove workaround for Debian madison, it works fine now.
+
+  [ Nathan Handler ]
+  * pull-debian-source:
+    - Check if 'dget' is available
+    - Update Copyright/License info
+  * debian/copyright:
+    - Update my copyright information
+
+  [ Jonathan Davies ]
+  * Added grab-merge from merges.ubuntu.com (LP: #155098).
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Thu, 09 Mar 2009 17:01:19 +0000
+
+ubuntu-dev-tools (0.65) jaunty; urgency=low
+
+  [ Colin Watson ]
+  * manage-credentials: Fix typo.
+
+  [ Jonathan Davies ]
+  * requestsync: Only check existing reports if the --lp flag is used.
+
+  [ Luca Falavigna ]
+  * Add per-package upload permission checks:
+    - ubuntutools/lp/functions.py: implement isPerPackageUploader.
+    - requestsync: check if submitter has per-package upload permission
+      using isPerPackageUploader function and adjust report accordingly.
+
+  [ Iain Lane ]
+  * requestsync: Drop "please" in bug titles, per recent discussion on the
+    ubuntu-bugsquad ML.
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Tue, 03 Mar 2009 19:55:19 +0000
+
+ubuntu-dev-tools (0.64) jaunty; urgency=low
+
+  * Import urllib2 and sys in lp/functions.py, fixing requestsync.
+  * Import ubuntutools.common explicitely in buildd and requestsync to get the
+    https_proxy fix.
+
+ -- Loic Minier <lool@xxxxxxxx>  Fri, 06 Feb 2009 12:18:13 +0100
+
+ubuntu-dev-tools (0.63) jaunty; urgency=low
+
+  * debian/links: add it (forgot to do so before).
+  * bash-completion/pbuilder-dist: recognize cowbuilder- and -jaunty.
+  * pbuilder-dist:
+     - Fixed a bug which broke pbuilder-dist when "build" was omited; just
+       giving a .dsc works now.
+     - {p,cow}builder-dist will now complain if you try to build a .changes
+       file (or anything else that isn't a .dsc).
+
+ -- Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>  Thu, 05 Feb 2009 16:19:03 +0100
+
+ubuntu-dev-tools (0.62) jaunty; urgency=low
+
+  * Fix ubuntutools.lp.libsupport import in lp-set-dup.
+
+ -- Loic Minier <lool@xxxxxxxx>  Wed, 04 Feb 2009 12:04:47 +0100
+
+ubuntu-dev-tools (0.61) jaunty; urgency=low
+
+  [ Terence Simpson ]
+  * dgetlp: Replaced Bash version with a new Python script.
+
+  [ Luca Falavigna ]
+  * setup.py: install ubuntutools/lp files.
+
+ -- Luca Falavigna <dktrkranz@xxxxxxxxxx>  Tue, 03 Feb 2009 13:34:42 +0100
+
+ubuntu-dev-tools (0.60) jaunty; urgency=low
+
+  [ Jonathan Davies ]
+  * ubuntutools/common.py: Now split into multiple files depending on
+    function.
+  * Adjusted imports on all files as necessary for the change above.
+  * Removed ubuntutools/misc.py's mkdir function - superseded by
+    os.makedirs().
+  * dgetlp: Improved error message to show that dgetlp only accepts HTTP
+    URLs (LP: #322051).
+
+  [ Iain Lane ]
+  * requestsync: Only attempt to change bug importance if in ubuntu-dev, as it
+    will fail otherwise (LP: #320984).
+  * ubuntutools/lp/functions.py: Rename urlopener import as it conflicts with
+    a variable, causing an error.
+
+  [ Luca Falavigna ]
+  * pull-debian-source: do not fail if package name contains a hypen.
+  * buildd: display help message if no parameters are passed.
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Sun, 01 Feb 2009 10:55:42 +0000
+
+ubuntu-dev-tools (0.59) jaunty; urgency=low
+
+  * Move /etc/bash_completion.d/pbuilder-dist/pbuilder-dist created in
+    pre-0.30 versions to /etc/bash_completion.d/pbuilder-dist in the preinst.
+
+ -- Loic Minier <lool@xxxxxxxx>  Mon, 19 Jan 2009 18:02:55 +0100
+
+ubuntu-dev-tools (0.58) jaunty; urgency=low
+
+  [ Loic Minier ]
+  * Fix a bunch of hyphen-used-as-minus-sign lintian informational tags.
+  * Don't repeat Section in the binary package's control chunk (pleases
+    lintian).
+  * New script, lp-set-dup, allows marking a bug and all its dups as a
+    duplicate of a new main bug.
+   * Re-add debian/pycompat to have an idempotent clean:: as cdbs creates the
+     file during clean; Debian #512300.
+
+ -- Loic Minier <lool@xxxxxxxx>  Mon, 19 Jan 2009 17:45:26 +0100
+
+ubuntu-dev-tools (0.57) jaunty; urgency=low
+
+  * requestsync: Skip existing bug check if no credentials are
+    found (LP: #318120).
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Sat, 17 Jan 2009 22:02:39 +0000
+
+ubuntu-dev-tools (0.56) jaunty; urgency=low
+
+  * manage-credentials: Tighted security by making credentials files and
+    folder world unreadable.
+  * common.py: Improved no credentials found error message to show which
+    consumer token is needed.
+  * requestsync: Catch credentials error to hide traceback.
+  * Moved common.py to ubuntutools/ subdirectory to avoid possible conflicts
+    in Python packaging and fixed all imports as necessary.
+  * debian/ubuntu-dev-tools.install: Removed common.py entry. 
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Sat, 17 Jan 2009 11:32:33 +0000
+
+ubuntu-dev-tools (0.55) jaunty; urgency=low
+
+  * manage-credentials: Use common.py's mkdir function to create as many
+    subdirectories as necessary for the credentials directory (LP: #317317).
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Thu, 15 Jan 2009 12:33:31 +0000
+
+ubuntu-dev-tools (0.54) jaunty; urgency=low
+
+  * manage-credentials:
+    - Save credentials to ~/.cache/lp_credentials/ by
+      default.
+    - Set service option default to edge.
+  * doc/manage-credentials.1: Update as necessary for the above.
+  * common.py:
+    - When credentials are not found, ask user to see
+      manage-credentials manpage.
+    - Load all token files for the consumer specified in the above
+      directory as necessary. 
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Wed, 14 Jan 2009 19:39:35 +0000
+
+ubuntu-dev-tools (0.53) jaunty; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * debian/copyright:
+     - Add information about manage-credentials.
+
+  [ Daniel Holbach ]
+  * debian/control: replace 'sb-release' with lsb-release, make package 
+    installable again.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Wed, 14 Jan 2009 16:27:34 +0100
+
+ubuntu-dev-tools (0.52) jaunty; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * pbuilder-dist.new:
+    - Add compatibility for cowbuilder.
+    - Fix the mainonly support.
+    - Rename build.log to last_operation.log.
+  * pbuilder-dist, pbuilder-dist.new:
+    - Replace pbuilder-dist with pbuilder-dist.new.
+  * debian/links:
+    - Symlink /usr/bin/cowbuilder-dist to /usr/bin/pbuilder-dist, and the
+      same with the manpage.
+  * debian/control:
+    - Add cowdancer as alternative recommends to pbuilder.
+  * doc/pbuilder-dist.1:
+    - Update it to explain the usage for the new pbuilder-dist script.
+  * doc/mk-sbuild-lv.1:
+    - Fix an error (and get ride of a lintian warning).
+
+  [ Nathan Handler ]
+  * pull-debian-source:
+    - Pass -xu arguments to dget to be consistant with pull-lp-source
+    - Add support for packages with a name beginning with "lib" (LP: #314732)
+
+  [ Kees Cook ]
+  * mk-sbuild-lv:
+    - add --skip-updates to allow building security-only chroots.
+    - add "apt-utils" as a default package for sane dist-upgrades.
+
+  [ Jonathan Davies ]
+  * buildd: Don't show arch override message if operation to perform is
+    'status'. 
+  * requestsync: If package is new, check the Ubuntu Archive team's bug list
+    for possible duplicate requests.
+  * doc/manage-credentials.1: Written up.
+  * doc/requestsync.1: Changed documentation to launchpadlib related-stuff.
+
+  [ Luca Falavigna ]
+  * requestsync:
+    - Catch AssertionError exception if rmadison returns with an error.
+
+  [ Markus Korn ]
+  * Added manage-credentials, a tool to create (and manage) credentials
+    which are used to access launchpad via the API.
+  * Ported: hugdaylist, massfile, grab-attachment and requestsync to
+    launchpadlib.
+  * Other misc. fixes and tweaks.
+  * Install common.py to correct location with py_modules and remove
+    hardcoded path from files.
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Wed, 14 Jan 2009 13:21:35 +0000
+
+ubuntu-dev-tools (0.51) jaunty; urgency=low
+
+  * buildd: Added checks for arch-indep packages and packages which have no
+    builds in a release.
+  * hugdaylist: String improvements.
+  * requestsync:
+    - Use optparse instead of getopt for option parsing.
+    - Skip existing bug report check if python-launchpad-bugs is not
+      installed.
+    - Implemented sleeps to --lp bug reporting in case of a slow
+      Launchpad to stop mass bug filing (LP: #311289).
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Tue, 30 Dec 2008 15:51:55 +0000 
+
+ubuntu-dev-tools (0.50.1) jaunty; urgency=low
+
+  * Modified setup.py to actually install pull-debian-source.
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Tue, 30 Dec 2008 15:39:35 +0000
+
+ubuntu-dev-tools (0.50) jaunty; urgency=low
+
+  [ Nathan Handler ]
+  * Add pull-debian-source script (LP: #289141)
+    - debian/copyright:
+      + Add myself to the Upstream Authors and Copyright sections
+      + Add pull-debian-source to the License section
+    - Add doc/pull-debian-source.1
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * debian/control: Add perl-modules and libwww-perl as Recommended packages
+
+  [ Iain Lane ]
+  * pbuilder-dist.new: Add 'experimental' to list of known Debian releases.
+    pbuilder-experimental works fine with pbuilder-dist.new.
+
+  [ Jonathan Davies ]
+  * buildd: Show which architectures are available in help and created a
+    list of them for easy addition of new ones.
+  * requestsync:
+    - Readd sponsorship flag and related documentation in
+      doc/requestsync.1 (LP: #270605).
+    - Do not check package's Launchpad bug list page if the package to be
+      synced is a new package. As this page does not exist for
+      it (LP: #312297).
+
+ -- Jonathan Davies <jpds@xxxxxxxxxx>  Mon, 29 Dec 2008 18:45:02 +0000
+
+ubuntu-dev-tools (0.49) jaunty; urgency=low
+
+  [ Sarah Hobbs ]
+  * Add armel as an arch to buildd
+
+  [ Adrien Cunin ]
+  * Added ${misc:Depends} to dependencies to make lintian quiet
+
+ -- Adrien Cunin <adri2000@xxxxxxxxxx>  Sun, 30 Nov 2008 23:23:01 +0100
+
+ubuntu-dev-tools (0.48) jaunty; urgency=low
+
+  * common.py, checkReleaseExists() and checkSourceExists(): Add support for
+    specifying pockets (e. g. release name "intrepid-proposed").
+  * buildd: Strip off pocket from release name when parsing the builds page,
+    so that this script works for pockets, too.
+
+ -- Martin Pitt <martin.pitt@xxxxxxxxxx>  Tue, 11 Nov 2008 10:15:25 +0100
+
+ubuntu-dev-tools (0.47) jaunty; urgency=low
+
+  [ Kees Cook ]
+  * dch-repeat: drop "feisty" from the list of known releases.
+  * mk-sbuild-lv:
+    - only use --no-install-recommends on gutsy and later.
+    - catch errors produced by "finish.sh".
+
+  [ James Westby ]
+  * requestsync: tell the user when you are waiting for input from them after
+    giving the sponsorship warning, rather than appearing to hang.
+
+  [ Michael Casadevall ]
+  * buildd: Fixed rescore (tested by Sarah Hobbs)
+  * submittodebian: Changed default tag to Jaunty
+  * pbuilder-dist: Added jaunty to ubuntu releases
+  * pull-lp-source: Made jaunty the default
+  * dch-repeat: Added jaunty
+
+ -- Michael Casadevall <sonicmctails@xxxxxxxxx>  Sat, 08 Nov 2008 06:33:00 -0500
+
+ubuntu-dev-tools (0.46) intrepid; urgency=low
+
+  [ Daniel Hahler ]
+  * submittodebian: use "intrepid" for Usertags (LP: #276073)
+
+  [ Matt Zimmerman ]
+  * add new program 'ubuntuiso' which prints information about Ubuntu isos by
+    extracting files from them
+  * Add Recommends: genisoimage for ubuntuiso
+
+  [ Colin Watson ]
+  * update-maintainer: Convert to plain #! /bin/sh.
+
+  [ Cesare Tirabassi ]
+  * remove -X option from grep-dctrl. It doesn't obtain the wished behaviour.
+
+ -- Matt Zimmerman <mdz@xxxxxxxxxx>  Thu, 02 Oct 2008 22:34:44 +0100
+
+ubuntu-dev-tools (0.45) intrepid; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * common.py:
+     - Trying to read from a locked sqlite cookie database isn't a fatal
+       error anymore.
+
+  [ Adrien Cunin ]
+  * update-maintainer:
+     - check at the beginning of the script that the necessary files are
+       readable/writable, and note which control files we are going to modify
+     - at the end, only modify those control files, so that the script doesn't
+       return 1 anymore when it was actually successful
+  * pbuilder-dist:
+     - Eliminated some warning with a better check for whether a given distro
+       already has a pbuilder chroot in $BASE_DIR, when that distro is not
+       known by the script
+     - Added intrepid as a known distro
+  * Return to previous versioning, without the ubuntu1 bit
+
+  [ Jonathan Patrick Davies ]
+  * buildd: Revert arch:status string format.
+
+  [ Cesare Tirabassi ]
+  * reverse-build-depends:
+    - add -X option to grep-dctrl so that it only works with exact matches
+      (LP: #272273).
+
+ -- Adrien Cunin <adri2000@xxxxxxxxxx>  Wed, 24 Sep 2008 16:01:09 +0200
+
+ubuntu-dev-tools (0.44ubuntu1) intrepid; urgency=low
+
+  * Bazaar revision 203.
+
+  [ Colin Watson ]
+  * Fix a number of minor glitches in manual pages.
+
+  [ Jonathan Patrick Davies ]
+  * debian/control:
+    - Improved description.
+    - Wrapped Depends line and bumped debhelper build-dependency version to 6.
+  * debian/compat: Changed to 6.
+  * Moved https_proxy dropping code to common.py.
+  * requestsync: Check for already existing sync requests before filing a new
+    one.
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Tue, 02 Sep 2008 21:43:49 +0100
+
+ubuntu-dev-tools (0.43ubuntu1) intrepid; urgency=low
+
+  * Bazaar revision 195.
+
+  [ Jonathan Patrick Davies ]
+  * common.py:
+    - If loading a cookie file raises an exception exit. 
+    - Improve cookie file writing.
+    - New function: isLPTeamMember() - checks if the user is a member of the
+      Launchpad team using cookies for authentication.
+    - New function: packageComponent() - returns which component a package in
+      Ubuntu is in.
+  * requestsync:
+    - Return an error when the script is unable to connect to
+      packages.debian.org (LP: #261916).
+    - Adapt team checking with the function above.
+  * buildd:
+    - Adapt privilege checking code to the new function above.
+    - Check which component the package is in.
+
+  [ Ryan Kavanagh ]
+  * dgetlp.1: New manpage
+  * dgetlp: fix typo in usage
+  * hugdaylist.1: New manpage
+  * s/requestsync/pull-lp-source/g in doc/pull-lp-source.1
+  * mk-sbuild-lv.1: New manpage
+
+  [ Karl Goetz ]
+  * Add a Recommends: on ca-certificates (LP: #247157).
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Sun, 31 Aug 2008 11:40:30 +0200
+
+ubuntu-dev-tools (0.42ubuntu1) intrepid; urgency=low
+
+  [Jonathan Patrick Davies]
+  * requestsync: Exit when connecting to Launchpad fails.
+  * doc/requestsync.1: Document new -d flag.
+  * common.py: New functions: checkReleaseExists() and checkSourceExists().
+  * buildd and pull-lp-source: Adapt code to use new functions above.
+
+  [ Jelmer Vernooij ]
+  * requestsync: Add -d option to allow overriding the Debian distro to sync
+  from. (LP: #253497)
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Sun, 24 Aug 2008 21:43:30 +0100
+
+ubuntu-dev-tools (0.41) intrepid; urgency=low
+
+  [ Loic Minier ]
+  * Replace .BB in doc/pbuilder-dist.1 with a newline to fix a syntax error.
+  * Drop spurious tab in buildd.
+  * When https_proxy is in the environment, output a warning and disable it as
+    urllib/urllib2 don't support it; see LP #122551.
+
+  [ Kees Cook ]
+  * common.py: allow for multiple firefox instances, check all possible
+    cookie files.
+
+ -- Kees Cook <kees@xxxxxxxxxx>  Wed, 20 Aug 2008 10:58:24 -0700
+
+ubuntu-dev-tools (0.40ubuntu3) intrepid; urgency=low
+
+  * Import urllib2.
+
+ -- Loic Minier <lool@xxxxxxxx>  Mon, 18 Aug 2008 12:07:27 +0200
+
+ubuntu-dev-tools (0.40ubuntu2) intrepid; urgency=low
+
+  * requestsync: Correct print statement redirect to sys,stderr. 
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Mon, 18 Aug 2008 10:59:59 +0100
+
+ubuntu-dev-tools (0.40ubuntu1) intrepid; urgency=low
+
+  * Bazaar revision 174.
+  * buildd: Code cleanup on single arch options.
+  * doc/buildd.1: Created.
+  * doc/requestsync.1: Added note about sponsorship detecting.
+  * requestsync: Suggest using the --lp flag when mailing a request encounters
+    a failure.
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Sat, 16 Aug 2008 23:38:41 +0100
+
+ubuntu-dev-tools (0.39ubuntu1) intrepid; urgency=low
+
+  * Bazaar revision 169.
+
+  [ Jonathan Patrick Davies ]
+  * common.py: Use os.path.expanduser() instead of os.environ.
+  * buildd:
+    - Added optparse support for option handling.
+    - Added support to request the rebuilding or rescoring of only one
+      architecture.
+    - Various other improvements.
+  * hugdaylist: Improved number of bugs option handling.
+  * get-branches: Improved option handling.
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * debian/control:
+     - Add sbuild as an alternative recommends to pbuilder.
+  * what-patch, pull-debian-debdiff, mk-sbuild-lv, dch-repat, debian/copyright:
+     - Change the license of all scripts from Kees Cook to the GPL version 3
+       or later.
+     - Order the script names alphabetically in debian/copyright.
+  * common.py:
+     - Add functions mkdir and readlist.
+
+  [ Iain Lane ]
+  * pull-lp-source: Better handle errors when going to LP 
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Thu, 14 Aug 2008 12:21:45 +0100
+
+ubuntu-dev-tools (0.38ubuntu1) intrepid; urgency=low
+
+  [ Jonathan Patrick Davies ]
+  * requestsync: Check if user is a member of ubuntu-core-dev if sync request
+    is for a package in main.
+  * common.py: Change cookie file permissions to read and write only by user.
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Tue, 12 Aug 2008 14:52:34 +0100
+
+ubuntu-dev-tools (0.37ubuntu1) intrepid; urgency=low
+
+  [ Jonathan Patrick Davies ]
+  * get-branches:
+    - Open the teams code page before making a new directory.
+    - Now check team option before anything else.
+    - Check that the team has branches before downloading.
+  * doc/get-branches.1: Created.
+  * hugdaylist: Improved argument and error handling.
+  * pull-lp-source:
+    - Use optparse for option handling.
+    - Check that the 'release' and 'package' actually exist on Launchpad.
+    - Use subprocess for dget calls.
+  * buildd: Imported from Martin Pitt's scripts.
+  * common.py: Python module to be used to enable the use of cookies
+    to authenticate with Launchpad.
+  * debian/ubuntu-dev-tools.install: Added line to install common.py above to
+    the correct location.
+  * requestsync:
+    - Use the functions in the common.py file above to authenticate with
+      Launchpad.
+    - Using the Launchpad cookie file, validate that the user is a member of
+      the ubuntu-dev team on Launchpad. Thus, checking if the user needs
+      sponsership or not (LP: #130648).
+  * doc/requestsync.1: Removed mention of -s flag. Obsoleted by the above.
+  * massfile:
+    - Use the functions in the common.py file above to authenticate with
+      Launchpad.
+  * debian/control: Changed XS-Python-Version to >= 2.5.
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * Add the GNU General Public License header to all scripts.
+  * Remove files AUTHORS (it duplicated content from debian/copyright) and
+    README (superseded by the manpages).
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Tue, 12 Aug 2008 14:48:35 +0100
+
+ubuntu-dev-tools (0.36ubuntu1) intrepid; urgency=low
+
+  [ Jonathan Patrick Davies ]
+  * doc/ Created new manpages for:
+    - what-patch.1.
+    - dch-repeat.1.
+    - grab-attachment.1.
+  * doc/requestsync.1: Described variables used by requestsync in man
+    page. (LP: #237595)
+  * hugdaylist:
+    - Added code to handle exceptions and short version of GPL.
+    - Rewrote option handling with optparse.
+    - Filter bugs subscribed to the ubuntu-archive team.
+  * get-branches:
+    - Rewrote option handling with optparse.
+    - Added short version of GPL to header.
+    - Fixed regular expressions to work with new Launchpad interface.
+    - Use subprocess.call() on Bazaar instead of os.system().
+  * debian/copyright: Updated Authors and copyrights.
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * Change the versioning scheme from 0.XX to 0.XXubuntu1. Delete
+    debian/source.lintian-overrides, as with this it isn't necessary anymore.
+  * General manpage cleanup (fix typos, use the same section names in all
+    manpages, etc).
+
+ -- Jonathan Patrick Davies <jpds@xxxxxxxxxx>  Sun, 10 Aug 2008 22:02:05 +0100
+
+ubuntu-dev-tools (0.35) intrepid; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals ]
+  * doc/update-maintainer.1:
+     - Remove the reference to the --no-changelog option from the manpage.
+  * requestsync:
+     - If the email interface is used, check if DEBEMAIL is set before anything
+       else (LP: #254632).
+  * massfile, examples/massfile.instructions:
+     - Make it possible to give the created bugs a determined status.
+  * debian/control:
+     - Bump Standards Version to 3.8.0.
+  * debian/rules:
+     - It's not necessary anymore to remove usr/lib.
+  * setup.py:
+     - Order the scripts list alphabetically and add pull-lp-source.
+
+  [ 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.
+
+ -- Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>  Sat, 09 Aug 2008 13:58:23 +0200
+
+ubuntu-dev-tools (0.34) intrepid; urgency=low
+
+  * update-maintainer: Remove dangling reference to --nochangelog
+    in usage function.
+
+ -- Luke Yelavich <themuso@xxxxxxxxxx>  Mon, 28 Jul 2008 15:50:38 +1000
+
+ubuntu-dev-tools (0.33) intrepid; urgency=low
+
+  * update-maintainer: Stop mentioning "Modify Maintainer: value blabla" since
+    it is a required global policy anyway and totally pointless changelog
+    noise.
+
+ -- Martin Pitt <martin.pitt@xxxxxxxxxx>  Fri, 18 Jul 2008 12:29:57 +0100
+
+ubuntu-dev-tools (0.32) intrepid; urgency=low
+
+  [ Iain Lane ]
+  * requestsync: Fix bug where requestsync would fall over when requesting
+    sync for package with no local changes.
+
+  [ Kees Cook ]
+  * dch-repeat: drop edgy, add intrepid.  Update Copyright years.
+
+  [ Mario Limonciello ]
+  * mk-sbuild-lv: Add lpia build support.
+  * mk-sbuild-lv: Copy mirror used for debootstrap into chroot too.
+
+ -- Mario Limonciello <mario_limonciello@xxxxxxxx>  Thu, 17 Jul 2008 11:20:49 -0500
+
+ubuntu-dev-tools (0.31) intrepid; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * pbuilder-dist.new:
+     - Rewrite the script in Python to make it more robust and faster.
+  * what-patch:
+     - If cdbs-edit-patch is used, output "cdbs (patchsys.mk)" instead of
+       just "cdbs" (LP: #195795).
+  * check-symbols:
+     - Add a brief explanation about why sudo privilegies are required
+       in order to run this script (LP: #194622).
+     - End with exit code 1 if there's an error.
+  * suspicious-source:
+     - Whitelist C# files (LP: #225691): *.cs.
+     - Whitelist manpages: *.[0-9].
+
+  [ Daniel Hahler ]
+  * requestsync:
+     - Use debian_bundle.changelog.Version for version comparison in
+       debian_changelog.
+     - Fix --lp for Firefox 3 (LP: #208808):
+       It now tries ~/.lpcookie.txt, ~/.mozilla/*/*/cookies.sqlite and
+       ~/.mozilla/*/*/cookies.txt to find a Launchpad cookie file.
+       Also added a hint that you can create a valid file, by logging into
+       Launchpad with Firefox.
+     - Added confirm loops, which displays the message to be send/posted and
+       either allows to edit (or forces to, in case of Ubuntu changes).
+       (LP: #194613, #194615)
+       This adds a convient edit_report method, which gets used both from the
+       Launchpad and mail code path.
+     - Do not fallback to submitting by email, if posting to Launchpad failed.
+       This hasn't been requested and therefore should not get done.
+     - post_bug: Catch IOError when setting bug importance (LP: #190061)
+     - mail_bug: Catch socket.error (LP: #190739)
+
+  [ Kees Cook ]
+  * mk-sbuild-lv
+    - don't install recommended packages during chroot install.
+    - allow customization of schroot.conf suffix and LV/snapshot sizes.
+  * what-patch:
+    - restore previous output behavior, added logic to verbose test instead.
+    - added details for each patch system report.
+  * pull-debian-debdiff:
+    - parse .dsc file for required source files.
+    - switch to GPLv3
+  * debian/control: add Depends needed for pull-debian-debdiff.
+  * debian/copyright:
+    - updated pull-debian-debdiff, which is now GPLv3.
+    - adjusted Copyright lines to make lintian happy.
+
+ -- Kees Cook <kees@xxxxxxxxxx>  Fri, 13 Jun 2008 11:43:24 -0700
+
+ubuntu-dev-tools (0.30) hardy; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * pbuilder-dist-simple, doc/pbuilder-dist-simple.1, setup.py:
+     - Add the original pbuilder-dist script as pbuilder-dist-simple.
+  * setup.py:
+     - Really install reverse-build-depends (LP: #203523).
+  * debian/source.lintian-overrides:
+     - Override lintian's useless warnings (about this being a NMU).
+
+  [ Adrien Cunin ]
+  * debian/ubuntu-dev-tools.install: install bash_completion/pbuilder-dist in
+    /etc/bash_completion.d/ instead of /etc/bash_completion.d/pbuilder-dist/
+  * bash_completion/pbuilder-dist: apply the completion not only to
+    pbuilder-dist but also to pbuilder-{hardy,sid,etc.}
+
+ -- Siegfried-Angel Gevatter Pujals (RainCT) <rainct@xxxxxxxxxx>  Tue, 08 Apr 2008 16:33:52 +0200
+
+ubuntu-dev-tools (0.29) hardy; urgency=low
+
+  * grab-attachments, setup.py: added grab-attachments tool. You give it bug
+    numbers, it gets you their attachments. Useful for sponsoring. 
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Mon, 10 Mar 2008 11:31:50 +0100
+
+ubuntu-dev-tools (0.28) hardy; urgency=low
+
+  [ Adrien Cunin ]
+  * pbuilder-dist:
+     - Fixed minor bash syntax error
+     - Removed quotes around the path when using --aptconfdir, otherwise
+       pbuilder create fails
+
+  [ Kees Cook ]
+  * mk-sbuild-lv: add --personality option from Jamie Strandboge (LP: #199181)
+  * check-symbols: rename temp files to avoid .so versioning confusion.
+
+ -- Kees Cook <kees@xxxxxxxxxx>  Thu, 06 Mar 2008 11:05:02 -0800
+
+ubuntu-dev-tools (0.27) hardy; urgency=low
+
+  [ Andrew Hunter ]
+  * ppaput:
+    - Separated ppaput script from backend python modules (LP: #192184).
+    - Switched from homegrown option parseing to Optparse, much more
+      robust and less code duplication.
+
+  [ Daniel Holbach ]
+  * README, debian/rules, doc/ppaput.1.docbook, ppaput, setup.py: removed
+    ppaput for now. It has shortcomings and is not actively used in the
+    sponsoring process (LP: #194634).
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * This upload removes accidentaly uploaded files (LP: #194635, #194618,
+    #194621).
+  * Remove executable bit from AUTHORS file (LP: #194619).
+  * debian/control:
+     - Change the Vcs-Bzr address to the correct one.
+     - Move the reportbug dependency to Recommends.
+     - Drop docbook2x build dependency (see Daniel's changes).
+  * Move ppaput.py (the module) into new ubuntutools/ directory and
+    remove it's shabang.
+  * submittodebian:
+     - Check if reportbug is installed and if it isn't throw an error.
+  * suspicious-sources:
+     - Ignore .in files.
+  * pbuilder-dist:
+     - Apply patch from James Westby to fix a problem where it always
+       wanted to get the architecture to use as an option if a symlink
+       was being used .
+     - Fix a recently introduced problem where pbuilder-dist would always
+       want to know the architecture if a symlink was being used. Thanks to
+       Adrien Cunin and James Westby for their help on this (LP: #194633).
+     - Escape many variables to avoid possible problems there.
+     - Reorganize the code a bit and comment it.
+     - Accept "upgrade" as an alias for "update".
+     - Hide lsb_release's traceback if pbuilder-dist is manually aborted
+       while the distribution was being detected.
+  * 404main:
+     - Try to filter out entries from Debian and PPAs, thanks to Adrien
+       Cunin! (LP: #194704)
+     - Add limited support for multiple distributions (and update they
+       manpage to reflect this).
+     - TODO: Use python-apt instead of lots of pipes.
+  * debian/copyright.
+     - Add ppaput (the executable has been removed for now -see above-,
+       but there is still the module in the source package).
+  * debian/pycompat:
+     - Remove it, as it is not necessary for python-central.
+
+  [ Terence Simpson ]
+  * dgetlp:
+     - Fix bug where optaining the .orig.tar.gz would fail if the package
+       name contains hypens.
+     - Add support for native packages.
+
+ -- Siegfried-Angel Gevatter Pujals (RainCT) <rainct@xxxxxxxxxx>  Sun, 24 Feb 2008 19:11:06 +0100
+
+ubuntu-dev-tools (0.26) hardy; urgency=low
+
+  [ Stephan Hermann ]
+  * pbuilder-dist: fixed a bug with the *sudo call.
+    changed from $SUDOREPLACE "pbuilder" to $SUDOREPLACE -- pbuilder ...
+
+  [ Daniel Hahler ]
+  * requestsync:
+    * If interaction is required (for an explanation to drop the Ubuntu
+      changes), edit the report in the sensible-editor.
+      When interaction is not required, ask the user if she wants to edit.
+      (LP: #190351)
+    * Exit, if versions in Ubuntu and Debian are the same already.
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * Add manpages for update-maintainer and 404main.
+  * Move pbuilder-dist.bash_completion into new bash_completion/
+    directory and tell dh_install to take care of the stuff there.
+  * Let update-maintainer also accept --no-changelog (in addition to
+    the current --nochangelog), improve its error messages and change
+    the default section to universe.
+  * Add AUTHORS section to doc/check-symbols.1, and little changes to
+    doc/suspicious-source.1.
+  * Fix some issues with the new pbuilder-dist code.
+
+ -- Siegfried-Angel Gevatter Pujals (RainCT) <rainct@xxxxxxxxxx>  Sun, 17 Feb 2008 19:35:46 +0100
+
+ubuntu-dev-tools (0.25) hardy; urgency=low
+
+  [ Michael Bienia ]
+  * requestsync:
+    + Add work-around for a bug in Debian's madison.php not returning only the
+      'source' line (LP: #183346).
+    + Add support to file sync requests with python-launchpad-bugs (--lp)
+      (LP: #147994).
+    + Add line editing during input.
+  * doc/requestsync.1:
+    + Document new requestsync options.
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * what-patch:
+     - Print a list of files that have been modified outside the
+       debian/ directory (LP: #174933).
+     - Add -h and -q options.
+     - Add proper exit values.
+  * debian/control:
+     - Bump standards version to 3.7.3.
+     - Move python-central to Build-Depends-Indep.
+     - Rename XS-Vcs-{Bzr,Browser} fields to Vcs-{Bzr,Browser}.
+     - Bump minimum cdbs version to 0.4.49.
+  * Add Albert Damen to the Authors and Copyright Holders.
+  * Change my email address (to @ubuntu.com) everywhere.
+  * Add reverse-build-depends script and a manpage for it.
+  * Add requestsync and reverse-build-depends and massfile to
+    debian/copyright.
+  * Update README (add information for many missing scripts).
+  * Add the text "ubuntu-dev-tools" to the footer of all manpages.
+  * Remove duplicated ubuntu-dev-tools recommends (it's already a
+    dependency).
+
+  [ Stephan Hermann ]
+  * mk-sbuild-lv: check for debootstrap release names in
+    /usr/share/debootstreap/releases and not in /usr/lib/debootstrap/releases
+  * pbuilder-dist:
+    - check if $SYSCACHE is not set and stay with the default, if
+      SYSCACHE = 0 use the default from pbuilderrc or honor $DEBCACHE
+      (LP: #156183)
+    - removed $BINARCH check in pbuilder call, and set --debootstrapopts
+      directly, it doesn't matter when it's always set.  The Subshell call
+      didn't work  (LP: #175183)
+    - added support for --http-proxy, honours now $http_proxy or $HTTP_PROXY
+    - removed $COMPONENTS_LINE from pbuilder call, data is crippled in the
+      pbuilder chroot.
+      Instead of this behaviour add $BASE_DIR/etc/$DISTRIBUTION/apt.conf/
+      directory and install a sane sources.list, depending on the releases of Ubuntu
+      and add --aptconfdir to pbuilder call (LP: #175183)
+    - add support for gksudo|kdesudo|sudo depending on $DESKTOP_SESSION.
+      or if $PBUILDAUTH is set to something else, it will be used instead of
+      sudo|gksudo|kdesudo (LP: #172943)
+  * pbuilder-dist.bash_completion: (LP: #175728)
+    - added bash_completion instructions
+  * debian/rules:
+    - install pbuilder-dist.bash_completion to /etc/bash_completion.d/
+
+  [ Daniel Holbach ]
+  * hugdaylist: drop one Ubuntu filter statement.
+
+  [ Kees Cook ]
+  * what-patch: change default operation back to quiet mode -- script is used
+    in automated tools, so default behavior is best to leave unchanged.
+  * check-symbols: check for binary list very carefully.
+  * dch-repeat: add Hardy to distro list.
+  * mk-sbuild-lv: use -r instead of -f for possible debootstrap symlinks.
+
+ -- Stephan Hermann <sh@xxxxxxxxxxxxx>  Tue, 22 Jan 2008 19:28:34 +0100
+
+ubuntu-dev-tools (0.24) hardy; urgency=low
+
+  [ Soren Hansen ]
+  * Handle epochs properly in submittodebian.
+
+  [ Luke Yelavich ]
+  * update-maintainer: Default to main if rmadison gives no section output.
+    (LP: #179533)
+
+  [ Cesare Tirabassi ]
+  * Add man page for check-symbols (Thanks to Albert Damen - LP: #174123).
+
+  [ Michael Bienia ]
+  * requestsync:
+    + Set importance to wishlist.
+    + Strip some more whitespace.
+
+ -- Luke Yelavich <themuso@xxxxxxxxxx>  Sun, 06 Jan 2008 21:52:26 +1100
+
+ubuntu-dev-tools (0.23) hardy; urgency=low
+
+  [ Daniel Holbach ]
+  * debian/control: bumped python-launchpad-bugs requirement to newest version
+    and made it a Recommends. All scripts in ubuntu-dev-tools using it fail
+    gracefully if it's not installed.
+  * hugdaylist: 
+    - make use of text connector.
+    - commentary in wiki output.
+
+  [ Ryan Kavanagh ]
+  * Updated requestsync(1) to reflect the addition of the -k <keyid> and
+    removed a runon in DESCRIPTION.
+
+  [ Mathias Gug ]
+  * Add patch tag in submittodebian.
+
+  [ Luke Yelavich ]
+  * update-maintainer: Exit after displaying usage for --help.
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * pbuilder-dist:
+     - Move warning about changing $COMPONENTS's value to
+       the right place (it should be displayed if the installed version
+       of pbuilder is too old, not otherwise).
+     - Asume action is "build" if no recognized action is passed but
+       the next argument ends with .dsc (LP: #172940).
+  * dgetlp:
+     - Add "-h", "--help" and "--debug" (-d was already there)
+  * 404main:
+     - Cleanup and improvements
+     - Identify Pete Savage as it's original author
+     - Change the license to GPLv2+
+  * AUTHORS, debian/copyright:
+     - Add Pete Savage, as he wrote 404main
+  * what-patch:
+     - Ignore commented lines; patch by Daniel Hahler (LP: #163454)
+  * doc/pbuilder-dist.1:
+     - Update manpage to match recent changes (including those from 0.21).
+
+  [ Colin Watson ]
+  * Add a SYNOPSIS section to submittodebian(1) to clarify that it takes no
+    arguments.
+  * More *roff fixes.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Wed, 05 Dec 2007 09:57:41 +0100
+
+ubuntu-dev-tools (0.22) hardy; urgency=low
+
+  [ Luke Yelavich ]
+  * update-maintainer-field:
+    - Use rmadison instead of apt-cache madison.
+    - Added --nochangelog command-line argument.
+    - Check --section value.
+    - Reformatted usage information.
+    - Some code cleanup.
+
+  [ Laurent Bigonville ]
+  * requestsync:
+    -Always pass -u option to rmadison now that it defaults to ubuntu
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * Add dgetlp script (for «dgetting» from Launchpad) 
+
+  [ Lucas Nussbaum ]
+  * Enabled support for Bugs/Debian/Usertagging in submittodebian
+
+  [ Michael Vogt ]
+  * debian/control:
+    - depend on reportbug (>= 3.39ubuntu1) to have working usertag support
+  
+ -- Michael Vogt <michael.vogt@xxxxxxxxxx>  Tue, 20 Nov 2007 12:15:20 +0100
+
+ubuntu-dev-tools (0.21) hardy; urgency=low
+
+  [ Laurent Bigonville ]
+  * debian/control: add a space before the Homepage pseudo-field
+  * pbuilder-dist: add hardy to the distribution list
+  * pbuilder-dist: Use new --components options (LP: #140964)
+  * pbuilder-dist: Add an empty --othermirror to override config in pbuilderrc
+
+  [ Kees Cook ]
+  * mk-sbuild-lv: fix gnupg install, adjust symlink creation
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * Add get-build-deps and it's documentation.
+  * Change the character encoding on all Python scripts to UTF-8
+  * submittodebian: better changelog location detection
+  * submittodebian: user-friendly error if python-debian isn't installed
+  * hugdaylist: improve error handling (less backtraces, more nice messages)
+  * pbuilder-dist: look for global variable $PBUILDFOLDER (LP: #160769)
+  * pbuilder-dist: check pbuilder version and only use --components if supported
+  * pbuilder-dist: don't chown "unknown distribution" warning if an environment
+    of that release already exists (LP: #160769)
+
+  [ Luke Yelavich ]
+  * debian/control:
+    - Move homepage to its own field in source package section.
+
+ -- Luke Yelavich <themuso@xxxxxxxxxx>  Thu, 08 Nov 2007 09:57:31 +1100
+
+ubuntu-dev-tools (0.20) hardy; urgency=low
+
+  [ Cesare Tirabassi ]
+  * suspicious-source: add *.hh to list of excluded files
+  * suspicious-source: format excluded file list to fit 80 chars limit
+  * suspicious-source: corrected typos in script and manual page
+
+  [ Dainel Holbach ]
+  * hugdaylist: only mention 'unassigned bugs'.
+
+  [ Soren Hansen ]
+  * Added missing python-debian dependency (needed by submittodebian)
+
+ -- Soren Hansen <soren@xxxxxxxxxx>  Tue, 23 Oct 2007 16:45:44 +0200
+
+ubuntu-dev-tools (0.19) gutsy; urgency=low
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * requestsync: allow to customize the SMTP server (LP: #144224)
+  * Add a short description for requestsync to the README file.
+
+  [ Laurent Bigonville ]
+  * pbuilder-dist: Fix error on chroot creation (LP: #146475)
+  * requestsync: allow to customize the SMTP port
+
+  [ Adrien Cunin ]
+  * README: minor and cosmetic changes
+
+ -- Adrien Cunin <adri2000@xxxxxxxxxx>  Sun, 07 Oct 2007 00:24:46 +0200
+
+ubuntu-dev-tools (0.18) gutsy; urgency=low
+
+  * requestsync: add an option to "Add latest debian version to the title of
+    the bug" (LP: #132221)
+
+ -- Marco Rodrigues <gothicx@xxxxxxx>  Fri, 05 Oct 2007 14:16:34 +0200
+
+ubuntu-dev-tools (0.17) gutsy; urgency=low
+
+  * submittodebian: backed out changes from last upload. This needs Debian Bug
+    445144 fixed.
+  * debian/control: don't Depends on a version of reportbug Ubuntu does not
+    have yet.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Fri, 05 Oct 2007 11:44:51 +0200
+
+ubuntu-dev-tools (0.16) gutsy; urgency=low
+
+  [ Lucas Nussbaum ]
+  * Added support for Bugs/Debian/Usertagging in submittodebian.
+
+  [ Daniel Holbach ]
+  * setup.py: actually install submittodebian.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Fri, 05 Oct 2007 11:05:29 +0200
+
+ubuntu-dev-tools (0.15) gutsy; urgency=low
+
+  [ Laurent Bigonville ]
+  * update-maintainer: correctly pass path to dch (LP: #141015)
+
+  [ Daniel Holbach ]
+  * ppaput:
+    - fix indentation issues.
+    - now respects the PPA section the package goes to (LP: #146161)
+    - add comment to bug about how to test the resulting .deb (LP: #145895)
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Mon, 01 Oct 2007 15:56:18 +0200
+
+ubuntu-dev-tools (0.14) gutsy; urgency=low
+
+  * massfile: 
+    - fixed bug where to find example files,
+    - made url get checked beforehand.
+    - fixed bug, where description and summary were not updated with the
+      current source package.
+  * examples/massfile.instructions: added example buglist-url.
+  .
+  Thanks Andrew Mitchell, for helping out by fixing and clever advise.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Thu, 27 Sep 2007 11:43:55 +0200
+
+ubuntu-dev-tools (0.13) gutsy; urgency=low
+
+  * massfile: added script to file mass-bugs.
+  * debian/examples, examples/massfile.{instructions,list}: added example
+    files.
+  * setup.py: install massfile.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Thu, 27 Sep 2007 11:04:52 +0200
+
+ubuntu-dev-tools (0.12) gutsy; urgency=low
+
+  * hugdaylist: apply quick fix to not crash.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Mon, 24 Sep 2007 09:43:30 +0200
+
+ubuntu-dev-tools (0.11) gutsy; urgency=low
+
+  [ Daniel Holbach ]
+  * compare-packages, README: dropped compare-packages, debdiff has the same
+    functionality, when used with --from --to or on *.changes files.
+  * hugdaylist: prepare the list more carefully (filter out 'fixed committed'
+    bugs and bugs that have ubuntu-*-sponsors subscribed.
+
+  [ Siegfried-Angel Gevatter Pujals (RainCT) ]
+  * Added a manpage for suspicious-source.
+  * Fixed a bug in pbuilder-dist (it needed ftp.debian.org in sources.list to work with Debian).
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Mon, 24 Sep 2007 09:39:24 +0200
+
+ubuntu-dev-tools (0.10) gutsy; urgency=low
+
+  * compare-packages: added script to compare the contents of 'old' and 'new'
+    binary packages of the same source package. Useful to spot moved files,
+    dropped files, etc.
+  * README: briefly document added scripts.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Fri, 14 Sep 2007 11:23:36 +0200
+
+ubuntu-dev-tools (0.9) gutsy; urgency=low
+
+  * Added submittodebian.1
+
+ -- Soren Hansen <soren@xxxxxxxxxx>  Thu, 13 Sep 2007 14:38:49 +0200
+
+ubuntu-dev-tools (0.8) gutsy; urgency=low
+
+  * Renamed revuput to ppaput.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Thu, 13 Sep 2007 14:35:18 +0200
+
+ubuntu-dev-tools (0.7) gutsy; urgency=low
+
+  [Colin Watson]
+  * Fix *roff use (hyphens vs. dashes, start each sentence on a new line).
+
+  [Daniel Holbach]
+  * revuput: deal with the case of NEW packages.
+  * hugdaylist: added a tool to write Wiki lists of bugs in <buglist url> as
+    in https://wiki.ubuntu.com/UbuntuBugDay/20070912
+  * debian/control: bumped python-launchpad-bugs version.
+
+ -- Colin Watson <cjwatson@xxxxxxxxxx>  Wed, 12 Sep 2007 09:28:54 +0100
+
+ubuntu-dev-tools (0.6) gutsy; urgency=low
+
+  * Because I'm a bozo, fix up the version of the devscripts
+    Conflicts/Replaces.
+
+ -- Steve Kowalik <stevenk@xxxxxxxxxx>  Wed, 12 Sep 2007 10:46:21 +1000
+
+ubuntu-dev-tools (0.5) gutsy; urgency=low
+
+  * Add requestsync and its manual page from devscripts. (LP: #138885)
+  * Add Conflicts/Replaces against devscripts 2.10.7ubuntu3.
+
+ -- Steve Kowalik <stevenk@xxxxxxxxxx>  Wed, 12 Sep 2007 01:14:04 +1000
+
+ubuntu-dev-tools (0.4) gutsy; urgency=low
+
+  * revuput: added a tool to upload packages to PPA and file sponsoring bugs
+    automatically.
+  * doc/revuput.1.docbook, debian/control, debian/rules: build manpage for it
+    from DocBook.
+  * setup.py: install it.
+  * debian/control: add python-launchpad-bugs Depends.
+
+  [Soren Hansen]
+  * added submittodebian tool.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Fri, 07 Sep 2007 14:14:57 +0200
+
+ubuntu-dev-tools (0.3) gutsy; urgency=low
+
+  * debian/copyright: added Canonical copyright.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Tue, 04 Sep 2007 09:51:04 +0200
+
+ubuntu-dev-tools (0.2) gutsy; urgency=low
+
+  [ Martin Pitt ]
+  * Add suspicious-source: Output a list of files which are not common source
+    files. This should be run in the root of a source tree to find files which
+    might not be the 'prefered form of modification' that the GPL and other
+    licenses require.
+
+  [ Luke Yelavich ]
+  * Removed ubuntu-cd and ubuntu-sync. They are currently undergoing
+    major reworking, and will be re-included when ready.
+
+ -- Luke Yelavich <themuso@xxxxxxxxxx>  Sat,  4 Aug 2007 08:30:01 +1000
+
+ubuntu-dev-tools (0.1) gutsy; urgency=low
+
+  * Initial Release.
+
+ -- Daniel Holbach <daniel.holbach@xxxxxxxxxx>  Fri, 01 Jun 2007 11:26:41 +0200

=== added file 'debian/compat'
--- debian/compat	1970-01-01 00:00:00 +0000
+++ debian/compat	2010-06-17 18:54:27 +0000
@@ -0,0 +1,1 @@
+6

=== added file 'debian/control'
--- debian/control	1970-01-01 00:00:00 +0000
+++ debian/control	2010-06-17 18:54:27 +0000
@@ -0,0 +1,73 @@
+Source: ubuntu-dev-tools
+Section: devel
+Priority: optional
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>
+Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk
+Vcs-Browser: http://codebrowse.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk/changes
+Build-Depends: cdbs (>= 0.4.49), debhelper (>= 6), python (>= 2.5)
+Build-Depends-Indep: python-support (>= 0.5.3)
+XS-Python-Version: >= 2.5
+Homepage: https://launchpad.net/ubuntu-dev-tools/
+Standards-Version: 3.8.4
+
+Package: ubuntu-dev-tools
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo,
+ python-debian, python-launchpadlib (>= 1.5.7), dctrl-tools, lsb-release, diffstat,
+ dpkg-dev, python-apt (>= 0.7.93~), python-lazr.restfulclient
+Recommends: bzr, pbuilder | cowdancer | sbuild, reportbug (>= 3.39ubuntu1),
+ ca-certificates, debootstrap, genisoimage, perl-modules, libwww-perl,
+ libapt-pkg-perl
+Conflicts: devscripts (<< 2.10.7ubuntu5)
+Suggests: qemu-kvm-extras-static
+Replaces: devscripts (<< 2.10.7ubuntu5)
+Description: useful tools for Ubuntu developers
+ This is a collection of useful tools that Ubuntu developers use to make their
+ packaging work a lot easier.
+ .
+ Such tools include:
+ .
+  - 404main - used to check what components a package's deps are in, for
+    doing a main inclusion report for example.
+  - check-symbols - will compare and give you a diff of the exported symbols of
+    all .so files in a binary package.
+  - dch-repeat - used to repeat a change log into an older release.
+  - dgetlp - download a source package from the Launchpad library.
+  - get-branches - used to branch/checkout all the bzr branches in a Launchpad
+    team.
+  - get-build-deps - install the build dependencies needed for a package
+    reading debian/control.
+  - grab-attachments - download all bug attachments from a Launchpad bug
+    report.
+  - grab-merge - grabs a merge from merges.ubuntu.com easily.
+  - hugdaylist - compile HugDay lists from bug list URLs.
+  - lp-project-upload - upload a release tarball to a Launchpad project
+  - lp-set-dup - sets the "duplicate of" bug of a bug and its dups.
+  - manage-credentials - manage Launchpad token credentials.
+  - massfile - fill multiple bugs using a template.
+  - merge-changelog - manually merges two Debian changelogs with the same base
+    version.
+  - mk-sbuild - script to create LVM snapshot chroots via schroot and
+    sbuild.
+  - pbuilder-dist, cowbuilder-dist - wrapper script for managing several build
+    chroots (for different Ubuntu and Debian releases) on the same system.
+  - pull-debian-debdiff - attempts to find and download a specific version of
+    a Debian package and its immediate parent to generate a debdiff.
+  - pull-debian-source - downloads the lastest source package available in
+    Debian of a package.
+  - pull-lp-source - downloads lastest source package from Launchpad.
+  - pull-revu-source - downloads the latest source package from REVU
+  - requestsync - files a sync request with Debian changelog and ratione.
+  - reverse-build-depends - find the reverse build dependencies that a package
+    has.
+  - setup-packaging-environment - assistant to get an Ubuntu installation
+    ready for packaging work.
+  - submittodebian - automatically send your changes to Debian as a bug report.
+  - suspicious-source - outputs a list of files which are not common source
+    files.
+  - ubuntu-build - give commands to the Launchpad build daemons from the
+    command line.
+  - ubuntu-iso - output information of an Ubuntu ISO image.
+  - update-maintainer - script to update maintainer field in ubuntu packages.
+  - what-patch - determines what patch system, if any, a source package is
+    using.

=== added file 'debian/copyright'
--- debian/copyright	1970-01-01 00:00:00 +0000
+++ debian/copyright	2010-06-17 18:54:27 +0000
@@ -0,0 +1,96 @@
+This package was re-debianized by Daniel Holbach <daniel.holbach@xxxxxxxxxx> on
+Fri, 01 Jun 2007 11:30:08 +0200.
+
+Upstream Authors:
+
+	Albert Damen <albrt@xxxxxxx>
+	Albin Tonnerre <lut1n.tne@xxxxxxxxx>
+	Bryce Harrington <bryce@xxxxxxxxxx>
+	Daniel Hahler <ubuntu@xxxxxxxxxx>
+	Daniel Holbach <daniel.holbach@xxxxxxxxxx>
+	Emmet Hikory <persia@xxxxxxxxxx>
+	Iain Lane <iain@xxxxxxxxxxxxxxxxxxx>
+	Jamin W. Collins <jcollins@xxxxxxxxxxxxxxxx>
+	Jonathan Davies <jpds@xxxxxxxxxx>
+	Jordan Mantha <mantha@xxxxxxxxxx>
+	Kees Cook <kees@xxxxxxxxxx>
+	Luke Yelavich <themuso@xxxxxxxxxx>
+	Markus Korn <thekorn@xxxxxx>
+	Martin Pitt <martin.pitt@xxxxxxxxxx>
+	Matt Zimmerman <mdz@xxxxxxxxxx>
+	Michael Bienia <geser@xxxxxxxxxx>
+	Pete Savage <petesavage@xxxxxxxxxx>
+	Scott Moser <smoser@xxxxxxxxxx>
+	Scott James Remnant <scott@xxxxxxxxxx>
+	Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+	Soren Hansen <soren@xxxxxxxxxx>
+	Steve Kowalik <stevenk@xxxxxxxxxx>
+	Terence Simpson <stdin@xxxxxxxxxxx>
+	Nathan Handler <nhandler@xxxxxxxxxx>
+
+Copyright:
+
+	(C) 2006-2009, Canonical Ltd.
+	(C) 2007, Albert Damen <albrt@xxxxxxx>
+	(C) 2006-2007, Albin Tonnerre <lut1n.tne@xxxxxxxxx>
+	(C) 2006-2007, Daniel Holbach <daniel.holbach@xxxxxxxxxx>
+	(C) 2008, Iain Lane <iain@xxxxxxxxxxxxxxxxxxx>
+	(C) Jamin W. Collins <jcollins@xxxxxxxxxxxxxxxx>
+	(C) 2008-2009, Jonathan Davies <jpds@xxxxxxxxxx>
+	(C) Jordan Mantha <mantha@xxxxxxxxxx>
+	(C) 2006-2008, Kees Cook <kees@xxxxxxxxxx>
+	(C) 2006-2007, Luke Yelavich <themuso@xxxxxxxxxx>
+	(C) 2009, Markus Korn <thekorn@xxxxxx>
+	(C) 2007, Martin Pitt <martin.pitt@xxxxxxxxxx>
+	(C) 2006-2007, Michael Bienia <geser@xxxxxxxxxx>
+	(C) 2008, 2009, Nathan Handler <nhandler@xxxxxxxxxx>
+	(C) Patrick Schoenfeld <schoenfeld@xxxxxxxxxx>
+	(C) 2006-2007, Pete Savage <petesavage@xxxxxxxxxx>
+	(C) 2009-2010 Ryan Kavanagh <ryanakca@xxxxxxxxxxx>
+	(C) 2007-2009, Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+	(C) 2008, Stephan Hermann <sh@xxxxxxxxxxxxx>
+	(C) 2007 Steve Kowalik <stevenk@xxxxxxxxxx>
+	(C) 2007-2008, Terence Simpson <stdin@xxxxxxxxxxx>
+
+Licenses:
+
+404main, check-symbols,  dgetlp, lp-project-upload, lp-set-dup, pbuilder-dist,
+pbuilder-dist-simple, requestsync, reverse-build-depends, submittodebian, ubuntuiso,
+and update-maintainer are licensed under the GNU General Public License, version 2:
+
+    This package 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, at version 2.
+ 
+    This package 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.
+
+On Debian and Ubuntu systems, the complete text of the GNU General Public
+License v2 can be found in `/usr/share/common-licenses/GPL-2'.
+
+dch-repeat, get-branches, get-build-deps, grab-attachments, grab-merge,
+hugdaylist, manage-credentials, massfile, merge-changelog, mk-sbuild,
+pbuilder-dist-simple, pull-debian-debdiff, pull-debian-source, pull-lp-source,
+pull-revu-source, setup-packaging-environment, suspicious-source, ubuntu-build
+and what-patch are licensed under the GNU General Public License, version 3:
+
+    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, at version 3.
+
+    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.
+
+On Debian and Ubuntu systems, the complete text of the GNU General Public
+License v3 can be found in `/usr/share/common-licenses/GPL-3'.
+
+The following scripts can be used, at your option, regarding any later
+version of the previously specified license: 404main, dch-repeat, dgetlp,
+get-build-deps, lp-project-upload, lp-set-dup, manage-credentials, mk-sbuild-lv,
+pbuilder-dist, pull-debian-debdiff, pull-debian-source, pull-lp-source,
+pull-revu-source, reverse-build-depends, setup-packaging-environment, submittodebian,
+suspicious-source, syncpackage, ubuntu-build, what-patch.

=== added file 'debian/links'
--- debian/links	1970-01-01 00:00:00 +0000
+++ debian/links	2010-06-17 18:54:27 +0000
@@ -0,0 +1,2 @@
+/usr/bin/pbuilder-dist /usr/bin/cowbuilder-dist
+/usr/share/man/man1/pbuilder-dist.1.gz /usr/share/man/man1/cowbuilder-dist.1.gz

=== added file 'debian/pycompat'
--- debian/pycompat	1970-01-01 00:00:00 +0000
+++ debian/pycompat	2010-06-17 18:54:27 +0000
@@ -0,0 +1,1 @@
+2

=== added file 'debian/rules'
--- debian/rules	1970-01-01 00:00:00 +0000
+++ debian/rules	2010-06-17 18:54:27 +0000
@@ -0,0 +1,8 @@
+#!/usr/bin/make -f
+
+DEB_PYTHON_SYSTEM := pysupport
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/python-distutils.mk
+
+DEB_INSTALL_MANPAGES_ubuntu-dev-tools = doc/*.1

=== added file 'debian/ubuntu-dev-tools.examples'
--- debian/ubuntu-dev-tools.examples	1970-01-01 00:00:00 +0000
+++ debian/ubuntu-dev-tools.examples	2010-06-17 18:54:27 +0000
@@ -0,0 +1,1 @@
+examples/*

=== added file 'debian/ubuntu-dev-tools.install'
--- debian/ubuntu-dev-tools.install	1970-01-01 00:00:00 +0000
+++ debian/ubuntu-dev-tools.install	2010-06-17 18:54:27 +0000
@@ -0,0 +1,1 @@
+bash_completion/* etc/bash_completion.d/

=== added file 'debian/ubuntu-dev-tools.preinst'
--- debian/ubuntu-dev-tools.preinst	1970-01-01 00:00:00 +0000
+++ debian/ubuntu-dev-tools.preinst	2010-06-17 18:54:27 +0000
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+
+if [ -e /etc/bash_completion.d/pbuilder-dist/pbuilder-dist ]; then
+    tmp_file="$(mktemp /etc/bash_completion.d/pbuilder-dist.XXXXXX)"
+    mv -fv /etc/bash_completion.d/pbuilder-dist/pbuilder-dist \
+        "$tmp_file"
+    rmdir --ignore-fail-on-non-empty /etc/bash_completion.d/pbuilder-dist
+    # dir non-empty
+    if [ -d /etc/bash_completion.d/pbuilder-dist ]; then
+        echo "W: /etc/bash_completion.d/pbuilder-dist not empty; moving /etc/bash_completion.d/pbuilder-dist out of the way"
+        mv -fv /etc/bash_completion.d/pbuilder-dist /etc/bash_completion.d/pbuilder-dist.dpkg-disabled
+
+    fi
+    mv -fv "$tmp_file" /etc/bash_completion.d/pbuilder-dist
+fi
+
+# Remove stale pycentral files on upgrades.
+# This can be removed after the next LTS (likely 10.04) is released.
+if [ "$1" = upgrade ]
+then
+       if dpkg --compare-versions "$2" lt "0.76" ; then
+               pycentral pkgremove ubuntu-dev-tools
+       fi
+fi
+
+#DEBHELPER#
+

=== added file 'dgetlp'
--- dgetlp	1970-01-01 00:00:00 +0000
+++ dgetlp	2010-06-17 18:54:27 +0000
@@ -0,0 +1,320 @@
+#!/usr/bin/python
+# -*- coding: UTF-8 -*-
+# Copyright (C) 2008 Terence Simpson <tsimpson@xxxxxxxxxx>
+# License:
+#  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 2 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.
+#
+# This script simulates «dget»'s behaviour for files hosted at
+# launchpadlibrarian.net.
+#
+# Detailed description:
+# This script attempts to download the source package in the same
+# way as dget does, but from launchpadlibrarian.net, which doesn't
+# store all the files in the same directory. It (the script) assumes
+# that the files are stored in sequential directories on Launchpad
+# Librarian and attempts to download and then unpack them.
+# This is a Python rewrite of the original bash script
+
+import sys, os
+from optparse import OptionParser
+import urllib2
+import hashlib 
+import subprocess
+import GnuPGInterface
+from cStringIO import StringIO
+from email import FeedParser
+
+Usage = u"""Usage: %prog [-d|(-v|-q)] <Launchpad URL>
+
+This scripts simulates «dget»'s behaviour for files hosted at
+launchpadlibrarian.net.
+
+If you specify the -d option then it won't do anything, except download the
+.dsc file, but just print the commands it would run otherwise.
+
+Example:
+	%prog http://launchpadlibrarian.net/10348157/coreutils_5.97-5.4ubuntu1.dsc
+"""
+
+unpack_cmd = "dpkg-source -x "
+base_url = "http://launchpadlibrarian.net/";
+
+Debug = Verbose = Quiet = False
+
+def Unsign(data):
+    if data.splitlines()[0] != "-----BEGIN PGP SIGNED MESSAGE-----":
+        return data
+    oldstdout = sys.stdout
+    oldstderr = sys.stderr
+    sys.stdout = sys.__stdout__
+    sys.stderr = sys.__stderr__
+    gpg = GnuPGInterface.GnuPG()
+    proc = gpg.run(["--decrypt"], create_fhs=['stdin', 'stdout'])
+    proc.handles['stdin'].write(data)
+    proc.handles['stdin'].close()
+    plain = proc.handles['stdout'].read()
+    proc.handles['stdout'].close()
+    try:
+        proc.wait()
+    except:
+        pass
+    sys.stdout = oldstdout
+    sys.stderr = oldstderr
+    return plain
+
+def getEntries(data):
+    parser = FeedParser.FeedParser()
+    parser.feed(data)
+    return parser.close()
+
+class DscParse(object):
+    """Attempt to get the file list from the .dsc file"""
+    def __init__(self, data):
+        """
+        __init__(data)
+        Given the contents of a .dsc, parse it and extract it's content
+        """
+        self.entries = getEntries(Unsign(data))
+        self.files = [x.strip().split() for x in self.entries['Files'].splitlines()]
+
+    def verify_all(self):
+        """
+        verify_all()
+        Verifies all the files, first checking the size, then the md5 sum.
+        Currently not used in this utility.
+        """
+        assert self.files, "I have no files"
+        ret = []
+        for f in self.files:
+            ret.append(self.verify(f))
+        return ret
+
+    def verify(self, name):
+        """
+        verify(name)
+        Verify the file 'name', first checking the size, then the md5 sum.
+        """
+        assert self.files, "I have no files"
+        f = None
+        if isinstance(name, list):
+            f = name
+        else:
+            for i in self.files:
+                if i[2] == name:
+                    f = i
+        if not f:
+            raise ValueError, "%s is not in the .dsc" % name
+        (sum, size, name) = tuple(f)
+        stat = os.stat(name)
+        if str(stat.st_size) != size:
+            return (False, name, "Expected a size of %s, got %s" % \
+                (size, stat.st_size))
+        return self.getsum(name, sum)
+
+    def getsum(self, name, sum=None):
+        """
+        getsum(name[, sum])
+        Read the file 'name' (in 1MB chunks) and generate an md5 sum,
+        then compares that to the md5 sum in the .dsc file.
+        """
+        chunk_size = 1073741824
+        fd = open(name, 'rb')
+        res = hashlib.md5()
+        if not sum:
+            assert self.files, "I have no files"
+            sum = [x[0] for x in self.files if x[2] == name][0]
+        data = fd.read(chunk_size)
+        while data:
+            res.update(data)
+            data = fd.read(chunk_size)
+        if res.hexdigest() != sum:
+            return (False, name, "Expected md5sum of %r, got %r" % \
+                (sum, res.hexdigest()) )
+        return (True, name, None)
+
+    def isNative(self):
+        """
+        isNative()
+        Returns True if this .dsc describes a native debian package;
+        else false.
+        """
+        return len(self.files) == 1
+
+    # Access to fields in the .dsc via a dict-like interface
+    def __getitem__(self, item):
+        """
+        x.__getitem(item) -> x[item]
+        """
+        return self.entries.__getitem__(item)
+
+    def __contains__(self, item):
+        """
+        x.__contains__(item) -> item in x
+        """
+        return self.entries.__contains__(item)
+
+    def __getattr__(self, attr):
+        """
+        x.__getattr__(attr) -> item.attr
+        """
+        return getattr(self.entries, attr)
+
+def error(ret, msg, *args):
+    """Prints an error message, unless quiet is set, and exits with ret"""
+    if not Quiet:
+        print >> sys.stderr, msg % args
+    sys.exit(ret)
+
+def debug(msg, *args):
+    """If debugging is enabled, print a message"""
+    if Debug:
+        print >> sys.stderr, msg % args
+
+def info(msg, *args):
+    """If verbose is enabled, print a message"""
+    if Verbose:
+        print msg % tuple(args)
+
+def status(msg, *args):
+    """Prints a message, unless quiet is enabled"""
+    if not Quiet:
+        print msg % tuple(args)
+
+def Download(dscinfo, number, filename, verify=True):
+    """Download filename"""
+    ftype = filename.endswith(".diff.gz") and "diff.gz" or \
+        filename.endswith(".orig.tar.gz") and "orig.tar.gz" or \
+        filename.endswith(".dsc") and "dsc" or "tar.gz"
+    if verify and os.path.exists(filename):
+        info('Verifying "%s"', filename)
+        res = dscinfo.verify(filename)
+        if not res[0]:
+            error(104, "Verification of %s failed: %s", filename, res[2])
+    status("Getting %s", filename)
+    debug("%s%s/%s", base_url,number,filename)
+    try:
+        fd = urllib2.urlopen("%s%s/%s" % (base_url, number, filename))
+        outfd = open(filename, 'wb')
+        outfd.write(fd.read())
+        fd.close()
+        outfd.close()
+    except urllib2.URLError, e:
+        status("Failed to fetch «%s» file, aborting.", ftype)
+        error(105, "Error: %s", e)
+    except urllib2.HTTPError, e:
+        status("Failed to fetch «%s» file, aborting.", ftype)
+        error(106, "Error: (%d %s)", e.code, e.msg)
+    except IOError, e:
+        status('Could not create "%s"', filename)
+        error(107, "Error: %s", e)
+
+def unpack():
+    out = open('/dev/null', 'w')
+    err = open('/dev/null', 'w')
+    ret = subprocess.call(unpack_cmd.split(), stdout=out, stderr=err)
+    out.close()
+    err.close()
+    if ret:
+        status("Failed to unpack source, aborting.")
+        sys.exit(108)
+
+def getHost(url):
+    return urllib2.splithost(urllib2.splittype(url)[1])[0]
+
+if __name__ == "__main__":
+    parser = OptionParser(usage=Usage)
+    parser.add_option("-d", "--debug", action="store_true", dest="debug",
+        default=False, help="Enable debugging")
+    parser.add_option("-v", "--verbose", action="store_true", dest="verbose",
+        default=False, help="Enable verbose output")
+    parser.add_option("-q", "--quiet", action="store_true", dest="quiet",
+        default=False, help="Never print any output")
+
+    (options, args) = parser.parse_args()
+    if len(args) != 1:
+        parser.error("Missing URL")
+    Debug = options.debug
+    Verbose = options.verbose
+    Quiet = options.quiet
+    if Verbose and Quiet:
+        error(4, "Specifying both --verbose and --quiet does not make sense")
+    if Quiet:
+        sys.stderr = StringIO()
+        sys.stdout = StringIO()
+
+    url = args[0]
+
+    if url.startswith("https://";):
+        url = url.replace("https://";, "http://";, 1)
+
+    if not url.startswith("http://";):
+        url = "http://"; + url
+
+    if getHost(url).startswith("www."):
+        url = url.replace("www.", "", 1)
+
+    if getHost(url) != getHost(base_url):
+        error(1, "Error: This utility only works for files on %s.\nMaybe you want to try dget?", base_url)
+
+    (number, filename) = url.split('/')[3:]
+
+    if not filename.endswith('.dsc'):
+        error(2, "You have to provide the URL for the .dsc file.")
+
+    try:
+        number = int(number)
+    except:
+        error(3, "Bad URL format")
+
+    unpack_cmd += filename
+
+    if os.path.exists(filename):
+        os.remove(filename)
+
+    Download(None, number, filename, False)
+    try:
+        fd = open(filename)
+        dsc_data = fd.read()
+        fd.close()
+    except Exception, e:
+        status("Error: Please report this bug, providing the URL and attach"\
+               " the following backtrace")
+        raise
+
+    dscinfo = DscParse(dsc_data)
+
+# launchpadlibrarian.net seems to store in this order:
+# For native packages:
+# <number>/.changes
+# <number>+1/.tar.gz
+# <number>+2/.dsc
+# For non-native packages:
+# <number>/.changes
+# <number>+1/.orig.tar.gz
+# <number>+2/.diff.gz
+# <number>+3/.dsc
+##
+# *Assuming* this does not change, we can figure out where the files are on
+# launchpadlibrarian.net relative to the .dsc file we're given.
+
+# Only one file listed in the .dsc means it's native package
+    if len(dscinfo.files) == 1:
+        Download(dscinfo, number-1, dscinfo.files[0][-1]) # .tar.gz
+    else:
+        Download(dscinfo, number-1, dscinfo.files[1][-1]) # .diff.gz
+        Download(dscinfo, number-2, dscinfo.files[0][-1]) # .orig.tar.gz
+
+    status("Unpacking")
+    unpack()

=== renamed file 'dgetlp' => 'dgetlp.moved'
=== added directory 'doc'
=== renamed directory 'doc' => 'doc.moved'
=== added file 'doc/404main.1'
--- doc/404main.1	1970-01-01 00:00:00 +0000
+++ doc/404main.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,29 @@
+.TH 404main 1 "February 17, 2008" "ubuntu-dev-tools"
+
+.SH NAME
+404main \- check if all build dependencies of a package are in main
+
+.SH SYNOPSIS
+\fB404main\fP <\fIpackage name\fP> [<\fIdistribution\fP>]
+
+.SH DESCRIPTION
+\fB404main\fP is a script that can be used to check if a package and
+all its build dependencies are in Ubuntu's main component or not.
+
+.SH CAVEATS
+\fB404main\fP will take the dependencies and build dependencies of the
+packages from the distribution you have first in your
+/etc/apt/sources.list file.
+.PP
+Also, because of this the <\fIdistribution\fP> option is NOT trustworthy; if
+the dependencies changed YOU WILL GET INCORRECT RESULTS.
+
+.SH SEE ALSO
+.BR apt-cache (8)
+
+.SH AUTHORS
+\fB404main\fP was written by Pete Savage <petesavage@xxxxxxxxxx> and
+this manpage by Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 2 or
+later.

=== added file 'doc/check-symbols.1'
--- doc/check-symbols.1	1970-01-01 00:00:00 +0000
+++ doc/check-symbols.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,58 @@
+.TH "CHECK\-SYMBOLS" "1" "December 9, 2007" "ubuntu-dev-tools"
+
+.SH "NAME"
+check\-symbols \- verify symbols exported by a new library version
+
+.SH "SYNOPSIS"
+\fBcheck\-symbols\fP <\fIsource\-package\fR\> [\fIDEBDIR\fR]
+
+.SH "DESCRIPTION"
+To verify the symbols exported by a new library version, run
+\fBcheck\-symbols\fP with the name of the source package as argument.
+\fBcheck\-symbols\fP will first determine the symbols exported by the
+existing and installed library version, then install the new library and
+compare the symbols exported by the new library version with the symbols
+exported by the old version.
+For each of the symbols found, \fBcheck\-symbols\fP will list if the symbol
+is new, unchanged or has been removed in the new library version.
+.PP
+In case the source package contains multiple binary library packages,
+all library files in each of the binary packages will be verified.
+.PP
+\fBcheck\-symbols\fP uses \fBnm\fP \-D to determine
+the exported symbols of the libraries.
+.PP
+If no value is given for DEBDIR, the script will assume the new library
+deb files are stored in /var/cache/pbuilder/result.
+
+.SH "EXAMPLES"
+\fBcheck\-symbols\fP telepathy\-glib .
+.TP
+This will:
+.RS 2
+.TP 2
+\(bu Use \fBnm\fP \-D to determine the exported symbols of the old,
+installed versions of the libraries provided by telepathy\-glib.
+.TP 2
+\(bu Install the binary libraries provided by the new version of
+telepathy\-glib.
+.TP 2
+\(bu Compare the output of \fBnm\fP \-D of the new libraries with the
+output of the old version.
+.TP 2
+\(bu List the result in diff format.
+.RE
+
+.SH "BUGS"
+.nf
+Please report bugs on:
+https://bugs.launchpad.net/ubuntu/+source/ubuntu\-dev\-tools/
+.fi
+
+.SH "SEE ALSO"
+.BR nm (1)
+
+.SH "AUTHOR"
+\fBcheck\-symbols\fP was written by Daniel Holbach <daniel.holbach@xxxxxxxxxx>
+and this manpage by Albert Damen <albrt@xxxxxxx>. Both are licensed
+under the GNU General Public License, version 2.

=== added file 'doc/dch-repeat.1'
--- doc/dch-repeat.1	1970-01-01 00:00:00 +0000
+++ doc/dch-repeat.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,56 @@
+.TH DCH\-REPEAT "1" "10 August 2008" "ubuntu-dev-tools"
+.SH NAME
+dch\-repeat \- repeats a changelog entry into an older release
+
+.SH SYNOPSIS
+.B dch\-repeat \-\-build\-tree <\fIPATH\fR>
+.br
+.B dch\-repeat \-\-source\-release <\fIRELEASE\fR>
+.br
+.B dch\-repeat \-\-target\-release <\fIRELEASE\fR>
+.br
+.B dch\-repeat \-\-devel\-release <\fIRELEASE\fR>
+.br
+.B dch\-repeat \-\-pocket <\fIPOCKET\fR>
+.br
+.B dch\-repeat \-h
+
+.SH DESCRIPTION
+\fBdch\-repeat\fR is used to repeat a changelog into an older release.
+It expects that \-\-build\-tree is laid out with each Ubuntu release as a
+separate directory ("feisty", "edgy", etc).
+.PP
+For example, if gimp had a security update prepared for Feisty in
+$TREE/feisty/gimp\-2.2.13, running \fBdch\-repeat\fR in
+$TREE/edgy/gimp\-2.2.13 would pull in the latest changelog from the Feisty
+build.
+
+.SH OPTIONS
+Listed below are the command line options for \fBdch\-repeat\fR:
+.TP
+.B \-h or \-\-help
+Display a help message and exit.
+.TP
+.B \-\-build\-tree PATH
+Base of build trees. Default is /scratch/ubuntu/build.
+.TP
+.B \-s or \-\-source\-release RELEASE
+Which release to take changelog from.
+.TP
+.B \-\-target\-release RELEASE
+Which release to build into.
+.TP
+.B \-\-devel\-release RELEASE
+Which release is the development release.
+.TP
+.B \-\-pocket POCKET
+Which pocket to use.
+
+.SH AUTHOR
+\fBdch-repeat\fR was written by Kees Cook <kees@xxxxxxxxxx>.
+This manual page was written by Jonathan Patrick Davies <jpds@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 2.
+
+.SH SEE ALSO 
+.BR dch(1).

=== added file 'doc/dgetlp.1'
--- doc/dgetlp.1	1970-01-01 00:00:00 +0000
+++ doc/dgetlp.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,38 @@
+.TH DGETLP "1" "27 August 2008" "ubuntu-dev-tools"
+
+.SH NAME
+dgetlp \- simulate ``dget'' behaviour for files hosted at librarian.launchpad.net
+
+.SH SYNOPSIS
+.B dgetlp [\fB\-d\fP|\fB(\fB\-v\fP|\fB\-q\fP)\fP] <\fBLaunchpad DSC URL\fP>
+
+.SH DESCRIPTION
+\fBdgetlp\fR simulates dget behaviour by downloading and extracting the <\fBLaunchpad DSC URL\fP> from the Launchpad Librarian.
+
+.SH OPTIONS
+Listed below are the command line options for dgetlp:
+.TP
+.B \-h, \-\-help
+show this help message and exit.
+.TP
+.B \-d, \-\-debug
+Enable debugging.
+.TP
+.B \-v, \-\-verbose
+Enable verbose output.
+.TP
+.B \-q, \-\-quiet
+Never print any output.
+.TP
+.B <Launchpad DSC URL>
+This is the source package that you would like to be downloaded from the Launchpad Librarian.
+
+.SH EXAMPLE
+.B dgetlp http://launchpadlibrarian.net/10348157/coreutils_5.97-5.4ubuntu1.dsc
+
+.SH AUTHOR
+\fBdgetlp\fR was written by Terence Simpson <tsimpson@xxxxxxxxxx> and
+modified by Siegfried-A. Gevatter <rainct@xxxxxxxxxx>. The python rewrite
+was written by Terence Simpson <tsimpson@xxxxxxxxxx> based off the original.
+This man page was written by Ryan Kavanagh <ryanakca@xxxxxxxxxxx>.
+Both are released under the GNU General Public License, version 2 or later.

=== added file 'doc/get-branches.1'
--- doc/get-branches.1	1970-01-01 00:00:00 +0000
+++ doc/get-branches.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,47 @@
+.TH get\-branches "1" "11 August 2008" "ubuntu-dev-tools"
+.SH NAME
+get\-branches - downloads all branches related to a Launchpad team or person
+
+.SH SYNOPSIS
+.B get\-branches
+.RB [ \-d
+.IR directory ]
+.RB [ \-o
+.BR branch | checkout ]
+.B \-t
+.I team
+.br
+.B get\-branches
+.I team
+.br
+.B get\-branches \-\-help
+
+.SH DESCRIPTION
+\fBget\-branches\fR uses the LP API to get a list of branches for a person or
+team and calls Bazaar to download all branches.
+
+.SH OPTIONS
+Listed below are the command line options for \fBget\-branches\fR:
+.TP
+.BR \-h ", " \-\-help
+Display a help message and exit.
+.TP
+.BR \-d ", " \-\-directory
+Download branches to a directory other than the current directory.
+.TP
+.BR \-o ", " \-\-operation
+Specifies which Bazaar operation to use when downloading the branches; may be
+either \fIbranch\fR or \fIcheckout\fR.
+.TP
+.BR \-t ", "  \-\-team
+Specifies which Launchpad team/person to download branches from.
+This option is required.
+
+.SH AUTHORS
+\fBget\-branches\fR was written by Daniel Holbach <daniel.holbach@xxxxxxxxxx>,
+and this manual page was written by Jonathan Patrick Davies <jpds@xxxxxxxxxx>.
+.PP
+Both are released under the terms of the GNU General Public License, version 3.
+
+.SH SEE ALSO 
+.B bzr(1)

=== added file 'doc/get-build-deps.1'
--- doc/get-build-deps.1	1970-01-01 00:00:00 +0000
+++ doc/get-build-deps.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,60 @@
+.TH GET\-BUILD\-DEPS 1 "October 27, 2007" "ubuntu-dev-tools"
+
+.SH NAME
+get\-build\-deps \- install build dependencies for one or more packages
+
+.SH SYNOPSIS
+\fBget\-build\-deps\fP [\fIpackage name\fR]
+
+.SH DESCRIPTION
+\fBget\-build\-deps\fP is a script to install the build dependencies for
+either a local source package or one or more packages from the repositories.
+.PP
+In order to obtain all missing build dependencies for a package on
+which source you are currently working, just run this script without
+any argument, and it'll read its debian/control file to determine the
+missing build dependencies.
+.PP
+Alternatively, you can call it with a list of space-separated package
+names, or the name of a single file which contains the package names
+each on a line.
+Then it will install the missing dependencies for those packages using
+"apt\-get build\-dep".
+
+.SH EXAMPLES
+.TP
+get\-build\-deps
+Looks for a debian/control file in the current working directory and
+installs the dependencies listed there.
+.TP
+get\-build\-deps geany
+Installs the build dependencies for the version of \fBgeany\fP that's
+in the repositories.
+.TP
+get\-build\-deps geany epiphany\-browser rhythmbox
+Same as the previous example but also with the dependencies for
+.B epiphany\-browser
+and
+.BR rhythmbox .
+.TP
+get\-build\-deps ./package_list.txt
+Reads the file
+.B package_list.txt
+(relative to the current working directory),
+where each line contains the name of a package, and installs the
+dependencies for the versions of all those that are in the repositories.
+
+.SH KNOWN BUGS AND LIMITATIONS
+When it's being used to install the missing dependencies for a local
+source package (i.e., no arguments are passed to it) it doesn't check
+for the dependencies to match the indicated versions, but just installs
+the newest one available in the repositories.
+
+.SH SEE ALSO
+.BR dpkg\-checkbuilddeps (1),
+.BR apt\-get (8)
+
+.SH AUTHORS
+\fBget\-build\-deps\fP and this manual page have been written by Siegfried-Angel
+Gevatter Pujals <rainct@xxxxxxxxxx>.
+They are released under the GNU General Public License, version 3 or later.

=== added file 'doc/grab-attachments.1'
--- doc/grab-attachments.1	1970-01-01 00:00:00 +0000
+++ doc/grab-attachments.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,26 @@
+.TH GRAB\-ATTACHMENTS "1" "10 August 2008" "ubuntu-dev-tools"
+.SH NAME
+grab\-attachments \- downloads attachments from a Launchpad bug
+.SH SYNOPSIS
+.B grab\-attachments\fR <\fIbug-number\fR>
+.br
+.B grab\-attachments \-h
+.SH DESCRIPTION
+\fBgrab\-attachments\fR is a script to download all attachments from a
+Launchpad bug report into the current directory.
+
+.SH OPTIONS
+Listed below are the command line options for grab\-attachments:
+.TP
+.B \-h
+Display a help message and exit.
+.TP
+.B <bug-number>
+Specifies the Launchpad bug number that the script should download
+attachments from.
+
+.SH AUTHOR
+\fBgrab\-attachments\fR was written by Daniel Holbach and this manual page
+was written by Jonathan Patrick Davies.
+.PP
+Both are released under the GNU General Public License, version 2.

=== added file 'doc/grab-merge.1'
--- doc/grab-merge.1	1970-01-01 00:00:00 +0000
+++ doc/grab-merge.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,18 @@
+.TH grab\-merge 1 "March 26, 2009" "ubuntu-dev-tools"
+
+.SH NAME
+grab\-merge \- grabs a merge's files from merges.ubuntu.com.
+
+.SH SYNOPSIS
+\fBgrab\-merge\fP <\fIpackage name\fP>
+
+.SH DESCRIPTION
+\fBgrab\-merge\fP is a script that downloads a merge's packaging files and report
+from merges.ubuntu.com. Placing them in a new directory for working from.
+
+.SH AUTHORS
+\fBgrab\-merge\fP was written by Scott James Remnant <scott@xxxxxxxxxx> and
+this manpage by Jonathan Davies <jpds@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 2 or
+later.

=== added file 'doc/hugdaylist.1'
--- doc/hugdaylist.1	1970-01-01 00:00:00 +0000
+++ doc/hugdaylist.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,26 @@
+.TH HUGDAYLIST "1" "August 27, 2008" "ubuntu-dev-tools"
+
+.SH NAME
+hugdaylist \- produce MoinMoin wiki formatted tables based on a Launchpad bug list
+
+.SH SYNOPSIS
+.B hugdaylist [\fB\-n\fP|\fB\-\-number <NUMBER>\fP] \fBlaunchpad-buglist-url\fP
+
+.SH DESCRIPTION
+\fBhugdaylist\fP produces MoinMoin wiki formatted tables based on a
+Launchpad bug list
+
+.SH OPTIONS
+.TP
+\fB\-\-number=<NUMBER>\fP
+This option allows you to specify the number of entries to output.
+.TP
+\fBlaunchpad-buglist-url\fP
+Required, this option is a URL pointing to a launchpad bug list.
+
+.SH AUTHOR
+\fBhugdaylist\fP has been written by Canonical Ltd., Daniel Holbach
+<daniel.holbach@xxxxxxxxxxxxx> and Jonathan Patrick Davies <jpds@xxxxxxxxxx>.
+This manual page was written by Ryan Kavanagh <ryanakca@xxxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 3.

=== added file 'doc/lp-project-upload.1'
--- doc/lp-project-upload.1	1970-01-01 00:00:00 +0000
+++ doc/lp-project-upload.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,20 @@
+.TH lp-project-upload "1" "05 September 2009" "ubuntu-dev-tools"
+.SH NAME
+lp\-project\-upload \- Upload a release tarball to a Launchpad project.
+
+.SH SYNOPSIS
+.B lp\-project\-upload 
+.I project-name version tarball
+
+.SH DESCRIPTION
+\fBlp\-project\-upload\fR uploads a tarball release of a project to Launchpad.
+It can create milestones and releases on the fly after confirmation.
+
+If there is a file \fItarball\fB.asc\fR, it is uploaded as the signature of the
+tarball.
+
+.SH AUTHORS
+\fBlp\-project\-upload\fR was written by Martin Pitt <martin.pitt@xxxxxxxxxx>.
+.PP
+It is released under the terms of the GNU General Public License, version 2
+or (at your option) any later version.

=== added file 'doc/lp-set-dup.1'
--- doc/lp-set-dup.1	1970-01-01 00:00:00 +0000
+++ doc/lp-set-dup.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,28 @@
+.TH lp\-set\-dup "1" "March 6 2010" "ubuntu-dev-tools"
+.SH NAME
+lp\-set-\dup \- mark one or more bugs as duplicate of another bug
+
+.SH SYNOPSIS
+.B lp\-set\-dup [\-f] <main bug> <duplicate bug> [<duplicate bug> ...]
+.br
+.B lp\-set\-dup \-\-help
+
+.SH DESCRIPTION
+\fBlp\-set\-dup\fR allow to easily mark one or more bug as duplicate of
+another bug. It checks for permission to operate on a given bug first,
+then perform required tasks on Launchpad.
+
+.SH OPTIONS
+Listed below are the command line options for \fBlp\-set\-dup\fR:
+.TP
+.B \-h or \-\-help
+Display a help message and exit.
+.TP
+.B \-f
+Skip confirmation prompt.
+
+.SH AUTHORS
+\fBlp\-set\-dup\fR was written by Loïc Minier <lool@xxxxxxxx>,
+and this manual page was written by Luca Falavigna <dktrkranz@xxxxxxxxxx>.
+.PP
+Both are released under the terms of the GNU General Public License, version 2.

=== added file 'doc/lp-shell.1'
--- doc/lp-shell.1	1970-01-01 00:00:00 +0000
+++ doc/lp-shell.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,42 @@
+.TH lp-shell "1" "27 March 2010" "ubuntu-dev-tools"
+.SH NAME
+lp\-shell \- Open an interactive launchpadlib shell.
+
+.SH SYNOPSIS
+.B lp\-shell
+.RB [ \-a ]
+.RI [ service ]
+.RI [ "LP API version" ]
+
+.SH DESCRIPTION
+.B lp\-shell
+opens an interactive Python shell with a launchpadlib.Launchpad object "lp"
+which is ready for use.
+
+It authenticates against Launchpad with the consumer name "udt-lp-shell". When
+using \fBlp\-shell\fR with the \fB\-a\fR option it will use the anonymous login
+from launchpadlib.Launchpad.
+
+By default \fBlp\-shell\fR connects to the "\fIedge\fR" Launchpad service
+using the "\fI1.0\fR" LP API version.
+
+If you want to connect to an other Launchpad service, call \fBlp\-shell\fR with
+the service name as the second argument. \fBlp\-shell\fR supports all services
+known by launchpadlib Python module.
+Currently known are (list can be incomplete or outdated): "production", "edge",
+"staging", "dogfood".
+
+A different LP API version can be selected by passing the API version to use as
+the third argument. Current supported are: "beta", "1.0" and "devel".
+
+.SH OPTIONS
+.TP
+.B \-a
+Login anonymously into Launchpad.
+
+.SH AUTHORS
+.B lp\-shell
+was written by Martin Pitt <martin.pitt@xxxxxxxxxx>.
+.PP
+It is released under the terms of the GNU General Public License, version 2
+or (at your option) any later version.

=== added file 'doc/manage-credentials.1'
--- doc/manage-credentials.1	1970-01-01 00:00:00 +0000
+++ doc/manage-credentials.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,76 @@
+.TH MANAGE-CREDENTIALS "1" "13 January 2009" "ubuntu-dev-tools"
+.SH NAME
+manage-credentials \- a tool to create (and manage) credentials which
+are used to access launchpad via the API.
+.SH SYNOPSIS
+.B manage-credentials create -c <consumer> [--email <email> --password <password>] [--service <staging|edge>]
+.br
+.B manage-credentials \-h
+.SH DESCRIPTION
+\fBmanage-credentials\fR is a tool to create (and manage) credentials which
+are used to access Launchpad via the API.
+
+.PP
+Currently this tool can be used
+to create a token with or without using the web UI. In the future, once
+related methods are available through the API, this tool can also be used
+to manage tokens in launchpad and on the users local machine.
+
+.SH OPTIONS
+Listed below are the command line options for requestsync:
+.TP
+.B \-h
+Display a help message and exit.
+.TP
+.B \-c \-\-consumer
+.TP
+.B \-e \-\-email <email>
+Your email address as registered on Launchpad.
+.TP
+.B \-p \-\-password <password>
+Your Launchpad password.
+.TP
+.B \-s \-\-service <edge|staging>
+If we should use the edge or staging root of the Launchpad API.
+.TP
+.B \-\-cache
+Where to store the cache.
+.TP
+.B \-o
+Which file we should save the credentials to. By default
+\fBmanage-credentials\fR writes the credentials tokens to the
+~/.cache/lp_credentials/ directory.
+.TP
+.B \-l \-\-level <number>
+A number representing the access-level you wish to give to the new
+Launchpad token. 0 is unauthorized, 1 is read public data, 2; write public data,
+3; read private data and 4; write private data.
+
+.SH EXAMPLE USAGE
+There are currently two ways of using \fBmanage-credentials\fR to get
+Launchpad tokens.
+.TP
+1) manage-credentials create \-c CONSUMER \-\-level 2
+
+.TP
+This way shall open your webbrowser with a Launchpad login page.
+
+.TP
+2) manage-credentials create \-c CONSUMER \-\-level 2 \-\-password BOO \-\-email me@xxxxxxxxxxx
+
+.TP
+This is a hack, but it works and does not require a webbrowser .
+
+.TP
+If you intend to use manage-credentials for Ubuntu development (such as
+the ubuntu-dev-tools package). Please by sure to run the following:
+
+.TP
+manage-credentials create \-c ubuntu-dev-tools \-l 2
+
+.SH AUTHOR
+.B manage-credentials
+was written by Markus Korn <thekorn@xxxxxx> and this manual page was written by
+Jonathan Davies <jpds@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 3.

=== added file 'doc/merge-changelog.1'
--- doc/merge-changelog.1	1970-01-01 00:00:00 +0000
+++ doc/merge-changelog.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,20 @@
+.TH merge-changelog 1 "February 15, 2010" "ubuntu-dev-tools"
+
+.SH NAME
+merge\-changelog \- merges two changelogs with a common base
+
+.SH SYNOPSIS
+\fBmerge\-changelog\fP <\fIleft changelog\fP> <\fIright changelog\fP>
+
+.SH DESCRIPTION
+\fBmerge\-changelog\fP takes two changelogs that once shared a common source,
+merges them back together, and prints the merged result to stdout.  This
+is useful if you need to manually merge a ubuntu package with a new
+Debian release of the package.
+
+.SH AUTHORS
+\fBmerge\-changelog\fP was written by Scott James Remnant <scott@xxxxxxxxxx>
+and Bryce Harrington <bryce@xxxxxxxxxx>. This manpage was written by Ryan
+Kavanagh <ryanakca@xxxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 3.

=== added file 'doc/mk-sbuild.1'
--- doc/mk-sbuild.1	1970-01-01 00:00:00 +0000
+++ doc/mk-sbuild.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,112 @@
+.TH MK\-SBUILD "1" "09 February 2010" "ubuntu-dev-tools"
+
+.SH NAME
+mk\-sbuild \- creates chroots via schroot and sbuild
+
+.SH SYNOPSIS
+\fBmk\-sbuild\fR [\fB\-\-arch=ARCH\fR] [\fB\-\-name=NAME\fR]
+[\fB\-\-personality=PERSONALITY\fR] [\fB\-\-debug\fR] [\fB\-\-source\-template=FILE\fR]
+[\fB\-\-debootstrap\-mirror=URL\fR] [\fB\-\-distro=DISTRO\fR] 
+[\fB\-\-vg=VOLUME_GROUP\fR] [\fB\-\-type=SCHROOT_TYPE\fR] <\fBRelease\fR>
+
+.SH DESCRIPTION
+\fBmk\-sbuild\fR creates chroots via schroot and sbuild.
+
+.SH OPTIONS
+Listed below are the command line options for mk\-sbuild:
+.TP
+.B \-\-arch=ARCH
+What architecture to select (defaults to the native architecture).
+.TP
+.B \-\-name=NAME
+Base name for the schroot (arch is appended).
+.TP
+.B \-\-personality=PERSONALITY
+What personality to use (defaults to match \-\-arch).
+.TP
+.B \-\-debug
+Turn on script debugging.
+.TP
+.B \-\-skip\-updates
+Do not include the \-updates pocket in the installed sources.list.
+.TP
+.B \-\-source\-template=FILE
+Use FILE as the sources.list template (defaults to $HOME/.mk\-sbuild.sources).
+.TP
+.B \-\-debootstrap\-mirror=URL
+Use URL as the debootstrap source (defaults to http://ports.ubuntu.com for lpia,
+official Ubuntu repositories for the supported architectures).
+.TP
+.B \-\-distro=DISTRO
+Enable distro-specific logic.  Currently known distros: "ubuntu" (default)
+and "debian".
+.TP
+.B \-\-vg=VOLUME_GROUP
+Specify a volume group, and subsequently use a default SCHROOT_TYPE of
+"lvm-snapshot" rather than "directory" (via aufs) mounts.
+.TP
+.B \-\-type=SHROOT_TYPE
+Specify a SCHROOT_TYPE.  Supported values are "directory" (default if
+\-\-vg not specified), "lvm-snapshot" (default if \-\-vg specified), and "file".
+
+.SH ENVIRONMENT VARIABLES
+.TP
+.B LV_SIZE
+Size of source LVs (defaults to 5G).
+.TP
+.B SNAPSHOT_SIZE
+Size of snapshot LVs (defaults to 4G).
+.TP
+.B SCHROOT_CONF_SUFFIX
+Lines to append to schroot entries.
+.TP
+.B SKIP_UPDATES
+Do not include the \-updates pocket in the installed sources.list.
+.TP
+.B DEBOOTSTRAP_MIRROR
+Mirror location (same as \-\-debootstrap-mirror)
+.TP
+.B SOURCE_CHROOTS_DIR
+use SOURCE_CHROOTS_DIR as home of schroot source directories. (default
+/var/lib/schroot/chroots)
+.TP
+.B SOURCE_CHROOTS_TGZ
+use SOURCE_CHROOTS_TGZ as home of schroot source tarballs. (default
+/var/lib/schroot/tarballs)
+
+.SH FILES
+.TP
+.B $HOME/.mk\-sbuild.rc
+Sourced for environment variables (defined above).
+.TP
+.B $HOME/.mk\-sbuild.sources[.$DISTRO]
+Can contain a customized sources.list.
+It will be read when creating the schroot.
+If a file with ".ubuntu" or ".debian" is found (based on the \-\-distro
+argument) that file will use used instead.
+See sources.list(5) for more details on the format.
+.TP
+.B $HOME/.mk\-sbuild.schroot.conf[.$SCHROOT_TYPE]
+Can contain a customized configuration section to be inserted into
+/etc/schroot/schroot.conf.
+If a file with ".lvm-snapshot", ".directory", or ".file" is found (based on the
+values of the \-\-vg and \-\-type arguments) that file will use used instead.
+See schroot.conf(5) for more details on the format.
+.SH USING THE CHROOTS
+.TP
+To CHANGE the golden image: \fBsudo schroot \-c ${CHROOT_NAME}\-source \-u root\fR
+.TP
+To ENTER an image snapshot: \fBschroot \-c ${CHROOT_NAME}\fR
+.TP
+To BUILD within a snapshot: \fBsbuild \-d ${SCHROOT_NAME} PACKAGE*.dsc\fR
+.TP
+for example, to update the packages in a golden image: \fBschroot \-c ${CHROOT_NAME}\-source \-u root -- sh \-c "apt-get \-qq update && apt-get \-qy upgrade && apt-get clean" </dev/null\fR
+
+.SH SEE ALSO
+sbuild\-setup (7), sources.list (5), schroot.conf (5),
+https://help.ubuntu.com/community/SbuildLVMHowto
+
+.SH AUTHOR
+\fBmk\-sbuild\fR was written by Kees Cook <kees@xxxxxxxxxx>.
+This man page was written by Ryan Kavanagh <ryanakca@xxxxxxxxxxx>.
+Both are released under the GNU General Public License, version 3 or later.

=== added file 'doc/pbuilder-dist-simple.1'
--- doc/pbuilder-dist-simple.1	1970-01-01 00:00:00 +0000
+++ doc/pbuilder-dist-simple.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,50 @@
+.TH PBUILDER\-DIST 1 "February 25, 2008" "ubuntu-dev-tools"
+
+.SH NAME
+pbuilder\-dist\-simple \- simple multi-distribution pbuilder wrapper
+
+.SH SYNOPSIS
+\fBpbuilder\-\fI<dist>\fR\fP \fIoperation\fR [\fI...\fR]
+
+.SH DESCRIPTION
+\fBpbuilder\-dist\fP is a wrapper that makes it easy to use pbuilder with
+chroots for many different Ubuntu/Debian distributions.
+If you need more features than \fBpbuilder\-dist\-simple\fP provides, have a
+look at \fBpbuilder\-dist\fP.
+
+.SH USAGE
+Create one symlink to \fBpbuilder\-dist\-simple\fP for each distribution
+for which you want a build environment, naming them like "pbuilder\-hardy",
+"pbuilder\-gutsy", etc.
+.PP
+Replace \fIoperation\fP with the action you want \fBpbuilder\-dist\-simple\fP
+to do (create, update, build, clean, login or execute).
+
+.SH EXAMPLES
+.TP
+pbuilder\-gutsy create
+Creates a \fBpbuilder\fP environment for Ubuntu Gutsy.
+.TP
+pbuilder\-sid update
+Updates an existing Debian Sid environment.
+.TP
+pbuilder\-hardy build ./sample_1.0\-0ubuntu1.dsc
+Builds the specified package on an already existing Ubuntu Hardy environment.
+
+.SH FILES
+By default, \fBpbuilder\-dist\-simple\fP will store all the files it
+generates in \fB~/pbuilder/\fP.
+This can be changed by modifying the BASE_DIR value on the top of the script
+to any other directory you want.
+If the directory doesn't exit, it will be created at runtime.
+
+.SH SEE ALSO
+\fBpbuilder\fR, \fBpbuilderrc\fR
+
+.SH AUTHORS
+\fBpbuilder\-dist\fP was originally written by Jamin W. Collins
+<jcollins@xxxxxxxxxxxxxxxx> and Jordan Mantha <mantha@xxxxxxxxxx>, and
+this manpage by Siegfried-A. Gevatter <rainct@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 2 or
+later.

=== added file 'doc/pbuilder-dist.1'
--- doc/pbuilder-dist.1	1970-01-01 00:00:00 +0000
+++ doc/pbuilder-dist.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,117 @@
+.TH PBUILDER\-DIST 1 "January 10, 2008" "ubuntu-dev-tools"
+
+.SH NAME
+pbuilder\-dist, cowbuilder\-dist \- multi-distribution pbuilder/cowbuilder wrapper
+
+.SH SYNOPSIS
+\fBpbuilder\-dist\fP \fIdistribution\fR [\fIarchitecture\fR] [\fBmainonly\fP]
+\fIoperation\fR [\fI...\fR]
+
+\fBcowbuilder\-dist\fP \fIdistribution\fR [\fIarchitecture\fR] [\fBmainonly\fP]
+\fIoperation\fR [\fI...\fR]
+
+.SH DESCRIPTION
+\fBpbuilder\-dist\fP is a wrapper that makes it easy to use pbuilder with many different 
+versions of Ubuntu and/or Debian. 
+.PP
+It is common to symlink this script in order to give it many names in the form of
+\fBpbuilder\-\fIdistribution\fP\fR or \fBpbuilder\-\fIdistribution\fR\-\fIarchitecture\fP\fR,
+like for example \fBpbuilder\-feisty\fP, \fBpbuilder\-sid\fP, \fBpbuilder\-gutsy\-i386\fP, etc.
+.PP
+The same applies to \fBcowbuilder\-dist\fP, which uses cowbuilder. The main
+difference between both is that pbuilder compresses the created chroot as a
+a tarball, thus using less disc space but needing to uncompress (and possibly
+compress) its contents again on each run, and cowbuilder doesn't do this.
+
+.SH USAGE
+There are many arguments listed on the synopsis; each of them, if used, has to be used exactly in
+the same order as it appears there.
+In case you renamed the script to \fBpbuilder\-\fIdistribution\fP\fR, do not
+use the \fBdistribution\fP parameter; same with \fBi386\fP / \fBamd64\fP if
+the name also contains \-\fIarchitecture\fR.
+.TP
+\fBdistribution\fP
+Replace this with the codename of the version of Ubuntu or Debian you want to use.
+.TP
+\fBarchitecture\fP
+This optional parameter will attempt to construct a chroot in a foreign
+architecture.  For some architecture pairs (e.g. i386 on an amd64 install),
+the chroot will be created natively.  For others (e.g. armel on an i386
+install), qemu-static and binfmt-misc will be used.  Note that some
+combinations (e.g. amd64 on an i386 install) require special separate
+kernel handling, and may break in unexpected ways.
+.TP
+\fBmainonly\fP
+If you specify \fBmainonly\fP, only packages from the main (in Debian) or
+main and restricted (in Ubuntu) components will be used. By default, all
+official components are enabled. This only has effect when creating a new
+environment.
+.TP
+\fBoperation\fP
+Replace this with the action you want \fBpbuilder\fP to do (create, update,
+build, clean, login or execute).
+If you don't specify any action, but the next argument is a .dsc file, it
+will assume that it should build.
+Check its manpage for more details.
+.TP
+\fB[...]\fP
+.br
+Replace this with other parameters, if needed.
+For example, if \fBbuild\fP is the option, you will need to also specify
+a .dsc file. As a special feature, if you specify a .dsc file you can
+skip the \fBbuild\fP option and this script will automatically assume that
+building is the action you want to do.
+.br
+You may also specify \fB--debug-echo\fP so that the \fBpbuilder\fP/
+\fBcowbuilder\fP command which would normally be executed is just printed
+on the standard output instead. This is useful for debugging
+\fBpbuilder-dist\fP.
+
+.SH EXAMPLES
+.TP
+pbuilder\-dist gutsy create
+Creates a \fBpbuilder\fP environment for Ubuntu Gutsy, with all components enabled.
+.TP
+pbuilder\-sid mainonly create
+Creates a \fBpbuilder\fP environment for Debian Sid, with only the main component.
+.TP
+pbuilder\-feisty build ./sample_1.0\-0ubuntu1.dsc
+Builds the specified package on an already existing Ubuntu Feisty environment.
+.TP
+pbuilder\-dist feisty withlog build ./sample_1.0\-0ubuntu1.dsc
+Same as above, but stores \fBpbuilder\fP's output on a file.
+.TP
+pbuilder\-etch i386 update
+Updates an existing i386-architecture Debian Etch environment on an amd64 system.
+.TP
+cowbuilder-experimental create
+Creates a \fBcowbuilder\fP environment for Debian Experimental.
+
+.SH FILES AND ENVIRONMENT VARIABLES
+By default, \fBpbuilder\-dist\fP will store all the files it generates in
+\fB~/pbuilder/\fP. This can be changed by setting the $PBUILDFOLDER global
+variable. If the directory doesn't exist, it will be created on the run.
+.PP
+A file with the log of the last operation, called last_operation.log, will be
+saved in the results subdirectory of each build environment.
+.PP
+The default authentication method is \fBsudo\fP. You can change this by
+setting the $PBUILDAUTH variable.
+
+.SH BUGS
+If you experience any problem with this script contact me on rainct@xxxxxxxxxx
+or file a bug at https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools.
+.PP
+Please ensure first that the problem is really this script and not an issue
+with \fBpbuilder\fP or \fBcowbuilder\fP themselves.
+
+.SH SEE ALSO
+\fBpbuilder\fR, \fBpbuilderrc\fR, \fBcowbuilder\fR
+
+.SH AUTHORS
+\fBpbuilder\-dist\fP was written by Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+and includes patches by Iain Lane <iain@xxxxxxxxxxxxxxxxxxx>. This manual page
+has been written by Siegfried-A. Gevatter <rainct@xxxxxxxxxx>.
+
+\fBpbuilder\-dist\fP is released under the GNU General Public License, version
+2 or later.

=== added file 'doc/pull-debian-source.1'
--- doc/pull-debian-source.1	1970-01-01 00:00:00 +0000
+++ doc/pull-debian-source.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,33 @@
+.TH PULL\-DEBIAN\-SOURCE "1" "20 December 2008" "ubuntu-dev-tools"
+
+.SH NAME
+pull\-debian\-source \- download a source package from Debian
+
+.SH SYNOPSIS
+.B pull\-debian\-source \fR[\fB\-h\fR]\fB <\fBsource package\fR> [\fItarget release\fR]
+
+.SH DESCRIPTION
+\fBpull\-debian\-source\fR downloads and extracts the latest version of
+<\fBsource package\fR> from Debian.
+If the optional parameter [\fItarget release\fR] is specified, the latest
+version in that release will be downloaded instead.
+
+.SH OPTIONS
+Listed below are the command line options for pull\-debian\-source:
+.TP
+.B \-h, \-\-help
+Display the usage instructions and exit.
+.TP
+.B <source package>
+This is the source package that you would like to be downloaded from Debian.
+.TP
+.B [target release]
+This is the release that you would like the source package to be downloaded from.
+This value defaults to 'unstable'.
+
+.SH AUTHOR
+.PP
+\fBpull\-debian\-source\fR and this manual page were written by Nathan Handler
+<nhandler@xxxxxxxxxx>. The manual page was based on Iain Lane's manual page for
+pull-lp-source.
+Both are released under the GNU General Public License, version 3 or later.

=== added file 'doc/pull-lp-source.1'
--- doc/pull-lp-source.1	1970-01-01 00:00:00 +0000
+++ doc/pull-lp-source.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,37 @@
+.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 \fR[\fB\-h\fR]\fB <\fBsource package\fR> [\fItarget release\fR]
+
+.SH DESCRIPTION
+\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
+Listed below are the command line options for pull\-lp\-source:
+.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@xxxxxxxxxxxxxxxxxxx>.
+Both are released under the GNU General Public License, version 3 or later.

=== added file 'doc/pull-revu-source.1'
--- doc/pull-revu-source.1	1970-01-01 00:00:00 +0000
+++ doc/pull-revu-source.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,27 @@
+.TH PULL\-REVU\-SOURCE "1" "30 August 2009" "ubuntu-dev-tools"
+
+.SH NAME
+pull\-revu\-source \- download a source package from REVU
+
+.SH SYNOPSIS
+.B pull\-revu\-source \fR[\fB\-h\fR]\fB <\fBsource package\fR>
+
+.SH DESCRIPTION
+\fBpull\-revu\-source\fR downloads and extracts the latest version of
+<\fBsource package\fR> from REVU.
+
+.SH OPTIONS
+Listed below are the command line options for pull\-revu\-source:
+.TP
+.B \-h, \-\-help
+Display the usage instructions and exit.
+.TP
+.B <source package>
+This is the source package that you would like to be downloaded from Debian.
+
+.SH AUTHOR
+.PP
+\fBpull\-revu\-source\fR and this manual page were written by Nathan Handler
+<nhandler@xxxxxxxxxx>. \fBpull\-revu\-source\fR is based on \fBrevupull\fR in
+\fBkubuntu\-dev\-tools\fR, written by Harald Sitter <apachelogger@xxxxxxxxxx>.
+Both are released under the GNU General Public License, version 3 or later.

=== added file 'doc/requestsync.1'
--- doc/requestsync.1	1970-01-01 00:00:00 +0000
+++ doc/requestsync.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,114 @@
+.TH REQUESTSYNC "1" "19 January 2008" "ubuntu-dev-tools"
+.SH NAME
+requestsync \- helper to file sync requests for Ubuntu
+.SH SYNOPSIS
+.B requestsync\fR [\fB\-d \fIdistro\fR] [\fB\-nse\fR] [\fB\-k \fIkeyid\fR] <\fBsource package\fR> [\fBtarget release\fR] [\fIbase version\fR]
+.br
+.B requestsync \-\-lp\fR [\fB\-nse\fR] <\fBsource package\fR> <\fBtarget release\fR> [\fIbase version\fR]
+.br
+.B requestsync \-h
+.SH DESCRIPTION
+\fBrequestsync\fR looks at the versions of <source package> in Debian and
+Ubuntu and prompts for an explanation of why the Ubuntu changes (if there
+are any) should be dropped.
+The changelog entry is then downloaded from packages.debian.org.
+If the sync request is being filed per email (default), a prompt for your
+GPG passphrase follows so that it can sign the mail and send it off to
+Launchpad.
+Alternatively a sync request can be filed directly using the launchpadlib
+Python module (option \fB\-\-lp\fR).
+\fBrequestsync\fR falls back to mail the sync request if submitting using
+the launchpadlib module fails.
+
+.PP
+\fBrequestsync\fR checks if you have the permissions to request the sync from
+the archive administrators directly by checking if you have upload permissions
+for that package through package set permissions or component permissions. If
+you don't have upload permissions, the script will subscribe the necessary
+team with approval rights to the bug report for you.
+
+This check is only performed if \fBrequestsync\fR is allowed to use the LP API
+(option \fB\-\-lp\fR). In the other case \fBrequestsync\fR relies on that you
+answer the question about upload permissions honestly to determine if a team
+with approval rights is to be subscribed to the bug.
+
+.PP
+\fBrequestsync\fR uses launchpadlib authentication to file its requests. Please
+see manage-credentials(1) for more information.
+
+.SH OPTIONS
+Listed below are the command line options for requestsync:
+.TP
+.B \-h
+Display a help message and exit.
+.TP
+.B \-d
+Specifies which Debian distribution a package should be synced from.
+Default is \fIunstable\fR.
+.TP
+.B \-n
+Specifies that the package is a new package, and requestsync should not
+attempt to look it up in Ubuntu since it will not exist.
+.TP
+.B \-k \fI<keyid>\fR
+Specifies your GPG key.
+Can also be set with the line `\fIexport GPGKEY=<keyid>\fR' in your shell's
+configuration (for example: \fI$HOME/.bashrc\fR).
+This is only used if the sync request is mailed to Launchpad.
+.TP
+.B \-\-lp
+Use the launchpadlib Python module (packaged as python\-launchpadlib) to
+file the sync request in Launchpad.
+.TP
+.B \-s
+Specifies that you require sponsorship.
+You need this option if you don't have upload permissions for that package.
+This disables the upload permissions check described above. 
+.TP
+.B \-e
+Use this flag after FeatureFreeze for non-bug fix syncs. \fBrequestsync\fR will
+subscribe ubuntu-release team instead of sponsorship team.
+.TP
+.B <source package>
+This is the source package that you would like to be synced from Debian.
+.TP
+.B <target release>
+This is the release that you would like the source package to be synced
+into.
+This should always be the latest development release of Ubuntu.
+.TP
+.B [base version]
+In some cases, the base version (where the Ubuntu package started differing
+from the Debian package) cannot be automatically determined.
+Specify this option in this case.
+
+.SH ENVIRONMENT VARIABLES
+\fBrequestsync\fR uses the following variables which should be set in your
+shell's configuration by adding \fIexport VARIABLE=\fR lines, where VARIABLE is
+one of the following:
+
+.TP
+.B GPGKEY
+Specifies your GnuPG key ID.
+.TP
+.B DEBEMAIL
+Specifies which email should be used when sending to Launchpad.
+.TP
+.B DEBSMTP
+Set which SMTP server to use when sending mail.
+If unspecified this defaults to fiordland.ubuntu.com.
+.TP
+.B DEBSMTP_PORT
+Sets which port of the SMTP server to use. Default is 25.
+.TP
+.B DEBSMTP_USER \fRand\fB DEBSMTP_PASS
+Sets the username and password to use when authenticating to the SMTP server.
+
+.SH SEE ALSO 
+.BR rmadison (1)
+
+.SH AUTHOR
+.B requestsync
+and this manual page were written by the Ubuntu MOTU Team.
+.PP
+Both are released under the GNU General Public License, version 2.

=== added file 'doc/reverse-build-depends.1'
--- doc/reverse-build-depends.1	1970-01-01 00:00:00 +0000
+++ doc/reverse-build-depends.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,172 @@
+.\" Automatically generated by Pod::Man 2.1801 (Pod::Simple 3.05)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings.  \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
+.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+.    ds -- \(*W-
+.    ds PI pi
+.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
+.    ds L" ""
+.    ds R" ""
+.    ds C` ""
+.    ds C' ""
+'br\}
+.el\{\
+.    ds -- \|\(em\|
+.    ds PI \(*p
+.    ds L" ``
+.    ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
+.\" entries marked with X<> in POD.  Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+.    de IX
+.    tm Index:\\$1\t\\n%\t"\\$2"
+..
+.    nr % 0
+.    rr F
+.\}
+.el \{\
+.    de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
+.    \" fudge factors for nroff and troff
+.if n \{\
+.    ds #H 0
+.    ds #V .8m
+.    ds #F .3m
+.    ds #[ \f1
+.    ds #] \fP
+.\}
+.if t \{\
+.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+.    ds #V .6m
+.    ds #F 0
+.    ds #[ \&
+.    ds #] \&
+.\}
+.    \" simple accents for nroff and troff
+.if n \{\
+.    ds ' \&
+.    ds ` \&
+.    ds ^ \&
+.    ds , \&
+.    ds ~ ~
+.    ds /
+.\}
+.if t \{\
+.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+.    \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+.    \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+.    \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+.    ds : e
+.    ds 8 ss
+.    ds o a
+.    ds d- d\h'-1'\(ga
+.    ds D- D\h'-1'\(hy
+.    ds th \o'bp'
+.    ds Th \o'LP'
+.    ds ae ae
+.    ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "BUILD-RDEPS 1"
+.TH BUILD-RDEPS 1 "2008-08-14" "Debian Utilities" " "
+.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+build\-rdeps \- find packages that depend on a specific package to build (reverse build depends)
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+\&\fBubuild-rdeps\fR \fIpackage\fR
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+\&\fBubuild-rdeps\fR searches for all packages that build-depend on the specified package.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+.IP "\fB\-u\fR \fB\-\-update\fR" 4
+.IX Item "-u --update"
+Run apt-get update before searching for build-depends.
+.IP "\fB\-s\fR \fB\-\-sudo\fR" 4
+.IX Item "-s --sudo"
+Use sudo when running apt-get update. Has no effect if \-u is omitted.
+.IP "\fB\-\-distribution\fR" 4
+.IX Item "--distribution"
+Select another distribution, which is searched for build-depends.
+.IP "\fB\-m\fR \fB\-\-print\-maintainer\fR" 4
+.IX Item "-m --print-maintainer"
+Print the value of the maintainer field for each package.
+.IP "\fB\-d\fR \fB\-\-debug\fR" 4
+.IX Item "-d --debug"
+Run the debug mode
+.IP "\fB\-\-help\fR" 4
+.IX Item "--help"
+Show the usage information.
+.IP "\fB\-\-version\fR" 4
+.IX Item "--version"
+Show the version information.
+.SH "LICENSE"
+.IX Header "LICENSE"
+This code is copyright by Patrick Schoenfeld
+<schoenfeld@in\-medias\-res.com>, all rights reserved.
+This program comes with \s-1ABSOLUTELEY\s0 \s-1NO\s0 \s-1WARRANTY\s0.
+You are free to redistribute this code under the terms of the
+\&\s-1GNU\s0 General Public License, version 2 or later.
+.SH "AUTHOR"
+.IX Header "AUTHOR"
+Patrick Schoenfeld <schoenfeld@in\-medias\-res.com>

=== added file 'doc/submittodebian.1'
--- doc/submittodebian.1	1970-01-01 00:00:00 +0000
+++ doc/submittodebian.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,30 @@
+.TH SUBMITTODEBIAN 1 "Dec 2007" "ubuntu-dev-tools"
+.SH NAME
+submittodebian \- submit changes in Debian source tree to Debian
+.SH SYNOPSIS
+.B submittodebian
+.SH DESCRIPTION
+This manual page documents briefly the
+.B submittodebian
+command.
+.PP
+.B submittodebian
+was created to help bridge a gap between Debian and Ubuntu, namely by making it trivially easy to submit your changes to a Debian package to the Debian bug tracking system.
+.PP
+It expects to find the .dsc and diff.gz of the current version (which you likely just created) and the previous one in the parent directory.
+By examining debian/changelog it will extract the information it needs to:
+.PP
+1. Extract the debdiff containing your changes.
+.PP
+2. Open the debdiff in your $EDITOR so that you can remove any Ubuntu specific changes.
+.PP
+3. Extract your changelog entry so that you can create a bug report from it.
+.PP
+4. Start reportbug with the debdiff attached and with the text of the changelog entry.
+.SH SEE ALSO
+.BR reportbug (1).
+.br
+.SH AUTHOR
+submittodebian and this man page were written by Soren Hansen <soren@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 2 or later.

=== added file 'doc/suspicious-source.1'
--- doc/suspicious-source.1	1970-01-01 00:00:00 +0000
+++ doc/suspicious-source.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,28 @@
+.TH SUSPICIOUS\-SOURCE 1 "September 14, 2007" "ubuntu-dev-tools"
+
+.SH NAME
+suspicious\-source \- search for files that are not the GPL's
+"preferred form of modification"
+
+.SH SYNOPSIS
+\fBsuspicious\-source\fP
+
+.SH DESCRIPTION
+\fBsuspicious\-source\fP is a script that outputs a list of files which
+are not common source files.
+This should be run in the root of a source tree to find files which might
+not be the "preferred form of modification" that the GPL and other licenses
+require.
+.PP
+Neither the files inside version control system directories (like
+".bzr/" or "CVS/"), nor those inside "debian/" are considered.
+
+.SH SEE ALSO
+.BR find (1)
+
+.SH AUTHORS
+\fBsuspicious\-source\fP and this manpage have been written by
+Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>, based upon a
+script with the same name from Martin Pitt <martin.pitt@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 3 or later.

=== added file 'doc/syncpackage.1.donotinstall'
--- doc/syncpackage.1.donotinstall	1970-01-01 00:00:00 +0000
+++ doc/syncpackage.1.donotinstall	2010-06-17 18:54:27 +0000
@@ -0,0 +1,24 @@
+.TH SYNCPACKAGE "1" "15 April 2008" "ubuntu-dev-tools"
+.SH NAME
+syncpackage \- helper to prepare .changes file to upload synced packages
+.SH SYNOPSIS
+.B syncpacage\fR \fB<.dsc file>\fR \fB<target release>\fR
+.SH DESCRIPTION
+\fBsyncpackage\fR generates a changes file to be directly uploaded to Ubuntu
+primary archive or PPA starting from a pristine Debian package.
+.PP
+\fBsyncpackage\fR allows you to upload files with the same checksums of the
+Debian ones, as the common script used by Ubuntu archive administrators does,
+this way you can preserve source files integrity between the two distributions.
+.SH OPTIONS
+.B <.dsc file>
+This is the .dsc file to generate .changes file against.
+.TP
+.B <target release>
+This is the release that you would like the source package to be synced into.
+This should always be the latest development release of Ubuntu.
+.SH AUTHOR
+.B requestsync
+This manual page were written by Luca Falavigna <dktrkranz@xxxxxxxxxx>
+.PP
+It is released under GNU General Public License, version 3.

=== added file 'doc/ubuntu-build.1'
--- doc/ubuntu-build.1	1970-01-01 00:00:00 +0000
+++ doc/ubuntu-build.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,51 @@
+.TH UBUNTU-BUILD "1" "14 August 2008" "ubuntu-dev-tools"
+.SH NAME
+ubuntu-build \- command-line interface to Launchpad build operations
+
+.SH SYNOPSIS
+.B ubuntu-build <srcpackage> <release> <operation>
+.br
+.B ubuntu-build \-\-help
+
+.SH DESCRIPTION
+\fBubuntu-build\fR provides a command line interface to the Launchpad build
+operations.
+
+.PP
+\fBubuntu-build\fR uses a cookie file stored at \fI~/.lpcookie.txt\fR to authenticate
+to Launchpad.
+This cookie is created on run from the Mozilla Firefox cookie
+file at \fI~/.mozilla/*/*/cookies.sqlite\fR.
+
+.SH OPERATIONS
+Listed below are the available operations for \fBubuntu-build\fR:
+.TP
+.B status
+Outputs the build status of the package on Launchpad on all architectures.
+.TP
+.B retry
+Requests that the package has another attempt at rebuilding from source.
+This will only work if the package has \fIFailed to build\fR on Launchpad.
+.TP
+.B rescore
+Requests that the package's build priority be raised in the build queue.
+Only members of the Launchpad build administrators may issue this operation,
+and it may only be performed on packages which \fINeed building\fR.
+
+.SH OPTIONS
+Listed below are the command line options for \fBubuntu-build\fR:
+.TP
+.B \-h or \-\-help
+Display a help message and exit.
+.TP
+.B \-a or \-\-architecture
+Only available for \fIrescore\fR and \fIretry\fR operations only.
+This will only request the rebuilding/rescoring on the specified
+architecture.
+
+.SH AUTHORS
+\fBubuntu-build\fR was written by Martin Pitt <martin.pitt@xxxxxxxxxxxxx>, and
+this manual page was written by Jonathan Patrick Davies <jpds@xxxxxxxxxx>.
+.PP
+Both are released under the terms of the GNU General Public License, version 3
+or (at your option) any later version.

=== added file 'doc/update-maintainer.1'
--- doc/update-maintainer.1	1970-01-01 00:00:00 +0000
+++ doc/update-maintainer.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,30 @@
+.TH UPDATE\-MAINTAINER "1" "August 04, 2008" "ubuntu-dev-tools"
+
+.SH NAME
+update\-maintainer \- change the Maintainer field in a Debian source package
+
+.SH SYNOPSIS
+.B update\-maintainer [\fB\-\-path=<PATH>\fP] [\fB\-\-section=<SECTION>\fP]
+
+.SH DESCRIPTION
+\fBupdate\-maintainer\fP updates the Maintainer field in the source of
+an Ubuntu package to match the DebianMaintainerField specification.
+
+.SH OPTIONS
+.TP
+\fB\-\-path=<PATH>\fP
+This option allows you to specify the path to the source directory.
+.TP
+\fB\-\-section=<SECTION>\fP
+Manually specify the section of the package. This is necessary if the
+package is not yet in the archive or if you don't have an Internet
+connection available when you run \fBupdate\-maintainer\fP.
+
+.SH SEE ALSO
+See https://wiki.ubuntu.com/DebianMaintainerField for more information.
+
+.SH AUTHOR
+\fBupdate-maintainer\fP has been written by Albin Tonnerre <lut1n.tne@xxxxxxxxx>
+and this manual page by Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 2.

=== added file 'doc/what-patch.1'
--- doc/what-patch.1	1970-01-01 00:00:00 +0000
+++ doc/what-patch.1	2010-06-17 18:54:27 +0000
@@ -0,0 +1,40 @@
+.TH WHAT\-PATCH "1" "10 August 2008" "ubuntu-dev-tools"
+.SH NAME
+what\-patch \- detects which patch system a Debian package uses
+
+.SH SYNOPSIS
+.B what\-patch [options]
+
+.SH DESCRIPTION
+\fBwhat\-patch\fR examines the debian/rules file to determine which patch
+system the Debian package is using.
+.PP
+\fBwhat\-patch\fR should be run from the root directory of the Debian source
+package.
+
+.SH OPTIONS
+Listed below are the command line options for what\-patch:
+.TP
+.B \-h or \-\-help
+Display a help message and exit.
+.TP
+.B \-v
+Enable verbose mode.
+This will include the listing of any files modified outside or the debian/
+directory and report any additional details about the patch system if
+available.
+
+.SH AUTHORS
+\fBwhat\-patch\fR was written by Kees Cook <kees@xxxxxxxxxx>,
+Siegfried-A. Gevatter <rainct@xxxxxxxxxx>, and Daniel Hahler
+<ubuntu@xxxxxxxxxx>, among others.
+This manual page was written by Jonathan Patrick Davies <jpds@xxxxxxxxxx>.
+.PP
+Both are released under the GNU General Public License, version 2.
+
+.SH SEE ALSO 
+The Ubuntu MOTU team has some documentation about patch systems at the Ubuntu
+wiki: \fBhttps://wiki.ubuntu.com/PackagingGuide/PatchSystems\fR
+
+.PP
+.B cdbs\-edit\-patch(1), dbs\-edit\-patch(1), dpatch\-edit\-patch(1)

=== added file 'edit-patch'
--- edit-patch	1970-01-01 00:00:00 +0000
+++ edit-patch	2010-06-17 18:54:27 +0000
@@ -0,0 +1,199 @@
+#!/bin/sh
+#
+# Copyright (C) 2009 Canonical
+#
+# Authors:
+#  Daniel Holbach
+#   Michael Vogt
+#
+# 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; version 3.
+#
+# 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
+
+set -e
+
+
+PATCHSYSTEM="unknown"
+PATCHNAME="no-patch-name"
+
+PATCH_DESC=$(cat<<EOF
+## Description: add some description\
+\n## Origin/Author: add some origin or author\
+\n## Bug: bug URL
+EOF
+)
+
+fatal_error() {
+    echo "$@" >&2
+    exit 1
+}
+
+# check if the given binary is installed and give a error if not
+# arg1: binary
+# arg2: error message
+require_installed() {
+    if ! which "$1" >/dev/null; then
+	fatal_error "$2"
+    fi 
+}    
+
+ensure_debian_dir() {
+    if [ ! -e debian/control ] || [ ! -e debian/rules ]; then
+	fatal_error "Can not find debian/rules or debian/control. Not in a debian dir?"
+    fi
+
+}
+
+detect_patchsystem() {
+    CDBS_PATCHSYS="^[^#]*simple-patchsys.mk"
+
+    if grep -q "$CDBS_PATCHSYS" debian/rules; then
+	PATCHSYSTEM="cdbs"
+	require_installed cdbs-edit-patch "no cdbs-edit-patch found, is 'cdbs' installed?"
+    elif [ -e debian/patches/00list ]; then
+	PATCHSYSTEM="dpatch"
+	require_installed dpatch-edit-patch "no dpatch-edit-patch found, is 'dpatch' installed?"
+    elif [ -e debian/patches/series ]; then
+	PATCHSYSTEM="quilt"
+	require_installed quilt "no quilt found, is 'quilt' installed?"
+    else
+	fatal_error "Patch system can not be detected (no quilt, cdbs or dpatch?)"
+    fi
+}
+
+# ensure (for new patches) that:
+# - dpatch ends with .dpatch
+# - cdbs/quilt with .patch
+normalize_patch_extension() {
+    # check if we have a patch already
+    if [ -e debian/patches/$PATCHNAME ]; then
+	echo "Patch $PATCHNAME exists, not normalizing"
+	return
+    fi
+
+    # normalize name for new patches
+    PATCHNAME=${PATCHNAME%.*}
+    if [ "$PATCHSYSTEM" = "quilt" ]; then
+	PATCHNAME="${PATCHNAME}.patch"
+    elif [ "$PATCHSYSTEM" = "cdbs" ]; then
+	PATCHNAME="${PATCHNAME}.patch"
+    elif [ "$PATCHSYSTEM" = "dpatch" ]; then
+	PATCHNAME="${PATCHNAME}.dpatch"
+    fi
+
+    echo "Normalizing patch name to $PATCHNAME"
+}
+
+edit_patch_cdbs() {
+    cdbs-edit-patch $PATCHNAME
+    vcs_add debian/patches/$1
+}
+
+edit_patch_dpatch() {
+    dpatch-edit-patch $PATCHNAME
+    # add if needed
+    if ! grep -q $1 debian/patches/00list; then
+	echo "$1" >> debian/patches/00list
+    fi
+    vcs_add debian/patches/00list debian/patches/$1
+}
+
+edit_patch_quilt() {
+    export QUILT_PATCHES=debian/patches
+    if [ -e debian/patches/$1 ]; then
+	# if its a existing patch and we are at the end of the stack,
+	# go back at the beginning
+	if ! quilt unapplied; then
+	    quilt pop -a
+	fi
+	quilt push $1
+    else
+	# if its a new patch make sure we are at the end of the stack
+	if quilt unapplied >/dev/null; then
+		quilt push -a
+	fi
+	quilt new $1
+    fi
+    # use a sub-shell
+    quilt shell
+    quilt refresh
+    quilt pop -a
+    vcs_add debian/patches/$1 debian/patches/series
+}
+
+vcs_add() {
+    if [ -d .bzr ]; then
+	bzr add $@
+    elif [ -d .git ];then
+	git add $@
+    else
+	echo "Remember to add $@ to a VCS if you use one"
+    fi
+}
+
+vcs_commit() {
+    # check if debcommit is happy
+    if ! debcommit --noact 2>/dev/null; then
+	return
+    fi
+    # commit (if the user confirms)
+    debcommit --confirm
+}
+
+add_changelog() {
+    S="debian/patches/$1: [DESCRIBE CHANGES HERE]"
+    if head -n1 debian/changelog|grep UNRELEASED; then
+	dch --append "$S"
+    else
+	dch --increment "$S"
+    fi
+    # let the user edit it
+    dch --edit
+}
+
+add_patch_tagging() {
+    # check if we have a descripton already
+    if grep "## Description:" debian/patches/$1; then
+	return
+    fi
+    # if not, add one
+    RANGE=1,1
+    # make sure we keep the first line (for dpatch)
+    if head -n1 debian/patches/$1|grep -q '^#'; then
+	RANGE=2,2
+    fi
+    sed -i ${RANGE}i"$PATCH_DESC" debian/patches/$1
+}
+
+
+# TODO:
+# - edit-patch --remove implementieren
+# - dbs patch system
+# - handle no patch system
+
+main() {
+    # parse args
+    if [ $# -ne 1 ]; then
+	fatal_error "Need exactly one patch name"
+    fi
+    PATCHNAME="$1"
+    # do the work
+    ensure_debian_dir
+    detect_patchsystem
+    normalize_patch_extension
+    edit_patch_$PATCHSYSTEM $PATCHNAME
+    add_patch_tagging $PATCHNAME
+    add_changelog $PATCHNAME
+    vcs_commit
+}
+
+main $@

=== renamed file 'edit-patch' => 'edit-patch.moved'
=== added directory 'examples'
=== renamed directory 'examples' => 'examples.moved'
=== added file 'examples/massfile.instructions'
--- examples/massfile.instructions	1970-01-01 00:00:00 +0000
+++ examples/massfile.instructions	2010-06-17 18:54:27 +0000
@@ -0,0 +1,16 @@
+subject: [UNMETDEPS] $pack has unmet dependencies
+assignee: 
+status: confirmed
+subscribers: motu
+tags: unmetdeps
+buglist-url: http://bugs.launchpad.net/ubuntu/+bugs?field.tag=unmetdeps
+text:
+ A run of 
+ .
+  LC_ALL=C apt-cache -i unmet | grep ^Package | cut -d' ' -f2 | grep
+  -v dbgsym | sort -u | xargs apt-cache showsrc | grep ^Directory |
+  sed 's/Package\:\ //g' | grep verse | cut -d'/' -f4
+ indicates that the source package $pack has binary packages that are not 
+ installable (on AMD64) at the moment.
+ .
+ Please have a look and make sure it's installable again.

=== added file 'examples/massfile.list'
--- examples/massfile.list	1970-01-01 00:00:00 +0000
+++ examples/massfile.list	2010-06-17 18:54:27 +0000
@@ -0,0 +1,2 @@
+z88dk
+zope-quotafolder

=== added file 'get-branches'
--- get-branches	1970-01-01 00:00:00 +0000
+++ get-branches	2010-06-17 18:54:27 +0000
@@ -0,0 +1,115 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2007 Canonical Ltd.
+# Created by Daniel Holbach <daniel.holbach@xxxxxxxxxx>
+# Modified by Jonathan Patrick Davies <jpds@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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; version 3.
+# 
+# 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.
+#
+# See file /usr/share/common-licenses/GPL-3 for more details.
+#
+# ##################################################################
+#
+# This script is used to checkout or branch all the Bazaar branches
+# of a Launchpad team.
+#
+
+import os
+import subprocess
+import sys
+from optparse import OptionParser
+from ubuntutools.lp.lpapicache import PersonTeam
+
+def main():
+    usage = "Usage: %prog [-d <directory>] -t <team> [-o <operation>]"
+    usage += "\nUsage: %prog <team>"
+    optParser = OptionParser(usage)
+
+    # Our options.
+    optParser.add_option("-d", "--directory", action = "store", type = "string",
+        dest = "directory", default = os.getcwd(),
+        help = "Directory to download branches to.")
+    optParser.add_option("-t", "--team", action = "store", type = "string",
+        dest = "lpteam", help = "Launchpad team to download branches from.")
+    optParser.add_option("-o", "--operation", action = "store", type = "string",
+        dest = "operation", default = "branch",
+        help = "Whether to branch or checkout the Bazaar branches. May be " \
+            "either 'branch' or 'checkout'.")
+
+    (options, args) = optParser.parse_args()
+
+    # Fetch our current directory to return to later.
+    pwd = os.getcwd()
+
+    # Parse our options.
+    if len(args) != 1 and options.lpteam == None:
+        optParser.error("No team has been specified.")
+
+    # Dictionary settings.
+    directory = options.directory
+    if not os.path.isdir(directory): # Check that it is a directory.
+        optParser.error("%s is not a valid directory." % directory)
+    os.chdir(directory)
+
+    # Type of Bazaar operation to perform.
+    operation_type = options.operation.lower()
+    if operation_type not in ("branch", "checkout"):
+        optParser.error("Invalid operation '%s' for '-o' flag." % \
+            operation_type)
+
+    # Launchpad team setting.
+    if options.lpteam:
+        team = options.lpteam.lower()
+    if args:
+        team = args[0].lower()
+    try:
+        team = PersonTeam(team)
+    except KeyError:
+        print >> sys.stderr, "E: The team '%s' doesn't exist." % team
+
+    # Get a list of branches
+    branches = team.getBranches()
+
+    print "Downloading all branches for the '%s' team. This may take some " \
+        "time." % team.display_name
+
+    try:
+        os.makedirs(team.name)
+    except:
+        pass
+
+    os.chdir(team.name)
+
+    for branch in branches:
+        project_name = branch.project.name
+        if not os.path.exists(project_name):
+            os.makedirs(project_name)
+        os.chdir(project_name)
+
+        if not os.path.exists(branch.name):
+            print "Branching %s ..." % branch.display_name
+            subprocess.call(["bzr", operation_type, branch.bzr_identity, branch.name])
+        else:
+            print "Merging %s ..." % branch.display_name
+            os.chdir(branch.name)
+            subprocess.call(["bzr", "merge", "--pull", "--remember"])
+        os.chdir(os.path.join(directory, team.name))
+
+    os.chdir(pwd)
+    sys.exit(0)
+
+if __name__ == "__main__":
+    try:
+        main()
+    except KeyboardInterrupt:
+        print "Operation was interrupted by user."

=== renamed file 'get-branches' => 'get-branches.moved'
=== added file 'get-build-deps'
--- get-build-deps	1970-01-01 00:00:00 +0000
+++ get-build-deps	2010-06-17 18:54:27 +0000
@@ -0,0 +1,95 @@
+#!/bin/bash
+#
+# Copyright 2007 (C) Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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.
+#
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# If you don't pass it any argument, this script will check if
+# there's a control (debian/control) file somewhere in the current
+# directory, and if it's so, it'll install the build dependencies
+# listed there.
+#
+# If it gets a single argument, and it's the name of a file, it will
+# read it, supposing that each line contains the name of a package,
+# and install the build dependencies for all those.
+#
+# Otherwise, if there is more than one argument, or the given argument
+# isn't the name of an existing file, it will suppose that the each
+# argument is the name of a package, and install the dependencies for
+# all of them.
+
+if [ $# -eq 0 ]
+then
+	#########################################################
+	# Install the dependencies for the source package the
+	# user is working on.
+	
+	if [ -f ../debian/control ]; then
+		cd ..
+	elif [ ! -f ./debian/control ]; then
+		echo "\
+Couldn't find file debian/control. You have to be inside the \
+source directory of a Debian package or pass the name of the \
+package(s) whose build dependencies you want to install in order \
+to use this script."
+		exit 1
+	fi
+	
+	filepath="`pwd`/debian/control"
+	missing_dependencies=$(dpkg-checkbuilddeps 2>&1)
+	
+	if [ -z "$missing_dependencies" ]; then
+		echo "The build dependencies described in «$filepath» are already satisfied."
+		exit 0
+	fi
+	
+	echo "Installing the build dependencies described in «$filepath»..."
+	
+	if [ -x /usr/lib/pbuilder/pbuilder-satisfydepends ]
+	then
+		sudo /usr/lib/pbuilder/pbuilder-satisfydepends
+	else
+		echo "Warning: «pbuilder» isn\'t installed, falling back to «dpkg-checkbuilddeps»."
+		sudo aptitude install $(echo $missing_dependencies | awk -F: '{ print $3 }' | sed 's/([^)]*)//g' | sed 's/|\s[^\s]*//g')
+		#' <--- Fix to avoid Geanys markup breaking
+	fi
+	exit 0
+elif [ $# -eq 1 ]
+then
+	#########################################################
+	# Check if the given argument is a file name, else
+	# continue after the if.
+	if [ -f $1 ]
+	then
+		packages=''
+		echo "Installing the build dependencies for the following packages:"
+		while read line
+		do
+			echo $line
+			packages="$packages $line"
+		done < $1
+		echo
+		sudo apt-get build-dep $packages
+		exit 0
+	fi
+fi
+
+#########################################################
+# All arguments should be package names, install
+# their build dependencies.
+
+sudo apt-get build-dep $*

=== renamed file 'get-build-deps' => 'get-build-deps.moved'
=== added file 'grab-attachments'
--- grab-attachments	1970-01-01 00:00:00 +0000
+++ grab-attachments	2010-06-17 18:54:27 +0000
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+#
+# Copyright (C) 2007, Canonical Ltd.
+# Written by Daniel Holbach
+#
+# ##################################################################
+#
+# 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; version 3.
+# 
+# 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.
+#
+# See file /usr/share/common-licenses/GPL-3 for more details.
+#
+# ##################################################################
+
+import os
+import sys
+from ubuntutools.lp.libsupport import get_launchpad
+
+USAGE = "grab-attachments <bug numbers>"
+
+def main():
+    if len(sys.argv) == 1:
+        print >> sys.stderr, USAGE
+        sys.exit(1)
+
+    if sys.argv[1] in ["--help", "-h"]:
+        print USAGE
+        sys.exit(0)
+
+    try:
+        launchpad = get_launchpad("ubuntu-dev-tools")
+
+        for arg in sys.argv[1:]:
+            try:
+                number = int(arg)
+            except:
+                print >> sys.stderr, "'%s' is not a valid bug number." % arg
+                sys.exit(1)
+    
+            b = launchpad.bugs[number]
+      
+            for a in b.attachments:
+                f = a.data.open()
+                filename = os.path.join(os.getcwd(), f.filename)
+                local_file = open(filename, "w")
+                local_file.write(f.read())
+                f.close()
+                local_file.close()
+
+    # no LP credentials
+    except IOError, e:
+        print e
+        sys.exit(1)
+
+if __name__ == '__main__':
+    main()
+

=== renamed file 'grab-attachments' => 'grab-attachments.moved'
=== added file 'grab-merge'
--- grab-merge	1970-01-01 00:00:00 +0000
+++ grab-merge	2010-06-17 18:54:27 +0000
@@ -0,0 +1,119 @@
+#!/bin/sh
+# grab-merge - grab a merge
+#
+# Copyright © 2008 Canonical Ltd.
+# Author: Scott James Remnant <scott@xxxxxxxxxx>.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of version 3 of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+# Uncomment if you have an account on casey
+#RSYNC=y
+
+# Uncomment if you know that this deletes all the files in the CWD
+#EXPERT=y
+
+# Or uncomment if you want to use named subdirectories
+SUBDIR=y
+
+set -e
+
+MERGE=$1
+
+if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
+    echo "Usage: $0 <package name>"
+    echo ""
+    echo "grab-merge downloads a merge's packaging files and report from"
+    echo "merges.ubuntu.com, placing them into a new subdirectory for working"
+    echo "from."
+
+    exit 0
+fi
+
+if [ "$SUBDIR" = "y" ]; then
+    [ -d "$MERGE" ] || { mkdir $MERGE; CREATED_DIR=1; }
+    cd $MERGE
+fi
+
+if [ "$EXPERT" != "y" ] && [ -n "$(ls)" ]; then
+    echo -n "Are you sure you want to delete all the files in $(pwd) [yN]? "
+    read ANSWER
+    [ "$ANSWER" = "y" ] || exit 1
+fi
+
+if [ "${MERGE#lib}" != "${MERGE}" ]; then
+    HASH=${MERGE%${MERGE#????}}
+else
+    HASH=${MERGE%${MERGE#?}}
+fi
+
+if [ "$RSYNC" = "y" ]; then
+    URL="merges.ubuntu.com:/srv/patches.ubuntu.com/merges/$HASH/$MERGE/"
+    rsync --verbose --archive --progress --compress --delete \
+	"$URL" . || { echo "Error while rsyncing $URL"; exit 1; }
+else
+    rm -rf  --one-file-system *
+    wget -q https://merges.ubuntu.com/$HASH/$MERGE/REPORT || {
+            echo "Package not found on merges.ubuntu.com."
+            [ "$CREATED_DIR" != "1" ] || { cd ..; rmdir $MERGE; }
+            exit 1
+        }
+
+    for NAME in $(sed -n -e "/^    /p" REPORT); do
+        if [ ! -f "$NAME" ]; then
+            echo "Getting $NAME..."
+            URL="https://merges.ubuntu.com/$HASH/$MERGE/$NAME";
+            wget -q "$URL" || { echo "Error downloading $URL"; exit 1; }
+        fi
+    done
+fi
+echo
+
+if grep "^generated: " REPORT >/dev/null; then
+    VERSION=$(sed -n -e "/^generated:/s/^generated: *//p" REPORT)
+    dpkg-source -x ${MERGE}_${VERSION#*:}.dsc
+    echo
+else
+    TARBALL=$(sed -n -e "/\.src\.tar\.gz$/p" REPORT)
+
+    echo unpacking $TARBALL
+    tar xf $TARBALL
+    echo
+fi
+
+if grep "^  C" REPORT; then
+    echo
+fi
+
+echo "#!/bin/sh" > merge-genchanges
+echo "exec $(sed -n -e '/^  $ /s/^  $ //p' REPORT) \"\$@\"" \
+    >> merge-genchanges
+chmod +x merge-genchanges
+
+echo "#!/bin/sh" > merge-buildpackage
+echo "exec $(sed -n -e '/^  $ /s/^  $ dpkg-genchanges/dpkg-buildpackage/p' REPORT) \"\$@\"" \
+    >> merge-buildpackage
+chmod +x merge-buildpackage
+
+echo "Run ../merge-genchanges or ../merge-buildpackage when done"
+
+if grep "^Vcs-" *.dsc >/dev/null; then
+    echo
+    echo "*** WARNING ***"
+    echo
+    echo "It looks like this package is maintained in revision control:"
+    echo
+    grep "^Vcs-" *.dsc
+    echo
+    echo "You almost certainly don't want to continue without investigating."
+    exit 1
+fi

=== renamed file 'grab-merge' => 'grab-merge.moved'
=== added file 'hugdaylist'
--- hugdaylist	1970-01-01 00:00:00 +0000
+++ hugdaylist	2010-06-17 18:54:27 +0000
@@ -0,0 +1,137 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2007 Canonical Ltd., Daniel Holbach
+# Copyright (C) 2008 Jonathan Patrick Davies <jpds@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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; version 3.
+# 
+# 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.
+#
+# See file /usr/share/common-licenses/GPL-3 for more details.
+#
+# ##################################################################
+#
+#
+# hugdaylist - produces MoinMoin wiki formatted tables based on a Launchpad bug
+#              list.
+#
+# hugdaylist <url>
+# - produces lists like https://wiki.ubuntu.com/UbuntuBugDay/20070912?action=raw
+#
+# hugdaylist -n <howmany> <url>
+# - will only list <howmany> URLs.
+
+import os
+import re
+import string
+import sys
+from optparse import OptionParser
+
+from ubuntutools.lp.libsupport import get_launchpad, translate_web_api, translate_api_web
+
+def check_args():
+    howmany = -1
+    url = ""
+
+    # Our usage options.
+    usage = "usage: %prog [-n <number>] launchpad-buglist-url"
+    optParser = OptionParser(usage)
+    argsParsed = 0
+
+    # Options - namely just the number of bugs to output.
+    optParser.add_option("-n", "--number", type = "int",
+            dest = "number", help = "Number of entries to output.")
+
+    # Parse arguments.
+    (options, args) = optParser.parse_args()
+    
+    # Check if we want a number other than the default.
+    howmany = options.number
+
+    # Check that we have an URL.
+    if not args:
+        print >> sys.stderr, "An URL pointing to a Launchpad bug list is " \
+           "required."
+        optParser.print_help()
+        sys.exit(1)
+    else:
+        url = args[argsParsed]
+
+    return (howmany, url)
+
+def filter_unsolved(task):
+    # TODO: don't use this filter here, only check status and assignee of 
+    #   the given task
+    # Filter out special types of bugs:
+    # - https://wiki.ubuntu.com/Bugs/HowToTriage#Special%20types%20of%20bugs
+    subscriptions = set(s.person.name for s in task.bug.subscriptions) #this is expensive, parse name out of self_link instead?
+    if (task.status != "Fix Committed" and
+        (not task.assignee or task.assignee.name in ['motu','desktop-bugs']) and
+         'ubuntu-sponsors' not in subscriptions and
+         'ubuntu-archive' not in subscriptions):
+        return True
+    return False
+
+def main(): 
+    (howmany, url) = check_args()
+    if len(url.split("?", 1)) == 2:
+        # search options not supported, because there is no mapping web ui options <-> API options
+        print >> sys.stderr, "Options in url are not supported, url: %s" %url
+        sys.exit(1)
+    
+    launchpad = None
+    try:
+        launchpad = get_launchpad("ubuntu-dev-tools")
+    except IOError, e:
+        print e
+        sys.exit(1)
+	
+    api_url = translate_web_api(url, launchpad)
+    try:
+        product = launchpad.load(api_url)
+    except Exception, e:
+        x = getattr(e, "response", {})
+        if response.get("status", None) == "404":
+            print >> sys.stderr, "The URL at '%s' does not appear to be a valid url to a product" %url
+            sys.exit(1)
+        else:
+            raise
+    
+    bl = product.searchTasks()
+
+    l = filter(filter_unsolved, bl)
+    
+    if not l:
+        print "Bug list of %s is empty." % url
+        sys.exit(0)
+    if howmany == -1:
+        howmany = len(l)
+
+    print """
+## ||<rowbgcolor="#CCFFCC"> This task is done || somebody || ||
+## ||<rowbgcolor="#FFFFCC"> This task is assigned || somebody || <status> ||
+## ||<rowbgcolor="#FFEBBB"> This task isn't || ... || ||
+## ||<rowbgcolor="#FFCCCC"> This task is blocked on something || somebody || <explanation> ||
+        
+|| Bug || Subject || Triager ||"""
+
+    for i in list(l)[:howmany]:
+        bug = i.bug
+        print '||<rowbgcolor="#FFEBBB"> [%s %s] || %s || ||' % \
+            (translate_api_web(bug.self_link), bug.id, bug.title)
+
+
+if __name__ == '__main__':
+    try:
+        main()
+    except KeyboardInterrupt:
+        print >> sys.stderr, "Aborted."
+        sys.exit(1)

=== renamed file 'hugdaylist' => 'hugdaylist.moved'
=== added file 'lp-project-upload'
--- lp-project-upload	1970-01-01 00:00:00 +0000
+++ lp-project-upload	2010-06-17 18:54:27 +0000
@@ -0,0 +1,118 @@
+#!/usr/bin/python
+
+# Copyright (c) 2009 Canonical Ltd.
+#
+# 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 2, or (at your option) any
+# later version.
+#
+# lp-set-dup 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.
+
+# Authors:
+#  Martin Pitt <martin.pitt@xxxxxxxxxx>, based on
+#  http://blog.launchpad.net/api/recipe-for-uploading-files-via-the-api
+
+'''Upload a release tarball to a Launchpad project.'''
+
+import sys, datetime, os.path, subprocess, tempfile, os
+
+from ubuntutools.lp.libsupport import get_launchpad
+from launchpadlib.errors import HTTPError
+
+def create_release(project, version):
+    '''Create new release and milestone for LP project.'''
+
+    print 'Release %s could not be found for project. Create it? (Y/n)' % version
+    answer = sys.stdin.readline().strip()
+    if answer.startswith('n'):
+        sys.exit(0)
+    if len(proj.series) != 1:
+        print >> sys.stderr, 'Does not support creating releases if more than one series exists.'
+        sys.exit(3)
+    release_date = datetime.date.today().strftime('%Y-%m-%d')
+    series = proj.series[0]
+    milestone = series.newMilestone(name=version,
+            date_targeted=release_date)
+    return milestone.createProductRelease(date_released=release_date)
+
+def edit_file(prefix, description):
+    (fd, f) = tempfile.mkstemp(prefix=prefix+'.')
+    os.write(fd, '\n\n#------\n# Please enter the %s here. Lines which start with "#" are ignored.\n' % 
+            description)
+    os.close(fd)
+    subprocess.call(['sensible-editor', f])
+    content = ''
+    for l in open(f):
+        if l.startswith('#'):
+            continue
+        content += l
+
+    return content.strip()
+
+#
+# main
+#
+
+if len(sys.argv) != 4:
+    print >> sys.stderr, '''Upload a release tarball to a Launchpad project.
+
+Usage: %s <project name> <version> <tarball>''' % sys.argv[0]
+    sys.exit(1)
+
+(project, version, tarball) = sys.argv[1:]
+
+try:
+    lp = get_launchpad('ubuntu-dev-tools')
+except Exception, e:
+    print >> sys.stderr, 'Could not connect to Launchpad:', str(e)
+    sys.exit(2)
+
+try:
+    # Look up the project using the Launchpad instance.
+    proj = lp.projects[project]
+    # Find the release in the project's releases collection.
+    release = None
+    for rel in proj.releases:
+        if rel.version == version:
+            release = rel
+            break
+    if not release:
+        release = create_release(proj, version)
+
+    # Get the file contents.
+    file_content = open(tarball, 'r').read()
+    # Get the signature, if available.
+    signature = tarball + '.asc'
+    if not os.path.exists(signature):
+        print 'Calling GPG to create tarball signature...'
+        if subprocess.call(['gpg', '--armor', '--sign', '--detach-sig', tarball]) != 0:
+            print >> sys.stderr, 'gpg failed, aborting'
+
+    if os.path.exists(signature):
+        signature_content = open(signature, 'r').read()
+    else:
+        signature_content = None
+
+    # Create a new product release file.
+    release.add_file(filename=tarball, description='release tarball',
+            file_content=file_content, content_type='appplication/x-gzip',
+            file_type='Code Release Tarball', signature_filename=signature,
+            signature_content=signature_content)
+
+    changelog = edit_file('changelog', 'changelog')
+    if changelog:
+        release.changelog = changelog
+    release_notes = edit_file('releasenotes', 'release notes')
+    if release_notes:
+        release.release_notes = release_notes
+
+    release.lp_save()
+
+except HTTPError, e:
+    print 'An error happened in the upload:', e.content
+    sys.exit(1)
+

=== renamed file 'lp-project-upload' => 'lp-project-upload.moved'
=== added file 'lp-set-dup'
--- lp-set-dup	1970-01-01 00:00:00 +0000
+++ lp-set-dup	2010-06-17 18:54:27 +0000
@@ -0,0 +1,115 @@
+#!/usr/bin/python
+# -*- coding: UTF-8 -*-
+"""Sets the "duplicate of" bug of a bug and its dups."""
+
+# Copyright (c) 2009 Canonical Ltd.
+#
+# lp-set-dup 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 2, or (at your option) any
+# later version.
+#
+# lp-set-dup 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 lp-set-dup; see the file COPYING.  If not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# Authors:
+#  Loïc Minier <lool@xxxxxxxx>
+
+import sys
+
+from optparse import OptionParser
+
+import ubuntutools.lp.libsupport as lp_libsupport
+from launchpadlib.errors import HTTPError
+
+def die(message):
+    print >> sys.stderr, "Fatal: " + message
+    sys.exit(1)
+
+if __name__ == '__main__':
+    usage = "Usage: %prog [-f] <new main bug> <bug to dup> [<bug to dup>...]"
+    optParser = OptionParser(usage)
+    optParser.add_option("-f", action = "store_true",
+        dest = "force", default = False,
+        help = "Skip confirmation prompt")
+
+    (options, args) = optParser.parse_args()
+
+    if len(args) < 2:
+        optParser.error("Need at least a new main bug and a bug to dup")
+
+    launchpad = None
+    try:
+        print "Setting up Launchpad"
+        launchpad = lp_libsupport.get_launchpad("ubuntu-dev-tools")
+        print "Launchpad setup complete"
+    except ImportError:
+        suggestion = "check whether python-launchpadlib is installed"
+    except IOError:
+        suggestion = "you might want to \"manage-credentials create --consumer ubuntu-dev-tools --level 2\""
+    if launchpad is None:
+        die("Couldn't setup Launchpad for the ubuntu-dev-tools consumer; %s" % (suggestion, ))
+
+    # check that the new main bug isn't a duplicate
+    try:
+        new_main_bug = launchpad.bugs[args[0]]
+    except HTTPError, error:
+        if error.response.status == 401:
+            print >> sys.stderr, "E: Don't have enough permissions to access bug %s" % (args[0])
+            die(error.content)
+        else:
+            raise
+    new_main_dup_of = new_main_bug.duplicate_of
+    if new_main_dup_of is not None:
+        s = None
+        try:
+            s = raw_input("Bug %s is a duplicate of %s; would you like to use %s as the new main bug instead? [y/N]" % (new_main_bug.id, new_main_dup_of.id, new_main_dup_of.id))
+        except:
+            die("Aborted")
+        if s.lower() not in ("y", "yes"):
+            die("User aborted")
+        new_main_bug = new_main_dup_of
+
+    # build list of bugs to process, first the dups then the bug
+    bugs_to_process = []
+    for b in args[1:]:
+        print "Processing %s" % (b)
+        try:
+            bug = launchpad.bugs[b]
+        except HTTPError, error:
+            if error.response.status == 401:
+                print >> sys.stderr, "W: Don't have enough permissions to access bug %s" % (b)
+                print >> sys.stderr, "W: %s" % (error.content)
+                continue
+            else:
+                raise
+        dups = bug.duplicates
+        if dups is not None:
+            bugs_to_process.extend(dups)
+            print "Found %i dups for %s" % (len(dups), b)
+        bugs_to_process.append(bug)
+
+    # process dups first, then their main bug
+    print "Would set the following bugs as duplicates of %s: %s" % (new_main_bug.id, " ".join([str(b.id) for b in bugs_to_process]))
+
+    if not options.force:
+        s = None
+        try:
+            s = raw_input("Proceed? [y/N]")
+        except:
+            die("Aborted")
+        if s.lower() not in ("y", "yes"):
+            die("User aborted")
+
+    for bug in bugs_to_process:
+        print "Marking bug %s as a duplicate of %s" % (bug.id, new_main_bug.id)
+        bug.duplicate_of = new_main_bug
+        bug.lp_save()
+

=== renamed file 'lp-set-dup' => 'lp-set-dup.moved'
=== added file 'lp-shell'
--- lp-shell	1970-01-01 00:00:00 +0000
+++ lp-shell	2010-06-17 18:54:27 +0000
@@ -0,0 +1,81 @@
+#!/usr/bin/python
+
+# Open an interactive launchpadlib Python shell.
+# It supports all known LP service instances and API versions. The login
+# can optionally happen anonymously.
+
+# Author: Martin Pitt <martin.pitt@xxxxxxxxxx>
+# Copyright: (C) 2010 Canonical Ltd.
+#
+# This package 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, at version 2.
+# 
+# This package 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.
+
+import sys
+import code
+from optparse import OptionParser
+
+from launchpadlib.launchpad import Launchpad
+from launchpadlib.uris import lookup_service_root
+
+instance = 'edge'
+valid_api_versions = ('beta', '1.0', 'devel')
+api_version = '1.0'
+
+usage = 'Usage: %prog [-a] [instance] [LP API version]'
+optParser = OptionParser(usage)
+optParser.add_option('-a', action='store_true',
+        dest='anonymous', default=False,
+        help='Login anonymously into LP.')
+
+(options, args) = optParser.parse_args()
+
+if len(args) >= 1:
+    try:
+        instance = lookup_service_root(args[0])
+    except ValueError, err:
+        print 'E: %s' % (err)
+        print 'I: Falling back to "edge".'
+
+if len(args) >= 2:
+    if args[1] in valid_api_versions:
+        api_version = args[1]
+    else:
+        print 'E: "%s" is not a valid LP API version.' % (args[1])
+        print 'I: Falling back to "1.0".'
+
+if options.anonymous:
+    lp = Launchpad.login_anonymously('udt-lp-shell', instance, version=api_version)
+    banner = 'Connected anonymously to LP service "%s" with API version "%s":' % (
+            instance, api_version)
+else:
+    lp = Launchpad.login_with('udt-lp-shell', instance, version=api_version)
+    banner = 'Connected to LP service "%s" with API version "%s":' % (
+            instance, api_version)
+
+banner += '\nNote: LP can be accessed through the "lp" object.'
+
+class CompleterConsole(code.InteractiveConsole):
+    def __init__(self):
+        local = {'lp': lp}
+        code.InteractiveConsole.__init__(self,
+                locals=local)
+        try:
+            import readline
+        except ImportError:
+            print 'I: readline module not available.'
+        else:
+            import rlcompleter
+            readline.parse_and_bind("tab: complete")
+
+# Disable default apport hook, as lp-shell is intended for interactive use
+# and thus exceptions often bubble up to the top level.
+sys.excepthook = sys.__excepthook__
+
+console = CompleterConsole()
+console.interact(banner)

=== renamed file 'lp-shell' => 'lp-shell.moved'
=== added file 'manage-credentials'
--- manage-credentials	1970-01-01 00:00:00 +0000
+++ manage-credentials	2010-06-17 18:54:27 +0000
@@ -0,0 +1,136 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2009 Markus Korn <thekorn@xxxxxx>
+#
+# ##################################################################
+#
+# 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.
+#
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+
+import os
+import sys
+from optparse import OptionParser, make_option
+from launchpadlib.uris import lookup_service_root
+from ubuntutools.lp.libsupport import *
+
+class CmdOptions(OptionParser):
+    
+    USAGE = (
+        "\t%prog create -c <consumer> [--email <email> --password <password>] [--service <staging|edge>]"
+    )
+    
+    OPTIONS = (
+        make_option("-c", "--consumer", action="store", type="string",
+            dest="consumer", default=None),
+        make_option("-e", "--email", action="store", type="string",
+            dest="email", default=None),
+        make_option("-p", "--password", action="store", type="string",
+            dest="password", default=None),
+        make_option("-s", "--service", action="store", type="string",
+            dest="service", default="edge"),
+        make_option("--cache", action="store", type="string",
+            dest="cache", default=None),
+        make_option("-o", action="store", type="string",
+            dest="output", default=None),
+        make_option("-l", "--level", action="store", type="int",
+            dest="level", default=0,
+            help="integer representing the access-level (default: 0), mapping: %s" %LEVEL),
+    )
+            
+    TOOLS = {
+        "create": ( ("consumer",),
+                    ("email", "password", "service", "cache", "output",
+                     "level")),
+        "list": (tuple(), ("service", )),
+    }
+    
+    def __init__(self):
+        OptionParser.__init__(self, option_list=self.OPTIONS)
+        self.set_usage(self.USAGE)
+        
+    def parse_args(self, args=None, values=None):
+        options, args = OptionParser.parse_args(self, args, values)
+        given_options = set(i for i, k in self.defaults.iteritems() if not getattr(options, i) == k)
+        
+        if not args:
+            self.error("Please define a sub-tool you would like to use")
+        if not len(args) == 1:
+            self.error("Only one sub-tool allowed")
+        else:
+            tool = args.pop()
+            if not tool in self.TOOLS:
+                self.error("Unknown tool '%s'" %tool)
+        needed_options = set(self.TOOLS[tool][0]) - given_options
+        if needed_options:
+            self.error("Please define the following options: %s" %", ".join(needed_options))
+        optional_options = given_options - set(sum(self.TOOLS[tool], ()))
+        if optional_options:
+            self.error("The following options are not allowed for this tool: %s" %", ".join(optional_options))
+        options.service = lookup_service_root(options.service)
+        if options.level in LEVEL:
+            options.level = LEVEL[options.level]
+        elif options.level.upper() in LEVEL.values():
+            options.level = options.level.upper()
+        else:
+            self.error("Unknown access-level '%s', level must be in %s" %(options.level, self.LEVEL))
+        return tool, options
+        
+def create_credentials(options):
+    if options.password and options.email:
+        # use hack
+        credentials = Credentials(options.consumer)
+        credentials = approve_application(credentials, options.email,
+            options.password, options.level,
+            translate_api_web(options.service), None)
+    else:
+        launchpad = Launchpad.get_token_and_login(options.consumer,
+            options.service, options.cache)
+        credentials = launchpad.credentials
+    
+    if options.output:
+        filepath = options.output
+    else:
+        credentialsDir = os.path.expanduser("~/.cache/lp_credentials")
+        if not os.path.isdir(credentialsDir):
+            os.makedirs(credentialsDir)
+        os.chmod(credentialsDir, 0700)
+        filepath = os.path.expanduser("%s/%s-%s.txt" % \
+            (credentialsDir, options.consumer, str(options.level).lower()))
+
+    f = open(filepath, "w")
+    # Make credentials file non-world readable.
+    os.chmod(filepath, 0600)
+    credentials.save(f)
+    f.close()
+
+    print "Credentials successfully written to %s." % filepath
+
+    return
+
+def list_tokens(options):
+    print "Not implemented yet."
+    print "To get a list of your tokens, please visit %speople/+me/+oauth-tokens" %translate_api_web(options.service)
+    return 1
+    
+def main():
+    cmdoptions = CmdOptions()
+    tool, options = cmdoptions.parse_args()
+    if tool == "create":
+        return create_credentials(options)
+    elif tool == "list":
+        return list_tokens(options)
+
+if __name__ == "__main__":
+    sys.exit(main())

=== renamed file 'manage-credentials' => 'manage-credentials.moved'
=== added file 'massfile'
--- massfile	1970-01-01 00:00:00 +0000
+++ massfile	2010-06-17 18:54:27 +0000
@@ -0,0 +1,159 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2007 Canonical Ltd.
+#
+# Modified by Iain Lane <iain@xxxxxxxxxxxxxxxxxxx>, taking some code written by
+# Daniel Hahler <ubuntu@xxxxxxxxxx>
+#
+# python-launchpadlib support was added by Markus Korn <thekorn@xxxxxx>.
+#
+# ##################################################################
+#
+# 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; version 3.
+# 
+# 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.
+#
+# See file /usr/share/common-licenses/GPL-3 for more details.
+#
+# ##################################################################
+
+import os
+import sys
+import email
+import subprocess
+import glob
+
+from ubuntutools.lp.libsupport import get_launchpad, translate_api_web, translate_web_api
+
+def read_config():
+    instructions_file = open("instructions")
+    instructions = email.message_from_file(instructions_file)
+    instructions_file.close()
+    instr = dict()
+    
+    for field in "subject", "assignee", "subscribers", "tags", "text", \
+                 "buglist-url", "status":
+        instr[field] = instructions.get(field)
+    
+    return instr
+
+def read_list():
+    pack_list = set()
+
+    listfile = open("list")
+    for line in listfile.readlines():
+        if line.strip()!="":
+            pack_list.add(line.strip("\n"))
+
+    listfile.close()
+    return pack_list
+
+def check_configfiles():
+    result = True
+
+    bin_path = os.path.dirname(os.path.abspath(__file__))
+    if bin_path == "/usr/bin":
+        example_dir = "/usr/share/doc/ubuntu-dev-tools/examples"
+    else:
+        example_dir = "%s/examples" % bin_path
+
+    if not os.path.exists("instructions"):
+        os.system("cp %s/massfile.instructions instructions" % example_dir)
+        print >> sys.stderr, \
+            "No 'instructions' file found. Copied template from %s." % \
+            example_dir
+        result = False
+
+    if not os.path.exists("list"):
+        os.system("cp %s/massfile.list list" % example_dir)
+        print >> sys.stderr, \
+            "No 'list' file found. Copied template from %s." % example_dir
+        result = False
+
+    return result
+
+
+def file_bug(config):
+    launchpad = get_launchpad("ubuntu-dev-tools")
+
+    try:
+        summary = config["subject"].replace("$pack", config["sourcepackage"])
+        description = config["text"].replace("$pack", config["sourcepackage"])
+        
+
+        product_url = "%subuntu/+source/%s" %(launchpad._root_uri, config["sourcepackage"])
+        tags = filter(None, map(lambda t: t.strip("\n").strip(), config["tags"].split(",")))
+        bug = launchpad.bugs.createBug(description=description, title=summary,
+            target=product_url, tags=tags)
+        
+        print "Successfully filed bug %i: %s" %(bug.id, translate_api_web(bug.self_link))
+        
+        subscribers = filter(None, map(lambda t: t.strip("\n").strip(), config["subscribers"].split(",")))
+        for sub in subscribers:
+            subscribe_url = "%s~%s" %(launchpad._root_uri, sub)
+            bug.subscribe(person=subscribe_url)
+            
+        #newly created bugreports have one task
+        task = bug.bug_tasks[0]
+        
+        if config["status"]:
+            status = config["status"].capitalize()
+        else:
+            status = "Confirmed"
+        task.status = status
+        
+        assignee = config["assignee"]
+        if assignee:
+            assignee_url = "%s~%s" %(launchpad._root_uri, assignee)
+            task.assignee = assignee_url
+        task.lp_save()
+    except:
+        "Bug for '%s' was not filed." % config["sourcepackage"]
+
+def read_buglist(url):
+    if not url:
+        return set()
+        
+    if len(url.split("?", 1)) == 2:
+        # search options not supported, because there is no mapping web ui options <-> API options
+        print >> sys.stderr, "Options in url are not supported, url: %s" %url
+        sys.exit(1)
+        
+    launchpad = get_launchpad("ubuntu-dev-tools")
+    packages = set()
+
+    api_url = translate_web_api(url, launchpad)
+    # workaround LP #303414
+    # if this is fixed it should simply be: buglist = launchpad.load(api_url)
+    api_url = api_url.split("?", 1)[0]
+    project = launchpad.load(api_url)
+    buglist = project.searchTasks()
+    
+    for bug in buglist:
+        packages.add(bug.bug_target_name)
+        
+    return packages
+
+def main():
+    if not check_configfiles():
+        sys.exit(1)
+
+    config = read_config()
+    pack_list = read_list()
+    buglist = read_buglist(config["buglist-url"])
+	
+    for pack in pack_list:
+        if pack not in buglist:
+            config["sourcepackage"] = pack
+            file_bug(config)
+
+	
+if __name__ == '__main__':
+    main()
+

=== renamed file 'massfile' => 'massfile.moved'
=== added file 'merge-changelog'
--- merge-changelog	1970-01-01 00:00:00 +0000
+++ merge-changelog	2010-06-17 18:54:27 +0000
@@ -0,0 +1,266 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+# Copyright © 2008 Canonical Ltd.
+# Author: Scott James Remnant <scott at ubuntu.com>.
+# Hacked up by: Bryce Harrington <bryce at ubuntu.com>
+# Change merge_changelog to merge-changelog: Ryan Kavanagh
+#                                            <ryanakca@xxxxxxxxxxx>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of version 3 of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+import os, sys, re, time, logging
+
+from stat import *
+from textwrap import fill
+
+def usage():
+    print '''Usage: merge-changelog <left changelog> <right changelog>
+
+merge-changelog takes two changelogs that once shared a common source, 
+merges them back together, and prints the merged result to stdout.  This
+is useful if you need to manually merge a ubuntu package with a new
+Debian release of the package.
+'''
+    sys.exit(1)
+
+########################################################################
+# Changelog Management
+########################################################################
+
+# Regular expression for top of debian/changelog
+CL_RE = re.compile(r'^(\w[-+0-9a-z.]*) \(([^\(\) \t]+)\)((\s+[-0-9a-z]+)+)\;',
+                   re.IGNORECASE)
+
+def merge_changelog(left_changelog, right_changelog):
+    """Merge a changelog file."""
+
+    left_cl = read_changelog(left_changelog)
+    right_cl = read_changelog(right_changelog)
+
+    for right_ver, right_text in right_cl:
+        while len(left_cl) and left_cl[0][0] > right_ver:
+            (left_ver, left_text) = left_cl.pop(0)
+            print left_text
+
+        while len(left_cl) and left_cl[0][0] == right_ver:
+            (left_ver, left_text) = left_cl.pop(0)
+
+        print right_text
+
+    for left_ver, left_text in left_cl:
+        print left_text
+        
+    return False
+
+def read_changelog(filename):
+    """Return a parsed changelog file."""
+    entries = []
+
+    cl = open(filename)
+    try:
+        (ver, text) = (None, "")
+        for line in cl:
+            match = CL_RE.search(line)
+            if match:
+                try:
+                    ver = Version(match.group(2))
+                except ValueError:
+                    ver = None
+
+                text += line
+            elif line.startswith(" -- "):
+                if ver is None:
+                    ver = Version("0")
+
+                text += line
+                entries.append((ver, text))
+                (ver, text) = (None, "")
+            elif len(line.strip()) or ver is not None:
+                text += line
+    finally:
+        cl.close()
+
+    if len(text):
+        entries.append((ver, text))
+
+    return entries
+
+########################################################################
+# Version parsing code
+########################################################################
+# Regular expressions make validating things easy
+valid_epoch = re.compile(r'^[0-9]+$')
+valid_upstream = re.compile(r'^[A-Za-z0-9+:.~-]*$')
+valid_revision = re.compile(r'^[A-Za-z0-9+.~]+$')
+
+# Character comparison table for upstream and revision components
+cmp_table = "~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+-.:"
+
+
+class Version(object):
+    """Debian version number.
+
+    This class is designed to be reasonably transparent and allow you
+    to write code like:
+
+    |   s.version >= '1.100-1'
+
+    The comparison will be done according to Debian rules, so '1.2' will
+    compare lower.
+
+    Properties:
+      epoch       Epoch
+      upstream    Upstream version
+      revision    Debian/local revision
+    """
+
+    def __init__(self, ver):
+        """Parse a string or number into the three components."""
+        self.epoch = 0
+        self.upstream = None
+        self.revision = None
+
+        ver = str(ver)
+        if not len(ver):
+            raise ValueError
+
+        # Epoch is component before first colon
+        idx = ver.find(":")
+        if idx != -1:
+            self.epoch = ver[:idx]
+            if not len(self.epoch):
+                raise ValueError
+            if not valid_epoch.search(self.epoch):
+                raise ValueError
+            ver = ver[idx+1:]
+
+        # Revision is component after last hyphen
+        idx = ver.rfind("-")
+        if idx != -1:
+            self.revision = ver[idx+1:]
+            if not len(self.revision):
+                raise ValueError
+            if not valid_revision.search(self.revision):
+                raise ValueError
+            ver = ver[:idx]
+
+        # Remaining component is upstream
+        self.upstream = ver
+        if not len(self.upstream):
+            raise ValueError
+        if not valid_upstream.search(self.upstream):
+            raise ValueError
+
+        self.epoch = int(self.epoch)
+
+    def getWithoutEpoch(self):
+        """Return the version without the epoch."""
+        str = self.upstream
+        if self.revision is not None:
+            str += "-%s" % (self.revision,)
+        return str
+
+    without_epoch = property(getWithoutEpoch)
+
+    def __str__(self):
+        """Return the class as a string for printing."""
+        str = ""
+        if self.epoch > 0:
+            str += "%d:" % (self.epoch,)
+        str += self.upstream
+        if self.revision is not None:
+            str += "-%s" % (self.revision,)
+        return str
+
+    def __repr__(self):
+        """Return a debugging representation of the object."""
+        return "<%s epoch: %d, upstream: %r, revision: %r>" \
+               % (self.__class__.__name__, self.epoch,
+                  self.upstream, self.revision)
+
+    def __cmp__(self, other):
+        """Compare two Version classes."""
+        other = Version(other)
+
+        result = cmp(self.epoch, other.epoch)
+        if result != 0: return result
+
+        result = deb_cmp(self.upstream, other.upstream)
+        if result != 0: return result
+
+        result = deb_cmp(self.revision or "", other.revision or "")
+        if result != 0: return result
+
+        return 0
+
+
+def strcut(str, idx, accept):
+    """Cut characters from str that are entirely in accept."""
+    ret = ""
+    while idx < len(str) and str[idx] in accept:
+        ret += str[idx]
+        idx += 1
+
+    return (ret, idx)
+
+def deb_order(str, idx):
+    """Return the comparison order of two characters."""
+    if idx >= len(str):
+        return 0
+    elif str[idx] == "~":
+        return -1
+    else:
+        return cmp_table.index(str[idx])
+
+def deb_cmp_str(x, y):
+    """Compare two strings in a deb version."""
+    idx = 0
+    while (idx < len(x)) or (idx < len(y)):
+        result = deb_order(x, idx) - deb_order(y, idx)
+        if result < 0:
+            return -1
+        elif result > 0:
+            return 1
+
+        idx += 1
+
+    return 0
+
+def deb_cmp(x, y):
+    """Implement the string comparison outlined by Debian policy."""
+    x_idx = y_idx = 0
+    while x_idx < len(x) or y_idx < len(y):
+        # Compare strings
+        (x_str, x_idx) = strcut(x, x_idx, cmp_table)
+        (y_str, y_idx) = strcut(y, y_idx, cmp_table)
+        result = deb_cmp_str(x_str, y_str)
+        if result != 0: return result
+
+        # Compare numbers
+        (x_str, x_idx) = strcut(x, x_idx, "0123456789")
+        (y_str, y_idx) = strcut(y, y_idx, "0123456789")
+        result = cmp(int(x_str or "0"), int(y_str or "0"))
+        if result != 0: return result
+
+    return 0
+
+
+if __name__ == '__main__':
+    if len(sys.argv) != 3:
+        usage()
+    
+    left_changelog = sys.argv[1]
+    right_changelog = sys.argv[2]
+
+    merge_changelog(left_changelog, right_changelog)
+    sys.exit(0)

=== renamed file 'merge-changelog' => 'merge-changelog.moved'
=== added file 'mk-sbuild'
--- mk-sbuild	1970-01-01 00:00:00 +0000
+++ mk-sbuild	2010-06-17 18:54:27 +0000
@@ -0,0 +1,545 @@
+#!/bin/bash
+#
+# Copyright 2006-2010 (C) Canonical Ltd.
+# Authors:
+#  Kees Cook <kees@xxxxxxxxxx>
+#  Emmet Hikory <persia@xxxxxxxxxx>
+#  Scott Moser <smoser@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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.
+#
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# This script creates chroots designed to be used in a snapshot mode
+# (either with LVM or aufs) with schroot and sbuild.
+# Much love to "man sbuild-setup", https://wiki.ubuntu.com/PbuilderHowto,
+# and https://help.ubuntu.com/community/SbuildLVMHowto.
+#
+# It will deal with sbuild having not be installed and configured before.
+set -e
+
+# For when schroot enters the chroot, we cannot be in a directory that
+# will not exist in the chroot.
+cd /
+
+# Make sure we've got a regular user
+if [ -w /etc/passwd ]; then
+    echo "Please run this script as a regular user, not root." >&2
+    exit 1
+fi
+
+# Perform once-only things to initially set up for using sbuild+schroot
+if [ ! -w /var/lib/sbuild ]; then
+    # Load all the packages you'll need to do work
+    sudo apt-get install sbuild schroot debootstrap
+    # Add self to the sbuild group
+    sudo adduser "$USER" sbuild
+
+    # Prepare a usable default .sbuildrc
+    if [ ! -e ~/.sbuildrc ]; then
+        cat > ~/.sbuildrc <<EOM
+# *** VERIFY AND UPDATE \$mailto and \$maintainer_name BELOW ***
+
+# Mail address where logs are sent to (mandatory, no default!)
+\$mailto = '$USER';
+
+# Name to use as override in .changes files for the Maintainer: field
+# (mandatory, no default!).
+\$maintainer_name='$USER <$USER@localhost>';
+
+# Directory for chroot symlinks and sbuild logs.  Defaults to the
+# current directory if unspecified.
+#\$build_dir='$HOME/ubuntu/build';
+
+# Directory for writing build logs to
+\$log_dir="$HOME/ubuntu/logs";
+
+# don't remove this, Perl needs it:
+1;
+EOM
+        sensible-editor ~/.sbuildrc
+        # Create target directories, if needed
+        eval $(egrep '^\$(build|log)_dir[ 	]*=' ~/.sbuildrc | cut -c2-)
+        if [ -n "$log_dir" ]; then
+            mkdir -p "$log_dir"
+        fi
+        if [ -n "$build_dir" ]; then
+            mkdir -p "$build_dir"
+        fi
+    else
+        echo "Your ~/.sbuildrc already exists -- leaving it as-is."
+    fi
+
+    echo '***********************************************'
+    echo '* Before continuing, you MUST restart your    *'
+    echo '* session to gain "sbuild" group permissions! *' 
+    echo '***********************************************'
+    exit 0
+fi
+
+if ! id | fgrep -q '(sbuild)'; then
+    echo "You must be a member of the 'sbuild' group." >&2
+    exit 1
+fi
+
+# Set up configurable defaults (loaded after option processing)
+LV_SIZE="5G"
+SNAPSHOT_SIZE="4G"
+SOURCE_CHROOTS_DIR="/var/lib/schroot/chroots"
+SOURCE_CHROOTS_TGZ="/var/lib/schroot/tarballs"
+
+function usage()
+{
+    echo "Usage: $0 [OPTIONS] Release" >&2
+    echo "Options:"
+    echo "  --arch=ARCH                What architecture to select"
+    echo "  --name=NAME                Base name for the schroot (arch is appended)"
+    echo "  --personality=PERSONALITY  What personality to use (defaults to match --arch)"
+    echo "  --vg=VG                    use LVM snapshots, with group VG"
+    echo "  --debug                    Turn on script debugging"
+    echo "  --skip-updates             Do not include -updates pocket in sources.list"
+    echo "  --source-template=FILE     Use FILE as the sources.list template"
+    echo "  --debootstrap-mirror=URL   Use URL as the debootstrap source"
+    echo "  --distro=DISTRO            Install specific distro:"
+    echo "                                 'ubuntu'(default), or 'debian'"
+    echo "  --type=SCHROOT_TYPE        Define the schroot type:"
+    echo "                                 'directory'(default), or 'file'"
+    echo "                                 'lvm-snapshot' is selected via --vg"
+    echo ""
+    echo "Configuration (via ~/.mk-sbuild.rc)"
+    echo "  LV_SIZE                    Size of source LVs (default ${LV_SIZE})"
+    echo "  SNAPSHOT_SIZE              Size of snapshot LVs (default ${SNAPSHOT_SIZE})"
+    echo "  SOURCE_CHROOTS_DIR         Directory to store directory source chroots"
+    echo "  SOURCE_CHROOTS_TGZ         Directory to store file source chroots"
+    echo "  SCHROOT_CONF_SUFFIX        Lines to append to schroot.conf entries"
+    echo "  SKIP_UPDATES               Enable --skip-updates"
+    echo "  DEBOOTSTRAP_MIRROR         Mirror location (same as --debootstrap-mirror)"
+    echo "  TEMPLATE_SOURCES           A template for sources.list"
+    echo "  TEMPLATE_SCHROOTCONF       A template for schroot.conf stanza"
+    exit 1
+}
+
+
+if [ -z "$1" ]; then
+    usage
+fi
+OPTS=`getopt -o '' --long "help,debug,skip-updates,arch:,name:,source-template:,debootstrap-mirror:,personality:,distro:,vg:,type:" -- "$@"`
+eval set -- "$OPTS"
+
+VG=""
+DISTRO="ubuntu"
+name=""
+while :; do
+    case "$1" in
+        --debug)
+            set -x
+            shift
+            ;;
+        --arch)
+            CHROOT_ARCH="$2"
+            if [ "$2" = "i386" ] || [ "$2" = "lpia" ] && [ -z "$personality" ];
+            then
+                personality="linux32"
+            fi
+            shift 2
+            ;;
+        --personality)
+            personality="$2"
+            shift 2
+            ;;
+        --skip-updates)
+            SKIP_UPDATES="1"
+            shift
+            ;;
+        --name)
+            name="$2"
+            shift 2
+            ;;
+        --source-template)
+            TEMPLATE_SOURCES="$2"
+            shift 2
+            if [ ! -r $TEMPLATE_SOURCES ]; then
+                echo "W: Template file $TEMPLATE_SOURCES is not readable"
+                echo "W: Continuing with default sources!"
+            fi
+            ;;
+        --debootstrap-mirror)
+            DEBOOTSTRAP_MIRROR="$2"
+            shift 2
+            ;;
+        --distro)
+            DISTRO="$2"
+            shift 2
+            ;;
+        --vg)
+            VG="$2"
+            shift 2
+            ;;
+        --type)
+            SCHROOT_TYPE="$2"
+            shift 2
+            ;;
+        --)
+            shift
+            break
+            ;;
+        --help|*)
+            usage
+            ;;
+     esac
+done
+
+# To build the chroot, we need to know which release of Ubuntu to debootstrap
+RELEASE="$1"
+if [ -z "$RELEASE" ]; then
+    usage
+fi
+
+# By default, name the schroot the same as the release
+if [ -z "$name" ]; then
+    name="$RELEASE"
+fi
+
+# By default, use the native architecture.
+HOST_ARCH=$(dpkg --print-architecture)
+if [ -z "$CHROOT_ARCH" ]; then
+    CHROOT_ARCH="$HOST_ARCH"
+fi
+
+CHROOT_NAME="${name}-${CHROOT_ARCH}"
+
+# Load customizations
+if [ -r ~/.mk-sbuild.rc ]; then
+    . ~/.mk-sbuild.rc
+fi
+
+if [ -z "$SCHROOT_TYPE" ]; then
+    # To build the LV, we need to know which volume group to use
+    if [ -n "$VG" ]; then
+        SCHROOT_TYPE="lvm-snapshot"
+    else
+        SCHROOT_TYPE="directory"
+    fi
+fi
+
+case "$SCHROOT_TYPE" in
+"lvm-snapshot")
+    # Make sure LVM tools that operate on the snapshots have needed module
+    if ! sudo dmsetup targets | grep -q ^snapshot; then
+        sudo modprobe dm_snapshot
+        echo dm_snapshot | sudo tee -a /etc/modules >/dev/null
+    fi
+
+    # Set up some variables for use in the paths and names
+    CHROOT_LV="${name}_${CHROOT_ARCH}_chroot"
+    CHROOT_PATH="/dev/$VG/$CHROOT_LV"
+
+    # Install lvm2 if missing
+    if ! dpkg -l lvm2 >/dev/null 2>&1; then
+        sudo apt-get install lvm2
+    fi
+
+    # Does the specified VG exist?  (vgdisplay doesn't set error codes...)
+    if [ `sudo vgdisplay -c "$VG" | wc -l` -eq 0 ]; then
+        echo "Volume group '${VG}' does not appear to exist" >&2
+        exit 1
+    fi
+    ;;
+"directory")
+    if [ ! -d "${SOURCE_CHROOTS_DIR}" ]; then
+        sudo mkdir -p "${SOURCE_CHROOTS_DIR}"
+    fi
+    # Set up some variables for use in the paths and names
+    CHROOT_PATH="${SOURCE_CHROOTS_DIR}/${CHROOT_NAME}"
+    ;;
+"file")
+    if [ ! -d "$SOURCE_CHROOTS_TGZ" ]; then
+        sudo mkdir -p "$SOURCE_CHROOTS_TGZ"
+    fi
+    # Set up some variables for use in the paths and names
+    CHROOT_PATH="${SOURCE_CHROOTS_TGZ}/${CHROOT_NAME}.tgz"
+    ;;
+*)
+    echo 'unknown source type!?' >&2
+    exit 1
+    ;;
+esac
+
+# Is the specified release known to debootstrap?
+variant_opt="--variant=buildd"
+if [ ! -r "/usr/share/debootstrap/scripts/$RELEASE" ]; then
+    echo "Specified release ($RELEASE) not known to debootstrap" >&2
+    exit 1
+fi
+
+BUILD_PKGS="build-essential fakeroot devscripts apt-utils"
+# Handle distro-specific logic, unknown to debootstrap
+case "$DISTRO" in
+ubuntu)
+    if [ -z "$DEBOOTSTRAP_MIRROR" ]; then
+        case "$CHROOT_ARCH" in
+        amd64 | i386)
+            DEBOOTSTRAP_MIRROR="http://archive.ubuntu.com/ubuntu";
+            ;;
+        armel | hppa | ia64 | lpia | sparc)
+            DEBOOTSTRAP_MIRROR="http://ports.ubuntu.com/ubuntu-ports";
+            ;;
+        powerpc)
+            if [ "$RELEASE" != "dapper" ]; then
+                DEBOOTSTRAP_MIRROR="http://ports.ubuntu.com/ubuntu-ports";
+            else
+                DEBOOTSTRAP_MIRROR="http://archive.ubuntu.com/ubuntu";
+            fi
+            ;;
+        esac
+    fi
+    if [ -z "$COMPONENTS" ]; then
+        COMPONENTS="main restricted universe multiverse"
+    fi
+    if [ -z "$SOURCES_SECURITY_SUITE" ]; then
+        SOURCES_SECURITY_SUITE="RELEASE-security"
+    fi
+    if [ -z "$SOURCES_SECURITY_URL" ]; then
+        case "$CHROOT_ARCH" in
+        amd64 | i386)
+            SOURCES_SECURITY_URL="http://security.ubuntu.com/ubuntu";
+            ;;
+        armel | hppa | ia64 | lpia | sparc)
+            SOURCES_SECURITY_URL="http://ports.ubuntu.com/ubuntu-ports";
+            ;;
+        powerpc)
+            if [ "$RELEASE" != "dapper" ]; then
+                SOURCES_SECURITY_URL="http://ports.ubuntu.com/ubuntu-ports";
+            else
+                SOURCES_SECURITY_URL="http://security.ubuntu.com/ubuntu";
+            fi
+            ;;
+        esac
+    fi
+    # Add edgy+ buildd tools
+    if [ "$RELEASE" != "breezy" ] && [ "$RELEASE" != "dapper" ]; then
+        # Disable recommends for a smaller chroot (gutsy and later only)
+        BUILD_PKGS="--no-install-recommends $BUILD_PKGS"
+        # Add buildd tools
+        BUILD_PKGS="$BUILD_PKGS pkg-create-dbgsym pkgbinarymangler"
+    fi
+    ;;
+debian)
+    if [ -z "$DEBOOTSTRAP_MIRROR" ]; then
+        DEBOOTSTRAP_MIRROR="http://ftp.debian.org/debian";
+    fi
+    if [ -z "$COMPONENTS" ]; then
+        COMPONENTS="main non-free contrib"
+    fi
+    # Debian only performs security updates
+    SKIP_UPDATES=1
+    if [ -z "$SOURCES_SECURITY_SUITE" ]; then
+        SOURCES_SECURITY_SUITE="RELEASE/updates"
+    fi
+    if [ -z "$SOURCES_SECURITY_URL" ]; then
+        SOURCES_SECURITY_URL="http://security.debian.org/";
+    fi
+    # Unstable (aka "sid") does not have a security repository
+    if [ "$RELEASE" = 'unstable' ] || [ "$RELEASE" = 'sid' ]; then
+        SKIP_SECURITY=1
+    fi
+    ;;
+*)
+    echo "Unknown --distro '$DISTRO': aborting" >&2
+    exit 1
+    ;;
+esac
+
+DEBOOTSTRAP_COMMAND=debootstrap
+# Use qemu-kvm-extras-static for foreign chroots
+if [ "$CHROOT_ARCH" != "$HOST_ARCH" ] ; then
+    case "$CHROOT_ARCH-$HOST_ARCH" in
+    # Sometimes we don't need qemu
+    amd64-i386|amd64-lpia|arm-armel|armel-arm|i386-amd64|i386-lpia|lpia-i386|powerpc-ppc64|ppc64-powerpc|sparc-sparc64|sparc64-sparc)
+        ;;
+    # Sometimes we do
+    *)
+        DEBOOTSTRAP_COMMAND=qemu-debootstrap
+        if ! which "$DEBOOTSTRAP_COMMAND"; then
+            sudo apt-get install qemu-kvm-extras-static
+        fi
+        ;;
+    esac
+fi
+
+case "$SCHROOT_TYPE" in
+"lvm-snapshot")
+    # Allocate the "golden" chroot LV
+    sudo lvcreate -n "$CHROOT_LV" -L "$LV_SIZE" "$VG"
+    sudo mkfs -t ext4 "$CHROOT_PATH"
+
+    # Mount
+    MNT=`mktemp -d -t schroot-XXXXXX`
+    sudo mount "$CHROOT_PATH" "$MNT"
+    ;;
+"directory")
+    MNT="${CHROOT_PATH}"
+    if [ -d "${MNT}" ]; then
+        echo "E: ${MNT} already exists; aborting" >&2
+        exit 1
+    fi
+    sudo mkdir -p "${MNT}"
+    ;;
+"file")
+    MNT=`mktemp -d -t schroot-XXXXXX`
+esac
+
+# debootstrap the chroot
+sudo "$DEBOOTSTRAP_COMMAND" --arch="$CHROOT_ARCH" $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu}";
+
+# Update the package sources
+TEMP_SOURCES=`mktemp -t sources-XXXXXX`
+if [ -z "$TEMPLATE_SOURCES" ]; then
+    TEMPLATE_SOURCES=~/.mk-sbuild.sources
+fi
+if [ -r "$TEMPLATE_SOURCES" ]; then
+    cat "$TEMPLATE_SOURCES" > "$TEMP_SOURCES"
+else
+    cat > "$TEMP_SOURCES" <<EOM
+deb ${DEBOOTSTRAP_MIRROR} RELEASE ${COMPONENTS}
+deb-src ${DEBOOTSTRAP_MIRROR} RELEASE ${COMPONENTS}
+EOM
+    if [ -z "$SKIP_UPDATES" ]; then
+        cat >> "$TEMP_SOURCES" <<EOM
+deb ${DEBOOTSTRAP_MIRROR} RELEASE-updates ${COMPONENTS}
+deb-src ${DEBOOTSTRAP_MIRROR} RELEASE-updates ${COMPONENTS}
+EOM
+    fi
+    if [ -z "$SKIP_SECURITY" ]; then
+        cat >> "$TEMP_SOURCES" <<EOM
+deb ${SOURCES_SECURITY_URL} ${SOURCES_SECURITY_SUITE} ${COMPONENTS}
+deb-src ${SOURCES_SECURITY_URL} ${SOURCES_SECURITY_SUITE} ${COMPONENTS}
+EOM
+    fi
+fi
+cat "$TEMP_SOURCES" | sed -e "s|RELEASE|$RELEASE|g" | \
+    sudo bash -c "cat > $MNT/etc/apt/sources.list"
+rm -f "$TEMP_SOURCES"
+# Copy the timezone (comment this out if you want to leave the chroot at UTC)
+sudo cp /etc/localtime /etc/timezone "$MNT"/etc/
+# Create a schroot entry for this chroot
+TEMP_SCHROOTCONF=`mktemp -t schrootconf-XXXXXX`
+TEMPLATE_SCHROOTCONF=~/.mk-sbuild.schroot.conf
+TYPED_TEMPLATE_SCHROOTCONF="${TEMPLATE_SCHROOTCONF}.${SCHROOT_TYPE}"
+
+if [ -r "${TYPED_TEMPLATE_SCHROOTCONF}" ]; then
+    cat "${TYPED_TEMPLATE_SCHROOTCONF}" > "$TEMP_SCHROOTCONF"
+elif [ -r "${TEMPLATE_SCHROOT}" ]; then
+    cat "$TEMPLATE_SCHROOTCONF" > "$TEMP_SCHROOTCONF"
+else
+        # Please do not remove the blank line above [CHROOT_NAME]
+        # it helps keep the schroot stanzas separated in the main
+        # /etc/schroot/schroot.conf file.
+        cat > "$TEMP_SCHROOTCONF" <<EOM
+
+[CHROOT_NAME]
+description=CHROOT_NAME
+priority=3
+groups=sbuild,root,admin
+root-groups=root,sbuild,admin
+# Uncomment these lines to allow "sbuild" and "admin" users to access
+# the -source chroots directly (useful for automated updates, etc).
+#source-root-users=root,sbuild,admin
+#source-root-groups=root,sbuild,admin
+type=SCHROOT_TYPE
+EOM
+    case "$SCHROOT_TYPE" in
+    "lvm-snapshot")
+        cat >> "$TEMP_SCHROOTCONF" <<EOM
+device=CHROOT_PATH
+mount-options=-o noatime
+lvm-snapshot-options=--size SNAPSHOT_SIZE
+EOM
+    ;;
+    directory|file)
+        cat >> "${TEMP_SCHROOTCONF}" <<EOM
+union-type=aufs
+${SCHROOT_TYPE}=CHROOT_PATH
+EOM
+    ;;
+    esac
+fi
+if [ ! -z "$personality" ]; then
+    echo "personality=$personality" >> "$TEMP_SCHROOTCONF"
+fi
+if [ ! -z "$SCHROOT_CONF_SUFFIX" ]; then
+    echo "$SCHROOT_CONF_SUFFIX" >> "$TEMP_SCHROOTCONF"
+fi
+cat "$TEMP_SCHROOTCONF" | sed \
+        -e "s|CHROOT_NAME|$CHROOT_NAME|g" \
+        -e "s|CHROOT_PATH|$CHROOT_PATH|g" \
+        -e "s|SNAPSHOT_SIZE|$SNAPSHOT_SIZE|g" \
+        -e "s|SCHROOT_TYPE|$SCHROOT_TYPE|g" \
+        | \
+        sudo bash -c "cat >> /etc/schroot/schroot.conf"
+rm -f "$TEMP_SCHROOTCONF"
+# Create image finalization script
+sudo bash -c "cat >> $MNT/finish.sh" <<EOM
+#!/bin/bash
+#set -x
+set -e
+export http_proxy=${http_proxy}
+# Reload package lists
+apt-get update || true
+# Pull down signature requirements
+apt-get -y --force-yes install gnupg ${DISTRO}-keyring
+# Reload package lists
+apt-get update || true
+# Disable debconf questions so that automated builds won't prompt
+echo set debconf/frontend Noninteractive | debconf-communicate
+echo set debconf/priority critical | debconf-communicate
+# Install basic build tool set, trying to match buildd
+apt-get -y --force-yes install $BUILD_PKGS
+# Set up expected /dev entries
+if [ ! -r /dev/stdin ];  then ln -s /proc/self/fd/0 /dev/stdin;  fi
+if [ ! -r /dev/stdout ]; then ln -s /proc/self/fd/1 /dev/stdout; fi
+if [ ! -r /dev/stderr ]; then ln -s /proc/self/fd/2 /dev/stderr; fi
+# Clean up
+apt-get clean
+rm /finish.sh
+EOM
+sudo chmod a+x "$MNT"/finish.sh
+
+case "$SCHROOT_TYPE" in
+"lvm-snapshot")
+    sudo umount "$MNT"
+    rmdir "$MNT"
+    ;;
+"directory")
+    ;;
+"file")
+    cd "$MNT"
+    sudo tar czf "$CHROOT_PATH" .
+    cd /
+    sudo rm -r "$MNT"
+    ;;
+esac
+
+# Run finalization script on the "golden" copy via schroot.
+sudo schroot -c "$CHROOT_NAME"-source -u root /finish.sh
+
+# Finished
+echo ""
+echo "Done building $CHROOT_NAME."
+echo ""
+echo " To CHANGE the golden image: sudo schroot -c ${CHROOT_NAME}-source -u root"
+echo " To ENTER an image snapshot: schroot -c ${CHROOT_NAME}"
+echo " To BUILD within a snapshot: sbuild -d ${CHROOT_NAME} PACKAGE*.dsc"
+echo ""

=== renamed file 'mk-sbuild' => 'mk-sbuild.moved'
=== added file 'pbuilder-dist'
--- pbuilder-dist	1970-01-01 00:00:00 +0000
+++ pbuilder-dist	2010-06-17 18:54:27 +0000
@@ -0,0 +1,352 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2007-2010 Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+# With some changes by Iain Lane <iain@xxxxxxxxxxxxxxxxxxx>
+# Based upon pbuilder-dist-simple by Jamin Collins and Jordan Mantha.
+#
+# ##################################################################
+#
+# 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 2
+# 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.
+# 
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# This script is a wrapper to be able to easily use pbuilder/cowbuilder for
+# different distributions (eg, Gutsy, Hardy, Debian unstable, etc).
+#
+# You can create symlinks to a pbuilder-dist executable to get different
+# configurations. For example, a symlink called pbuilder-hardy will assume
+# that the target distribution is always meant to be Ubuntu Hardy.
+
+import sys
+import os
+
+import ubuntutools.misc
+
+debian_distros = ['etch', 'lenny', 'squeeze', 'sid', 'stable', \
+	'testing', 'unstable', 'experimental']
+
+class pbuilder_dist:
+	
+	def __init__(self, builder):
+		
+		# Base directory where pbuilder will put all the files it creates.
+		self.base = None
+		
+		# Name of the operation which pbuilder should perform.
+		self.operation = None
+		
+		# Wheter additional components should be used or not. That is,
+		# 'universe' and 'multiverse' for Ubuntu chroots and 'contrib'
+		# and 'non-free' for Debian.
+		self.extra_components = True
+		
+		# File where the log of the last operation will be saved.
+		self.logfile = None
+		
+		# System architecture
+		self.system_architecture = None
+		
+		# Build architecture
+		self.build_architecture = None
+		
+		# System's distribution
+		self.system_distro = None
+		
+		# Target distribution
+		self.target_distro = None
+		
+		# This is an identificative string which will either take the form
+		# 'distribution' or 'distribution-architecture'.
+		self.chroot_string = None
+		
+		# Authentication method
+		self.auth = 'sudo'
+		
+		# Builder
+		self.builder = builder
+		
+		# Ensure that the used builder is installed
+		for file in os.environ['PATH'].split(':'):
+			if os.path.exists(os.path.join(file, builder)):
+				builder = ''
+				break
+		if builder:
+			print 'Error: Could not find "%s".' % builder
+			sys.exit(1)
+		
+		##############################################################
+		
+		self.base = os.path.expanduser(os.environ.get('PBUILDFOLDER', '~/pbuilder/'))
+
+		if not os.path.exists(self.base):
+			os.makedirs(self.base)
+		
+		if 'PBUILDAUTH' in os.environ:
+			self.auth = os.environ['PBUILDAUTH']
+		
+		self.system_architecture = ubuntutools.misc.host_architecture()
+		self.system_distro = ubuntutools.misc.system_distribution()
+		if not self.system_architecture or not self.system_distro:
+			exit(1)
+		
+		self.target_distro = self.system_distro
+		
+		##############################################################
+	
+	def __getitem__(self, name):
+		
+		return getattr(self, name)
+	
+	def set_target_distro(self, distro):
+		""" pbuilder_dist.set_target_distro(distro) -> None
+		
+		Check if the given target distribution name is correct, if it
+		isn't know to the system ask the user for confirmation before
+		proceeding, and finally either save the value into the appropiate
+		variable or finalize pbuilder-dist's execution.
+		
+		"""
+		
+		if not distro.isalpha():
+			print 'Error: «%s» is an invalid distribution codename.' % distro
+			sys.exit(1)
+		
+		if not os.path.isfile(os.path.join('/usr/share/debootstrap/scripts/', distro)):
+			if os.path.isdir('/usr/share/debootstrap/scripts/'):
+				answer = ask('Warning: Unknown distribution «%s». Do you '\
+					'want to continue [y/N]? ' % distro)
+				if answer not in ('y', 'Y'):
+					sys.exit(0)
+			else:
+				print 'Please install package "debootstrap".'
+				sys.exit(1)
+		
+		self.target_distro = distro
+	
+	def set_operation(self, operation):
+		""" pbuilder_dist.set_operation -> None
+		
+		Check if the given string is a valid pbuilder operation and
+		depending on this either save it into the appropiate variable
+		or finalize pbuilder-dist's execution.
+		
+		"""
+		
+		arguments = ('create', 'update', 'build', 'clean', 'login', 'execute')
+		
+		if operation not in arguments:
+			if operation.endswith('.dsc'):
+				if os.path.isfile(operation):
+					self.operation = 'build'
+					return operation
+				else:
+					print 'Error: Could not find file «%s».' % operation
+					sys.exit(1)
+			else:
+				print 'Error: «%s» is not a recognized argument.' % operation
+				print 'Please use one of those: ' + ', '.join(arguments) + '.'
+				sys.exit(1)
+		else:
+			self.operation = operation
+			return ''
+	
+	def get_command(self, remaining_arguments = None):
+		""" pbuilder_dist.get_command -> string
+		
+		Generate the pbuilder command which matches the given configuration
+		and return it as a string.
+		
+		"""
+		
+		if not self.build_architecture:
+			self.chroot_string = self.target_distro
+			self.build_architecture = self.system_architecture
+		else:
+			self.chroot_string = '%(target_distro)s-%(build_architecture)s' % self
+		
+		prefix = os.path.join(self.base, self.chroot_string)
+		result = '%s_result/' % prefix
+		
+		if not self.logfile and self.operation != 'login':
+			self.logfile = os.path.normpath('%s/last_operation.log' % result)
+		
+		if not os.path.isdir(result):
+			# Create the results directory, if it doesn't exist.
+			os.makedirs(result)
+		
+		if self.builder == 'pbuilder':
+			base = '--basetgz "%s-base.tgz"' % prefix
+		elif self.builder == 'cowbuilder':
+			base = '--basepath "%s-base.cow"' % prefix
+		else:
+			print 'Error: Unrecognized builder "%s".' % self.builder
+			sys.exit(1)
+		
+		arguments = [
+			'--%s' % self.operation,
+			base,
+			'--distribution "%(target_distro)s"' % self,
+			'--buildresult "%s"' % result,
+			'--aptcache "/var/cache/apt/archives/"',
+			'--override-config',
+			]
+
+		if self.logfile:
+			arguments.append('--logfile %s' % self.logfile)
+		
+		if os.path.exists('/var/cache/archive/'):
+			arguments.append('--bindmounts "/var/cache/archive/"')		
+
+		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";')
+			components = 'main'
+			if self.extra_components:
+				components += ' contrib non-free'
+		else:
+			if self.build_architecture in ('amd64','i386'):
+				arguments.append('--mirror "http://archive.ubuntu.com/ubuntu/";')
+			elif self.build_architecture == 'powerpc' and self.target_distro == 'dapper':
+				arguments.append('--mirror "http://archive.ubuntu.com/ubuntu/";')
+			else:
+				arguments.append('--mirror "http://ports.ubuntu.com/ubuntu-ports/";')
+			components = 'main restricted'
+			if self.extra_components:
+				components += ' universe multiverse'
+
+		arguments.append('--components "%s"' % components)
+		
+		if self.build_architecture != self.system_architecture:
+			arguments.append('--debootstrapopts --arch="%(build_architecture)s"' % self)
+		
+		apt_conf_dir = os.path.join(self.base, 'etc/%(target_distro)s/apt.conf' % self)
+		if os.path.exists(apt_conf_dir):
+			arguments.append('--aptconfdir "%s"' % apt_conf_dir)
+		
+		# Append remaining arguments
+		if remaining_arguments:
+			arguments.extend(remaining_arguments)
+		
+		return '%s /usr/sbin/%s %s' % (self.auth, self.builder,
+			' '.join(arguments))
+
+def ask(question):
+	""" ask(question) -> string
+	
+	Ask the given question and return the answer. Also catch
+	KeyboardInterrupt (Ctrl+C) and EOFError (Ctrl+D) exceptions and
+	immediately return None if one of those is found.
+	
+	"""
+	
+	try:
+		answer = raw_input(question)
+	except (KeyboardInterrupt, EOFError):
+		print
+		answer = None
+	
+	return answer
+
+def help(exit_code = 0):
+	""" help() -> None
+	
+	Print a help message for pbuilder-dist, and exit with the given code.
+	
+	"""
+	
+	print 'See  man pbuilder-dist  for more information.'
+	
+	sys.exit(exit_code)
+
+def main():
+	""" main() -> None
+	
+	This is pbuilder-dist's main function. It creates a pbuilder_dist
+	object, modifies all necessary settings taking data from the
+	executable's name and command line options and finally either ends
+	the script and runs pbuilder itself or exists with an error message.
+	
+	"""
+	
+	script_name = os.path.basename(sys.argv[0])
+	parts = script_name.split('-')
+	
+	# Copy arguments into another list for save manipulation
+	args = sys.argv[1:]
+	
+	if '-' in script_name and (parts[0] != 'pbuilder' and \
+	parts[0] != 'cowbuilder') or len(parts) > 3:
+		print 'Error: «%s» is not a valid name for a «pbuilder-dist» executable.' % script_name
+		sys.exit(1)
+	
+	if len(args) < 1:
+		print 'Insufficient number of arguments.'
+		help(1)
+	
+	if args[0] in ('-h', '--help', 'help'):
+		help(0)
+	
+	app = pbuilder_dist(parts[0])
+	
+	if len(parts) > 1 and parts[1] != 'dist' and '.' not in parts[1]:
+		app.set_target_distro(parts[1])
+	else:
+		app.set_target_distro(args.pop(0))
+	
+	if len(parts) > 2:
+		requested_arch = parts[2]
+	elif len(args) > 0 and args[0] in ("alpha", "amd64", "arm", "armeb", "armel", "i386", "lpia", "m68k", "mips", "mipsel", "powerpc", "ppc64", "sh4", "sh4eb", "sparc", "sparc64"):
+		requested_arch = args.pop(0)
+	else:
+		requested_arch = None
+	
+	if requested_arch:
+		app.build_architecture = requested_arch
+		# For some foreign architectures we need to use qemu
+		if requested_arch != app.system_architecture and (app.system_architecture, requested_arch) not in [("amd64", "i386"), ("amd64", "lpia"), ("arm", "armel"), ("armel", "arm"), ("i386", "lpia"), ("lpia", "i386"), ("powerpc", "ppc64"), ("ppc64", "powerpc"), ("sparc", "sparc64"), ("sparc64", "sparc")]:
+			args.append('--debootstrap qemu-debootstrap')
+	
+	if 'mainonly' in sys.argv:
+		app.extra_components = False
+		args.remove('mainonly')
+	
+	if len(args) < 1:
+		print 'Insufficient number of arguments.'
+		help(1)
+	
+	# Parse the operation
+	args = [app.set_operation(args.pop(0))] + args
+	
+	if app.operation == 'build' and not '.dsc' in ' '.join(args):
+		print 'Error: You have to specify a .dsc file if you want to build.'
+		sys.exit(1)
+	
+	# Execute the pbuilder command
+	if not '--debug-echo' in args:
+		sys.exit(os.system(app.get_command(args)))
+	else:
+		print app.get_command((arg for arg in args if arg)).replace(
+			' --debug-echo', '')
+
+if __name__ == '__main__':
+	
+	try:
+		main()
+	except KeyboardInterrupt:
+		print 'Manually aborted.'
+		sys.exit(1)

=== added file 'pbuilder-dist-simple'
--- pbuilder-dist-simple	1970-01-01 00:00:00 +0000
+++ pbuilder-dist-simple	2010-06-17 18:54:27 +0000
@@ -0,0 +1,58 @@
+#!/bin/sh
+#
+# Copyright (C) Jamin W. Collins <jcollins@xxxxxxxxxxxxxxxx>
+# Copyright (C) Jordan Mantha <mantha@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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 2
+# 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.
+# 
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# This script is a wrapper to be able to easily use pbuilder for
+# different distributions (eg, Gutsy, Hardy, Debian unstable, etc).
+#
+# Create symlinks to this script naming them 'pbuilder-feisty', 'pbuilder-
+# gutsy', 'pbuilder-hardy', etc. If you want additional features try
+# out the more advanced script 'pbuilder-dist'.
+
+OPERATION=$1
+DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
+PROCEED=false
+BASE_DIR="$HOME/pbuilder"
+case $OPERATION in
+   create|update|build|clean|login|execute )
+      PROCEED=true
+      ;;
+esac
+if [ $PROCEED = true ]; then
+   shift 
+   if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ]
+   then mkdir -p $BASE_DIR/${DISTRIBUTION}_result/
+   fi
+   sudo pbuilder $OPERATION \
+      --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
+      --distribution $DISTRIBUTION \
+      --buildresult $BASE_DIR/$DISTRIBUTION_result \
+      --othermirror "deb http://archive.ubuntu.com/ubuntu $DISTRIBUTION universe multiverse" $@
+else
+   echo "Invalid command..."
+   echo "Valid commands are:"
+   echo "   create"
+   echo "   update"
+   echo "   build"
+   echo "   clean"
+   echo "   login"
+   echo "   execute"
+   exit 1
+fi

=== renamed file 'pbuilder-dist-simple' => 'pbuilder-dist-simple.moved'
=== renamed file 'pbuilder-dist' => 'pbuilder-dist.moved'
=== added file 'pull-debian-debdiff'
--- pull-debian-debdiff	1970-01-01 00:00:00 +0000
+++ pull-debian-debdiff	2010-06-17 18:54:27 +0000
@@ -0,0 +1,183 @@
+#!/usr/bin/perl
+#
+# Copyright 2007-2008 Kees Cook <kees@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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.
+# 
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# This script attempts to find and download a specific version of a Debian
+# package and its immediate parent to generate a debdiff.
+#
+# Requirements: devscripts diffstat dpkg-dev
+
+use strict;
+use warnings;
+
+sub geturls
+{
+    my ($urlbase,$pkg,$version)=@_;
+    my $file;
+
+    $file = "${pkg}_${version}.dsc";
+    print "Want '$file'\n";
+    if (! -r "$file") {
+        warn "Trying $urlbase/$file ...\n";
+        system("wget $urlbase/$file");
+        return 0 if ($? != 0);
+    }
+
+    # Parse the .dsc file for list of required files...
+    my @needed;
+    open(DSC,"$file") || return 0;
+    while (my $line=<DSC>) {
+        if ($line =~ /^Files:/) {
+            while (my $file=<DSC>) {
+                chomp($file);
+                last if ($file !~ /^ /);
+                my @parts = split(/\s+/,$file);
+                my $want = pop(@parts);
+                print "Want '$want'\n";
+                push(@needed,$want);
+            }
+        }
+    }
+    close(DSC);
+
+    foreach my $file (@needed) {
+        if (! -r "$file") {
+            warn "Pulling $urlbase/$file ...\n";
+            system("wget $urlbase/$file");
+            return 0 if ($? != 0);
+        }
+    }
+
+    return 1;
+}
+
+sub generate_base
+{
+    my ($pkg)=@_;
+    
+    my @path;
+    push(@path,"main");
+    if ($pkg =~ /^(lib.)/) {
+        push(@path,$1);
+    }
+    else {
+        push(@path,substr($pkg,0,1));
+    }
+    push(@path,$pkg);
+    return join("/",@path);
+}
+
+sub download_source
+{
+    my ($pkg,$version)=@_;
+    my $urlbase;
+
+    my $base = generate_base($pkg);
+
+    # Attempt to pull from security updates first
+    $urlbase = "http://security.debian.org/pool/updates/$base";;
+
+    if (!geturls($urlbase,$pkg,$version)) {
+        # Try regular pool
+
+        $urlbase = "http://ftp.debian.org/debian/pool/$base";;
+        if (!geturls($urlbase,$pkg,$version)) {
+            # Try snapshot
+
+            $urlbase="http://snapshot.debian.net/package/$pkg/$version";;
+            warn "Fetching snapshot url via '$urlbase' ...\n";
+            $urlbase=`curl -sI 'http://snapshot.debian.net/package/$pkg/$version' | grep ^[lL]ocation | cut -d' ' -f2 | head -1`;
+            $urlbase =~ s/[\r\n]//g;
+            warn "Trying snapshot location '$urlbase' ...\n";
+
+            if ($urlbase ne "" && !geturls($urlbase,$pkg,$version)) {
+                return 0;
+            }
+        }
+    }
+
+    return 1;
+}
+
+
+
+my $pkg = $ARGV[0];
+my $version = $ARGV[1];
+my $just_fetch = ($ARGV[2] && $ARGV[2] eq "--fetch");
+my $skip = $ARGV[2] || 1;
+$skip+=0;
+
+if (!defined($pkg) || !defined($version)) {
+    die "Usage: $0 PKG VERSION\n";
+}
+
+
+# Extract latest source
+die "Cannot locate $pkg $version\n" unless download_source($pkg,$version);
+exit(0) if ($just_fetch);
+system("dpkg-source -x ${pkg}_${version}.dsc");
+die "Unpack of $pkg $version failed\n" unless ($? == 0);
+
+# Locate prior changelog entry
+my $prev_ver;
+my $upstream_version = $version;
+if ($upstream_version =~ /^([^-]+)-/) {
+    $upstream_version = $1;
+}
+my $srcdir="$pkg-$upstream_version";
+if (! -d "$srcdir") {
+    undef $srcdir;
+    my $dir;
+    opendir(DIR,".");
+    while ($dir = readdir(DIR)) {
+        if ($dir =~ /^${pkg}-/ && -d $dir) {
+            $srcdir = $dir;
+            last;
+        }
+    }
+    closedir(DIR);
+}
+die "Cannot locate source tree\n" if (!defined($srcdir));
+my $log = "$srcdir/debian/changelog";
+open(LOG,"<$log") || die "$log: $!\n";
+while (my $line=<LOG>) {
+    if ($line =~ /^$pkg \((?:\d+:)?([^\)]+)\)/) {
+        my $seen = $1;
+        if ($seen ne $version) {
+            $skip--;
+
+            if ($skip==0) {
+                $prev_ver=$seen;
+                last;
+            }
+        }
+    }
+}
+close(LOG);
+die "Cannot find earlier source version\n" if (!defined($prev_ver));
+
+die "Cannot locate $pkg $prev_ver\n" unless download_source($pkg,$prev_ver);
+#system("dpkg-source -x ${pkg}_${prev_ver}.dsc");
+#die "Unpack of $pkg $prev_ver failed\n" unless ($? == 0);
+
+system("debdiff ${pkg}_${prev_ver}.dsc ${pkg}_${version}.dsc > ${pkg}_${version}.debdiff");
+die "Cannot debdiff\n" unless ($? == 0);
+
+system("diffstat -p0 ${pkg}_${version}.debdiff");
+print "${pkg}_${version}.debdiff\n";

=== renamed file 'pull-debian-debdiff' => 'pull-debian-debdiff.moved'
=== added file 'pull-debian-source'
--- pull-debian-source	1970-01-01 00:00:00 +0000
+++ pull-debian-source	2010-06-17 18:54:27 +0000
@@ -0,0 +1,148 @@
+#!/usr/bin/perl
+# Script Name: pull-debian-source
+# Author: Nathan Handler <nhandler@xxxxxxxxxx>
+# Usage: pull-debian-source <source package> [release]
+# Copyright (C) 2008, 2009 Nathan Handler <nhandler@xxxxxxxxxx>
+# License: GNU General Public License
+# 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.
+#
+# On Debian GNU/Linux systems, the complete text of the GNU General
+# Public License can be found in the /usr/share/common-licenses/GPL-3 file.
+
+use warnings;
+use strict;
+use LWP::Simple;
+use File::Basename;
+use Getopt::Long;
+use AptPkg::Version;
+
+die("Please install 'devscripts'\n") if(! grep -x "$_/dget", split(':',$ENV{'PATH'}));
+
+my($package)=$ARGV[0] || &usage();
+my($help)=0;
+GetOptions('help' => \$help);
+&usage() if($help);
+my($release)=$ARGV[1] || 'unstable';
+$release=&convertCodeName($release);
+&checkRelease($release);
+my($dsc)=&getDSC(&getMadison(&getURL($package,$release)));
+print "$dsc\n";
+exec("dget -xu $dsc");
+sub convertCodeName {
+	my($release)=shift || die("No Release Passed To convertCodeName!\n");
+	chomp $release;
+	if($release=~m/^lenny$/i) {
+		return "stable";
+	}
+	elsif($release=~m/^squeeze$/i) {
+		return "testing";
+	}
+	elsif($release=~m/^sid$/i) {
+		return "unstable";
+	}
+	elsif($release=~m/^etch$/i) {
+		return "oldstable";
+	}
+	return $release;
+}
+sub checkRelease {
+	my($release)=shift || die("No Release Passed To checkRelease!\n");
+	chomp $release;
+	my %releases=(
+		'stable' => 1,
+		'testing' => 1,
+		'unstable' => 1,
+		'experimental' => 1,
+		'oldstable' => 1
+	);
+	&invalidRelease(\%releases) unless $releases{$release}
+}
+sub getURL{
+	my($package)=shift || die("No Package Passed To getURL: $!\n");
+	my($release)=shift || die("No Release Passed to getURL: $!\n");
+	chomp $package;
+	chomp $release;
+	$package=lc($package);
+	$package=~s/\+/%2b/g;
+	$release=lc($release);
+	my($baseURL)='http://qa.debian.org/madison.php?text=on';
+	my($url)=$baseURL . '&package=' . $package . '&s=' . $release;
+	return $url;
+}
+sub getMadison {
+	my($url)=shift || die("No URL Passed to getMadison: $!\n");
+	chomp $url;
+	my($madison)=get($url);
+	die("Could Not Get $url") unless (defined $madison && $madison!~m/^\s*$/);
+	return $madison;
+}
+sub getDSC {
+	my($madison)=shift || die("No madison Passed to getDSC: $!\n");
+	if($madison=~m/^[WE]:/i) {
+		die("$madison");
+	}
+	my($baseURL)='http://ftp.debian.org/debian/pool/';
+	my(@madison)=split(/\n/,$madison);
+	my %urls;
+	my $url;
+	foreach my $line (@madison) {
+		$url = $baseURL;
+		my($package,$version,$release,$archs)=split(/\|/,$line,4);
+		$package=~s/\s*//g;
+		$version=~s/\s*//g;
+		$release=~s/\s*//g;
+		$archs=~s/\s*//g;
+		$version=~s/^.*?\://;
+		if($archs=~m/source/) {
+			print "Package: $package\nVersion: $version\nRelease: $release\nArchitectures: $archs\n";
+			my($firstLetter);
+			if($package=~m/^lib/) {
+				$firstLetter="lib" . substr($package,3,1);
+			}
+			else {
+				$firstLetter=substr($package,0,1);
+			}
+			if($release=~m/contrib/) {
+				$url .= 'contrib/';
+			}
+			elsif($release=~m/non\-free/) {
+				$url .= 'non-free/';
+			}
+			else {
+				$url .= 'main/';
+			}
+			$url .= $firstLetter . '/' . $package . '/' . $package . '_' . $version . '.dsc';
+			$urls{$version} = $url;
+		}
+
+	}
+
+	my @vers = reverse sort AptPkg::Version::CmpVersion keys %urls;	
+
+	return $urls{$vers[0]} or die("Unable To Find Source Package On Madison\n");
+
+}
+sub usage {
+	my($name)=basename($0);
+	die("USAGE: $name [-h] <source package> [target release]\n");
+}
+sub invalidRelease {
+	my($releases)=shift || die("Invalid Release!");
+	my(%releases)=%$releases;
+	my($validReleases);
+	while ( my ($key, $value) = each(%releases) ) {
+		if($value) {
+			$validReleases .= $key . ", ";
+		}
+	}
+	$validReleases=~s/,\s*$//;
+	die("Invalid Release!\nValid Releases: $validReleases\n");
+}

=== renamed file 'pull-debian-source' => 'pull-debian-source.moved'
=== added file 'pull-lp-source'
--- pull-lp-source	1970-01-01 00:00:00 +0000
+++ pull-lp-source	2010-06-17 18:54:27 +0000
@@ -0,0 +1,85 @@
+#!/usr/bin/python
+#
+# pull-lp-source -- pull a source package from Launchpad
+# Basic usage: pull-lp-source <source package> [<release>]
+#
+# Copyright (C) 2008 Iain Lane <iain@xxxxxxxxxxxxxxxxxxx>
+#
+# BackportFromLP class taken from prevu tool, which is:
+# Copyright (C) 2006 John Dong <jdong@xxxxxxxxxx>
+# 
+# ##################################################################
+#
+# 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.
+# 
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+
+
+import os
+import sys
+import subprocess
+from optparse import OptionParser
+
+# ubuntu-dev-tools modules.
+from ubuntutools.lp.lpapicache import Distribution, Launchpad
+from ubuntutools.lp.udtexceptions import (SeriesNotFoundException,
+        PackageNotFoundException, PocketDoesNotExistError)
+from ubuntutools.misc import splitReleasePocket
+
+if not os.path.exists("/usr/bin/dget"):
+    print "E: dget is not installed - please install the 'devscripts' package" \
+        " and rerun this script again."
+    sys.exit(1)
+
+if __name__ == '__main__':
+    usage = "Usage: %prog <package> [release]"
+    optParser = OptionParser(usage)
+    (options, args) = optParser.parse_args()
+
+    if not args:
+        optParser.print_help()
+        sys.exit(1)
+
+    # Login anonymously to LP
+    Launchpad.login_anonymously()
+
+    package = str(args[0]).lower()
+
+    if len(args) >= 2: # Custom distribution specified.
+        release = str(args[1]).lower()
+    else:
+        release = os.getenv('DIST') or Distribution('ubuntu').getDevelopmentSeries().name
+
+    try:
+        (release, pocket) = splitReleasePocket(release)
+    except PocketDoesNotExistError, e:
+        print 'E: %s' % e
+        sys.exit(1)
+
+    try:
+        spph = Distribution('ubuntu').getArchive().getSourcePackage(package, release, pocket)
+    except (SeriesNotFoundException, PackageNotFoundException), e:
+        print 'E: %s' % e
+        sys.exit(1)
+
+    dsc_url = [url for url in spph.sourceFileUrls() if url.endswith('.dsc')]
+    assert dsc_url, 'No .dsc file found'
+
+    # All good - start downloading...
+    print 'Fetching the source for %s from %s (%s)...' % (
+            package, release.capitalize(), pocket)
+    if subprocess.call(['/usr/bin/dget', '-xu', dsc_url[0]]) == 0:
+        print 'Success!'
+    else:
+        print 'Failed to fetch and extrace the source.', \
+                'Please check the output for the error.'

=== renamed file 'pull-lp-source' => 'pull-lp-source.moved'
=== added file 'pull-revu-source'
--- pull-revu-source	1970-01-01 00:00:00 +0000
+++ pull-revu-source	2010-06-17 18:54:27 +0000
@@ -0,0 +1,52 @@
+#!/usr/bin/perl
+# Script Name: pull-revu-source
+# Author: Nathan Handler <nhandler@xxxxxxxxxx>
+# Usage: pull-revu-source <source package>
+# Copyright (C) 2009 Nathan Handler <nhandler@xxxxxxxxxx>
+# Based on revupull in kubuntu-dev-tools,
+# written by Harald Sitter <apachelogger@xxxxxxxxxx>
+# License: GNU General Public License
+# 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.
+# On Debian GNU/Linux systems, the complete text of the GNU General
+# Public License can be found in the /usr/share/common-licenses/GPL-3 file.
+
+use warnings;
+use strict;
+use LWP::Simple;
+use Getopt::Long;
+
+die("Please install 'devscripts'\n") if(! grep -x "$_/dget", split(':',$ENV{'PATH'}));
+
+my $REVU = "revu.ubuntuwire.com";
+
+my($package) = lc($ARGV[0]) || usage();
+my($help)=0;
+GetOptions('help' => \$help);
+usage() if($help);
+
+dget(getURL());
+
+sub getURL {
+	my($url) = "http://"; . $REVU . "/dsc.py?url&package=" . $package;
+	my($page)=get($url);
+	die("Could Not Get $url") unless (defined $page);
+	return $page;
+}
+
+sub dget {
+	my($dsc) = @_;
+	exec("dget -xu $dsc");
+}
+
+sub usage {
+	my($name)=basename($0);
+	die("USAGE: $name [-h] <source package>\n");
+}

=== renamed file 'pull-revu-source' => 'pull-revu-source.moved'
=== added file 'requestsync'
--- requestsync	1970-01-01 00:00:00 +0000
+++ requestsync	2010-06-17 18:54:27 +0000
@@ -0,0 +1,228 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# (C) 2007 Canonical Ltd., Steve Kowalik
+# Authors:
+#  Martin Pitt <martin.pitt@xxxxxxxxxx>
+#  Steve Kowalik <stevenk@xxxxxxxxxx>
+#  Michael Bienia <geser@xxxxxxxxxx>
+#  Daniel Hahler <ubuntu@xxxxxxxxxx>
+#  Iain Lane <laney@xxxxxxxxxx>
+#  Jonathan Davies <jpds@xxxxxxxxxx>
+#  Markus Korn <thekorn@xxxxxx> (python-launchpadlib support)
+#
+# ##################################################################
+#
+# 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; version 2.
+# 
+# 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.
+#
+# See file /usr/share/common-licenses/GPL-2 for more details.
+#
+# ##################################################################
+
+import sys
+from optparse import OptionParser
+from debian_bundle.changelog import Version
+
+# ubuntu-dev-tools modules
+from ubuntutools.lp import udtexceptions
+from ubuntutools.requestsync.common import *
+# https_proxy fix
+import ubuntutools.common
+
+#
+# entry point
+#
+
+if __name__ == '__main__':
+	# Our usage options.
+	usage = 'Usage: %prog [-d distro] [-k keyid] [-n] [--lp] [-s] [-e] ' \
+		'<source package> [<target release> [base version]]'
+	optParser = OptionParser(usage)
+
+	optParser.add_option('-d', type = 'string',
+		dest = 'dist', default = 'unstable',
+		help = 'Debian distribution to sync from.')
+	optParser.add_option('-k', type = 'string',
+		dest = 'keyid', default = None,
+		help = 'GnuPG key ID to use for signing report (only used when emailing the sync request).')
+	optParser.add_option('-n', action = 'store_true',
+		dest = 'newpkg', default = False,
+		help = 'Whether package to sync is a new package in Ubuntu.')
+	optParser.add_option('--lp', action = 'store_true',
+		dest = 'lpapi', default = False,
+		help = 'Specify whether to use the LP API for filing the sync request (recommended).')
+	optParser.add_option('-s', action = 'store_true',
+		dest = 'sponsorship', default = False,
+		help = 'Force sponsorship')
+	optParser.add_option('-C', action = 'store_true',
+		dest = 'missing_changelog_ok', default = False,
+		help = 'Allow changelog to be manually filled in when missing')
+	optParser.add_option('-e', action = 'store_true',
+		dest = 'ffe', default = False,
+		help = 'Use this after FeatureFreeze for non-bug fix syncs, changes ' \
+			'default subscription to the appropriate release team.')
+
+	(options, args) = optParser.parse_args()
+
+	if not len(args):
+		optParser.print_help()
+		sys.exit(1)
+
+	# import the needed requestsync module
+	if options.lpapi:
+		from ubuntutools.requestsync.lp import *
+		from ubuntutools.lp.lpapicache import Distribution
+		# See if we have LP credentials and exit if we don't - cannot continue in this case
+		try:
+			Launchpad.login()
+		except IOError:
+			sys.exit(1)
+	else:
+		from ubuntutools.requestsync.mail import *
+		if not getEmailAddress():
+			sys.exit(1)
+
+	newsource = options.newpkg
+	sponsorship = options.sponsorship
+	distro = options.dist
+	ffe = options.ffe
+	lpapi = options.lpapi
+	need_interaction = False
+	force_base_version = None
+	srcpkg = args[0]
+
+	if len(args) == 1:
+		if lpapi:
+			release = Distribution('ubuntu').getDevelopmentSeries().name
+		else:
+			release = 'maverick'
+		print >> sys.stderr, 'W: Target release missing - assuming %s' % release
+	elif len(args) == 2:
+		release = args[1]
+	elif len(args) == 3:
+		release = args[1]
+		force_base_version = Version(args[2])
+	else:
+		print >> sys.stderr, 'E: Too many arguments.'
+		optParser.print_help()
+		sys.exit(1)
+
+	# Get the current Ubuntu source package
+	try:
+		ubuntu_srcpkg = getUbuntuSrcPkg(srcpkg, release)
+		ubuntu_version = Version(ubuntu_srcpkg.getVersion())
+		ubuntu_component = ubuntu_srcpkg.getComponent()
+		newsource = False # override the -n flag
+	except udtexceptions.PackageNotFoundException:
+		ubuntu_srcpkg = None
+		ubuntu_version = Version('~')
+		ubuntu_component = 'universe' # let's assume universe
+		if not newsource:
+			print "'%s' doesn't exist in 'Ubuntu %s'.\nDo you want to sync a new package?" % \
+				(srcpkg, release)
+			raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
+			newsource = True
+
+	# Get the requested Debian source package
+	try:
+		debian_srcpkg = getDebianSrcPkg(srcpkg, distro)
+		debian_version = Version(debian_srcpkg.getVersion())
+		debian_component = debian_srcpkg.getComponent()
+	except udtexceptions.PackageNotFoundException, e:
+		print >> sys.stderr, "E: %s" % e
+		sys.exit(1)
+
+        # Stop if Ubuntu has already the version from Debian or a newer version
+	if ubuntu_version == debian_version:
+		print  >> sys.stderr, \
+			'E: The versions in Debian and Ubuntu are the same already (%s). Aborting.' % ubuntu_version
+		sys.exit(1)
+        if ubuntu_version > debian_version:
+            print >> sys.stderr, \
+                'E: The version in Ubuntu (%s) is newer than the version in Debian (%s). Aborting.' % (ubuntu_version, debian_version)
+            sys.exit(1)
+
+	# -s flag not specified - check if we do need sponsorship
+	if not sponsorship:
+		sponsorship = needSponsorship(srcpkg, ubuntu_component, release)
+
+	# Check for existing package reports
+	if not newsource:
+		checkExistingReports(srcpkg)
+
+	# Generate bug report
+	pkg_to_sync = '%s %s (%s) from Debian %s (%s)' % \
+		(srcpkg, debian_version, ubuntu_component, distro, debian_component)
+	title = "Sync %s" % pkg_to_sync
+	if ffe:
+		title = "FFe: " + title
+	report = "Please sync %s\n\n" % pkg_to_sync
+
+	if 'ubuntu' in str(ubuntu_version):
+		need_interaction = True
+
+		print 'Changes have been made to the package in Ubuntu.\n' \
+			'Please edit the report and give an explanation.\n' \
+			'Not saving the report file will abort the request.'
+		report += 'Explanation of the Ubuntu delta and why it can be dropped:\n' \
+			'>>> ENTER_EXPLANATION_HERE <<<\n\n'
+
+	if ffe:
+		need_interaction = True
+
+		print 'To approve FeatureFreeze exception, you need to state\n' \
+			'the reason why you feel it is necessary.\n' \
+			'Not saving the report file will abort the request.'
+		report += 'Explanation of FeatureFreeze exception:\n' \
+			'>>> ENTER_EXPLANATION_HERE <<<\n\n'
+
+	if need_interaction:
+		raw_input_exit_on_ctrlc('Press [Enter] to continue. Press [Ctrl-C] to abort now. ')
+
+	base_version = force_base_version or ubuntu_version
+
+	if newsource:
+		report += 'All changelog entries:\n\n'
+	else:
+		report += 'Changelog entries since current %s version %s:\n\n' % (release, ubuntu_version)
+	changelog = getDebianChangelog(debian_srcpkg, base_version)
+	if not changelog:
+		if not options.missing_changelog_ok:
+			print >> sys.stderr, "E: Did not retrieve any changelog entries. Do you need to specify '-C'? Was the package recently uploaded? (check http://packages.debian.org/changelogs/)"
+			sys.exit(1)
+		else:
+			need_interaction = True
+			changelog = "XXX FIXME: add changelog here XXX"
+	report += changelog
+
+	(title, report) = edit_report(title, report, changes_required = need_interaction)
+	if 'XXX FIXME' in report:
+		print >> sys.stderr, "E: changelog boilerplate found in report, please manually add changelog when using '-C'"
+		sys.exit(1)
+
+	# bug status and bug subscriber
+	status = 'confirmed'
+	subscribe = 'ubuntu-archive'
+	if sponsorship:
+		status = 'new'
+		subscribe = 'ubuntu-sponsors'
+	if ffe:
+		status = 'new'
+		subscribe = 'ubuntu-release'
+
+	srcpkg = not newsource and srcpkg or None
+	if lpapi:
+		# Map status to the values expected by LP API
+		mapping = {'new': 'New', 'confirmed': 'Confirmed'}
+		# Post sync request using LP API
+		postBug(srcpkg, subscribe, mapping[status], title, report)
+	else:
+		# Mail sync request
+		mailBug(srcpkg, subscribe, status, title, report, options.keyid)

=== renamed file 'requestsync' => 'requestsync.moved'
=== added file 'reverse-build-depends'
--- reverse-build-depends	1970-01-01 00:00:00 +0000
+++ reverse-build-depends	2010-06-17 18:54:27 +0000
@@ -0,0 +1,269 @@
+#!/usr/bin/perl
+#   Copyright (C) Patrick Schoenfeld
+#   Copyright (C) 2009 Ryan Kavanagh
+#
+# 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 2 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.
+
+=head1 NAME
+
+build-rdeps - find packages that depend on a specific package to build (reverse build depends)
+
+=head1 SYNOPSIS
+
+B<build-rdeps> I<package>
+
+=head1 DESCRIPTION
+
+B<build-rdeps> searches for all packages that build-depend on the specified package.
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<-u> B<--update>
+
+Run apt-get update before searching for build-depends.
+
+=item B<-s> B<--sudo>
+
+Use sudo when running apt-get update. Has no effect if -u is omitted.
+
+=item B<--distribution>
+
+Select another distribution, which is searched for build-depends.
+
+=item B<-m> B<--print-maintainer>
+
+Print the value of the maintainer field for each package.
+
+=item B<-d> B<--debug>
+
+Run the debug mode
+
+=item B<--help>
+
+Show the usage information.
+
+=item B<--version>
+
+Show the version information.
+
+=back
+
+=cut
+
+use warnings;
+use strict;
+use File::Basename;
+use File::Find;
+use Getopt::Long;
+use Pod::Usage;
+use Data::Dumper;
+my $progname = basename($0);
+my $version = '1.0';
+my $dctrl = "/usr/bin/grep-dctrl";
+my $sources_path = "/var/lib/apt/lists/";
+my $source_pattern = ".*_dists_maverick_.*Sources\$";
+my @source_files;
+my $sources_count=0;
+my $opt_debug;
+my $opt_update;
+my $opt_sudo;
+my $opt_maintainer;
+my $opt_mainonly;
+my $opt_distribution;
+
+if (!(-x $dctrl)) {
+	die "$progname: Fatal error. grep-dctrl is not available.\nPlease install the 'dctrl-tools' package.\n";
+}
+
+sub version {
+	print <<"EOT";
+This is $progname $version, from the Debian devscripts package, v. ###VERSION###
+This code is copyright by Patrick Schoenfeld, all rights reserved.
+It comes with ABSOLUTELY NO WARRANTY. You are free to redistribute this code
+under the terms of the GNU General Public License, version 2 or later.
+EOT
+exit (0);
+}
+
+sub usage {
+	print <<"EOT";
+usage: $progname packagename
+       $progname --help
+       $progname --version
+
+Searches for all packages that build-depend on the specified package.
+
+Options:
+   -u, --update                  Run apt-get update before searching for build-depends.
+                                 (needs root privileges)
+   -s, --sudo                    Use sudo when running apt-get update
+                                 (has no effect when -u is omitted)
+   -d, --debug                   Enable the debug mode
+   -m, --print-maintainer        Print the maintainer information (experimental)
+   --distribution distribution   Select a distribution to search for build-depends
+                                 (Default: karmic)
+   --only-main                   Ignore universe and multiverse
+
+EOT
+version;
+}
+
+sub findsources {
+	if (/$source_pattern/ and $sources_count <= 3) {
+		unless ($opt_mainonly and /(universe|multiverse)/) {
+			push(@source_files, $_);
+			$sources_count+=1;
+			print STDERR "DEBUG: Added source file: $_ (#$sources_count)\n" if ($opt_debug);
+		}
+	}
+}
+
+sub findreversebuilddeps {
+	my ($package, $source_file) = @_;
+	my %packages;
+	my $depending_package;
+	my $count=0;
+	my $maintainer_info='';
+
+	open(PACKAGES, "$dctrl -F Build-Depends,Build-Depends-Indep $package -s Package,Build-Depends,Build-Depends-Indep,Maintainer $source_file|");
+
+	while(<PACKAGES>) {
+		chomp;
+		print STDERR "$_\n" if ($opt_debug);
+		if (/Package: (.*)$/) {
+			$depending_package = $1;
+			$packages{$depending_package}->{'Build-Depends'} = 0;
+		}
+
+		if (/Maintainer: (.*)$/) {
+			if ($depending_package) {
+				$packages{$depending_package}->{'Maintainer'} = $1;
+			}
+		}
+
+		if (/Build-Depends: (.*)$/ or /Build-Depends-Indep: (.*)$/) {
+			if ($depending_package) {
+				print STDERR "$1\n" if ($opt_debug);
+				if ($1 =~ /^(.*\s)?$package([\s,]|$)/) {
+					$packages{$depending_package}->{'Build-Depends'} = 1;
+				}
+			}
+
+		}
+	}
+
+	while($depending_package = each(%packages)) {
+		if ($packages{$depending_package}->{'Build-Depends'} != 1) {
+			print STDERR "Ignoring package $depending_package because its not really build depending on $package.\n" if ($opt_debug);
+			next;
+		}
+		if ($opt_maintainer) {
+			$maintainer_info = "($packages{$depending_package}->{'Maintainer'})";
+		}
+
+		$count+=1;
+		print "$depending_package $maintainer_info \n";
+
+	}
+
+	if ($count == 0) {
+		print "No reverse build-depends found for $package.\n\n"
+	}
+	else {
+		print "\nFound a total of $count reverse build-depend(s) for $package.\n\n";
+	}
+}
+
+if ($#ARGV < 0) { usage; exit(0); }
+
+
+Getopt::Long::Configure('bundling');
+GetOptions(
+	"u|update" => \$opt_update,
+	"s|sudo" => \$opt_sudo,
+	"m|print-maintainer" => \$opt_maintainer,
+	"distribution=s" => \$opt_distribution,
+	"only-main" => \$opt_mainonly,
+	"d|debug" => \$opt_debug,
+	"h|help" => sub { usage; },
+	"v|version" => sub { version; }
+);
+
+my $package = shift;
+
+if (!$package) {
+	die "$progname: missing argument. expecting packagename\n";
+}
+
+print STDERR "DEBUG: Package => $package\n" if ($opt_debug);
+
+if ($opt_update) {
+	print STDERR "DEBUG: Updating apt-cache before search\n" if ($opt_debug);
+	my @cmd;
+	if ($opt_sudo) {
+		print STDERR "DEBUG: Using sudo to become root\n" if ($opt_debug);
+		push(@cmd, 'sudo');
+	}
+	push(@cmd, 'apt-get', 'update');
+	system @cmd;
+}
+
+if ($opt_distribution) {
+	print STDERR "DEBUG: Setting distribution to $opt_distribution" if ($opt_debug);
+	$source_pattern = ".*_dists_" . $opt_distribution . "_.*Sources\$";
+}
+
+# Find sources files
+find(\&findsources, $sources_path);
+
+if (($#source_files+1) <= 0) {
+	die "$progname: unable to find sources files.\nDid you forget to run apt-get update (or add --update to this command)?";
+}
+
+foreach my $source_file (@source_files) {
+	if ($source_file =~ /main/) {
+		print "Reverse Build-depends in main:\n";
+		print "------------------------------\n\n";
+		findreversebuilddeps($package, "$sources_path/$source_file");
+	}
+
+	if ($source_file =~ /universe/) {
+		print "Reverse Build-depends in universe:\n";
+		print "---------------------------------\n\n";
+		findreversebuilddeps($package, "$sources_path/$source_file");
+	}
+
+	if ($source_file =~ /multiverse/) {
+		print "Reverse Build-depends in multiverse:\n";
+		print "----------------------------------\n\n";
+		findreversebuilddeps($package, "$sources_path/$source_file");
+	}
+}
+
+=head1 LICENSE
+
+This code is copyright by Patrick Schoenfeld
+<schoenfeld@xxxxxxxxxxxxxxxxx>, all rights reserved.
+This program comes with ABSOLUTELEY NO WARRANTY.
+You are free to redistribute this code under the terms of the
+GNU General Public License, version 2 or later.
+
+=head1 AUTHOR
+
+Patrick Schoenfeld <schoenfeld@xxxxxxxxxxxxxxxxx>
+
+=cut

=== renamed file 'reverse-build-depends' => 'reverse-build-depends.moved'
=== added file 'setup-packaging-environment'
--- setup-packaging-environment	1970-01-01 00:00:00 +0000
+++ setup-packaging-environment	2010-06-17 18:54:27 +0000
@@ -0,0 +1,187 @@
+#! /bin/sh
+#
+# Copyright (C) 2009 Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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; version 3 or later.
+# 
+# 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.
+#
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# This assistants's aim is to make it more straightforward for new
+# contributors to get their Ubuntu installation ready for packaging work.
+
+separator1() {
+    echo '------------------------------------------------------'
+    echo
+}
+
+separator2() {
+    echo '======================================================'
+    echo
+}
+
+await_response() {
+    echo
+    echo -n "Press enter when you're ready to continue... "
+    read line # Wait for a key press
+    echo
+}
+
+# ##################################################################
+
+if [ "$(lsb_release -is)" != "Ubuntu" ]
+then
+    echo "Error: This script has been created for Ubuntu, but you are "
+    echo "running «$(lsb_release -is)». Aborting."
+    exit 1
+fi
+
+echo "Welcome to the Ubuntu Packaging Environment setup!"
+separator1
+echo "This assistant will help you setting up your computer with everything"
+echo "necessary for getting started with Ubuntu development."
+await_response
+separator2
+
+echo "Enabling the main, restricted, universe and multiverse components..."
+separator1
+echo "Further steps will require packages from the «main» and «universe»"
+echo "components. It's advisable for «restricted» and «multiverse» to also"
+echo "be enabled, so that your apt cache knows about all official Ubuntu"
+echo "packages."
+echo
+echo "This is the list of repositories enabled on your system:"
+cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list | \
+grep '^[ ]*deb[ ]' | while read line
+do
+    echo " - $line"
+done
+echo
+echo "Please check that the list above contains all four components from"
+echo "Ubuntu's official repositories, and enable any missing component"
+echo "(eg., using System -> Administration -> Software Sources). Do this"
+echo "now."
+await_response
+separator2
+
+echo "Installing recommended packages..."
+separator1
+echo "In order to do packaging work, you'll need a minimal set of packages."
+echo "Those, together with other packages which, though optional, have proven"
+echo "to be useful, will now be installed."
+echo
+sudo aptitude install ubuntu-dev-tools devscripts debhelper cdbs patchutils pbuilder build-essential
+separator2
+
+echo "Enabling the source repository"
+separator1
+echo "In order to do packaging work comfortably, you'll want to have"
+echo "information about all of Ubuntu's source packages in your apt"
+echo "cache. This will make it possible for you to:"
+echo " - Check information about them without the need to go online."
+echo " - Download the latest version of a source package with a single command."
+echo
+echo "This is the list of source repositories enabled on your system:"
+cat /etc/apt/sources.list /etc/apt/sources.list.d/*.list | \
+grep '^[ ]*deb-src[ ]' | while read line
+do
+    echo " - $line"
+done
+echo
+echo "Please check that the list above contains all four components, from"
+echo "Ubuntu's official repositories and for the current development version"
+echo "(important: even if you're using a stable Ubuntu release, the deb-src"
+echo "line needs to be for the latest, in-development, Ubuntu version)".
+echo
+echo "Enable any missing component (eg., by editing your /etc/apt/sources.list"
+echo "file). Do this now."
+await_response
+separator2
+
+echo "Defining the DEBEMAIL and DEBFULLNAME environment variables"
+separator1
+echo "Most packaging tools make use of the DEBEMAIL and DEBFULLNAME"
+echo "environment variables to know who you are."
+echo
+skip_step=false
+if [ -n "$DEBFULLNAME" -a -n "$DEBEMAIL" ]
+then
+    echo "This variables currently have the following value on your system:"
+    echo "Full name (and comment): $DEBFULLNAME"
+    echo "Valid e-mail address: $DEBEMAIL"
+    echo
+    echo -n "Is this information correct? [yn] "
+    while read line
+    do
+        if [ "$line" = "y" ]
+        then
+            skip_step=true
+            break
+        fi
+        if [ "$line" = "n" ]
+        then
+            break
+        fi
+        echo -n "Please write on of «y» or «n»: "
+    done
+    echo
+fi
+show_gpg_info() {
+    if [ -n "gpg --list-secret-keys 2>/dev/null" ]
+    then
+        echo
+        echo "Note: Write your name and e-mail exactly like in your GPG key."
+        echo "For reference, here are your GPG identities:"
+        gpg --list-secret-keys | grep uid | cut -c4- | sed 's/^[ ]*//;' | \
+        while read line
+        do
+            echo " - $line"
+        done
+    fi
+}
+if [ "$skip_step" = false -a "$(basename $SHELL)" != "bash" ]
+then
+    echo "Please export the DEBEMAIL and DEBFULLNAME variables in your"
+    echo "shell's configuration file."
+    show_gpg_info
+    skip_step=true
+    await_response
+fi
+if [ "$skip_step" = false ]
+then
+    echo
+    echo "Please indicate your name and e-mail address. This information will"
+    echo "be added to your ~/.bashrc."
+    show_gpg_info
+    echo
+    echo -n "Full name (and comment): "
+    read line
+    echo "export DEBFULLNAME=\"$(echo $line | sed 's/^[ ]*//;s/[ ]*$//')\"" >> ~/.bashrc
+    echo -n "Valid e-mail address: "
+    read line
+    echo "export DEBEMAIL=\"$(echo $line | sed 's/^[ ]*//;s/[ ]*$//')\"" >> ~/.bashrc
+    echo
+fi
+separator2
+
+echo "Thank you!"
+separator1
+echo "If you've followed all instructions carefully, your system does now"
+echo "have the basic tools and configurations recommended for Ubuntu"
+echo "development."
+echo
+echo "Some resources which may be useful during your path are:"
+echo " - The Ubuntu Packaging Guide: http://wiki.ubuntu.com/PackagingGuide";
+echo " - The Ubuntu Developers IRC channel: #ubuntu-motu on irc.freenode.net"
+echo
+echo "May the source be with you!"

=== renamed file 'setup-packaging-environment' => 'setup-packaging-environment.moved'
=== added file 'setup.py'
--- setup.py	1970-01-01 00:00:00 +0000
+++ setup.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,55 @@
+#!/usr/bin/python
+
+from distutils.core import setup
+import os
+import re
+
+# look/set what version we have
+changelog = "debian/changelog"
+if os.path.exists(changelog):
+    head=open(changelog).readline()
+    match = re.compile(".*\((.*)\).*").match(head)
+    if match:
+        version = match.group(1)
+
+setup(name='ubuntu-dev-tools',
+      version=version,
+      scripts=['404main',
+               'check-symbols',
+               'dch-repeat',
+               'dgetlp',
+               'edit-patch',
+               'get-branches',
+               'get-build-deps',
+               'grab-attachments',
+               'grab-merge',
+               'hugdaylist',
+               'lp-project-upload',
+               'lp-set-dup',
+               'lp-shell',
+               'manage-credentials',
+               'massfile',
+               'merge-changelog',
+               'mk-sbuild',
+               'pbuilder-dist',
+               'pbuilder-dist-simple',
+               'pull-debian-debdiff',
+               'pull-debian-source',
+               'pull-lp-source',
+               'pull-revu-source',
+               'requestsync',
+               'reverse-build-depends',
+               'setup-packaging-environment',
+               'submittodebian',
+               'suspicious-source',
+#               'syncpackage',
+               'ubuntu-build',
+               'ubuntu-iso',
+               'update-maintainer',
+               'what-patch',
+            ],
+    packages=['ubuntutools',
+              'ubuntutools/lp',
+              'ubuntutools/requestsync',
+             ],
+)

=== renamed file 'setup.py' => 'setup.py.moved'
=== added file 'submittodebian'
--- submittodebian	1970-01-01 00:00:00 +0000
+++ submittodebian	2010-06-17 18:54:27 +0000
@@ -0,0 +1,116 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# submittodebian - tool to submit patches to Debian's BTS
+# Copyright (C) 2007, 2009 Canonical Ltd.
+# Author: Soren Hansen <soren@xxxxxxxxxx>,
+#         Steve Langasek <slangasek@xxxxxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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 2
+# 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.
+# 
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+
+import re, os, sys
+from tempfile import mkstemp
+
+try:
+	from debian_bundle.changelog import Changelog
+except ImportError:
+	print 'This utility requires modules from the «python-debian» package, which isn\'t currently installed.'
+	sys.exit(1)
+
+if not os.path.exists('/usr/bin/reportbug'):
+	print 'This utility requires the «reportbug» package, which isn\'t currently installed.'
+	sys.exit(1)
+
+def get_most_recent_debian_version(changelog):
+	for v in changelog.get_versions():
+		if not re.search('(ubuntu|build)', v.full_version):
+			return v.full_version
+
+def get_bug_body(changelog):
+	return '''In Ubuntu, we've applied the attached patch to achieve the following:
+%s
+We thought you might be interested in doing the same. 
+''' % ("\n".join([a for a in changelog._blocks[0].changes()]))
+
+def gen_debdiff(changelog):
+	pkg = changelog.package
+
+	oldver = changelog._blocks[1].version
+	newver = changelog._blocks[0].version
+
+	(fd, debdiff) = mkstemp()
+	os.close(fd)
+
+	if os.system('bzr diff -r tag:%s > /dev/null 2>&1' % oldver) == 256:
+		print "Extracting bzr diff between %s and %s" % (oldver, newver)
+		cmd = 'bzr diff -r tag:%s | filterdiff -x "*changelog*" > %s' % (oldver, debdiff)
+		run_cmd(cmd)
+	else:
+		if oldver.epoch is not None:
+			oldver = str(oldver)[str(oldver).index(":")+1:]
+		if newver.epoch is not None:
+			newver = str(newver)[str(newver).index(":")+1:]
+
+		olddsc = '../%s_%s.dsc' % (pkg, oldver)
+		newdsc = '../%s_%s.dsc' % (pkg, newver)
+
+		check_file(olddsc)
+		check_file(newdsc)
+
+		print "Generating debdiff between %s and %s" % (oldver, newver)
+		cmd = 'debdiff %s %s | filterdiff -x "*changelog*" > %s' % (olddsc, newdsc, debdiff)
+		run_cmd(cmd)
+
+	return debdiff
+
+def check_file(fname, critical = True):
+	if os.path.exists(fname):
+		return fname
+	else:
+		if not critical: return False
+		print "Couldn't find «%s».\n" % fname
+		sys.exit(1)
+
+def edit_debdiff(debdiff):
+	cmd = 'sensible-editor %s' % (debdiff)
+	run_cmd(cmd)
+
+def submit_bugreport(body, debdiff, changelog):
+	cmd = 'reportbug -P "User: ubuntu-devel@xxxxxxxxxxxxxxxx" -P "Usertags: origin-ubuntu maverick ubuntu-patch" -T patch -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package)
+	run_cmd(cmd)
+
+def run_cmd(cmd):
+	if os.getenv('DEBUG'):
+		print "%s\n" % cmd
+	os.system(cmd)
+
+changelog_file = check_file('debian/changelog', critical = False) or check_file('../debian/changelog')
+changelog = Changelog(file(changelog_file).read())
+
+deb_version = get_most_recent_debian_version(changelog)
+bug_body = get_bug_body(changelog)
+
+fd, body = mkstemp()
+fp = os.fdopen(fd, 'w')
+fp.write(bug_body)
+fp.close()
+
+debdiff = gen_debdiff(changelog)
+edit_debdiff(debdiff)
+submit_bugreport(body, debdiff, changelog)
+os.unlink(body)
+os.unlink(debdiff)

=== renamed file 'submittodebian' => 'submittodebian.moved'
=== added file 'suspicious-source'
--- suspicious-source	1970-01-01 00:00:00 +0000
+++ suspicious-source	2010-06-17 18:54:27 +0000
@@ -0,0 +1,61 @@
+#!/bin/bash
+#
+# Copyright 2007 (C) Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+# Based upon a script by Martin Pitt <martin.pitt@xxxxxxxxxx>
+#
+# 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.
+# 
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# This script outputs a list of files which are not common source files. This
+# should be run in the root of a source tree to find files which might not be
+# the "preferred form of modification" that the GPL and other licenses require.
+
+FILES="*.h *.c *.cc *.cpp *.py *.sh *.txt *.text *.3 *.m4 *.xml *.html *.php \
+       *.php3 *.php4 *.class *.form *.module  *.cfg *.conf *.config *.odt \
+       *.odp *.tex *.sla *.scd Makefile Makefile.am Makefile.in configure \
+       configure.ac  *.diff *.debdiff *.patch *.dpatch config.sub config.guess \
+       depcomp *.docbook  *.desktop *.menu AUTHORS INSTALL NEWS README TODO \
+       COPYING LICENSE ChangeLog *.ui *.glade *.gladep *.po *.pot *.ts *.pro \
+       *.svg *.png *.bmp *.gif *.xpm *.hh *.in *.cs *.1 *.2 *.3 *.4 *.5 *.6 \
+       *.7 *.8 *.9 *.hs *.el *.css"
+
+IGNORE=".bzr CVS .svn debian .git"
+
+
+COMMAND=(find ! \( )
+
+firstDone=False
+for pattern in $FILES
+do
+    if [[ $firstDone != True ]]; then
+        COMMAND+=( -name $pattern); firstDone=True
+    else
+        COMMAND+=( -o -name $pattern)
+    fi
+done
+
+COMMAND+=( \) \( )
+
+firstDone=False
+for pattern in $IGNORE
+do
+    if [[ $firstDone != True ]]; then
+        COMMAND+=( -name $pattern -prune); firstDone=True
+    else
+        COMMAND+=( -o -name $pattern -prune)
+    fi
+done
+
+COMMAND+=( -o -type f -print \))
+COMMAND="${COMMAND[@]}"
+
+$COMMAND    # Execute the command

=== renamed file 'suspicious-source' => 'suspicious-source.moved'
=== added file 'syncpackage'
--- syncpackage	1970-01-01 00:00:00 +0000
+++ syncpackage	2010-06-17 18:54:27 +0000
@@ -0,0 +1,116 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2008-2010 Martin Pitt <martin.pitt@xxxxxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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; version 3.
+# 
+# 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.
+#
+# See file /usr/share/common-licenses/GPL-3 for more details.
+#
+# ##################################################################
+
+import apt_pkg
+import os, os.path, sys, urllib, subprocess, shutil
+from ubuntutools.requestsync.lp import getUbuntuSrcPkg
+
+def retrieve_file(url):
+    '''Download file (by URL)  to the current directory.
+
+    If the file is already present, this function does nothing.'''
+
+    fname = os.path.basename(url)
+    if not os.path.exists(fname):
+	print 'downloading', url
+	urllib.urlretrieve(url, fname)
+
+def dsc_getfiles(dsc):
+    '''Return list of files in a .dsc file (excluding the .dsc file itself).'''
+
+    f = open(dsc)
+    files = []
+
+    # skip until 'Files:'
+    for l in f:
+	if l.strip() == 'Files:':
+	    break
+
+    for l in f:
+        if not l.startswith(' '):
+            continue
+	if l.strip() == '':
+	    break
+	fname = l.split()[2]
+	if not fname.endswith('.dsc'):
+	    files.append(fname)
+
+    f.close()
+    return files
+
+#
+# entry point
+#
+
+if len(sys.argv) != 3:
+    print 'Usage: syncpackage <.dsc URL or path> <target release>'
+    sys.exit (1)
+
+(dscurl, release) = sys.argv[1:]
+dscname = os.path.basename(dscurl)
+basepath = os.path.dirname(dscurl)
+(srcpkg, new_ver) = dscname.split('_')
+new_ver = new_ver[:-4] # strip off '.dsc'
+
+cur_ver = getUbuntuSrcPkg(srcpkg, release).getVersion()
+
+# No need to continue if version is not greater than current one
+apt_pkg.init()
+if not apt_pkg.check_dep(new_ver, '>', cur_ver):
+    raise Exception('%s version %s is not greater than already available %s' % (srcpkg, new_ver, cur_ver))
+
+retrieve_file(dscurl)
+files = dsc_getfiles(dscname)
+
+# do we need the orig.tar.gz?
+need_orig = True
+if cur_ver.find('-') > 0 and new_ver.find('-') > 0 and \
+    cur_ver.split('-')[0] == new_ver.split('-')[0]:
+    need_orig = False
+    #files = [f for f in files if not f.endswith('orig.tar.gz')]
+
+print 'Source %s: current version %s, new version %s' % (srcpkg, cur_ver, new_ver)
+print 'needs orig.tar.gz', need_orig
+print 'Files:', files
+for f in files:
+    retrieve_file(os.path.join(basepath, f))
+
+uidx = cur_ver.find('ubuntu')
+if uidx > 0:
+    cur_ver = cur_ver[:uidx]
+    print 'WARNING! Overwriting modified Ubuntu version, setting current version to', cur_ver
+
+uidx = cur_ver.find('build')
+if uidx > 0:
+    cur_ver = cur_ver[:uidx]
+
+orig_arg = ''
+if need_orig:
+    orig_arg = '-sa'
+
+# extract package, build Source
+assert subprocess.call(['dpkg-source', '-x', dscname]) == 0
+os.chdir(srcpkg + '-' + new_ver.split('-')[0])
+assert subprocess.call("dpkg-genchanges -q -S %s -v%s -e\"$(getent passwd $(id -u)|cut -f5 -d:|cut -f1 -d,) <$DEBEMAIL>\" | \
+    	sed 's/^Distribution:.*$/Distribution: %s/; 1 i\Origin: debian/unstable' > ../%s_%s_source.changes" % 
+	(orig_arg, cur_ver, release, srcpkg, new_ver), shell=True) == 0
+os.chdir('..')
+shutil.rmtree(srcpkg + '-' + new_ver.split('-')[0], True)
+assert subprocess.call("debsign %s_%s_source.changes" % (srcpkg, new_ver), shell=True) == 0

=== renamed file 'syncpackage' => 'syncpackage.moved'
=== added file 'ubuntu-build'
--- ubuntu-build	1970-01-01 00:00:00 +0000
+++ ubuntu-build	2010-06-17 18:54:27 +0000
@@ -0,0 +1,247 @@
+#!/usr/bin/python
+# 
+#   ubuntu-build - command line interface for Launchpad buildd operations.
+#
+#   Copyright (C) 2007 Canonical Ltd.
+#   Authors:
+#    - Martin Pitt <martin.pitt@xxxxxxxxxxxxx>
+#    - Jonathan Davies <jpds@xxxxxxxxxx>
+#    - Michael Bienia <geser@xxxxxxxxxx>
+#
+#   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, see <http://www.gnu.org/licenses/>.
+#
+
+# Our modules to import.
+import sys
+from optparse import OptionGroup
+from optparse import OptionParser
+from ubuntutools.lp.udtexceptions import (SeriesNotFoundException,
+        PackageNotFoundException, PocketDoesNotExistError,)
+from ubuntutools.lp.lpapicache import Distribution, PersonTeam
+from ubuntutools.misc import splitReleasePocket
+
+# Usage.
+usage = "%prog <srcpackage> <release> <operation>\n\n"
+usage += "Where operation may be one of: rescore, retry, or status.\n"
+usage += "Only Launchpad Buildd Admins may rescore package builds."
+
+# Valid architectures.
+valid_archs =  set(["armel", "amd64", "hppa", "i386",
+                "ia64", "lpia", "powerpc", "sparc"])
+
+# Prepare our option parser.
+optParser = OptionParser(usage)
+
+# Retry options 
+retryRescoreOptions = OptionGroup(optParser, "Retry and rescore options",
+    "These options may only be used with the 'retry' and 'rescore' operations.")
+retryRescoreOptions.add_option("-a", "--arch", type = "string",
+    action = "append", dest = "architecture",
+    help = "Rebuild or rescore a specific architecture. " \
+        "Valid architectures include: " \
+        "%s." % ", ".join(valid_archs))
+
+# Batch processing options
+batch_options = OptionGroup(
+	optParser, "Batch processing",
+	"These options and parameter ordering is only available in --batch mode.\n"
+	"Usage: ubuntu-build --batch [options] <package>...")
+batch_options.add_option(
+	'--batch', action = 'store_true', dest = 'batch', default = False,
+	help = 'Enable batch mode')
+batch_options.add_option(
+	'--series', action = 'store', dest = 'series', type = 'string',
+	help = 'Selects the Ubuntu series to operate on (default: current development series)')
+batch_options.add_option(
+	'--retry', action = 'store_true', dest = 'retry', default = False,
+	help = 'Retry builds (give-back).')
+batch_options.add_option(
+	'--rescore', action = 'store', dest = 'priority', type = 'int',
+	help = 'Rescore builds to <priority>.')
+batch_options.add_option(
+	'--arch2', action = 'append', dest = 'architecture', type = 'string',
+	help = "Affect only 'architecture' (can be used several times). "
+        "Valid architectures are: %s." % ', '.join(valid_archs))
+
+# Add the retry options to the main group.
+optParser.add_option_group(retryRescoreOptions)
+# Add the batch mode to the main group.
+optParser.add_option_group(batch_options)
+
+# Parse our options.
+(options, args) = optParser.parse_args()
+
+if not len(args):
+	optParser.print_help()
+	sys.exit(1)
+
+if not options.batch:
+	# Check we have the correct number of arguments.
+	if len(args) < 3:
+	    optParser.error("Incorrect number of arguments.")
+
+	try:
+	    package = str(args[0]).lower()
+	    release = str(args[1]).lower()
+	    op      = str(args[2]).lower()
+	except IndexError:
+	    optParser.print_help()
+	    sys.exit(1)
+
+	# Check our operation.
+	if op not in ("rescore", "retry", "status"):
+	    print >> sys.stderr, "Invalid operation: %s." % op
+	    sys.exit(1)
+
+	# If the user has specified an architecture to build, we only wish to rebuild it
+	# and nothing else.
+	if options.architecture:
+	    if options.architecture[0] not in valid_archs:
+		print >> sys.stderr, "Invalid architecture specified: %s." % options.architecture[0]
+		sys.exit(1)
+	    else:
+		oneArch = True
+	else:
+	    oneArch = False
+
+	# split release and pocket
+	try:
+		(release, pocket) = splitReleasePocket(release)
+	except PocketDoesNotExistError, e:
+		print 'E: %s' % e
+		sys.exit(1)
+
+	# Get the ubuntu archive
+	try:
+		ubuntu_archive = Distribution('ubuntu').getArchive()
+	# Will fail here if we have no credentials, bail out
+	except IOError:
+		sys.exit(1)
+	# Get list of published sources for package in question.
+	try:
+		sources = ubuntu_archive.getSourcePackage(package, release, pocket)
+		distroseries = Distribution('ubuntu').getSeries(release)
+	except (SeriesNotFoundException, PackageNotFoundException), e:
+	    print e
+	    sys.exit(1)
+	# Get list of builds for that package.
+	builds = sources.getBuilds()
+
+	# Find out the version and component in given release.
+	version = sources.getVersion()
+	component = sources.getComponent()
+
+	# Operations that are remaining may only be done by Ubuntu developers (retry)
+	# or buildd admins (rescore). Check if the proper permissions are in place.
+	me = PersonTeam.me
+	if op == "rescore": necessaryPrivs = me.isLpTeamMember('launchpad-buildd-admins')
+	if op == "retry": necessaryPrivs = me.canUploadPackage(
+		ubuntu_archive, distroseries, sources.getPackageName(), sources.getComponent())
+
+	if op in ('rescore', 'retry') and not necessaryPrivs:
+	    print >> sys.stderr, "You cannot perform the %s operation on a %s package " \
+		"as you do not have the permissions to do this action." % (op, component)
+	    sys.exit(1)
+
+	# Output details.
+	print "The source version for '%s' in %s (%s) is at %s." % (package,
+	    release.capitalize(), component, version)
+
+	print "Current build status for this package:"
+
+	# Output list of arches for package and their status.
+	done = False
+	for build in builds:
+	    if oneArch and build.arch_tag != options.architecture[0]:
+		# Skip this architecture.
+		continue
+
+	    done = True
+	    print "%s: %s." % (build.arch_tag, build.buildstate)
+	    if op == 'rescore':
+		if build.can_be_rescored:
+		    # FIXME: make priority an option
+		    priority = 5000
+		    print 'Rescoring build %s to %d...' % (build.arch_tag, priority)
+		    build.rescore(score = priority)
+		else:
+		    print 'Cannot rescore build on %s.' % build.arch_tag
+	    if op == 'retry':
+		if build.can_be_retried:
+		    print 'Retrying build on %s...' % build.arch_tag
+		    build.retry()
+		else:
+		    print 'Cannot retry build on %s.' % build.arch_tag
+
+
+	# We are done
+	if done: sys.exit(0)
+
+	print "No builds for '%s' found in the %s release - it may have been " \
+	      "built in a former release." % (package, release.capitalize())
+	sys.exit(0)
+
+# Batch mode
+
+if not options.architecture:
+	# no specific architectures specified, assume all valid ones
+	archs = valid_archs
+else:
+	archs = set(options.architecture)
+
+# filter out duplicate and invalid architectures
+archs.intersection_update(valid_archs)
+
+release = options.series or Distribution('ubuntu').getDevelopmentSeries().name
+try:
+    (release, pocket) = splitReleasePocket(release)
+except PocketDoesNotExistError, e:
+    print 'E: %s' % e
+    sys.exit(1)
+
+ubuntu_archive = Distribution('ubuntu').getArchive()
+try:
+	distroseries = Distribution('ubuntu').getSeries(release)
+except SeriesNotFoundException, e:
+	print e
+	sys.exit(1)
+me = PersonTeam.me
+
+# Check permisions (part 1): Rescoring can only be done by buildd admins
+can_rescore = options.priority and me.isLpTeamMember('launchpad-buildd-admins') or False
+if options.priority and not can_rescore:
+	print >> sys.stderr, "You don't have the permissions to rescore builds. Ignoring your rescore request."
+
+for pkg in args:
+	try:
+		pkg = ubuntu_archive.getSourcePackage(pkg, release, pocket)
+	except PackageNotFoundException, e:
+		print e
+		continue
+
+	# Check permissions (part 2): check upload permissions for the source package
+	can_retry = options.retry and me.canUploadPackage(ubuntu_archive, distroseries, pkg.getPackageName(), pkg.getComponent())
+	if options.retry and not can_retry:
+		print >> sys.stderr, "You don't have the permissions to retry the build of '%s'. Ignoring your request." % pkg.getPackageName()
+
+	print "The source version for '%s' in '%s' (%s) is: %s" % (
+			pkg.getPackageName(), release, pocket, pkg.getVersion())
+
+	print pkg.getBuildStates(archs)
+	if can_retry:
+		print pkg.retryBuilds(archs)
+	if options.priority and can_rescore:
+		print pkg.rescoreBuilds(archs, options.priority)
+
+	print ''

=== renamed file 'ubuntu-build' => 'ubuntu-build.moved'
=== added file 'ubuntu-iso'
--- ubuntu-iso	1970-01-01 00:00:00 +0000
+++ ubuntu-iso	2010-06-17 18:54:27 +0000
@@ -0,0 +1,60 @@
+#!/usr/bin/python
+
+# ubuntuiso - tool to examine Ubuntu CD (ISO) installation media
+# Copyright (C) 2008 Canonical Ltd.
+# Author: Matt Zimmerman <mdz@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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, version 2
+# of the License.
+# 
+# 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.
+# 
+# See file /usr/share/common-licenses/GPL-2 for more details.
+#
+# ##################################################################
+
+import sys
+import subprocess
+
+def extract(iso, path):
+	command = ['isoinfo', '-R', '-i', iso, '-x', path]
+	pipe = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+	stdout, stderr = pipe.communicate()
+
+	if pipe.returncode != 0:
+		raise Exception, stderr
+
+	return stdout
+
+def main():
+	isos = sys.argv[1:]
+	err = False
+
+	for iso in isos:
+		if len(isos) > 1:
+			prefix = '%s:' % iso
+		else:
+			prefix = ''
+
+		version = extract(iso, '/.disk/info')
+
+		if len(version) == 0:
+			print >>sys.stderr, '%s does not appear to be an Ubuntu ISO' % iso
+			err = True
+			continue
+
+		print prefix + version
+
+	if err:
+		sys.exit(1)
+
+if __name__ == '__main__':
+	main()
+	sys.exit(0)

=== renamed file 'ubuntu-iso' => 'ubuntu-iso.moved'
=== added directory 'ubuntutools'
=== renamed directory 'ubuntutools' => 'ubuntutools.moved'
=== added file 'ubuntutools/__init__.py'
--- ubuntutools/__init__.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/__init__.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+#
+# Ubuntu Development Tools
+# https://launchpad.net/ubuntu-dev-tools

=== added file 'ubuntutools/common.py'
--- ubuntutools/common.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/common.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,34 @@
+#
+# common.py - provides functions which are commonly used by the
+#             ubuntu-dev-tools package.
+#
+# Copyright (C) 2008 Jonathan Davies <jpds@xxxxxxxxxx>
+# Copyright (C) 2008 Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>
+#
+# Some of the functions are based upon code written by Martin Pitt
+# <martin.pitt@xxxxxxxxxx> and Kees Cook <kees@xxxxxxxxxx>.
+#
+# ##################################################################
+#
+# 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.
+#
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+
+import os
+import sys
+
+# Clear https_proxy env var as it's not supported in urllib/urllib2; see
+# LP #122551
+if os.environ.has_key('https_proxy'):
+    print >> sys.stderr, "Ignoring https_proxy (no support in urllib/urllib2; see LP #122551)"
+    del os.environ['https_proxy']

=== added directory 'ubuntutools/lp'
=== added file 'ubuntutools/lp/__init__.py'
--- ubuntutools/lp/__init__.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/lp/__init__.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,6 @@
+##
+##  ubuntu-dev-tools Launchpad Python modules.
+##
+
+service = 'edge'
+api_version = '1.0'

=== added file 'ubuntutools/lp/libsupport.py'
--- ubuntutools/lp/libsupport.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/lp/libsupport.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,144 @@
+#
+#   libsupport.py - functions which add launchpadlib support to the Ubuntu
+#                     Developer Tools package.
+#
+#   Copyright (C) 2009 Markus Korn <thekorn@xxxxxx>
+#
+#   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.
+#
+#   Please see the /usr/share/common-licenses/GPL file for the full text of
+#   the GNU General Public License license.
+#
+
+# Modules.
+import glob
+import os
+import sys
+import urllib
+import urlparse
+import httplib2
+
+try:
+    from launchpadlib.credentials import Credentials
+    from launchpadlib.launchpad import Launchpad
+    from launchpadlib.errors import HTTPError
+except ImportError:
+    print "Unable to import launchpadlib module, is python-launchpadlib installed?"
+    sys.exit(1)
+except:
+    Credentials = None
+    Launchpad = None
+
+from ubuntutools.lp import (service, api_version)
+
+def find_credentials(consumer, files, level=None):
+    """ search for credentials matching 'consumer' in path for given access level. """
+    if Credentials is None:
+        raise ImportError
+        
+    for f in files:
+        cred = Credentials()
+        try:
+            cred.load(open(f))
+        except:
+            continue
+        if cred.consumer.key == consumer:
+            return cred        
+    
+    raise IOError("No credentials found for '%s', please see the " \
+            "manage-credentials manpage for help on how to create " \
+            "one for this consumer." % consumer)
+    
+def get_credentials(consumer, cred_file=None, level=None):
+    files = list()
+
+    if cred_file:
+        files.append(cred_file)
+
+    if "LPCREDENTIALS" in os.environ:
+        files.append(os.environ["LPCREDENTIALS"])
+
+    files.append(os.path.join(os.getcwd(), "lp_credentials.txt"))
+
+    # Add all files which have our consumer name to file listing.
+    for x in glob.glob(os.path.expanduser("~/.cache/lp_credentials/%s*.txt" % \
+        consumer)):
+        files.append(x)
+
+    return find_credentials(consumer, files, level)
+    
+def get_launchpad(consumer, server=service, cache=None,
+                  cred_file=None, level=None):
+    credentials = get_credentials(consumer, cred_file, level)
+    cache = cache or os.environ.get("LPCACHE", None)
+    return Launchpad(credentials, server, cache, version=api_version)
+    
+def query_to_dict(query_string):
+    result = dict()
+    options = filter(None, query_string.split("&"))
+    for opt in options:
+        key, value = opt.split("=")
+        result.setdefault(key, set()).add(value)
+    return result
+        
+def translate_web_api(url, launchpad):
+    scheme, netloc, path, query, fragment = urlparse.urlsplit(url)
+    query = query_to_dict(query)
+    if not (("edge" in netloc and "edge" in str(launchpad._root_uri))
+        or ("staging" in netloc and "staging" in str(launchpad._root_uri))):
+        raise ValueError("url conflict (url: %s, root: %s" %(url, launchpad._root_uri))
+    if path.endswith("/+bugs"):
+        path = path[:-6]
+        if "ws.op" in query:
+            raise ValueError("Invalid web url, url: %s" %url)
+        query["ws.op"] = "searchTasks"
+    scheme, netloc, api_path, _, _ = urlparse.urlsplit(str(launchpad._root_uri))
+    query = urllib.urlencode(query)
+    url = urlparse.urlunsplit((scheme, netloc, api_path + path.lstrip("/"), query, fragment))
+    return url
+    
+def translate_api_web(self_url):
+    return self_url.replace("api.", "").replace("%s/" % (api_version), "")
+    
+LEVEL = {
+    0: "UNAUTHORIZED",
+    1: "READ_PUBLIC",
+    2: "WRITE_PUBLIC",
+    3: "READ_PRIVATE",
+    4: "WRITE_PRIVATE"
+}
+    
+def approve_application(credentials, email, password, level, web_root,
+        context):
+    authorization_url = credentials.get_request_token(context, web_root)
+    if level in LEVEL:
+        level = 'field.actions.%s' %LEVEL[level]
+    elif level in LEVEL.values():
+        level = 'field.actions.%s' %level
+    elif str(level).startswith("field.actions") and str(level).split(".")[-1] in LEVEL:
+        pass
+    else:
+        raise ValueError("Unknown access level '%s'" %level)
+
+    params = {level: 1,
+        "oauth_token": credentials._request_token.key,
+        "lp.context": context or ""}
+           
+    lp_creds = ":".join((email, password))
+    basic_auth = "Basic %s" %(lp_creds.encode('base64'))
+    headers = {'Authorization': basic_auth}
+    response, content = httplib2.Http().request(authorization_url,
+        method="POST", body=urllib.urlencode(params), headers=headers)
+    if int(response["status"]) != 200:
+        if not 300 <= int(response["status"]) <= 400: # this means redirection
+            raise HTTPError(response, content)
+    credentials.exchange_request_token_for_access_token(web_root)
+    return credentials

=== added file 'ubuntutools/lp/lpapicache.py'
--- ubuntutools/lp/lpapicache.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/lp/lpapicache.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,519 @@
+# -*- coding: utf-8 -*-
+#
+#   lpapicache.py - wrapper classes around the LP API implementing caching
+#                   for usage in the ubuntu-dev-tools package
+#
+#   Copyright © 2009-2010 Michael Bienia <geser@xxxxxxxxxx>
+#
+#   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.
+#
+#   Please see the /usr/share/common-licenses/GPL file for the full text
+#   of the GNU General Public License license.
+#
+#   Based on code written by Jonathan Davies <jpds@xxxxxxxxxx>
+
+# Uncomment for tracing LP API calls
+#import httplib2
+#httplib2.debuglevel = 1
+
+import sys
+
+import launchpadlib.launchpad as launchpad
+from launchpadlib.errors import HTTPError
+from launchpadlib.uris import lookup_service_root
+from lazr.restfulclient.resource import Entry
+
+import ubuntutools.lp.libsupport as libsupport
+from ubuntutools.lp import (service, api_version)
+from ubuntutools.lp.udtexceptions import *
+
+__all__ = [
+    'Archive',
+    'Build',
+    'Distribution',
+    'DistributionSourcePackage',
+    'DistroSeries',
+    'Launchpad',
+    'PersonTeam',
+    'SourcePackagePublishingHistory',
+    ]
+
+class Launchpad(object):
+    '''Singleton for LP API access.'''
+
+    def login(self):
+        '''Enforce a non-anonymous login.'''
+        if '_Launchpad__lp' not in self.__dict__:
+            try:
+                self.__lp = libsupport.get_launchpad('ubuntu-dev-tools')
+            except IOError, error:
+                print >> sys.stderr, 'E: %s' % error
+                raise
+        else:
+            raise AlreadyLoggedInError('Already logged in to Launchpad.')
+
+    def login_anonymously(self):
+        '''Enforce an anonymous login.'''
+        if '_Launchpad__lp' not in self.__dict__:
+            self.__lp = launchpad.Launchpad.login_anonymously('ubuntu-dev-tools',
+                    service_root=service, version=api_version)
+        else:
+            raise AlreadyLoggedInError('Already logged in to Launchpad.')
+
+    def __getattr__(self, attr):
+        if '_Launchpad__lp' not in self.__dict__:
+            self.login()
+        return getattr(self.__lp, attr)
+
+    def __call__(self):
+        return self
+Launchpad = Launchpad()
+
+
+class MetaWrapper(type):
+	'''
+	A meta class used for wrapping LP API objects.
+	'''
+	def __init__(cls, name, bases, attrd):
+		super(MetaWrapper, cls).__init__(name, bases, attrd)
+		if 'resource_type' not in attrd:
+			raise TypeError('Class "%s" needs an associated resource type' % name)
+		cls._cache = dict()
+
+
+class BaseWrapper(object):
+	'''
+	A base class from which other wrapper classes are derived.
+	'''
+	__metaclass__ = MetaWrapper
+	resource_type = None # it's a base class after all
+
+	def __new__(cls, data):
+		if isinstance(data, basestring) and data.startswith('%s%s/' % (lookup_service_root(service), api_version)):
+			# looks like a LP API URL
+			# check if it's already cached
+			cached = cls._cache.get(data)
+			if cached:
+				return cached
+
+			# not cached, so try to get it
+			try:
+				data = Launchpad.load(data)
+			except HTTPError:
+				# didn't work
+				pass
+
+		if isinstance(data, Entry):
+			if data.resource_type_link in cls.resource_type:
+				# check if it's already cached
+				cached = cls._cache.get(data.self_link)
+				if not cached:
+					# create a new instance
+					cached = object.__new__(cls)
+					cached._lpobject = data
+					# and add it to our cache
+					cls._cache[data.self_link] = cached
+					# add additional class specific caching (if available)
+					cache = getattr(cls, 'cache', None)
+					if callable(cache):
+						cache(cached)
+				return cached
+			else:
+				raise TypeError("'%s' is not a '%s' object" % (str(data), str(cls.resource_type)))
+		else:
+			# not a LP API representation, let the specific class handle it
+			fetch = getattr(cls, 'fetch', None)
+			if callable(fetch):
+				return fetch(data)
+			else:
+				raise NotImplementedError("Don't know how to fetch '%s' from LP" % str(data))
+	
+	def __call__(self):
+		return self._lpobject
+
+	def __getattr__(self, attr):
+		return getattr(self._lpobject, attr)
+
+        def __repr__(self):
+            if hasattr(str, 'format'):
+                return '<{0}: {1!r}>'.format(self.__class__.__name__, self._lpobject)
+            else:
+                return '<%s: %r>' % (self.__class__.__name__, self._lpobject)
+
+class Distribution(BaseWrapper):
+	'''
+	Wrapper class around a LP distribution object.
+	'''
+	resource_type = lookup_service_root(service) + api_version + '/#distribution'
+
+	def __init__(self, *args):
+		# Don't share _series and _archives between different Distributions
+		if '_series' not in self.__dict__:
+			self._series = dict()
+		if '_archives' not in self.__dict__:
+			self._archives = dict()
+
+	def cache(self):
+		self._cache[self.name] = self
+
+	@classmethod
+	def fetch(cls, dist):
+		'''
+		Fetch the distribution object identified by 'dist' from LP.
+		'''
+		if not isinstance(dist, basestring):
+			raise TypeError("Don't know what do with '%r'" % dist)
+		cached = cls._cache.get(dist)
+		if not cached:
+			cached = Distribution(Launchpad.distributions[dist])
+		return cached
+
+	def getArchive(self, archive = None):
+		'''
+		Returns an Archive object for the requested archive.
+		Raises a ArchiveNotFoundException if the archive doesn't exist.
+
+		If 'archive' is None, return the main archive.
+		'''
+		if archive:
+			res = self._archives.get(archive)
+
+			if not res:
+				for a in self.archives:
+					if a.name == archive:
+						res = Archive(a)
+						self._archives[res.name] = res
+						break
+
+			if res:
+				return res
+			else:
+				raise ArchiveNotFoundException("The Archive '%s' doesn't exist in %s" % (archive, self.display_name))
+		else:
+			if not '_main_archive' in self.__dict__:
+				self._main_archive = Archive(self.main_archive_link)
+			return self._main_archive
+
+	def getSeries(self, name_or_version):
+		'''
+		Returns a DistroSeries object for a series passed by name
+		(e.g. 'karmic') or version (e.g. '9.10').
+		If the series is not found: raise SeriesNotFoundException
+		'''
+		if name_or_version not in self._series:
+			try:
+				series = DistroSeries(self().getSeries(name_or_version = name_or_version))
+				# Cache with name and version
+				self._series[series.name] = series
+				self._series[series.version] = series
+			except HTTPError:
+				raise SeriesNotFoundException("Release '%s' is unknown in '%s'." % (name_or_version, self.display_name))
+		return self._series[name_or_version]
+
+	def getDevelopmentSeries(self):
+		'''
+		Returns a DistroSeries object of the current development series.
+		'''
+		dev = DistroSeries(self.current_series_link)
+		# Cache it in _series if not already done
+		if dev.name not in self._series:
+			self._series[dev.name] = dev
+			self._series[dev.version] = dev
+		return dev
+
+
+class DistroSeries(BaseWrapper):
+	'''
+	Wrapper class around a LP distro series object.
+	'''
+	resource_type = lookup_service_root(service) + api_version + '/#distro_series'
+
+
+class Archive(BaseWrapper):
+	'''
+	Wrapper class around a LP archive object.
+	'''
+	resource_type = lookup_service_root(service) + api_version + '/#archive'
+
+	def __init__(self, *args):
+		# Don't share _srcpkgs between different Archives
+		if '_srcpkgs' not in self.__dict__:
+			self._srcpkgs = dict()
+
+	def getSourcePackage(self, name, series = None, pocket = 'Release'):
+		'''
+		Returns a SourcePackagePublishingHistory object for the most
+		recent source package in the distribution 'dist', series and
+		pocket.
+
+		series defaults to the current development series if not specified.
+
+		If the requested source package doesn't exist a
+		PackageNotFoundException is raised.
+		'''
+		# Check if pocket has a valid value
+		if pocket not in ('Release', 'Security', 'Updates', 'Proposed', 'Backports'):
+			raise PocketDoesNotExistError("Pocket '%s' does not exist." % pocket)
+
+		dist = Distribution(self.distribution_link)
+		# Check if series is already a DistoSeries object or not
+		if not isinstance(series, DistroSeries):
+			if series:
+				series = dist.getSeries(series)
+			else:
+				series = dist.getDevelopmentSeries()
+
+		# NOTE:
+		# For Debian all source publication are in the state 'Pending' so filter on this
+		# instead of 'Published'. As the result is sorted also by date the first result
+		# will be the most recent one (i.e. the one we are interested in).
+		if dist.name in ('debian',):
+			state = 'Pending'
+		else:
+			state = 'Published'
+
+		if (name, series.name, pocket) not in self._srcpkgs:
+			try:
+				srcpkg = self.getPublishedSources(
+						source_name = name, distro_series = series(), pocket = pocket,
+						status = state, exact_match = True)[0]
+				self._srcpkgs[(name, series.name, pocket)] = SourcePackagePublishingHistory(srcpkg)
+			except IndexError:
+				if pocket == 'Release':
+					msg = "The package '%s' does not exist in the %s %s archive in '%s'" % \
+						(name, dist.display_name, self.name, series.name)
+				else:
+					msg = "The package '%s' does not exist in the %s %s archive in '%s-%s'" % \
+						(name, dist.display_name, self.name, series.name, pocket.lower())
+				raise PackageNotFoundException(msg)
+
+		return self._srcpkgs[(name, series.name, pocket)]
+
+
+class SourcePackagePublishingHistory(BaseWrapper):
+	'''
+	Wrapper class around a LP source package object.
+	'''
+	resource_type = lookup_service_root(service) + api_version + '/#source_package_publishing_history'
+
+	def __init__(self, *args):
+		# Don't share _builds between different SourcePackagePublishingHistory objects
+		if '_builds' not in self.__dict__:
+			self._builds = dict()
+
+	def getPackageName(self):
+		'''
+		Returns the source package name.
+		'''
+		return self._lpobject.source_package_name
+
+	def getVersion(self):
+		'''
+		Returns the version of the source package.
+		'''
+		return self._lpobject.source_package_version
+
+	def getComponent(self):
+		'''
+		Returns the component of the source package.
+		'''
+		return self._lpobject.component_name
+
+	def _fetch_builds(self):
+		'''Populate self._builds with the build records.'''
+		builds = self.getBuilds()
+		for build in builds:
+			self._builds[build.arch_tag] = Build(build)
+
+	def getBuildStates(self, archs):
+		res = list()
+
+		if not self._builds:
+			self._fetch_builds()
+
+		for arch in archs:
+			build = self._builds.get(arch)
+			if build:
+				res.append('  %s' % build)
+		return "Build state(s) for '%s':\n%s" % (
+			self.getPackageName(), '\n'.join(res))
+
+	def rescoreBuilds(self, archs, score):
+		res = list()
+
+		if not self._builds:
+			self._fetch_builds()
+
+		for arch in archs:
+			build = self._builds.get(arch)
+			if build:
+				if build.rescore(score):
+					res.append('  %s: done' % arch)
+				else:
+					res.append('  %s: failed' % arch)
+		return "Rescoring builds of '%s' to %i:\n%s" % (
+			self.getPackageName(), score, '\n'.join(res))
+
+	def retryBuilds(self, archs):
+		res = list()
+
+		if not self._builds:
+			self._fetch_builds()
+
+		for arch in archs:
+			build = self._builds.get(arch)
+			if build:
+				if build.retry():
+					res.append('  %s: done' % arch)
+				else:
+					res.append('  %s: failed' % arch)
+		return "Retrying builds of '%s':\n%s" % (
+			self.getPackageName(), '\n'.join(res))
+
+
+class MetaPersonTeam(MetaWrapper):
+    @property
+    def me(cls):
+        '''The PersonTeam object of the currently authenticated LP user or
+        None when anonymously logged in.
+        '''
+        if '_me' not in cls.__dict__:
+            try:
+                cls._me = PersonTeam(Launchpad.me)
+            except HTTPError, error:
+                if error.response.status == 401:
+                    # Anonymous login
+                    cls._me  = None
+                else:
+                    raise
+        return cls._me
+
+class PersonTeam(BaseWrapper):
+	'''
+	Wrapper class around a LP person or team object.
+	'''
+        __metaclass__ = MetaPersonTeam
+
+	resource_type = (
+            lookup_service_root(service) + api_version + '/#person',
+            lookup_service_root(service) + api_version + '/#team',
+            )
+
+	def __init__(self, *args):
+		# Don't share _upload_{pkg,comp} between different PersonTeams
+		if '_upload_pkg' not in self.__dict__:
+			self._upload_pkg = dict()
+		if '_upload_comp' not in self.__dict__:
+			self._upload_comp = dict()
+
+	def __str__(self):
+		return u'%s (%s)' % (self.display_name, self.name)
+
+	def cache(self):
+		self._cache[self.name] = self
+
+	@classmethod
+	def fetch(cls, person_or_team):
+		'''
+		Fetch the person or team object identified by 'url' from LP.
+		'''
+		if not isinstance(person_or_team, basestring):
+			raise TypeError("Don't know what do with '%r'" % person_or_team)
+		cached = cls._cache.get(person_or_team)
+		if not cached:
+			cached = PersonTeam(Launchpad.people[person_or_team])
+		return cached
+
+	def isLpTeamMember(self, team):
+		'''
+		Checks if the user is a member of a certain team on Launchpad.
+
+		Returns True if the user is a member of the team otherwise False.
+		'''
+		return any(t.name == team for t in self.super_teams)
+
+	def canUploadPackage(self, archive, distroseries, package, component):
+		'''Check if the person or team has upload rights for the source
+                package to the specified 'archive' and 'distrorelease' either
+                through package sets, component or or per-package upload rights.
+		Either a source package name or a component has the specified.
+
+		'archive' has to be a Archive object.
+                'distroseries' has to be an DistroSeries object.
+		'''
+		if not isinstance(archive, Archive):
+			raise TypeError("'%r' is not an Archive object." % archive)
+                if not isinstance(distroseries, DistroSeries):
+                        raise TypeError("'%r' is not a DistroSeries object." % distroseries)
+		if package is not None and not isinstance(package, basestring):
+			raise TypeError('A source package name expected.')
+		if component is not None and not isinstance(component, basestring):
+			raise TypeError('A component name expected.')
+		if package is None and component is None:
+			raise ValueError('Either a source package name or a component has to be specified.')
+
+		upload_comp = self._upload_comp.get((archive, component))
+		upload_pkg = self._upload_pkg.get((archive, package))
+
+		if upload_comp is None and upload_pkg is None:
+                        # archive.isSourceUploadAllowed() checks only package sets permission
+                        if package is not None and archive.isSourceUploadAllowed(
+                            distroseries=distroseries(), person=self(), sourcepackagename=package):
+                                # TODO: also cache the release it applies to
+                                self._upload_pkg[(archive, package)] = True
+                                return True
+                        # check for component or per-package upload rights
+			for perm in archive.getPermissionsForPerson(person=self()):
+				if perm.permission != 'Archive Upload Rights':
+					continue
+				if component and perm.component_name == component:
+					self._upload_comp[(archive, component)] = True
+					return True
+				if package and perm.source_package_name == package:
+					self._upload_pkg[(archive, package)] = True
+					return True
+			# don't have upload rights
+			if package:
+				self._upload_pkg[(archive, package)] = False
+			if component:
+				self._upload_comp[(archive, component)] = False
+			return False
+		else:
+			return upload_comp or upload_pkg
+
+
+class Build(BaseWrapper):
+	'''
+	Wrapper class around a build object.
+	'''
+	resource_type = lookup_service_root(service) + api_version + '/#build'
+
+	def __str__(self):
+		return u'%s: %s' % (self.arch_tag, self.buildstate)
+
+	def rescore(self, score):
+		if self.can_be_rescored:
+			self().rescore(score = score)
+			return True
+		return False
+
+	def retry(self):
+		if self.can_be_retried:
+			self().retry()
+			return True
+		return False
+
+
+class DistributionSourcePackage(BaseWrapper):
+	'''
+	Caching class for distribution_source_package objects.
+	'''
+	resource_type = lookup_service_root(service) + api_version + '/#distribution_source_package'

=== added file 'ubuntutools/lp/udtexceptions.py'
--- ubuntutools/lp/udtexceptions.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/lp/udtexceptions.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,19 @@
+class PackageNotFoundException(BaseException):
+	""" Thrown when a package is not found """
+	pass
+		
+class SeriesNotFoundException(BaseException):
+	""" Thrown when a distroseries is not found """
+	pass
+
+class PocketDoesNotExistError(Exception):
+	'''Raised when a invalid pocket is used.'''
+	pass
+
+class ArchiveNotFoundException(BaseException):
+	""" Thrown when an archive for a distibution is not found """
+	pass
+
+class AlreadyLoggedInError(Exception):
+    '''Raised when a second login is attempted.'''
+    pass

=== added file 'ubuntutools/misc.py'
--- ubuntutools/misc.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/misc.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,117 @@
+#
+# misc.py - misc functions for the Ubuntu Developer Tools scripts.
+#
+# Copyright (C) 2008 Jonathan Davies <jpds@xxxxxxxxxx>
+# Copyright (C) 2008-2009 Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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.
+#
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+
+# Modules.
+import os
+
+from ubuntutools.lp.udtexceptions import PocketDoesNotExistError
+
+def system_distribution():
+    """ system_distro() -> string
+    
+    Detect the system's distribution and return it as a string. If the
+    name of the distribution can't be determined, print an error message
+    and return None.
+    
+    """
+    # We try to avoid calling the "lsb_release" as looking up the value
+    # directly is faster. However, Debian doesn't have /etc/lsb-release
+    # so we need to fallback to the former there.
+    if os.path.isfile('/etc/lsb-release'):
+        for line in open('/etc/lsb-release'):
+            line = line.strip()
+            if line.startswith('DISTRIB_CODENAME'):
+                return line[17:]
+    else:
+        import commands
+        output = commands.getoutput('lsb_release -cs')
+        if output:
+            return output
+    print 'Error: Could not determine what distribution you are running.'
+    return None
+
+def host_architecture():
+    """ host_architecture -> string
+    
+    Detect the host's architecture and return it as a string
+    (i386/amd64/other values). If the architecture can't be determined,
+    print an error message and return None.
+    
+    """
+    
+    arch = os.uname()[4].replace('x86_64', 'amd64').replace('i586', 'i386'
+        ).replace('i686', 'i386')
+    
+    if not arch or 'not found' in arch:
+        print 'Error: Not running on a Debian based system; could not ' \
+            'detect its architecture.'
+        return None
+    
+    return arch
+
+def readlist(filename, uniq=True):
+    """ readlist(filename, uniq) -> list
+    
+    Read a list of words from the indicated file. If 'uniq' is True, filter
+    out duplicated words.
+    
+    """
+    
+    if not os.path.isfile(filename):
+        print 'File "%s" does not exist.' % filename
+        return False
+    
+    content = open(filename).read().replace('\n', ' ').replace(',', ' ')
+    
+    if not content.strip():
+        print 'File "%s" is empty.' % filename
+        return False
+    
+    items = [item for item in content.split() if item]
+    
+    if uniq:
+        items = list(set(items))
+    
+    return items
+
+def splitReleasePocket(release):
+    '''Splits the release and pocket name.
+
+    If the argument doesn't contain a pocket name then the 'Release' pocket
+    is assumed.
+
+    Returns the release and pocket name.
+    '''
+    pocket = 'Release'
+
+    if release is None:
+        raise ValueError('No release name specified')
+
+    if '-' in release:
+        (release, pocket) = release.split('-')
+        pocket = pocket.capitalize()
+
+        if pocket not in ('Release', 'Security', 'Updates', 'Proposed',
+                'Backports'):
+            raise PocketDoesNotExistError("Pocket '%s' does not exist." % pocket)
+
+    return (release, pocket)

=== added file 'ubuntutools/packages.py'
--- ubuntutools/packages.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/packages.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,117 @@
+#
+#   packages.py - functions related to Ubuntu source packages and releases.
+#
+#   Copyright (C) 2008 Jonathan Davies <jpds@xxxxxxxxxx>
+#   Copyright (C) 2008 Siegfried-Angel Gevatter Pujals <rainct@xxxxxxxxxx>
+#
+#   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.
+#
+#   Please see the /usr/share/common-licenses/GPL file for the full text of
+#   the GNU General Public License license.
+#
+
+# Modules.
+import re
+import subprocess
+import sys
+import urllib2
+
+def checkReleaseExists(release):
+    """
+        Check that an Ubuntu release exists by opening
+        https://launchpad.net/ubuntu/releaseName page on Launchpad.
+
+        If an error is returned; the release does not exist.
+    """
+    release = release.split('-')[0] # Remove pocket
+    try:
+        urllib2.urlopen("https://launchpad.net/ubuntu/%s"; % release)
+    except urllib2.HTTPError:
+        print >> sys.stderr, "The Ubuntu '%s' release does not appear to " \
+            "exist on Launchpad." % release
+        sys.exit(1)
+    except urllib2.URLError, error: # Other error (NXDOMAIN, ...)
+        (_, reason) = error.reason
+        print >> sys.stderr, "Error while checking for Ubuntu '%s' " \
+            "release on Launchpad: %s." % (release, reason)
+        sys.exit(1)
+
+def checkSourceExists(package, release):
+    """
+        Check that a package exists by opening its
+        https://launchpad.net/ubuntu/+source/package page.
+        
+        Return the package's page URL and it's current version in the requested
+        release.
+    """
+    if '-' in release:
+        (release, pocket) = release.split('-', 1)
+    else:
+        pocket = 'release'
+
+    try:
+        page = urllib2.urlopen('https://launchpad.net/ubuntu/+source/' + package).read()
+
+        m = re.search('<td>%s</td>\s*\n.*"/ubuntu/%s/\+source/%s/(\d[^"]+)"' % (
+                pocket, release, package.replace('+', '\+')), page)
+        if not m:
+            print >> sys.stderr, "Unable to find source package '%s' in " \
+                "the %s-%s pocket." % (package, release.capitalize(), pocket)
+            sys.exit(1)
+    except urllib2.HTTPError, error: # Raised on 404.
+        if error.code == 404:
+            print >> sys.stderr, "The source package '%s' does not appear to " \
+                "exist in Ubuntu." % package
+        else: # Other error code, probably Launchpad malfunction.
+            print >> sys.stderr, "Error while checking Launchpad for Ubuntu " \
+                "package: %s." % error.code
+        sys.exit(1) # Exit. Error encountered.
+    except urllib2.URLError, error: # Other error (NXDOMAIN, ...)
+        (_, reason) = error.reason
+        print >> sys.stderr, "Error while checking Launchpad for Ubuntu " \
+            "package: %s." % reason
+        sys.exit(1)
+
+    # Get package version.
+    version = m.group(1)
+
+    return page, version
+
+def packageComponent(package, release):
+    """
+        Use rmadison to see which component a package is in.
+    """
+    madison = subprocess.Popen(['rmadison', '-u', 'ubuntu', '-a', 'source', \
+        '-s', release, package], stdout = subprocess.PIPE)
+    out = madison.communicate()[0]
+    assert (madison.returncode == 0)
+    
+    for l in out.splitlines():
+        (pkg, version, rel, builds) = l.split('|')
+        component = 'main'
+        if rel.find('/') != -1: 
+            component = rel.split('/')[1]
+
+    return component.strip()
+
+def checkIsInDebian(package, distro):
+    madison = subprocess.Popen(['rmadison', '-u', 'debian', '-a', 'source', \
+                                '-s', distro, package], \
+                               stdout=subprocess.PIPE)
+    out = madison.communicate()[0]
+    assert (madison.returncode == 0)
+
+    try:
+        assert out
+    except AssertionError:
+        out = False
+    
+    return out

=== added directory 'ubuntutools/requestsync'
=== added file 'ubuntutools/requestsync/__init__.py'
=== added file 'ubuntutools/requestsync/common.py'
--- ubuntutools/requestsync/common.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/requestsync/common.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,133 @@
+# -*- coding: utf-8 -*-
+#
+#   common.py - common methods used by requestsync
+#
+#   Copyright © 2009 Michael Bienia <geser@xxxxxxxxxx>
+#
+#   This module may contain code written by other authors/contributors to
+#   the main requestsync script. See there for their names.
+#
+#   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; version 2
+# 
+#   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.
+#
+#   Please see the /usr/share/common-licenses/GPL-2 file for the full text
+#   of the GNU General Public License license.
+
+import os
+import sys
+import urllib2
+import re
+import tempfile
+import subprocess
+from debian_bundle.changelog import Changelog
+
+def raw_input_exit_on_ctrlc(*args, **kwargs):
+	'''
+	A wrapper around raw_input() to exit with a normalized message on Control-C
+	'''
+	try:
+		return raw_input(*args, **kwargs)
+	except KeyboardInterrupt:
+		print '\nAbort requested. No sync request filed.'
+		sys.exit(1)
+
+def getDebianChangelog(srcpkg, version):
+	'''
+	Return the new changelog entries upto 'version'.
+	'''
+	pkgname = srcpkg.getPackageName()
+	pkgversion = srcpkg.getVersion()
+	component = srcpkg.getComponent()
+	if pkgname.startswith('lib'):
+		subdir = 'lib%s' % pkgname[3]
+	else:
+		subdir = pkgname[0]
+	# Strip epoch from version
+	if ':' in pkgversion:
+		pkgversion = pkgversion[pkgversion.find(':')+1:]
+
+	# Get the debian changelog file from packages.debian.org
+	try:
+		changelog = urllib2.urlopen(
+			'http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog.txt' % \
+			(component, subdir, pkgname, pkgname, pkgversion))
+	except urllib2.HTTPError, error:
+		print >> sys.stderr, 'Unable to connect to packages.debian.org: %s' % error
+		return None
+
+	new_entries = ''
+	changelog = Changelog(changelog.read())
+	# see also Debian #539334
+	for block in changelog._blocks:
+		if block.version > version:
+			# see also Debian #561805
+			new_entries += unicode(str(block).decode('utf-8'))
+
+	return new_entries
+
+def edit_report(subject, body, changes_required = False):
+	'''
+	Ask if the user wants to edit a report (consisting of subject and body)
+	in sensible-editor.
+
+	If changes_required is True then the file has to be edited before we
+	can proceed.
+
+	Returns (new_subject, new_body).
+	'''
+
+	editing_finished = False
+	while not editing_finished:
+		report = 'Summary (one line):\n%s\n\nDescription:\n%s' % (subject, body)
+
+		if not changes_required:
+			print 'Currently the report looks as follows:\n%s' % report
+			while True:
+				val = raw_input_exit_on_ctrlc('Do you want to edit the report [y/N]? ')
+				if val.lower() in ('y', 'yes'):
+					break
+				elif val.lower() in ('n', 'no', ''):
+					editing_finished = True
+					break
+				else:
+					print 'Invalid answer.'
+
+		if not editing_finished:
+			# Create tempfile and remember mtime
+			report_file = tempfile.NamedTemporaryFile(prefix='requestsync_')
+			report_file.write(report.encode('utf-8'))
+			report_file.flush()
+			mtime_before = os.stat(report_file.name).st_mtime
+
+			# Launch editor
+			try:
+				editor = subprocess.check_call(['sensible-editor', report_file.name])
+			except subprocess.CalledProcessError, e:
+				print >> sys.stderr, 'Error calling sensible-editor: %s\nAborting.' % e
+				sys.exit(1)
+
+			# Check if the tempfile has been changed
+			if changes_required:
+				if mtime_before == os.stat(report_file.name).st_mtime:
+					print 'The report has not been changed, but you have to explain why ' \
+						'the Ubuntu changes can be dropped.'
+					raw_input_exit_on_ctrlc('Press [Enter] to retry or [Control-C] to abort. ')
+				else:
+					changes_required = False
+
+			report_file.seek(0)
+			report = report_file.read().decode('utf-8')
+			report_file.close()
+
+			# Undecorate report again
+			(subject, body) = report.split("\nDescription:\n", 1)
+			# Remove prefix and whitespace from subject
+			subject = re.sub('^Summary \(one line\):\s*', '', subject, 1).strip()
+
+	return (subject, body)

=== added file 'ubuntutools/requestsync/lp.py'
--- ubuntutools/requestsync/lp.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/requestsync/lp.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,115 @@
+# -*- coding: utf-8 -*-
+#
+#   lp.py - methods used by requestsync while interacting
+#           directly with Launchpad
+#
+#   Copyright © 2009 Michael Bienia <geser@xxxxxxxxxx>
+#
+#   This module may contain code written by other authors/contributors to
+#   the main requestsync script. See there for their names.
+#
+#   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; version 2
+# 
+#   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.
+#
+#   Please see the /usr/share/common-licenses/GPL-2 file for the full text
+#   of the GNU General Public License license.
+
+from ubuntutools.requestsync.common import raw_input_exit_on_ctrlc
+from ubuntutools.lp.lpapicache import Launchpad, Distribution, PersonTeam, DistributionSourcePackage
+from ubuntutools.lp.libsupport import translate_api_web
+
+def getDebianSrcPkg(name, release):
+	debian = Distribution('debian')
+	debian_archive = debian.getArchive()
+
+	# Map 'unstable' and 'testing' to their codenames as LP knows only them
+	codenames = {
+		'unstable': 'sid',
+		'testing': 'squeeze', # Needs updating after each Debian release
+	}
+	release = codenames.get(release, release)
+
+	return debian_archive.getSourcePackage(name, release)
+
+def getUbuntuSrcPkg(name, release):
+	ubuntu = Distribution('ubuntu')
+	ubuntu_archive = ubuntu.getArchive()
+
+	return ubuntu_archive.getSourcePackage(name, release)
+
+def needSponsorship(name, component, release):
+	'''
+	Check if the user has upload permissions for either the package
+	itself or the component
+	'''
+	archive = Distribution('ubuntu').getArchive()
+        distroseries = Distribution('ubuntu').getSeries(release)
+
+	need_sponsor = not PersonTeam.me.canUploadPackage(archive, distroseries, name, component)
+	if need_sponsor:
+		print '''You are not able to upload this package directly to Ubuntu.
+Your sync request shall require an approval by a member of the appropriate
+sponsorship team, who shall be subscribed to this bug report.
+This must be done before it can be processed by a member of the Ubuntu Archive
+team.'''
+		raw_input_exit_on_ctrlc('If the above is correct please press [Enter] ')
+
+	return need_sponsor
+
+def checkExistingReports(srcpkg):
+	'''
+	Check existing bug reports on Launchpad for a possible sync request.
+
+	If found ask for confirmation on filing a request.
+	'''
+
+	# Fetch the package's bug list from Launchpad
+	pkg = Distribution('ubuntu').getSourcePackage(name = srcpkg)
+	pkgBugList = pkg.getBugTasks()
+
+	# Search bug list for other sync requests.
+	for bug in pkgBugList:
+		# check for Sync or sync and the package name
+		if not bug.is_complete and 'ync %s' % srcpkg in bug.title:
+			print 'The following bug could be a possible duplicate sync bug on Launchpad:'
+			print ' * %s (%s)' % \
+				(bug.title, translate_api_web(bug.self_link))
+			print 'Please check the above URL to verify this before continuing.'
+			raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
+
+def postBug(srcpkg, subscribe, status, bugtitle, bugtext):
+	'''
+	Use the LP API to file the sync request.
+	'''
+
+	print 'The final report is:\nSummary: %s\nDescription:\n%s\n' % (bugtitle, bugtext)
+	raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
+
+	if srcpkg:
+		bug_target = DistributionSourcePackage(
+			'%subuntu/+source/%s' % (Launchpad._root_uri, srcpkg))
+	else:
+		# new source package
+		bug_target = Distribution('ubuntu')
+
+	# create bug
+	bug = Launchpad.bugs.createBug(title = bugtitle, description = bugtext, target = bug_target())
+
+	# newly created bugreports have only one task
+	task = bug.bug_tasks[0]
+	# only members of ubuntu-bugcontrol can set importance
+	if PersonTeam.me.isLpTeamMember('ubuntu-bugcontrol'):
+		task.importance = 'Wishlist'
+	task.status = status
+	task.lp_save()
+
+	bug.subscribe(person = PersonTeam(subscribe)())
+
+	print 'Sync request filed as bug #%i: %s' % (bug.id,
+		translate_api_web(bug.self_link))

=== added file 'ubuntutools/requestsync/mail.py'
--- ubuntutools/requestsync/mail.py	1970-01-01 00:00:00 +0000
+++ ubuntutools/requestsync/mail.py	2010-06-17 18:54:27 +0000
@@ -0,0 +1,228 @@
+# -*- coding: utf-8 -*-
+#
+#   mail.py - methods used by requestsync when used in "mail" mode
+#
+#   Copyright © 2009 Michael Bienia <geser@xxxxxxxxxx>
+#
+#   This module may contain code written by other authors/contributors to
+#   the main requestsync script. See there for their names.
+#
+#   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; version 2
+# 
+#   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.
+#
+#   Please see the /usr/share/common-licenses/GPL-2 file for the full text
+#   of the GNU General Public License license.
+
+import os
+import sys
+import subprocess
+import smtplib
+import socket
+from debian_bundle.changelog import Version
+from ubuntutools.requestsync.common import raw_input_exit_on_ctrlc
+from ubuntutools.lp.udtexceptions import PackageNotFoundException
+
+__all__ = [
+	'getDebianSrcPkg',
+	'getUbuntuSrcPkg',
+	'getEmailAddress',
+	'needSponsorship',
+	'checkExistingReports',
+	'mailBug',
+	]
+
+class SourcePackagePublishingHistory(object):
+	'''
+	Simulate a SourcePackagePublishingHistory class from the LP API caching
+	module.
+	'''
+	def __init__(self, name, version, component):
+		self.name = name
+		self.version = version
+		self.component = component
+
+	def getPackageName(self):
+		return self.name
+
+	def getVersion(self):
+		return self.version
+
+	def getComponent(self):
+		return self.component
+
+def rmadison(distro, package, release):
+	# Map 'sid' and 'squeeze' to their releasenames else rmadison gets a python
+	# traceback back from the remote script
+	releasenames = {
+		'sid': 'unstable',
+		'squeeze': 'testing', # Needs updating after each Debian release
+	}
+	release = releasenames.get(release, release)
+
+	rmadison_cmd = subprocess.Popen(
+		['rmadison', '-u', distro, '-a', 'source', '-s', release, package],
+		stdout = subprocess.PIPE)
+
+	rmadison_out = rmadison_cmd.communicate()[0]
+	assert (rmadison_cmd.returncode == 0)
+
+	# Return the most recent source line
+	lines = rmadison_out.splitlines()
+	if not lines:
+		# no output
+		return None
+	lines = [map(lambda x: x.strip(), line.split('|')) for line in lines]
+	lines = [line for line in lines if line[3].find('source') != -1]
+	if lines:
+		return max(lines, key = lambda x: Version(x[1]))
+	else:
+		# no source line
+		return None
+
+def getSrcPkg(distro, name, release):
+	out = rmadison(distro, name, release)
+	if not out:
+		raise PackageNotFoundException(
+			"'%s' doesn't appear to exist in %s '%s'" % \
+			(name, distro.capitalize(), release))
+
+	version = out[1]
+	component = 'main'
+	raw_comp = out[2].split('/')
+	if len(raw_comp) == 2:
+		component = raw_comp[1]
+
+	return SourcePackagePublishingHistory(name, version, component)
+
+def getDebianSrcPkg(name, release):
+	return getSrcPkg('debian', name, release)
+
+def getUbuntuSrcPkg(name, release):
+	return getSrcPkg('ubuntu', name, release)
+
+def getEmailAddress():
+	'''
+	Get the From email address from the UBUMAIL, DEBEMAIL or EMAIL
+	environment variable or give an error.
+	'''
+	myemailaddr = os.getenv('UBUMAIL') or os.getenv('DEBEMAIL') or os.getenv('EMAIL')
+	if not myemailaddr:
+		print >> sys.stderr, 'E: The environment variable UBUMAIL, ' \
+			'DEBEMAIL or EMAIL needs to be set to let this script ' \
+			'mail the sync request.'
+	return myemailaddr
+
+def needSponsorship(name, component, release):
+	'''
+	Ask the user if he has upload permissions for the package or the
+	component.
+	'''
+	
+	while True:
+		print "Do you have upload permissions for the '%s' component " \
+			"or the package '%s' in Ubuntu %s?" % (component, name, release)
+		val = raw_input_exit_on_ctrlc("If in doubt answer 'n'. [y/N]? ")
+		if val.lower() in ('y', 'yes'):
+			return False
+		elif val.lower() in ('n', 'no', ''):
+			return True
+		else:
+			print 'Invalid answer'
+
+def checkExistingReports(srcpkg):
+	'''
+	Point the user to the URL to manually check for duplicate bug reports.
+	'''
+	print 'Please check on https://bugs.launchpad.net/ubuntu/+source/%s/+bugs\n' \
+		'for duplicate sync requests before continuing.' % srcpkg
+	raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
+
+def mailBug(srcpkg, subscribe, status, bugtitle, bugtext, keyid = None):
+	'''
+	Submit the sync request per email.
+	'''
+
+	to = 'new@xxxxxxxxxxxxxxxxxx'
+
+	# getEmailAddress() can't fail here as the main code in requestsync
+	# already checks its return value
+	myemailaddr = getEmailAddress()
+
+	# generate mailbody
+	if srcpkg:
+		mailbody = ' affects ubuntu/%s\n' % srcpkg
+	else:
+		mailbody = ' affects ubuntu\n'
+	mailbody += '''\
+ status %s
+ importance wishlist
+ subscribe %s
+ done
+
+%s''' % (status, subscribe, bugtext)
+	
+	# prepare sign command
+	gpg_command = None
+	for cmd in ('gpg', 'gpg2', 'gnome-gpg'):
+		if os.access('/usr/bin/%s' % cmd, os.X_OK):
+			gpg_command = [cmd]
+	assert gpg_command # TODO: catch exception and produce error message
+
+	gpg_command.append('--clearsign')
+	if keyid:
+		gpg_command.extend(('-u', keyid))
+
+	# sign the mail body
+	gpg = subprocess.Popen(gpg_command, stdin = subprocess.PIPE, stdout = subprocess.PIPE)
+	signed_report = gpg.communicate(mailbody.encode('utf-8'))[0].decode('utf-8')
+	assert gpg.returncode == 0
+
+	# generate email
+	mail = u'''\
+From: %s
+To: %s
+Subject: %s
+Content-Type: text/plain; charset=UTF-8
+
+%s''' % (myemailaddr, to, bugtitle, signed_report)
+
+	print 'The final report is:\n%s' % mail
+	raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] to abort. ')
+
+	# get server address and port
+	mailserver_host = os.getenv('UBUSMTP') or os.getenv('DEBSMTP') or 'fiordland.ubuntu.com'
+	mailserver_port = os.getenv('UBUSMTP_PORT') or os.getenv('DEBSMTP_PORT') or 25
+
+	# connect to the server
+	try:
+		print 'Connecting to %s:%s ...' % (mailserver_host, mailserver_port)
+		s = smtplib.SMTP(mailserver_host, mailserver_port)
+	except socket.error, s:
+		print >> sys.stderr, 'E: Could not connect to %s:%s: %s (%i)' % \
+			(mailserver_host, mailserver_port, s[1], s[0])
+		return
+
+	# authenticate to the server
+	mailserver_user = os.getenv('UBUSMTP_USER') or os.getenv('DEBSMTP_USER')
+	mailserver_pass = os.getenv('UBUSMTP_PASS') or os.getenv('DEBSMTP_PASS')
+	if mailserver_user and mailserver_pass:
+		try:
+			s.login(mailserver_user, mailserver_pass)
+		except smtplib.SMTPAuthenticationError:
+			print >> sys.stderr, 'E: Error authenticating to the server: invalid username and password.'
+			s.quit()
+			return
+		except:
+			print >> sys.stderr, 'E: Unknown SMTP error.'
+			s.quit()
+			return
+
+	s.sendmail(myemailaddr, to, mail.encode('utf-8'))
+	s.quit()
+	print 'Sync request mailed.'

=== added file 'update-maintainer'
--- update-maintainer	1970-01-01 00:00:00 +0000
+++ update-maintainer	2010-06-17 18:54:27 +0000
@@ -0,0 +1,108 @@
+#! /usr/bin/python
+# 
+#   update-maintainer - this script is used to update the Maintainer field of an
+#                       Ubuntu package, as approved by the Ubuntu Technical
+#                       Board at:
+#
+#       https://lists.ubuntu.com/archives/ubuntu-devel/2009-May/028213.html
+#
+#   Copyright (C) 2009 Jonathan Davies <jpds@xxxxxxxxxx>
+#
+#   Original shell script was:
+#
+#   Copyright 2007 (C) Albin Tonnerre (Lutin) <lut1n.tne@xxxxxxxxx>
+#
+#   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, see <http://www.gnu.org/licenses/>.
+#
+
+import os
+import re
+import sys
+import ubuntutools.packages
+
+valid_locations = ["debian/control.in", "control.in", "debian/control", "control"]
+control_file_found = False
+
+# Check changelog file exists.
+for location in valid_locations:
+    if os.path.exists(location):
+         control_file_found = True
+         control_file = location
+         break # Stop looking.
+
+# Check if we've found a control file.
+if not control_file_found:
+   sys.stderr.write("Unable to find debian/control file.\n")
+   sys.exit(1)
+
+# Read found file contents.
+debian_control_file = open(control_file, "r")
+file_contents = debian_control_file.read()
+debian_control_file.close()
+
+# Check if there is a Maintainer field in file found.
+if not 'Maintainer' in file_contents:
+    sys.stderr.write("Unable to find Maintainer field in %s.\n" % control_file)
+    sys.exit(1)
+
+package_field = re.findall('(Source:) (.*)', file_contents)
+package_name = package_field[0][1]
+
+# Get maintainer field information.
+maintainer_field = re.findall('(Maintainer:) (.*) (<.*>)', file_contents)
+
+# Split out maintainer name and email address.
+maintainer_name = maintainer_field[0][1]
+maintainer_mail = maintainer_field[0][2]
+
+if maintainer_mail.find("@ubuntu.com") != -1:
+    print "Maintainer email is set to an @ubuntu.com address - doing nothing."
+    sys.exit(0)
+
+# Check if Maintainer field is as approved in TB decision.
+if 'Ubuntu Developers' in maintainer_name and \
+    '<ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>' in maintainer_mail:
+    print "Ubuntu Developers is already set as maintainer."
+    sys.exit(0)
+
+if not (ubuntutools.packages.checkIsInDebian(package_name, 'unstable') or ubuntutools.packages.checkIsInDebian(package_name, 'experimental')):
+    user_email_address = os.getenv('DEBEMAIL')
+    if not user_email_address:
+        user_email_address = os.getenv('EMAIL')
+        if not user_email_address:
+            sys.stderr.write('The environment variable DEBEMAIL or EMAIL ' +\
+                'needs to be set to make proper use of this script.\n')
+            sys.exit(1)
+    target_maintainer = user_email_address
+else:
+    target_maintainer = "Ubuntu Developers <ubuntu-devel-discuss@xxxxxxxxxxxxxxxx>"
+
+# Set original maintainer field in a string.
+original_maintainer = maintainer_name + " " + maintainer_mail
+
+# If maintainer-field contained the pre-archive-reorganisation entries, don't add a new
+# XSBC-Original maintainer field
+
+if not "lists.ubuntu.com" in original_maintainer:
+	final_addition = target_maintainer + "\nXSBC-Original-Maintainer: " + original_maintainer
+else:
+	final_addition = target_maintainer
+
+print "The original maintainer for this package is: " + original_maintainer
+print "Resetting as: " + target_maintainer
+
+# Replace text.
+debian_control_file = open(control_file, "w")
+debian_control_file.write(re.sub(re.escape(original_maintainer), final_addition, file_contents))
+debian_control_file.close()

=== renamed file 'update-maintainer' => 'update-maintainer.moved'
=== added file 'what-patch'
--- what-patch	1970-01-01 00:00:00 +0000
+++ what-patch	2010-06-17 18:54:27 +0000
@@ -0,0 +1,121 @@
+#!/bin/bash
+#
+# Copyright 2006-2008 (C) Kees Cook <kees@xxxxxxxxxx>
+# Modified by Siegfried-A. Gevatter <rainct@xxxxxxxxxx>
+# Modified by Daniel Hahler <ubuntu@xxxxxxxxxx>
+#
+# ##################################################################
+#
+# 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.
+# 
+# See file /usr/share/common-licenses/GPL for more details.
+#
+# ##################################################################
+#
+# By default only the name of the patch system is printed.  Verbose mode can be
+# enabled with -v.
+
+if [ "$1" = "-h" ] || [ "$1" = "--help" ]
+then
+	cat <<EOM
+Usage: $0 [-v]
+
+Run this inside the source directory of a Debian package and it will detect
+the patch system that it uses.
+
+ -v: Enable verbose mode:
+     - Print a list of all those files outside the debian/ directory that have
+       been modified (if any).
+     - Report additional details about patch systems, if available.
+EOM
+	exit 0
+fi
+
+while [ ! -r debian/rules ];
+do
+	if [ "$PWD" = "/" ]; then
+		echo "Can't find debian/rules."
+		exit 1
+	fi
+	cd ..
+done
+
+VERBOSE=0
+if [ "$1" = "-v" ]
+then
+	VERBOSE=1
+fi
+
+if [ "$VERBOSE" -gt 0 ]; then
+	files=`lsdiff -z ../$(dpkg-parsechangelog | grep ^Source: | sed -e "s/^Source: //")_$(dpkg-parsechangelog | grep ^Version: | sed -e "s/^Version: //").diff.gz 2>/dev/null | grep -v 'debian/'`
+	if [ -n "$files" ]
+	then
+		echo "Following files were modified outside of the debian/ directory:"
+		echo "$files"
+		echo "--------------------"
+		echo
+		echo -n "Patch System: "
+	fi
+fi
+
+if fgrep -q quilt debian/source/format 2>/dev/null; then
+	echo "quilt"
+	exit 0
+fi
+
+# Do not change the output of existing checks by default, as there are build
+# tools that rely on the exisitng output.  If changes in reporting is needed,
+# please check the "VERBOSE" flag (see below for examples).  Feel free
+# to add new patchsystem detection and reporting.
+for filename in $(echo "debian/rules"; grep ^include debian/rules | fgrep -v '$(' | awk '{print $2}')
+do
+	fgrep patchsys.mk "$filename" | grep -q -v "^#" && {
+		if [ "$VERBOSE" -eq 0 ]; then
+			echo "cdbs"; exit 0;
+		else
+			echo "cdbs (patchsys.mk: see 'cdbs-edit-patch')"; exit 0;
+		fi
+	}
+	fgrep quilt "$filename" | grep -q -v "^#" && { echo "quilt"; exit 0; }
+	fgrep dbs-build.mk "$filename" | grep -q -v "^#" && {
+		if [ "$VERBOSE" -eq 0 ]; then
+			echo "dbs"; exit 0;
+		else
+			echo "dbs (see 'dbs-edit-patch')"; exit 0;
+		fi
+	}
+	fgrep dpatch "$filename" | grep -q -v "^#" && {
+		if [ "$VERBOSE" -eq 0 ]; then
+			echo "dpatch"; exit 0;
+		else
+			echo "dpatch (see 'patch-edit-patch')"; exit 0;
+		fi
+	}
+	fgrep '*.diff' "$filename" | grep -q -v "^#" && {
+		if [ "$VERBOSE" -eq 0 ]; then
+			echo "diff splash"; exit 0;
+		else
+			echo "diff splash (check debian/rules)"; exit 0;
+		fi
+	}
+done
+[ -d debian/patches ] || {
+	if [ "$VERBOSE" -eq 0 ]; then
+		echo "patchless?"; exit 0;
+	else
+		echo "patchless? (did not find debian/patches/)"; exit 0;
+	fi
+}
+if [ "$VERBOSE" -eq 0 ]; then
+	echo "unknown patch system"
+else
+	echo "unknown patch system (see debian/patches/ and debian/rules)"
+fi

=== renamed file 'what-patch' => 'what-patch.moved'