[arch-commits] Commit in mlocate/repos (10 files)

Allan McRae allan at archlinux.org
Thu Nov 3 11:28:40 UTC 2011


    Date: Thursday, November 3, 2011 @ 07:28:39
  Author: allan
Revision: 141941

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  mlocate/repos/testing-i686/
  mlocate/repos/testing-i686/PKGBUILD
    (from rev 141940, mlocate/trunk/PKGBUILD)
  mlocate/repos/testing-i686/mlocate.install
    (from rev 141940, mlocate/trunk/mlocate.install)
  mlocate/repos/testing-i686/updatedb.conf
    (from rev 141940, mlocate/trunk/updatedb.conf)
  mlocate/repos/testing-i686/updatedb.cron.daily
    (from rev 141940, mlocate/trunk/updatedb.cron.daily)
  mlocate/repos/testing-x86_64/
  mlocate/repos/testing-x86_64/PKGBUILD
    (from rev 141940, mlocate/trunk/PKGBUILD)
  mlocate/repos/testing-x86_64/mlocate.install
    (from rev 141940, mlocate/trunk/mlocate.install)
  mlocate/repos/testing-x86_64/updatedb.conf
    (from rev 141940, mlocate/trunk/updatedb.conf)
  mlocate/repos/testing-x86_64/updatedb.cron.daily
    (from rev 141940, mlocate/trunk/updatedb.cron.daily)

------------------------------------+
 testing-i686/PKGBUILD              |   56 +++++++++++++++++++++++++++++++++++
 testing-i686/mlocate.install       |   18 +++++++++++
 testing-i686/updatedb.conf         |    5 +++
 testing-i686/updatedb.cron.daily   |   29 ++++++++++++++++++
 testing-x86_64/PKGBUILD            |   56 +++++++++++++++++++++++++++++++++++
 testing-x86_64/mlocate.install     |   18 +++++++++++
 testing-x86_64/updatedb.conf       |    5 +++
 testing-x86_64/updatedb.cron.daily |   29 ++++++++++++++++++
 8 files changed, 216 insertions(+)

