From 33b0ea73098f12374cbd6c7592663b84c8d1270f Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Sat, 6 Mar 2010 04:23:11 +0100 Subject: [PATCH] moved .deb install and update scripts into new iservchk script --- debian/changelog | 7 +++++++ debian/postinst | 13 ------------ debian/postrm | 4 ---- debian/prerm | 6 ------ debian/rules | 2 -- iservchk/99errorreporter | 7 +++++++ ...config.sh => update-config-from-iserv1.sh} | 6 +----- maint/{update.php => update-database.php} | 21 +++---------------- 8 files changed, 18 insertions(+), 48 deletions(-) delete mode 100644 debian/postinst delete mode 100755 debian/prerm create mode 100644 iservchk/99errorreporter rename maint/{update-config.sh => update-config-from-iserv1.sh} (90%) rename maint/{update.php => update-database.php} (83%) mode change 100644 => 100755 diff --git a/debian/changelog b/debian/changelog index ad24523..35c6d8c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +iserv-mod-error-reporter (10.03.06-1) testing; urgency=low + + * Non-maintainer upload. + * test + + -- Roland Hieber (Package Signing Key) Sat, 06 Mar 2010 03:59:20 +0100 + iserv-mod-error-reporter (10.03.05-1) testing; urgency=low * fixed SQL rights for groups table (Warning: db_query(): ERROR: permission diff --git a/debian/postinst b/debian/postinst deleted file mode 100644 index 8c50428..0000000 --- a/debian/postinst +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -touch /usr/share/iserv/www/inc/mod_error-reporter/config.inc -chmod g+w /usr/share/iserv/www/inc/mod_error-reporter/config.inc -chgrp www-data /usr/share/iserv/www/inc/mod_error-reporter/config.inc -# better let update.php do it because chkdb instantly drops old fields -# chkdb -r -chkpriv -chklocale -# run update script -export PGDATABASE=iserv -export PGUSER=postgres -php /usr/share/iserv/modules/error-reporter/update.php -#DEBHELPER# diff --git a/debian/postrm b/debian/postrm index 4fdf0ba..e9338c4 100755 --- a/debian/postrm +++ b/debian/postrm @@ -1,9 +1,5 @@ #!/bin/sh -psql -c "DELETE FROM log_module WHERE module='Error Report Assistant';" -chklocale - #DEBHELPER# - if [ "$1" = "purge" ]; then echo echo If you do not need the SQL tables anymore, remove them by running diff --git a/debian/prerm b/debian/prerm deleted file mode 100755 index e912711..0000000 --- a/debian/prerm +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -if [ "$1" = "purge" ]; then - rm -f /usr/share/iserv/www/inc/mod_error-reporter/config.inc -fi; - -#DEBHELPER# diff --git a/debian/rules b/debian/rules index e8b4a1d..55b5eb3 100755 --- a/debian/rules +++ b/debian/rules @@ -8,13 +8,11 @@ build: binary-indep: [ ! -f Makefile ] || $(MAKE) clean dh_clean - dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) DESTDIR=$(CURDIR)/debian/iserv-mod-error-reporter install - # we rather install the documentation via dh_installdocs rm -rf $(CURDIR)/debian/iserv-mod-error-reporter/usr/share/doc/iserv-mod-error-reporter dh_testdir diff --git a/iservchk/99errorreporter b/iservchk/99errorreporter new file mode 100644 index 0000000..7521b60 --- /dev/null +++ b/iservchk/99errorreporter @@ -0,0 +1,7 @@ +Test 'import configuration from IServ 1' + '[ ! -f /old/opt/iserv/idesk/inc/error-reporter/config.inc.rpmsave ]' + /usr/share/iserv/modules/error-reporter/update-config-from-iserv1.sh + +Test 'update old config' + '[ ! -f /usr/share/iserv/www/inc/mod_error-reporter/config.inc ]' + /usr/share/iserv/modules/error-reporter/update-config diff --git a/maint/update-config.sh b/maint/update-config-from-iserv1.sh similarity index 90% rename from maint/update-config.sh rename to maint/update-config-from-iserv1.sh index 6b6f324..7779e76 100755 --- a/maint/update-config.sh +++ b/maint/update-config-from-iserv1.sh @@ -1,12 +1,8 @@ #!/bin/bash +# called from iservchk if old config exists OLDCFG=/old/opt/iserv/idesk/inc/error-reporter/config.inc.rpmsave NEWCFG=/usr/share/iserv/www/inc/mod_error-reporter/config.inc -if [ ! -e "$OLDCFG" ]; then - echo "$OLDCFG does not exist." - exit 1; -fi; - touch $NEWCFG || exit 1; chmod u+wr $NEWCFG || exit 1; chown www-data $NEWCFG || exit 1; diff --git a/maint/update.php b/maint/update-database.php old mode 100644 new mode 100755 similarity index 83% rename from maint/update.php rename to maint/update-database.php index 8e31289..2669c3f --- a/maint/update.php +++ b/maint/update-database.php @@ -1,3 +1,4 @@ +#!/usr/bin/php