From 84b7d5bf7a57cab80ba3696ce95028c2f67ba76d Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 1 Feb 2009 01:31:31 +0100 Subject: [PATCH 1/2] xsfbs: add a repack script for uscan This will automatically prune upstream tarballs --- debian/xsfbs/repack.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 debian/xsfbs/repack.sh diff --git a/debian/xsfbs/repack.sh b/debian/xsfbs/repack.sh new file mode 100644 index 0000000..5935cc9 --- /dev/null +++ b/debian/xsfbs/repack.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +set -e + +if ! [ -d debian/prune ]; then + exit 0 +fi + +if [ "x$1" != x--upstream-version ]; then + exit 1 +fi + +version="$2" +filename="$3" + +if [ -z "$version" ] || ! [ -f "$filename" ]; then + exit 1 +fi + +dir="$(pwd)" +tempdir="$(mktemp -d)" + +cd "$tempdir" +tar xf "$dir/$filename" +cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done + +tar czf "$dir/$filename" * +cd "$dir" +rm -rf "$tempdir" +echo "Done pruning upstream tarball" + +exit 0 From 2ed171f9f390de4e97141c0016d3ba615e8c943e Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Tue, 17 Feb 2009 17:20:42 +0100 Subject: [PATCH 2/2] xsfbs.sh: kill {,de}register_x_lib_dir_with_ld_so libx11's postinst was the only post-sarge user, and it's gone now. --- debian/xsfbs/xsfbs.sh | 66 ------------------------------------------- 1 file changed, 66 deletions(-) diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh index 72efa95..8840ff9 100644 --- a/debian/xsfbs/xsfbs.sh +++ b/debian/xsfbs/xsfbs.sh @@ -719,72 +719,6 @@ run () { fi } -register_x_lib_dir_with_ld_so () { - # syntax: register_x_lib_dir_with_ld_so - # - # Configure the dynamic loader ld.so to search /usr/X11R6/lib for shared - # libraries. - # - # Call this function from the postinst script of a package that places a - # shared library in /usr/X11R6/lib, before invoking ldconfig. - - local dir ldsoconf - - dir="/usr/X11R6/lib" - ldsoconf="/etc/ld.so.conf" - - # is the line not already present? - if ! fgrep -qsx "$dir" "$ldsoconf"; then - observe "adding $dir directory to $ldsoconf" - echo "$dir" >> "$ldsoconf" - fi -} - -deregister_x_lib_dir_with_ld_so () { - # syntax: deregister_x_lib_dir_with_ld_so - # - # Configure dynamic loader ld.so to not search /usr/X11R6/lib for shared - # libraries, if and only if no shared libaries remain there. - # - # Call this function from the postrm script of a package that places a shared - # library in /usr/X11R6/lib, in the event "$1" is "remove", and before - # invoking ldconfig. - - local dir ldsoconf fgrep_status cmp_status - - dir="/usr/X11R6/lib" - ldsoconf="/etc/ld.so.conf" - - # is the line present? - if fgrep -qsx "$dir" "$ldsoconf"; then - # are there any shared objects in the directory? - if [ "$(echo "$dir"/lib*.so.*.*)" = "$dir/lib*.so.*.*" ]; then - # glob expansion produced nothing, so no shared libraries are present - observe "removing $dir directory from $ldsoconf" - # rewrite the file (very carefully) - set +e - fgrep -svx "$dir" "$ldsoconf" > "$ldsoconf.dpkg-tmp" - fgrep_status=$? - set -e - case $fgrep_status in - 0|1) ;; # we don't actually care if any lines matched or not - *) die "error reading \"$ldsoconf\"; fgrep exited with status" \ - "$fgrep_status" ;; - esac - set +e - cmp -s "$ldsoconf.dpkg-tmp" "$ldsoconf" - cmp_status=$? - set -e - case $cmp_status in - 0) rm "$ldsoconf.dpkg-tmp" ;; # files are identical - 1) mv "$ldsoconf.dpkg-tmp" "$ldsoconf" ;; # files differ - *) die "error comparing \"$ldsoconf.dpkg-tmp\" to \"$ldsoconf\";" \ - "cmp exited with status $cmp_status" ;; - esac - fi - fi -} - make_symlink_sane () { # syntax: make_symlink_sane symlink target #