diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1131e61 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/mlocate-0.26.tar.xz diff --git a/.mlocate.metadata b/.mlocate.metadata new file mode 100644 index 0000000..bc91585 --- /dev/null +++ b/.mlocate.metadata @@ -0,0 +1 @@ +c6e6d81b25359c51c545f4b8ba0f3b469227fcbc SOURCES/mlocate-0.26.tar.xz diff --git a/SOURCES/0001-Point-the-project-URL-and-bug-reporting-address-at-h.patch b/SOURCES/0001-Point-the-project-URL-and-bug-reporting-address-at-h.patch new file mode 100644 index 0000000..499ee40 --- /dev/null +++ b/SOURCES/0001-Point-the-project-URL-and-bug-reporting-address-at-h.patch @@ -0,0 +1,94 @@ +From 6bdeb296cca5f938ecc14dfc2e10cef0aa320bd1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= <mitr@redhat.com> +Date: Tue, 21 Feb 2017 00:00:34 +0100 +Subject: [PATCH] Point the project URL and bug reporting address at + https://pagure.io/mlocate + +--- + README | 10 +++++++--- + configure.ac | 4 ++-- + po/Makevars | 2 +- + tests/config.at | 2 +- + tests/locate.at | 2 +- + 5 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/README b/README +index 02289ec..9744d76 100644 +--- a/README ++++ b/README +@@ -9,7 +9,7 @@ The locate(1) utility is intended to be completely compatible to slocate. It + also attempts to be compatible to GNU locate, when it does not conflict with + slocate compatibility. + +-New releases will be available at https://fedorahosted.org/mlocate/ . ++New releases will be available at https://pagure.io/mlocate . + + Installation + ============ +@@ -29,5 +29,9 @@ Bugs + ==== + Please consider reporting the bug to your distribution's bug tracking system. + +-Otherwise, report bugs at https://fedorahosted.org/mlocate/ . Bug reports +-with patches are especially welcome. ++Otherwise, report bugs at https://pagure.io/mlocate . Pull requests are ++especially welcome. ++ ++Translations can be contributed through ++https://fedora.zanata.org/project/view/mlocate/ . ++ +diff --git a/configure.ac b/configure.ac +index f11bac6..bb76c83 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,6 @@ + # Process this file with autoconf to produce a configure script. +-AC_INIT([mlocate], [0.26], [mitr@redhat.com], , +- [https://fedorahosted.org/mlocate/]) ++AC_INIT([mlocate], [0.26], [https://pagure.io/mlocate], , ++ [https://pagure.io/mlocate]) + AC_COPYRIGHT( + [Copyright (C) 2005, 2006, 2007, 2009, 2010, 2012 Red Hat, Inc. All rights + reserved. +diff --git a/po/Makevars b/po/Makevars +index 62a744e..1be8266 100644 +--- a/po/Makevars ++++ b/po/Makevars +@@ -34,7 +34,7 @@ COPYRIGHT_HOLDER = Red Hat, Inc + # It can be your email address, or a mailing list address where translators + # can write to without being subscribed, or the URL of a web page through + # which the translators can contact you. +-MSGID_BUGS_ADDRESS = https://fedorahosted.org/mlocate/ ++MSGID_BUGS_ADDRESS = https://pagure.io/mlocate + + # This is the list of locale categories, beyond LC_MESSAGES, for which the + # message catalogs shall be used. It is usually empty. +diff --git a/tests/config.at b/tests/config.at +index fd671bc..3886f6d 100644 +--- a/tests/config.at ++++ b/tests/config.at +@@ -75,7 +75,7 @@ Update a mlocate database. + The configuration defaults to values read from + `PATH'. + +-Report bugs to mitr@redhat.com. ++Report bugs to https://pagure.io/mlocate. + ]]) + AT_CHECK([[updatedb -h | sed "s/\`[^']*'/\`PATH'/g"]], , [expout]) + AT_CHECK([[updatedb --help | sed "s/\`[^']*'/\`PATH'/g"]], , [expout]) +diff --git a/tests/locate.at b/tests/locate.at +index 970ce8b..4f718ef 100644 +--- a/tests/locate.at ++++ b/tests/locate.at +@@ -247,7 +247,7 @@ Search for entries in a mlocate database. + -V, --version print version information + -w, --wholename match whole path name (default) + +-Report bugs to mitr@redhat.com. ++Report bugs to https://pagure.io/mlocate. + ]]) + + AT_CHECK([[locate -h | sed 's,^\([ ]*\)/.*)$,\1PATH),']], , [expout]) +-- +2.13.6 + diff --git a/SOURCES/mlocate.cron b/SOURCES/mlocate.cron new file mode 100644 index 0000000..e736210 --- /dev/null +++ b/SOURCES/mlocate.cron @@ -0,0 +1,6 @@ +#!/bin/sh +nodevs=$(awk '$1 == "nodev" && $2 != "rootfs" && $2 != "zfs" { print $2 }' < /proc/filesystems) + +renice +19 -p $$ >/dev/null 2>&1 +ionice -c2 -n7 -p $$ >/dev/null 2>&1 +/usr/bin/updatedb -f "$nodevs" diff --git a/SOURCES/updatedb.conf b/SOURCES/updatedb.conf new file mode 100644 index 0000000..dbb912a --- /dev/null +++ b/SOURCES/updatedb.conf @@ -0,0 +1,4 @@ +PRUNE_BIND_MOUNTS = "yes" +PRUNEFS = "9p afs anon_inodefs auto autofs bdev binfmt_misc cgroup cifs coda configfs cpuset debugfs devpts ecryptfs exofs fuse fuse.sshfs fusectl gfs gfs2 gpfs hugetlbfs inotifyfs iso9660 jffs2 lustre mqueue ncpfs nfs nfs4 nfsd pipefs proc ramfs rootfs rpc_pipefs securityfs selinuxfs sfs sockfs sysfs tmpfs ubifs udf usbfs fuse.glusterfs ceph fuse.ceph" +PRUNENAMES = ".git .hg .svn" +PRUNEPATHS = "/afs /media /mnt /net /sfs /tmp /udev /var/cache/ccache /var/lib/yum/yumdb /var/spool/cups /var/spool/squid /var/tmp /var/lib/ceph" diff --git a/SPECS/mlocate.spec b/SPECS/mlocate.spec new file mode 100644 index 0000000..743a342 --- /dev/null +++ b/SPECS/mlocate.spec @@ -0,0 +1,261 @@ +%global _hardened_build 1 + +Summary: An utility for finding files by name +Name: mlocate +Version: 0.26 +Release: 8%{?dist} +License: GPLv2 +URL: https://pagure.io/mlocate/ +Group: Applications/System +Source0: https://releases.pagure.org/mlocate/mlocate-%{version}.tar.xz +Source1: updatedb.conf +Source2: mlocate.cron +Requires: crontabs +Requires(pre): shadow-utils +Requires(post): grep, sed +Provides: bundled(gnulib) +Obsoletes: slocate <= 2.7-30 +BuildRequires: git + +Patch0001: 0001-Point-the-project-URL-and-bug-reporting-address-at-h.patch + +%description +mlocate is a locate/updatedb implementation. It keeps a database of +all existing files and allows you to lookup files by name. + +The 'm' stands for "merging": updatedb reuses the existing database to avoid +rereading most of the file system, which makes updatedb faster and does not +trash the system caches as much as traditional locate implementations. + +%prep +%autosetup -S git_am + +%build +%configure --localstatedir=%{_localstatedir}/lib +make %{?_smp_mflags} groupname=slocate + +%install +make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' groupname=slocate + +mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir},/etc/cron.daily} +install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/updatedb.conf +install -p -m 750 %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.daily/mlocate +# %%ghost semantics is so stupid +touch $RPM_BUILD_ROOT%{_localstatedir}/lib/mlocate/mlocate.db + +%find_lang mlocate + +%pre +getent group slocate >/dev/null || groupadd -g 21 -r -f slocate +exit 0 + +%post +if /bin/grep -q '^[^#]*DAILY_UPDATE' %{_sysconfdir}/updatedb.conf; then + /bin/sed -i.rpmsave -e '/DAILY_UPDATE/s/^/#/' %{_sysconfdir}/updatedb.conf +fi + +%files -f mlocate.lang +%doc AUTHORS COPYING NEWS README +%config(noreplace) %attr(0700,-,-) /etc/cron.daily/mlocate +%config(noreplace) %{_sysconfdir}/updatedb.conf +%attr(2711,root,slocate) %{_bindir}/locate +%{_bindir}/updatedb +%{_mandir}/man*/* +%dir %attr(0750,root,slocate) %{_localstatedir}/lib/mlocate +%ghost %attr(0640,root,slocate) %{_localstatedir}/lib/mlocate/mlocate.db + +%changelog +* Thu Nov 09 2017 Michal Sekletar <msekleta@redhat.com> - 0.26-8 +- change upstream URL also in specfile (#1502361) + +* Wed Nov 08 2017 Michal Sekletar <msekleta@redhat.com> - 0.26-7 +- don't index fuse.glusterfs filesystems (#1331870) +- don't index files on ceph filesystem (#1333152) +- update link to upstream repository (#1502361) + +* Wed Feb 03 2016 Michal Sekletar <msekleta@redhat.com> - 0.26-6 +- index zfs filesystems despite the fact they are marked as nodev (#1304416) +- add gpfs to PRUNEFS (#1180672) +- mlocate.db is ghost file created with non-default attrs, list them explicitly so rpm --verify doesn't report errors (#1182306) +- use more strict permissions for cron script (#1179633) + +* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 0.26-5 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.26-4 +- Mass rebuild 2013-12-27 + +* Wed Apr 10 2013 Miloslav Trmač <mitr@redhat.com> - 0.26-3 +- Update cron packaging for https://fedoraproject.org/wiki/Packaging:CronFiles + Notably, the cron script (previously not %%config) was renamed. + +* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.26-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Sep 22 2012 Miloslav Trmač <mitr@redhat.com> - 0.26-1 +- Update to mlocate-0.26 +- Drop no longer necessary %%clean and %%defattr commands. +- Enable hardened build + Resolves: #853189 + +* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.25-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Mar 3 2012 Miloslav Trmač <mitr@redhat.com> - 0.25-1 +- Update to mlocate-0.25 +- Add /var/lib/yum/yumdb to PRUNEPATHS + Resolves: #747918 + +* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.24-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Mar 31 2011 Miloslav Trmač <mitr@redhat.com> - 0.24-1 +- Update to mlocate-0.24 + Resolves: #675189 +- Explicitly exclude fuse.sshfs. Ideally we'd like to exclude all fuse.* file + systems, sshfs is urgent because it it can hang updatedb. + Resolves: #604145, #608094 + +* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.23.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Feb 4 2011 Miloslav Trmač <mitr@redhat.com> - 0.23.1-4 +- Add Provides: bundled(gnulib) + +* Fri Feb 4 2011 Miloslav Trmač <mitr@redhat.com> - 0.23.1-3 +- Exclude /mnt by default + Resolves: #674635 +- Drop %%triggerpostun on slocate - it is long obsolete, and rpm started + rejecting "Requries(triggerpostun)" + +* Wed Sep 29 2010 jkeating - 0.23.1-2 +- Rebuilt for gcc bug 634757 + +* Tue Sep 14 2010 Miloslav Trmač <mitr@redhat.com> - 0.23.1-1 +- Update to mlocate-0.23.1 + +* Thu Aug 26 2010 Miloslav Trmač <mitr@redhat.com> - 0.23-1 +- Update to mlocate-0.23 +- Don't exclude rootfs, to avoid ambiguity when handling "/" + Resolves: #624551 + +* Tue Mar 30 2010 Miloslav Trmač <mitr@redhat.com> - 0.22.4-2 +- Ignore no-op bind mounts + Resolves: #577819 + +* Fri Mar 26 2010 Miloslav Trmač <mitr@redhat.com> - 0.22.4-1 +- Update to mlocate-0.22.4 + +* Thu Mar 4 2010 Miloslav Trmač <mitr@redhat.com> - 0.22.3-1 +- Update to mlocate-0.22.3 +- Remove no longer necessary references to BuildRoot: + +* Fri Jan 15 2010 Miloslav Trmač <mitr@redhat.com> - 0.22.2-2 +- Add "lustre" to PRUNEFS +- Add all nodev filesystems from the Fedora kernel to PRUNEFS, to make + (updatedb) work as some users expect + +* Fri Oct 2 2009 Miloslav Trmač <mitr@redhat.com> - 0.22.2-1 +- Update to mlocate-0.22.2 + +* Tue Sep 15 2009 Miloslav Trmač <mitr@redhat.com> - 0.22.1-1 +- Update to mlocate-0.22.1 +- Drop Provides: slocate, per NamingGuidelines + +* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.22-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue May 19 2009 Miloslav Trmač <mitr@redhat.com> - 0.22-2 +- Add /var/cache/ccache to PRUNEPATHS. + +* Tue Apr 14 2009 Miloslav Trmač <mitr@redhat.com> - 0.22-1 +- Update to mlocate-0.22 + +* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.21.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Jan 12 2009 Miloslav Trmač <mitr@redhat.com> - 0.21.1-3 +- Merge review fixes, based on a patch by Parag AN: + - Use %%{_localstatedir}/lib instead of hard-coding /var/lib + - Use %%{?_smp_mflags} + - Preserve file time stamps + - Only create the group if it doesn't exist, hide errors from rpm + +* Fri Nov 28 2008 Miloslav Trmač <mitr@redhat.com> - 0.21.1-2 +- Add .git to PRUNENAMES + Resolves: #473227 +- Avoid a rpmlint warning + +* Tue Oct 28 2008 Miloslav Trmač <mitr@redhat.com> - 0.21.1-1 +- Update to mlocate-0.21 + Resolves: #461208 + +* Mon Jun 30 2008 Miloslav Trmač <mitr@redhat.com> - 0.21-1 +- Update to mlocate-0.21 +- Define PRUNENAMES to exclude .svn and .hg + +* Wed Apr 9 2008 Miloslav Trmač <mitr@redhat.com> - 0.20-1 +- Update to mlocate-0.20 + +* Mon Mar 3 2008 Miloslav Trmač <mitr@redhat.com> - 0.19-1 +- Update to mlocate-0.19 +- New home page at https://fedorahosted.org/mlocate/ . + +* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0.18-2 +- Autorebuild for GCC 4.3 + +* Sat Aug 25 2007 Miloslav Trmač <mitr@redhat.com> - 0.18-1 +- Update to mlocate-0.18 +- Run updatedb with reduced I/O priority + Resolves: #254165 + +* Wed Apr 25 2007 Miloslav Trmac <mitr@redhat.com> - 0.17-1 +- Update to mlocate-0.17 + Resolves: #237120 + +* Tue Mar 6 2007 Miloslav Trmac <mitr@redhat.com> - 0.16-1 +- Update to mlocate-0.16 +- Enable PRUNE_BIND_MOUNTS by default + Resolves: #221755 + +* Fri Jan 5 2007 Miloslav Trmac <mitr@redhat.com> - 0.15-2 +- Add gfs and gfs2 to PRUNEFS + Resolves: #220491 + +* Thu Nov 16 2006 Miloslav Trmac <mitr@redhat.com> - 0.15-1 +- Update to mlocate-0.15 + Resolves: #215763 + +* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.14-2.1 +- rebuild + +* Sat Mar 18 2006 Miloslav Trmac <mitr@redhat.com> - 0.14-2 +- Ship NEWS + +* Sat Mar 18 2006 Miloslav Trmac <mitr@redhat.com> - 0.14-1 +- Update to mlocate-0.14 + +* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 0.12-1.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 0.12-1.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Sat Dec 31 2005 Miloslav Trmac <mitr@redhat.com> - 0.12-1 +- Update to mlocate-0.12 + +* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com> +- rebuilt + +* Fri Dec 2 2005 Miloslav Trmac <mitr@redhat.com> - 0.11-2 +- Comment out DAILY_UPDATE from updatedb.conf (#174693) + +* Thu Nov 10 2005 Miloslav Trmac <mitr@redhat.com> - 0.11-1 +- Update to mlocate-0.11 +- Add scriptlets to create group slocate + +* Thu Jul 28 2005 Miloslav Trmac <mitr@volny.cz> - 0.10-0.testing.1 +- Update to mlocate-0.10 + +* Thu Jul 28 2005 Miloslav Trmac <mitr@volny.cz> - 0.09-0.testing.1 +- Initial build.