From 350426ef1c232544761bbca08e5a5702f150d8c3 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Tue, 26 Jun 2007 18:25:44 +1000 Subject: [PATCH 01/96] * Removed ubuntu-sync and ubuntu-cd from setup.py, as they still need some reworking before they get published in a binary package. --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index d4652d5..47bee13 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ if os.path.exists(changelog): setup(name='ubuntu-dev-tools', version=version, - scripts=['404main', 'check-symbols', 'pbuilder-dist', 'ubuntu-cd', - 'ubuntu-sync', 'update-maintainer'], + scripts=['404main', 'check-symbols', 'pbuilder-dist', + 'update-maintainer'], ) From a753622e9b52aa29b4bed16361d8790586bd7c0e Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Wed, 4 Jul 2007 12:23:13 +0200 Subject: [PATCH 02/96] added Kees to authors, added GPL notice to check-symbols, added Kees' scripts to setup.py --- AUTHORS | 1 + check-symbols | 1 + setup.py | 11 +++++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index 12eb03e..15755b2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -2,3 +2,4 @@ Daniel Holbach Luke Yelavich Albin Tonnerre Michael Bienia +Kees Cook diff --git a/check-symbols b/check-symbols index 48f8224..1117c07 100755 --- a/check-symbols +++ b/check-symbols @@ -1,4 +1,5 @@ #!/bin/bash +# (C) Daniel Holbach (2006-2007), Licensed under the GPL PACKAGES="`apt-cache showsrc $1 | grep ^Binary | sed 's/Binary\:\ //g;s/\,//g' | sort -u`" DEBLINE="" diff --git a/setup.py b/setup.py index 47bee13..65c1e4e 100755 --- a/setup.py +++ b/setup.py @@ -15,7 +15,14 @@ if os.path.exists(changelog): setup(name='ubuntu-dev-tools', version=version, - scripts=['404main', 'check-symbols', 'pbuilder-dist', - 'update-maintainer'], + scripts=['404main', + 'check-symbols', + 'pbuilder-dist', + 'update-maintainer', + 'dch-repeat', + 'mk-sbuild-lv', + 'pull-debian-debdiff', + 'what-patch' + ], ) From 62aa5254f671c4e0376866e5ea20b8c4464cc5dd Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Mon, 9 Jul 2007 16:53:20 +0200 Subject: [PATCH 03/96] specify gpl version --- check-symbols | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-symbols b/check-symbols index 1117c07..6a8ef4c 100755 --- a/check-symbols +++ b/check-symbols @@ -1,5 +1,5 @@ #!/bin/bash -# (C) Daniel Holbach (2006-2007), Licensed under the GPL +# (C) Daniel Holbach (2006-2007), Licensed under the GPL 2 PACKAGES="`apt-cache showsrc $1 | grep ^Binary | sed 's/Binary\:\ //g;s/\,//g' | sort -u`" DEBLINE="" From a90efc7ba204365de5e9eed75a74d76c7cdd7573 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 9 Jul 2007 16:17:24 +0100 Subject: [PATCH 04/96] * 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. --- debian/changelog | 9 +++++++++ debian/copyright | 2 ++ setup.py | 3 ++- suspicious-source | 12 ++++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 suspicious-source diff --git a/debian/changelog b/debian/changelog index 13c9d24..b7ac221 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +ubuntu-dev-tools (0.2) UNRELEASED; urgency=low + + * 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. + + -- Martin Pitt Mon, 09 Jul 2007 16:01:04 +0100 + ubuntu-dev-tools (0.1) gutsy; urgency=low * Initial Release. diff --git a/debian/copyright b/debian/copyright index f810274..fb20b46 100644 --- a/debian/copyright +++ b/debian/copyright @@ -6,12 +6,14 @@ Upstream Author: Luke Yelavich Albin Tonnerre Michael Bienia + Martin Pitt Copyright: Daniel Holbach 2006-2007 Luke Yelavich 2006-2007 Albin Tonnerre 2006-2007 Michael Bienia 2006-2007 + Martin Pitt 2007 License: diff --git a/setup.py b/setup.py index 65c1e4e..53a8c14 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,8 @@ setup(name='ubuntu-dev-tools', 'dch-repeat', 'mk-sbuild-lv', 'pull-debian-debdiff', - 'what-patch' + 'what-patch', + 'suspicious-source', ], ) diff --git a/suspicious-source b/suspicious-source new file mode 100755 index 0000000..381bef6 --- /dev/null +++ b/suspicious-source @@ -0,0 +1,12 @@ +#!/bin/sh -e + +# Author: Martin Pitt +# License: GPL v2 or later +# +# 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. + +find -type f ! \( -name '*.h' -o -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name Makefile -o -name configure -o -name '*.3' -o -name '*.html' -o -name '*.txt' -o -name '*.xml' -o -name Makefile.am -o -name Makefile.in -o -name '*.m4' -o -name config.sub -o -name config.guess -o -name ltmain.sh -o -name depcomp -o -name configure.ac -o -name *.py -o -name NEWS -o -name README -o -name INSTALL -o -name TODO -o -name ChangeLog -o -name '*.docbook' -o -name '*.png' -o -name '*.desktop' -o -name '*.ui' -o -name '*.po' -o -name '*.py' -o -name '*.svg' -o -name '*.bmp' -o -name '*.gif' -o -name '*.pot' -o -name '*.xpm' -o -name '*.glade' -o -name '*.gladep' \) + From 4aea181e6160afe309dda50d7888d42de07470ed Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Tue, 10 Jul 2007 07:50:17 +1000 Subject: [PATCH 05/96] * Added copyright to ubuntu-cd and ubuntu-sync. --- ubuntu-cd | 4 ++++ ubuntu-sync | 3 +++ 2 files changed, 7 insertions(+) diff --git a/ubuntu-cd b/ubuntu-cd index a13dcbc..bb11a6a 100755 --- a/ubuntu-cd +++ b/ubuntu-cd @@ -1,4 +1,8 @@ #!/bin/bash + +# Copyright 2006,2007 (C) Luke Yelavich +# License: GPLv2 + set -e # Get the latest CD snapshot release. diff --git a/ubuntu-sync b/ubuntu-sync index 763ee59..c64f9e5 100755 --- a/ubuntu-sync +++ b/ubuntu-sync @@ -1,6 +1,9 @@ #!/bin/bash set -e +# Copyright 2006,2007 (C) Luke Yelavich +# License: GPLv2 + # Syncronise new ubuntu CD images, depending on command-line flags given. # If none are given, sync all images. From ce1925503b0f8ea474bcb02c3d2bbdce0ebb3733 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Tue, 10 Jul 2007 21:03:20 +1000 Subject: [PATCH 06/96] * ubuntu-cd: Ensure correct flavours are chosen for edubuntu, and ubuntu-server * ubuntu-sync: - Ensure that powerpc isos are retrieved from the ports directory of the appropriate origin. - Ensure correct flavours are chosen for edubuntu, and ubuntu-server. --- ubuntu-cd | 14 ++++++++++---- ubuntu-sync | 19 ++++++++++++------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/ubuntu-cd b/ubuntu-cd index bb11a6a..ee61d60 100755 --- a/ubuntu-cd +++ b/ubuntu-cd @@ -1,8 +1,4 @@ #!/bin/bash - -# Copyright 2006,2007 (C) Luke Yelavich -# License: GPLv2 - set -e # Get the latest CD snapshot release. @@ -30,6 +26,16 @@ if [ "${Distro}" == "ubuntu" ]; then Flavors="alternate desktop server" Archs="i386" #Archs="i386 amd64 powerpc" +elif [ "${Distro}" == "edubuntu" ]; then + Origin="${Distro}/releases" + Flavors="desktop server serveraddon" + Archs="i386" + #Archs="i386 amd64" +elif [ "${Distro}" == "ubuntu-server" ]; then + Origin="releases" + Flavors="server" + Archs="i386" + #Archs="i386 amd64" else Origin="${Distro}/releases" Flavors="alternate desktop" diff --git a/ubuntu-sync b/ubuntu-sync index c64f9e5..9678427 100755 --- a/ubuntu-sync +++ b/ubuntu-sync @@ -1,9 +1,6 @@ #!/bin/bash set -e -# Copyright 2006,2007 (C) Luke Yelavich -# License: GPLv2 - # Syncronise new ubuntu CD images, depending on command-line flags given. # If none are given, sync all images. @@ -16,7 +13,7 @@ Ubuntu_Distro_Dir="$HOME/distros/ubuntu" Dist=gutsy # Only sync the oldest images, and only i386 images if low bandwidth. -Low_Bandwidth=1 +Low_Bandwidth=0 while [ -n "$1" ]; do case "$1" in @@ -68,9 +65,9 @@ do # Which flavors to download if [ "${Current_Set}" == "edubuntu" ]; then - Flavors="install live" + Flavors="desktop server serveraddon" elif [ "${Current_Set}" == "ubuntu-server" ]; then - Flavors="server live" + Flavors="server" else Flavors="alternate desktop" fi @@ -85,9 +82,17 @@ do for arch in $Archs; do for flavor in $Flavors; do - if rsync --partial-dir="${Ubuntu_Distro_Dir}/${Current_Set}/${Dist}/.partial" "rsync://cdimage.ubuntu.com/cdimage/${Origin}/daily/current/${Dist}-${flavor}-${arch}.iso" "${Dist}-${flavor}-${arch}.iso" ; then + if [ "${flavor}" == "desktop" ]; then + Is_Desktop=-live + fi + if [ "${arch}" == "powerpc" ]; then + Is_Ports=ports + fi + if rsync --partial-dir="${Ubuntu_Distro_Dir}/${Current_Set}/${Dist}/.partial" "rsync://cdimage.ubuntu.com/cdimage/${Origin}/${Is_Ports}/daily${Is_Desktop}/current/${Dist}-${flavor}-${arch}.iso" "${Dist}-${flavor}-${arch}.iso" ; then date > "${flavor}-${arch}-sync" fi + unset Is_Desktop + unset Is_Ports done done done From c1ac53ee473e04d45130062f4d96d266ef5c3ea7 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Tue, 10 Jul 2007 21:09:29 +1000 Subject: [PATCH 07/96] *Add to changelog. --- debian/changelog | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index b7ac221..59917aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,11 +1,21 @@ ubuntu-dev-tools (0.2) UNRELEASED; 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. - -- Martin Pitt Mon, 09 Jul 2007 16:01:04 +0100 + [ Luke Yelavich ] + * ubuntu-cd: Ensure correct flavours are chosen for edubuntu, and + ubuntu-server + * ubuntu-sync: + - Ensure that powerpc isos are retrieved from the ports directory of + the appropriate origin. + - Ensure correct flavours are chosen for edubuntu, and + ubuntu-server. + + -- Luke Yelavich Tue, 10 Jul 2007 21:08:39 +1000 ubuntu-dev-tools (0.1) gutsy; urgency=low From 52360df6f1e0b6012c422f052a092601faf3e700 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Thu, 12 Jul 2007 16:39:56 +1000 Subject: [PATCH 08/96] ( Add support for gobuntu to ubuntu-sync and ubuntu-cd. --- debian/changelog | 10 ++++++---- ubuntu-cd | 5 +++++ ubuntu-sync | 6 +++++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index 59917aa..fa08532 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,15 +7,17 @@ ubuntu-dev-tools (0.2) UNRELEASED; urgency=low licenses require. [ Luke Yelavich ] - * ubuntu-cd: Ensure correct flavours are chosen for edubuntu, and - ubuntu-server + * ubuntu-cd: + - Ensure correct flavours are chosen for edubuntu, and ubuntu-server + - Add support for gobuntu. * ubuntu-sync: - Ensure that powerpc isos are retrieved from the ports directory of the appropriate origin. - - Ensure correct flavours are chosen for edubuntu, and + - Ensure correct flavours are chosen for edubuntu, and ubuntu-server. + - Add support for gobuntu. - -- Luke Yelavich Tue, 10 Jul 2007 21:08:39 +1000 + -- Luke Yelavich Thu, 12 Jul 2007 16:38:54 +1000 ubuntu-dev-tools (0.1) gutsy; urgency=low diff --git a/ubuntu-cd b/ubuntu-cd index ee61d60..74cb526 100755 --- a/ubuntu-cd +++ b/ubuntu-cd @@ -36,6 +36,11 @@ elif [ "${Distro}" == "ubuntu-server" ]; then Flavors="server" Archs="i386" #Archs="i386 amd64" +elif [ "${Distro}" == "gobuntu" ]; then + Origin="${Distro}/releases" + Flavors="alternate" + Archs="i386" + #Archs="i386 amd64 powerpc" else Origin="${Distro}/releases" Flavors="alternate desktop" diff --git a/ubuntu-sync b/ubuntu-sync index 9678427..025cfc8 100755 --- a/ubuntu-sync +++ b/ubuntu-sync @@ -32,6 +32,8 @@ while [ -n "$1" ]; do -x) Image_Sets="${Image_Sets} xubuntu" break + -g) + Image_Sets="${Image_Sets} gobuntu" ;; -s) Image_Sets="${Image_Sets} ubuntu-server" @@ -44,7 +46,7 @@ if [ "${Low_Bandwidth}" == 1 ] && [ "${Image_Sets}" == "" ]; then cd "${Ubuntu_Distro_Dir}" Image_Sets=`ls -td1 */"${Dist}" | tail -1 | cut -f 1 -d /` elif [ "${Low_Bandwidth}" == 0 ] && [ "${Image_Sets}" == "" ]; then - Image_Sets="ubuntu xubuntu ubuntu-server edubuntu kubuntu" + Image_Sets="ubuntu xubuntu ubuntu-server edubuntu kubuntu gobuntu" fi # Sync images. @@ -68,6 +70,8 @@ do Flavors="desktop server serveraddon" elif [ "${Current_Set}" == "ubuntu-server" ]; then Flavors="server" + elif [ "${Current_Set}" == "gobuntu" ]; then + Flavors="alternate" else Flavors="alternate desktop" fi From 5874f020a53d26c327585d5ea1aa86295ff73118 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Tue, 17 Jul 2007 09:01:45 +1000 Subject: [PATCH 09/96] * ubuntu-sync: Fix slight error in options parsing. --- ubuntu-sync | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ubuntu-sync b/ubuntu-sync index 025cfc8..e16fac7 100755 --- a/ubuntu-sync +++ b/ubuntu-sync @@ -32,8 +32,10 @@ while [ -n "$1" ]; do -x) Image_Sets="${Image_Sets} xubuntu" break + ;; -g) Image_Sets="${Image_Sets} gobuntu" + break ;; -s) Image_Sets="${Image_Sets} ubuntu-server" From 5feefb94434dd8db4248b844377d3bd6b8012e14 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 23 Jul 2007 12:41:30 +0200 Subject: [PATCH 10/96] mk-sbuild-lv: Fix schroot config generation --- mk-sbuild-lv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mk-sbuild-lv b/mk-sbuild-lv index d5f233b..a92b1b8 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -196,7 +196,7 @@ TEMPLATE_SCHROOTCONF=~/.mk-sbuild-lv.schroot.conf if [ -r "$TEMPLATE_SCHROOTCONF" ]; then cat "$TEMPLATE_SCHROOTCONF" > "$TEMP_SCHROOTCONF" else - cat > "$TEMPLATE_SCHROOTCONF" < "$TEMP_SCHROOTCONF" < Date: Wed, 25 Jul 2007 10:34:32 +0200 Subject: [PATCH 11/96] Removed buildd check. Every distro in recent debootstrap versions has a buildd variant, but only warty, hoary, woody, and sarge had separate .buildd scripts. --- mk-sbuild-lv | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mk-sbuild-lv b/mk-sbuild-lv index a92b1b8..fcbf17b 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -156,10 +156,7 @@ if [ ! -f "/usr/lib/debootstrap/scripts/$RELEASE" ]; then echo "Specified release not known to debootstrap" >&2 exit 1 else - # Look for a buildd variant to work with - if [ -f "/usr/lib/debootstrap/scripts/${RELEASE}.buildd" ]; then - variant_opt="--variant=buildd" - fi + variant_opt="--variant=buildd" fi # Allocate the "golden" chroot LV From d3f73c2fed53074ffdfb231afa85b2d67c90c6ee Mon Sep 17 00:00:00 2001 From: "Christopher James Halse Rogers (RAOF)" Date: Thu, 26 Jul 2007 16:13:48 +1000 Subject: [PATCH 12/96] sbuild now fails when chroot_mode is defined, remove it from template config --- mk-sbuild-lv | 5 ----- 1 file changed, 5 deletions(-) diff --git a/mk-sbuild-lv b/mk-sbuild-lv index fcbf17b..a21617a 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -52,11 +52,6 @@ if [ ! -w /var/lib/sbuild ]; then # (mandatory, no default!). \$maintainer_name='$USER <$USER@localhost>'; -# Chroot behaviour; possible values are "split" (apt and dpkg are run -# from the host system) and "schroot" (all package operations are done in -# the chroot with schroot, but the chroot must allow networking) -\$chroot_mode = "schroot"; - # Directory for chroot symlinks and sbuild logs. Defaults to the # current directory if unspecified. #\$build_dir='$HOME/ubuntu/build'; From 0346700ec3ad30b9f1ff5ecaba1a1ac1c500a010 Mon Sep 17 00:00:00 2001 From: "Christopher James Halse Rogers (RAOF)" Date: Thu, 26 Jul 2007 16:15:41 +1000 Subject: [PATCH 13/96] Make building debian chroots with mk-sbuild-lv more friendly - Add --source-template option (useful for having different Ubuntu/Debian templates - Add --debootstrap-mirror option (more discoverable than setting DEBOOTSTRAP_MIRROR) --- mk-sbuild-lv | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/mk-sbuild-lv b/mk-sbuild-lv index a21617a..a71a9cb 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -83,9 +83,11 @@ function usage() { echo "Usage: $0 [OPTIONS] VG Release" >&2 echo "Options:" - echo " --arch=ARCH What architecture to select" - echo " --name=NAME Base name for the schroot (arch is appended)" - echo " --debug Turn on script debugging" + echo " --arch=ARCH What architecture to select" + echo " --name=NAME Base name for the schroot (arch is appended)" + echo " --debug Turn on script debugging" + echo " --source-template=FILE Use FILE as the sources.list template" + echo " --debootstrap-mirror=URL Use URL as the debootstrap source" exit 1 } @@ -93,7 +95,7 @@ function usage() if [ -z "$1" ]; then usage fi -OPTS=`getopt -o '' --long "help,debug,arch:,name::" -- "$@"` +OPTS=`getopt -o '' --long "help,debug,arch:,name:,source-template:,debootstrap-mirror:" -- "$@"` eval set -- "$OPTS" name="" @@ -113,6 +115,18 @@ while :; do 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 + ;; --) shift break @@ -164,7 +178,9 @@ sudo mount "$CHROOT_PATH" "$MNT" sudo debootstrap $arch_opt $variant_opt "$RELEASE" "$MNT" "${DEBOOTSTRAP_MIRROR:-http://archive.ubuntu.com/ubuntu}" # Update the package sources TEMP_SOURCES=`mktemp -t sources-XXXXXX` -TEMPLATE_SOURCES=~/.mk-sbuild-lv.sources +if [ -z "$TEMPLATE_SOURCES" ]; then + TEMPLATE_SOURCES=~/.mk-sbuild-lv.sources +fi if [ -r "$TEMPLATE_SOURCES" ]; then cat "$TEMPLATE_SOURCES" > "$TEMP_SOURCES" else @@ -224,7 +240,7 @@ set -e # Reload package lists apt-get update || true # Pull down signature requirements -apt-get -y --force-yes install gnupg ubuntu-keyring +#apt-get -y --force-yes install gnupg ubuntu-keyring # Reload package lists apt-get update || true # Disable debconf questions so that automated builds won't prompt From 477a2b16dd003411a26bd4914321381d7f8f2b67 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 27 Jul 2007 10:33:19 +0200 Subject: [PATCH 14/96] add 'get-branches' utility --- AUTHORS | 1 + get-branches | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 1 + 3 files changed, 70 insertions(+) create mode 100755 get-branches diff --git a/AUTHORS b/AUTHORS index 15755b2..ac64f37 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,3 +3,4 @@ Luke Yelavich Albin Tonnerre Michael Bienia Kees Cook +Martin Pitt diff --git a/get-branches b/get-branches new file mode 100755 index 0000000..d89b305 --- /dev/null +++ b/get-branches @@ -0,0 +1,68 @@ +#!/usr/bin/python + +# (C) 2007, Canonical +# Daniel Holbach +# GPLv3 + +import urllib2 +import sys +import re +import os + +def main(): + usage = "Usage: get-branches [checkout|branch]" + if len(sys.argv) < 3: + print >> sys.stderr, usage + sys.exit(1) + + directory = os.path.expanduser(sys.argv[1]) + team = sys.argv[2] + operation_type = "branch" + if len(sys.argv) == 4: + operation_type = sys.argv[3] + + pwd = os.getcwd() + try: + os.chdir(directory) + except: + print >> sys.stderr, "Directory '%s' not found." % directory + sys.exit(1) + + try: + os.makedirs(team) + except: + pass + os.chdir(team) + + sock = urllib2.urlopen("http://code.launchpad.net/~%s" % team) + branch_list_page = sock.read() + sock.close() + branch_page_urls_regex = r'.*Hosted on Launchpad:.*\n.*(.*)' + branch_url = re.findall(branch_url_regex, branch_page) + print branch_url[0] + if branch_url[0]: + product = branch_url[0].split("/")[-2] + branch_nick = branch_url[0].split("/")[-1] + if not os.path.exists(product): + os.makedirs(product) + os.chdir(product) + if not os.path.exists(branch_nick): + os.system("bzr %s %s" % (operation_type, branch_url[0])) + else: + os.chdir(branch_nick) + os.system("bzr merge --pull --remember") + os.chdir(directory) + + os.chdir(pwd) + sys.exit(0) + + +if __name__ == "__main__": + main() + diff --git a/setup.py b/setup.py index 53a8c14..23a7703 100755 --- a/setup.py +++ b/setup.py @@ -17,6 +17,7 @@ setup(name='ubuntu-dev-tools', version=version, scripts=['404main', 'check-symbols', + 'get-branches', 'pbuilder-dist', 'update-maintainer', 'dch-repeat', From 03e34ebc0efdd8c799e2aeb9a31e5c91708ed43e Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 27 Jul 2007 10:43:48 +0200 Subject: [PATCH 15/96] fix get-branches issue found by seb128 --- get-branches | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-branches b/get-branches index d89b305..95ab7a3 100755 --- a/get-branches +++ b/get-branches @@ -15,7 +15,7 @@ def main(): print >> sys.stderr, usage sys.exit(1) - directory = os.path.expanduser(sys.argv[1]) + directory = os.path.abspath(os.path.expanduser(sys.argv[1])) team = sys.argv[2] operation_type = "branch" if len(sys.argv) == 4: @@ -57,7 +57,7 @@ def main(): else: os.chdir(branch_nick) os.system("bzr merge --pull --remember") - os.chdir(directory) + os.chdir(os.path.join(directory, team)) os.chdir(pwd) sys.exit(0) From 48bef642261d5538b82a0f6ab865e6fbe0626ce8 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Fri, 27 Jul 2007 10:46:10 +0200 Subject: [PATCH 16/96] use os.path.abspath to get the directory --- get-branches | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-branches b/get-branches index 95ab7a3..14fb1c4 100755 --- a/get-branches +++ b/get-branches @@ -15,7 +15,7 @@ def main(): print >> sys.stderr, usage sys.exit(1) - directory = os.path.abspath(os.path.expanduser(sys.argv[1])) + directory = os.path.abspath(sys.argv[1])) team = sys.argv[2] operation_type = "branch" if len(sys.argv) == 4: From ec060895169d20f8c39a8d09e5bf9b26835d8e35 Mon Sep 17 00:00:00 2001 From: Michael Bienia Date: Fri, 27 Jul 2007 16:53:21 +0200 Subject: [PATCH 17/96] * debian/rules: + Remove rsync from Depends (needed by ubuntu-{sync,cd} which aren't installed). + Add bzr and pbuilder to Recommends. * debian/copyright: + Add Kees Cook to authors (already done in AUTHORS). + Add GPLv3 to licenses. + Mention which scripts are GPLv2 and which GPLv3. --- debian/control | 3 ++- debian/copyright | 28 +++++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 89e88ef..ea4804f 100644 --- a/debian/control +++ b/debian/control @@ -11,7 +11,8 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, rsync, sudo +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo +Recommends: bzr, pbuilder XB-Python-Version: ${python:Versions} Description: useful tools for Ubuntu developers This is a collection of useful tools that Ubuntu developers use to diff --git a/debian/copyright b/debian/copyright index fb20b46..f530ee4 100644 --- a/debian/copyright +++ b/debian/copyright @@ -6,6 +6,7 @@ Upstream Author: Luke Yelavich Albin Tonnerre Michael Bienia + Kees Cook Martin Pitt Copyright: @@ -13,9 +14,13 @@ Copyright: Luke Yelavich 2006-2007 Albin Tonnerre 2006-2007 Michael Bienia 2006-2007 + Kees Cook 2006-2007 Martin Pitt 2007 -License: +Licenses: + +check-symbols, dch-repeat, mk-sbuild-lv, pull-debian-diff, suspicious-source, +update-maintainer and what-patch are licensed under GPLv2: 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 @@ -31,6 +36,23 @@ License: along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -On Debian systems, the complete text of the GNU General -Public License can be found in `/usr/share/common-licenses/GPL'. +On Debian systems, the complete text of the GNU General Public License v2 +can be found in `/usr/share/common-licenses/GPL-2'. +get-branches is licensed under GPLv3: + + 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 . + +On Debian systems, the complete text of the GNU General Public License v3 +can be found in `/usr/share/common-licenses/GPL-3'. From 9cf31871aa81d09753fc10b16e4608730e0e5286 Mon Sep 17 00:00:00 2001 From: Michael Bienia Date: Fri, 27 Jul 2007 17:00:39 +0200 Subject: [PATCH 18/96] * Add full license text for GPL-2 and GPL-3. --- GPL-2 | 339 +++++++++++++++++++++++++++++ GPL-3 | 676 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 1015 insertions(+) create mode 100644 GPL-2 create mode 100644 GPL-3 diff --git a/GPL-2 b/GPL-2 new file mode 100644 index 0000000..d511905 --- /dev/null +++ b/GPL-2 @@ -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. + + + Copyright (C) + + 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. + + , 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. diff --git a/GPL-3 b/GPL-3 new file mode 100644 index 0000000..4432540 --- /dev/null +++ b/GPL-3 @@ -0,0 +1,676 @@ + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + + Copyright (C) + + 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 . + +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: + + Copyright (C) + 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 +. + + 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 +. + From 7be8b44962ccaea0a402391ef75e766dc50312ad Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Fri, 3 Aug 2007 16:13:10 +0200 Subject: [PATCH 19/96] what-patch: add some path correction & checking --- what-patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/what-patch b/what-patch index 5236ed7..f8d0565 100755 --- a/what-patch +++ b/what-patch @@ -1,6 +1,18 @@ #!/bin/bash -# Copyright 2006,2007 (C) Kees Cook +# Copyright 2006, 2007 (C) Kees Cook +# Modified by Siegfried-A. Gevatter # License: GPLv2 + +if [[ -e debian ]]; then + cd . # pass +elif [[ -e ../debian ]]; then + cd .. +elif [[ -e ../patches ]]; then + cd ../.. +else + echo "Can't find debian/rules."; exit +fi + for filename in $(echo "debian/rules"; grep ^include debian/rules | fgrep -v '$(' | awk '{print $2}') do fgrep -q patchsys.mk "$filename" && { echo "cdbs"; exit; } From 35e3a0be26aac7862d1d384a1e9b670ed2e7f78f Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Fri, 3 Aug 2007 21:17:31 +0200 Subject: [PATCH 20/96] Improved check-symbols. More slighly changes on what-patch. Added pbuilder-template. Updated AUTHORS and README. --- AUTHORS | 2 ++ README | 14 ++++++--- check-symbols | 72 +++++++++++++++++++++++++++++------------------ pbuilder-template | 36 ++++++++++++++++++++++++ what-patch | 8 +++--- 5 files changed, 97 insertions(+), 35 deletions(-) create mode 100644 pbuilder-template diff --git a/AUTHORS b/AUTHORS index ac64f37..33f46e2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,3 +4,5 @@ Albin Tonnerre Michael Bienia Kees Cook Martin Pitt +Siegfried-A. Gevatter +Jamin W. Collins diff --git a/README b/README index ae6007b..c643e00 100644 --- a/README +++ b/README @@ -1,6 +1,12 @@ -Ubuntu Development Tools +===================== +== Ubuntu Development Tools == +===================== check-symbols [] -... will compare and give you a diff of the exported symbols of all -.so files in all binary packages of . - is not mandatory and /var/cache/pbuilder/result by default. + ... will compare and give you a diff of the exported symbols of all .so + files in all binary packages of . + is not mandatory and set to /var/cache/pbuilder/result by default. + +what-patch + ... will check what patching system is used by a package. + You need to be in it's source directory in order that it works. diff --git a/check-symbols b/check-symbols index 6a8ef4c..d27e038 100755 --- a/check-symbols +++ b/check-symbols @@ -1,41 +1,59 @@ #!/bin/bash -# (C) Daniel Holbach (2006-2007), Licensed under the GPL 2 +# Copyright 2006-2007 (C) Daniel Holbach +# Modified by Siegfried-A. Gevatter +# License: GPLv2 PACKAGES="`apt-cache showsrc $1 | grep ^Binary | sed 's/Binary\:\ //g;s/\,//g' | sort -u`" DEBLINE="" +DEBUG=False -if [ -z $1 ]; then \ - echo "Missing argument: source package name."; \ - exit; \ +if [[ -z $1 ]]; then + echo "Missing argument: source package name."; + exit; fi -if [ -z $2 ]; then \ - DEBDIR="/var/cache/pbuilder/result"; \ -else \ - DEBDIR="$2"; \ +if [[ -z $2 ]]; then + DEBDIR="/var/cache/pbuilder/result"; +else + DEBDIR="$2"; fi -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.1; \ - done; \ - DEBLINE="$DEBLINE $DEBDIR/$pack*.deb "; +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.1; + done; + DEBLINE="$DEBLINE $DEBDIR/$pack*.deb "; done +if [[ -z $DEBLINE ]]; then + echo "Package doesn't exist: $1."; exit +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 +fi + sudo dpkg -i $DEBLINE; -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.2; \ - echo "Checking: $lib"; \ - diff -u /tmp/$LIBNAME.{1,2}; \ - rm /tmp/$LIBNAME.{1,2}; \ - done; \ +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.2; + echo "Checking: $lib"; + diff -u /tmp/$LIBNAME.{1,2}; + rm /tmp/$LIBNAME.{1,2}; + done; done - diff --git a/pbuilder-template b/pbuilder-template new file mode 100644 index 0000000..b9d0904 --- /dev/null +++ b/pbuilder-template @@ -0,0 +1,36 @@ +#!/bin/sh +# Script from Jamin W. Collins BTS: #255165 +# Name this script 'pbuilder-dapper', 'pbuilder-edgy', 'pbuilder-feisty', etc. +# +# The only variable you really might need to change is BASE_DIR if you don't want pbuilder stuff in ~/ + +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 diff --git a/what-patch b/what-patch index f8d0565..7f12c5b 100755 --- a/what-patch +++ b/what-patch @@ -1,13 +1,13 @@ #!/bin/bash -# Copyright 2006, 2007 (C) Kees Cook +# Copyright 2006-2007 (C) Kees Cook # Modified by Siegfried-A. Gevatter # License: GPLv2 -if [[ -e debian ]]; then +if [[ -d debian ]]; then cd . # pass -elif [[ -e ../debian ]]; then +elif [[ -d ../debian ]]; then cd .. -elif [[ -e ../patches ]]; then +elif [[ -d ../patches ]]; then cd ../.. else echo "Can't find debian/rules."; exit From b1c0d3c28b47bbd3988ac7e635f41893b6a0e942 Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Sat, 4 Aug 2007 08:31:31 +1000 Subject: [PATCH 21/96] * Removed ubuntu-cd and ubuntu-sync. They are currently undergoing major reworking, and will be re-included when ready. --- debian/changelog | 13 ++---- ubuntu-cd | 55 ------------------------- ubuntu-sync | 105 ----------------------------------------------- 3 files changed, 3 insertions(+), 170 deletions(-) delete mode 100755 ubuntu-cd delete mode 100755 ubuntu-sync diff --git a/debian/changelog b/debian/changelog index fa08532..c390e0c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,17 +7,10 @@ ubuntu-dev-tools (0.2) UNRELEASED; urgency=low licenses require. [ Luke Yelavich ] - * ubuntu-cd: - - Ensure correct flavours are chosen for edubuntu, and ubuntu-server - - Add support for gobuntu. - * ubuntu-sync: - - Ensure that powerpc isos are retrieved from the ports directory of - the appropriate origin. - - Ensure correct flavours are chosen for edubuntu, and - ubuntu-server. - - Add support for gobuntu. + * Removed ubuntu-cd and ubuntu-sync. They are currently undergoing + major reworking, and will be re-included when ready. - -- Luke Yelavich Thu, 12 Jul 2007 16:38:54 +1000 + -- Luke Yelavich Sat, 4 Aug 2007 08:30:01 +1000 ubuntu-dev-tools (0.1) gutsy; urgency=low diff --git a/ubuntu-cd b/ubuntu-cd deleted file mode 100755 index 74cb526..0000000 --- a/ubuntu-cd +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -set -e - -# Get the latest CD snapshot release. -Distro="$1" -if [ -z "$Distro" ]; then - echo "Which distro?" >&2 - exit 1 -fi -Release="$2" -if [ -z "$Release" ]; then - echo "Which ISO release?" >&2 - exit 1 -fi -Ver=gutsy -Code=tribe - -cd ~/distros/ubuntu/"${Distro}"/"${Ver}" -mkdir -p "${Code}"-"${Release}" -cd "${Code}"-"${Release}" - -cp ../*.iso . || true - -if [ "${Distro}" == "ubuntu" ]; then - Origin="releases" - Flavors="alternate desktop server" - Archs="i386" - #Archs="i386 amd64 powerpc" -elif [ "${Distro}" == "edubuntu" ]; then - Origin="${Distro}/releases" - Flavors="desktop server serveraddon" - Archs="i386" - #Archs="i386 amd64" -elif [ "${Distro}" == "ubuntu-server" ]; then - Origin="releases" - Flavors="server" - Archs="i386" - #Archs="i386 amd64" -elif [ "${Distro}" == "gobuntu" ]; then - Origin="${Distro}/releases" - Flavors="alternate" - Archs="i386" - #Archs="i386 amd64 powerpc" -else - Origin="${Distro}/releases" - Flavors="alternate desktop" - Archs="i386" - #Archs="i386 amd64" -fi - -for arch in $Archs; do - for flavor in $Flavors; do - rsync "rsync://cdimage.ubuntu.com/cdimage/${Origin}/${Ver}/${Code}-${Release}/${Ver}-${flavor}-${arch}.iso" "${Ver}-${flavor}-${arch}.iso" - done -done diff --git a/ubuntu-sync b/ubuntu-sync deleted file mode 100755 index e16fac7..0000000 --- a/ubuntu-sync +++ /dev/null @@ -1,105 +0,0 @@ -#!/bin/bash -set -e - -# Syncronise new ubuntu CD images, depending on command-line flags given. -# If none are given, sync all images. - -if [ -e /tmp/ubuntu-sync.01532-lock ]; then - echo "Another copy of the script is running." - exit 1 -fi - -Ubuntu_Distro_Dir="$HOME/distros/ubuntu" -Dist=gutsy - -# Only sync the oldest images, and only i386 images if low bandwidth. -Low_Bandwidth=0 - -while [ -n "$1" ]; do - case "$1" in - -u) - Image_Sets="${Image_Sets} ubuntu" - break - ;; - -k) - Image_Sets="${Image_Sets} kubuntu" - break - ;; - -e) - Image_Sets="${Image_Sets} edubuntu" - break - ;; - -x) - Image_Sets="${Image_Sets} xubuntu" - break - ;; - -g) - Image_Sets="${Image_Sets} gobuntu" - break - ;; - -s) - Image_Sets="${Image_Sets} ubuntu-server" - break - ;; - esac - shift || true -done -if [ "${Low_Bandwidth}" == 1 ] && [ "${Image_Sets}" == "" ]; then - cd "${Ubuntu_Distro_Dir}" - Image_Sets=`ls -td1 */"${Dist}" | tail -1 | cut -f 1 -d /` -elif [ "${Low_Bandwidth}" == 0 ] && [ "${Image_Sets}" == "" ]; then - Image_Sets="ubuntu xubuntu ubuntu-server edubuntu kubuntu gobuntu" -fi - -# Sync images. -if [ ! -e /tmp/ubuntu-sync.01532-lock ]; then - touch /tmp/ubuntu-sync.01532-lock -fi -for Current_Set in ${Image_Sets} -do - mkdir -p "${Ubuntu_Distro_Dir}/${Current_Set}/${Dist}"/.partial - cd "${Ubuntu_Distro_Dir}/${Current_Set}/${Dist}" - - # Figure out remote path - if [ "${Current_Set}" == "ubuntu" ]; then - Origin="" - else - Origin="${Current_Set}" - fi - - # Which flavors to download - if [ "${Current_Set}" == "edubuntu" ]; then - Flavors="desktop server serveraddon" - elif [ "${Current_Set}" == "ubuntu-server" ]; then - Flavors="server" - elif [ "${Current_Set}" == "gobuntu" ]; then - Flavors="alternate" - else - Flavors="alternate desktop" - fi - - # Which archs to download - if [ "${Low_Bandwidth}" == 0 ]; then - Archs="i386 powerpc" - #Archs="i386 amd64 powerpc" - else - Archs="i386" - fi - - for arch in $Archs; do - for flavor in $Flavors; do - if [ "${flavor}" == "desktop" ]; then - Is_Desktop=-live - fi - if [ "${arch}" == "powerpc" ]; then - Is_Ports=ports - fi - if rsync --partial-dir="${Ubuntu_Distro_Dir}/${Current_Set}/${Dist}/.partial" "rsync://cdimage.ubuntu.com/cdimage/${Origin}/${Is_Ports}/daily${Is_Desktop}/current/${Dist}-${flavor}-${arch}.iso" "${Dist}-${flavor}-${arch}.iso" ; then - date > "${flavor}-${arch}-sync" - fi - unset Is_Desktop - unset Is_Ports - done - done -done -rm /tmp/ubuntu-sync.01532-lock From 8a755560ad5d3f94363f1e8bd4b49451f1d5a40a Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Sat, 4 Aug 2007 00:49:38 +0200 Subject: [PATCH 22/96] Rewrote suspicious-source --- README | 6 ++++++ suspicious-source | 48 +++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 6 deletions(-) diff --git a/README b/README index c643e00..596a33d 100644 --- a/README +++ b/README @@ -10,3 +10,9 @@ check-symbols [] what-patch ... will check what patching system is used by a package. You need to be in it's source directory in order that it works. + +suspicious-source + ... will 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. diff --git a/suspicious-source b/suspicious-source index 381bef6..d47c8c3 100755 --- a/suspicious-source +++ b/suspicious-source @@ -1,12 +1,48 @@ -#!/bin/sh -e - -# Author: Martin Pitt -# License: GPL v2 or later +#!/bin/bash +# Copyright 2007 (C) Siegfried-A. Gevatter +# Based upon a script by Martin Pitt +# License: GPL v3 or later # -# Output a list of files which are not common source files. This +# 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 'prefered form of modification' that the GPL and other # licenses require. -find -type f ! \( -name '*.h' -o -name '*.c' -o -name '*.cc' -o -name '*.cpp' -o -name Makefile -o -name configure -o -name '*.3' -o -name '*.html' -o -name '*.txt' -o -name '*.xml' -o -name Makefile.am -o -name Makefile.in -o -name '*.m4' -o -name config.sub -o -name config.guess -o -name ltmain.sh -o -name depcomp -o -name configure.ac -o -name *.py -o -name NEWS -o -name README -o -name INSTALL -o -name TODO -o -name ChangeLog -o -name '*.docbook' -o -name '*.png' -o -name '*.desktop' -o -name '*.ui' -o -name '*.po' -o -name '*.py' -o -name '*.svg' -o -name '*.bmp' -o -name '*.gif' -o -name '*.pot' -o -name '*.xpm' -o -name '*.glade' -o -name '*.gladep' \) +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" +IGNORE=".bzr CVS .svn debian" + + +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 From 49cbb653f30cdf381580b73e3b0a2df72c3238ec Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Sat, 4 Aug 2007 13:52:30 +0200 Subject: [PATCH 23/96] Complete the README file. Unify all script headers. Delete pbuilder-template (same as -dist). Change my mail address. --- 404main | 5 +++++ AUTHORS | 2 +- README | 36 ++++++++++++++++++++++++++++++------ check-symbols | 5 ++++- dch-repeat | 4 +++- get-branches | 11 ++++++----- mk-sbuild-lv | 12 +++++++----- pbuilder-dist | 21 ++++++++++++++++----- pbuilder-template | 36 ------------------------------------ pull-debian-debdiff | 11 +++++++---- suspicious-source | 9 ++++----- update-maintainer | 19 ++++++++++--------- 12 files changed, 93 insertions(+), 78 deletions(-) delete mode 100644 pbuilder-template diff --git a/404main b/404main index bfa5a9c..7e4a7a7 100755 --- a/404main +++ b/404main @@ -1,4 +1,9 @@ #!/usr/bin/python +# The author of this script is unknown +# License: Public Domain +# +# This script is used to check in what components ("main", "restricted", +# "universe" or "multiverse") the dependencies of a package are. import subprocess import sys diff --git a/AUTHORS b/AUTHORS index 33f46e2..9abfcf0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,5 +4,5 @@ Albin Tonnerre Michael Bienia Kees Cook Martin Pitt -Siegfried-A. Gevatter +Siegfried-A. Gevatter Jamin W. Collins diff --git a/README b/README index 596a33d..976ad82 100644 --- a/README +++ b/README @@ -2,17 +2,41 @@ == Ubuntu Development Tools == ===================== +404main + ... will check in what components the dependencies of are. + check-symbols [] ... will compare and give you a diff of the exported symbols of all .so files in all binary packages of . is not mandatory and set to /var/cache/pbuilder/result by default. +dch-repeat [--help] + ... will repeat a change log into an older release. + +get-branches [checkout|branch] + ... will branch / checkout all the Bazaar branches in a Launchpad team. + +mk-sbuild-lv + ... will create LVM snapshot chroots via schroot and sbuild. It assumes that + sbuild has not be installed and configured before. + +pbuilder-dist [create|update|build|clean|login|execute] + ... is a wrapper to use pbuilder with many different distributions / versions. + It has to be renamed to something like pbuilder-feisty, pbuilder-gutsy, etc. + +pull-debian-debdiff + ... will attempt to find and download a specific version of a Debian package + and its immediate parent to generate a debdiff. + +suspicious-source + ... will 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. + +update-maintainer + ... will update the maintainer field of an Ubuntu package to match the + DebianMaintainerField specification. + what-patch ... will check what patching system is used by a package. You need to be in it's source directory in order that it works. - -suspicious-source - ... will 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. diff --git a/check-symbols b/check-symbols index d27e038..cdc07d9 100755 --- a/check-symbols +++ b/check-symbols @@ -1,7 +1,10 @@ #!/bin/bash # Copyright 2006-2007 (C) Daniel Holbach -# Modified by Siegfried-A. Gevatter +# Modified by Siegfried-A. Gevatter # License: GPLv2 +# +# This script is used to get a diff of the exported symbols of all .so files in +# every binary package of package $1. PACKAGES="`apt-cache showsrc $1 | grep ^Binary | sed 's/Binary\:\ //g;s/\,//g' | sort -u`" DEBLINE="" diff --git a/dch-repeat b/dch-repeat index 58b31b2..655edd5 100755 --- a/dch-repeat +++ b/dch-repeat @@ -1,6 +1,7 @@ #!/usr/bin/perl -# Copyright 2007, Kees Cook +# Copyright 2007 (C) Kees Cook # License: GPLv2 +# # This script is used to repeat a change log into an older release. It # expects that --build-tree is layed out with each Ubuntu release as a # separate directory ("feisty", "edgy", etc). @@ -9,6 +10,7 @@ # $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; diff --git a/get-branches b/get-branches index 14fb1c4..b168ea4 100755 --- a/get-branches +++ b/get-branches @@ -1,8 +1,10 @@ #!/usr/bin/python - -# (C) 2007, Canonical -# Daniel Holbach -# GPLv3 +# Copyright 2007 (C) Canonical Ltd. +# Created by Daniel Holbach +# License: GPLv3 +# +# This script is used to checkout or branch all the Bazaar branches +# in a Launchpad team. import urllib2 import sys @@ -65,4 +67,3 @@ def main(): if __name__ == "__main__": main() - diff --git a/mk-sbuild-lv b/mk-sbuild-lv index a71a9cb..376a90c 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -1,9 +1,13 @@ #!/bin/bash -# Script to create LVM snapshot chroots via schroot and sbuild. +# Copyright 2006-2007 (C) Canonical Ltd. +# Created by Kees Cook +# License: GPLv2 +# +# This script creates LVM snapshot chroots via schroot and sbuild. # Much love to "man sbuild-setup", https://wiki.ubuntu.com/PbuilderHowto, # and https://help.ubuntu.com/community/SbuildLVMHowto. # -# This script assumes that sbuild has not be installed and configured before. +# It assumes that sbuild has not be installed and configured before. # # If using schroot earlier than 1.1.4-1, it's a good idea to apply the # process-cleaning patch to /etc/schroot/setup.d/10mount. Without this, any @@ -17,9 +21,7 @@ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392992 # # Version: 0.11 -# -# Copyright 2006-2007, Canonical Ltd, Kees Cook -# License: GPLv2 + set -e # Make sure we've got a regular user diff --git a/pbuilder-dist b/pbuilder-dist index d4230d9..0f2cf92 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -1,19 +1,30 @@ #!/bin/sh -# script from Jamin W. Collins BTS: #255165 -# name this script 'pbuilder-dapper', 'pbuilder-edgy', 'pbuilder-feisty' etc. +# Copyright (C) Jamin W. Collins +# License: Public Domain # -# The only variable you really might need to change is BASE_DIR if you don't want pbuilder stuff in ~/ +# This script is a wrapper to use pbuilder with many different +# distributions / versions. +# +# Name this script 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy', etc. +# +# The only variable you really might need to change is BASE_DIR, if you +# don't want pbuilder stuff in your home directory. +# +# BTS: #255165 + +BASE_DIR="$HOME/pbuilder" 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 + +if [[ $PROCEED = true ]]; then shift if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ] then mkdir -p $BASE_DIR/${DISTRIBUTION}_result/ diff --git a/pbuilder-template b/pbuilder-template deleted file mode 100644 index b9d0904..0000000 --- a/pbuilder-template +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# Script from Jamin W. Collins BTS: #255165 -# Name this script 'pbuilder-dapper', 'pbuilder-edgy', 'pbuilder-feisty', etc. -# -# The only variable you really might need to change is BASE_DIR if you don't want pbuilder stuff in ~/ - -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 diff --git a/pull-debian-debdiff b/pull-debian-debdiff index 8d58e60..55b3436 100755 --- a/pull-debian-debdiff +++ b/pull-debian-debdiff @@ -1,12 +1,16 @@ #!/usr/bin/perl -# Copyright 2007 Kees Cook -# License GPLv2 +# Copyright 2007 (C) Kees Cook +# License: GPLv2 +# # This script attempts to find and download a specific version of a Debian # package and its immediate parent to generate a debdiff. -# Requires: devscripts diffstat dpkg-dev +# +# Requirements: devscripts diffstat dpkg-dev +# # Cleanups needed: # - general cleanup # - parse diff.gz/orig.tar.gz from .dsc file instead of guessing version + use strict; use warnings; @@ -90,7 +94,6 @@ sub download_source } - my $pkg = $ARGV[0]; my $version = $ARGV[1]; my $skip = $ARGV[2] || 1; diff --git a/suspicious-source b/suspicious-source index d47c8c3..6fe6704 100755 --- a/suspicious-source +++ b/suspicious-source @@ -1,12 +1,11 @@ #!/bin/bash -# Copyright 2007 (C) Siegfried-A. Gevatter +# Copyright 2007 (C) Siegfried-A. Gevatter # Based upon a script by Martin Pitt # License: GPL v3 or later # -# 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 'prefered form of modification' that the GPL and other -# licenses require. +# 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 "prefered 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 \ diff --git a/update-maintainer b/update-maintainer index 1759651..460e67d 100755 --- a/update-maintainer +++ b/update-maintainer @@ -1,8 +1,9 @@ #!/bin/bash -#update-maintainer -#small - thus not perfect - script to update maintainer field in ubuntu packages -#written and (c) 2007 by Albin Tonnerre (Lutin) -#this code is under the GNU GPL V2 licence +# Copyright 2007 (C) Albin Tonnerre (Lutin) +# License: GPLv2 +# +# This script is used to update the maintainer field of an Ubuntu package +# to match the DebianMaintainerField specification. if [ ${#@} -ge 1 ]; then for argv in "$@"; do @@ -25,14 +26,14 @@ if [ -f debian/control -a -f debian/changelog ]; then elif [ -f control -a -f changelog ]; then DEBIANDIR=. else - echo "Please run that script in the source folder" >&2 && exit 1 + echo "Please run that script in the source folder." >&2 && exit 1 fi IGNORE_DOMAINS="ubuntu\.com|ubuntu\.com\.au" [ -n "`head -n 1 $DEBIANDIR/changelog | grep -E "\(*ubuntu.*\)"`" ] && [ -z "`grep -E "^Maintainer: .*($IGNORE_DOMAINS)>" $DEBIANDIR/control`" ] || \ -{ echo "Not an ubuntu package or already maintained by the ubuntu team" >&2 && \ +{ echo "Not an Ubuntu package or already maintained by the Ubuntu team." >&2 && \ exit 1; } mail=$(grep -E "^Maintainer" $DEBIANDIR/control | sed -r 's/.*<(.*)>/\1/') @@ -46,7 +47,7 @@ if [ -z "$email" ]; then DISTRO=$(head -n 1 $DEBIANDIR/changelog|sed -r 's/.*\) (.*);.*/\1/' | cut -d'-' -f1) pkgline=$(apt-cache madison `head -n 1 $DEBIANDIR/changelog | cut -d' ' \ -f1`| grep -m 1 "$DISTRO.*Sources") - [ -z "$pkgline" ] && echo "You don't have $DISTRO in your source repos" \ + [ -z "$pkgline" ] && echo "You don't have $DISTRO in your source repos." \ >&2 && exit 1 section=$(echo $pkgline | grep -Eo "main|universe|multiverse|restricted") fi @@ -59,5 +60,5 @@ fi sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/control [ -f $DEBIANDIR/control.in ] && sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/control.in -dch "Modify Maintainer value to match Debian-Maintainer-Field Spec" -echo "Maintainer changed to $email" +dch "Modify Maintainer value to match the DebianMaintainerField specification." +echo "Maintainer changed to $email." From 3d458054e6282bd633d6bc4a245a94cb3cb5e129 Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Tue, 7 Aug 2007 16:05:50 +0200 Subject: [PATCH 24/96] Improved (mainly rewrote) pbuilder-dist. (Other insignificant changes.) --- pbuilder-dist | 113 ++++++++++++++++++++++++++++++++++------------ suspicious-source | 2 +- update-maintainer | 2 +- what-patch | 2 +- 4 files changed, 87 insertions(+), 32 deletions(-) diff --git a/pbuilder-dist b/pbuilder-dist index 0f2cf92..cc77b12 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -1,11 +1,15 @@ #!/bin/sh # Copyright (C) Jamin W. Collins -# License: Public Domain +# and Jordan Mantha +# Copyright 2007 (C) Siegfried-A. Gevatter +# License: GPLv2 or later # # This script is a wrapper to use pbuilder with many different # distributions / versions. # -# Name this script 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy', etc. +# If you want to use this copy of the script only for a single distribution +# / version, rename it to 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy', +# or whatever it is. # # The only variable you really might need to change is BASE_DIR, if you # don't want pbuilder stuff in your home directory. @@ -14,34 +18,85 @@ BASE_DIR="$HOME/pbuilder" -OPERATION=$1 -DISTRIBUTION=`basename $0 | cut -f2 -d '-'` -PROCEED=false +if [ ! -z `echo \`basename $0\` | grep '-'` ] +then + if [ $# -lt 1 ] + then + echo "Insufficient number of arguments." + echo "Usage: $0 " + exit 1 + fi -case $OPERATION in - create|update|build|clean|login|execute ) - PROCEED=true - ;; + DISTRIBUTION=`basename $0 | cut -f2 -d '-'` + OPERATION=$1 + shift 1 +else + if [ $# -lt 2 ] + then + echo "Insufficient number of arguments." + echo "Usage: $0 " + exit 1 + fi + + DISTRIBUTION=$1 + OPERATION=$2 + shift 2 +fi + + +case $DISTRIBUTION in + #warty|hoary|breezy) + dapper|edgy|feisty|gutsy) + ARCHIVE="http://archive.ubuntu.com/ubuntu" + COMPONENTS="universe multiverse" + ;; + + oldstable|sarge|stable|etch|testing|lenny|unstable|sid|experimental) + ARCHIVE="http://ftp.debian.org" + COMPONENTS="main contrib non-free" + ;; + + *) + echo "Warning: Unknown distribution «$DISTRIBUTION»." + echo -n "Continue [y/N]? " + read continue + + if [ "$continue" != 'y' ] && [ "$continue" != 'Y' ] + then + echo " Aborting..." + exit 1 + fi + + ARCHIVE="http://archive.ubuntu.com/ubuntu" + COMPONENTS="universe multiverse" + ;; 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 + +case $OPERATION in + create|update|build|clean|login|execute) + ;; + + *) + echo "Unrecognized argument. Please use one of those:" + echo " create" + echo " update" + echo " build" + echo " clean" + echo " login" + echo " execute" + exit 1 + ;; +esac + + +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 $ARCHIVE $DISTRIBUTION $COMPONENTS" $@ diff --git a/suspicious-source b/suspicious-source index 6fe6704..82d2b45 100755 --- a/suspicious-source +++ b/suspicious-source @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 2007 (C) Siegfried-A. Gevatter # Based upon a script by Martin Pitt -# License: GPL v3 or later +# License: GPLv3 or later # # 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 diff --git a/update-maintainer b/update-maintainer index 460e67d..16f0fff 100755 --- a/update-maintainer +++ b/update-maintainer @@ -26,7 +26,7 @@ if [ -f debian/control -a -f debian/changelog ]; then elif [ -f control -a -f changelog ]; then DEBIANDIR=. else - echo "Please run that script in the source folder." >&2 && exit 1 + echo "Please execute «$0» in the source folder." >&2 && exit 1 fi IGNORE_DOMAINS="ubuntu\.com|ubuntu\.com\.au" diff --git a/what-patch b/what-patch index 7f12c5b..821aec8 100755 --- a/what-patch +++ b/what-patch @@ -1,6 +1,6 @@ #!/bin/bash # Copyright 2006-2007 (C) Kees Cook -# Modified by Siegfried-A. Gevatter +# Modified by Siegfried-A. Gevatter # License: GPLv2 if [[ -d debian ]]; then From b6435c46854394d6404f03f25330d76f63a14d1d Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Tue, 7 Aug 2007 20:20:03 +0200 Subject: [PATCH 25/96] pbuilder-dist: filename related improvements. Updated AUTHORS, and sorted them A-Z. Updated debian/copyright and fixed a problem there (some scripts don't have the 'or later' clause). --- AUTHORS | 13 +- COPYING | 341 ----------------------------------------------- debian/changelog | 2 +- debian/copyright | 32 +++-- pbuilder-dist | 8 +- 5 files changed, 32 insertions(+), 364 deletions(-) delete mode 100644 COPYING diff --git a/AUTHORS b/AUTHORS index 9abfcf0..f57ac93 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,8 +1,9 @@ -Daniel Holbach -Luke Yelavich Albin Tonnerre -Michael Bienia -Kees Cook -Martin Pitt -Siegfried-A. Gevatter +Daniel Holbach Jamin W. Collins +Jordan Mantha +Luke Yelavich +Michael Bienia +Martin Pitt +Kees Cook +Siegfried-A. Gevatter diff --git a/COPYING b/COPYING deleted file mode 100644 index 1bb399f..0000000 --- a/COPYING +++ /dev/null @@ -1,341 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin St, 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 Library 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. - - - Copyright (C) - - 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 St, 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. - - , 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 Library General -Public License instead of this License. - diff --git a/debian/changelog b/debian/changelog index c390e0c..26a65c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ubuntu-dev-tools (0.2) UNRELEASED; urgency=low +ubuntu-dev-tools (0.2) gutsy; urgency=low [ Martin Pitt ] * Add suspicious-source: Output a list of files which are not common source diff --git a/debian/copyright b/debian/copyright index f530ee4..f162fb1 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,31 +1,35 @@ This package was re-debianized by Daniel Holbach on Fri, 01 Jun 2007 11:30:08 +0200. -Upstream Author: - Daniel Holbach - Luke Yelavich +Upstream Author: Albin Tonnerre + Daniel Holbach + Jamin W. Collins + Jordan Mantha + Luke Yelavich + Martin Pitt Michael Bienia Kees Cook - Martin Pitt + Siegfried-A. Gevatter -Copyright: + +Copyright: + Albin Tonnerre 2006-2007 Daniel Holbach 2006-2007 Luke Yelavich 2006-2007 - Albin Tonnerre 2006-2007 + Martin Pitt 2007 Michael Bienia 2006-2007 Kees Cook 2006-2007 - Martin Pitt 2007 + Siegfried-A. Gevatter 2007 Licenses: -check-symbols, dch-repeat, mk-sbuild-lv, pull-debian-diff, suspicious-source, +check-symbols, dch-repeat, mk-sbuild-lv, pbuilder-dist, pull-debian-debdiff, update-maintainer and what-patch are licensed under GPLv2: 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; either version 2 of the License, or - (at your option) any later version. + 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 @@ -39,12 +43,11 @@ update-maintainer and what-patch are licensed under GPLv2: On Debian systems, the complete text of the GNU General Public License v2 can be found in `/usr/share/common-licenses/GPL-2'. -get-branches is licensed under GPLv3: +get-branches and suspicious-source are licensed under GPLv3: 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. + 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 @@ -56,3 +59,6 @@ get-branches is licensed under GPLv3: On Debian systems, the complete text of the GNU General Public License v3 can be found in `/usr/share/common-licenses/GPL-3'. + +The following of the scripts can be used, at your option, regarding any later version +of the previously specified license: pbuilder-dist and suspicious-source. diff --git a/pbuilder-dist b/pbuilder-dist index 66fb3d7..cb35817 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -9,7 +9,8 @@ # # If you want to use this copy of the script only for a single distribution # / version, rename it to 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy', -# or whatever it is. +# or whatever it is. If you have an amd64, you can also use names like +# 'pbuilder-feisty-i386', etc. # # The only variable you really might need to change is BASE_DIR, if you # don't want pbuilder stuff in your home directory. @@ -20,7 +21,7 @@ BASE_DIR="$HOME/pbuilder" ARCH=`dpkg-architecture | grep "DEB_HOST_ARCH=" | cut -f2 -d '='` -if [ ! -z `echo \`basename $0\` | grep '-'` ] +if [ ! -z `echo \`basename $0\` | grep -- '-'` ] && [ `basename $0` != 'pbuilder-dist' ] then if [ $# -lt 1 ] then @@ -28,7 +29,8 @@ then echo "Usage: $0 "$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )"" exit 1 fi - + + BINARCH=`basename $0 | cut -f3 -d '-'` DISTRIBUTION=`basename $0 | cut -f2 -d '-'` else if [ $# -lt 2 ] From e2bbdb1bb6a0ef76d6f2e6bf62f25d7c5decca2e Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Tue, 7 Aug 2007 21:58:34 +0200 Subject: [PATCH 26/96] pbuilder-dist: added an option to disable universe/multiverse --- pbuilder-dist | 69 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 18 deletions(-) diff --git a/pbuilder-dist b/pbuilder-dist index cb35817..6daf90d 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -5,7 +5,8 @@ # License: GPLv2 or later # # This script is a wrapper to use pbuilder with many different -# distributions / versions. +# distributions / versions. (It was originally created because of +# bug #255165 in Debian.) # # If you want to use this copy of the script only for a single distribution # / version, rename it to 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy', @@ -14,20 +15,29 @@ # # The only variable you really might need to change is BASE_DIR, if you # don't want pbuilder stuff in your home directory. -# -# BTS: #255165 +# Base directory where pbuilder will put all the files it creates BASE_DIR="$HOME/pbuilder" +# Enable additional repositories by default? (universe and multiverse in Ubuntu, +# contrib and non-free in Debian.) +EXTRACOMP=1 + + ARCH=`dpkg-architecture | grep "DEB_HOST_ARCH=" | cut -f2 -d '='` +help() +{ + echo "Insufficient number of arguments." + echo "Usage: $0 "$( [ "$1" != 'show-dist-flag' ] || echo " " )$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )"[mainonly|allcomp] " + exit 1 +} + if [ ! -z `echo \`basename $0\` | grep -- '-'` ] && [ `basename $0` != 'pbuilder-dist' ] then if [ $# -lt 1 ] then - echo "Insufficient number of arguments." - echo "Usage: $0 "$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )"" - exit 1 + help fi BINARCH=`basename $0 | cut -f3 -d '-'` @@ -35,15 +45,14 @@ then else if [ $# -lt 2 ] then - echo "Insufficient number of arguments." - echo "Usage: $0 ""$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )""" - exit 1 + help show-dist-flag fi DISTRIBUTION=$1 shift 1 fi + if [ $1 = "i386" ] || [ $1 = "amd64" ] then if [ $ARCH = "amd64" ] @@ -56,18 +65,41 @@ then shift 1 fi -OPERATION=$1 + +if [ $1 = "mainonly" ] +then + EXTRACOMP=0 + shift 1 +elif [ $1 = "allcomp" ] +then + EXTRACOMP=1 + shift 1 +fi + + +distdata() +{ + if [ "$1" = "debian" ] + then + # Set Debian specific data + ARCHIVE="http://ftp.debian.org" + COMPONENTS="main"$( [ $EXTRACOMP = 0 ] || echo " contrib non-free" ) + else + # Set Ubuntu specific data + ARCHIVE="http://archive.ubuntu.com/ubuntu" + COMPONENTS="main restricted"$( [ $EXTRACOMP = 0 ] || echo " universe multiverse" ) + fi +} + case $DISTRIBUTION in #warty|hoary|breezy) dapper|edgy|feisty|gutsy) - ARCHIVE="http://archive.ubuntu.com/ubuntu" - COMPONENTS="universe multiverse" + distdata ubuntu ;; oldstable|sarge|stable|etch|testing|lenny|unstable|sid|experimental) - ARCHIVE="http://ftp.debian.org" - COMPONENTS="main contrib non-free" + distdata debian ;; *) @@ -77,16 +109,17 @@ case $DISTRIBUTION in if [ "$continue" != 'y' ] && [ "$continue" != 'Y' ] then - echo " Aborting..." + echo "Aborting..." exit 1 fi - ARCHIVE="http://archive.ubuntu.com/ubuntu" - COMPONENTS="universe multiverse" + distdata ;; esac +OPERATION=$1 + case $OPERATION in create|update|build|clean|login|execute) ;; @@ -113,5 +146,5 @@ sudo pbuilder $OPERATION \ --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \ --distribution $DISTRIBUTION \ $( [ -z $BINARCH ] || echo "--binary-arch $BINARCH" ) \ - --buildresult $BASE_DIR/$DISTRIBUTION_result \ + --buildresult $BASE_DIR/${DISTRIBUTION}_result \ --othermirror "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" $@ From d74688f04c1f55bc8d309319117678251a136385 Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Wed, 8 Aug 2007 21:22:44 +0200 Subject: [PATCH 27/96] pbuilder-dist: fixed problem when using more than one architecture. --- pbuilder-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbuilder-dist b/pbuilder-dist index 6daf90d..2c0e1f0 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -143,7 +143,7 @@ then fi sudo pbuilder $OPERATION \ - --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \ + --basetgz $BASE_DIR/$DISTRIBUTION-$( ([ "$BINARCH" != "" ] && echo $BINARCH) || echo $ARCH )-base.tgz \ --distribution $DISTRIBUTION \ $( [ -z $BINARCH ] || echo "--binary-arch $BINARCH" ) \ --buildresult $BASE_DIR/${DISTRIBUTION}_result \ From e5e47f31173b373d831c941f82e15f44e33b8112 Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Wed, 8 Aug 2007 22:21:17 +0200 Subject: [PATCH 28/96] (pbuilder-dist: improved architecture detection, thanks to geser.) --- pbuilder-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbuilder-dist b/pbuilder-dist index 2c0e1f0..b3e849b 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -24,7 +24,7 @@ BASE_DIR="$HOME/pbuilder" EXTRACOMP=1 -ARCH=`dpkg-architecture | grep "DEB_HOST_ARCH=" | cut -f2 -d '='` +ARCH=`dpkg-architecture -qDEB_HOST_ARCH` help() { From b358cfe47c379a6c8875ef71995cb3380c9c498a Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Wed, 8 Aug 2007 23:55:10 +0200 Subject: [PATCH 29/96] pbuilder-dist: fixed another problem when working with more than one architecture. Added an option to store the last log. Added an option to use the same cache directory for .deb's as apt-get when possible. --- pbuilder-dist | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/pbuilder-dist b/pbuilder-dist index b3e849b..d07d2f6 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -23,13 +23,22 @@ BASE_DIR="$HOME/pbuilder" # contrib and non-free in Debian.) EXTRACOMP=1 +# Save the log of the last operation in a dot-file? ('.lastlog' in BASE_DIR) +SAVELOG=0 + +# Allow this script to use /var/cache/apt/archives/ when possible +SYSCACHE=1 + + +################################ ARCH=`dpkg-architecture -qDEB_HOST_ARCH` +SYSDIST=`lsb_release -cs` help() { echo "Insufficient number of arguments." - echo "Usage: $0 "$( [ "$1" != 'show-dist-flag' ] || echo " " )$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )"[mainonly|allcomp] " + echo "Usage: $0 "$( [ "$1" != 'show-dist-flag' ] || echo " " )$( [ $ARCH != "amd64" ] || echo "[i386|amd64] " )"[mainonly|allcomp] [withlog|nolog] " exit 1 } @@ -55,8 +64,7 @@ fi if [ $1 = "i386" ] || [ $1 = "amd64" ] then - if [ $ARCH = "amd64" ] - then + if [ $ARCH = "amd64" ]; then BINARCH=$1 else echo "Warning: Architecture switching is not supported on your system; ignoring argument." @@ -66,17 +74,24 @@ then fi -if [ $1 = "mainonly" ] -then +if [ $1 = "mainonly" ]; then EXTRACOMP=0 shift 1 -elif [ $1 = "allcomp" ] -then +elif [ $1 = "allcomp" ]; then EXTRACOMP=1 shift 1 fi +if [ $1 = "withlog" ]; then + SAVELOG=0 + shift 1 +elif [ $1 = "nolog" ]; then + SAVELOG=1 + shift 1 +fi + + distdata() { if [ "$1" = "debian" ] @@ -136,15 +151,23 @@ case $OPERATION in ;; esac +FOLDERBASE="${DISTRIBUTION}-$( ([ "$BINARCH" != "" ] && echo $BINARCH) || echo $ARCH )" -if [ ! -d $BASE_DIR/${DISTRIBUTION}_result ] +if [ ! -d $BASE_DIR/${FOLDERBASE}_result ] then - mkdir -p $BASE_DIR/${DISTRIBUTION}_result + mkdir -p $BASE_DIR/${FOLDERBASE}_result +fi + +if [ $SYSCACHE != 0 ] && [ "$SYSDIST" = "$DISTRIBUTION" ] && [ "$ARCH" = "$BINARCH" -o -z $BINARCH ] +then + DEBCACHE='/var/cache/apt/archives/' fi sudo pbuilder $OPERATION \ - --basetgz $BASE_DIR/$DISTRIBUTION-$( ([ "$BINARCH" != "" ] && echo $BINARCH) || echo $ARCH )-base.tgz \ + --basetgz $BASE_DIR/$FOLDERBASE-base.tgz \ --distribution $DISTRIBUTION \ $( [ -z $BINARCH ] || echo "--binary-arch $BINARCH" ) \ - --buildresult $BASE_DIR/${DISTRIBUTION}_result \ + $( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \ + $( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \ + --buildresult $BASE_DIR/$FOLDERBASE_result \ --othermirror "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" $@ From afc07098e38968498e0f0a3da5889cdf03a0b6ad Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Thu, 9 Aug 2007 19:20:36 +0200 Subject: [PATCH 30/96] pbuilder-dist: some fixes. --- pbuilder-dist | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pbuilder-dist b/pbuilder-dist index d07d2f6..7dfe1d2 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -84,10 +84,10 @@ fi if [ $1 = "withlog" ]; then - SAVELOG=0 + SAVELOG=1 shift 1 elif [ $1 = "nolog" ]; then - SAVELOG=1 + SAVELOG=0 shift 1 fi @@ -137,6 +137,7 @@ OPERATION=$1 case $OPERATION in create|update|build|clean|login|execute) + shift 1 ;; *) @@ -165,9 +166,10 @@ fi sudo pbuilder $OPERATION \ --basetgz $BASE_DIR/$FOLDERBASE-base.tgz \ + $@ \ --distribution $DISTRIBUTION \ $( [ -z $BINARCH ] || echo "--binary-arch $BINARCH" ) \ $( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \ $( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \ --buildresult $BASE_DIR/$FOLDERBASE_result \ - --othermirror "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" $@ + --othermirror "\"deb $ARCHIVE $DISTRIBUTION $COMPONENTS\"" From 78e374dc940b816d0ac497e2a028cf05fcf075cd Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Thu, 9 Aug 2007 19:42:40 +0200 Subject: [PATCH 31/96] pbuilder-dist: some fixes. --- pbuilder-dist | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pbuilder-dist b/pbuilder-dist index d07d2f6..889a714 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -12,9 +12,6 @@ # / version, rename it to 'pbuilder-dapper', 'pbuilder-feisty', 'pbuilder-gutsy', # or whatever it is. If you have an amd64, you can also use names like # 'pbuilder-feisty-i386', etc. -# -# The only variable you really might need to change is BASE_DIR, if you -# don't want pbuilder stuff in your home directory. # Base directory where pbuilder will put all the files it creates BASE_DIR="$HOME/pbuilder" @@ -84,10 +81,10 @@ fi if [ $1 = "withlog" ]; then - SAVELOG=0 + SAVELOG=1 shift 1 elif [ $1 = "nolog" ]; then - SAVELOG=1 + SAVELOG=0 shift 1 fi @@ -137,6 +134,7 @@ OPERATION=$1 case $OPERATION in create|update|build|clean|login|execute) + shift 1 ;; *) @@ -169,5 +167,6 @@ sudo pbuilder $OPERATION \ $( [ -z $BINARCH ] || echo "--binary-arch $BINARCH" ) \ $( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \ $( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \ - --buildresult $BASE_DIR/$FOLDERBASE_result \ - --othermirror "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" $@ + --buildresult $BASE_DIR/${FOLDERBASE}_result \ + --othermirror "\"deb $ARCHIVE $DISTRIBUTION $COMPONENTS\"" \ + $@ From 11e26cdb19999bef6eaab37e587e99474fd7a126 Mon Sep 17 00:00:00 2001 From: Albin Tonnerre Date: Sun, 12 Aug 2007 23:19:38 +0200 Subject: [PATCH 32/96] Remove unneeded part. some small improvements --- update-maintainer | 70 +++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 39 deletions(-) diff --git a/update-maintainer b/update-maintainer index 16f0fff..37e2ee1 100755 --- a/update-maintainer +++ b/update-maintainer @@ -5,18 +5,16 @@ # This script is used to update the maintainer field of an Ubuntu package # to match the DebianMaintainerField specification. -if [ ${#@} -ge 1 ]; then - for argv in "$@"; do - param=`echo $argv | cut -d'=' -f1` - value=`echo $argv | cut -d'=' -f2` - case $param in - "--path") path="$value" ;; - "--section") section=$value ;; - "--help") echo -e "Options: \n --path=PATH : specify the path of the source folder\n --section=SECTION : specify the section of the package (if the package is not yet in the archive or if you don't have the gutsy source repo in your sources.list)"; exit 0 ;; - *) echo "Bad parameter, please use --help" >&2; exit 1 ;; - esac - done -fi +for argv in "$@"; do + param=${argv%=*} + value=${argv#*=} + case $param in + "--path") path="$value" ;; + "--section") section=$value ;; + "--help") echo -e "Options: \n --path=PATH : specify the path of the source folder\n --section=SECTION : specify the section of the package (if the package is not yet in the archive or if you don't have the gutsy source repo in your sources.list)"; exit 0 ;; + *) echo "Bad parameter, please use --help" >&2; exit 1 ;; + esac +done cd ${path-.} @@ -29,36 +27,30 @@ else echo "Please execute «$0» in the source folder." >&2 && exit 1 fi -IGNORE_DOMAINS="ubuntu\.com|ubuntu\.com\.au" +[ -n "$(head -1 $DEBIANDIR/changelog | grep -E '\(*ubuntu.*\)')" ] && +! grep -E "^Maintainer: .*@.*ubuntu.*>" $DEBIANDIR/control >/dev/null || \ +{ echo "Not an Ubuntu package or already maintained by the Ubuntu team." >&2; \ +exit 1; } -[ -n "`head -n 1 $DEBIANDIR/changelog | grep -E "\(*ubuntu.*\)"`" ] && -[ -z "`grep -E "^Maintainer: .*($IGNORE_DOMAINS)>" $DEBIANDIR/control`" ] || \ -{ echo "Not an Ubuntu package or already maintained by the Ubuntu team." >&2 && \ - exit 1; } - -mail=$(grep -E "^Maintainer" $DEBIANDIR/control | sed -r 's/.*<(.*)>/\1/') -case $mail in - "adconrad@0c3.net") email="Adam Conrad " ;; - "mpitt@debian.org") email="Martin Pitt " ;; +if [ -z "$section" ]; then + DISTRO=$(sed -r '1!d;s/.*\) (.*);.*/\1/' $DEBIANDIR/changelog|cut -d'-' -f1) + pkgline=$(apt-cache madison $(head -1 $DEBIANDIR/changelog| cut -d' ' -f1)|\ + grep -m 1 "$DISTRO.*Sources") + if [ -z "$pkgline" ]; then + echo "You don't have $DISTRO in your source repos." >&2 + exit 1 + fi + section=$(echo $pkgline | grep -Eo "main|universe|multiverse|restricted") +fi +case $section in + "main"|"restricted") email="Ubuntu Core Developers " ;; + "universe"|"multiverse") email="Ubuntu MOTU Developers " ;; + *) echo "No section found for this package; aborting" >&2; exit 1 ;; esac -if [ -z "$email" ]; then - if [ -z "$section" ]; then - DISTRO=$(head -n 1 $DEBIANDIR/changelog|sed -r 's/.*\) (.*);.*/\1/' | cut -d'-' -f1) - pkgline=$(apt-cache madison `head -n 1 $DEBIANDIR/changelog | cut -d' ' \ - -f1`| grep -m 1 "$DISTRO.*Sources") - [ -z "$pkgline" ] && echo "You don't have $DISTRO in your source repos." \ - >&2 && exit 1 - section=$(echo $pkgline | grep -Eo "main|universe|multiverse|restricted") - fi - case $section in - "main"|"restricted") email="Ubuntu Core Developers " ;; - "universe"|"multiverse") email="Ubuntu MOTU Developers " ;; - esac -fi - -sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/control -[ -f $DEBIANDIR/control.in ] && sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/control.in +for file in control{,.in,.real}; do + [ -f $DEBIANDIR/$file ] && sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/$file +done dch "Modify Maintainer value to match the DebianMaintainerField specification." echo "Maintainer changed to $email." From 1da77082b521a6805d8e2ad6c33714e7cd8ce510 Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Tue, 14 Aug 2007 12:22:02 +0200 Subject: [PATCH 33/96] pbuilder-dist: fix for amd64 arch changing. --- pbuilder-dist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pbuilder-dist b/pbuilder-dist index 889a714..6050f53 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -164,7 +164,7 @@ fi sudo pbuilder $OPERATION \ --basetgz $BASE_DIR/$FOLDERBASE-base.tgz \ --distribution $DISTRIBUTION \ - $( [ -z $BINARCH ] || echo "--binary-arch $BINARCH" ) \ + $( [ -z $BINARCH ] || echo "--debootstrapopts \"--arch\" --debootstrapopts \"$BINARCH\"" ) \ $( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \ $( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \ --buildresult $BASE_DIR/${FOLDERBASE}_result \ From 5eb32eee8ec508bd11c8489fca085fb80c5af1ba Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Thu, 16 Aug 2007 20:51:42 +0200 Subject: [PATCH 34/96] Addded a manpage for pbuilder-dist and let debian/control install it. --- debian/rules | 2 + doc/pbuilder-dist.1 | 104 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 doc/pbuilder-dist.1 diff --git a/debian/rules b/debian/rules index ba84311..7ed7af5 100755 --- a/debian/rules +++ b/debian/rules @@ -4,3 +4,5 @@ DEB_PYTHON_SYSTEM := pycentral 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 diff --git a/doc/pbuilder-dist.1 b/doc/pbuilder-dist.1 new file mode 100644 index 0000000..97c0ccd --- /dev/null +++ b/doc/pbuilder-dist.1 @@ -0,0 +1,104 @@ +.\" Title: pbuilder-dist +.\" Author: Siegfried-Angel Gevatter Pujals +.\" Contact details: siggi.gevatter@gmail.com +.\" August 16, 2007 +.\" +.TH PBUILDER-DIST 1 "August 16, 2007" +.\" +.SH NAME +pbuilder-dist \- multi-distribution pbuilder wrapper +.\" +.SH SYNOPSIS +\fBpbuilder-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP] [\fBmainonly\fP|\fBallcomp\fP] +[\fBwithlog\fP|\fBnolog\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 (\fBpbuilder-\fIdistribution\fR-\fIarchitecture\fP\fR on amd64 +systems), like for example \fBpbuilder-feisty\fP, \fBpbuilder-sid\fP, \fBpbuilder-gutsy-i386\fP, etc. +.\" +.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 +\fBi386\fP / \fBamd64\fP +Only available on amd64 systems. This is optional; default is \fBamd64\fP. If \fBi386\fP is +specified, an i386 environment will be used. +.TP +\fBmainonly\fP / \fBallcomp\fP +This is optional; default is \fBallcomp\fP. If you specify \fBmainonly\fP, only packages from +the main (in Debian) or main and restricted (in Ubuntu) components will be used. With the +later one, all official components will be enabled. This only has effect when creating a new +environment. +.TP +\fBwithlog\fP / \fBnolog\fP +This is optional; default is \fBnolog\fP. When \fBwithlog\fP is used, \fBpbuilder\fP will save the +output produced by the current action in a dot-file called \fB.lastlog\fP in it's base directory +(see the FILES section). If this file already exists, it will be overwritten. +.TP +\fBoperation\fP +Replace this with the action you want \fBpbuilder\fP to do (create, update, build, clean, login +or execute). Check it's 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. +.PP +The default value of all optional parameters (except the architecture) can be changed by +editing the first lines of the script. +.\" +.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. +.\" +.SH FILES +By default, \fBpbuilder-dist\fP will store all the files it generates in \fB~/pbuilder/\fP. This can +be changed modifying the BASE_DIR value on the top of the script to any other directory you +want. If it doesn't exist, it will be created on the run. +.\" +.SH BUGS +There are no known bugs at the moment. If you experience any problem with this script +contact me on siggi.gevatter@gmail.com. Please ensure first that the problem is really this +script and not an issue with \fBpbuilder\fP. +.\" +.SH AUTHORS +\fBpbuilder-dist\fP was originally written by Jamin W. Collins and +Jordan Mantha . +.PP +On August 2007 it was mostly rewritten, and extended, by Siegfried-Angel Gevatter Pujals +. +.\" +.SH SEE ALSO +\fBpbuilder\fR, \fBpbuilderrc\fR +.\" +.SH COPYRIGHT +This manual page was written by Siegfried-Angel Gevatter Pujals (RainCT) + for YOU. +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU General Public License, +Version 2 or any later version published by the Free Software Foundation. +.PP +On Debian based systems, the complete text of the GNU General Public +License can be found in \fB/usr/share/common-licenses/GPL\fP. From 465e9facb22bd633853a2977d728c48d053b787f Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 3 Sep 2007 10:53:11 +0200 Subject: [PATCH 35/96] Add tool to automatically submit patches to Debian. --- fileindebian | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100755 fileindebian diff --git a/fileindebian b/fileindebian new file mode 100755 index 0000000..0e65ee7 --- /dev/null +++ b/fileindebian @@ -0,0 +1,72 @@ +#!/usr/bin/python + +from debian_bundle.changelog import Changelog +import re, os, sys +from tempfile import mkstemp + +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 + + 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) + (fd, debdiff) = mkstemp() + os.close(fd) + cmd = 'debdiff %s %s | filterdiff -x "*changelog*" > %s' % (olddsc, newdsc, debdiff) + run_cmd(cmd) + + return debdiff + +def check_file(fname): + if not os.path.exists(fname): + 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 -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) + +check_file('debian/changelog') + +changelog = Changelog(file('debian/changelog').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) From 07af9e9f199899a373ffa49d07fd439637e85847 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Mon, 3 Sep 2007 10:55:04 +0200 Subject: [PATCH 36/96] Renamed new tool. --- fileindebian => submittodebian | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename fileindebian => submittodebian (100%) diff --git a/fileindebian b/submittodebian similarity index 100% rename from fileindebian rename to submittodebian From 118671db35b2897208c37f24e8d5e941a893193b Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Tue, 4 Sep 2007 09:53:15 +0200 Subject: [PATCH 37/96] * debian/copyright: added Canonical copyright. --- debian/changelog | 6 ++++++ debian/copyright | 1 + 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 26a65c7..d55bbde 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ubuntu-dev-tools (0.3) gutsy; urgency=low + + * debian/copyright: added Canonical copyright. + + -- Daniel Holbach Tue, 04 Sep 2007 09:51:04 +0200 + ubuntu-dev-tools (0.2) gutsy; urgency=low [ Martin Pitt ] diff --git a/debian/copyright b/debian/copyright index f162fb1..5599497 100644 --- a/debian/copyright +++ b/debian/copyright @@ -14,6 +14,7 @@ Upstream Author: Copyright: + Copyright 2006-2007 (C) Canonical Ltd. Albin Tonnerre 2006-2007 Daniel Holbach 2006-2007 Luke Yelavich 2006-2007 From f74faa7bd03a8f7766042f313f8808816fec2565 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Wed, 5 Sep 2007 16:04:37 +0200 Subject: [PATCH 38/96] commit revuput, not added to setup.py as it's not ready yet --- revuput | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100755 revuput diff --git a/revuput b/revuput new file mode 100755 index 0000000..2b4adc0 --- /dev/null +++ b/revuput @@ -0,0 +1,104 @@ +#!/usr/bin/python +# +# Copyright 2007, Canonical +# +# GPL 3 +# +# + +import re +import os +import sys +import string +import subprocess + +USAGE = 'Usage: revuput ' + +def find_fixed_launchpad_bug(changesfile): + changes = open(changesfile).readlines() + for line in changes: + if line.startswith("Launchpad-Bugs-Fixed"): + return line.split(":")[1].split() + return [] + + +def call_dput(location, changes): + return os.system("dput %s %s" % (location, changes)) == 0 + + +def lookup_dput_host(host): + (dummy, output, dummy) = os.popen3("dput -H | grep ^%s" % host) + text = output.read() + if text: + return text.split()[2] + return "" + + +def call_debuild(options): + return os.system("debuild -S -k%s %s" % \ + (os.getenv("DEBEMAIL"), \ + string.join(options, " "))) == 0 + +def get_name_and_version(): + changelogfile = "debian/changelog" + if not os.path.exists(changelogfile): + print >> sys.stderr, "%s not found." % changelogfile + sys.exit(1) + + head = open(changelogfile).readline() + return re.findall(r'^(.*)\ \((.*)\).*', head) + + +def assemble_bug_comment_text(host, sourcepackage, version): + return """A new version of %s was uploaded to fix this bug. + +To review the current version, please run + + dget -x http://%s/%s_%s.dsc +""" % (sourcepackage, host, sourcepackage, version) + + +def file_bug_report(package, text): + to = "new@bugs.launchpad.net" + mailtext = """ affects distros/ubuntu/%s + status confirmed + subscribe %s""" + + mail_process = subprocess.Popen(["mail", "-s", subject, to], + stdin=subprocess.PIPE, + stdout=subprocess.PIPE) + mail_process.communicate(report) + + +def main(): + location = "" + options = [] + + if len(sys.argv)<2: + print >> sys.stderr, USAGE + sys.exit(1) + + location = sys.argv[1] + if len(sys.argv) > 2: + options = sys.argv[2:] + + if not call_debuild(options): + sys.exit(1) + + (sourcepackage, version) = get_name_and_version()[0] + changesfile = "../%s_%s_source.changes" % (sourcepackage, version) + if not os.path.exists(os.path.expanduser(changesfile)): + print >> sys.stderr, "%s does not exist." % \ + os.path.expanduser(changesfile) + sys.exit(1) + + fixed_lp_bugs = find_fixed_launchpad_bug(changesfile) + host = lookup_dput_host(location) + + print assemble_bug_comment_text(host, sourcepackage, version) + if not call_dput(location, changesfile): + sys.exit(1) + + +if __name__ == '__main__': + main() From ddc0f52f4a9d3ea52bfb65bdc4d6f2b1b5ab4ae9 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Wed, 5 Sep 2007 18:15:23 +0200 Subject: [PATCH 39/96] - use python-launchpad-bugs - check for availabilty of dput - drop bug mailing code - started working on launchpad code --- revuput | 78 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 63 insertions(+), 15 deletions(-) diff --git a/revuput b/revuput index 2b4adc0..423867b 100755 --- a/revuput +++ b/revuput @@ -5,14 +5,36 @@ # GPL 3 # # +# Notes: needs dput, python-launchpad-bugs (>= 0.2.4) +# import re import os import sys import string -import subprocess -USAGE = 'Usage: revuput ' +try: + import launchpadbugs.connector as Connector +except: + print >> sys.stderr, \ + "You need python-launchpad-bugs (>= 0.2.4) installed to use revuput." + sys.exit(1) + +#try: +# import apt +#except: +# print >> sys.stderr, "You need python-apt installed to use revuput." +# sys.exit(1) + + +USAGE = 'Usage: revuput []' + + +def dput_check(): + if not os.path.exists("/usr/bin/dput"): + print >> sys.stderr, "You need to install the dput package." + sys.exit(1) + def find_fixed_launchpad_bug(changesfile): changes = open(changesfile).readlines() @@ -23,10 +45,12 @@ def find_fixed_launchpad_bug(changesfile): def call_dput(location, changes): + dput_check() return os.system("dput %s %s" % (location, changes)) == 0 def lookup_dput_host(host): + dput_check() (dummy, output, dummy) = os.popen3("dput -H | grep ^%s" % host) text = output.read() if text: @@ -58,16 +82,38 @@ To review the current version, please run """ % (sourcepackage, host, sourcepackage, version) -def file_bug_report(package, text): - to = "new@bugs.launchpad.net" - mailtext = """ affects distros/ubuntu/%s - status confirmed - subscribe %s""" - - mail_process = subprocess.Popen(["mail", "-s", subject, to], - stdin=subprocess.PIPE, - stdout=subprocess.PIPE) - mail_process.communicate(report) +def deal_with_bugreport(bugnumbers, host, sourcepackage, version): + if not os.path.exists(os.path.expanduser("~/.lpcookie")): + print >> sys.stderr, \ + "You need your Launchpad Cookie to be stored in ~/.lpcookie" + sys.exit(1) + + #print apt.Cache()[sourcepackage].section.split("/")[0].count("verse") + (dummy, output, dummy) = os.popen3( +"apt-cache showsrc %s | grep Directory | cut -d' ' -f2 | cut -d'/' -f2" % \ + sourcepackage) + component = output.read() + + Bug = Connector.ConnectBug() + Bug.authentication = os.path.expanduser("~/.lpcookie") + + for bugnumber in bugnumbers: + bug = Bug(int(bugnumber)) +# FIXME: should really be subscribers +# if component in ["main", "restricted"] and \ +# bug.assignee != 'ubuntu-main-sponsors': +# bug.assignee = 'ubuntu-main-sponsors' +# if component in ["universe", "multiverse"] and \ +# bug.assignee != 'ubuntu-universe-sponsors': +# bug.assignee = 'ubuntu-universe-sponsors' + +# FIXME: does not work yet +# comment = Bug.NewComment(text=assemble_bug_comment_text(host, +# sourcepackage, version)) +# bug.comments.add(comment) + bug.status = "Fix Committed" + bug.commit() + def main(): @@ -95,9 +141,11 @@ def main(): fixed_lp_bugs = find_fixed_launchpad_bug(changesfile) host = lookup_dput_host(location) - print assemble_bug_comment_text(host, sourcepackage, version) - if not call_dput(location, changesfile): - sys.exit(1) + + if(fixed_lp_bugs): + deal_with_bugreport(fixed_lp_bugs, host, sourcepackage, version) + #if not call_dput(location, changesfile): + # sys.exit(1) if __name__ == '__main__': From 7797672bdd0812d69367ec6d59b40ecf536b31bf Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 6 Sep 2007 17:44:31 +0200 Subject: [PATCH 40/96] - parse the incoming directory, when using dput - prepare usage of 'bzr bd' (not ready yet) - the bug comment includes the proper location of the .dsc file - component gets stripped - adding of appropriate sponsorship subscribers works --- revuput | 80 ++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 24 deletions(-) diff --git a/revuput b/revuput index 423867b..c110cdf 100755 --- a/revuput +++ b/revuput @@ -46,7 +46,20 @@ def find_fixed_launchpad_bug(changesfile): def call_dput(location, changes): dput_check() - return os.system("dput %s %s" % (location, changes)) == 0 + + incoming = "" + res = False + + (dummy, output, dummy) = os.popen3("dput --debug %s %s" % (location, changes)) + text = output.readlines() + for line in text: + if line.startswith("D: Incoming: "): + incoming = line.split("D: Incoming: ")[1].strip() + if incoming[-1] == "/": + incoming = incoming[:-1] + if line.startswith("Successfully uploaded packages."): + res = True + return (res, incoming) def lookup_dput_host(host): @@ -59,9 +72,16 @@ def lookup_dput_host(host): def call_debuild(options): +# FIXME: this requires magic, that figures out when to use --native --working, +# etc. +# if os.path.exists(".bzr") and os.path.exists("/usr/bin/bzr-buildpackage"): +# return os.system("bzr bd -S --builder='-k%s %s'" % \ +# (os.getenv("DEBEMAIL"), \ +# string.join(options, " "))) == 0 +# else: return os.system("debuild -S -k%s %s" % \ (os.getenv("DEBEMAIL"), \ - string.join(options, " "))) == 0 + string.join(options, " "))) == 0 def get_name_and_version(): changelogfile = "debian/changelog" @@ -73,16 +93,25 @@ def get_name_and_version(): return re.findall(r'^(.*)\ \((.*)\).*', head) -def assemble_bug_comment_text(host, sourcepackage, version): +def assemble_bug_comment_text(host, incoming, sourcepackage, version): + if host == "ppa.launchpad.net": + dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ + (host, incoming[1:], sourcepackage[0], sourcepackage, \ + sourcepackage, version) + else: +# FIXME: this needs to be much much cleverer at some stage + dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ + (host, incoming, sourcepackage[0], sourcepackage, version) + "http://ppa.launchpad.net/dholbach/ubuntu/pool/main/h/hello/hello_2.2-2~ppa1.dsc" return """A new version of %s was uploaded to fix this bug. To review the current version, please run - dget -x http://%s/%s_%s.dsc -""" % (sourcepackage, host, sourcepackage, version) + dget -x %s +""" % (sourcepackage, dsc_file_location) -def deal_with_bugreport(bugnumbers, host, sourcepackage, version): +def deal_with_bugreport(bugnumbers, host, incoming, sourcepackage, version): if not os.path.exists(os.path.expanduser("~/.lpcookie")): print >> sys.stderr, \ "You need your Launchpad Cookie to be stored in ~/.lpcookie" @@ -92,26 +121,28 @@ def deal_with_bugreport(bugnumbers, host, sourcepackage, version): (dummy, output, dummy) = os.popen3( "apt-cache showsrc %s | grep Directory | cut -d' ' -f2 | cut -d'/' -f2" % \ sourcepackage) - component = output.read() + component = output.read().strip() Bug = Connector.ConnectBug() Bug.authentication = os.path.expanduser("~/.lpcookie") for bugnumber in bugnumbers: bug = Bug(int(bugnumber)) -# FIXME: should really be subscribers -# if component in ["main", "restricted"] and \ -# bug.assignee != 'ubuntu-main-sponsors': -# bug.assignee = 'ubuntu-main-sponsors' -# if component in ["universe", "multiverse"] and \ -# bug.assignee != 'ubuntu-universe-sponsors': -# bug.assignee = 'ubuntu-universe-sponsors' + if component in ["main", "restricted"] and \ + 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers]: + bug.subscribers.add('ubuntu-main-sponsors') + if component in ["universe", "multiverse"] and \ + 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]: + bug.subscribers.add('ubuntu-universe-sponsors') -# FIXME: does not work yet -# comment = Bug.NewComment(text=assemble_bug_comment_text(host, -# sourcepackage, version)) -# bug.comments.add(comment) - bug.status = "Fix Committed" + comment = Bug.NewComment(text=assemble_bug_comment_text(host, incoming, + sourcepackage, version), + subject="Fix in %s (%s)" % \ + (sourcepackage, version)) + bug.comments.add(comment) + + if bug.status != "Fix Committed": + bug.status = "Fix Committed" bug.commit() @@ -138,14 +169,15 @@ def main(): os.path.expanduser(changesfile) sys.exit(1) - fixed_lp_bugs = find_fixed_launchpad_bug(changesfile) host = lookup_dput_host(location) + (dput_res, incoming) = call_dput(location, changesfile) + if not dput_res: + sys.exit(1) - + fixed_lp_bugs = find_fixed_launchpad_bug(changesfile) if(fixed_lp_bugs): - deal_with_bugreport(fixed_lp_bugs, host, sourcepackage, version) - #if not call_dput(location, changesfile): - # sys.exit(1) + deal_with_bugreport(fixed_lp_bugs, host, incoming, sourcepackage, + version) if __name__ == '__main__': From 7445cc9826ace6aca777560eb5ad0db1bf184010 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 6 Sep 2007 17:50:26 +0200 Subject: [PATCH 41/96] added a note --- revuput | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/revuput b/revuput index c110cdf..7a1c557 100755 --- a/revuput +++ b/revuput @@ -5,7 +5,9 @@ # GPL 3 # # -# Notes: needs dput, python-launchpad-bugs (>= 0.2.4) +# Notes: +# - needs dput, python-launchpad-bugs (>= 0.2.4) +# - needs http://launchpad.net/bugs/137767 to get fixed # import re From 3b5d8a0edac7a1d626621ac54562af7d4068ce9f Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 7 Sep 2007 11:47:06 +0200 Subject: [PATCH 42/96] revuput: - arguments checking in separate function - -n argument to file a new bug - whitespace changes --- revuput | 66 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/revuput b/revuput index 7a1c557..645ad4c 100755 --- a/revuput +++ b/revuput @@ -6,7 +6,7 @@ # # # Notes: -# - needs dput, python-launchpad-bugs (>= 0.2.4) +# - needs dput, python-launchpad-bugs (>= 0.2.9) # - needs http://launchpad.net/bugs/137767 to get fixed # @@ -19,7 +19,7 @@ try: import launchpadbugs.connector as Connector except: print >> sys.stderr, \ - "You need python-launchpad-bugs (>= 0.2.4) installed to use revuput." + "You need python-launchpad-bugs (>= 0.2.9) installed to use revuput." sys.exit(1) #try: @@ -29,7 +29,7 @@ except: # sys.exit(1) -USAGE = 'Usage: revuput []' +USAGE = 'Usage: revuput [-n] [] []' def dput_check(): @@ -148,30 +148,62 @@ def deal_with_bugreport(bugnumbers, host, incoming, sourcepackage, version): bug.commit() +def check_arguments(args): + new_bug = False + location = 'default' + debuild_args = list() + + if len(sys.argv) == 1: + return (new_bug, location, debuild_args) + + if sys.argv[1] == "-n": + new_bug = True + if len(sys.argv)>2: + if sys.argv[2].startswith("-"): + debuild_args = sys.argv[2:] + else: + location = sys.argv[2] + if len(sys.argv)>3: + debuild_args = sys.argv[3:] + else: + if sys.argv[1].startswith("-"): + debuild_args.append(sys.argv[1:]) + else: + location = sys.argv[1] + if len(sys.argv)>2: + debuild_args = sys.argv[2:] + + return (new_bug, location, debuild_args) + + +def file_bug(sourcepackage, version): + Bug = Connector.ConnectBug() + Bug.authentication = os.path.expanduser("~/.lpcookie") + + bug = Bug.New(product={"name": sourcepackage, "target": "ubuntu"}, + summary="Please sponsor %s %s" % (sourcepackage, version), + description=\ + "The new package will be uploaded to PPA shortly.") + return bug.bugnumber + def main(): - location = "" - options = [] - - if len(sys.argv)<2: - print >> sys.stderr, USAGE - sys.exit(1) - - location = sys.argv[1] - if len(sys.argv) > 2: - options = sys.argv[2:] - - if not call_debuild(options): + (new_bug, location, debuild_args) = check_arguments(sys.argv) + (sourcepackage, version) = get_name_and_version()[0] + + if new_bug: + bugnumber = file_bug(sourcepackage, version) + os.system("dch -a 'Fixes (LP: #%s)'" % bugnumber) + if not call_debuild(debuild_args): sys.exit(1) - (sourcepackage, version) = get_name_and_version()[0] changesfile = "../%s_%s_source.changes" % (sourcepackage, version) if not os.path.exists(os.path.expanduser(changesfile)): print >> sys.stderr, "%s does not exist." % \ os.path.expanduser(changesfile) sys.exit(1) - host = lookup_dput_host(location) + host = lookup_dput_host(location) (dput_res, incoming) = call_dput(location, changesfile) if not dput_res: sys.exit(1) From 61a0bbca1b0862e2b704b6fd3e2b186eef36f163 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 7 Sep 2007 11:54:03 +0200 Subject: [PATCH 43/96] revuput: more --help --- revuput | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/revuput b/revuput index 645ad4c..f30bcc4 100755 --- a/revuput +++ b/revuput @@ -29,7 +29,13 @@ except: # sys.exit(1) -USAGE = 'Usage: revuput [-n] [] []' +USAGE = \ +"""Usage: revuput [-n] [] [] + +-n to file a new bug + dput alias + options that are passed to debuild(1) +""" def dput_check(): @@ -153,6 +159,10 @@ def check_arguments(args): location = 'default' debuild_args = list() + if sys.argv[1] in ["--help", "-H"]: + print USAGE + sys.exit(0) + if len(sys.argv) == 1: return (new_bug, location, debuild_args) From 6a512144ca1dce05877d3bd4f3e76062793ed64b Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Fri, 7 Sep 2007 12:02:52 +0200 Subject: [PATCH 44/96] add note from dholbach --- revuput | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/revuput b/revuput index f30bcc4..57f5646 100755 --- a/revuput +++ b/revuput @@ -5,10 +5,19 @@ # GPL 3 # # -# Notes: +# Notes: # - needs dput, python-launchpad-bugs (>= 0.2.9) # - needs http://launchpad.net/bugs/137767 to get fixed # +# +# 11:57:27 < dholbach> but what it does is: build a source package of +# the current source tree you're in, upload it to PPA +# and follow up on a bug report, subscribe the right +# sponsors, set the right status - if you pass "-n" +# it will file a bug report, add a (LP: #....) to +# the changelog also +# 11:57:37 < dholbach> I thought it'd help with our sponsoring process +# import re import os @@ -22,12 +31,6 @@ except: "You need python-launchpad-bugs (>= 0.2.9) installed to use revuput." sys.exit(1) -#try: -# import apt -#except: -# print >> sys.stderr, "You need python-apt installed to use revuput." -# sys.exit(1) - USAGE = \ """Usage: revuput [-n] [] [] From babd1a0849d3fd6690b115a89660840a693f53be Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 7 Sep 2007 12:31:52 +0200 Subject: [PATCH 45/96] revuput: re-add python-apt import, we will use it soon, print note about created LP Bug --- revuput | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/revuput b/revuput index 57f5646..332227d 100755 --- a/revuput +++ b/revuput @@ -31,6 +31,12 @@ except: "You need python-launchpad-bugs (>= 0.2.9) installed to use revuput." sys.exit(1) +#try: +# import apt +#except: +# print >> sys.stderr, "You need python-apt installed to use revuput." +# sys.exit(1) + USAGE = \ """Usage: revuput [-n] [] [] @@ -197,6 +203,10 @@ def file_bug(sourcepackage, version): summary="Please sponsor %s %s" % (sourcepackage, version), description=\ "The new package will be uploaded to PPA shortly.") + + print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \ + (bug.bugnumber, bug.bugnumber) + return bug.bugnumber From cceba5dca89e09178c9fca488894a7eeeb493d44 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 7 Sep 2007 13:37:00 +0200 Subject: [PATCH 46/96] revuput: removed a superfluous line --- revuput | 1 - 1 file changed, 1 deletion(-) diff --git a/revuput b/revuput index 332227d..c494d9f 100755 --- a/revuput +++ b/revuput @@ -119,7 +119,6 @@ def assemble_bug_comment_text(host, incoming, sourcepackage, version): # FIXME: this needs to be much much cleverer at some stage dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ (host, incoming, sourcepackage[0], sourcepackage, version) - "http://ppa.launchpad.net/dholbach/ubuntu/pool/main/h/hello/hello_2.2-2~ppa1.dsc" return """A new version of %s was uploaded to fix this bug. To review the current version, please run From f8526ce80cc2e53b180d8e1e803aefb3c20b580c Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 7 Sep 2007 14:03:10 +0200 Subject: [PATCH 47/96] revuput: fix a small bug that Cesare Tirabassi (norsetto) found --- revuput | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revuput b/revuput index c494d9f..04b74f9 100755 --- a/revuput +++ b/revuput @@ -167,7 +167,7 @@ def check_arguments(args): location = 'default' debuild_args = list() - if sys.argv[1] in ["--help", "-H"]: + if len(sys.argv) == 2 and sys.argv[1] in ["--help", "-H"]: print USAGE sys.exit(0) From ca011207c7e8590c1d38cb9a8e1606efb5d212cf Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 7 Sep 2007 14:21:20 +0200 Subject: [PATCH 48/96] * 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/changelog | 10 +++ debian/control | 1 + debian/rules | 6 ++ doc/revuput.1.docbook | 145 ++++++++++++++++++++++++++++++++++++++++++ setup.py | 21 +++--- 5 files changed, 173 insertions(+), 10 deletions(-) create mode 100644 doc/revuput.1.docbook diff --git a/debian/changelog b/debian/changelog index d55bbde..2a8bec2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +ubuntu-dev-tools (0.4) UNRELEASED; 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. + + -- Daniel Holbach Fri, 07 Sep 2007 14:14:57 +0200 + ubuntu-dev-tools (0.3) gutsy; urgency=low * debian/copyright: added Canonical copyright. diff --git a/debian/control b/debian/control index ea4804f..c30dc76 100644 --- a/debian/control +++ b/debian/control @@ -5,6 +5,7 @@ Maintainer: Ubuntu MOTU Developers XS-Vcs-Bzr: https://launchpad.net/ubuntu-dev-tools/ XS-Vcs-Browser: http://codebrowse.launchpad.net/~ubuntu-dev/ubuntu-dev-tools/trunk/changes Build-Depends: cdbs (>= 0.4.43), debhelper (>= 5), python-central (>= 0.5), python-all-dev (>= 2.4) +Build-Depends-Indep: docbook2x XS-Python-Version: all Standards-Version: 3.7.2 diff --git a/debian/rules b/debian/rules index 7ed7af5..12b64ce 100755 --- a/debian/rules +++ b/debian/rules @@ -6,3 +6,9 @@ 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 + +build/ubuntu-dev-tools:: + docbook2x-man doc/revuput.1.docbook; mv revuput.1 doc + +clean:: + rm -f doc/revuput.1 diff --git a/doc/revuput.1.docbook b/doc/revuput.1.docbook new file mode 100644 index 0000000..0795bfb --- /dev/null +++ b/doc/revuput.1.docbook @@ -0,0 +1,145 @@ + + + + + + Daniel + Holbach + daniel.holbach@ubuntu.com + + + 2007 + Daniel Holbach + + + + 2007-09-07 + + + + revuput + 1 + + + revuput + A tool for uploading packages for sponsorship + + + + revuput + + + + + + + + + + + + + PREREQUISITES + + To use this tool, you will need to set up your PPA in Launchpad and + therefore carefully follow the instructions in the PPA documentation. + + + Also you need to copy your Launchpad cookie to + ~/.lpcookie. Firefox uses + ~/.mozilla/firefox/<random>cookies.txt, + Epiphany uses + ~/.gnome2/epiphany/mozilla/epiphany/cookies.txt. + + + + OVERVIEW + + This tool aims to help with the sponsoring + process and is written by the MOTU team. + + + This tool will 1) build a source package of the current source tree + you're in, 2) upload the package to <dput + location> (using 'default' if not specified), 3) follow up on the bug + report (if specified in debian/changelog as per the + changelog + spec), 4) set the right status and subscribe the right people to + the bug report. + + + If you use the option, it + will also 1) file a bug and add 2) a (LP: #.....) header to the source + package. + + + The + sponsoring process was complicated enough and package uploads + were done to either Malone, + REVU or personal web servers. This tool aims + to unify processes and make use of existing infrastructure such as + Launchpad Bugs (Malone) and + Launchpad PPA. + In September 2007, Daniel Holbach started working on this tool. + + + + DESCRIPTION + + This tool has lists of known strings for a given package that + it searches for in bug reports (even in the attachments uploaded), + thus helping to find duplicates, related bugs and other information, + but mainly making bug triagers job a lot easier. + + + + OPTIONS + + These are all the options available so far: + + + + revuput options: + + + files a new bug report and adds it's number to + debian/changelog + + + + + specifies the location you upload the source package + to according to the alias you specified in either + /etc/dput.cf or + ~/.dput.cf + + + + will be passed to debuild + during source package creation + + + + + + + COPYRIGHT + + This manual page was written by the MOTU team for the + revutool bug tracking system. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU General Public License, + Version 3 or any later version published by the Free Software Foundation. + + + On Debian systems (like Ubuntu), the complete text of the + GNU General Public License can be found in + /usr/share/common-licenses/GPL-3. + + + diff --git a/setup.py b/setup.py index c723d0d..cd7904f 100755 --- a/setup.py +++ b/setup.py @@ -16,15 +16,16 @@ if os.path.exists(changelog): setup(name='ubuntu-dev-tools', version=version, scripts=['404main', - 'check-symbols', - 'get-branches', - 'pbuilder-dist', - 'update-maintainer', - 'dch-repeat', - 'mk-sbuild-lv', - 'pull-debian-debdiff', - 'what-patch', - 'suspicious-source', - ], + 'check-symbols', + 'get-branches', + 'pbuilder-dist', + 'update-maintainer', + 'dch-repeat', + 'mk-sbuild-lv', + 'pull-debian-debdiff', + 'what-patch', + 'suspicious-source', + 'revuput' + ], ) From 26ca1cc611f1979cda2618e051175b7059cb50d4 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 7 Sep 2007 14:22:40 +0200 Subject: [PATCH 49/96] add python-launchpad-bugs Depends --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2a8bec2..7775e86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,7 @@ ubuntu-dev-tools (0.4) UNRELEASED; urgency=low * 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. -- Daniel Holbach Fri, 07 Sep 2007 14:14:57 +0200 diff --git a/debian/control b/debian/control index c30dc76..f9bab2a 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.9) Recommends: bzr, pbuilder XB-Python-Version: ${python:Versions} Description: useful tools for Ubuntu developers From 612f729643692d8d5c7a2a4107fc09643ecc95bd Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Fri, 7 Sep 2007 14:36:50 +0200 Subject: [PATCH 50/96] Added myself to AUTHORS and debian/copyright Added GPL-2 notice to submittodebian Added submittodebian to debian/copyright --- AUTHORS | 1 + debian/copyright | 3 ++- submittodebian | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index f57ac93..c56fcd6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -7,3 +7,4 @@ Michael Bienia Martin Pitt Kees Cook Siegfried-A. Gevatter +Soren Hansen diff --git a/debian/copyright b/debian/copyright index 5599497..3433c5d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -11,6 +11,7 @@ Upstream Author: Michael Bienia Kees Cook Siegfried-A. Gevatter + Soren Hansen Copyright: @@ -26,7 +27,7 @@ Copyright: Licenses: check-symbols, dch-repeat, mk-sbuild-lv, pbuilder-dist, pull-debian-debdiff, -update-maintainer and what-patch are licensed under GPLv2: +submittodebian, update-maintainer, and what-patch are licensed under GPLv2: 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 diff --git a/submittodebian b/submittodebian index 0e65ee7..b29b1fd 100755 --- a/submittodebian +++ b/submittodebian @@ -1,4 +1,23 @@ #!/usr/bin/python +# +# submittodebian - tool to submit patches to Debian's bts +# Copyright (C) 2007 Canonical Ltd. +# Author: Soren Hansen +# +# 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. + from debian_bundle.changelog import Changelog import re, os, sys From 980a5b20811e1f56f18bbc8aa053ef1523ca021a Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 7 Sep 2007 17:23:37 +0200 Subject: [PATCH 51/96] new release --- debian/changelog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 7775e86..a491678 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ubuntu-dev-tools (0.4) UNRELEASED; urgency=low +ubuntu-dev-tools (0.4) gutsy; urgency=low * revuput: added a tool to upload packages to PPA and file sponsoring bugs automatically. @@ -7,6 +7,9 @@ ubuntu-dev-tools (0.4) UNRELEASED; urgency=low * setup.py: install it. * debian/control: add python-launchpad-bugs Depends. + [Soren Hansen] + * added submittodebian tool. + -- Daniel Holbach Fri, 07 Sep 2007 14:14:57 +0200 ubuntu-dev-tools (0.3) gutsy; urgency=low From 3587439e8bc2cf295b4508f2602aed921a79809c Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 12 Sep 2007 01:14:23 +1000 Subject: [PATCH 52/96] * Add requestsync and its manual page from devscripts. * Add Conflicts/Replaces against devscripts 2.10.7ubuntu3. --- debian/changelog | 7 ++ debian/control | 2 + doc/requestsync.1 | 34 +++++++++ requestsync | 180 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 223 insertions(+) create mode 100644 doc/requestsync.1 create mode 100755 requestsync diff --git a/debian/changelog b/debian/changelog index a491678..5699b9f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ubuntu-dev-tools (0.5) gutsy; urgency=low + + * Add requestsync and its manual page from devscripts. + * Add Conflicts/Replaces against devscripts 2.10.7ubuntu3. + + -- Steve Kowalik 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 diff --git a/debian/control b/debian/control index f9bab2a..7423485 100644 --- a/debian/control +++ b/debian/control @@ -14,6 +14,8 @@ Architecture: all Section: devel Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.9) Recommends: bzr, pbuilder +Conflicts: devscripts (<< 2.10.7ubuntu3) +Replaces: devscripts (<< 2.10.7ubuntu3) XB-Python-Version: ${python:Versions} Description: useful tools for Ubuntu developers This is a collection of useful tools that Ubuntu developers use to diff --git a/doc/requestsync.1 b/doc/requestsync.1 new file mode 100644 index 0000000..8996724 --- /dev/null +++ b/doc/requestsync.1 @@ -0,0 +1,34 @@ +.TH REQUESTSYNC "1" "6 August 2007" "devscripts" +.SH NAME +requestsync \- helper to file sync requests for Ubuntu +.SH SYNOPSIS +.B requestsync +.RI [\fI -n | -s \fR] " " <\fIsource\fR " " \fIpackage\fR> " " <\fItarget\fR " " \fIrelease\fR> " "[\fIbase\fR " " \fIversion\fR] +.SH DESCRIPTION +.PP +\fBrequestsync\fR looks at the versions of in Debian and Ubuntu, prompts for an explanation of why the Ubuntu changes (if there are any) should be dropped, downloads the changelog entry from packages.debian.org, and then prompts for your GPG passphrase so it can sign the mail and send it off, which files a sync request in the form of a bug report in Launchpad. +.SH OPTIONS +.PP +Listed below are the command line options for requestsync: +.TP +\fB\-n\fR +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 +\fB\-s\fR +Specifies that you require sponsorship. You need this option if you are not a member of ubuntu-dev for universe or multiverse, or ubuntu-core-dev for main or restricted. +.TP +\fB\fR +This is the source package that you would like to be synced from Debian. +.TP +\fB\fR +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, ie: gutsy. +.TP +\fB[base version]\fR +In some cases, the base version (where the Ubuntu package started differing from the Debian package) can not be automatically determined. Specify this option in this case. +.SH AUTHOR +.PP +This manual page was pieced together by Steve Kowalik. +.SH SEE ALSO +.PP +\fBrmadison\fP\fB(1)\fP +.UE diff --git a/requestsync b/requestsync new file mode 100755 index 0000000..9bf7ea7 --- /dev/null +++ b/requestsync @@ -0,0 +1,180 @@ +#!/usr/bin/python + +# (C) 2007 Canonical Ltd, Steve Kowalik +# Authors: +# Martin Pitt +# Steve Kowalik +# GPLv2, see /usr/share/common-licenses/GPL + +import os, os.path, sys, urllib, subprocess, smtplib, getopt + +changelog = 1 + +def cur_version_component(sourcepkg, release): + madison = subprocess.Popen(['rmadison', '-u', 'ubuntu', '-a', 'source', \ + '-s', release, sourcepkg], \ + 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 (version.strip(), component.strip()) + + print "%s doesn't appear to exist in %s, specify -n for a package not in Ubuntu." % (sourcepkg, release) + sys.exit(1) + +def debian_changelog(sourcepkg, component, version): + '''Return the Debian changelog from the latest up to the given version + (exclusive).''' + + ch = '' + subdir = sourcepkg[0] + if sourcepkg.startswith('lib'): + subdir = 'lib%s' % sourcepkg[3] + for l in urllib.urlopen('http://packages.debian.org/changelogs/pool/%s/%s/%s/current/changelog.txt' % (component, subdir, sourcepkg)): + if l.startswith(sourcepkg) and l.find(version + ')') > 0: + break + ch += l + + return ch + +def debian_component(sourcepkg): + '''Return the Debian component for the source package.''' + madison = subprocess.Popen(['rmadison', '-a', 'source', '-s', 'unstable', \ + sourcepkg], stdout=subprocess.PIPE) + out = madison.communicate()[0] + assert (madison.returncode == 0) + + try: + assert out + except AssertionError: + print "%s doesn't appear to exist in Debian." % sourcepkg + sys.exit(1) + raw_comp = out.split(' | ')[2].split('/') + component = 'main' + if len(raw_comp) == 2: + component = raw_comp[1] + return component + +def usage(): + print """Usage: requestsync [-n|-s|-k ] [basever] + +In some cases, the base version (fork point from Debian) cannot be determined +automatically, and you'll get a complete Debian changelog. Specify the correct +base version in that case.""" + sys.exit(1) + +# +# entry point +# + +newsource = False +sponsorship = False +keyid = None +try: + opts, args = getopt.getopt(sys.argv[1:], 'nsk:') +except getopt.GetoptError: + usage() +for o, a in opts: + if o == "-n": + newsource = True + if o == "-s": + sponsorship = True + if o == "-k": + keyid = a + +if len(args) not in (2, 3): + usage() + +(srcpkg, release) = args[:2] +force_base_ver = None +if len(args) == 3: + force_base_ver = args[2] +(cur_ver, component) = ('0', 'universe') # Let's assume universe +if not newsource: + (cur_ver, component) = cur_version_component(srcpkg, release) + +debiancomponent = debian_component(srcpkg) + +# generate bug report +status = "confirmed" +subscribe = "ubuntu-archive" +if sponsorship: + status = "new" + if component in ['main', 'restricted']: + subscribe = "ubuntu-main-sponsors" + else: + subscribe = "ubuntu-universe-sponsors" + +affects = '/%s' % srcpkg +if newsource: + affects = '' + +report = ''' affects ubuntu%s + status %s + subscribe %s + +Please sync %s (%s) from Debian unstable (%s). +''' % (affects, status, subscribe, srcpkg, component, debiancomponent) + +base_ver = cur_ver +uidx = base_ver.find('ubuntu') +if uidx > 0: + base_ver = base_ver[:uidx] + + print 'Explanation of the Ubuntu delta and why it can be dropped:' + explanation = '\nExplanation of the Ubuntu delta and why it can be dropped:\n' + while (explanation[-2:] != '\n\n'): + explanation += sys.stdin.readline() + report += explanation + +if changelog: + uidx = base_ver.find('build') + if uidx > 0: + base_ver = base_ver[:uidx] + + if force_base_ver: + base_ver = force_base_ver + + report += 'Changelog since current %s version %s:\n\n' % (release, cur_ver) + report += debian_changelog(srcpkg, debiancomponent, base_ver) + '\n' + +# sign it +sign_command = 'gpg' +for cmd in ('gpg2', 'gnome-gpg'): + if os.access('/usr/bin/%s' % cmd, os.X_OK): + sign_command = cmd + +gpg_command = [sign_command, '--clearsign'] +if keyid: + gpg_command.extend(('-u', keyid)) + +gpg = subprocess.Popen(gpg_command, stdin=subprocess.PIPE, stdout=subprocess.PIPE) +signed_report = gpg.communicate(report)[0] +assert gpg.returncode == 0 + +# generate email +myemailaddr = os.getenv('DEBEMAIL') +if not myemailaddr: + print "The environment variable DEBEMAIL needs to be set to make use of this script." + sys.exit(1) +to = 'new@bugs.launchpad.net' + +mail = '''From: %s +To: %s +Subject: Please sync %s (%s) from Debian unstable (%s) + +%s''' % (myemailaddr, to, srcpkg, component, debiancomponent, signed_report) + +print mail + +print 'Press enter to file this bug, Control-C to abort' +sys.stdin.readline() + +s = smtplib.SMTP('fiordland.ubuntu.com') +s.sendmail(myemailaddr, to, mail) +s.quit() From a34b013fad4412a44e7d8e1cfdfd0f5e9f9b7543 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 12 Sep 2007 01:16:11 +1000 Subject: [PATCH 53/96] Add bug number --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 5699b9f..ddcabe7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,6 @@ ubuntu-dev-tools (0.5) gutsy; urgency=low - * Add requestsync and its manual page from devscripts. + * Add requestsync and its manual page from devscripts. (LP: #138885) * Add Conflicts/Replaces against devscripts 2.10.7ubuntu3. -- Steve Kowalik Wed, 12 Sep 2007 01:14:04 +1000 From 52a506f398ec94397ed59d856db2684748203231 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 12 Sep 2007 01:23:54 +1000 Subject: [PATCH 54/96] Add requestsync to setup.py, and myself to AUTHORS. --- AUTHORS | 1 + setup.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index c56fcd6..ec46e11 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,3 +8,4 @@ Martin Pitt Kees Cook Siegfried-A. Gevatter Soren Hansen +Steve Kowalik diff --git a/setup.py b/setup.py index cd7904f..da89349 100755 --- a/setup.py +++ b/setup.py @@ -25,7 +25,8 @@ setup(name='ubuntu-dev-tools', 'pull-debian-debdiff', 'what-patch', 'suspicious-source', - 'revuput' + 'revuput', + 'requestsync' ], ) From b31db3308290de859a48ca04fe9ccb26d32d6322 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 12 Sep 2007 10:47:45 +1000 Subject: [PATCH 55/96] Fix up the version of the devscripts Conflicts/Replaces. --- debian/changelog | 7 +++++++ debian/control | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ddcabe7..38e6457 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ubuntu-dev-tools (0.5ubuntu1) gutsy; urgency=low + + * Because I'm a bozo, fix up the version of the devscripts + Conflicts/Replaces. + + -- Steve Kowalik 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) diff --git a/debian/control b/debian/control index 7423485..4dc9427 100644 --- a/debian/control +++ b/debian/control @@ -14,8 +14,8 @@ Architecture: all Section: devel Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.9) Recommends: bzr, pbuilder -Conflicts: devscripts (<< 2.10.7ubuntu3) -Replaces: devscripts (<< 2.10.7ubuntu3) +Conflicts: devscripts (<< 2.10.7ubuntu5) +Replaces: devscripts (<< 2.10.7ubuntu5) XB-Python-Version: ${python:Versions} Description: useful tools for Ubuntu developers This is a collection of useful tools that Ubuntu developers use to From f8d9952742bdaaa65744df23a4cf13909963063f Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 12 Sep 2007 10:49:43 +1000 Subject: [PATCH 56/96] Correct version string. --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 38e6457..f741c49 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ubuntu-dev-tools (0.5ubuntu1) gutsy; urgency=low +ubuntu-dev-tools (0.6) gutsy; urgency=low * Because I'm a bozo, fix up the version of the devscripts Conflicts/Replaces. From afb3b7ad1233360408b26f9761752852b687ca29 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 12 Sep 2007 09:29:58 +0100 Subject: [PATCH 57/96] * Fix *roff use (hyphens vs. dashes, start each sentence on a new line). --- debian/changelog | 6 ++++ doc/pbuilder-dist.1 | 83 +++++++++++++++++++++++++-------------------- doc/requestsync.1 | 11 +++--- 3 files changed, 60 insertions(+), 40 deletions(-) diff --git a/debian/changelog b/debian/changelog index f741c49..9921e5d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ubuntu-dev-tools (0.7) UNRELEASED; urgency=low + + * Fix *roff use (hyphens vs. dashes, start each sentence on a new line). + + -- Colin Watson 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 diff --git a/doc/pbuilder-dist.1 b/doc/pbuilder-dist.1 index 97c0ccd..ec28398 100644 --- a/doc/pbuilder-dist.1 +++ b/doc/pbuilder-dist.1 @@ -3,88 +3,99 @@ .\" Contact details: siggi.gevatter@gmail.com .\" August 16, 2007 .\" -.TH PBUILDER-DIST 1 "August 16, 2007" +.TH PBUILDER\-DIST 1 "August 16, 2007" .\" .SH NAME -pbuilder-dist \- multi-distribution pbuilder wrapper +pbuilder\-dist \- multi-distribution pbuilder wrapper .\" .SH SYNOPSIS -\fBpbuilder-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP] [\fBmainonly\fP|\fBallcomp\fP] +\fBpbuilder\-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP] [\fBmainonly\fP|\fBallcomp\fP] [\fBwithlog\fP|\fBnolog\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. +\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 (\fBpbuilder-\fIdistribution\fR-\fIarchitecture\fP\fR on amd64 -systems), like for example \fBpbuilder-feisty\fP, \fBpbuilder-sid\fP, \fBpbuilder-gutsy-i386\fP, etc. +\fBpbuilder\-\fIdistribution\fP\fR (\fBpbuilder\-\fIdistribution\fR\-\fIarchitecture\fP\fR on amd64 +systems), like for example \fBpbuilder\-feisty\fP, \fBpbuilder\-sid\fP, \fBpbuilder\-gutsy\-i386\fP, etc. .\" .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. +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 \fBi386\fP / \fBamd64\fP -Only available on amd64 systems. This is optional; default is \fBamd64\fP. If \fBi386\fP is -specified, an i386 environment will be used. +Only available on amd64 systems. +This is optional; default is \fBamd64\fP. +If \fBi386\fP is specified, an i386 environment will be used. .TP \fBmainonly\fP / \fBallcomp\fP -This is optional; default is \fBallcomp\fP. If you specify \fBmainonly\fP, only packages from -the main (in Debian) or main and restricted (in Ubuntu) components will be used. With the -later one, all official components will be enabled. This only has effect when creating a new -environment. +This is optional; default is \fBallcomp\fP. +If you specify \fBmainonly\fP, only packages from the main (in Debian) or +main and restricted (in Ubuntu) components will be used. +With the latter one, all official components will be enabled. +This only has effect when creating a new environment. .TP \fBwithlog\fP / \fBnolog\fP -This is optional; default is \fBnolog\fP. When \fBwithlog\fP is used, \fBpbuilder\fP will save the -output produced by the current action in a dot-file called \fB.lastlog\fP in it's base directory -(see the FILES section). If this file already exists, it will be overwritten. +This is optional; default is \fBnolog\fP. +When \fBwithlog\fP is used, \fBpbuilder\fP will save the output produced by +the current action in a dot-file called \fB.lastlog\fP in its base directory +(see the FILES section). +If this file already exists, it will be overwritten. .TP \fBoperation\fP Replace this with the action you want \fBpbuilder\fP to do (create, update, build, clean, login -or execute). Check it's manpage for more details. +or execute). +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. +Replace this with other parameters, if needed. +For example, if \fBbuild\fP is the option, you will need to also specify +a .dsc file. .PP The default value of all optional parameters (except the architecture) can be changed by editing the first lines of the script. .\" .SH EXAMPLES .TP -pbuilder-dist gutsy create +pbuilder\-dist gutsy create Creates a \fBpbuilder\fP environment for Ubuntu Gutsy, with all components enabled. .TP -pbuilder-sid mainonly create +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 +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 +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 +pbuilder\-etch i386 update Updates an existing i386-architecture Debian Etch environment on an amd64 system. .\" .SH FILES -By default, \fBpbuilder-dist\fP will store all the files it generates in \fB~/pbuilder/\fP. This can -be changed modifying the BASE_DIR value on the top of the script to any other directory you -want. If it doesn't exist, it will be created on the run. +By default, \fBpbuilder\-dist\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 it doesn't exist, it will be created on the run. .\" .SH BUGS -There are no known bugs at the moment. If you experience any problem with this script -contact me on siggi.gevatter@gmail.com. Please ensure first that the problem is really this -script and not an issue with \fBpbuilder\fP. +There are no known bugs at the moment. +If you experience any problem with this script contact me on +siggi.gevatter@gmail.com. +Please ensure first that the problem is really this script and not an issue +with \fBpbuilder\fP. .\" .SH AUTHORS -\fBpbuilder-dist\fP was originally written by Jamin W. Collins and +\fBpbuilder\-dist\fP was originally written by Jamin W. Collins and Jordan Mantha . .PP On August 2007 it was mostly rewritten, and extended, by Siegfried-Angel Gevatter Pujals @@ -101,4 +112,4 @@ under the terms of the GNU General Public License, Version 2 or any later version published by the Free Software Foundation. .PP On Debian based systems, the complete text of the GNU General Public -License can be found in \fB/usr/share/common-licenses/GPL\fP. +License can be found in \fB/usr/share/common\-licenses/GPL\fP. diff --git a/doc/requestsync.1 b/doc/requestsync.1 index 8996724..1deafc3 100644 --- a/doc/requestsync.1 +++ b/doc/requestsync.1 @@ -3,7 +3,7 @@ requestsync \- helper to file sync requests for Ubuntu .SH SYNOPSIS .B requestsync -.RI [\fI -n | -s \fR] " " <\fIsource\fR " " \fIpackage\fR> " " <\fItarget\fR " " \fIrelease\fR> " "[\fIbase\fR " " \fIversion\fR] +.RI [\fI \-n | \-s \fR] " " <\fIsource\fR " " \fIpackage\fR> " " <\fItarget\fR " " \fIrelease\fR> " "[\fIbase\fR " " \fIversion\fR] .SH DESCRIPTION .PP \fBrequestsync\fR looks at the versions of in Debian and Ubuntu, prompts for an explanation of why the Ubuntu changes (if there are any) should be dropped, downloads the changelog entry from packages.debian.org, and then prompts for your GPG passphrase so it can sign the mail and send it off, which files a sync request in the form of a bug report in Launchpad. @@ -15,16 +15,19 @@ Listed below are the command line options for requestsync: 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 \fB\-s\fR -Specifies that you require sponsorship. You need this option if you are not a member of ubuntu-dev for universe or multiverse, or ubuntu-core-dev for main or restricted. +Specifies that you require sponsorship. +You need this option if you are not a member of ubuntu-dev for universe or multiverse, or ubuntu-core-dev for main or restricted. .TP \fB\fR This is the source package that you would like to be synced from Debian. .TP \fB\fR -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, ie: gutsy. +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, ie: gutsy. .TP \fB[base version]\fR -In some cases, the base version (where the Ubuntu package started differing from the Debian package) can not be automatically determined. Specify this option in this case. +In some cases, the base version (where the Ubuntu package started differing from the Debian package) can not be automatically determined. +Specify this option in this case. .SH AUTHOR .PP This manual page was pieced together by Steve Kowalik. From d614cabff775a9e593d7392d0c03beae8281d1c5 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Wed, 12 Sep 2007 16:27:54 +0200 Subject: [PATCH 58/96] * revuput: deal with the case of NEW packages. * hugdaylist: added a tool to write Wiki lists of bugs in as in https://wiki.ubuntu.com/UbuntuBugDay/20070912 --- debian/changelog | 6 +++++ debian/control | 2 +- hugdaylist | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ revuput | 25 +++++++++++++----- setup.py | 3 ++- 5 files changed, 95 insertions(+), 9 deletions(-) create mode 100755 hugdaylist diff --git a/debian/changelog b/debian/changelog index 9921e5d..d430ace 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,13 @@ ubuntu-dev-tools (0.7) UNRELEASED; 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 as + in https://wiki.ubuntu.com/UbuntuBugDay/20070912 + -- Colin Watson Wed, 12 Sep 2007 09:28:54 +0100 ubuntu-dev-tools (0.6) gutsy; urgency=low diff --git a/debian/control b/debian/control index 4dc9427..3097a6a 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.9) +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14) Recommends: bzr, pbuilder Conflicts: devscripts (<< 2.10.7ubuntu5) Replaces: devscripts (<< 2.10.7ubuntu5) diff --git a/hugdaylist b/hugdaylist new file mode 100755 index 0000000..51d726e --- /dev/null +++ b/hugdaylist @@ -0,0 +1,68 @@ +#!/usr/bin/python +# +# Copyright 2007, Canonical, Daniel Holbach +# +# GPL 3 +# +# hugdaylist +# - produces lists like https://wiki.ubuntu.com/UbuntuBugDay/20070912?action=raw +# +# hugdaylist -n +# - will only list URLs +# + +import re +import os +import sys +import string + +try: + import launchpadbugs.connector as Connector +except: + print >> sys.stderr, \ + "You need python-launchpad-bugs (>= 0.2.9) installed to use hugdaylist." + sys.exit(1) + + +USAGE = "hugdaylist [-n ] " + +def check_args(): + howmany = -1 + url = "" + + if len(sys.argv) < 2: + print >> sys.stderr, USAGE + sys.exit(1) + + if sys.argv[1] == "-n": + howmany = int(sys.argv[2]) + url = sys.argv[3] + else: + url = sys.argv[1] + + return (howmany, url) + +def main(): + + (howmany, url) = check_args() + + BugList = Connector.ConnectBugList() + l = BugList(url) + + if not l.bugs: + print "BugList of %s is empty." % url + sys.exit(0) + + if howmany == -1: + howmany = len(l.bugs) + + print "|| Bug || Subject || Triager ||" + + for i in list(l.bugs)[:howmany]: + print '|| [%s %s] || %s || ||' % \ + (i.url, i.bugnumber, i.summary) + + +if __name__ == '__main__': + main() + diff --git a/revuput b/revuput index 04b74f9..bd9c471 100755 --- a/revuput +++ b/revuput @@ -1,12 +1,12 @@ #!/usr/bin/python # -# Copyright 2007, Canonical +# Copyright 2007, Canonical, Daniel Holbach # # GPL 3 # # # Notes: -# - needs dput, python-launchpad-bugs (>= 0.2.9) +# - needs dput, python-launchpad-bugs (>= 0.2.14) # - needs http://launchpad.net/bugs/137767 to get fixed # # @@ -28,7 +28,7 @@ try: import launchpadbugs.connector as Connector except: print >> sys.stderr, \ - "You need python-launchpad-bugs (>= 0.2.9) installed to use revuput." + "You need python-launchpad-bugs (>= 0.2.14) installed to use revuput." sys.exit(1) #try: @@ -150,6 +150,8 @@ def deal_with_bugreport(bugnumbers, host, incoming, sourcepackage, version): if component in ["universe", "multiverse"] and \ 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]: bug.subscribers.add('ubuntu-universe-sponsors') + if not component: + bug.tags.append("needs-packaging") comment = Bug.NewComment(text=assemble_bug_comment_text(host, incoming, sourcepackage, version), @@ -198,10 +200,18 @@ def file_bug(sourcepackage, version): Bug = Connector.ConnectBug() Bug.authentication = os.path.expanduser("~/.lpcookie") - bug = Bug.New(product={"name": sourcepackage, "target": "ubuntu"}, - summary="Please sponsor %s %s" % (sourcepackage, version), - description=\ - "The new package will be uploaded to PPA shortly.") + try: + bug = Bug.New(product={"name": sourcepackage, "target": "ubuntu"}, + summary="Please sponsor %s %s" % \ + (sourcepackage, version), + description=\ + "The new package will be uploaded to PPA shortly.") + except: + bug = Bug.New(product={"name": "ubuntu"}, + summary="Please sponsor %s %s" % \ + (sourcepackage, version), + description=\ + "The new package will be uploaded to PPA shortly.") print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \ (bug.bugnumber, bug.bugnumber) @@ -228,6 +238,7 @@ def main(): host = lookup_dput_host(location) (dput_res, incoming) = call_dput(location, changesfile) if not dput_res: + print >> sys.stderr, "%s was not uploaded." % changesfile sys.exit(1) fixed_lp_bugs = find_fixed_launchpad_bug(changesfile) diff --git a/setup.py b/setup.py index da89349..bef997f 100755 --- a/setup.py +++ b/setup.py @@ -26,7 +26,8 @@ setup(name='ubuntu-dev-tools', 'what-patch', 'suspicious-source', 'revuput', - 'requestsync' + 'requestsync', + 'hugdaylist' ], ) From 7f984ef144e44b1dfc50f634a26a45c5afa0dc58 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Wed, 12 Sep 2007 16:59:15 +0200 Subject: [PATCH 59/96] new release --- debian/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d430ace..554297b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ubuntu-dev-tools (0.7) UNRELEASED; urgency=low +ubuntu-dev-tools (0.7) gutsy; urgency=low [Colin Watson] * Fix *roff use (hyphens vs. dashes, start each sentence on a new line). @@ -7,6 +7,7 @@ ubuntu-dev-tools (0.7) UNRELEASED; urgency=low * revuput: deal with the case of NEW packages. * hugdaylist: added a tool to write Wiki lists of bugs in as in https://wiki.ubuntu.com/UbuntuBugDay/20070912 + * debian/control: bumped python-launchpad-bugs version. -- Colin Watson Wed, 12 Sep 2007 09:28:54 +0100 From e0949e63f68ae57aee556d9742ef0fb781733748 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 13 Sep 2007 14:36:09 +0200 Subject: [PATCH 60/96] * Renamed revuput to ppaput. --- debian/changelog | 6 ++++++ debian/rules | 4 ++-- doc/{revuput.1.docbook => ppaput.1.docbook} | 8 ++++---- revuput => ppaput | 6 +++--- setup.py | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) rename doc/{revuput.1.docbook => ppaput.1.docbook} (97%) rename revuput => ppaput (98%) diff --git a/debian/changelog b/debian/changelog index 554297b..46256bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ubuntu-dev-tools (0.8) gutsy; urgency=low + + * Renamed revuput to ppaput. + + -- Daniel Holbach Thu, 13 Sep 2007 14:35:18 +0200 + ubuntu-dev-tools (0.7) gutsy; urgency=low [Colin Watson] diff --git a/debian/rules b/debian/rules index 12b64ce..c2b9d93 100755 --- a/debian/rules +++ b/debian/rules @@ -8,7 +8,7 @@ include /usr/share/cdbs/1/class/python-distutils.mk DEB_INSTALL_MANPAGES_ubuntu-dev-tools = doc/*.1 build/ubuntu-dev-tools:: - docbook2x-man doc/revuput.1.docbook; mv revuput.1 doc + docbook2x-man doc/ppaput.1.docbook; mv ppaput.1 doc clean:: - rm -f doc/revuput.1 + rm -f doc/ppaput.1 diff --git a/doc/revuput.1.docbook b/doc/ppaput.1.docbook similarity index 97% rename from doc/revuput.1.docbook rename to doc/ppaput.1.docbook index 0795bfb..1a19b36 100644 --- a/doc/revuput.1.docbook +++ b/doc/ppaput.1.docbook @@ -19,16 +19,16 @@ - revuput + ppaput 1 - revuput + ppaput A tool for uploading packages for sponsorship - revuput + ppaput @@ -104,7 +104,7 @@ - revuput options: + ppaput options: files a new bug report and adds it's number to diff --git a/revuput b/ppaput similarity index 98% rename from revuput rename to ppaput index bd9c471..be935cd 100755 --- a/revuput +++ b/ppaput @@ -28,18 +28,18 @@ try: import launchpadbugs.connector as Connector except: print >> sys.stderr, \ - "You need python-launchpad-bugs (>= 0.2.14) installed to use revuput." + "You need python-launchpad-bugs (>= 0.2.14) installed to use ppaput." sys.exit(1) #try: # import apt #except: -# print >> sys.stderr, "You need python-apt installed to use revuput." +# print >> sys.stderr, "You need python-apt installed to use ppaput." # sys.exit(1) USAGE = \ -"""Usage: revuput [-n] [] [] +"""Usage: ppaput [-n] [] [] -n to file a new bug dput alias diff --git a/setup.py b/setup.py index bef997f..41bcb8a 100755 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ setup(name='ubuntu-dev-tools', 'pull-debian-debdiff', 'what-patch', 'suspicious-source', - 'revuput', + 'ppaput', 'requestsync', 'hugdaylist' ], From 50bdd9318322235e6bdbf6cae5081cdda9d5298e Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Thu, 13 Sep 2007 14:42:13 +0200 Subject: [PATCH 61/96] Added submittodebian man page. --- debian/changelog | 6 ++++++ doc/submittodebian.1 | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 doc/submittodebian.1 diff --git a/debian/changelog b/debian/changelog index 46256bc..d7dfa62 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ubuntu-dev-tools (0.9) gutsy; urgency=low + + * Added submittodebian.1 + + -- Soren Hansen Thu, 13 Sep 2007 14:38:49 +0200 + ubuntu-dev-tools (0.8) gutsy; urgency=low * Renamed revuput to ppaput. diff --git a/doc/submittodebian.1 b/doc/submittodebian.1 new file mode 100644 index 0000000..e753ffe --- /dev/null +++ b/doc/submittodebian.1 @@ -0,0 +1,25 @@ +.TH SUBMITTODEBIAN 1 "Sep 2007" +.SH NAME +submittodebian \- submit changes in Debian source tree to Debian +.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 bts. +.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 was written by Soren Hansen . From ad934233e980f67fff4d4b4c8f30cf2cec1e08b5 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 14 Sep 2007 11:24:45 +0200 Subject: [PATCH 62/96] * 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. --- README | 13 +++++++++ compare-packages | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ debian/changelog | 9 +++++++ setup.py | 3 ++- 4 files changed, 92 insertions(+), 1 deletion(-) create mode 100755 compare-packages diff --git a/README b/README index 976ad82..0f33817 100644 --- a/README +++ b/README @@ -10,12 +10,19 @@ check-symbols [] files in all binary packages of . is not mandatory and set to /var/cache/pbuilder/result by default. +compare-packages [] + ... will compare the contents of the binary packages of in the current directory with those in + dch-repeat [--help] ... will repeat a change log into an older release. get-branches [checkout|branch] ... will branch / checkout all the Bazaar branches in a Launchpad team. +hugdaylist [-n ] + ... will create a list of bug list for a hug day listing + mk-sbuild-lv ... will create LVM snapshot chroots via schroot and sbuild. It assumes that sbuild has not be installed and configured before. @@ -24,6 +31,12 @@ pbuilder-dist [create|update|build|clean|login|execute] ... is a wrapper to use pbuilder with many different distributions / versions. It has to be renamed to something like pbuilder-feisty, pbuilder-gutsy, etc. +ppaput [-n] [] + ... will build a source package using , upload it + to and follow up on specified bugs, make sure the + sponsoring process is followed. Also it will file a new bug, if + '-n' is used. + pull-debian-debdiff ... will attempt to find and download a specific version of a Debian package and its immediate parent to generate a debdiff. diff --git a/compare-packages b/compare-packages new file mode 100755 index 0000000..dccb148 --- /dev/null +++ b/compare-packages @@ -0,0 +1,68 @@ +#!/usr/bin/python +# +# Copyright 2007, Canonical, Daniel Holbach +# +# GPL 3 + +import os +import sys +import glob + +USAGE = \ +"""compare-packages [] + + compares contents of binary packages of in the current + directory with those in """ + +def check_args(): + directory = "/var/cache/pbuilder/result" + sourcepackage = "" + + if len(sys.argv) < 2: + print USAGE + sys.exit(1) + + if sys.argv[1] in [ '-h', '--help' ]: + print USAGE + sys.exit(0) + + if len(sys.argv) > 1: + sourcepackage = sys.argv[1] + if len(sys.argv) > 2: + directory = sys.argv[2] + + return (sourcepackage, directory) + + +def main(): + (sourcepackage, directory) = check_args() + + (dummy, output, dummy) = os.popen3("apt-cache showsrc %s | grep ^Binary" % \ + (sourcepackage)) + binarypackages = output.read().split(":")[1].strip().split(", ") + + if not os.path.exists("/usr/bin/debdiff"): + print >> sys.stderr, \ + "'/usr/bin/debdiff' not found, please install 'devscripts'." + sys.exit(1) + + if not os.path.isdir(directory): + print >> sys.stderr, "Directory %s not found." % directory + sys.exit(1) + + for package in binarypackages: + old = glob.glob("./%s*.deb" % package) + new = glob.glob("%s/%s*.deb" % (directory, package)) + + if not new or not old: + print "Skipping %s, no matching new and old package found." % package + else: + print "Comparing %s and %s" % (old[0], new[0]) + sys.stdout.flush() + os.system("debdiff %s %s" % (old[0], new[0])) + print '' + print '---' + +if __name__ == '__main__': + main() + diff --git a/debian/changelog b/debian/changelog index d7dfa62..c2aa1cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +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 Fri, 14 Sep 2007 11:23:36 +0200 + ubuntu-dev-tools (0.9) gutsy; urgency=low * Added submittodebian.1 diff --git a/setup.py b/setup.py index 41bcb8a..62c486e 100755 --- a/setup.py +++ b/setup.py @@ -27,7 +27,8 @@ setup(name='ubuntu-dev-tools', 'suspicious-source', 'ppaput', 'requestsync', - 'hugdaylist' + 'hugdaylist', + 'compare-packages' ], ) From a284445a6b2c17d873d25ac6e834601c5da35a71 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 14 Sep 2007 13:45:19 +0200 Subject: [PATCH 63/96] * compare-packages, README: dropped compare-packages, debdiff has the same functionality, when used with --from --to or on *.changes files. --- README | 4 --- compare-packages | 68 ------------------------------------------------ debian/changelog | 7 +++++ setup.py | 3 +-- 4 files changed, 8 insertions(+), 74 deletions(-) delete mode 100755 compare-packages diff --git a/README b/README index 0f33817..e1301fd 100644 --- a/README +++ b/README @@ -10,10 +10,6 @@ check-symbols [] files in all binary packages of . is not mandatory and set to /var/cache/pbuilder/result by default. -compare-packages [] - ... will compare the contents of the binary packages of in the current directory with those in - dch-repeat [--help] ... will repeat a change log into an older release. diff --git a/compare-packages b/compare-packages deleted file mode 100755 index dccb148..0000000 --- a/compare-packages +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/python -# -# Copyright 2007, Canonical, Daniel Holbach -# -# GPL 3 - -import os -import sys -import glob - -USAGE = \ -"""compare-packages [] - - compares contents of binary packages of in the current - directory with those in """ - -def check_args(): - directory = "/var/cache/pbuilder/result" - sourcepackage = "" - - if len(sys.argv) < 2: - print USAGE - sys.exit(1) - - if sys.argv[1] in [ '-h', '--help' ]: - print USAGE - sys.exit(0) - - if len(sys.argv) > 1: - sourcepackage = sys.argv[1] - if len(sys.argv) > 2: - directory = sys.argv[2] - - return (sourcepackage, directory) - - -def main(): - (sourcepackage, directory) = check_args() - - (dummy, output, dummy) = os.popen3("apt-cache showsrc %s | grep ^Binary" % \ - (sourcepackage)) - binarypackages = output.read().split(":")[1].strip().split(", ") - - if not os.path.exists("/usr/bin/debdiff"): - print >> sys.stderr, \ - "'/usr/bin/debdiff' not found, please install 'devscripts'." - sys.exit(1) - - if not os.path.isdir(directory): - print >> sys.stderr, "Directory %s not found." % directory - sys.exit(1) - - for package in binarypackages: - old = glob.glob("./%s*.deb" % package) - new = glob.glob("%s/%s*.deb" % (directory, package)) - - if not new or not old: - print "Skipping %s, no matching new and old package found." % package - else: - print "Comparing %s and %s" % (old[0], new[0]) - sys.stdout.flush() - os.system("debdiff %s %s" % (old[0], new[0])) - print '' - print '---' - -if __name__ == '__main__': - main() - diff --git a/debian/changelog b/debian/changelog index c2aa1cb..1bc011e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ubuntu-dev-tools (0.11) UNRELEASED; urgency=low + + * compare-packages, README: dropped compare-packages, debdiff has the same + functionality, when used with --from --to or on *.changes files. + + -- Daniel Holbach Fri, 14 Sep 2007 13:44:07 +0200 + ubuntu-dev-tools (0.10) gutsy; urgency=low * compare-packages: added script to compare the contents of 'old' and 'new' diff --git a/setup.py b/setup.py index 62c486e..41bcb8a 100755 --- a/setup.py +++ b/setup.py @@ -27,8 +27,7 @@ setup(name='ubuntu-dev-tools', 'suspicious-source', 'ppaput', 'requestsync', - 'hugdaylist', - 'compare-packages' + 'hugdaylist' ], ) From f993423019bb3fec5fc1a17701222fda6061e48a Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Fri, 14 Sep 2007 22:44:32 +0200 Subject: [PATCH 64/96] Fix bug in pbuilder (--mirror was missing) --- pbuilder-dist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pbuilder-dist b/pbuilder-dist index 6050f53..de48668 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -105,8 +105,7 @@ distdata() case $DISTRIBUTION in - #warty|hoary|breezy) - dapper|edgy|feisty|gutsy) + dapper|edgy|feisty|gutsy) # warty|hoary|breezy distdata ubuntu ;; @@ -168,5 +167,6 @@ sudo pbuilder $OPERATION \ $( [ $SAVELOG = 0 ] || echo "--logfile $BASE_DIR/.lastlog" ) \ $( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \ --buildresult $BASE_DIR/${FOLDERBASE}_result \ + --mirror "$ARCHIVE" \ --othermirror "\"deb $ARCHIVE $DISTRIBUTION $COMPONENTS\"" \ $@ From 8712768c774712cd8f65ff6a3a742f4543ae48df Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Sat, 15 Sep 2007 00:05:55 +0200 Subject: [PATCH 65/96] Add manpage for suspicious-source. --- doc/pbuilder-dist.1 | 1 - doc/suspicious-source.1 | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 doc/suspicious-source.1 diff --git a/doc/pbuilder-dist.1 b/doc/pbuilder-dist.1 index ec28398..9575abf 100644 --- a/doc/pbuilder-dist.1 +++ b/doc/pbuilder-dist.1 @@ -1,7 +1,6 @@ .\" Title: pbuilder-dist .\" Author: Siegfried-Angel Gevatter Pujals .\" Contact details: siggi.gevatter@gmail.com -.\" August 16, 2007 .\" .TH PBUILDER\-DIST 1 "August 16, 2007" .\" diff --git a/doc/suspicious-source.1 b/doc/suspicious-source.1 new file mode 100644 index 0000000..a773b15 --- /dev/null +++ b/doc/suspicious-source.1 @@ -0,0 +1,29 @@ +.\" Title: suspicious-source +.\" Author: Siegfried-Angel Gevatter Pujals +.\" Contact details: siggi.gevatter@gmail.com +.\" +.TH SUSPICIOUS\-SOURCE 1 "Setember 14, 2007" +.\" +.SH NAME +suspicious\-source \- search for files that are not the GPL's "prefered form of modification" +.\" +.SH SYNOPSIS +\fBsuspicious\-source\fP +.\" +.SH DESCRIPTION +\fBsuspicious\-source\fP is a little 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 "prefered 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 AUTHORS +\fBsuspicious\-source\fP has been written by Siegfried-Angel Gevatter Pujals , based upon +a script with the same name, by Martin Pitt . +.\" +.SH SEE ALSO +\fBfind(1)\fR +.\" +.SH COPYRIGHT +This manual page was written by Siegfried-Angel Gevatter Pujals (RainCT). It is released under the GNU General Public License, version 2 or later. From a4b257b4bf97b2d193e0cec48602dfdee2162cfc Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Sat, 15 Sep 2007 00:17:20 +0200 Subject: [PATCH 66/96] update changelog --- debian/changelog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 1bc011e..cd7acb6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,14 @@ ubuntu-dev-tools (0.11) UNRELEASED; urgency=low + [ Daniel Holbach ] * compare-packages, README: dropped compare-packages, debdiff has the same functionality, when used with --from --to or on *.changes files. - -- Daniel Holbach Fri, 14 Sep 2007 13:44:07 +0200 + [ 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). + + -- Siegfried-Angel Gevatter Pujals (RainCT) Sat, 15 Sep 2007 00:14:51 +0200 ubuntu-dev-tools (0.10) gutsy; urgency=low From d61c07aeec365495c22dce96d13a540cec5ea64f Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Mon, 24 Sep 2007 09:41:17 +0200 Subject: [PATCH 67/96] * hugdaylist: prepare the list more carefully (filter out 'fixed committed' bugs and bugs that have ubuntu-*-sponsors subscribed. --- debian/changelog | 6 ++++-- hugdaylist | 12 ++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index cd7acb6..226deb0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,16 @@ -ubuntu-dev-tools (0.11) UNRELEASED; urgency=low +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). - -- Siegfried-Angel Gevatter Pujals (RainCT) Sat, 15 Sep 2007 00:14:51 +0200 + -- Daniel Holbach Mon, 24 Sep 2007 09:39:24 +0200 ubuntu-dev-tools (0.10) gutsy; urgency=low diff --git a/hugdaylist b/hugdaylist index 51d726e..cbae7e6 100755 --- a/hugdaylist +++ b/hugdaylist @@ -42,12 +42,20 @@ def check_args(): return (howmany, url) -def main(): +def filter_unsolved(bugs): + result = set() + for b in bugs: + if b.status != 'Fix Committed' and \ + 'ubuntu-main-sponsors' not in [str(s) for s in b.subscribers] and \ + 'ubuntu-universe-sponsors' not in [str(s) for s in b.subscribers]: + result.add(b) + return result +def main(): (howmany, url) = check_args() BugList = Connector.ConnectBugList() - l = BugList(url) + l = BugList(url).filter(func=[filter_unsolved]) if not l.bugs: print "BugList of %s is empty." % url From a8dd716512c77b3fe8a4218249dc60c944bdcd82 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Mon, 24 Sep 2007 09:50:48 +0200 Subject: [PATCH 68/96] * hugdaylist: apply quick fix to not crash. --- debian/changelog | 6 ++++++ hugdaylist | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 226deb0..612ed32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ubuntu-dev-tools (0.12) gutsy; urgency=low + + * hugdaylist: apply quick fix to not crash. + + -- Daniel Holbach Mon, 24 Sep 2007 09:43:30 +0200 + ubuntu-dev-tools (0.11) gutsy; urgency=low [ Daniel Holbach ] diff --git a/hugdaylist b/hugdaylist index cbae7e6..ae8a75d 100755 --- a/hugdaylist +++ b/hugdaylist @@ -18,6 +18,8 @@ import string try: import launchpadbugs.connector as Connector + BugList = Connector.ConnectBugList() + Bug = Connector.ConnectBug() except: print >> sys.stderr, \ "You need python-launchpad-bugs (>= 0.2.9) installed to use hugdaylist." @@ -44,17 +46,18 @@ def check_args(): def filter_unsolved(bugs): result = set() + for b in bugs: - if b.status != 'Fix Committed' and \ - 'ubuntu-main-sponsors' not in [str(s) for s in b.subscribers] and \ - 'ubuntu-universe-sponsors' not in [str(s) for s in b.subscribers]: + bug = Bug(int(b)) + if bug.status != 'Fix Committed' and \ + 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers] and \ + 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]: result.add(b) return result def main(): (howmany, url) = check_args() - BugList = Connector.ConnectBugList() l = BugList(url).filter(func=[filter_unsolved]) if not l.bugs: From 704b0702939450174f6c2181843ec08dcacca215 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 09:44:58 +0200 Subject: [PATCH 69/96] initial massfile import --- massfile | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100755 massfile diff --git a/massfile b/massfile new file mode 100755 index 0000000..ceed51c --- /dev/null +++ b/massfile @@ -0,0 +1,81 @@ +# Used Martin Pitt's excellent requestsync script, to get this started. + +#!/usr/bin/env python + +import os, os.path, sys, subprocess + +subject = "" +assignee = "" +report = "" +pack_list = set() + +instructions_file_name = "instructions" +list_file_name = "list" + +def read_config(): + global subject, assignee, report + for line in open(os.getcwd()+"/"+instructions_file_name).readlines(): + if line.startswith("subject:"): + subject = line.split("subject: ")[1] + else: + if line.startswith("assignee:"): + assignee = line.split("assignee: ")[1] + else: + report += line + +def read_list(): + global pack_list + for line in open(os.getcwd()+"/"+list_file_name).readlines(): + if line.strip()!="": + pack_list.add(line.strip("\n")) + +# +# entry point +# + +if os.path.exists(os.getcwd()+"/"+instructions_file_name): + read_config() +else: + print "%s does not exists." % (os.getcwd()+"/"+instructions_file_name) + sys.exit(1) + +if os.path.exists(os.getcwd()+"/"+list_file_name): + read_list() +else: + print "%s does not exists." % (os.getcwd()+"/"+list_file_name) + sys.exit(1) + +for pack in pack_list: + # generate bug report + mailtext = """ affects distros/ubuntu/%s + status confirmed + subscribe %s + +%s + """ % (pack, assignee, report) + mailtext = mailtext.replace("$pack", pack) + subject = subject.replace("$pack", pack) + + # sign it + sign_command = "gpg" + if os.access("/usr/bin/gnome-gpg", os.X_OK): + sign_command = "gnome-gpg" + + gpg = subprocess.Popen([sign_command, "--clearsign"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) + signed_report = gpg.communicate(mailtext)[0] + assert gpg.returncode == 0 + + # generate email + to = "new@bugs.launchpad.net" + + print """To: %s +Subject: %s +%s""" % (to, subject, signed_report) + print "Press enter to file this bug, Control-C to abort" + sys.stdin.readline() + + mail_process = subprocess.Popen(["mail", "-s", subject, to], + stdin=subprocess.PIPE, stdout=subprocess.PIPE) + mail_process.communicate(signed_report) + + subject = subject.replace(pack, "$pack") From 0f64f93961b479fa02e560ccd12327541de2a45c Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 11:09:42 +0200 Subject: [PATCH 70/96] * massfile: added script to file mass-bugs. * debian/examples, examples/massfile.{instructions,list}: added example files. * setup.py: install massfile. --- debian/changelog | 9 ++ debian/examples | 1 + examples/massfile.instructions | 15 +++ examples/massfile.list | 2 + massfile | 169 ++++++++++++++++++++------------- setup.py | 3 +- 6 files changed, 132 insertions(+), 67 deletions(-) create mode 100644 debian/examples create mode 100644 examples/massfile.instructions create mode 100644 examples/massfile.list diff --git a/debian/changelog b/debian/changelog index 612ed32..0c942fb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +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 Thu, 27 Sep 2007 11:04:52 +0200 + ubuntu-dev-tools (0.12) gutsy; urgency=low * hugdaylist: apply quick fix to not crash. diff --git a/debian/examples b/debian/examples new file mode 100644 index 0000000..e39721e --- /dev/null +++ b/debian/examples @@ -0,0 +1 @@ +examples/* diff --git a/examples/massfile.instructions b/examples/massfile.instructions new file mode 100644 index 0000000..e500b53 --- /dev/null +++ b/examples/massfile.instructions @@ -0,0 +1,15 @@ +subject: [UNMETDEPS] $pack has unmet dependencies +assignee: +subscribers: motu +tags: 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. + diff --git a/examples/massfile.list b/examples/massfile.list new file mode 100644 index 0000000..f496352 --- /dev/null +++ b/examples/massfile.list @@ -0,0 +1,2 @@ +z88dk +zope-quotafolder diff --git a/massfile b/massfile index ceed51c..6617a4d 100755 --- a/massfile +++ b/massfile @@ -1,81 +1,118 @@ -# Used Martin Pitt's excellent requestsync script, to get this started. +#!/usr/bin/python +# +# (C) Canonical, 2007, GPL v3 -#!/usr/bin/env python +import os +import sys +import email +import subprocess -import os, os.path, sys, subprocess +import launchpadbugs.connector as Connector -subject = "" -assignee = "" -report = "" -pack_list = set() -instructions_file_name = "instructions" -list_file_name = "list" +example_dir = "/usr/share/doc/ubuntu-dev-tools/examples" def read_config(): - global subject, assignee, report - for line in open(os.getcwd()+"/"+instructions_file_name).readlines(): - if line.startswith("subject:"): - subject = line.split("subject: ")[1] - else: - if line.startswith("assignee:"): - assignee = line.split("assignee: ")[1] - else: - report += line + 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": + instr[field] = instructions.get(field) + + return instr def read_list(): - global pack_list - for line in open(os.getcwd()+"/"+list_file_name).readlines(): - if line.strip()!="": - pack_list.add(line.strip("\n")) + pack_list = set() -# -# entry point -# + listfile = open("list") + for line in listfile.readlines(): + if line.strip()!="": + pack_list.add(line.strip("\n")) -if os.path.exists(os.getcwd()+"/"+instructions_file_name): - read_config() -else: - print "%s does not exists." % (os.getcwd()+"/"+instructions_file_name) - sys.exit(1) + listfile.close() + return pack_list + +def file_bug(): + Bug = Connector.ConnectBug() + Bug.authentication = os.path.expanduser("~/.lpcookie") + + +def check_configfiles(): + result = True + + 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): + Bug = Connector.ConnectBug() + Bug.authentication = os.path.expanduser("~/.lpcookie") + +# try: + bug = Bug.New(product={"name": config["sourcepackage"], "target": "ubuntu"}, + summary=config["subject"], + description=config["text"]) + print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \ + (bug.bugnumber, bug.bugnumber) + for sub in config["subscribers"].split(","): + if sub.strip("\n").strip(): + bug.subscribers.add(sub.strip("\n").strip()) + for tag in config["tags"].split(","): + if tag.strip("\n").strip(): + bug.tags.append(tag.strip("\n").strip()) + bug.assignee = config["assignee"] + bug.commit() +# except: +# "Bug for '%s' was not filed." % config["sourcepackage"] + +def read_buglist(url): + BugList = Connector.ConnectBugList() + packages = set() + + buglist = BugList(url) + for bug in buglist.bugs: + packages.add(bug.sourcepackage) + + return packages + + +def main(): + if not check_configfiles(): + sys.exit(1) + + if not os.path.exists(os.path.expanduser("~/.lpcookie")): + print >> sys.stderr, \ + "Launchpad cookie not found in ~/.lpcookie." + sys.exit(1) + + config = read_config() + pack_list = read_list() + buglist = read_buglist(config["buglist-url"]) -if os.path.exists(os.getcwd()+"/"+list_file_name): - read_list() -else: - print "%s does not exists." % (os.getcwd()+"/"+list_file_name) - sys.exit(1) + for pack in pack_list: + if pack not in buglist: + config["text"] = config["text"].replace("$pack", pack) + config["subject"] = config["subject"].replace("$pack", pack) + config["sourcepackage"] = pack -for pack in pack_list: - # generate bug report - mailtext = """ affects distros/ubuntu/%s - status confirmed - subscribe %s + file_bug(config) -%s - """ % (pack, assignee, report) - mailtext = mailtext.replace("$pack", pack) - subject = subject.replace("$pack", pack) - - # sign it - sign_command = "gpg" - if os.access("/usr/bin/gnome-gpg", os.X_OK): - sign_command = "gnome-gpg" - - gpg = subprocess.Popen([sign_command, "--clearsign"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) - signed_report = gpg.communicate(mailtext)[0] - assert gpg.returncode == 0 - - # generate email - to = "new@bugs.launchpad.net" - print """To: %s -Subject: %s -%s""" % (to, subject, signed_report) - print "Press enter to file this bug, Control-C to abort" - sys.stdin.readline() +if __name__ == '__main__': + main() - mail_process = subprocess.Popen(["mail", "-s", subject, to], - stdin=subprocess.PIPE, stdout=subprocess.PIPE) - mail_process.communicate(signed_report) - - subject = subject.replace(pack, "$pack") diff --git a/setup.py b/setup.py index 41bcb8a..a19154b 100755 --- a/setup.py +++ b/setup.py @@ -27,7 +27,8 @@ setup(name='ubuntu-dev-tools', 'suspicious-source', 'ppaput', 'requestsync', - 'hugdaylist' + 'hugdaylist', + 'massfile' ], ) From 0a00f91d9bf8908a43decac90c7bc77b19b828ec Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 11:44:42 +0200 Subject: [PATCH 71/96] * massfile: fixed bug where to find example files. --- debian/changelog | 6 ++++++ massfile | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0c942fb..579db09 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ubuntu-dev-tools (0.14) UNRELEASED; urgency=low + + * massfile: fixed bug where to find example files. + + -- Daniel Holbach Thu, 27 Sep 2007 11:43:55 +0200 + ubuntu-dev-tools (0.13) gutsy; urgency=low * massfile: added script to file mass-bugs. diff --git a/massfile b/massfile index 6617a4d..00d9237 100755 --- a/massfile +++ b/massfile @@ -10,8 +10,6 @@ import subprocess import launchpadbugs.connector as Connector -example_dir = "/usr/share/doc/ubuntu-dev-tools/examples" - def read_config(): instructions_file = open("instructions") instructions = email.message_from_file(instructions_file) @@ -43,6 +41,12 @@ def file_bug(): 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, \ From 20f58ebcb6aefc1104fe33e2e99a43af2af3e611 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 11:49:05 +0200 Subject: [PATCH 72/96] * massfile: - fixed bug where to find example files, - made url get checked beforehand. --- debian/changelog | 4 +++- massfile | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 579db09..c00f996 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ubuntu-dev-tools (0.14) UNRELEASED; urgency=low - * massfile: fixed bug where to find example files. + * massfile: + - fixed bug where to find example files, + - made url get checked beforehand. -- Daniel Holbach Thu, 27 Sep 2007 11:43:55 +0200 diff --git a/massfile b/massfile index 00d9237..ad3946f 100755 --- a/massfile +++ b/massfile @@ -43,9 +43,9 @@ def check_configfiles(): bin_path = os.path.dirname(os.path.abspath(__file__)) if bin_path == "/usr/bin": - example_dir = "/usr/share/doc/ubuntu-dev-tools/examples" + example_dir = "/usr/share/doc/ubuntu-dev-tools/examples" else: - example_dir = "%s/examples" % bin_path + example_dir = "%s/examples" % bin_path if not os.path.exists("instructions"): os.system("cp %s/massfile.instructions instructions" % example_dir) @@ -87,10 +87,11 @@ def file_bug(config): def read_buglist(url): BugList = Connector.ConnectBugList() packages = set() - - buglist = BugList(url) - for bug in buglist.bugs: - packages.add(bug.sourcepackage) + + if url: + buglist = BugList(url) + for bug in buglist.bugs: + packages.add(bug.sourcepackage) return packages From 38bb1a63aedeb011d1db826419996d8ff92b6376 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 11:50:32 +0200 Subject: [PATCH 73/96] * examples/massfile.instructions: added example buglist-url. --- debian/changelog | 1 + examples/massfile.instructions | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index c00f996..e93f445 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ubuntu-dev-tools (0.14) UNRELEASED; urgency=low * massfile: - fixed bug where to find example files, - made url get checked beforehand. + * examples/massfile.instructions: added example buglist-url. -- Daniel Holbach Thu, 27 Sep 2007 11:43:55 +0200 diff --git a/examples/massfile.instructions b/examples/massfile.instructions index e500b53..4605afc 100644 --- a/examples/massfile.instructions +++ b/examples/massfile.instructions @@ -2,6 +2,7 @@ subject: [UNMETDEPS] $pack has unmet dependencies assignee: subscribers: motu tags: unmetdeps +buglist-url: http://bugs.launchpad.net/ubuntu/+bugs?field.tag=unmetdeps text: A run of . From 833b9bdeee9c89256e036e8ca7e7cbc1c1f548d8 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 12:03:30 +0200 Subject: [PATCH 74/96] - fixed bug, where description and summary were not updated with the current source package. --- debian/changelog | 2 ++ massfile | 39 ++++++++++++++++++++------------------- 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/debian/changelog b/debian/changelog index e93f445..8c69d58 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ ubuntu-dev-tools (0.14) UNRELEASED; 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. -- Daniel Holbach Thu, 27 Sep 2007 11:43:55 +0200 diff --git a/massfile b/massfile index ad3946f..2c814a5 100755 --- a/massfile +++ b/massfile @@ -67,22 +67,26 @@ def file_bug(config): Bug = Connector.ConnectBug() Bug.authentication = os.path.expanduser("~/.lpcookie") -# try: - bug = Bug.New(product={"name": config["sourcepackage"], "target": "ubuntu"}, - summary=config["subject"], - description=config["text"]) - print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \ - (bug.bugnumber, bug.bugnumber) - for sub in config["subscribers"].split(","): - if sub.strip("\n").strip(): - bug.subscribers.add(sub.strip("\n").strip()) - for tag in config["tags"].split(","): - if tag.strip("\n").strip(): - bug.tags.append(tag.strip("\n").strip()) - bug.assignee = config["assignee"] - bug.commit() -# except: -# "Bug for '%s' was not filed." % config["sourcepackage"] + try: + summary = config["subject"].replace("$pack", pack) + description = config["text"].replace("$pack", pack) + + bug = Bug.New(product={"name": config["sourcepackage"], + "target": "ubuntu"}, + summary=summary, + description=description) + print "Successfully filed bug %s: http://launchpad.net/bugs/%s" % \ + (bug.bugnumber, bug.bugnumber) + for sub in config["subscribers"].split(","): + if sub.strip("\n").strip(): + bug.subscribers.add(sub.strip("\n").strip()) + for tag in config["tags"].split(","): + if tag.strip("\n").strip(): + bug.tags.append(tag.strip("\n").strip()) + bug.assignee = config["assignee"] + bug.commit() + except: + "Bug for '%s' was not filed." % config["sourcepackage"] def read_buglist(url): BugList = Connector.ConnectBugList() @@ -111,10 +115,7 @@ def main(): for pack in pack_list: if pack not in buglist: - config["text"] = config["text"].replace("$pack", pack) - config["subject"] = config["subject"].replace("$pack", pack) config["sourcepackage"] = pack - file_bug(config) From 73ef45df2b05390f7aa9394bbbc084026b62e019 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 12:04:24 +0200 Subject: [PATCH 75/96] . Thanks Andrew Mitchell, for helping out by fixing and clever advise. --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index 8c69d58..d2398e0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ ubuntu-dev-tools (0.14) UNRELEASED; urgency=low - 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 Thu, 27 Sep 2007 11:43:55 +0200 From 968e8f2c378afb65d2f729d6fee2e41bf356230b Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 12:17:12 +0200 Subject: [PATCH 76/96] another small fix --- massfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/massfile b/massfile index 2c814a5..b8861d9 100755 --- a/massfile +++ b/massfile @@ -68,8 +68,8 @@ def file_bug(config): Bug.authentication = os.path.expanduser("~/.lpcookie") try: - summary = config["subject"].replace("$pack", pack) - description = config["text"].replace("$pack", pack) + summary = config["subject"].replace("$pack", config["sourcepackage"]) + description = config["text"].replace("$pack", config["sourcepackage"]) bug = Bug.New(product={"name": config["sourcepackage"], "target": "ubuntu"}, From c3d00d0a95cfee0bcce134463b0708ff9e786a7a Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Thu, 27 Sep 2007 12:51:58 +0200 Subject: [PATCH 77/96] new release --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d2398e0..f1c7ce2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ubuntu-dev-tools (0.14) UNRELEASED; urgency=low +ubuntu-dev-tools (0.14) gutsy; urgency=low * massfile: - fixed bug where to find example files, From ea1c24b771f339773d986727626edac3e96955e9 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Fri, 28 Sep 2007 23:45:51 +0200 Subject: [PATCH 78/96] * pbuilder-dist: Fix error on chroot creation (LP: #146475) --- debian/changelog | 6 ++++++ pbuilder-dist | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index f1c7ce2..facbdbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ubuntu-dev-tools (0.15) gutsy; urgency=low + + * pbuilder-dist: Fix error on chroot creation (LP: #146475) + + -- Laurent Bigonville Fri, 28 Sep 2007 23:43:54 +0200 + ubuntu-dev-tools (0.14) gutsy; urgency=low * massfile: diff --git a/pbuilder-dist b/pbuilder-dist index de48668..df57be0 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -168,5 +168,5 @@ sudo pbuilder $OPERATION \ $( [ -z $DEBCACHE ] || echo "--aptcache $DEBCACHE" ) \ --buildresult $BASE_DIR/${FOLDERBASE}_result \ --mirror "$ARCHIVE" \ - --othermirror "\"deb $ARCHIVE $DISTRIBUTION $COMPONENTS\"" \ + --othermirror "deb $ARCHIVE $DISTRIBUTION $COMPONENTS" \ $@ From 80d91b0272ddc6e77b0b991bc6a786752f8b71c4 Mon Sep 17 00:00:00 2001 From: Albin Tonnerre Date: Sat, 29 Sep 2007 00:07:32 +0200 Subject: [PATCH 79/96] Add bigon's patch so that dch actually works when the directory is not named debian/ --- update-maintainer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-maintainer b/update-maintainer index 37e2ee1..cc6e992 100755 --- a/update-maintainer +++ b/update-maintainer @@ -52,5 +52,5 @@ for file in control{,.in,.real}; do [ -f $DEBIANDIR/$file ] && sed -ri "s/(^Maintainer:) (.*)/\1 $email\nXSBC-Original-\1 \2/" $DEBIANDIR/$file done -dch "Modify Maintainer value to match the DebianMaintainerField specification." +dch --changelog $DEBIANDIR/changelog "Modify Maintainer value to match the DebianMaintainerField specification." echo "Maintainer changed to $email." From 242d758f272947eff678097bbe3db257c7a3800a Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Mon, 1 Oct 2007 15:59:11 +0200 Subject: [PATCH 80/96] * update-maintainer: correctly pass path to dch (LP: #141015) --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index f1c7ce2..c9efbbf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ubuntu-dev-tools (0.15) UNRELEASED; urgency=low + + [ Laurent Bigonville ] + * update-maintainer: correctly pass path to dch (LP: #141015) + + -- Daniel Holbach Mon, 01 Oct 2007 15:56:18 +0200 + ubuntu-dev-tools (0.14) gutsy; urgency=low * massfile: From 17794d65bb3c63ebf98d861cc83770c3276086f5 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Mon, 1 Oct 2007 16:13:47 +0200 Subject: [PATCH 81/96] * ppaput: fix indentation issues. --- debian/changelog | 3 ++ ppaput | 124 +++++++++++++++++++++++------------------------ 2 files changed, 65 insertions(+), 62 deletions(-) diff --git a/debian/changelog b/debian/changelog index c9efbbf..5dee761 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,9 @@ ubuntu-dev-tools (0.15) UNRELEASED; urgency=low [ Laurent Bigonville ] * update-maintainer: correctly pass path to dch (LP: #141015) + [ Daniel Holbach ] + * ppaput: fix indentation issues. + -- Daniel Holbach Mon, 01 Oct 2007 15:56:18 +0200 ubuntu-dev-tools (0.14) gutsy; urgency=low diff --git a/ppaput b/ppaput index be935cd..c07df9f 100755 --- a/ppaput +++ b/ppaput @@ -49,15 +49,15 @@ USAGE = \ def dput_check(): if not os.path.exists("/usr/bin/dput"): - print >> sys.stderr, "You need to install the dput package." - sys.exit(1) + print >> sys.stderr, "You need to install the dput package." + sys.exit(1) def find_fixed_launchpad_bug(changesfile): changes = open(changesfile).readlines() for line in changes: - if line.startswith("Launchpad-Bugs-Fixed"): - return line.split(":")[1].split() + if line.startswith("Launchpad-Bugs-Fixed"): + return line.split(":")[1].split() return [] @@ -70,12 +70,12 @@ def call_dput(location, changes): (dummy, output, dummy) = os.popen3("dput --debug %s %s" % (location, changes)) text = output.readlines() for line in text: - if line.startswith("D: Incoming: "): - incoming = line.split("D: Incoming: ")[1].strip() - if incoming[-1] == "/": - incoming = incoming[:-1] - if line.startswith("Successfully uploaded packages."): - res = True + if line.startswith("D: Incoming: "): + incoming = line.split("D: Incoming: ")[1].strip() + if incoming[-1] == "/": + incoming = incoming[:-1] + if line.startswith("Successfully uploaded packages."): + res = True return (res, incoming) @@ -84,7 +84,7 @@ def lookup_dput_host(host): (dummy, output, dummy) = os.popen3("dput -H | grep ^%s" % host) text = output.read() if text: - return text.split()[2] + return text.split()[2] return "" @@ -103,8 +103,8 @@ def call_debuild(options): def get_name_and_version(): changelogfile = "debian/changelog" if not os.path.exists(changelogfile): - print >> sys.stderr, "%s not found." % changelogfile - sys.exit(1) + print >> sys.stderr, "%s not found." % changelogfile + sys.exit(1) head = open(changelogfile).readline() return re.findall(r'^(.*)\ \((.*)\).*', head) @@ -112,13 +112,13 @@ def get_name_and_version(): def assemble_bug_comment_text(host, incoming, sourcepackage, version): if host == "ppa.launchpad.net": - dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ - (host, incoming[1:], sourcepackage[0], sourcepackage, \ - sourcepackage, version) + dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ + (host, incoming[1:], sourcepackage[0], sourcepackage, \ + sourcepackage, version) else: # FIXME: this needs to be much much cleverer at some stage - dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ - (host, incoming, sourcepackage[0], sourcepackage, version) + dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ + (host, incoming, sourcepackage[0], sourcepackage, version) return """A new version of %s was uploaded to fix this bug. To review the current version, please run @@ -129,9 +129,9 @@ To review the current version, please run def deal_with_bugreport(bugnumbers, host, incoming, sourcepackage, version): if not os.path.exists(os.path.expanduser("~/.lpcookie")): - print >> sys.stderr, \ - "You need your Launchpad Cookie to be stored in ~/.lpcookie" - sys.exit(1) + print >> sys.stderr, \ + "You need your Launchpad Cookie to be stored in ~/.lpcookie" + sys.exit(1) #print apt.Cache()[sourcepackage].section.split("/")[0].count("verse") (dummy, output, dummy) = os.popen3( @@ -143,25 +143,25 @@ def deal_with_bugreport(bugnumbers, host, incoming, sourcepackage, version): Bug.authentication = os.path.expanduser("~/.lpcookie") for bugnumber in bugnumbers: - bug = Bug(int(bugnumber)) - if component in ["main", "restricted"] and \ - 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers]: - bug.subscribers.add('ubuntu-main-sponsors') - if component in ["universe", "multiverse"] and \ - 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]: - bug.subscribers.add('ubuntu-universe-sponsors') - if not component: - bug.tags.append("needs-packaging") + bug = Bug(int(bugnumber)) + if component in ["main", "restricted"] and \ + 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers]: + bug.subscribers.add('ubuntu-main-sponsors') + if component in ["universe", "multiverse"] and \ + 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]: + bug.subscribers.add('ubuntu-universe-sponsors') + if not component: + bug.tags.append("needs-packaging") - comment = Bug.NewComment(text=assemble_bug_comment_text(host, incoming, + comment = Bug.NewComment(text=assemble_bug_comment_text(host, incoming, sourcepackage, version), subject="Fix in %s (%s)" % \ (sourcepackage, version)) - bug.comments.add(comment) + bug.comments.add(comment) - if bug.status != "Fix Committed": - bug.status = "Fix Committed" - bug.commit() + if bug.status != "Fix Committed": + bug.status = "Fix Committed" + bug.commit() def check_arguments(args): @@ -170,28 +170,28 @@ def check_arguments(args): debuild_args = list() if len(sys.argv) == 2 and sys.argv[1] in ["--help", "-H"]: - print USAGE - sys.exit(0) + print USAGE + sys.exit(0) if len(sys.argv) == 1: - return (new_bug, location, debuild_args) + return (new_bug, location, debuild_args) if sys.argv[1] == "-n": - new_bug = True - if len(sys.argv)>2: - if sys.argv[2].startswith("-"): - debuild_args = sys.argv[2:] - else: - location = sys.argv[2] - if len(sys.argv)>3: - debuild_args = sys.argv[3:] + new_bug = True + if len(sys.argv)>2: + if sys.argv[2].startswith("-"): + debuild_args = sys.argv[2:] + else: + location = sys.argv[2] + if len(sys.argv)>3: + debuild_args = sys.argv[3:] else: if sys.argv[1].startswith("-"): - debuild_args.append(sys.argv[1:]) - else: - location = sys.argv[1] - if len(sys.argv)>2: - debuild_args = sys.argv[2:] + debuild_args.append(sys.argv[1:]) + else: + location = sys.argv[1] + if len(sys.argv)>2: + debuild_args = sys.argv[2:] return (new_bug, location, debuild_args) @@ -201,13 +201,13 @@ def file_bug(sourcepackage, version): Bug.authentication = os.path.expanduser("~/.lpcookie") try: - bug = Bug.New(product={"name": sourcepackage, "target": "ubuntu"}, + bug = Bug.New(product={"name": sourcepackage, "target": "ubuntu"}, summary="Please sponsor %s %s" % \ (sourcepackage, version), description=\ "The new package will be uploaded to PPA shortly.") except: - bug = Bug.New(product={"name": "ubuntu"}, + bug = Bug.New(product={"name": "ubuntu"}, summary="Please sponsor %s %s" % \ (sourcepackage, version), description=\ @@ -224,26 +224,26 @@ def main(): (sourcepackage, version) = get_name_and_version()[0] if new_bug: - bugnumber = file_bug(sourcepackage, version) - os.system("dch -a 'Fixes (LP: #%s)'" % bugnumber) + bugnumber = file_bug(sourcepackage, version) + os.system("dch -a 'Fixes (LP: #%s)'" % bugnumber) if not call_debuild(debuild_args): - sys.exit(1) + sys.exit(1) changesfile = "../%s_%s_source.changes" % (sourcepackage, version) if not os.path.exists(os.path.expanduser(changesfile)): - print >> sys.stderr, "%s does not exist." % \ - os.path.expanduser(changesfile) - sys.exit(1) + print >> sys.stderr, "%s does not exist." % \ + os.path.expanduser(changesfile) + sys.exit(1) host = lookup_dput_host(location) (dput_res, incoming) = call_dput(location, changesfile) if not dput_res: - print >> sys.stderr, "%s was not uploaded." % changesfile - sys.exit(1) + print >> sys.stderr, "%s was not uploaded." % changesfile + sys.exit(1) fixed_lp_bugs = find_fixed_launchpad_bug(changesfile) if(fixed_lp_bugs): - deal_with_bugreport(fixed_lp_bugs, host, incoming, sourcepackage, + deal_with_bugreport(fixed_lp_bugs, host, incoming, sourcepackage, version) From f4aa152d1776b60319255f4cd94f6ef2b2ce7e21 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Mon, 1 Oct 2007 16:58:29 +0200 Subject: [PATCH 82/96] * ppaput: - fix indentation issues. - now respects the PPA section the package goes to (LP: #146161) --- debian/changelog | 4 +++- ppaput | 51 +++++++++++++++++++++++++++++++----------------- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5dee761..5699d80 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,9 @@ ubuntu-dev-tools (0.15) UNRELEASED; urgency=low * update-maintainer: correctly pass path to dch (LP: #141015) [ Daniel Holbach ] - * ppaput: fix indentation issues. + * ppaput: + - fix indentation issues. + - now respects the PPA section the package goes to (LP: #146161) -- Daniel Holbach Mon, 01 Oct 2007 15:56:18 +0200 diff --git a/ppaput b/ppaput index c07df9f..9895ef4 100755 --- a/ppaput +++ b/ppaput @@ -100,25 +100,37 @@ def call_debuild(options): (os.getenv("DEBEMAIL"), \ string.join(options, " "))) == 0 -def get_name_and_version(): +def get_name_version_and_section(): changelogfile = "debian/changelog" if not os.path.exists(changelogfile): print >> sys.stderr, "%s not found." % changelogfile sys.exit(1) + controlfile = "debian/control" + if not os.path.exists(controlfile): + print >> sys.stderr, "%s not found." % controlfile + sys.exit(1) head = open(changelogfile).readline() - return re.findall(r'^(.*)\ \((.*)\).*', head) + (name, version) = re.findall(r'^(.*)\ \((.*)\).*', head)[0] + section = "main" + + for line in open(controlfile).readlines(): + if line.startswith("Section"): + if line.split("Section: ")[1].count("/")>0: + section = line.split("Section: ")[1].split("/")[0].strip() + return (name, version, section) + + return (name, version, section) - -def assemble_bug_comment_text(host, incoming, sourcepackage, version): +def assemble_bug_comment_text(host, incoming, section, sourcepackage, version): if host == "ppa.launchpad.net": - dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ - (host, incoming[1:], sourcepackage[0], sourcepackage, \ + dsc_file_location = "http://%s/%s/pool/%s/%s/%s/%s_%s.dsc" % \ + (host, incoming[1:], section, sourcepackage[0], sourcepackage, \ sourcepackage, version) else: # FIXME: this needs to be much much cleverer at some stage - dsc_file_location = "http://%s/%s/pool/main/%s/%s/%s_%s.dsc" % \ - (host, incoming, sourcepackage[0], sourcepackage, version) + dsc_file_location = "http://%s/%s/pool/%s/%s/%s/%s_%s.dsc" % \ + (host, incoming, section, sourcepackage[0], sourcepackage, version) return """A new version of %s was uploaded to fix this bug. To review the current version, please run @@ -127,7 +139,8 @@ To review the current version, please run """ % (sourcepackage, dsc_file_location) -def deal_with_bugreport(bugnumbers, host, incoming, sourcepackage, version): +def deal_with_bugreport(bugnumbers, host, section, incoming, sourcepackage, + version): if not os.path.exists(os.path.expanduser("~/.lpcookie")): print >> sys.stderr, \ "You need your Launchpad Cookie to be stored in ~/.lpcookie" @@ -154,9 +167,11 @@ def deal_with_bugreport(bugnumbers, host, incoming, sourcepackage, version): bug.tags.append("needs-packaging") comment = Bug.NewComment(text=assemble_bug_comment_text(host, incoming, - sourcepackage, version), - subject="Fix in %s (%s)" % \ - (sourcepackage, version)) + section, + sourcepackage, + version), + subject="Fix in %s (%s)" % \ + (sourcepackage, version)) bug.comments.add(comment) if bug.status != "Fix Committed": @@ -221,8 +236,8 @@ def file_bug(sourcepackage, version): def main(): (new_bug, location, debuild_args) = check_arguments(sys.argv) - (sourcepackage, version) = get_name_and_version()[0] - + (sourcepackage, version, section) = get_name_version_and_section() + if new_bug: bugnumber = file_bug(sourcepackage, version) os.system("dch -a 'Fixes (LP: #%s)'" % bugnumber) @@ -238,13 +253,13 @@ def main(): host = lookup_dput_host(location) (dput_res, incoming) = call_dput(location, changesfile) if not dput_res: - print >> sys.stderr, "%s was not uploaded." % changesfile - sys.exit(1) + print >> sys.stderr, "%s was not uploaded." % changesfile + sys.exit(1) fixed_lp_bugs = find_fixed_launchpad_bug(changesfile) if(fixed_lp_bugs): - deal_with_bugreport(fixed_lp_bugs, host, incoming, sourcepackage, - version) + deal_with_bugreport(fixed_lp_bugs, host, section, incoming, + sourcepackage, version) if __name__ == '__main__': From 3af39d99b958891ae02a004aef1cb2f67e449e78 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Mon, 1 Oct 2007 17:21:56 +0200 Subject: [PATCH 83/96] - add comment to bug about how to test the resulting .deb (LP: #145895) --- debian/changelog | 3 ++- ppaput | 42 ++++++++++++++++++++++++++---------------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5699d80..127958b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ubuntu-dev-tools (0.15) UNRELEASED; urgency=low +ubuntu-dev-tools (0.15) gutsy; urgency=low [ Laurent Bigonville ] * update-maintainer: correctly pass path to dch (LP: #141015) @@ -7,6 +7,7 @@ ubuntu-dev-tools (0.15) UNRELEASED; urgency=low * 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 Mon, 01 Oct 2007 15:56:18 +0200 diff --git a/ppaput b/ppaput index 9895ef4..71991da 100755 --- a/ppaput +++ b/ppaput @@ -5,11 +5,6 @@ # GPL 3 # # -# Notes: -# - needs dput, python-launchpad-bugs (>= 0.2.14) -# - needs http://launchpad.net/bugs/137767 to get fixed -# -# # 11:57:27 < dholbach> but what it does is: build a source package of # the current source tree you're in, upload it to PPA # and follow up on a bug report, subscribe the right @@ -100,7 +95,7 @@ def call_debuild(options): (os.getenv("DEBEMAIL"), \ string.join(options, " "))) == 0 -def get_name_version_and_section(): +def get_name_version_section_and_release(): changelogfile = "debian/changelog" if not os.path.exists(changelogfile): print >> sys.stderr, "%s not found." % changelogfile @@ -111,7 +106,9 @@ def get_name_version_and_section(): sys.exit(1) head = open(changelogfile).readline() - (name, version) = re.findall(r'^(.*)\ \((.*)\).*', head)[0] + (name, \ + version, \ + release) = re.findall(r'^(.*)\ \((.*)\)\ (.*?)\;\ .*', head)[0] section = "main" for line in open(controlfile).readlines(): @@ -119,10 +116,11 @@ def get_name_version_and_section(): if line.split("Section: ")[1].count("/")>0: section = line.split("Section: ")[1].split("/")[0].strip() return (name, version, section) - - return (name, version, section) -def assemble_bug_comment_text(host, incoming, section, sourcepackage, version): + return (name, version, section, release) + +def assemble_bug_comment_text(host, incoming, section, sourcepackage, version, + release): if host == "ppa.launchpad.net": dsc_file_location = "http://%s/%s/pool/%s/%s/%s/%s_%s.dsc" % \ (host, incoming[1:], section, sourcepackage[0], sourcepackage, \ @@ -133,14 +131,24 @@ def assemble_bug_comment_text(host, incoming, section, sourcepackage, version): (host, incoming, section, sourcepackage[0], sourcepackage, version) return """A new version of %s was uploaded to fix this bug. -To review the current version, please run +To review the source the current version, please run dget -x %s -""" % (sourcepackage, dsc_file_location) + + +The package will get built by Launchpad in a while. If you want to test it, +please run the following commands: + + sudo -s + echo >> /etc/apt/sources.list + echo "deb http://%s/%s %s main universe multiverse restricted" >> /etc/apt/sources.list + apt-get update + apt-get install +""" % (sourcepackage, dsc_file_location, host, incoming[1:], release) def deal_with_bugreport(bugnumbers, host, section, incoming, sourcepackage, - version): + version, release): if not os.path.exists(os.path.expanduser("~/.lpcookie")): print >> sys.stderr, \ "You need your Launchpad Cookie to be stored in ~/.lpcookie" @@ -169,7 +177,8 @@ def deal_with_bugreport(bugnumbers, host, section, incoming, sourcepackage, comment = Bug.NewComment(text=assemble_bug_comment_text(host, incoming, section, sourcepackage, - version), + version, + release), subject="Fix in %s (%s)" % \ (sourcepackage, version)) bug.comments.add(comment) @@ -236,7 +245,8 @@ def file_bug(sourcepackage, version): def main(): (new_bug, location, debuild_args) = check_arguments(sys.argv) - (sourcepackage, version, section) = get_name_version_and_section() + (sourcepackage, version, \ + section, release) = get_name_version_section_and_release() if new_bug: bugnumber = file_bug(sourcepackage, version) @@ -259,7 +269,7 @@ def main(): fixed_lp_bugs = find_fixed_launchpad_bug(changesfile) if(fixed_lp_bugs): deal_with_bugreport(fixed_lp_bugs, host, section, incoming, - sourcepackage, version) + sourcepackage, version, release) if __name__ == '__main__': From eca4d4e7011b807c778c763fc6de6c9adf0d763c Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Mon, 1 Oct 2007 18:06:45 +0200 Subject: [PATCH 84/96] Proposed bug fix for 144244 --- README | 6 +++++- debian/changelog | 7 +++++++ requestsync | 10 +++++++++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README b/README index e1301fd..cdfd791 100644 --- a/README +++ b/README @@ -23,7 +23,7 @@ mk-sbuild-lv ... will create LVM snapshot chroots via schroot and sbuild. It assumes that sbuild has not be installed and configured before. -pbuilder-dist [create|update|build|clean|login|execute] +pbuilder-dist [withlog] [create|update|build|clean|login|execute] ... is a wrapper to use pbuilder with many different distributions / versions. It has to be renamed to something like pbuilder-feisty, pbuilder-gutsy, etc. @@ -37,6 +37,10 @@ pull-debian-debdiff ... will attempt to find and download a specific version of a Debian package and its immediate parent to generate a debdiff. +requestsync [-n|-s] [base version] + ... will fill a sync for a package from Debian by sending a bug report to + Launchpad. + suspicious-source ... will 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 diff --git a/debian/changelog b/debian/changelog index 127958b..1745ff5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ubuntu-dev-tools (0.16) UNRELEASED; urgency=low + + * requestsync: allow to customize the SMTP server (LP: #144244) + * Add a short description for requestsync to the README file. + + -- Siegfried-Angel Gevatter Pujals (RainCT) Mon, 1 Oct 2007 18:04:14 +0200 + ubuntu-dev-tools (0.15) gutsy; urgency=low [ Laurent Bigonville ] diff --git a/requestsync b/requestsync index 9bf7ea7..a8e75d8 100755 --- a/requestsync +++ b/requestsync @@ -173,8 +173,16 @@ Subject: Please sync %s (%s) from Debian unstable (%s) print mail print 'Press enter to file this bug, Control-C to abort' + sys.stdin.readline() -s = smtplib.SMTP('fiordland.ubuntu.com') +# get server address +mailserver = os.getenv('DEBSMTP') +if mailserver: + print 'Using custom SMTP server:', mailserver +else : + mailserver = 'fiordland.ubuntu.com' + +s = smtplib.SMTP(mailserver) s.sendmail(myemailaddr, to, mail) s.quit() From 4a1c9b0cce5fd8dec6fc38ad9dd1bd52229fdbdd Mon Sep 17 00:00:00 2001 From: "Siegfried-Angel Gevatter Pujals (RainCT)" Date: Mon, 1 Oct 2007 19:02:09 +0200 Subject: [PATCH 85/96] Add authentication. --- requestsync | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/requestsync b/requestsync index a8e75d8..ca83c15 100755 --- a/requestsync +++ b/requestsync @@ -183,6 +183,19 @@ if mailserver: else : mailserver = 'fiordland.ubuntu.com' +# connect to the server s = smtplib.SMTP(mailserver) + +# authenticate to the server +mailserver_user = os.getenv('DEBSMTP_USER') +mailserver_pass = os.getenv('DEBSMTP_PASS') +if mailserver_user and mailserver_pass: + try: + s.login(mailserver_user, mailserver_pass) + except smtplib.SMTPAuthenticationError: + print 'Error authenticating to the server: invalid username and password.' + s.quit(); sys.exit(1) + + s.sendmail(myemailaddr, to, mail) s.quit() From 85c1a202d25726af703594f4deb56d162181fc1f Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 5 Oct 2007 11:36:28 +0200 Subject: [PATCH 86/96] * Added support for Bugs/Debian/Usertagging in submittodebian. * setup.py: actually install submittodebian. --- debian/changelog | 10 ++++++++++ debian/control | 2 +- setup.py | 3 ++- submittodebian | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 127958b..d1fcaf3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +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 Fri, 05 Oct 2007 11:05:29 +0200 + ubuntu-dev-tools (0.15) gutsy; urgency=low [ Laurent Bigonville ] diff --git a/debian/control b/debian/control index 3097a6a..dff076c 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14) +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug (>= 3.38ubuntu3) Recommends: bzr, pbuilder Conflicts: devscripts (<< 2.10.7ubuntu5) Replaces: devscripts (<< 2.10.7ubuntu5) diff --git a/setup.py b/setup.py index a19154b..19c35d7 100755 --- a/setup.py +++ b/setup.py @@ -28,7 +28,8 @@ setup(name='ubuntu-dev-tools', 'ppaput', 'requestsync', 'hugdaylist', - 'massfile' + 'massfile', + 'submittodebian' ], ) diff --git a/submittodebian b/submittodebian index b29b1fd..3e65f7f 100755 --- a/submittodebian +++ b/submittodebian @@ -64,7 +64,7 @@ def edit_debdiff(debdiff): run_cmd(cmd) def submit_bugreport(body, debdiff, changelog): - cmd = 'reportbug -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package) + cmd = 'reportbug -P "User: ubuntu-devel@lists.ubuntu.com" -P "Usertags: origin-ubuntu hardy ubuntu-patch" -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package) run_cmd(cmd) def run_cmd(cmd): From 727de192481ab9835dbaaeb3d346aa2501e7bfe5 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 5 Oct 2007 11:46:58 +0200 Subject: [PATCH 87/96] * 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. --- debian/changelog | 9 +++++++++ debian/control | 2 +- submittodebian | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d1fcaf3..bf32f2d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +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 Fri, 05 Oct 2007 11:44:51 +0200 + ubuntu-dev-tools (0.16) gutsy; urgency=low [ Lucas Nussbaum ] diff --git a/debian/control b/debian/control index dff076c..77d70c6 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug (>= 3.38ubuntu3) +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug Recommends: bzr, pbuilder Conflicts: devscripts (<< 2.10.7ubuntu5) Replaces: devscripts (<< 2.10.7ubuntu5) diff --git a/submittodebian b/submittodebian index 3e65f7f..b29b1fd 100755 --- a/submittodebian +++ b/submittodebian @@ -64,7 +64,7 @@ def edit_debdiff(debdiff): run_cmd(cmd) def submit_bugreport(body, debdiff, changelog): - cmd = 'reportbug -P "User: ubuntu-devel@lists.ubuntu.com" -P "Usertags: origin-ubuntu hardy ubuntu-patch" -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package) + cmd = 'reportbug -A %s -B debian -i %s -V %s %s' % (debdiff, body, deb_version, changelog.package) run_cmd(cmd) def run_cmd(cmd): From ba8541352a6125cb36d3cd0250475c62ab5fdc3d Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Fri, 5 Oct 2007 14:20:22 +0200 Subject: [PATCH 88/96] * requestsync: add an option to "Add latest debian version to the title of the bug" (LP: #132221) --- debian/changelog | 7 +++++++ requestsync | 31 +++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index bf32f2d..4d23d95 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +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 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 diff --git a/requestsync b/requestsync index 9bf7ea7..3cbde46 100755 --- a/requestsync +++ b/requestsync @@ -27,6 +27,24 @@ def cur_version_component(sourcepkg, release): print "%s doesn't appear to exist in %s, specify -n for a package not in Ubuntu." % (sourcepkg, release) sys.exit(1) +def cur_deb_version(sourcepkg): + ''' Return the current debian version of a package in unstable ''' + madison = subprocess.Popen(['rmadison', '-u', 'debian', '-a', 'source', \ + '-s', 'unstable', sourcepkg], \ + stdout=subprocess.PIPE) + out = madison.communicate()[0] + assert (madison.returncode == 0) + + try: + assert out + except AssertionError: + print "%s doesn't appear to exist in Debian." % sourcepkg + sys.exit(1) + + return out.split('|')[1].rstrip('[]''').lstrip() + + sys.exit(1) + def debian_changelog(sourcepkg, component, version): '''Return the Debian changelog from the latest up to the given version (exclusive).''' @@ -54,7 +72,7 @@ def debian_component(sourcepkg): except AssertionError: print "%s doesn't appear to exist in Debian." % sourcepkg sys.exit(1) - raw_comp = out.split(' | ')[2].split('/') + raw_comp = out.split('|')[2].split('/') component = 'main' if len(raw_comp) == 2: component = raw_comp[1] @@ -65,7 +83,7 @@ def usage(): In some cases, the base version (fork point from Debian) cannot be determined automatically, and you'll get a complete Debian changelog. Specify the correct -base version in that case.""" +base version of the package in Ubuntu.""" sys.exit(1) # @@ -103,6 +121,7 @@ debiancomponent = debian_component(srcpkg) # generate bug report status = "confirmed" subscribe = "ubuntu-archive" +deb_version = cur_deb_version(srcpkg) if sponsorship: status = "new" if component in ['main', 'restricted']: @@ -118,8 +137,8 @@ report = ''' affects ubuntu%s status %s subscribe %s -Please sync %s (%s) from Debian unstable (%s). -''' % (affects, status, subscribe, srcpkg, component, debiancomponent) +Please sync %s %s (%s) from Debian unstable (%s). +''' % (affects, status, subscribe, srcpkg, deb_version, component, debiancomponent) base_ver = cur_ver uidx = base_ver.find('ubuntu') @@ -166,9 +185,9 @@ to = 'new@bugs.launchpad.net' mail = '''From: %s To: %s -Subject: Please sync %s (%s) from Debian unstable (%s) +Subject: Please sync %s %s (%s) from Debian unstable (%s) -%s''' % (myemailaddr, to, srcpkg, component, debiancomponent, signed_report) +%s''' % (myemailaddr, to, srcpkg, deb_version, component, debiancomponent, signed_report) print mail From f6b542b3c07daa655c05d51fba96cef1bf9a0edb Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 6 Oct 2007 20:52:48 +0200 Subject: [PATCH 89/96] requestsync: Add support to customize the smtp port and catch all other smtp exception --- requestsync | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/requestsync b/requestsync index ca83c15..052349b 100755 --- a/requestsync +++ b/requestsync @@ -183,8 +183,15 @@ if mailserver: else : mailserver = 'fiordland.ubuntu.com' +# get server port +mailserver_port = os.getenv('DEBSMTP_PORT') +if mailserver_port: + print 'Using custom SMTP port:', mailserver_port +else: + mailserver_port = 25 + # connect to the server -s = smtplib.SMTP(mailserver) +s = smtplib.SMTP(mailserver, mailserver_port) # authenticate to the server mailserver_user = os.getenv('DEBSMTP_USER') @@ -195,6 +202,9 @@ if mailserver_user and mailserver_pass: except smtplib.SMTPAuthenticationError: print 'Error authenticating to the server: invalid username and password.' s.quit(); sys.exit(1) + except: + print 'Unknown SMTP error.' + s.quit(); sys.exit(1) s.sendmail(myemailaddr, to, mail) From 8c05599644fba85f7ae1ae0d2eb9101838d8cda0 Mon Sep 17 00:00:00 2001 From: Adrien Cunin Date: Sun, 7 Oct 2007 00:36:36 +0200 Subject: [PATCH 90/96] README: minor and cosmetic changes; debian/changelog: prepare for upload --- README | 30 +++++++++++++++--------------- debian/changelog | 9 ++++++--- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/README b/README index cdfd791..0ce81b1 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ -===================== +================================ == Ubuntu Development Tools == -===================== +================================ 404main ... will check in what components the dependencies of are. @@ -24,31 +24,31 @@ mk-sbuild-lv sbuild has not be installed and configured before. pbuilder-dist [withlog] [create|update|build|clean|login|execute] - ... is a wrapper to use pbuilder with many different distributions / versions. - It has to be renamed to something like pbuilder-feisty, pbuilder-gutsy, etc. + ... is a wrapper to use pbuilder with many different distributions / versions. + It has to be renamed to something like pbuilder-feisty, pbuilder-gutsy, etc. ppaput [-n] [] - ... will build a source package using , upload it - to and follow up on specified bugs, make sure the - sponsoring process is followed. Also it will file a new bug, if - '-n' is used. + ... will build a source package using , upload it + to and follow up on specified bugs, make sure the + sponsoring process is followed. Also it will file a new bug, if + '-n' is used. pull-debian-debdiff ... will attempt to find and download a specific version of a Debian package and its immediate parent to generate a debdiff. requestsync [-n|-s] [base version] - ... will fill a sync for a package from Debian by sending a bug report to - Launchpad. + ... will file a sync request for a package from Debian by sending a bug report to + Launchpad. suspicious-source - ... will 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. + ... will 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. update-maintainer - ... will update the maintainer field of an Ubuntu package to match the - DebianMaintainerField specification. + ... will update the maintainer field of an Ubuntu package to match the + DebianMaintainerField specification. what-patch ... will check what patching system is used by a package. diff --git a/debian/changelog b/debian/changelog index ef85225..8501b82 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,14 +1,17 @@ -ubuntu-dev-tools (0.19) UNRELEASED; urgency=low +ubuntu-dev-tools (0.19) gutsy; urgency=low [ Siegfried-Angel Gevatter Pujals (RainCT) ] - * requestsync: allow to customize the SMTP server (LP: #144244) + * 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 Sun, 07 Oct 2007 00:03:57 +0200 + [ Adrien Cunin ] + * README: minor and cosmetic changes + + -- Adrien Cunin Sun, 07 Oct 2007 00:24:46 +0200 ubuntu-dev-tools (0.18) gutsy; urgency=low From 3d1f471e99a6d19152f6cb5e9185cb18da248ad6 Mon Sep 17 00:00:00 2001 From: Cesare Tirabassi Date: Sun, 21 Oct 2007 11:16:39 +0200 Subject: [PATCH 91/96] suspicious-source: add *.hh to list of excluded files + minor format and typo corrections --- debian/changelog | 8 ++++++++ doc/suspicious-source.1 | 10 +++++----- suspicious-source | 17 +++++++++-------- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8501b82..172df88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ubuntu-dev-tools (0.20) UNRELEASED; urgency=low + + * 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 + + -- Cesare Tirabassi Sun, 21 Oct 2007 10:49:26 +0200 + ubuntu-dev-tools (0.19) gutsy; urgency=low [ Siegfried-Angel Gevatter Pujals (RainCT) ] diff --git a/doc/suspicious-source.1 b/doc/suspicious-source.1 index a773b15..b8f46ca 100644 --- a/doc/suspicious-source.1 +++ b/doc/suspicious-source.1 @@ -2,20 +2,20 @@ .\" Author: Siegfried-Angel Gevatter Pujals .\" Contact details: siggi.gevatter@gmail.com .\" -.TH SUSPICIOUS\-SOURCE 1 "Setember 14, 2007" +.TH SUSPICIOUS\-SOURCE 1 "September 14, 2007" .\" .SH NAME -suspicious\-source \- search for files that are not the GPL's "prefered form of modification" +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 little 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 "prefered form of modification" +\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 +Neither the files inside version control system directories (like ".bzr/" or "CVS/"), nor those inside "debian/" are considered. .\" .SH AUTHORS diff --git a/suspicious-source b/suspicious-source index 82d2b45..17715e2 100755 --- a/suspicious-source +++ b/suspicious-source @@ -4,15 +4,16 @@ # License: GPLv3 or later # # 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 "prefered form of modification" that the GPL and other licenses require. +# 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" +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" IGNORE=".bzr CVS .svn debian" From a004935a2f724eb5f4b57b605b110f38dcd6f5fd Mon Sep 17 00:00:00 2001 From: Cesare Tirabassi Date: Sun, 21 Oct 2007 11:53:01 +0200 Subject: [PATCH 92/96] corrected my TYPO ..... grrrr --- suspicious-source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suspicious-source b/suspicious-source index 17715e2..5cac916 100755 --- a/suspicious-source +++ b/suspicious-source @@ -10,7 +10,7 @@ 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 + 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" From 0699933391ac89b373ee627d709867ee6ae420e1 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Tue, 23 Oct 2007 12:18:33 +0200 Subject: [PATCH 93/96] * hugdaylist: only mention 'unassigned bugs'. --- debian/changelog | 6 +++++- hugdaylist | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 172df88..7f964a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,14 @@ ubuntu-dev-tools (0.20) UNRELEASED; 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 - -- Cesare Tirabassi Sun, 21 Oct 2007 10:49:26 +0200 + [ Dainel Holbach ] + * hugdaylist: only mention 'unassigned bugs'. + + -- Daniel Holbach Tue, 23 Oct 2007 12:17:53 +0200 ubuntu-dev-tools (0.19) gutsy; urgency=low diff --git a/hugdaylist b/hugdaylist index ae8a75d..ec7cdd3 100755 --- a/hugdaylist +++ b/hugdaylist @@ -51,7 +51,8 @@ def filter_unsolved(bugs): bug = Bug(int(b)) if bug.status != 'Fix Committed' and \ 'ubuntu-main-sponsors' not in [str(s) for s in bug.subscribers] and \ - 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers]: + 'ubuntu-universe-sponsors' not in [str(s) for s in bug.subscribers] and \ + (bug.assignee in ['motu','desktop-bugs'] or not bug.assignee): result.add(b) return result From 6b3e9eb2a5e91cb2cf2ecca83341d2c72d07af73 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 23 Oct 2007 15:36:52 +0200 Subject: [PATCH 94/96] Added missing dependency on python-debian (needed by submittodebian) --- debian/changelog | 5 ++++- debian/control | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7f964a2..e809481 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,7 +8,10 @@ ubuntu-dev-tools (0.20) UNRELEASED; urgency=low [ Dainel Holbach ] * hugdaylist: only mention 'unassigned bugs'. - -- Daniel Holbach Tue, 23 Oct 2007 12:17:53 +0200 + [ Soren Hansen ] + * Added missing python-debian dependency (needed by submittodebian) + + -- Soren Hansen Tue, 23 Oct 2007 15:36:25 +0200 ubuntu-dev-tools (0.19) gutsy; urgency=low diff --git a/debian/control b/debian/control index 77d70c6..9c2ad82 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Standards-Version: 3.7.2 Package: ubuntu-dev-tools Architecture: all Section: devel -Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug +Depends: ${python:Depends}, ${misc:Depends}, binutils, devscripts, sudo, python-launchpad-bugs (>= 0.2.14), reportbug, python-debian Recommends: bzr, pbuilder Conflicts: devscripts (<< 2.10.7ubuntu5) Replaces: devscripts (<< 2.10.7ubuntu5) From a0a91571914342a684a9afbf06a2a61fd2bc52e6 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 23 Oct 2007 16:46:17 +0200 Subject: [PATCH 95/96] Uploading 0.20. --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e809481..b3f68a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ubuntu-dev-tools (0.20) UNRELEASED; urgency=low +ubuntu-dev-tools (0.20) hardy; urgency=low [ Cesare Tirabassi ] * suspicious-source: add *.hh to list of excluded files @@ -11,7 +11,7 @@ ubuntu-dev-tools (0.20) UNRELEASED; urgency=low [ Soren Hansen ] * Added missing python-debian dependency (needed by submittodebian) - -- Soren Hansen Tue, 23 Oct 2007 15:36:25 +0200 + -- Soren Hansen Tue, 23 Oct 2007 16:45:44 +0200 ubuntu-dev-tools (0.19) gutsy; urgency=low From d3a982ac6119345b551edd77c153223937882fee Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Tue, 23 Oct 2007 18:56:59 +0200 Subject: [PATCH 96/96] * debian/control: add a space before the Homepage pseudo-field * pbuilder-dist: add hardy to the distribution list --- debian/changelog | 6 +++++- debian/control | 2 +- pbuilder-dist | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index b3f68a0..840c087 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,7 +11,11 @@ ubuntu-dev-tools (0.20) hardy; urgency=low [ Soren Hansen ] * Added missing python-debian dependency (needed by submittodebian) - -- Soren Hansen Tue, 23 Oct 2007 16:45:44 +0200 + [ Laurent Bigonville ] + * debian/control: add a space before the Homepage pseudo-field + * pbuilder-dist: add hardy to the distribution list + + -- Laurent Bigonville Tue, 23 Oct 2007 18:54:32 +0200 ubuntu-dev-tools (0.19) gutsy; urgency=low diff --git a/debian/control b/debian/control index 9c2ad82..d0f2aac 100644 --- a/debian/control +++ b/debian/control @@ -22,4 +22,4 @@ Description: useful tools for Ubuntu developers make their packaging work a lot easier. Such tools can include bug filing, packaging preparation, package analysis, etc. . - Homepage: https://launchpad.net/ubuntu-dev-tools/ + Homepage: https://launchpad.net/ubuntu-dev-tools/ diff --git a/pbuilder-dist b/pbuilder-dist index df57be0..4e89c6e 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -105,7 +105,7 @@ distdata() case $DISTRIBUTION in - dapper|edgy|feisty|gutsy) # warty|hoary|breezy + dapper|edgy|feisty|gutsy|hardy) # warty|hoary|breezy distdata ubuntu ;;