From b2903d5b7efc863c3de799dfa9308919a8c21bac Mon Sep 17 00:00:00 2001 From: Adrien Cunin Date: Sun, 2 Mar 2008 15:33:10 +0100 Subject: [PATCH 1/7] * pbuilder-dist: - Fixed minor bash syntax error - Removed quotes around the path when using --aptconfdir, otherwise pbuilder create fails --- debian/changelog | 6 +++++- pbuilder-dist | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5721722..73cad76 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,10 @@ ubuntu-dev-tools (0.28) UNRELEASED; urgency=low - * + [ Adrien Cunin ] + * pbuilder-dist: + - Fixed minor bash syntax error + - Removed quotes around the path when using --aptconfdir, otherwise + pbuilder create fails -- Siegfried-Angel Gevatter Pujals (RainCT) Sun, 24 Feb 2008 19:52:06 +0100 diff --git a/pbuilder-dist b/pbuilder-dist index e8a3f56..47e54da 100755 --- a/pbuilder-dist +++ b/pbuilder-dist @@ -245,7 +245,7 @@ then fi # Determine wheter system cache should be used or not. -if [ $SYSCACHE = 1 ] && [ "$SYSDIST" = "$DISTRIBUTION" ] && [ "$REALARCH" = "$ARCHITECTURE"] +if [ $SYSCACHE = 1 ] && [ "$SYSDIST" = "$DISTRIBUTION" ] && [ "$REALARCH" = "$ARCHITECTURE" ] then DEBCACHE='/var/cache/apt/archives/' fi @@ -306,5 +306,5 @@ $( [ -z "$PROXY" ] || echo "--http-proxy ${PROXY}" ) \ $( [ -z "$DEBCACHE" ] || echo "--aptcache ${DEBCACHE}" ) \ --buildresult "${BASE_DIR}/${FOLDERBASE}_result" \ --mirror "${ARCHIVE}" \ -$( [ $ISDEBIAN != "False" ] || echo "--aptconfdir \"${BASE_DIR}/etc/${DISTRIBUTION}/apt.conf/\"" ) \ +$( [ $ISDEBIAN != "False" ] || echo "--aptconfdir ${BASE_DIR}/etc/${DISTRIBUTION}/apt.conf/" ) \ $@ From 4b2ee427ccad5c1524a124ebe86158aa31b4d14d Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Thu, 6 Mar 2008 11:34:43 -0500 Subject: [PATCH 2/7] added --personality to mk-sbuild-lvm and bump version number --- mk-sbuild-lv | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mk-sbuild-lv b/mk-sbuild-lv index 51b1829..3ae3f79 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -20,7 +20,7 @@ # detect the chroot architecture: # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=392992 # -# Version: 0.11 +# Version: 0.12 set -e @@ -87,6 +87,7 @@ function usage() echo "Options:" echo " --arch=ARCH What architecture to select" echo " --name=NAME Base name for the schroot (arch is appended)" + echo " --personality=PERSONALITY What personality to use" 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" @@ -97,7 +98,7 @@ function usage() if [ -z "$1" ]; then usage fi -OPTS=`getopt -o '' --long "help,debug,arch:,name:,source-template:,debootstrap-mirror:" -- "$@"` +OPTS=`getopt -o '' --long "help,debug,arch:,name:,source-template:,debootstrap-mirror:,personality:" -- "$@"` eval set -- "$OPTS" name="" @@ -113,6 +114,10 @@ while :; do arch_suffix="-$2" shift 2 ;; + --personality) + personality="$2" + shift 2 + ;; --name) name="$2" shift 2 @@ -223,6 +228,9 @@ run-setup-scripts=true run-exec-scripts=true EOM fi +if [ ! -z "$personality" ]; then + echo "personality=$personality" >> "$TEMP_SCHROOTCONF" +fi cat "$TEMP_SCHROOTCONF" | sed \ -e "s|CHROOT_NAME|$CHROOT_NAME|g" \ -e "s|CHROOT_PATH|$CHROOT_PATH|g" \ From 2eadaaa63f0ee72be61d2897ca5e9dc263596f60 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 6 Mar 2008 10:59:11 -0800 Subject: [PATCH 3/7] tweak check-symbols to use .old/.new instead of .1/.2 which is confusing when reading .so names. :) --- check-symbols | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/check-symbols b/check-symbols index 5498107..e69e597 100755 --- a/check-symbols +++ b/check-symbols @@ -30,7 +30,7 @@ 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; + nm -D $lib | cut -d' ' -f3 | sort -u > /tmp/$LIBNAME.old; done; DEBLINE="$DEBLINE $DEBDIR/$pack*.deb "; done @@ -58,9 +58,9 @@ 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; + nm -D $lib | cut -d' ' -f3 | sort -u > /tmp/$LIBNAME.new; echo "Checking: $lib"; - diff -u /tmp/$LIBNAME.{1,2}; - rm /tmp/$LIBNAME.{1,2}; + diff -u /tmp/$LIBNAME.{old,new}; + rm /tmp/$LIBNAME.{old,new}; done; done From e2635051ffcbc63c48bb93b5345dcf452d200afa Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Fri, 7 Mar 2008 11:14:31 -0800 Subject: [PATCH 4/7] released 0.28 --- .bzrignore | 1 + debian/changelog | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .bzrignore diff --git a/.bzrignore b/.bzrignore new file mode 100644 index 0000000..cb2ebab --- /dev/null +++ b/.bzrignore @@ -0,0 +1 @@ +debian/pycompat diff --git a/debian/changelog b/debian/changelog index 5f319c5..5bbf502 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ubuntu-dev-tools (0.28) UNRELEASED; urgency=low +ubuntu-dev-tools (0.28) hardy; urgency=low [ Adrien Cunin ] * pbuilder-dist: From 2e08014414ca5326807f76041dd61ef3c24b7353 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Fri, 7 Mar 2008 22:51:11 +0100 Subject: [PATCH 5/7] Give --personality a better default. --- mk-sbuild-lv | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mk-sbuild-lv b/mk-sbuild-lv index 3ae3f79..e3104c1 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -87,7 +87,7 @@ function usage() echo "Options:" echo " --arch=ARCH What architecture to select" echo " --name=NAME Base name for the schroot (arch is appended)" - echo " --personality=PERSONALITY What personality to use" + echo " --personality=PERSONALITY What personality to use (defaults match --arch)" 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" @@ -112,6 +112,10 @@ while :; do # By default, use the native architecture. arch_opt="--arch $2" arch_suffix="-$2" + if [ -z "$personality" -a "$2" = "i386" ] + then + personality="linux32" + fi shift 2 ;; --personality) From 6026f454109cf49b4d3ab6b6a7da779fe95e1e30 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Mon, 10 Mar 2008 11:36:17 +0100 Subject: [PATCH 6/7] * grab-attachments, setup.py: added grab-attachments tool. You give it bug numbers, it gets you their attachments. Useful for sponsoring. --- debian/changelog | 7 +++++++ grab-attachments | 37 +++++++++++++++++++++++++++++++++++++ setup.py | 3 ++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100755 grab-attachments diff --git a/debian/changelog b/debian/changelog index 5bbf502..81db3f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ubuntu-dev-tools (0.29) hardy; urgency=low + + * grab-attachments, setup.py: added grab-attachments tool. You give it bug + numbers, it gets you their attachments. Useful for sponsoring. + + -- Daniel Holbach Mon, 10 Mar 2008 11:31:50 +0100 + ubuntu-dev-tools (0.28) hardy; urgency=low [ Adrien Cunin ] diff --git a/grab-attachments b/grab-attachments new file mode 100755 index 0000000..dbda6f2 --- /dev/null +++ b/grab-attachments @@ -0,0 +1,37 @@ +#!/usr/bin/python +# +# Copyright 2007, Canonical, Daniel Holbach +# +# GPL 3 +# + +import os +import sys +import urllib +import launchpadbugs.connector as Connector + +USAGE = "grab-attachments " + +def main(): + if len(sys.argv) == 1: + print >> sys.stderr, USAGE + sys.exit(1) + + if sys.argv[1] in ["--help", "-h"]: + print USAGE + sys.exit(0) + Bug = Connector.ConnectBug(method="Text") + for arg in sys.argv[1:]: + try: + number = int(arg) + except: + print >> sys.stderr, "'%s' is not a valid bug number." % arg + sys.exit(1) + b = Bug(number) + for a in b.attachments: + filename = os.path.join(os.getcwd(), a.url.split("/")[-1]) + urllib.urlretrieve(a.url, filename) + +if __name__ == '__main__': + main() + diff --git a/setup.py b/setup.py index 2a7bd96..82a952c 100755 --- a/setup.py +++ b/setup.py @@ -30,7 +30,8 @@ setup(name='ubuntu-dev-tools', 'massfile', 'submittodebian', 'get-build-deps', - 'dgetlp' + 'dgetlp', + 'grab-attachments' ], packages=['ubuntutools'], ) From 0592685c0c52287d97ce4b44c0220e7f73f75567 Mon Sep 17 00:00:00 2001 From: Soren Hansen Date: Tue, 11 Mar 2008 09:23:50 +0100 Subject: [PATCH 7/7] Grammer and indentation fixes. --- mk-sbuild-lv | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mk-sbuild-lv b/mk-sbuild-lv index e3104c1..d0f6a1e 100755 --- a/mk-sbuild-lv +++ b/mk-sbuild-lv @@ -87,7 +87,7 @@ function usage() echo "Options:" echo " --arch=ARCH What architecture to select" echo " --name=NAME Base name for the schroot (arch is appended)" - echo " --personality=PERSONALITY What personality to use (defaults match --arch)" + echo " --personality=PERSONALITY What personality to use (defaults to match --arch)" 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" @@ -112,10 +112,10 @@ while :; do # By default, use the native architecture. arch_opt="--arch $2" arch_suffix="-$2" - if [ -z "$personality" -a "$2" = "i386" ] - then - personality="linux32" - fi + if [ -z "$personality" -a "$2" = "i386" ] + then + personality="linux32" + fi shift 2 ;; --personality)