From e748569b2f781a99532f47afd0964156397d763a Mon Sep 17 00:00:00 2001 From: Steve Prybylski Date: Sun, 15 Nov 2015 15:10:56 -0500 Subject: [PATCH 1/2] New package: mlocate-0.26. Closes #2973. --- srcpkgs/mlocate/patches/musl_paths-h.patch | 10 ++++++++ srcpkgs/mlocate/template | 29 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 srcpkgs/mlocate/patches/musl_paths-h.patch create mode 100644 srcpkgs/mlocate/template diff --git a/srcpkgs/mlocate/patches/musl_paths-h.patch b/srcpkgs/mlocate/patches/musl_paths-h.patch new file mode 100644 index 00000000000..628e2ca6b39 --- /dev/null +++ b/srcpkgs/mlocate/patches/musl_paths-h.patch @@ -0,0 +1,10 @@ +--- ./src/updatedb.c.orig 2015-11-15 17:52:09.470706519 -0500 ++++ ./src/updatedb.c 2015-11-15 17:52:31.754706775 -0500 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + + #include + #include "error.h" diff --git a/srcpkgs/mlocate/template b/srcpkgs/mlocate/template new file mode 100644 index 00000000000..08ba55c36cf --- /dev/null +++ b/srcpkgs/mlocate/template @@ -0,0 +1,29 @@ +# Template file for 'mlocate' +pkgname=mlocate +version=0.26 +revision=1 +build_pie=yes +build_style=gnu-configure +configure_args="--program-prefix=m --localstatedir=/var/lib" +system_accounts="mlocate" +make_dirs="/var/lib/mlocate 0755 root root" +short_desc="Implementation of locate/updatedb that reuses the database" +maintainer="Steve Prybylski " +license="GPL-2" +homepage="https://fedorahosted.org/mlocate/" +distfiles="https://fedorahosted.org/releases/m/l/${pkgname}/${pkgname}-${version}.tar.xz" +checksum=3063df79fe198fb9618e180c54baf3105b33d88fe602ff2d8570aaf944f1263e + +alternatives=" + locate:locate:/usr/bin/mlocate + locate:locate.1:/usr/share/man/man1/mlocate.1 + locate:locatedb.5:/usr/share/man/man5/mmlocate.db.5 + locate:updatedb:/usr/bin/mupdatedb + locate:updatedb.1:/usr/share/man/man1/mupdatedb.1" + +post_install() { + # rename for compatibility with findutils. + mv ${DESTDIR}/usr/share/man/man8/mupdatedb.8 ${DESTDIR}/usr/share/man/man1/mupdatedb.1 + # remove 'm' prefix. + mv ${DESTDIR}/usr/share/man/man5/mupdatedb.conf.5 ${DESTDIR}/usr/share/man/man5/updatedb.conf.5 +} From 712a5dcd2d87ee85c6848d21ad666b4cac045993 Mon Sep 17 00:00:00 2001 From: Steve Prybylski Date: Mon, 16 Nov 2015 03:00:39 -0500 Subject: [PATCH 2/2] findutils: add alternatives. --- srcpkgs/findutils/files/updatedb.conf | 10 +++++++--- srcpkgs/findutils/template | 22 ++++++++++++++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/srcpkgs/findutils/files/updatedb.conf b/srcpkgs/findutils/files/updatedb.conf index 95037ceb735..9d87dab7dbf 100644 --- a/srcpkgs/findutils/files/updatedb.conf +++ b/srcpkgs/findutils/files/updatedb.conf @@ -4,6 +4,10 @@ PRUNEPATHS="/media /mnt /tmp /var/tmp /var/cache /var/lock /var/run /var/spool /run" # Filesystems to exclude from the database: -PRUNEFS="afs auto autofs binfmt_misc cifs coda configfs cramfs debugfs devpts" -PRUNEFS="$PRUNEFS devtmpfs ftpfs iso9660 mqueue ncpfs nfs nfs4 proc ramfs" -PRUNEFS="$PRUNEFS securityfs shfs smbfs sshfs sysfs tmpfs udf usbfs vboxsf" +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" + +# Folder names that are pruned from updatedb database +PRUNENAMES=".git .hg .svn CVS" + +# Skip bind mounts +PRUNE_BIND_MOUNTS="yes" diff --git a/srcpkgs/findutils/template b/srcpkgs/findutils/template index e8f59322400..f14b051b7f9 100644 --- a/srcpkgs/findutils/template +++ b/srcpkgs/findutils/template @@ -1,11 +1,11 @@ # Template file for 'findutils' pkgname=findutils version=4.4.2 -revision=14 +revision=15 bootstrap=yes build_pie=yes build_style=gnu-configure -configure_args="--localstatedir=/var/lib/locate" +configure_args="--program-prefix=g --localstatedir=/var/lib/locate" short_desc="The GNU Find Utilities" maintainer="Juan RP " license="GPL-3" @@ -17,6 +17,18 @@ make_dirs="/var/lib/locate 0755 root root" conf_files="/etc/updatedb.conf" conflicts="chroot-findutils>=0" +alternatives=" + locate:locate:/usr/bin/glocate + locate:locate.1:/usr/share/man/man1/glocate + locate:locatedb.5:/usr/share/man/man5/glocatedb + locate:updatedb:/usr/bin/gupdatedb + locate:updatedb.1:/usr/share/man/man1/gupdatedb + xargs:xargs:/usr/bin/gxargs + xargs:xargs.1:/usr/share/man/man1/gxargs.1 + find:find:/usr/bin/gfind + find:find.1:/usr/share/man/man1/gfind.1 +" + pre_configure() { case "$XBPS_TARGET_MACHINE" in *-musl) @@ -32,4 +44,10 @@ post_install() { vinstall ${FILESDIR}/updatedb.cron-daily 744 etc/cron.daily updatedb # Install the updatedb conf file. vinstall ${FILESDIR}/updatedb.conf 640 etc + + # remove 'g' prefix. + for f in gbigram gcode gfrcode; do + mv ${DESTDIR}/usr/libexec/${f} ${DESTDIR}/usr/libexec/${f#g} + sed -i "s/${f}/${f#g}/" ${DESTDIR}/usr/bin/gupdatedb + done }