From 70d19ae0266b9e87c8cef5eb0b4bf28e50db22aea99b1bfa346fc38daf0eab99 Mon Sep 17 00:00:00 2001 From: Philipp Thomas Date: Thu, 5 Dec 2013 20:00:24 +0000 Subject: [PATCH] - Do not build findutils-locate anymore as mlocate obsoletes it since openSUSE 13.1. - Remove findutils-4.4.2-updatedb.patch as it's not needed anymore. - Remove cron.daily.updatedb and sysconfig.locate as they aren't needed anymore. OBS-URL: https://build.opensuse.org/package/show/Base:System/findutils?expand=0&rev=52 --- cron.daily.updatedb | 63 ------------------------------ findutils-4.4.2-updatedb.patch | 71 ---------------------------------- findutils.changes | 9 +++++ findutils.spec | 44 ++++----------------- sysconfig.locate | 57 --------------------------- 5 files changed, 17 insertions(+), 227 deletions(-) delete mode 100644 cron.daily.updatedb delete mode 100644 findutils-4.4.2-updatedb.patch delete mode 100644 sysconfig.locate diff --git a/cron.daily.updatedb b/cron.daily.updatedb deleted file mode 100644 index 34a0305..0000000 --- a/cron.daily.updatedb +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# -# -# updatedb. This script was split off cron.daily. -# Please add your local changes to cron.daily.local -# since this file will be overwritten, when updating your system. -# -# Copyright (c) 2003 SuSE Linux AG, Nuernberg, Germany. -# -# Please submit bugfixes or comments via http://www.suse.de/feedback/ -# -# Author: Burchard Steinbild , 1996 -# Florian La Roche , 1996 -# -# -# - - -# -# paranoia settings -# -umask 022 - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -export PATH - -# -# get information from /etc/rc.config -# -if [ -f /etc/sysconfig/locate ] ; then - . /etc/sysconfig/locate -fi - -# -# update database for locate -# -if [ -n "$RUN_UPDATEDB" -a "$RUN_UPDATEDB" = "yes" -a \ - -x /usr/bin/updatedb ] ; then - - # avoid error messages from updatedb when using user nobody for find. - cd / - - PARAMS="`test -n "$RUN_UPDATEDB_AS" && \ - fgrep localuser /usr/bin/updatedb > /dev/null && \ - echo --localuser=$RUN_UPDATEDB_AS`" - - PARAMS="$PARAMS `test -n "$UPDATEDB_PRUNEPATHS" && \ - echo --prunepaths=\'$(eval echo $UPDATEDB_PRUNEPATHS)\'`" - - PARAMS="$PARAMS `test -n "$UPDATEDB_NETUSER" && \ - echo --netuser=$UPDATEDB_NETUSER`" - - PARAMS="$PARAMS `test -n "$UPDATEDB_NETPATHS" && \ - echo --netpaths=\'$(eval echo $UPDATEDB_NETPATHS)\'`" - - PARAMS="$PARAMS `test -n "$UPDATEDB_PRUNEFS" && \ - echo --prunefs=\'$(eval echo $UPDATEDB_PRUNEFS)\'`" - - eval nice -n 19 ionice -c 3 /usr/bin/updatedb $PARAMS 2> /dev/null -fi - - -exit 0 diff --git a/findutils-4.4.2-updatedb.patch b/findutils-4.4.2-updatedb.patch deleted file mode 100644 index e328448..0000000 --- a/findutils-4.4.2-updatedb.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- - doc/find.texi | 2 +- - locate/updatedb.1 | 5 ++--- - locate/updatedb.sh | 1 + - 3 files changed, 4 insertions(+), 4 deletions(-) - -Index: doc/find.texi -=================================================================== ---- doc/find.texi.orig -+++ doc/find.texi -@@ -3587,7 +3587,7 @@ Default is none. - @item --prunepaths='@var{path}@dots{}' - Directories to omit from the database, which would otherwise be - included. The environment variable @code{PRUNEPATHS} also sets this --value. Default is @file{/tmp /usr/tmp /var/tmp /afs}. The paths are -+value. Default is @file{/tmp /usr/tmp /var/tmp /afs /var/spool}. The paths are - used as regular expressions (with @code{find ... -regex}, so you need - to specify these paths in the same way that @code{find} will encounter - them. This means for example that the paths must not include trailing -Index: locate/updatedb.1 -=================================================================== ---- locate/updatedb.1.orig -+++ locate/updatedb.1 -@@ -75,8 +75,7 @@ Default is \fInfs NFS proc\fP. - .TP - .B \-\-output=\fIdbfile\fP - The database file to build. --Default is system-dependent. In Debian GNU/Linux, the default --is /var/cache/locate/locatedb. -+Default is /var/lib/locatedb. - .TP - .B \-\-localuser=\fIuser\fP - The user to search non-network directories as, using \fBsu\fP(1). -@@ -85,7 +84,7 @@ You can also use the environment variabl - .TP - .B \-\-netuser=\fIuser\fP - The user to search network directories as, using \fBsu\fP(1). --Default is \fBdaemon\fP. -+Default is \fBnobody\fP. - You can also use the environment variable \fBNETUSER\fP to set this user. - .TP - .B \-\-old\-format -Index: locate/updatedb.sh -=================================================================== ---- locate/updatedb.sh.orig -+++ locate/updatedb.sh -@@ -165,6 +165,7 @@ select_shell() { - /sfs - /tmp - /usr/tmp -+/var/spool - /var/tmp - "} - -@@ -196,7 +197,7 @@ fi - export TMPDIR - - # The user to search network directories as. --: ${NETUSER=daemon} -+: ${NETUSER=nobody} - - # The directory containing the subprograms. - if test -n "$LIBEXECDIR" ; then -@@ -273,6 +274,7 @@ proc - shfs - smbfs - sysfs -+unknown - "} - - if test -n "$PRUNEFS"; then diff --git a/findutils.changes b/findutils.changes index 13bf96a..166f02b 100644 --- a/findutils.changes +++ b/findutils.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Dec 5 20:55:16 CET 2013 - pth@suse.de + +- Do not build findutils-locate anymore as mlocate obsoletes it + since openSUSE 13.1. +- Remove findutils-4.4.2-updatedb.patch as it's not needed anymore. +- Remove cron.daily.updatedb and sysconfig.locate as they aren't + needed anymore. + ------------------------------------------------------------------- Thu Oct 24 11:47:17 CEST 2013 - pth@suse.de diff --git a/findutils.spec b/findutils.spec index c1ab0b1..4b3a735 100644 --- a/findutils.spec +++ b/findutils.spec @@ -24,11 +24,8 @@ Summary: The GNU versions of find utilities (find and xargs) License: GPL-3.0+ Group: Productivity/File utilities Source: http://alpha.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz -Source1: sysconfig.locate -Source2: cron.daily.updatedb # adds a new option -xautofs to find to not descend into directories on autofs file systems Patch0: findutils-4.4.2-xautofs.patch -Patch1: findutils-4.4.2-updatedb.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} > 1100 BuildRequires: libselinux-devel @@ -52,27 +49,10 @@ useful for finding things on your system. %lang_package -%package locate -Summary: Tool for Locating Files (findutils subpackage) -Group: Productivity/File utilities -Provides: findutils:/usr/bin/locate -PreReq: %{fillup_prereq} -Requires: cron -Requires: findutils = %{version} - -%description locate -This package contains the locate program which is part of the GNU -findutils software suite. - -You can find files fast using locate. On installing findutils-locate -an additional daily cron job will be added to the cron system. This -job will update the files database every night or shortly after -switching on the computer. %prep %setup -q %patch0 -%patch1 %build %if 0%{?qemu_user_space_build} @@ -89,9 +69,8 @@ make %{?_smp_mflags} make check %install -%make_install -install -D -m 644 %{SOURCE1} %{buildroot}/var/adm/fillup-templates/sysconfig.locate -install -D -m 755 %{SOURCE2} %{buildroot}/etc/cron.daily/suse-updatedb +make DESTDIR=%{buildroot} install + rm -f %{buildroot}%{_infodir}/find-maint* %find_lang %{name} #UsrMerge @@ -99,8 +78,12 @@ mkdir -p %{buildroot}/bin ln -sf %{_bindir}/find %{buildroot}/bin #UsrMerge -%post locate -%{fillup_only -n locate} +rm %{buildroot}%{_bindir}/locate +rm %{buildroot}%{_bindir}/updatedb +rm -r %{buildroot}%{_libdir}/find +rm %{buildroot}%{_mandir}/man1/locate.1* +rm %{buildroot}%{_mandir}/man1/updatedb.1* +rm %{buildroot}%{_mandir}/man5/locatedb.5* %post %install_info --info-dir=%{_infodir} %{_infodir}/find.info.gz @@ -125,15 +108,4 @@ ln -sf %{_bindir}/find %{buildroot}/bin %files lang -f %{name}.lang %defattr(-,root,root,-) -%files locate -%defattr(-,root,root,-) -/etc/cron.daily/* -%{_bindir}/locate -%{_bindir}/updatedb -%{_libdir}/find -%doc %{_mandir}/man1/locate.1.gz -%doc %{_mandir}/man1/updatedb.1.gz -%doc %{_mandir}/man5/locatedb.5.gz -/var/adm/fillup-templates/* - %changelog diff --git a/sysconfig.locate b/sysconfig.locate deleted file mode 100644 index 3138ee0..0000000 --- a/sysconfig.locate +++ /dev/null @@ -1,57 +0,0 @@ -## Path: Applications/Locate -## Description: Configuration of updatedb -# -# NOTE: These variables only apply when updatedb is run via cron -# -## Type: yesno -## Default: yes -# -# Should updatedb (for locate) be started by cron.daily ("yes" or "no") -# -RUN_UPDATEDB=yes - -## Type: string(nobody,root) -## Default: nobody -# -# updatedb has a parameter "--localuser". -# It runs the "find" command as this user. Some people think this is a -# security hole if set to 'root' (because some directory information can -# be read which is normally protected). Others think it is useful to hold -# all files in the database. -# So if you want full information in locate db, set RUN_UPDATEDB_AS=root. -# If you want security use RUN_UPDATEDB_AS=nobody. -# -RUN_UPDATEDB_AS=nobody - -## Type: string -## Default: "" -# -# uptdatedb normally only scans local harddisks, but can include net paths -# in the database as well. If you specify directories here, they will be -# scanned. -# -UPDATEDB_NETPATHS="" - -## Type: string -## Default: "/mnt /cdrom /tmp /usr/tmp /var/tmp /var/spool /proc /media /sys /.snapshots" -# -# uptdatedb can skip directories for its database. The following parameter -# says which ones. -# -UPDATEDB_PRUNEPATHS="/mnt /cdrom /tmp /usr/tmp /var/tmp /var/spool /proc /media /sys /.snapshots /var/run/media" - -## Type: string("",nobody) -## Default: "" -# -# Search net paths as ? (e.g. nobody) -# -UPDATEDB_NETUSER="" - -## Type: string -## Default: "" -# -# updatedb can skip certain filesystem types completely -# this sets the parameter "--prunefs" for updatedb -# -UPDATEDB_PRUNEFS="" -