-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi again,
please find attached an improved version of the previous patch. This time including an upgrade path in preinst. Best regards, Meike -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH48/GuT3KDxRRCVsRAt2yAJ9jp6u9bGOnJIlQ698nIXIg6RcD5gCgoRuX a3hpLHamANfuiaQfv7lvZeg= =QlBn -----END PGP SIGNATURE-----
diff -Nur isns-2.1-01+dfsg/debian/changelog isns-2.1-01+dfsg_meike/debian/changelog --- isns-2.1-01+dfsg/debian/changelog 2008-03-20 19:07:54.000000000 +0100 +++ isns-2.1-01+dfsg_meike/debian/changelog 2008-03-21 15:27:15.000000000 +0100 @@ -1,3 +1,11 @@ +isns (2.1-01+dfsg-2.1) unstable; urgency=low + + * NMU: created patches/iSNSLinux.c_var_lib.patch and changed + dirs (Closes: #465782) + * Added preinst in order to ensure upgrade path + + -- Meike Reichle <[EMAIL PROTECTED]> Fri, 21 Mar 2008 15:26:28 +0100 + isns (2.1-01+dfsg-2) unstable; urgency=low * Fix location of pid file (Closes: #462006) diff -Nur isns-2.1-01+dfsg/debian/dirs isns-2.1-01+dfsg_meike/debian/dirs --- isns-2.1-01+dfsg/debian/dirs 2008-03-20 19:07:52.000000000 +0100 +++ isns-2.1-01+dfsg_meike/debian/dirs 2008-03-21 16:04:12.000000000 +0100 @@ -1,2 +1,2 @@ -usr/bin usr/sbin +var/lib/isns diff -Nur isns-2.1-01+dfsg/debian/patches/iSNSLinux.c_var_lib.patch isns-2.1-01+dfsg_meike/debian/patches/iSNSLinux.c_var_lib.patch --- isns-2.1-01+dfsg/debian/patches/iSNSLinux.c_var_lib.patch 1970-01-01 01:00:00.000000000 +0100 +++ isns-2.1-01+dfsg_meike/debian/patches/iSNSLinux.c_var_lib.patch 2008-03-20 19:08:18.000000000 +0100 @@ -0,0 +1,16 @@ +Index: isns-2.1-01+dfsg/isnsserver/src/iSNSLinux.c +=================================================================== +--- isns-2.1-01+dfsg.orig/isnsserver/src/iSNSLinux.c 2008-03-20 14:30:43.000000000 +0100 ++++ isns-2.1-01+dfsg/isnsserver/src/iSNSLinux.c 2008-03-20 14:33:10.000000000 +0100 +@@ -210,8 +210,9 @@ + } + } + +- rc = mkdir("/var/isns",0777); +- rc = chdir("/var/isns"); ++ //rc = mkdir("/var/isns",0777); ++ //In Debian this belongs in /var/lib/isns, created by dh_installdirs ++ rc = chdir("/var/lib/isns"); + + if (daemon_state == TRUE) + { diff -Nur isns-2.1-01+dfsg/debian/patches/series isns-2.1-01+dfsg_meike/debian/patches/series --- isns-2.1-01+dfsg/debian/patches/series 2008-03-20 19:07:53.000000000 +0100 +++ isns-2.1-01+dfsg_meike/debian/patches/series 2008-03-20 19:08:18.000000000 +0100 @@ -1,3 +1,4 @@ # 01_Makefile.patch # 02_Makefile.patch iSNSLinux.c.patch +iSNSLinux.c_var_lib.patch diff -Nur isns-2.1-01+dfsg/debian/preinst isns-2.1-01+dfsg_meike/debian/preinst --- isns-2.1-01+dfsg/debian/preinst 1970-01-01 01:00:00.000000000 +0100 +++ isns-2.1-01+dfsg_meike/debian/preinst 2008-03-21 15:59:52.000000000 +0100 @@ -0,0 +1,43 @@ +#!/bin/sh +# preinst script for #PACKAGE# +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <new-preinst> `install' +# * <new-preinst> `install' <old-version> +# * <new-preinst> `upgrade' <old-version> +# * <old-preinst> `abort-upgrade' <new-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + upgrade) + if [ -d /var/isns ] + then + mkdir -p /var/lib/isns/ + cp /var/isns/* /var/lib/isns/ + rm -rf /var/isns/ + fi + ;; + + install|abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + +