Your message dated Tue, 27 Jan 2009 20:01:53 GMT
with message-id <200901272001.n0rk1rpn009...@kmos.homeip.net>
and subject line slocate has been removed from Debian, closing #451792
has caused the Debian Bug report #451792,
regarding slocate does not work with new versions of findutils which have
locate split-of
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
451792: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=451792
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: slocate
Version: 3.1-1.1
Severity: important
Tags: patch
following a brief discussion on debian-devel locate is going to be
split off from the findutils package.
<http://news.gmane.org/find-root.php?message_id=3D%3c20071110110222.GA14136%40chistera.yi.org%3e>
This has already happened in experimental and will soon be done in
sid, too. A fix to make dlocate work both with the current setup and a
separate locate package is attached.
The findutils package does not ship /usr/bin/locate et.al., therefore
slocate diversion handling in preinst fails since it relies on the
existence of /usr/bin/locate.$suffix.
Also the new locate package uses update-alternatives, requiring that
slocate uses u-a, too.
Attached is a patch that implements the necessary changes.
cu andreas
--
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
diff -u slocate-3.1/debian/postrm slocate-3.1/debian/postrm
--- slocate-3.1/debian/postrm
+++ slocate-3.1/debian/postrm
@@ -5,24 +5,18 @@
set -e
-suffix=notslocate
if [ remove = "$1" ]; then
- dpkg-divert --package slocate --remove --rename \
- --divert /usr/bin/locate.$suffix \
- /usr/bin/locate
- dpkg-divert --package slocate --remove --rename \
- --divert /usr/bin/updatedb.$suffix \
- /usr/bin/updatedb
- dpkg-divert --package slocate --remove --rename \
- --divert /usr/share/man/man1/locate.$suffix.1.gz \
- /usr/share/man/man1/locate.1.gz
- dpkg-divert --package slocate --remove --rename \
- --divert /usr/share/man/man1/updatedb.$suffix.1.gz \
- /usr/share/man/man1/updatedb.1.gz
- dpkg-divert --package slocate --remove --rename \
- --divert /etc/cron.daily/find.$suffix \
- /etc/cron.daily/find
-
+ divs=`dpkg-divert --list slocate`
+ if [ "$divs" != "" ]
+ then
+ for i in /usr/bin/locate /usr/bin/updatedb /usr/share/man/man1/locate.1.gz \
+ /usr/share/man/man1/updatedb.1.gz /etc/cron.daily/find \
+ /usr/man/man1/updatedb.1.gz /usr/man/man1/locate.1.gz ; do
+ if echo $divs | grep -q $i ; then
+ $SL_DEBUG dpkg-divert --package slocate --remove --rename $i
+ fi
+ done
+ fi
delgroup $SLOCATE_GROUP
fi
diff -u slocate-3.1/debian/preinst slocate-3.1/debian/preinst
--- slocate-3.1/debian/preinst
+++ slocate-3.1/debian/preinst
@@ -2,156 +2,23 @@
set -e
-suffix=notslocate
#SL_DEBUG=echo
#echo "DEBUG========================"
#dpkg-divert --list slocate
#echo "============================="
-# check for diversions...
+# check for diversions... and remove them
divs=`dpkg-divert --list slocate`
if [ "$divs" != "" ]
then
-
- # remove links
- for i in /usr/bin/locate /usr/bin/updatedb
- do
- old_div=`echo $divs |grep $i || true`
- # check for links
- if [ -f $i -a "`readlink $i`" != "" ]
- then
- $SL_DEBUG rm $i
- else
- # Handle special case where /usr/bin/locate is not a symlink
- # to /usr/bin/slocate but a diversion exists.
-
- # We MUST have a $i.old or $i.$suffix.
- if [ -f $i.old -o -f $i.$suffix ]
- then
- $SL_DEBUG rm $i
- fi
+ for i in /usr/bin/locate /usr/bin/updatedb /usr/share/man/man1/locate.1.gz \
+ /usr/share/man/man1/updatedb.1.gz /etc/cron.daily/find \
+ /usr/man/man1/updatedb.1.gz /usr/man/man1/locate.1.gz ; do
+ if echo $divs | grep -q $i ; then
+ $SL_DEBUG dpkg-divert --package slocate --remove --rename $i
fi
-
- if [ -f $i.old ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert $i.old $i
- fi
- if [ -f $i.$suffix ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert $i.$suffix $i
- fi
- done
-
- old_div=`echo $divs |grep usr/share/man/man1/updatedb || true`
- if [ "$old_div" != "" ]
- then
- if [ -f /usr/share/man/man1/updatedb.1.gz ]
- then
- $SL_DEBUG rm /usr/share/man/man1/updatedb.1.gz
- fi
- if [ -f /usr/share/man/man1/updatedb.$suffix.1.gz ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /usr/share/man/man1/updatedb.$suffix.1.gz \
- /usr/share/man/man1/updatedb.1.gz
- fi
- if [ -f /usr/share/man/man1/updatedb.1.gz.old ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /usr/share/man/man1/updatedb.1.gz.old \
- /usr/share/man/man1/updatedb.1.gz
- fi
- fi
- old_div=`echo $divs |grep usr/man/man1/updatedb || true`
- if [ "$old_div" != "" ]
- then
- if [ -f /usr/man/man1/updatedb.1.gz ]
- then
- $SL_DEBUG rm /usr/man/man1/updatedb.1.gz
- fi
- #if [ -f /usr/man/man1/updatedb.1.gz.old ]
- #then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /usr/man/man1/updatedb.1.gz.old \
- /usr/man/man1/updatedb.1.gz
- #fi
- fi
-
- old_div=`echo $divs | grep usr/man/man1/locate || true`
- if [ "$old_div" != "" ]
- then
- if [ -f /usr/man/man1/locate.1.gz ]
- then
- $SL_DEBUG rm /usr/man/man1/locate.1.gz
- fi
- #if [ -f /usr/man/man1/locate.1.gz.old ]
- #then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /usr/man/man1/locate.1.gz.old \
- /usr/man/man1/locate.1.gz
- #fi
- fi
- old_div=`echo $divs | grep usr/share/man/man1/locate || true`
- if [ "$old_div" != "" ]
- then
- if [ -f /usr/share/man/man1/locate.1.gz ]
- then
- $SL_DEBUG rm /usr/share/man/man1/locate.1.gz
- fi
- if [ -f /usr/share/man/man1/locate.$suffix.1.gz ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /usr/share/man/man1/locate.$suffix.1.gz \
- /usr/share/man/man1/locate.1.gz
- fi
- if [ -f /usr/share/man/man1/locate.1.gz.old ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /usr/share/man/man1/locate.1.gz.old \
- /usr/share/man/man1/locate.1.gz
- fi
- fi
-
- old_div=`echo $divs | grep /etc/cron.daily/find || true`
- if [ "$old_div" != "" -a ! -f /etc/cron.daily.find.$suffix ]
- then
- if [ -f /etc/cron.daily/find.old ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /etc/cron.daily/find.old \
- /etc/cron.daily/find
- fi
- if [ -f /etc/cron.daily/find.$suffix ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /etc/cron.daily/find.$suffix \
- /etc/cron.daily/find
- fi
- if [ ! -f /etc/cron.daily/find ]
- then
- # no idea how this happened
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /etc/cron.daily/find.$suffix \
- /etc/cron.daily/find
- fi
- fi
-
- # the cron.daily/find must be divered to /etc/<something> so that
- # it is no longer run by cron.
- old_div=`echo $divs | grep /etc/cron.daily.find.$suffix || true`
- if [ "$old_div" != "" ]
- then
- if [ -f /etc/cron.daily.find.$suffix ]
- then
- $SL_DEBUG dpkg-divert --package slocate --remove --rename \
- --divert /etc/cron.daily.find.$suffix \
- /etc/cron.daily/find
- fi
- fi
-
+ done
fi
# all diverts should be toast
@@ -164,25 +31,6 @@
exit 1
fi
-#if [ install = "$1" ]; then
- $SL_DEBUG dpkg-divert --package slocate --add --rename \
- --divert /usr/bin/locate.$suffix \
- /usr/bin/locate
- $SL_DEBUG dpkg-divert --package slocate --add --rename \
- --divert /usr/bin/updatedb.$suffix \
- /usr/bin/updatedb
- $SL_DEBUG dpkg-divert --package slocate --add --rename \
- --divert /usr/share/man/man1/locate.$suffix.1.gz \
- /usr/share/man/man1/locate.1.gz
- $SL_DEBUG dpkg-divert --package slocate --add --rename \
- --divert /usr/share/man/man1/updatedb.$suffix.1.gz \
- /usr/share/man/man1/updatedb.1.gz
- # The cron script must be moved out of cron.daily so that it is
- # no longer run.
- $SL_DEBUG dpkg-divert --package slocate --add --rename \
- --divert /etc/cron.daily/find.$suffix \
- /etc/cron.daily/find
-#fi
# The database format has changed, check if we should remove it.
if [ "upgrade" = "$1" -a -e "/var/lib/slocate/slocate.db" -a "$2" = "2.7-4" ] ; then
diff -u slocate-3.1/debian/cron.daily slocate-3.1/debian/cron.daily
--- slocate-3.1/debian/cron.daily
+++ slocate-3.1/debian/cron.daily
@@ -4,9 +4,9 @@
then
if [ -f /etc/updatedb.conf ]
then
- /usr/bin/updatedb
+ /usr/bin/slocate -u
else
- /usr/bin/updatedb -f proc
+ /usr/bin/slocate -u -f proc
fi
chown root.slocate /var/lib/slocate/slocate.db
fi
reverted:
--- slocate-3.1/debian/slocate.links
+++ slocate-3.1.orig/debian/slocate.links
@@ -1,3 +0,0 @@
-usr/bin/slocate usr/bin/updatedb
-usr/bin/slocate usr/bin/locate
-usr/share/man/man1/slocate.1.gz usr/share/man/man1/locate.1.gz
diff -u slocate-3.1/debian/postinst slocate-3.1/debian/postinst
--- slocate-3.1/debian/postinst
+++ slocate-3.1/debian/postinst
@@ -32,2 +32,15 @@
+case "$1" in
+ configure)
+ update-alternatives --quiet --install /usr/bin/locate locate \
+ /usr/bin/slocate 40 \
+ --slave /usr/share/man/man1/locate.1.gz locate.1.gz \
+ /usr/share/man/man1/slocate.1.gz \
+ --slave /usr/bin/updatedb updatedb /usr/bin/slocate \
+ --slave /usr/share/man/man1/updatedb.1.gz updatedb.1.gz \
+ /usr/share/man/man1/updatedb.slocate.1.gz
+ ;;
+esac
+
+
#DEBHELPER#
diff -u slocate-3.1/debian/control slocate-3.1/debian/control
--- slocate-3.1/debian/control
+++ slocate-3.1/debian/control
@@ -8,7 +8,7 @@
Package: slocate
Architecture: any
Depends: ${shlibs:Depends}, adduser, dpkg (>= 1.8.1)
-Conflicts: dlocate (<< 0.5-0.1)
+Conflicts: dlocate (<< 0.5-0.1), findutils (<= 4.2.31-2)
Suggests: anacron
Description: Secure replacement of findutil's locate
This locate can index all files on your system, but only files and
diff -u slocate-3.1/debian/changelog slocate-3.1/debian/changelog
--- slocate-3.1/debian/changelog
+++ slocate-3.1/debian/changelog
@@ -1,3 +1,18 @@
+slocate (3.1-1.2) unstable; urgency=low
+
+ * NMU
+ * Switch to update-alternatives: Closes: #57749
+ - Kill diversions in preinst, setup/delete alternatives in postinst/prerm
+ - Do not rely on argv[0]==updatedb in cronjob, simply specify option -u
+ instead.
+ - Install updated.1 manpage as /usr/share/man/man1/updatedb.slocate.1.gz
+ - Stop shipping links /usr/bin/locate -> slocate, /usr/bin/updatedb ->
+ slocate and /usr/share/man/man1/locate.1.gz -> slocate.1.gz in debian
+ package.
+ - Conflicts with findutils (<= 4.2.31-2)
+
+ -- Andreas Metzler <ametz...@argenau> Sun, 18 Nov 2007 08:29:01 +0000
+
slocate (3.1-1.1) unstable; urgency=high
* Non-maintainer upload by the testing security team
diff -u slocate-3.1/debian/rules slocate-3.1/debian/rules
--- slocate-3.1/debian/rules
+++ slocate-3.1/debian/rules
@@ -42,8 +42,8 @@
install -m 0755 src/slocate `pwd`/debian/slocate/usr/bin
install -m 644 doc/slocate.1 `pwd`/debian/slocate/usr/share/man/man1/slocate.1
gzip -9 `pwd`/debian/slocate/usr/share/man/man1/slocate.1
- install -m 644 doc/updatedb.1 `pwd`/debian/slocate/usr/share/man/man1/updatedb.1
- gzip -9 `pwd`/debian/slocate/usr/share/man/man1/updatedb.1
+ install -m 644 doc/updatedb.1 `pwd`/debian/slocate/usr/share/man/man1/updatedb.slocate.1
+ gzip -9 `pwd`/debian/slocate/usr/share/man/man1/updatedb.slocate.1
touch install-stamp
diff -u slocate-3.1/debian/prerm slocate-3.1/debian/prerm
--- slocate-3.1/debian/prerm
+++ slocate-3.1/debian/prerm
@@ -10,2 +10,6 @@
+if [ "$1" != "upgrade" ]; then
+ update-alternatives --remove locate /usr/bin/slocate
+fi
+
#DEBHELPER#
signature.asc
Description: Digital signature
--- End Message ---
--- Begin Message ---
Version: 3.1-1.1+rm
The slocate package has been removed from Debian testing, unstable and
experimental, so I am now closing the bugs that were still opened
against it.
For more information about this package's removal, read
http://bugs.debian.org/457565 . That bug might give the reasons why
this package was removed, and suggestions of possible replacements.
Don't hesitate to reply to this mail if you have any question.
Thank you for your contribution to Debian.
Kind regards,
--
Marco Rodrigues
--- End Message ---