mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-14 00:21:08 +00:00
* Merge Siegfried-Angel Gevatter Pujals' branch.
This commit is contained in:
commit
350af7a68c
5
404main
5
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
|
||||
|
2
AUTHORS
2
AUTHORS
@ -4,3 +4,5 @@ Albin Tonnerre <lut1n.tne@gmail.com>
|
||||
Michael Bienia <geser@ubuntu.com>
|
||||
Kees Cook <kees@ubuntu.com>
|
||||
Martin Pitt <martin.pitt@ubuntu.com>
|
||||
Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
|
||||
Jamin W. Collins <jcollins@asgardsrealm.net>
|
||||
|
44
README
44
README
@ -1,6 +1,42 @@
|
||||
Ubuntu Development Tools
|
||||
=====================
|
||||
== Ubuntu Development Tools ==
|
||||
=====================
|
||||
|
||||
404main <package>
|
||||
... will check in what components the dependencies of <package> are.
|
||||
|
||||
check-symbols <package> [<directory>]
|
||||
... will compare and give you a diff of the exported symbols of all
|
||||
.so files in all binary packages of <package>.
|
||||
<directory> 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 <package>.
|
||||
<directory> 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 <directory> <team> [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 <package> <version>
|
||||
... 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.
|
||||
|
@ -1,41 +1,62 @@
|
||||
#!/bin/bash
|
||||
# (C) Daniel Holbach (2006-2007), Licensed under the GPL 2
|
||||
# Copyright 2006-2007 (C) Daniel Holbach <daniel.holbach@ubuntu.com>
|
||||
# Modified by Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
|
||||
# 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=""
|
||||
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
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright 2007, Kees Cook <kees@ubuntu.com>
|
||||
# Copyright 2007 (C) Kees Cook <kees@ubuntu.com>
|
||||
# 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;
|
||||
|
11
get-branches
11
get-branches
@ -1,8 +1,10 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
# (C) 2007, Canonical
|
||||
# Daniel Holbach
|
||||
# GPLv3
|
||||
# Copyright 2007 (C) Canonical Ltd.
|
||||
# Created by Daniel Holbach <daniel.holbach@ubuntu.com>
|
||||
# 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()
|
||||
|
||||
|
12
mk-sbuild-lv
12
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 <kees@ubuntu.com>
|
||||
# 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 <kees@ubuntu.com>
|
||||
# License: GPLv2
|
||||
|
||||
set -e
|
||||
|
||||
# Make sure we've got a regular user
|
||||
|
@ -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 <jcollins@asgardsrealm.net>
|
||||
# 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/
|
||||
|
@ -1,12 +1,16 @@
|
||||
#!/usr/bin/perl
|
||||
# Copyright 2007 Kees Cook <kees@ubuntu.com>
|
||||
# License GPLv2
|
||||
# Copyright 2007 (C) Kees Cook <kees@ubuntu.com>
|
||||
# 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;
|
||||
|
@ -1,12 +1,47 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
# Author: Martin Pitt <martin.pitt@ubuntu.com>
|
||||
# License: GPL v2 or later
|
||||
#!/bin/bash
|
||||
# Copyright 2007 (C) Siegfried-A. Gevatter <siggi.gevatter@gmail.com>
|
||||
# Based upon a script by Martin Pitt <martin.pitt@ubuntu.com>
|
||||
# License: GPL v3 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.
|
||||
# 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.
|
||||
|
||||
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
|
||||
|
@ -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 <lut1n.tne@gmail.com> (Lutin)
|
||||
#this code is under the GNU GPL V2 licence
|
||||
# Copyright 2007 (C) Albin Tonnerre (Lutin) <lut1n.tne@gmail.com>
|
||||
# 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."
|
||||
|
14
what-patch
14
what-patch
@ -1,6 +1,18 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2006,2007 (C) Kees Cook <kees@ubuntu.com>
|
||||
# Copyright 2006-2007 (C) Kees Cook <kees@ubuntu.com>
|
||||
# Modified by Siegfried-A. Gevatter <rainct@ubuntuwire.com>
|
||||
# License: GPLv2
|
||||
|
||||
if [[ -d debian ]]; then
|
||||
cd . # pass
|
||||
elif [[ -d ../debian ]]; then
|
||||
cd ..
|
||||
elif [[ -d ../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; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user