From 461630d5b05c060585772d664257746a90e595e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 17 Dec 2006 15:38:36 +0000 Subject: [PATCH] * modified build script to find out the version the way we do it now. * modified debian scripts to utilise sysV init. --- citadel/buildpackages | 5 +++-- citadel/debian/changelog | 23 +++++++++++++++-------- citadel/debian/citadel-server.install | 1 + citadel/debian/citadel-server.postinst | 7 +++++-- citadel/debian/citadel-server.prerm | 4 +--- citadel/debian/citadel.init | 22 +++++++++++++++------- citadel/debian/rules | 3 +++ 7 files changed, 43 insertions(+), 22 deletions(-) diff --git a/citadel/buildpackages b/citadel/buildpackages index 5d74274de..7a9ac9b97 100755 --- a/citadel/buildpackages +++ b/citadel/buildpackages @@ -1,6 +1,7 @@ #!/bin/bash +# find out the package version from conf +export `grep PACKAGE_VERSION= configure |sed -e "s;';;g" -e "s;PACKAGE;CITADEL;"` -CITADEL_VERSION=`grep '#define CITADEL.*Citadel' citadel.h |sed -e 's;";;g' -e "s;.* ;;"` PACKAGE_VERSION=`cat packageversion` DATE=`date '+%a, %d %b %Y %H:%I:00 %z'` ACTUAL_DIR=`pwd` @@ -40,7 +41,7 @@ case $1 in -e "s;@CITADEL_VERSION@;${CITADEL_VERSION};" \ -e "s;@PACKAGE_VERSION@;${PACKAGE_VERSION};" \ > debian/files - if grep -q "$CITADEL_VERSION" debian/changelog; then + if grep -q "($CITADEL_VERSION" debian/changelog; then echo rebuilding package. else echo "citadel (${CITADEL_VERSION}-${PACKAGE_VERSION}) unstable; urgency=low diff --git a/citadel/debian/changelog b/citadel/debian/changelog index 3600ed025..b57951f40 100644 --- a/citadel/debian/changelog +++ b/citadel/debian/changelog @@ -1,54 +1,61 @@ +citadel (7.00-1) unstable; urgency=low + + * update to actual Citadel CVS. many new features. see Packages changelog. + + -- Wilfried Goesgens Sat, 16 Dec 2006 01:01:00 +0100 + + citadel (6.84-1) unstable; urgency=low * update to actual Citadel CVS. many new features. see Packages changelog. - -- Wilfried Goesgens Do, 31 Aug 2006 23:11:00 +0200 + -- Wilfried Goesgens Do, 31 Aug 2006 23:11:00 +0200 citadel (6.82-1) unstable; urgency=low * update to actual Citadel CVS. many new features. see Packages changelog. - -- Wilfried Goesgens Thu, 22 Jun 2006 20:08:00 +0200 + -- Wilfried Goesgens Thu, 22 Jun 2006 20:08:00 +0200 citadel (6.71-1) unstable; urgency=low * update to actual Citadel CVS. many new features. see Packages changelog. - -- Wilfried Goesgens Sat, 21 Jan 2006 19:07:00 +0100 + -- Wilfried Goesgens Sat, 21 Jan 2006 19:07:00 +0100 citadel (6.70-1) unstable; urgency=low * update to actual Citadel CVS. many new features. see Packages changelog. - -- Wilfried Goesgens Sun, 15 Jan 2006 15:03:00 +0100 + -- Wilfried Goesgens Sun, 15 Jan 2006 15:03:00 +0100 citadel (6.63-1) unstable; urgency=low * update to actual Citadel CVS. many new features. see Packages changelog. - -- Wilfried Goesgens Mon, 12 Dec 2005 11:11:00 +0100 + -- Wilfried Goesgens Mon, 12 Dec 2005 11:11:00 +0100 citadel (6.62-1) unstable; urgency=low * update to actual Citadel CVS. many new features. see Packages changelog. - -- Wilfried Goesgens Fri, 18 Nov 2005 16:04:00 +0100 + -- Wilfried Goesgens Fri, 18 Nov 2005 16:04:00 +0100 citadel (6.61-2) unstable; urgency=low * update to actual Citadel CVS. many new features. see Packages changelog. - -- Wilfried Goesgens Tue, 01 Nov 2005 12:23:15 +0200 + -- Wilfried Goesgens Tue, 01 Nov 2005 12:23:15 +0200 citadel (6.53-1) unstable; urgency=low * Initial release Closes: #nnnn (nnnn is the bug number of your ITP) - -- Wilfried Goesgens Sat, 23 Jul 2005 12:23:15 +0200 + -- Wilfried Goesgens Sat, 23 Jul 2005 12:23:15 +0200 diff --git a/citadel/debian/citadel-server.install b/citadel/debian/citadel-server.install index 19c2b2c4c..a841cbd85 100644 --- a/citadel/debian/citadel-server.install +++ b/citadel/debian/citadel-server.install @@ -6,3 +6,4 @@ debian/tmp/usr/sbin/userlist debian/tmp/usr/sbin/sendcommand debian/tmp/usr/sbin/base64 debian/tmp/usr/lib/citadel-server/setup +debian/tmp/usr/lib/citadel-server/ctdlsvc diff --git a/citadel/debian/citadel-server.postinst b/citadel/debian/citadel-server.postinst index f06a7247f..5f52f45e7 100644 --- a/citadel/debian/citadel-server.postinst +++ b/citadel/debian/citadel-server.postinst @@ -167,6 +167,7 @@ case "$1" in export SYSADMIN_NAME=$admin export CREATE_XINETD_ENTRY=no export CREATE_INITTAB_ENTRY=no + export NO_INIT_SCRIPTS=yes echo "applying your settings." # citadel home # sysadmin @@ -187,7 +188,10 @@ case "$1" in if test -S /var/run/citadel/citadel.socket; then /usr/sbin/sendcommand "DOWN" fi - killall -HUP init + + update-rc.d citadel defaults >/dev/null + + echo "run /etc/init.d/citadel start to start citadel service." #### There are three sub-cases: ###if test "${2+set}" != set; then ### # We're being installed by an ancient dpkg which doesn't remember @@ -240,6 +244,5 @@ case "$1" in exit 0;; esac -#DEBHELPER# exit 0 diff --git a/citadel/debian/citadel-server.prerm b/citadel/debian/citadel-server.prerm index b010fa3bc..8940f4305 100644 --- a/citadel/debian/citadel-server.prerm +++ b/citadel/debian/citadel-server.prerm @@ -1,6 +1,4 @@ #!/bin/sh # stop the citadel service... -export CREATE_INITTAB_ENTRY=no -/usr/lib/citadel-server/setup -q -killall -HUP init +/etc/init.d/citadel stop \ No newline at end of file diff --git a/citadel/debian/citadel.init b/citadel/debian/citadel.init index e38b0163f..1d0d8b385 100644 --- a/citadel/debian/citadel.init +++ b/citadel/debian/citadel.init @@ -23,7 +23,8 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Citadel Groupware " NAME=citserver DAEMON=/usr/sbin/$NAME -DAEMON_ARGS=" -d -x3 -lmail" +CTDLSVC=/usr/lib/citadel-server/ctdlsvc +DAEMON_ARGS=" -x3 -lmail -t/dev/null" PIDFILE=$RUNDIR/$NAME.pid SCRIPTNAME=/etc/init.d/citadel SENDCOMMAND=/usr/sbin/sendcommand @@ -55,9 +56,12 @@ do_start() # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 + if $CTDLSVC $PIDFILE $DAEMON \ + $DAEMON_ARGS ; then + return 0 + else + return 2 + fi # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend # on this one. As a last resort, sleep for some time. @@ -73,13 +77,18 @@ do_stop() # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred - %SENDCOMMAND "DOWN" + if $SENDCOMMAND "DOWN" >/dev/null 2>&1 ; then + rm -f $PIDFILE + return 0 + else + rm -f $PIDFILE + return 2 + fi #while test -d /proc/`cat $PIDFILE`; do # /usr/bin/printf '.' # /bin/sleep 1 #done - sleep 5 #start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME #RETVAL="$?" @@ -94,7 +103,6 @@ do_stop() #[ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. # rm -f $PIDFILE - return 0 } # diff --git a/citadel/debian/rules b/citadel/debian/rules index 9015d4579..cec20b37b 100755 --- a/citadel/debian/rules +++ b/citadel/debian/rules @@ -98,6 +98,9 @@ install-arch: mv \ $(CURDIR)/debian/tmp/usr/sbin/setup \ $(CURDIR)/debian/tmp/usr/lib/citadel-server/ + mv \ + $(CURDIR)/debian/tmp/usr/sbin/ctdlsvc \ + $(CURDIR)/debian/tmp/usr/lib/citadel-server/ # cd $(CURDIR)/debian/tmp/usr/share/doc/citadel-server/examples/help; md5sum * >../help.md5sums # cd $(CURDIR)/debian/tmp/usr/share/doc/citadel-server/examples/messages; md5sum * >../messages.md5sums cp \ -- 2.30.2