3
0
mirror of https://git.launchpad.net/ubuntu-dev-tools synced 2025-03-27 02:41:09 +00:00

Improved check-symbols. More slighly changes on what-patch. Added pbuilder-template. Updated AUTHORS and README.

This commit is contained in:
Siegfried-Angel Gevatter Pujals (RainCT) 2007-08-03 21:17:31 +02:00
parent 7be8b44962
commit 35e3a0be26
5 changed files with 97 additions and 35 deletions

@ -4,3 +4,5 @@ Albin Tonnerre <lut1n.tne@gmail.com>
Michael Bienia <geser@ubuntu.com> Michael Bienia <geser@ubuntu.com>
Kees Cook <kees@ubuntu.com> Kees Cook <kees@ubuntu.com>
Martin Pitt <martin.pitt@ubuntu.com> Martin Pitt <martin.pitt@ubuntu.com>
Siegfried-A. Gevatter <rainct@ubuntuwire.com>
Jamin W. Collins <jcollins@asgardsrealm.net>

14
README

@ -1,6 +1,12 @@
Ubuntu Development Tools =====================
== Ubuntu Development Tools ==
=====================
check-symbols <package> [<directory>] check-symbols <package> [<directory>]
... will compare and give you a diff of the exported symbols of all ... will compare and give you a diff of the exported symbols of all .so
.so files in all binary packages of <package>. files in all binary packages of <package>.
<directory> is not mandatory and /var/cache/pbuilder/result by default. <directory> 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.

@ -1,41 +1,59 @@
#!/bin/bash #!/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 <rainct@ubuntuwire.com>
# License: GPLv2
PACKAGES="`apt-cache showsrc $1 | grep ^Binary | sed 's/Binary\:\ //g;s/\,//g' | sort -u`" PACKAGES="`apt-cache showsrc $1 | grep ^Binary | sed 's/Binary\:\ //g;s/\,//g' | sort -u`"
DEBLINE="" DEBLINE=""
DEBUG=False
if [ -z $1 ]; then \ if [[ -z $1 ]]; then
echo "Missing argument: source package name."; \ echo "Missing argument: source package name.";
exit; \ exit;
fi fi
if [ -z $2 ]; then \ if [[ -z $2 ]]; then
DEBDIR="/var/cache/pbuilder/result"; \ DEBDIR="/var/cache/pbuilder/result";
else \ else
DEBDIR="$2"; \ DEBDIR="$2";
fi fi
for pack in $PACKAGES; \ for pack in $PACKAGES;
do \ do
for lib in `dpkg -L $pack | grep -E "\.so$" | sort -u`; \ for lib in `dpkg -L $pack | grep -E "\.so$" | sort -u`;
do \ do
LIBNAME=$(basename $lib); \ LIBNAME=$(basename $lib);
nm -D $lib | cut -d' ' -f3 | sort -u > /tmp/$LIBNAME.1; \ nm -D $lib | cut -d' ' -f3 | sort -u > /tmp/$LIBNAME.1;
done; \ done;
DEBLINE="$DEBLINE $DEBDIR/$pack*.deb "; DEBLINE="$DEBLINE $DEBDIR/$pack*.deb ";
done done
sudo dpkg -i $DEBLINE; if [[ -z $DEBLINE ]]; then
echo "Package doesn't exist: $1."; exit
fi
for pack in $PACKAGES; \ NOFILE=True
do \ for filename in $DEBLINE; do
for lib in `dpkg -L $pack | grep -E "\.so$" | sort -u`; \ if [[ ${filename: -5} != "*.deb" ]]; then
do \ NOFILE=False
LIBNAME=$(basename $lib); \ [[ $DEBUG != True ]] || echo "Found binary file: $filename"
nm -D $lib | cut -d' ' -f3 | sort -u > /tmp/$LIBNAME.2; \ fi
echo "Checking: $lib"; \
diff -u /tmp/$LIBNAME.{1,2}; \
rm /tmp/$LIBNAME.{1,2}; \
done; \
done 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;
done

36
pbuilder-template Normal file

@ -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

@ -1,13 +1,13 @@
#!/bin/bash #!/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> # Modified by Siegfried-A. Gevatter <rainct@ubuntuwire.com>
# License: GPLv2 # License: GPLv2
if [[ -e debian ]]; then if [[ -d debian ]]; then
cd . # pass cd . # pass
elif [[ -e ../debian ]]; then elif [[ -d ../debian ]]; then
cd .. cd ..
elif [[ -e ../patches ]]; then elif [[ -d ../patches ]]; then
cd ../.. cd ../..
else else
echo "Can't find debian/rules."; exit echo "Can't find debian/rules."; exit