[Pkg-ocaml-maint-commits] r1422 - trunk/packages/mldonkey/trunk/debian
Sylvain LE GALL
gildor-guest@costa.debian.org
Tue, 28 Jun 2005 22:29:19 +0000
Author: gildor-guest
Date: 2005-06-28 22:29:18 +0000 (Tue, 28 Jun 2005)
New Revision: 1422
Modified:
trunk/packages/mldonkey/trunk/debian/control
trunk/packages/mldonkey/trunk/debian/copyright
trunk/packages/mldonkey/trunk/debian/mldonkey-server.manpages
trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst
trunk/packages/mldonkey/trunk/debian/mldonkey-server.postrm
Log:
Adapt existing maintainer script to new function -- SLG
Modified: trunk/packages/mldonkey/trunk/debian/control
===================================================================
--- trunk/packages/mldonkey/trunk/debian/control 2005-06-28 18:40:30 UTC (rev 1421)
+++ trunk/packages/mldonkey/trunk/debian/control 2005-06-28 22:29:18 UTC (rev 1422)
@@ -7,7 +7,8 @@
Package: mldonkey-server
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${interpreter:Depends}, adduser, mime-support, debconf (>= 0.2.26), ucf (>= 1.17), dpkg (>= 1.10.27), makejail
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${interpreter:Depends}, adduser, mime-support, debconf (>= 0.2.26), ucf (>= 1.17), dpkg (>= 1.10.27)
+Suggests: makejail
Description: Door to the 'donkey' network
MLDonkey is a door to the 'donkey' network, a decentralized network used to
exchange big files on the Internet. It is written in a wonderful language,
Modified: trunk/packages/mldonkey/trunk/debian/copyright
===================================================================
--- trunk/packages/mldonkey/trunk/debian/copyright 2005-06-28 18:40:30 UTC (rev 1421)
+++ trunk/packages/mldonkey/trunk/debian/copyright 2005-06-28 22:29:18 UTC (rev 1422)
@@ -17,6 +17,23 @@
Dimitri Ara savannah@mutu.net
mldonkey admin mldonkey@mldonkey.net
+Upstream Contributors:
+ Pango
+ Norbert Lataille (Overnet)
+ Goswin Brederlow
+ Dirk Stoecker
+ Felix Buenemann
+ Andre Hinrichs
+ Michael Panteleit
+ Michael Reinsch
+ moumar@netcourrier.com
+ Mike Jones (html_mods)
+ Beedauchon
+ mld_thomas
+ Soulburner
+ Denis Fortin (Hightime)
+ Spiralvoice
+ Zet
Copyright:
Modified: trunk/packages/mldonkey/trunk/debian/mldonkey-server.manpages
===================================================================
--- trunk/packages/mldonkey/trunk/debian/mldonkey-server.manpages 2005-06-28 18:40:30 UTC (rev 1421)
+++ trunk/packages/mldonkey/trunk/debian/mldonkey-server.manpages 2005-06-28 22:29:18 UTC (rev 1422)
@@ -5,4 +5,4 @@
debian/xml-man/mldonkey_submit.1
debian/xml-man/mldonkey_users.1
debian/xml-man/mldonkey_files.1
-debian/xml-man/mldonkey_create_chroot.1
+debian/xml-man/mldonkey_create_chroot.8
Modified: trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst
===================================================================
--- trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst 2005-06-28 18:40:30 UTC (rev 1421)
+++ trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst 2005-06-28 22:29:18 UTC (rev 1422)
@@ -7,21 +7,9 @@
DEBUG=false
-# For the rest
-#DEBHELPER#
-
db_get mldonkey-server/launch_at_startup
launch_at_startup="$RET"
-if [ "$launch_at_startup" = "false" ]; then
- # We stop any remaining server
- if command -v invoke-rc.d >/dev/null 2>&1; then
- invoke-rc.d --quiet mldonkey-server stop || true
- else
- /etc/init.d/mldonkey-server stop || true
- fi
-fi
-
case "$1" in
configure)
@@ -101,19 +89,23 @@
# Creating MLDonkey group if he isn't already there
if ! getent group $mldonkey_group > /dev/null ; then
+ $DEBUG && echo -n "Creating mldonkey group: "
addgroup --quiet $mldonkey_group
+ $DEBUG && echo "done."
fi
# Creating MLDonkey user if he isn't already there
if ! getent passwd $run_as_user > /dev/null ; then
+ $DEBUG && echo -n "Creating mldonkey user: "
adduser --quiet --system --ingroup $mldonkey_group \
--home $new_mldonkey_dir --no-create-home $run_as_user
+ $DEBUG && echo "done."
fi
run_as_useruid=`/usr/bin/id -u $run_as_user`
if [ ! -d $new_mldonkey_dir ]; then
- $DEBUG && echo -n "Creating mldonkey home directory : "
+ $DEBUG && echo -n "Creating mldonkey home directory: "
mkdir $new_mldonkey_dir
$DEBUG && echo "done."
fi
@@ -122,7 +114,7 @@
db_get mldonkey-server/reown_file
if [ "$RET" = "true" ]; then
- $DEBUG && echo -n "Reowning file of $MLDONKEY_DIR : "
+ $DEBUG && echo -n "Reowning file of $MLDONKEY_DIR: "
if ! dpkg-statoverride --list $MLDONKEY_DIR >/dev/null; then
/bin/chown -R $run_as_user:$mldonkey_group $MLDONKEY_DIR
fi
@@ -131,30 +123,22 @@
db_get mldonkey-server/mldonkey_move
if [ "$RET" = "true" ] && [ "$new_mldonkey_dir" != "$MLDONKEY_DIR" ]; then
- $DEBUG && echo -n "Moving file of $MLDONKEY_DIR to $new_mldonkey_dir : "
+ $DEBUG && echo -n "Moving file of $MLDONKEY_DIR to $new_mldonkey_dir: "
/bin/mv --target-directory=$new_mldonkey_dir $MLDONKEY_DIR/*
$DEBUG && echo "done."
fi
fi
+ $DEBUG && echo -n "Creating empty $new_mldonkey_dir/downloads.ini: "
/usr/bin/touch $new_mldonkey_dir/downloads.ini
+ $DEBUG && echo -n "done."
- if ! dpkg-statoverride --list $new_mldonkey_dir >/dev/null; then
- /bin/chown $run_as_user:$mldonkey_group $new_mldonkey_dir
- fi
+ for file in "$new_mldonkey_dir" "$new_mldonkey_dir/downloads.ini" "/var/run/mldonkey" "/var/log/mldonkey"; do
+ if ! dpkg-statoverride --list "$file" >/dev/null; then
+ /bin/chown $run_as_user:$mldonkey_group "$file"
+ fi
+ done
- if ! dpkg-statoverride --list $new_mldonkey_dir/downloads.ini >/dev/null; then
- /bin/chown $run_as_user:$mldonkey_group $new_mldonkey_dir/downloads.ini
- fi
-
- if ! dpkg-statoverride --list /var/run/mldonkey >/dev/null; then
- /bin/chown -R $run_as_user:$mldonkey_group /var/run/mldonkey
- fi
-
- if ! dpkg-statoverride --list /var/log/mldonkey >/dev/null; then
- /bin/chown -R $run_as_user:$mldonkey_group /var/log/mldonkey
- fi
-
/usr/bin/touch $CONF
$DEBUG && echo -n "Creating backup of $new_mldonkey_dir/downloads.ini and $CONF : "
@@ -226,12 +210,13 @@
abort-upgrade|abort-remove|abort-deconfigure)
- ;;
+ ;;
*)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
;;
esac
-exit 0
+# For the rest
+#DEBHELPER#
Modified: trunk/packages/mldonkey/trunk/debian/mldonkey-server.postrm
===================================================================
--- trunk/packages/mldonkey/trunk/debian/mldonkey-server.postrm 2005-06-28 18:40:30 UTC (rev 1421)
+++ trunk/packages/mldonkey/trunk/debian/mldonkey-server.postrm 2005-06-28 22:29:18 UTC (rev 1422)
@@ -11,61 +11,20 @@
CONF=/etc/default/mldonkey-server
case "$1" in
- remove)
- # This package is being removed, but its configuration has not yet
- # been purged.
- if command -v invoke-rc.d >/dev/null 2>&1; then
- invoke-rc.d --quiet mldonkey-server stop || true
- else
- /etc/init.d/mldonkey-server stop || true
- fi
+ remove|disappear|upgrade|failed-upgrade|abort-install|abort-upgrade)
;;
purge)
- # This package has previously been removed and is now having
- # its configuration purged from the system.
+ ucf --purge $CONF
+ OBSOLETE_CONFFILE="/etc/default/mldonkey-server.dpkg-bak"
+ if [ -e $OBSOLETE_CONFFILE ]; then
+ echo "Removing obsolete conffile: $OBSOLETE_CONFFILE"
+ rm -f $OBSOLETE_CONFFILE
+ fi
+
# BUG : we should also remove all the file created by mldonkey, since it contains
# huge files which takes hours to download, i am still hesitating to do so
- if command -v invoke-rc.d >/dev/null 2>&1; then
- invoke-rc.d --quiet mldonkey-server stop || true
- else
- /etc/init.d/mldonkey-server stop || true
- fi
- ucf --purge $CONF
;;
- disappear)
- # This package has been completely overwritten by package $3
- # (version $4). All our files are already gone from the system.
- # This is a special case: neither "prerm remove" nor "postrm remove"
- # have been called, because dpkg didn't know that this package would
- # disappear until this stage.
-
- ;;
- upgrade)
- # About to upgrade FROM THIS VERSION to version $2 of this package.
- # "prerm upgrade" has been called for this version, and "preinst
- # upgrade" has been called for the new version. Last chance to
- # clean up.
-
- ;;
- failed-upgrade)
- # About to upgrade from version $2 of this package TO THIS VERSION.
- # "prerm upgrade" has been called for the old version, and "preinst
- # upgrade" has been called for this version. This is only used if
- # the previous version's "postrm upgrade" couldn't handle it and
- # returned non-zero. (Fix old postrm bugs here.)
-
- ;;
- abort-install)
- # Back out of an attempt to install this package. Undo the effects of
- # "preinst install...". There are two sub-cases.
-
- ;;
- abort-upgrade)
- # Back out of an attempt to upgrade this package from version $2
- # TO THIS VERSION. Undo the effects of "preinst upgrade $2".
-
- ;;
*) echo "$0: didn't understand being called with \`$1'" 1>&2
exit 1;;
esac