[arch-commits] Commit in mlocate/trunk (PKGBUILD mlocate.install)
Evangelos Foutras
foutrelis at archlinux.org
Tue Sep 1 12:33:54 UTC 2020
Date: Tuesday, September 1, 2020 @ 12:33:54
Author: foutrelis
Revision: 395037
upgpkg: mlocate 0.26.git.20170220-5: fix group & perms of /var/lib/mlocate
Added:
mlocate/trunk/mlocate.install
Modified:
mlocate/trunk/PKGBUILD
-----------------+
PKGBUILD | 11 +++++++++--
mlocate.install | 7 +++++++
2 files changed, 16 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-09-01 10:55:55 UTC (rev 395036)
+++ PKGBUILD 2020-09-01 12:33:54 UTC (rev 395037)
@@ -5,7 +5,7 @@
pkgname=mlocate
pkgver=0.26.git.20170220
_commit=c98bf6595703456558a6f9c163c746cdaa9e591f
-pkgrel=4
+pkgrel=5
pkgdesc='Merging locate/updatedb implementation'
url='https://pagure.io/mlocate'
arch=('x86_64')
@@ -13,6 +13,7 @@
backup=('etc/updatedb.conf')
depends=('glibc')
makedepends=('git')
+install=mlocate.install
source=("git+https://pagure.io/mlocate.git#commit=$_commit"
'git+https://git.savannah.gnu.org/git/gnulib.git#commit=5861339993f3014cfad1b94fc7fe366fc2573598'
'sysusers.d'
@@ -49,6 +50,12 @@
make DESTDIR="${pkgdir}" install
+ # fix group and permissions of /var/lib/mlocate; the Makefile does not
+ # do this because it uses a group name instead of a group id and fails
+ # https://lists.archlinux.org/pipermail/arch-general/2018-June/045165.html
+ chgrp 21 "${pkgdir}/var/lib/mlocate"
+ chmod 750 "${pkgdir}/var/lib/mlocate"
+
chgrp 21 "${pkgdir}/usr/bin/locate"
chmod 2755 "${pkgdir}/usr/bin/locate"
ln -s locate "${pkgdir}/usr/bin/slocate"
@@ -55,7 +62,7 @@
install -dm755 "${pkgdir}/var/lib"
install -dm750 -g21 "${pkgdir}/var/lib/locate"
-
+
install -Dm644 ../updatedb.conf "${pkgdir}/etc/updatedb.conf"
install -Dm644 ../sysusers.d "${pkgdir}/usr/lib/sysusers.d/locate.conf"
install -Dm644 ../updatedb.timer "${pkgdir}/usr/lib/systemd/system/updatedb.timer"
Added: mlocate.install
===================================================================
--- mlocate.install (rev 0)
+++ mlocate.install 2020-09-01 12:33:54 UTC (rev 395037)
@@ -0,0 +1,7 @@
+post_upgrade() {
+ if (( $(vercmp $2 0.26.git.20170220-5) < 0 )); then
+ # fix group and permissions of /var/lib/mlocate
+ chgrp 21 var/lib/mlocate
+ chmod 750 var/lib/mlocate
+ fi
+}
More information about the arch-commits
mailing list