# # spec file for package mlocate # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: mlocate Version: 0.26 Release: 23.4 Summary: An utility for finding files by name License: GPL-2.0 Group: System/Monitoring Url: https://fedorahosted.org/mlocate/ Source0: https://fedorahosted.org/releases/m/l/%{name}/%{name}-%{version}.tar.xz Source1: updatedb.conf Source2: %{name}.cron Source3: sysconfig.locate BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext-tools BuildRequires: grep BuildRequires: sed BuildRequires: xz Requires: cron Requires(post): %fillup_prereq Requires(pre): permissions Requires(pre): pwdutils Recommends: %{name}-lang = %{version} Provides: findutils:%{_bindir}/locate # findutils is at version 4.5 so we need newer # provides here to get it really obsoleted Provides: findutils-locate = 5.%{version} Obsoletes: findutils-locate < 5.%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A new locate implementation. The m character stands for merging, because updatedb reuses the existing database to avoid re-reading most of the file system. %lang_package %prep %setup -q # do not check for visibilty by default as we go with nobody sed -i \ -e 's:conf_check_visibility = true:conf_check_visibility = false:g' \ src/conf.c %build export CFLAGS="%{optflags} -fPIE" export LDFLAGS="-pie" %configure \ --localstatedir=%{_localstatedir}/lib \ --enable-nls \ --disable-rpath make groupname=nobody %{?_smp_mflags} %install make DESTDIR=%{buildroot} groupname=nobody install %find_lang %{name} || echo -n >> %{name}.lang # DB file mkdir -p %{buildroot}%{_localstatedir}/lib/%{name} echo -n >> %{buildroot}%{_localstatedir}/lib/%{name}/%{name}.db # Config mkdir -p %{buildroot}%{_sysconfdir} install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir} # Cron mkdir -p %{buildroot}%{_sysconfdir}/cron.daily install -p -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.daily # Sysconfig settings install -D -m 644 %{SOURCE3} %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.locate %check make check %{?_smp_mflags} %post %{fillup_only -n locate} %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog README NEWS COPYING %config(noreplace) %{_sysconfdir}/updatedb.conf %{_sysconfdir}/cron.daily/%{name}.cron %attr(0755,root,root) %{_bindir}/locate %{_bindir}/updatedb %{_mandir}/man*/* %dir %{_localstatedir}/lib/mlocate %ghost %{_localstatedir}/lib/mlocate/mlocate.db %{_localstatedir}/adm/fillup-templates/* %files lang -f %{name}.lang %defattr(-,root,root,-) %changelog * Fri Aug 21 2015 tchvatal@suse.com - Specify umask to allow user redefine the value in login.defs bnc#941296 * Sat Oct 25 2014 tchvatal@suse.com - Remove mention of the locate group that was obsoleted. fixes bnc#902588 * Wed Jun 11 2014 tchvatal@suse.com - Enable testsuite. * Mon May 5 2014 tchvatal@suse.com - Remove some duped fs from PRUNEFS variable. * Tue Apr 15 2014 tchvatal@suse.com - Update once more to always hit the same code and to avoid regressions that are hit only under some setup scenarios. * Thu Apr 3 2014 tchvatal@suse.com - Fix a bug where empty RUN_UPDATEDB_AS="" caused cron fail with unknown arguments if the compat values were empty. * Wed Mar 19 2014 tchvatal@suse.com - Also respect the UPDATEDB_ when not running as root in the cron job. * Mon Mar 17 2014 tchvatal@suse.com - Move the UPDATEDB_ variables parsing to cron service to have it working there as the upstream bash config is not exactly shell interpreted. bnc#861955. - Sadly this way if user runs updatedb by hand it gets not properly populated, but at least the cron works with backcompat way. * Fri Mar 14 2014 tchvatal@suse.com - Include findutils-locate variables in updatedb.conf if user still have them specified. bnc#861955 * This ensures we can still load the variables user can specified in the /etc/sysconfig/locate namely UPDATEDB_PRUNEPATHS and UPDATEDB_PRUNEFS * Fri Mar 14 2014 tchvatal@suse.com - Cleanup with spec-cleaner. * Fri Mar 14 2014 tchvatal@suse.com - Update comments in sysconfig.locate a bit to reflect reality. * Tue Oct 29 2013 tchvatal@suse.com - As discussed run updatedb as nobody and do not use the locate group at all. Wrt bnc#847801. * Mon Sep 9 2013 tchvatal@suse.com - Recommend the language package. * Wed Jun 12 2013 tchvatal@suse.com - Add missing space to description of package. * Mon Jun 3 2013 tchvatal@suse.com - Add COPYING to %%docs macro as reported by cfarrell. * Mon Jun 3 2013 cfarrell@suse.com - license update: GPL-2.0 Multiple instances of (c) Red Hat GPL-2.0 licensing * Thu May 30 2013 tchvatal@suse.com - Fixup provide/obsolete to really work + cleanup spec * Thu May 30 2013 tchvatal@suse.com - More work wrt previous change. Provide/obsolete findutils-locate. * Thu May 30 2013 tchvatal@suse.com - Do not use sgid but require user to be in group locate in order to be able to search. * Sun Dec 2 2012 tchvatal@suse.com - Whitespace / format the spec a bit. * Tue Nov 20 2012 tchvatal@suse.com - Try to shutup the suid error. * Tue Nov 20 2012 tchvatal@suse.com - Run the perm stuff only on new enough suse. * Tue Nov 20 2012 tchvatal@suse.com - Update the verify to adhere specs. * Tue Nov 20 2012 tchvatal@suse.com - Adhere to specs to exit 0 on pre. * Tue Nov 20 2012 tchvatal@suse.com - Add buildroot definition to have it on sle * Tue Nov 20 2012 tchvatal@suse.com - require pwdutils for pre phase * Mon Nov 12 2012 tchvatal@suse.com - silence error about PIE, thanks to darix for suggestions on irc. * Mon Nov 12 2012 tchvatal@suse.com - version bump to latest * Mon Oct 31 2011 prusnak@opensuse.org - spec cleanup * Fri Aug 5 2011 tchvatal@novell.com - Update the docs list * Thu Aug 4 2011 tchvatal@novell.com - Punt useless clean section * Thu Aug 4 2011 tchvatal@novell.com - Initial version 0.24 of mlocate package