Copied: mlocate/repos/testing-i686/PKGBUILD (from rev 141940, mlocate/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2011-11-03 11:28:39 UTC (rev 141941)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Allan McRae <allan at archlinux.org>
+# Contributor: lydgate
+
+pkgname=mlocate
+pkgver=0.24
+pkgrel=2
+pkgdesc="Faster merging drop-in for slocate"
+arch=('i686' 'x86_64')
+url="http://carolina.mff.cuni.cz/~trmac/blog/mlocate"
+license=('GPL')
+conflicts=('slocate')
+provides=('slocate')
+replaces=('slocate')
+depends=('glibc' 'coreutils' 'sh')
+backup=('etc/updatedb.conf'
+        'etc/cron.daily/updatedb')
+install=mlocate.install
+source=(https://fedorahosted.org/releases/m/l/mlocate/mlocate-$pkgver.tar.xz
+	updatedb.conf
+	updatedb.cron.daily)
+md5sums=('a9c221e5bc489a2ed710c943990137bd'
+         'c374ff223f2e07b5e602ba22359f2335'
+         'cde5da81bebad2de556ef2e43d895e13')
+
+build() {
+  cd $srcdir/$pkgname-$pkgver
+
+  sed -i '/^groupname /s/mlocate/locate/' Makefile.in
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
+  make
+
+}
+
+check() {
+  cd $srcdir/$pkgname-$pkgver
+  make check
+}
+
+package() {
+  cd $srcdir/$pkgname-$pkgver
+  
+  # Set up a default updatedb.conf and a daily cronjob
+  install -Dm644 ${srcdir}/updatedb.conf $pkgdir/etc/updatedb.conf
+  install -Dm744 ${srcdir}/updatedb.cron.daily $pkgdir/etc/cron.daily/updatedb
+
+  # Install Mlocate
+  make DESTDIR=$pkgdir install
+
+  ln -sv locate $pkgdir/usr/bin/slocate
+  chgrp -v 21 $pkgdir/usr/bin/locate
+  chmod -v 2755 $pkgdir/usr/bin/locate
+
+  install -dm755 $pkgdir/var/lib
+  install -d -m750 -g21 $pkgdir/var/lib/locate
+}

Copied: mlocate/repos/testing-i686/mlocate.install (from rev 141940, mlocate/trunk/mlocate.install)
===================================================================
--- testing-i686/mlocate.install	                        (rev 0)
+++ testing-i686/mlocate.install	2011-11-03 11:28:39 UTC (rev 141941)
@@ -0,0 +1,18 @@
+post_install() {
+  post_upgrade "$1" "$1"
+  echo "mlocate command is technically locate, but slocate is symlinked and still works."
+  echo "You should run updatedb as root."
+}
+
+post_upgrade() {
+  # This can be removed after {m,x}locate have both been updated
+  getent group slocate &>/dev/null && usr/sbin/groupdel slocate &>/dev/null
+  getent group mlocate &>/dev/null && usr/sbin/groupdel mlocate &>/dev/null
+
+  getent group locate &>/dev/null || usr/sbin/groupadd -g 21 locate &>/dev/null
+  chown -R root:locate var/lib/mlocate
+}
+
+pre_remove() {
+  getent group locate &>/dev/null && usr/sbin/groupdel locate &>/dev/null
+}

Copied: mlocate/repos/testing-i686/updatedb.conf (from rev 141940, mlocate/trunk/updatedb.conf)
===================================================================
--- testing-i686/updatedb.conf	                        (rev 0)
+++ testing-i686/updatedb.conf	2011-11-03 11:28:39 UTC (rev 141941)
@@ -0,0 +1,5 @@
+# directories to exclude from the slocate database:
+PRUNEPATHS="/media /mnt /tmp /var/tmp /var/cache /var/lock /var/run /var/spool"
+
+# filesystems to exclude from the slocate database:
+PRUNEFS="afs auto autofs binfmt_misc cifs coda configfs cramfs debugfs devpts devtmpfs ftpfs iso9660 mqueue ncpfs nfs nfs4 proc ramfs securityfs shfs smbfs sshfs sysfs tmpfs udf usbfs vboxsf"

Copied: mlocate/repos/testing-i686/updatedb.cron.daily (from rev 141940, mlocate/trunk/updatedb.cron.daily)
===================================================================
--- testing-i686/updatedb.cron.daily	                        (rev 0)
+++ testing-i686/updatedb.cron.daily	2011-11-03 11:28:39 UTC (rev 141941)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
+NICE=19
+
+# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
+IONICE_CLASS=2
+
+# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
+IONICE_PRIORITY=7
+
+UPDATEDB="/usr/bin/updatedb"
+
+if [ -x /usr/bin/nice ]; then
+  UPDATEDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEDB}"
+fi
+
+if [ -x /usr/bin/ionice ]; then
+  UPDATEDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEDB}"
+fi
+
+# Update the "locate" database
+if [ -x /usr/bin/updatedb ]; then
+  if [ -f /etc/updatedb.conf ]; then
+    ${UPDATEDB}
+  else
+    ${UPDATEDB} -f proc
+  fi
+fi

