add packaging
authorAnas Nashif <anas.nashif@intel.com>
Mon, 5 Nov 2012 02:10:30 +0000 (18:10 -0800)
committerChanho Park <chanho61.park@samsung.com>
Fri, 28 Nov 2014 11:42:48 +0000 (20:42 +0900)
packaging/findutils-4.2.31-no-locate.patch [deleted file]
packaging/findutils-bmc12931-find-ls-stack-overflow.patch [deleted file]
packaging/findutils.spec
packaging/sysconfig.locate [new file with mode: 0644]

diff --git a/packaging/findutils-4.2.31-no-locate.patch b/packaging/findutils-4.2.31-no-locate.patch
deleted file mode 100644 (file)
index fe9a52a..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- findutils-4.2.31/Makefile.am_old   2007-03-02 01:14:25.000000000 +0100
-+++ findutils-4.2.31/Makefile.am       2007-06-12 15:18:53.000000000 +0200
-@@ -3,7 +3,7 @@
- EXTRA_DIST = COPYING ChangeLog TODO install-sh config.h.in stamp-h.in \
-               THANKS config.rpath import-gnulib.sh import-gnulib.config
--SUBDIRS = gnulib lib find xargs locate doc po m4
-+SUBDIRS = gnulib lib find xargs doc po m4
- ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
---- findutils-4.2.31/Makefile.in_old   2007-06-12 15:18:05.000000000 +0200
-+++ findutils-4.2.31/Makefile.in       2007-06-12 15:19:00.000000000 +0200
-@@ -423,7 +423,7 @@
- EXTRA_DIST = COPYING ChangeLog TODO install-sh config.h.in stamp-h.in \
-               THANKS config.rpath import-gnulib.sh import-gnulib.config
--SUBDIRS = gnulib lib find xargs locate doc po m4
-+SUBDIRS = gnulib lib find xargs doc po m4
- ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
- all: config.h
-       $(MAKE) $(AM_MAKEFLAGS) all-recursive
diff --git a/packaging/findutils-bmc12931-find-ls-stack-overflow.patch b/packaging/findutils-bmc12931-find-ls-stack-overflow.patch
deleted file mode 100644 (file)
index b745bb4..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-From 1c8f72f75303cc2a23922704e335c500acf19eb3 Mon Sep 17 00:00:00 2001
-Message-Id: <1c8f72f75303cc2a23922704e335c500acf19eb3.1296053308.git.yan.i.li@intel.com>
-From: Yan Li <yan.i.li@intel.com>
-Date: Wed, 26 Jan 2011 22:47:40 +0800
-Subject: [PATCH] BMC#12931: find -ls stack overflow
-
-
-Signed-off-by: Yan Li <yan.i.li@intel.com>
----
- lib/listfile.c |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/lib/listfile.c b/lib/listfile.c
-index d60f465..f18984a 100644
---- a/lib/listfile.c
-+++ b/lib/listfile.c
-@@ -200,7 +200,7 @@ list_file (char *name,
-          int output_block_size,
-          FILE *stream)
- {
--  char modebuf[11];
-+  char modebuf[12];
-   struct tm const *when_local;
-   char const *user_name;
-   char const *group_name;
--- 
-1.7.2.3
-
index e34118b..619f106 100644 (file)
@@ -1,54 +1,98 @@
 Name:           findutils
-Version:        4.2.31
-Release:        1
-License:        GPL-2.0+
-Summary:        The GNU versions of find utilities (find and xargs)
 Url:            http://www.gnu.org/software/findutils/
-Group:          Applications/File
-Source:         %{name}-%{version}.tar.bz2
-#Source1: ftp://ftp.gnu.org/gnu/findutils/%{name}-%{version}.tar.gz.sig
-Patch1:         findutils-4.2.31-no-locate.patch
-Patch2:         findutils-bmc12931-find-ls-stack-overflow.patch
-
-BuildRequires:  autoconf
-BuildRequires:  automake
-BuildRequires:  gzip
-BuildRequires:  libtool
+Version:        4.5.10
+Release:        0
+Summary:        The GNU versions of find utilities (find and xargs)
+License:        GPL-3.0+
+Group:          Productivity/File utilities
+# retrieved from http://alpha.gnu.org/pub/gnu/findutils/findutils-4.5.10.tar.gz
+Source:         findutils-%{version}.tar.bz2
+Source1:        sysconfig.locate
+# Use /proc/mounts instead of /etc/mtab as autofs entries are only
+# listed in the kernels >= 2.6.32
+Patch0:         findutils-4.5.10-use_proc_mounts.patch
+# adds a new option -xautofs to find to not descend into directories on autofs file systems
+Patch1:         findutils-4.4.2-xautofs.patch
+Patch2:         findutils-4.4.2-updatedb.patch
+Patch3:         findutils-4.5.10-prune_unknown.patch
+Patch4:         findutils-4.5.10-updatedb_ignore_nfsv4.patch
+Patch5:         findutils-stdio.in.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 The findutils package contains programs which will help you locate
 files on your system.  The find utility searches through a hierarchy
 of directories looking for files which match a certain set of criteria
-(such as a filename pattern).  The xargs utility builds and executes
+(such as a file name pattern).  The xargs utility builds and executes
 command lines from standard input arguments (usually lists of file
 names generated by the find command).
 
 You should install findutils because it includes tools that are very
 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
+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
-%patch1 -p1 -b .no-locate
-%patch2 -p1
+%patch0
+%patch1 -p1
+%patch2
+%patch3
+%patch4
+%patch5 -p1
 
 %build
-export CFLAGS="%{optflags} -D_GNU_SOURCE"
-export CXXFLAGS="%{optflags} -D_GNU_SOURCE"
-%configure --without-selinux --disable-nls
-
+%ifarch %arm armv5tel armv7l armv7el armv5el
+# this is a workaround for a qemu-user bug, we hit. A qemu patch is being discussed, but for now ...
+export DEFAULT_ARG_SIZE="(31u * 1024u)"
+%endif
+%configure \
+  --libexecdir=%{_libdir}/find \
+  --localstatedir=/var/lib \
+  --without-included-regex \
+  --without-fts \
+  --enable-d_type-optimisation
 make %{?_smp_mflags}
+
 %check
 make check
 
 %install
-%make_install
-
+make install DESTDIR=$RPM_BUILD_ROOT
+install -D -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/locate
+rm -f $RPM_BUILD_ROOT%{_bindir}/oldfind
+rm -f $RPM_BUILD_ROOT%{_bindir}/ftsfind
+rm -f $RPM_BUILD_ROOT%{_infodir}/find-maint*
+%find_lang %{name}
 
 %docs_package
 
 %files
-%defattr(-,root,root)
+%defattr(-,root,root,-)
 %doc COPYING
 %{_bindir}/find
 %{_bindir}/xargs
 
+%files locate
+%defattr(-,root,root,-)
+%{_bindir}/locate
+%{_bindir}/updatedb
+%{_libdir}/find
+%config(noreplace) %{_sysconfigdir}/sysconfig/locate
+
+%changelog
diff --git a/packaging/sysconfig.locate b/packaging/sysconfig.locate
new file mode 100644 (file)
index 0000000..087f349
--- /dev/null
@@ -0,0 +1,54 @@
+## Path:       Applications/Locate
+## Description:        Configuration of updatedb
+## 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"
+#
+# 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"
+
+## 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=""
+