Package: sbuild
Version: 0.34
Tags: patch
This package should use /usr/share/sbuild instead of /usr/lib/sbuild,
as it does only contain architecture-independent stuff.
While we are at it, the FHS says sendmail is /usr/sbin/sendmail.
Also, the POSIX way to call "tail" is by using -n.
The following patch tries to fix all this, including documentation,
and also creates a compatibility symlink in /usr/lib in the postinst
when upgrading from version 0.34 or older, so in theory it should not
break anything (the symlink should not be part of the .deb itself
because dpkg can't replace a real directory by a symlink).
[ The patch does not try to fix README-buildd.chroot.pre-sarge or
buildd.chroot.pre-sarge because they are obsolete. You might want
to simply remove them from the binary package ].
diff -ru sbuild-0.34.orig/bin/checkchroot sbuild-0.34/bin/checkchroot
--- sbuild-0.34.orig/bin/checkchroot 2004-09-25 17:29:09.000000000 +0200
+++ sbuild-0.34/bin/checkchroot 2005-01-29 01:45:14.000000000 +0100
@@ -8,7 +8,7 @@
fi
USAGE_STRING="${0##*/} <chroot>"
-. /usr/lib/sbuild/common_functions
+. /usr/share/sbuild/common_functions
parse_arg $1
tfile=$(tempfile)
@@ -21,7 +21,7 @@
echo "DELETE ADD"
echo "============================"
diff -u $tfile $CHROOT/../ref-$DIST |
- tail +3 |
+ tail -n +3 |
grep ^[+-] |
sed -e 's/^-//' -e "s/^+/ /" |
sort
diff -ru sbuild-0.34.orig/bin/chrapt sbuild-0.34/bin/chrapt
--- sbuild-0.34.orig/bin/chrapt 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/bin/chrapt 2005-01-29 01:13:25.000000000 +0100
@@ -1,7 +1,7 @@
#!/bin/bash
USAGE_STRING="${0##*/} <chroot> apt-get|apt-cache args"
-. /usr/lib/sbuild/common_functions
+. /usr/share/sbuild/common_functions
parse_arg $1
shift
diff -ru sbuild-0.34.orig/bin/chr-hold sbuild-0.34/bin/chr-hold
--- sbuild-0.34.orig/bin/chr-hold 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/bin/chr-hold 2005-01-29 01:13:25.000000000 +0100
@@ -3,7 +3,7 @@
# changes the dpkg status of a package in a chroot to "hold"
USAGE_STRING="${0##*/} <chroot> pkg1 [pkg2..]"
-. /usr/lib/sbuild/common_functions
+. /usr/share/sbuild/common_functions
parse_arg $1
shift
diff -ru sbuild-0.34.orig/bin/chr-unhold sbuild-0.34/bin/chr-unhold
--- sbuild-0.34.orig/bin/chr-unhold 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/bin/chr-unhold 2005-01-29 01:13:25.000000000 +0100
@@ -3,7 +3,7 @@
# changes the dpkg status of a package in a chroot to "installed"
USAGE_STRING="${0##*/} <chroot> pkg1 [pkg2..]"
-. /usr/lib/sbuild/common_functions
+. /usr/share/sbuild/common_functions
parse_arg $1
shift
diff -ru sbuild-0.34.orig/bin/gochroot sbuild-0.34/bin/gochroot
--- sbuild-0.34.orig/bin/gochroot 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/bin/gochroot 2005-01-29 01:13:25.000000000 +0100
@@ -1,7 +1,7 @@
#!/bin/bash
USAGE_STRING="${0##*/} <chroot>"
-. /usr/lib/sbuild/common_functions
+. /usr/share/sbuild/common_functions
parse_arg $1
# chroot procs should be mounted with an /etc/fstab entry instead
diff -ru sbuild-0.34.orig/bin/updatechroot sbuild-0.34/bin/updatechroot
--- sbuild-0.34.orig/bin/updatechroot 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/bin/updatechroot 2005-01-29 01:13:25.000000000 +0100
@@ -4,7 +4,7 @@
DEFAULT_CHROOT="oldstable stable testing unstable"
USAGE_STRING="${0##*/} <chroot> (default: $DEFAULT_CHROOT)"
-. /usr/lib/sbuild/common_functions
+. /usr/share/sbuild/common_functions
CHROOTS=${*:-"$DEFAULT_CHROOT"}
for i in $CHROOTS; do
diff -ru sbuild-0.34.orig/bin/upgradechroot sbuild-0.34/bin/upgradechroot
--- sbuild-0.34.orig/bin/upgradechroot 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/bin/upgradechroot 2005-01-29 01:13:25.000000000 +0100
@@ -4,7 +4,7 @@
DEFAULT_CHROOT="oldstable stable testing unstable"
USAGE_STRING="${0##*/} <chroot> (default: $DEFAULT_CHROOT)"
-. /usr/lib/sbuild/common_functions
+. /usr/share/sbuild/common_functions
CHROOTS=${*:-"$DEFAULT_CHROOT"}
for i in $CHROOTS; do
diff -ru sbuild-0.34.orig/chroot/add_sbuild_user
sbuild-0.34/chroot/add_sbuild_user
--- sbuild-0.34.orig/chroot/add_sbuild_user 2004-09-17 15:17:41.000000000
+0200
+++ sbuild-0.34/chroot/add_sbuild_user 2005-01-29 01:10:32.000000000 +0100
@@ -95,9 +95,9 @@
Now try a build:
- /usr/lib/sbuild/chrapt $CHROOT apt-get update
- /usr/lib/sbuild/chrapt $CHROOT apt-get upgrade
- - or "/usr/lib/sbuild/chrapt $CHROOT apt-get -f install"
+ /usr/share/sbuild/chrapt $CHROOT apt-get update
+ /usr/share/sbuild/chrapt $CHROOT apt-get upgrade
+ - or "/usr/share/sbuild/chrapt $CHROOT apt-get -f install"
first if the chroot is broken
cd ~/build && sbuild -v -d $DIST -p successful ed_0.2-19
diff -ru sbuild-0.34.orig/chroot/buildd.chroot sbuild-0.34/chroot/buildd.chroot
--- sbuild-0.34.orig/chroot/buildd.chroot 2004-09-17 15:17:41.000000000
+0200
+++ sbuild-0.34/chroot/buildd.chroot 2005-01-29 01:11:14.000000000 +0100
@@ -75,7 +75,7 @@
The add_sbuild_user script sets up the new chroot for a user:
- sudo /usr/lib/sbuild/add_sbuild_user $TARGET $SUITE <user>
+ sudo /usr/share/sbuild/add_sbuild_user $TARGET $SUITE <user>
-------------------------------------------------------------------------
EOF
diff -ru sbuild-0.34.orig/chroot/README-buildd.chroot
sbuild-0.34/chroot/README-buildd.chroot
--- sbuild-0.34.orig/chroot/README-buildd.chroot 2004-09-17
15:17:41.000000000 +0200
+++ sbuild-0.34/chroot/README-buildd.chroot 2005-01-29 01:11:51.000000000
+0100
@@ -11,7 +11,7 @@
sudo buildd.chroot <dist> <chroot> <mirror>
eg,
- sudo /usr/lib/sbuild/buildd.chroot sid /usr/local/chroot/unstable \
+ sudo /usr/share/sbuild/buildd.chroot sid /usr/local/chroot/unstable \
http://http.us.debian.org/debian
where <dist> is one of the *.buildd name you can find in
@@ -27,7 +27,7 @@
add_sbuild_user </path/to/chroot> <dist> <user>
eg,
- sudo /usr/lib/sbuild/add_sbuild_user /usr/local/chroot/unstable unstable rick
+ sudo /usr/share/sbuild/add_sbuild_user /usr/local/chroot/unstable unstable
rick
1. adds <user> to the sbuild group that was created during the install
2. prompts you to add <user> to sudoers, using visudo
@@ -49,7 +49,7 @@
chrapt -t apt-get install sudo fakeroot ssmtp
- /usr/lib/sbuild/checkchroot -u
+ /usr/share/sbuild/checkchroot -u
- shows what needs to be added to or deleted from the unstable
chroot. You can use "chrapt (-u|-s|-t|-o) apt-get install" to add
packages (--purge remove to delete them) or "gochroot -u"
@@ -69,7 +69,7 @@
You'll have to log in again for you to be in group sbuild.
debconf needs to be set noninteractive:
-$ /usr/lib/sbuild/gochroot -u ( or "sudo chroot /your/chroot bin/sh" )
+$ /usr/share/sbuild/gochroot -u ( or "sudo chroot /your/chroot bin/sh" )
$ dpkg-reconfigure -plow debconf
1. Dialog 2. Readline 3. Gnome 4. Editor 5. Noninteractive
What interface should be used for configuring packages? [1] 5
diff -ru sbuild-0.34.orig/debian/dirs sbuild-0.34/debian/dirs
--- sbuild-0.34.orig/debian/dirs 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/debian/dirs 2005-01-29 01:06:26.000000000 +0100
@@ -1,6 +1,6 @@
etc
usr/bin
-usr/lib/sbuild
+usr/share/sbuild
usr/share/doc/sbuild
usr/share/doc/sbuild/examples
usr/share/man/man1
diff -ru sbuild-0.34.orig/debian/postinst sbuild-0.34/debian/postinst
--- sbuild-0.34.orig/debian/postinst 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/debian/postinst 2005-01-29 01:40:12.000000000 +0100
@@ -37,6 +37,10 @@
# avg-* files from previous purge might have wrong GID
chown -R :sbuild /var/lib/sbuild
+ if dpkg --compare-versions "$2" le-nl "0.34"; then
+ ln -sf ../share/sbuild /usr/lib/sbuild
+ fi
+
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff -ru sbuild-0.34.orig/debian/README.Debian sbuild-0.34/debian/README.Debian
--- sbuild-0.34.orig/debian/README.Debian 2004-09-17 15:17:41.000000000
+0200
+++ sbuild-0.34/debian/README.Debian 2005-01-29 01:14:45.000000000 +0100
@@ -9,8 +9,8 @@
helper scripts
==============
- /usr/lib/sbuild/README.bins describes the helper shell scripts
- that are in /usr/lib/sbuild.
+ /usr/share/sbuild/README.bins describes the helper shell scripts
+ that are in /usr/share/sbuild.
extras
diff -ru sbuild-0.34.orig/debian/rules sbuild-0.34/debian/rules
--- sbuild-0.34.orig/debian/rules 2004-09-30 13:12:38.000000000 +0200
+++ sbuild-0.34/debian/rules 2005-01-29 01:22:54.000000000 +0100
@@ -45,9 +45,9 @@
$(INSTALL) -m 644 sbuild.conf sbuild.conf.local $(DESTDIR)/etc/
cp -a configs example.sbuildrc
$(DESTDIR)/usr/share/doc/sbuild/examples/.
- find bin -type f -maxdepth 1 -exec cp {} $(DESTDIR)/usr/lib/sbuild/ \;
- find chroot -type f -maxdepth 1 -exec cp {} $(DESTDIR)/usr/lib/sbuild/
\;
- mv $(DESTDIR)/usr/lib/sbuild/README-buildd.chroot \
+ find bin -type f -maxdepth 1 -exec cp {} $(DESTDIR)/usr/share/sbuild/ \;
+ find chroot -type f -maxdepth 1 -exec cp {}
$(DESTDIR)/usr/share/sbuild/ \;
+ mv $(DESTDIR)/usr/share/sbuild/README-buildd.chroot \
$(DESTDIR)/usr/share/doc/sbuild/
# Build architecture-independent files here.
diff -ru sbuild-0.34.orig/sbuild sbuild-0.34/sbuild
--- sbuild-0.34.orig/sbuild 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/sbuild 2005-01-29 01:41:57.000000000 +0100
@@ -33,7 +33,7 @@
# defaults:
@dist_parts = qw(main contrib non-free);
$source_dependencies = "/etc/source-dependencies";
-$mailprog = "/usr/lib/sendmail";
+$mailprog = "/usr/sbin/sendmail";
$dpkg = "/usr/bin/dpkg";
$sudo = "/usr/bin/sudo";
$fakeroot = "/usr/bin/fakeroot";
@@ -2956,7 +2956,7 @@
sub df {
my $dir = shift;
- my $free = `/bin/df $dir | tail -1`;
+ my $free = `/bin/df $dir | tail -n 1`;
my @free = split( /\s+/, $free );
return $free[3];
}
diff -ru sbuild-0.34.orig/sbuild.conf sbuild-0.34/sbuild.conf
--- sbuild-0.34.orig/sbuild.conf 2004-09-17 15:17:40.000000000 +0200
+++ sbuild-0.34/sbuild.conf 2005-01-29 01:07:58.000000000 +0100
@@ -144,7 +144,7 @@
# Some programs called by sbuild:
-#$mailprog = "/usr/lib/sendmail";
+#$mailprog = "/usr/sbin/sendmail";
#$dpkg = "/usr/bin/dpkg";
#$sudo = "/usr/bin/sudo";
# change to /usr/bin/sudo if you don't have fakeroot
diff -ru sbuild-0.34.orig/update-sourcedeps sbuild-0.34/update-sourcedeps
--- sbuild-0.34.orig/update-sourcedeps 2004-09-17 15:17:41.000000000 +0200
+++ sbuild-0.34/update-sourcedeps 2005-01-29 01:42:07.000000000 +0100
@@ -76,7 +76,7 @@
set +e # don't die if .sbuildrc is missing
dbfull=$(cat /etc/sbuild.conf /etc/sbuild.conf.local ~/.sbuildrc 2>/dev/null |
\
- sed -n '/^\$source_dependencies\>/s/.*"\(.*\)".*/\1/p' | tail -1)
+ sed -n '/^\$source_dependencies\>/s/.*"\(.*\)".*/\1/p' | tail -n 1)
set -e
dbdir=${dbfull%/*}
Thanks.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]