Copied: mlocate/repos/testing-x86_64/PKGBUILD (from rev 141940, mlocate/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2011-11-03 11:28:39 UTC (rev 141941)
@@ -0,0 +1,56 @@
+# $Id$
+# Maintainer: Allan McRae <allan at archlinux.org>
+# Contributor: lydgate
+
+pkgname=mlocate
+pkgver=0.24
+pkgrel=2
+pkgdesc="Faster merging drop-in for slocate"
+arch=('i686' 'x86_64')
+url="http://carolina.mff.cuni.cz/~trmac/blog/mlocate"
+license=('GPL')
+conflicts=('slocate')
+provides=('slocate')
+replaces=('slocate')
+depends=('glibc' 'coreutils' 'sh')
+backup=('etc/updatedb.conf'
+        'etc/cron.daily/updatedb')
+install=mlocate.install
+source=(https://fedorahosted.org/releases/m/l/mlocate/mlocate-$pkgver.tar.xz
+	updatedb.conf
+	updatedb.cron.daily)
+md5sums=('a9c221e5bc489a2ed710c943990137bd'
+         'c374ff223f2e07b5e602ba22359f2335'
+         'cde5da81bebad2de556ef2e43d895e13')
+
+build() {
+  cd $srcdir/$pkgname-$pkgver
+
+  sed -i '/^groupname /s/mlocate/locate/' Makefile.in
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
+  make
+
+}
+
+check() {
+  cd $srcdir/$pkgname-$pkgver
+  make check
+}
+
+package() {
+  cd $srcdir/$pkgname-$pkgver
+  
+  # Set up a default updatedb.conf and a daily cronjob
+  install -Dm644 ${srcdir}/updatedb.conf $pkgdir/etc/updatedb.conf
+  install -Dm744 ${srcdir}/updatedb.cron.daily $pkgdir/etc/cron.daily/updatedb
+
+  # Install Mlocate
+  make DESTDIR=$pkgdir install
+
+  ln -sv locate $pkgdir/usr/bin/slocate
+  chgrp -v 21 $pkgdir/usr/bin/locate
+  chmod -v 2755 $pkgdir/usr/bin/locate
+
+  install -dm755 $pkgdir/var/lib
+  install -d -m750 -g21 $pkgdir/var/lib/locate
+}

Copied: mlocate/repos/testing-x86_64/mlocate.install (from rev 141940, mlocate/trunk/mlocate.install)
===================================================================
--- testing-x86_64/mlocate.install	                        (rev 0)
+++ testing-x86_64/mlocate.install	2011-11-03 11:28:39 UTC (rev 141941)
@@ -0,0 +1,18 @@
+post_install() {
+  post_upgrade "$1" "$1"
+  echo "mlocate command is technically locate, but slocate is symlinked and still works."
+  echo "You should run updatedb as root."
+}
+
+post_upgrade() {
+  # This can be removed after {m,x}locate have both been updated
+  getent group slocate &>/dev/null && usr/sbin/groupdel slocate &>/dev/null
+  getent group mlocate &>/dev/null && usr/sbin/groupdel mlocate &>/dev/null
+
+  getent group locate &>/dev/null || usr/sbin/groupadd -g 21 locate &>/dev/null
+  chown -R root:locate var/lib/mlocate
+}
+
+pre_remove() {
+  getent group locate &>/dev/null && usr/sbin/groupdel locate &>/dev/null
+}

Copied: mlocate/repos/testing-x86_64/updatedb.conf (from rev 141940, mlocate/trunk/updatedb.conf)
===================================================================
--- testing-x86_64/updatedb.conf	                        (rev 0)
+++ testing-x86_64/updatedb.conf	2011-11-03 11:28:39 UTC (rev 141941)
@@ -0,0 +1,5 @@
+# directories to exclude from the slocate database:
+PRUNEPATHS="/media /mnt /tmp /var/tmp /var/cache /var/lock /var/run /var/spool"
+
+# filesystems to exclude from the slocate database:
+PRUNEFS="afs auto autofs binfmt_misc cifs coda configfs cramfs debugfs devpts devtmpfs ftpfs iso9660 mqueue ncpfs nfs nfs4 proc ramfs securityfs shfs smbfs sshfs sysfs tmpfs udf usbfs vboxsf"

Copied: mlocate/repos/testing-x86_64/updatedb.cron.daily (from rev 141940, mlocate/trunk/updatedb.cron.daily)
===================================================================
--- testing-x86_64/updatedb.cron.daily	                        (rev 0)
+++ testing-x86_64/updatedb.cron.daily	2011-11-03 11:28:39 UTC (rev 141941)
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
+NICE=19
+
+# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
+IONICE_CLASS=2
+
+# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
+IONICE_PRIORITY=7
+
+UPDATEDB="/usr/bin/updatedb"
+
+if [ -x /usr/bin/nice ]; then
+  UPDATEDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEDB}"
+fi
+
+if [ -x /usr/bin/ionice ]; then
+  UPDATEDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEDB}"
+fi
+
+# Update the "locate" database
+if [ -x /usr/bin/updatedb ]; then
+  if [ -f /etc/updatedb.conf ]; then
+    ${UPDATEDB}
+  else
+    ${UPDATEDB} -f proc
+  fi
+fi




More information about the arch-commits mailing list