summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-apps/mlocate/ChangeLog11
-rw-r--r--sys-apps/mlocate/files/mlocate-cron.conf9
-rw-r--r--sys-apps/mlocate/files/mlocate.cron-r122
-rw-r--r--sys-apps/mlocate/files/updatedb.conf4
-rw-r--r--sys-apps/mlocate/mlocate-0.21-r1.ebuild63
5 files changed, 106 insertions, 3 deletions
diff --git a/sys-apps/mlocate/ChangeLog b/sys-apps/mlocate/ChangeLog
index 5f5dad658171..d8158d074655 100644
--- a/sys-apps/mlocate/ChangeLog
+++ b/sys-apps/mlocate/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for sys-apps/mlocate
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/mlocate/ChangeLog,v 1.26 2008/08/12 08:39:44 opfer Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/mlocate/ChangeLog,v 1.27 2008/09/07 02:12:10 opfer Exp $
+
+*mlocate-0.21-r1 (07 Sep 2008)
+
+ 07 Sep 2008; Christian Faulhammer <opfer@gentoo.org>
+ +files/mlocate.cron-r1, +files/mlocate-cron.conf, files/updatedb.conf,
+ +mlocate-0.21-r1.ebuild:
+ enable usage of ionice to keep annoyance during database update down,
+ thanks to Daniel Pielmeier <daniel DOT pielmeier AT googlemail DOT com> in
+ bug 231203; also get updatedb.conf in sync with slocate's version
12 Aug 2008; Christian Faulhammer <opfer@gentoo.org> -mlocate-0.20.ebuild:
clean up
diff --git a/sys-apps/mlocate/files/mlocate-cron.conf b/sys-apps/mlocate/files/mlocate-cron.conf
new file mode 100644
index 000000000000..886a984c8a56
--- /dev/null
+++ b/sys-apps/mlocate/files/mlocate-cron.conf
@@ -0,0 +1,9 @@
+# nice value to run at: see -n in nice(1)
+NICE="10"
+
+# ionice class to run at: see -c in ionice(1)
+# you have to install sys-apps/util-linux manually
+IONICE_CLASS="2"
+
+# ionice priority to run at: see -n in ionice(1)
+IONICE_PRIORITY="7"
diff --git a/sys-apps/mlocate/files/mlocate.cron-r1 b/sys-apps/mlocate/files/mlocate.cron-r1
new file mode 100644
index 000000000000..e26daa667bac
--- /dev/null
+++ b/sys-apps/mlocate/files/mlocate.cron-r1
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+if [ -x /usr/bin/updatedb ]
+then
+ if [ -f /etc/updatedb.conf ]
+ then
+ args=""
+ else
+ args="-f proc"
+ fi
+
+ if [ -f /etc/mlocate-cron.conf ]
+ then
+ source /etc/mlocate-cron.conf
+ fi
+
+ # run on active process in case ionice isnt installed, or
+ # system is really old and ionice doesnt work ...
+ ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} -p $$ 2>/dev/null
+
+ nice -n ${NICE:-10} /usr/bin/updatedb ${args}
+fi
diff --git a/sys-apps/mlocate/files/updatedb.conf b/sys-apps/mlocate/files/updatedb.conf
index 0c7668153aaf..dba67c05fc19 100644
--- a/sys-apps/mlocate/files/updatedb.conf
+++ b/sys-apps/mlocate/files/updatedb.conf
@@ -1,11 +1,11 @@
# /etc/updatedb.conf: config file for slocate
-# $Id: updatedb.conf,v 1.1 2007/07/08 10:26:09 opfer Exp $
+# $Id: updatedb.conf,v 1.2 2008/09/07 02:12:11 opfer Exp $
# This file sets variables that are used by updatedb.
# For more info, see the updatedb.conf(5) manpage.
# Filesystems that are pruned from updatedb database
-PRUNEFS="afs auto autofs cifs devfs devpts eventpollfs futexfs hugetlbfs iso9660 mqueue ncpfs nfs NFS nfsd nnpfs pipefs proc ramfs rpc_pipefs sfs shfs smbfs sockfs subfs supermount sysfs tmpfs udf usbfs vperfctrfs"
+PRUNEFS="afs auto autofs cifs devfs devpts eventpollfs futexfs gfs hugetlbfs iso9660 mqueue ncpfs nfs NFS nfs4 nfsd nnpfs pipefs proc ramfs rpc_pipefs selinuxfs sfs shfs smbfs sockfs spufs subfs supermount sysfs tmpfs udf usbfs vperfctrfs"
# Paths which are pruned from updatedb database
PRUNEPATHS="/tmp /var/tmp /root/.ccache"
diff --git a/sys-apps/mlocate/mlocate-0.21-r1.ebuild b/sys-apps/mlocate/mlocate-0.21-r1.ebuild
new file mode 100644
index 000000000000..9d8da4cd9ead
--- /dev/null
+++ b/sys-apps/mlocate/mlocate-0.21-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/mlocate/mlocate-0.21-r1.ebuild,v 1.1 2008/09/07 02:12:10 opfer Exp $
+
+inherit eutils
+
+DESCRIPTION="Merging locate is an utility to index and quickly search for files"
+HOMEPAGE="https://fedorahosted.org/mlocate/"
+SRC_URI="https://fedorahosted.org/releases/m/l/mlocate/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="!sys-apps/slocate
+ !sys-apps/rlocate"
+
+pkg_setup() {
+ enewgroup locate
+}
+
+src_compile() {
+ econf || die "econf failed"
+ emake groupname=locate || die "emake failed"
+}
+
+src_install() {
+ emake groupname=locate DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog README NEWS
+
+ insinto /etc
+ doins "${FILESDIR}/updatedb.conf"
+ fperms 0644 /etc/updatedb.conf
+
+ insinto /etc
+ doins "${FILESDIR}/mlocate-cron.conf"
+ fperms 0644 /etc/mlocate-cron.conf
+
+ insinto /etc/cron.daily
+ newins "${FILESDIR}/mlocate.cron-r1" mlocate
+ fperms 0755 /etc/cron.daily/mlocate
+
+ fowners 0:locate /usr/bin/locate
+ fperms go-r,g+s /usr/bin/locate
+
+ chown -R 0:locate "${D}/var/lib/mlocate"
+ fperms 0750 /var/lib/mlocate
+ keepdir /var/lib/mlocate
+}
+
+src_test() {
+ if has userpriv ${FEATURES} && ! has usersandbox ${FEATURES}; then
+ make check-local || die "test suite failed"
+ else
+ ewarn "Activate FEATURES=userpriv and deactivate FEATURES=usersandbox to run testsuite."
+ fi
+}
+
+pkg_postinst() {
+ elog "Note that the /etc/updatedb.conf file is generic"
+ elog "Please customize it to your system requirements"
+}