summaryrefslogtreecommitdiff
path: root/sys-apps/mlocate
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-apps/mlocate
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-apps/mlocate')
-rw-r--r--sys-apps/mlocate/Manifest8
-rw-r--r--sys-apps/mlocate/files/mlocate-cron.conf9
-rw-r--r--sys-apps/mlocate/files/mlocate.cron-r351
-rw-r--r--sys-apps/mlocate/files/updatedb.conf16
-rw-r--r--sys-apps/mlocate/metadata.xml8
-rw-r--r--sys-apps/mlocate/mlocate-0.26-r2.ebuild62
6 files changed, 154 insertions, 0 deletions
diff --git a/sys-apps/mlocate/Manifest b/sys-apps/mlocate/Manifest
new file mode 100644
index 000000000000..71e3bbe09aa1
--- /dev/null
+++ b/sys-apps/mlocate/Manifest
@@ -0,0 +1,8 @@
+AUX mlocate-cron.conf 237 SHA256 856c1ab465b3e7ffdf752ba323bea9867ac902297fc4247ae15a575419b279c7 SHA512 ab055b052980783b5c63c716d7c12dcb19961a9f990c077e4f8c9bef4ca591bd281ac3941f872659a558a18b81c014dbc0655ff0a1872310670d8efc1d27cb00 WHIRLPOOL f7974d6514f52727c1b5213ded5f2050067afcc1eb9666da55a07845eab06fccfb27d100be102c0169b95b12c0244d0d62019d35d4596fc672216e5b152f3150
+AUX mlocate.cron-r3 1389 SHA256 7507b0ea8b27331e3ae7a027a1476ad355492c0b51a76f8a0cc24ecc222028a0 SHA512 20a25a7f83886a43cb61599a65ae78170d1b5cececc953117986d27cbfb6707cbf3613b569e0bc24ce6416ce1f2cc792dd5968f0e1bf3a7a6ae72c4e10b638c2 WHIRLPOOL effb9ab764c50d6611680c401f264a350b18087252e67332c681557beefecb66925b87cc21d728aec3cf28d4bfdb28ccf955f852f3a0199154dff02bde24305a
+AUX updatedb.conf 898 SHA256 188a0cc9b9e8f01fa5f89b0974d8c223549b9cff810ae082b989157acfa54bc1 SHA512 8b0b32e949636aef46c5439b0c963cc113306cedb1e5c84dbbfa2efba6562ca6dd602fdbfa0b3bc9095b0cf30a619ebb366535406cdb461f20d012ec1af7ff9d WHIRLPOOL 82dbc16b74b738bba5f0555a4d0d1072981b9740368ad5dfa00850cefd2f0565dfb80688772c9895caddf2a37870c6e0ed790efb92af2c2fb98024e35498e86e
+DIST mlocate-0.26.tar.xz 359204 SHA256 3063df79fe198fb9618e180c54baf3105b33d88fe602ff2d8570aaf944f1263e SHA512 b1207047e30a551cba39e70812439b554def567ebe9b8b81fed6f26435bb575beafe4875a21cd72876eadd85da4e7bfc942eb28b17c430b537c351690364837f WHIRLPOOL 7f0a2df135ce2ec74f2a113e7f88b29f3964aa53fff1c47eb9aa44df4447d7b41b59615571a7626a3b7395208df75641d407b7a9456e590338962cde85093129
+EBUILD mlocate-0.26-r2.ebuild 1568 SHA256 1253f6d12fc74d4bb6a11ce0d5d39452a4dee4384080cfa282c2fc1f27977b73 SHA512 f26ab45e80000cea9edb0631c0f62a58630f1126328f1c410779f5472264fda85458f5caf8b22001ac311c206b49bdc85cf576a6f8554b80ce9aebfb4c7aef65 WHIRLPOOL b08796886bac9c72265cda8cbb3c005675a4ee1af5a276a994424e30313b68fad0235b42fdcf3843eca4867691fe59937a759579df66899f51e2644905b05ad5
+MISC ChangeLog 4363 SHA256 c1ccc897ba8e1b01cc4ed27a84f64498e323dc40a12c699fe607cb0b53545ad5 SHA512 d455816662a5ba261562d0bf060ad1114e0fc711b41b6121d91797fc23d1d6c615f54a3d85989ad2c0c1975c08424506c4e00965afaa16203d2f2cf32696aed1 WHIRLPOOL 432fc319666e097721884e3d739e8093fc33b43e42c2bb2f8c19b59a7131d2a92335cb5ee16efe251ff9a4cbce1786597e4d6e10b7c64bace55cfd04c0ae1b76
+MISC ChangeLog-2015 14935 SHA256 74e87c766df6a94f3241a393c394daa7a190c6d0b75eac12f962c8fd6088bd89 SHA512 66d070a12ed4384cd1ba01dc1d28bdf2fa548d909147e91aeac5dce93ce8be5f7df4c1ad15824d2cdf87ad8a59203bc84064c8e05b2f1bf4e380eb4a92c361ce WHIRLPOOL b38bdf153d2b7e3fb45fa3273408ecda8836d6ad5faa365c8feba921534ed0fe370e6efa5eeec0669b4253e963235d6909d92627d33823e2750a05c3dfe511cf
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/sys-apps/mlocate/files/mlocate-cron.conf b/sys-apps/mlocate/files/mlocate-cron.conf
new file mode 100644
index 000000000000..f207344a9e6c
--- /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="19"
+
+# 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-r3 b/sys-apps/mlocate/files/mlocate.cron-r3
new file mode 100644
index 000000000000..7f3252e9cc76
--- /dev/null
+++ b/sys-apps/mlocate/files/mlocate.cron-r3
@@ -0,0 +1,51 @@
+#! /bin/sh
+set -e
+
+# check if we run on battery and if so then don't run
+if which on_ac_power >/dev/null 2>&1; then
+ ON_BATTERY=0
+ on_ac_power >/dev/null 2>&1 || ON_BATTERY=$?
+ if [ "${ON_BATTERY}" -eq 1 ]; then
+ exit 0
+ fi
+fi
+
+# check if we are already running (lockfile)
+LOCKFILE="/var/lock/mlocate.daily.lock"
+if [ -e "${LOCKFILE}" ]; then
+ echo >&2 "Warning: \"${LOCKFILE}\" already present, not running updatedb."
+ exit 1
+fi
+touch "${LOCKFILE}"
+# trap the lockfile only if we really run the updatedb
+trap "rm -f ${LOCKFILE}" EXIT
+
+# source the user specified variables
+if [ -f /etc/mlocate-cron.conf ]; then
+ . /etc/mlocate-cron.conf
+fi
+
+# check the config file
+NODEVS=""
+if [ ! -f /etc/updatedb.conf ]; then
+ NODEVS=$(awk '$1 == "nodev" && $2 != "rootfs" { print $2 }' /proc/filesystems)
+fi
+
+# alter the priority of the updatedb process
+if [ -x /usr/bin/renice ]; then
+ /usr/bin/renice +${NICE:-19} -p $$ > /dev/null 2>&1
+fi
+if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then
+ /usr/bin/ionice -c${IONICE_CLASS:-2} -n${IONICE_PRIORITY:-7} -p $$ > /dev/null 2>&1
+fi
+
+# Cleanup old temp files from previous unsuccessful runs
+rm -f /var/lib/mlocate/mlocate.db.*
+
+# run the updatedb if possible
+if [ -x /usr/bin/updatedb ]; then
+ /usr/bin/updatedb -f "${NODEVS}"
+else
+ echo >&2 "Warning: \"/usr/bin/updatedb\" is not executable, unable to run updatedb."
+ exit 0
+fi
diff --git a/sys-apps/mlocate/files/updatedb.conf b/sys-apps/mlocate/files/updatedb.conf
new file mode 100644
index 000000000000..6a00d3aa2b94
--- /dev/null
+++ b/sys-apps/mlocate/files/updatedb.conf
@@ -0,0 +1,16 @@
+# /etc/updatedb.conf: config file for slocate
+
+# 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 anon_inodefs auto autofs bdev binfmt binfmt_misc cgroup cifs coda configfs cramfs cpuset debugfs devfs devpts devtmpfs ecryptfs eventpollfs exofs futexfs ftpfs fuse fusectl gfs gfs2 hostfs hugetlbfs inotifyfs iso9660 jffs2 lustre misc mqueue ncpfs nfs NFS nfs4 nfsd nnpfs ocfs ocfs2 pipefs proc ramfs rpc_pipefs securityfs selinuxfs sfs shfs smbfs sockfs spufs sshfs subfs supermount sysfs tmpfs ubifs udf usbfs vboxsf vperfctrfs"
+
+# Paths which are pruned from updatedb database
+PRUNEPATHS="/tmp /var/tmp /var/cache /var/lock /var/run /var/spool"
+
+# Folder names that are pruned from updatedb database
+PRUNENAMES=".git .hg .svn CVS"
+
+# Skip bind mounts.
+PRUNE_BIND_MOUNTS="yes"
diff --git a/sys-apps/mlocate/metadata.xml b/sys-apps/mlocate/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/sys-apps/mlocate/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/sys-apps/mlocate/mlocate-0.26-r2.ebuild b/sys-apps/mlocate/mlocate-0.26-r2.ebuild
new file mode 100644
index 000000000000..5bc4fa3c0f64
--- /dev/null
+++ b/sys-apps/mlocate/mlocate-0.26-r2.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils user toolchain-funcs
+
+DESCRIPTION="Merging locate is an utility to index and quickly search for files"
+HOMEPAGE="https://pagure.io/mlocate"
+SRC_URI="http://releases.pagure.org/mlocate/${P}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86"
+IUSE="nls selinux"
+
+RDEPEND="!sys-apps/slocate
+ !sys-apps/rlocate
+ selinux? ( sec-policy/selinux-slocate )"
+DEPEND="app-arch/xz-utils
+ nls? ( sys-devel/gettext )
+"
+
+pkg_setup() {
+ enewgroup locate
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_compile() {
+ emake groupname=locate AR="$(tc-getAR)"
+}
+
+src_install() {
+ emake groupname=locate DESTDIR="${D}" install
+ dodoc AUTHORS ChangeLog README NEWS
+
+ insinto /etc
+ doins "${FILESDIR}"/updatedb.conf
+ doins "${FILESDIR}"/mlocate-cron.conf
+ fperms 0644 /etc/{updatedb,mlocate-cron}.conf
+
+ insinto /etc/cron.daily
+ newins "${FILESDIR}"/mlocate.cron-r3 mlocate
+ fperms 0755 /etc/cron.daily/mlocate
+
+ fowners 0:locate /usr/bin/locate
+ fperms go-r,g+s /usr/bin/locate
+
+ keepdir /var/lib/mlocate
+ chown -R 0:locate "${ED}"/var/lib/mlocate
+ fperms 0750 /var/lib/mlocate
+}
+
+pkg_postinst() {
+ elog "The database for the locate command is generated daily by a cron job,"
+ elog "if you install for the first time you can run the updatedb command manually now."
+ elog
+ elog "Note that the /etc/updatedb.conf file is generic,"
+ elog "please customize it to your system requirements."
+}