aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2020-05-19 16:27:10 +0200
committerOliver Smith <osmith@sysmocom.de>2020-05-19 16:27:10 +0200
commit6f9a5008f9085764b0bc0a49743562b45527b85d (patch)
tree53efafa87eb48e7496d47d85d666f9c6d57a606a
parent1f579be648e803075376638aa7e286722f431aed (diff)
build.sh: add fdupes
-rwxr-xr-xrpm-local/build.sh3
-rw-r--r--rpm-local/spec/fdupes/fdupes-makefile.patch13
-rw-r--r--rpm-local/spec/fdupes/fdupes.changes182
-rw-r--r--rpm-local/spec/fdupes/fdupes.spec67
-rw-r--r--rpm-local/spec/fdupes/macros.fdupes21
5 files changed, 286 insertions, 0 deletions
diff --git a/rpm-local/build.sh b/rpm-local/build.sh
index 5ee13a0..bc2c902 100755
--- a/rpm-local/build.sh
+++ b/rpm-local/build.sh
@@ -209,6 +209,9 @@ build_pkg_other "opencore-amr"
build_pkg_other "orcania"
+# fdupes (builddependency of osmo-trx)
+build_pkg_other "fdupes"
+
# Osmocom libraries
build_pkg_osmo "libosmocore"
build_pkg_osmo "libosmo-abis"
diff --git a/rpm-local/spec/fdupes/fdupes-makefile.patch b/rpm-local/spec/fdupes/fdupes-makefile.patch
new file mode 100644
index 0000000..17e5d0f
--- /dev/null
+++ b/rpm-local/spec/fdupes/fdupes-makefile.patch
@@ -0,0 +1,13 @@
+Index: Makefile
+===================================================================
+--- Makefile.orig 2016-08-21 06:54:46.000000000 +0200
++++ Makefile 2016-11-04 13:46:21.037423459 +0100
+@@ -11,7 +11,7 @@
+ # determination of the actual installation directories.
+ # Suggested values are "/usr/local", "/usr", "/pkgs/fdupes-$(VERSION)"
+ #
+-PREFIX = /usr/local
++PREFIX = /usr
+
+ #
+ # When compiling for 32-bit systems, FILEOFFSET_64BIT must be enabled
diff --git a/rpm-local/spec/fdupes/fdupes.changes b/rpm-local/spec/fdupes/fdupes.changes
new file mode 100644
index 0000000..f33c1fd
--- /dev/null
+++ b/rpm-local/spec/fdupes/fdupes.changes
@@ -0,0 +1,182 @@
+-------------------------------------------------------------------
+Thu Apr 16 21:07:45 UTC 2020 - Matej Cepl <mcepl@suse.com>
+
+- Make package building even on platforms, where _rpmmacrodir
+ is not defined.
+
+-------------------------------------------------------------------
+Wed May 8 09:37:54 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>
+
+- Move RPM macros to %_rpmmacrodir.
+
+-------------------------------------------------------------------
+Fri Dec 16 12:40:20 UTC 2016 - psimons@suse.com
+
+- We cannot update from fdupes 1.51 to 1.6.1. That "downgrade"
+ works okay'ish for Tumbleweed because we can replace the old
+ package with the new one, but in SLE this is not possible. We
+ asked upstream to please release a "2.0" version to remedy these
+ issues (https://github.com/adrianlopezroche/fdupes/issues/74),
+ but he does not respond. Therefore, we'll call this version 1.61,
+ ignoring upstreams change in the versioning scheme.
+
+-------------------------------------------------------------------
+Mon Dec 5 13:54:08 UTC 2016 - psimons@suse.com
+
+- Upstream has changed their versioning scheme after version 1.51.
+ Unfortunately, the new version 1.6.x won't be recognized as
+ "newer" by zypper. This commit adds appropriate "provides" and
+ "obsoletes" attributes to the spec file to remedy that issue.
+
+-------------------------------------------------------------------
+Fri Nov 4 14:33:59 UTC 2016 - psimons@suse.com
+
+- Drop 50_bts284274_hardlinkreplace.dpatch. The --linkhard option
+ added by this patch has an implementation bug that can cause data
+ loss. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=677419
+ has more details.
+
+-------------------------------------------------------------------
+Fri Nov 4 13:47:27 UTC 2016 - psimons@suse.com
+
+- Update to version 1.6.1. The following patches have been applied
+ upstream and were dropped:
+ * 0001-restore-pristine-code.patch
+ * 0002-Added-to-escape-minus-signs-in-manpage-lintian-warni.patch
+ * 0003-Fix-a-typo-in-a-manpage-bts353789.patch
+ * 0005-add-summarize-to-manpage-bts481809.patch
+ * 0006-add-nohidden-support-bts511702.patch
+ * 0007-Disambiguate-the-options-recurse-and-recurse-bts5371.patch
+ * 0008-speedup-the-file-compare.patch
+ * 0009-glibc-endianness-check-in-md5.patch
+ * 0010-add-permissions-mode.patch
+ * 0011-add-an-option-to-sort-duplicate-files-by-name.patch
+- 50_bts284274_hardlinkreplace.dpatch had to be refreshed.
+
+-------------------------------------------------------------------
+Tue Aug 4 13:01:47 UTC 2015 - tchvatal@suse.com
+
+- By default relink hardlinks too, should fix bnc#940296
+
+-------------------------------------------------------------------
+Mon Aug 3 19:26:55 UTC 2015 - tchvatal@suse.com
+
+- Update to upstream git repo on github
+- Refresh patches:
+ * fdupes-makefile.patch
+ * 0008-speedup-the-file-compare.patch
+ * 0010-add-permissions-mode.patch
+ * 0011-add-an-option-to-sort-duplicate-files-by-name.patch
+ * 50_bts284274_hardlinkreplace.dpatch
+- Upstreamed patch:
+ * 0004-Large-file-support-for-2GB-files-bts447601.patch
+- Remove whitespace from fdupes.macros file
+- Cleanup with spec-cleaner
+ - Obey rpm-opt-flags
+ - run test phase
+
+-------------------------------------------------------------------
+Sun Dec 21 19:58:41 UTC 2014 - bwiedemann@suse.com
+
+- add -L (--linkhard) option
+ add 50_bts284274_hardlinkreplace.dpatch
+
+-------------------------------------------------------------------
+Tue Apr 29 16:08:34 UTC 2014 - stefan.bruens@rwth-aachen.de
+
+- sort the output of fdupes by filename to make it deterministic
+ for parallel builds
+ * 0011-add-an-option-to-sort-duplicate-files-by-name.patch
+
+-------------------------------------------------------------------
+Tue Oct 16 11:44:08 UTC 2012 - mvyskocil@suse.com
+
+- update to 1.5.0-PR2
+ * new "--summarize" option
+ * new "--recurse:" selective recursion option
+ * new "--noprompt" option for totally automated deletion of
+ duplicate files.
+ * sorts duplicates (old to new) for consistent order when
+ listing or deleteing duplicate files.
+ * tests for early matching of files, which should help speed up
+ the matching process when large files are involved.
+ * warns whenever a file cannot be deleted.
+ * bugfixes (proper file closing, zero-length files, ...)
+- drop the fdupes-sort-output.diff (upstream uses mtime based)
+- rename and rebase fdupes-speedup.patch to 0008-speedup-the-compare.patch
+- rename and rebase fdupes-endianness.patch to
+ 0009-glibc-endianness-check-in-md5.patch
+- add -p/--permissions switch so files with different permissions or uid/gid
+ are not considered as duplicates (bnc#784670)
+ * this mode is a default one for fdupes macro
+ 0010-add-permissions-mode.patch
+- imported several fixes from Debian
+ * 0001-restore-pristine-code.patch - some common code fixes, partly obsoletes
+ speedup patch
+ * manual page fixes
+ 0002-Added-to-escape-minus-signs-in-manpage-lintian-warni.patch
+ 0003-Fix-a-typo-in-a-manpage-bts353789.patch
+ 0005-add-summarize-to-manpage-bts481809.patch
+ 0006-add-nohidden-support-bts511702.patch
+ 0007-Disambiguate-the-options-recurse-and-recurse-bts5371.patch
+ * 0004-Large-file-support-for-2GB-files-bts447601.patch - large file support
+
+-------------------------------------------------------------------
+Sun Mar 25 22:13:12 UTC 2012 - behrisch@users.sf.net
+
+- added "which" requirement for red hat distros
+
+-------------------------------------------------------------------
+Mon Feb 13 10:46:03 UTC 2012 - coolo@suse.com
+
+- patch license to follow spdx.org standard
+
+-------------------------------------------------------------------
+Wed Oct 5 15:14:32 UTC 2011 - uli@suse.com
+
+- cross-build workaround: fake gcc script to work around build
+ system not honoring CC
+
+-------------------------------------------------------------------
+Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de
+
+- Apply packaging guidelines (remove redundant/obsolete
+ tags/sections from specfile, etc.)
+
+-------------------------------------------------------------------
+Mon Feb 15 15:43:34 UTC 2010 - mvyskocil@suse.cz
+
+- fix bnc#406825: speedup fdupes
+ * fdupes-speedup.patch fixes some performance gaps in code
+ * fdupes-endianness.patch speedups the built in md5 on little endian machines
+
+-------------------------------------------------------------------
+Wed Aug 26 12:53:54 CEST 2009 - mls@suse.de
+
+- make patch0 usage consistent
+
+-------------------------------------------------------------------
+Thu Jan 15 17:05:36 CET 2009 - coolo@suse.de
+
+- sort the output of fdupes to make it deterministic
+
+-------------------------------------------------------------------
+Thu Sep 6 18:41:37 CEST 2007 - mls@suse.de
+
+- do not hardlink empty files in %fdupes macro
+
+-------------------------------------------------------------------
+Wed Sep 5 15:44:52 CEST 2007 - nadvornik@suse.cz
+
+- support filenames with spaces in %fdupes macro [#307727]
+
+-------------------------------------------------------------------
+Tue May 15 22:53:03 CEST 2007 - coolo@suse.de
+
+- add an RPM macro to make use of it in spec files
+
+-------------------------------------------------------------------
+Thu Nov 16 13:16:07 CET 2006 - dmueller@suse.de
+
+- Initial package (1.40)
+
diff --git a/rpm-local/spec/fdupes/fdupes.spec b/rpm-local/spec/fdupes/fdupes.spec
new file mode 100644
index 0000000..65238ad
--- /dev/null
+++ b/rpm-local/spec/fdupes/fdupes.spec
@@ -0,0 +1,67 @@
+#
+# spec file for package fdupes
+#
+# Copyright (c) 2016 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/
+#
+
+# Upstream calls this version 1.6.1, but that version number is *lower* than
+# previously released ones, like 1.51, so we mangle the number to keep
+# continuity: https://github.com/adrianlopezroche/fdupes/issues/74.
+%global upstream_version 1.6.1
+
+%{?!_rpmmacrodir:%define _rpmmacrodir /usr/lib/rpm/macros.d}
+
+Name: fdupes
+Version: 1.61
+Release: 0
+Summary: Identifying or deleting duplicate files
+License: MIT
+Group: Productivity/Archiving/Compression
+Url: https://github.com/adrianlopezroche/fdupes
+Source0: https://github.com/adrianlopezroche/fdupes/archive/v%{upstream_version}.tar.gz#/%{name}-%{upstream_version}.tar.gz
+Source1: macros.fdupes
+#PATCH-FIX-SUSE: fix patch according distro's needs
+Patch0: fdupes-makefile.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%description
+FDUPES is a program for identifying or deleting duplicate files
+residing within specified directories.
+
+%prep
+%setup -q -n %{name}-%{upstream_version}
+%patch0
+
+%build
+make %{?_smp_mflags} COMPILER_OPTIONS="%{optflags}"
+
+%install
+install -D -m755 %{name} %{buildroot}%{_bindir}/%{name}
+install -D -m644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
+install -D -m644 %{SOURCE1} %{buildroot}%{_rpmmacrodir}/macros.%{name}
+
+%check
+./%{name} testdir
+./%{name} --omitfirst testdir
+./%{name} --recurse testdir
+./%{name} --size testdir
+
+%files
+%defattr(-, root, root)
+%doc CHANGES
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}.1*
+%{_rpmmacrodir}/macros.%{name}
+
+%changelog
diff --git a/rpm-local/spec/fdupes/macros.fdupes b/rpm-local/spec/fdupes/macros.fdupes
new file mode 100644
index 0000000..a493cf7
--- /dev/null
+++ b/rpm-local/spec/fdupes/macros.fdupes
@@ -0,0 +1,21 @@
+%fdupes(s) \
+ _target=""; \
+ _symlinks=0; \
+ %{-s:_symlinks=1;} \
+ fdupes -q -p -n -H -o name -r %1 | \
+ while read _file; do \
+ if test -z "$_target" ; then \
+ _target="$_file"; \
+ else \
+ if test -z "$_file" ; then \
+ _target=""; \
+ continue ; \
+ fi ; \
+ if test "$_symlinks" = 1; then \
+ ln -sf "${_target#%{buildroot}}" "$_file"; \
+ else \
+ ln -f "$_target" "$_file"; \
+ fi ;\
+ fi ; \
+ done \
+%{nil}