mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-12 23:51:08 +00:00
Improved check-symbols. More slighly changes on what-patch. Added pbuilder-template. Updated AUTHORS and README.
This commit is contained in:
parent
7be8b44962
commit
35e3a0be26
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 <rainct@ubuntuwire.com>
|
||||
Jamin W. Collins <jcollins@asgardsrealm.net>
|
||||
|
14
README
14
README
@ -1,6 +1,12 @@
|
||||
Ubuntu Development Tools
|
||||
=====================
|
||||
== Ubuntu Development Tools ==
|
||||
=====================
|
||||
|
||||
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.
|
||||
|
||||
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
|
||||
# (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`"
|
||||
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
|
||||
|
||||
|
36
pbuilder-template
Normal file
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
|
||||
# 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 [[ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user