From be9fa94811798131c202de1ed19b028710157536 Mon Sep 17 00:00:00 2001 From: Simon Bellwood Date: Mon, 28 Nov 2005 19:24:20 +0000 Subject: [PATCH 01/48] auto-import fdupes-1.40-3 on branch devel from fdupes-1.40-3.src.rpm --- .cvsignore | 1 + fdupes.spec | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 59 insertions(+) create mode 100644 fdupes.spec diff --git a/.cvsignore b/.cvsignore index e69de29..7590efa 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +fdupes-1.40.tar.gz diff --git a/fdupes.spec b/fdupes.spec new file mode 100644 index 0000000..6db62fc --- /dev/null +++ b/fdupes.spec @@ -0,0 +1,57 @@ +Name: fdupes +Version: 1.40 +Release: 3 +Summary: Identifies and optionally deletes duplicate files + +Group: Applications/File +License: MIT +URL: http://netdial.caribe.net/~adrian2/fdupes.html +Source0: http://netdial.caribe.net/~adrian2/programs/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +#BuildRequires: +#Requires: + +%description +fdupes is a program for identifying or deleting duplicate files. +Such files are found by comparing file sizes and MD5 signatures, followed by a +byte-by-byte comparison. + + +%prep +%setup -q + + +%build +#%%configure +%{__sed} -i -e "s/-Wall/${RPM_OPT_FLAGS}/" Makefile +make %{?_smp_mflags} + + +%install +rm -rf ${RPM_BUILD_ROOT} +mkdir -p ${RPM_BUILD_ROOT}%{_bindir} ${RPM_BUILD_ROOT}%{_mandir}/man1 +install -m 0755 fdupes ${RPM_BUILD_ROOT}%{_bindir}/fdupes +install -m 0644 fdupes.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/fdupes.1 + + +%clean +rm -rf ${RPM_BUILD_ROOT} + + +%files +%defattr(-,root,root,-) +%doc CHANGES CONTRIBUTORS INSTALL README TODO +%doc %{_mandir}/man1/fdupes.1* +%{_bindir}/fdupes + + +%changelog +* Thu Nov 24 2005 Simon Bellwood - 1.40-3 +- Spec file cleanup. + +* Tue Nov 22 2005 Simon Bellwood - 1.40-2 +- Spec file cleanup. + +* Sat Nov 12 2005 Simon Bellwood - 1.40-1 +- Initial build for Fedora Extras. diff --git a/sources b/sources index e69de29..5308ac1 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +11de9ab4466089b6acbb62816b30b189 fdupes-1.40.tar.gz From 8b9f15df596a8c2dd63e126c036af8e6ff762999 Mon Sep 17 00:00:00 2001 From: Simon Bellwood Date: Tue, 6 Dec 2005 22:48:43 +0000 Subject: [PATCH 02/48] Sync with FC-4 --- fdupes.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 6db62fc..f88ea07 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,6 +1,6 @@ Name: fdupes Version: 1.40 -Release: 3 +Release: 5%{?dist} Summary: Identifies and optionally deletes duplicate files Group: Applications/File @@ -47,6 +47,12 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Wed Nov 30 2005 Simon Bellwood - 1.40-5 +- Initial attempt to import into Extras. + +* Wed Nov 30 2005 Simon Bellwood - 1.40-4 +- Updated spec file to include dist in Release: field. + * Thu Nov 24 2005 Simon Bellwood - 1.40-3 - Spec file cleanup. From 403a1e033a3deff4d9ad7f841791ebcecef6b914 Mon Sep 17 00:00:00 2001 From: Simon Bellwood Date: Sat, 18 Feb 2006 10:28:50 +0000 Subject: [PATCH 03/48] Rebuilt for FC5T3/Rawhide. --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index f88ea07..77e893b 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,6 +1,6 @@ Name: fdupes Version: 1.40 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Identifies and optionally deletes duplicate files Group: Applications/File @@ -47,6 +47,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Sat Feb 18 2006 Simon Bellwood - 1.40-6 +- Rebuilt for FC5T3/Rawhide. + * Wed Nov 30 2005 Simon Bellwood - 1.40-5 - Initial attempt to import into Extras. From 27f1955188a3fd486d9a4ac78bf2baf271c066db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 27 Aug 2006 20:23:09 +0000 Subject: [PATCH 04/48] http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild --- needs.rebuild | 1 + 1 file changed, 1 insertion(+) create mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild new file mode 100644 index 0000000..815fd29 --- /dev/null +++ b/needs.rebuild @@ -0,0 +1 @@ +http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From 54dc419f0149b8449c592f4cb786f600248ddb93 Mon Sep 17 00:00:00 2001 From: Simon Bellwood Date: Sat, 2 Sep 2006 15:30:08 +0000 Subject: [PATCH 05/48] Rebuilt for FC6T3/Rawhide. --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 77e893b..9fd6a75 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,6 +1,6 @@ Name: fdupes Version: 1.40 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Identifies and optionally deletes duplicate files Group: Applications/File @@ -47,6 +47,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Sat Sep 02 2006 Simon Bellwood - 1.40-7 +- Rebuilt for FC6T3/Rawhide. + * Sat Feb 18 2006 Simon Bellwood - 1.40-6 - Rebuilt for FC5T3/Rawhide. From fd3d2de8257a373c4cb1c83085f33b4c1eac73b5 Mon Sep 17 00:00:00 2001 From: Simon Bellwood Date: Sat, 2 Sep 2006 15:41:00 +0000 Subject: [PATCH 06/48] Bump again for rebuild. --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 9fd6a75..2986f69 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,6 +1,6 @@ Name: fdupes Version: 1.40 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Identifies and optionally deletes duplicate files Group: Applications/File @@ -47,6 +47,9 @@ rm -rf ${RPM_BUILD_ROOT} %changelog +* Sat Sep 02 2006 Simon Bellwood - 1.40-8 +- Bump again for rebuild. + * Sat Sep 02 2006 Simon Bellwood - 1.40-7 - Rebuilt for FC6T3/Rawhide. From d5f2fc447b7aa33b79fa1442419bd36a53038a53 Mon Sep 17 00:00:00 2001 From: Simon Bellwood Date: Thu, 7 Sep 2006 19:09:00 +0000 Subject: [PATCH 07/48] Better remove the "needs.rebuild" file :) --- needs.rebuild | 1 - 1 file changed, 1 deletion(-) delete mode 100644 needs.rebuild diff --git a/needs.rebuild b/needs.rebuild deleted file mode 100644 index 815fd29..0000000 --- a/needs.rebuild +++ /dev/null @@ -1 +0,0 @@ -http://fedoraproject.org/wiki/Extras/Schedule/FC6MassRebuild From 75563b06554b2961177cfeda0f11112e6f3677ad Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 28 Nov 2007 20:07:29 +0000 Subject: [PATCH 08/48] Initial import into devel. Modified Files: devel/fdupes.spec Added Files: devel/fdupes-1.40-destdir.patch devel/fdupes-1.40-string.patch --- fdupes-1.40-destdir.patch | 20 +++++++++ fdupes-1.40-string.patch | 19 +++++++++ fdupes.spec | 90 +++++++++++++++++---------------------- 3 files changed, 79 insertions(+), 50 deletions(-) create mode 100644 fdupes-1.40-destdir.patch create mode 100644 fdupes-1.40-string.patch diff --git a/fdupes-1.40-destdir.patch b/fdupes-1.40-destdir.patch new file mode 100644 index 0000000..f177bbd --- /dev/null +++ b/fdupes-1.40-destdir.patch @@ -0,0 +1,20 @@ +diff -urNp fdupes-1.40.orig/Makefile fdupes-1.40/Makefile +--- fdupes-1.40.orig/Makefile 2001-03-15 08:19:11.000000000 +0530 ++++ fdupes-1.40/Makefile 2007-11-25 20:34:21.000000000 +0530 +@@ -1,3 +1,5 @@ ++DESTDIR = ++ + # + # INSTALLDIR indicates directory where program is to be installed. + # Suggested values are "/usr/local/bin" or "/usr/bin". +@@ -38,8 +40,8 @@ fdupes: fdupes.c md5/md5.c + gcc fdupes.c md5/md5.c -Wall -o fdupes -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) + + install: fdupes +- cp fdupes $(INSTALLDIR) +- cp fdupes.1 $(MANPAGEDIR)/man1 ++ cp fdupes $(DESTDIR)$(INSTALLDIR) ++ cp fdupes.1 $(DESTDIR)$(MANPAGEDIR)/man1 + + tarball: clean + tar --directory=.. -c -z -v -f ../fdupes-$(VERSION).tar.gz fdupes-$(VERSION) diff --git a/fdupes-1.40-string.patch b/fdupes-1.40-string.patch new file mode 100644 index 0000000..54762eb --- /dev/null +++ b/fdupes-1.40-string.patch @@ -0,0 +1,19 @@ +diff -urNp fdupes-1.40.orig/md5/md5.c fdupes-1.40/md5/md5.c +--- fdupes-1.40.orig/md5/md5.c 1999-11-05 06:34:36.000000000 +0530 ++++ fdupes-1.40/md5/md5.c 2007-11-25 20:56:36.000000000 +0530 +@@ -39,6 +39,7 @@ + */ + + #include "md5.h" ++#include + + #ifdef TEST + /* +@@ -46,7 +47,6 @@ + * The test program should print out the same values as given in section + * A.5 of RFC 1321, reproduced below. + */ +-#include + main() + { + static const char *const test[7] = { diff --git a/fdupes.spec b/fdupes.spec index 2986f69..5aa1b15 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,72 +1,62 @@ -Name: fdupes -Version: 1.40 -Release: 8%{?dist} -Summary: Identifies and optionally deletes duplicate files +Summary: Finds duplicate files in a given set of directories +Name: fdupes +Version: 1.40 +Release: 9%{?dist} +License: MIT +Group: Applications/File +URL: http://netdial.caribe.net/~adrian2/fdupes.html +Source0: http://netdial.caribe.net/~adrian2/programs/%{name}-%{version}.tar.gz -Group: Applications/File -License: MIT -URL: http://netdial.caribe.net/~adrian2/fdupes.html -Source0: http://netdial.caribe.net/~adrian2/programs/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Patch0: %{name}-%{version}-destdir.patch +Patch1: %{name}-%{version}-string.patch -#BuildRequires: -#Requires: +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %description -fdupes is a program for identifying or deleting duplicate files. -Such files are found by comparing file sizes and MD5 signatures, followed by a -byte-by-byte comparison. - +FDUPES is a program for identifying duplicate files residing within specified +directories. %prep %setup -q +%patch0 -p1 +%patch1 -p1 +sed --expression "s/-Wall/$RPM_OPT_FLAGS/" Makefile > Makefile.tmp +touch --reference Makefile Makefile.tmp +mv Makefile.tmp Makefile %build -#%%configure -%{__sed} -i -e "s/-Wall/${RPM_OPT_FLAGS}/" Makefile make %{?_smp_mflags} +%check +./%{name} testdir +./%{name} --omitfirst testdir +./%{name} --recurse testdir +./%{name} --size testdir +# ... etc.. %install -rm -rf ${RPM_BUILD_ROOT} -mkdir -p ${RPM_BUILD_ROOT}%{_bindir} ${RPM_BUILD_ROOT}%{_mandir}/man1 -install -m 0755 fdupes ${RPM_BUILD_ROOT}%{_bindir}/fdupes -install -m 0644 fdupes.1 ${RPM_BUILD_ROOT}%{_mandir}/man1/fdupes.1 +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 +make install INSTALLDIR=%{_bindir} MANPAGEDIR=%{_mandir} \ + DESTDIR=$RPM_BUILD_ROOT %clean -rm -rf ${RPM_BUILD_ROOT} - +rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%doc CHANGES CONTRIBUTORS INSTALL README TODO -%doc %{_mandir}/man1/fdupes.1* -%{_bindir}/fdupes - +%doc CHANGES +%doc CONTRIBUTORS +%doc README +%doc TODO +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.1.gz %changelog -* Sat Sep 02 2006 Simon Bellwood - 1.40-8 -- Bump again for rebuild. - -* Sat Sep 02 2006 Simon Bellwood - 1.40-7 -- Rebuilt for FC6T3/Rawhide. - -* Sat Feb 18 2006 Simon Bellwood - 1.40-6 -- Rebuilt for FC5T3/Rawhide. - -* Wed Nov 30 2005 Simon Bellwood - 1.40-5 -- Initial attempt to import into Extras. - -* Wed Nov 30 2005 Simon Bellwood - 1.40-4 -- Updated spec file to include dist in Release: field. - -* Thu Nov 24 2005 Simon Bellwood - 1.40-3 -- Spec file cleanup. - -* Tue Nov 22 2005 Simon Bellwood - 1.40-2 -- Spec file cleanup. - -* Sat Nov 12 2005 Simon Bellwood - 1.40-1 -- Initial build for Fedora Extras. +* Sun Nov 25 2007 Debarshi Ray - 1.40-9 +- Initial build. Imported SPEC from Rawhide. +- Fixed Makefile to use DESTDIR correctly. +- Fixed sources to include string.h. From abe8f77886e6ca8398448f060dcbbeb1360b6745 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 28 Nov 2007 20:31:07 +0000 Subject: [PATCH 09/48] Updated to 1.40-10 in devel. Modified Files: fdupes.spec --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 5aa1b15..f11f76a 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Summary: Finds duplicate files in a given set of directories Name: fdupes Version: 1.40 -Release: 9%{?dist} +Release: 10%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html @@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/%{name}.1.gz %changelog +* Thu Nov 29 2007 Debarshi Ray - 1.40-10 +- Release bumped to overcome spurious build. + * Sun Nov 25 2007 Debarshi Ray - 1.40-9 - Initial build. Imported SPEC from Rawhide. - Fixed Makefile to use DESTDIR correctly. From ea620a2d852494c875fd4d1d1d60866ef916d80b Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 27 Dec 2007 17:37:40 +0000 Subject: [PATCH 10/48] Update to 1.40-11 in devel. Modified Files: .cvsignore Makefile fdupes-1.40-string.patch fdupes.spec sources Added Files: fdupes-1.40-makefile.patch Removed Files: fdupes-1.40-destdir.patch --- fdupes-1.40-destdir.patch => fdupes-1.40-makefile.patch | 6 +++--- fdupes.spec | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) rename fdupes-1.40-destdir.patch => fdupes-1.40-makefile.patch (80%) diff --git a/fdupes-1.40-destdir.patch b/fdupes-1.40-makefile.patch similarity index 80% rename from fdupes-1.40-destdir.patch rename to fdupes-1.40-makefile.patch index f177bbd..af7370e 100644 --- a/fdupes-1.40-destdir.patch +++ b/fdupes-1.40-makefile.patch @@ -1,6 +1,6 @@ diff -urNp fdupes-1.40.orig/Makefile fdupes-1.40/Makefile --- fdupes-1.40.orig/Makefile 2001-03-15 08:19:11.000000000 +0530 -+++ fdupes-1.40/Makefile 2007-11-25 20:34:21.000000000 +0530 ++++ fdupes-1.40/Makefile 2007-12-27 22:49:29.000000000 +0530 @@ -1,3 +1,5 @@ +DESTDIR = + @@ -13,8 +13,8 @@ diff -urNp fdupes-1.40.orig/Makefile fdupes-1.40/Makefile install: fdupes - cp fdupes $(INSTALLDIR) - cp fdupes.1 $(MANPAGEDIR)/man1 -+ cp fdupes $(DESTDIR)$(INSTALLDIR) -+ cp fdupes.1 $(DESTDIR)$(MANPAGEDIR)/man1 ++ cp -p fdupes $(DESTDIR)$(INSTALLDIR) ++ cp -p fdupes.1 $(DESTDIR)$(MANPAGEDIR)/man1 tarball: clean tar --directory=.. -c -z -v -f ../fdupes-$(VERSION).tar.gz fdupes-$(VERSION) diff --git a/fdupes.spec b/fdupes.spec index f11f76a..c1632e6 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,13 +1,13 @@ Summary: Finds duplicate files in a given set of directories Name: fdupes Version: 1.40 -Release: 10%{?dist} +Release: 11%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html Source0: http://netdial.caribe.net/~adrian2/programs/%{name}-%{version}.tar.gz -Patch0: %{name}-%{version}-destdir.patch +Patch0: %{name}-%{version}-makefile.patch Patch1: %{name}-%{version}-string.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/%{name}.1.gz %changelog +* Thu Dec 27 2007 Debarshi Ray - 1.40-11 +- Fixed Makefile to preserve timestamps using 'cp -p'. + * Thu Nov 29 2007 Debarshi Ray - 1.40-10 - Release bumped to overcome spurious build. From bdfbaa1f64507f3f447db36257614251fe3fa997 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Thu, 24 Jan 2008 18:45:24 +0000 Subject: [PATCH 11/48] Fixed Spec in devel. Modified Files: fdupes.spec Added Files: fdupes-1.40-destdir.patch Removed Files: fdupes-1.40-makefile.patch --- fdupes-1.40-makefile.patch => fdupes-1.40-destdir.patch | 0 fdupes.spec | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename fdupes-1.40-makefile.patch => fdupes-1.40-destdir.patch (100%) diff --git a/fdupes-1.40-makefile.patch b/fdupes-1.40-destdir.patch similarity index 100% rename from fdupes-1.40-makefile.patch rename to fdupes-1.40-destdir.patch diff --git a/fdupes.spec b/fdupes.spec index c1632e6..a1b5b2d 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -7,7 +7,7 @@ Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html Source0: http://netdial.caribe.net/~adrian2/programs/%{name}-%{version}.tar.gz -Patch0: %{name}-%{version}-makefile.patch +Patch0: %{name}-%{version}-destdir.patch Patch1: %{name}-%{version}-string.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) From 21cf9e788bf977bdce727c65510bfb85b07b1e0d Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 19 Feb 2008 21:41:01 +0000 Subject: [PATCH 12/48] - Autorebuild for GCC 4.3 --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index a1b5b2d..97f679a 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Summary: Finds duplicate files in a given set of directories Name: fdupes Version: 1.40 -Release: 11%{?dist} +Release: 12%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html @@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/%{name}.1.gz %changelog +* Tue Feb 19 2008 Fedora Release Engineering - 1.40-12 +- Autorebuild for GCC 4.3 + * Thu Dec 27 2007 Debarshi Ray - 1.40-11 - Fixed Makefile to preserve timestamps using 'cp -p'. From 58a5af4d3819f114cfe77e1a822669df9df91d74 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Sat, 21 Feb 2009 21:16:10 +0000 Subject: [PATCH 13/48] - Version bump to 1.50 PR2. Added --noprompt, --recurse and --summarize options Now sorts duplicates (old to new) for consistent order when listing or deleting duplicate files. Now tests for early matching of files, which should help speed up the matching process when large files are involved. Added warning whenever a file cannot be deleted. Fixed bug where some files would not be closed after failure. Fixed bug where confirmmatch() function wouldn't always deal properly with zero-length files. Fixed bug where progress indicator would not be cleared when no files were found. - Inclusion of string.h now added by upstream. - Added patch to fix file comparisons from Debian. (Debian BTS #213385) - Added patch to enable large file support on 32-bit systems from Debian. (Debian BTS #447601) - Added patch to fix typo in the online manual page from Debian. (Debian BTS #353789) --- .cvsignore | 2 +- fdupes-1.40-destdir.patch | 20 ------------ fdupes-1.40-string.patch | 19 ----------- fdupes-1.50-compare-file.patch | 58 ++++++++++++++++++++++++++++++++++ fdupes-1.50-destdir.patch | 29 +++++++++++++++++ fdupes-1.50-lfs.patch | 33 +++++++++++++++++++ fdupes-1.50-typo.patch | 12 +++++++ fdupes.spec | 55 ++++++++++++++++++++++---------- sources | 2 +- 9 files changed, 172 insertions(+), 58 deletions(-) delete mode 100644 fdupes-1.40-destdir.patch delete mode 100644 fdupes-1.40-string.patch create mode 100644 fdupes-1.50-compare-file.patch create mode 100644 fdupes-1.50-destdir.patch create mode 100644 fdupes-1.50-lfs.patch create mode 100644 fdupes-1.50-typo.patch diff --git a/.cvsignore b/.cvsignore index 7590efa..f326f44 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -fdupes-1.40.tar.gz +fdupes-1.50-PR2.tar.gz diff --git a/fdupes-1.40-destdir.patch b/fdupes-1.40-destdir.patch deleted file mode 100644 index af7370e..0000000 --- a/fdupes-1.40-destdir.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -urNp fdupes-1.40.orig/Makefile fdupes-1.40/Makefile ---- fdupes-1.40.orig/Makefile 2001-03-15 08:19:11.000000000 +0530 -+++ fdupes-1.40/Makefile 2007-12-27 22:49:29.000000000 +0530 -@@ -1,3 +1,5 @@ -+DESTDIR = -+ - # - # INSTALLDIR indicates directory where program is to be installed. - # Suggested values are "/usr/local/bin" or "/usr/bin". -@@ -38,8 +40,8 @@ fdupes: fdupes.c md5/md5.c - gcc fdupes.c md5/md5.c -Wall -o fdupes -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) - - install: fdupes -- cp fdupes $(INSTALLDIR) -- cp fdupes.1 $(MANPAGEDIR)/man1 -+ cp -p fdupes $(DESTDIR)$(INSTALLDIR) -+ cp -p fdupes.1 $(DESTDIR)$(MANPAGEDIR)/man1 - - tarball: clean - tar --directory=.. -c -z -v -f ../fdupes-$(VERSION).tar.gz fdupes-$(VERSION) diff --git a/fdupes-1.40-string.patch b/fdupes-1.40-string.patch deleted file mode 100644 index 54762eb..0000000 --- a/fdupes-1.40-string.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -urNp fdupes-1.40.orig/md5/md5.c fdupes-1.40/md5/md5.c ---- fdupes-1.40.orig/md5/md5.c 1999-11-05 06:34:36.000000000 +0530 -+++ fdupes-1.40/md5/md5.c 2007-11-25 20:56:36.000000000 +0530 -@@ -39,6 +39,7 @@ - */ - - #include "md5.h" -+#include - - #ifdef TEST - /* -@@ -46,7 +47,6 @@ - * The test program should print out the same values as given in section - * A.5 of RFC 1321, reproduced below. - */ --#include - main() - { - static const char *const test[7] = { diff --git a/fdupes-1.50-compare-file.patch b/fdupes-1.50-compare-file.patch new file mode 100644 index 0000000..fa9e2a3 --- /dev/null +++ b/fdupes-1.50-compare-file.patch @@ -0,0 +1,58 @@ +diff -urNp fdupes-1.50-PR2.orig/fdupes.c fdupes-1.50-PR2/fdupes.c +--- fdupes-1.50-PR2.orig/fdupes.c 2009-01-31 20:11:49.577968848 +0530 ++++ fdupes-1.50-PR2/fdupes.c 2009-01-31 22:01:11.872219443 +0530 +@@ -492,7 +492,10 @@ file_t **checkmatch(filetree_t **root, f + else { + if (checktree->file->crcpartial == NULL) { + crcsignature = getcrcpartialsignature(checktree->file->d_name); +- if (crcsignature == NULL) return NULL; ++ if (crcsignature == NULL) { ++ errormsg ("cannot read file %s\n", checktree->file->d_name); ++ return NULL; ++ } + + checktree->file->crcpartial = (char*) malloc(strlen(crcsignature)+1); + if (checktree->file->crcpartial == NULL) { +@@ -504,7 +507,10 @@ file_t **checkmatch(filetree_t **root, f + + if (file->crcpartial == NULL) { + crcsignature = getcrcpartialsignature(file->d_name); +- if (crcsignature == NULL) return NULL; ++ if (crcsignature == NULL) { ++ errormsg ("cannot read file %s\n", file->d_name); ++ return NULL; ++ } + + file->crcpartial = (char*) malloc(strlen(crcsignature)+1); + if (file->crcpartial == NULL) { +@@ -577,8 +583,8 @@ file_t **checkmatch(filetree_t **root, f + + int confirmmatch(FILE *file1, FILE *file2) + { +- unsigned char c1 = 0; +- unsigned char c2 = 0; ++ unsigned char c1[CHUNK_SIZE]; ++ unsigned char c2[CHUNK_SIZE]; + size_t r1; + size_t r2; + +@@ -586,14 +592,13 @@ int confirmmatch(FILE *file1, FILE *file + fseek(file2, 0, SEEK_SET); + + do { +- r1 = fread(&c1, sizeof(c1), 1, file1); +- r2 = fread(&c2, sizeof(c2), 1, file2); ++ r1 = fread(c1, 1, sizeof(c1), file1); ++ r2 = fread(c2, 1, sizeof(c2), file2); + +- if (c1 != c2) return 0; /* file contents are different */ +- } while (r1 && r2); ++ if (r1 != r2) return 0; /* file lengths are different */ ++ if (memcmp (c1, c2, r1)) return 0; /* file contents are different */ ++ } while (r2); + +- if (r1 != r2) return 0; /* file lengths are different */ +- + return 1; + } + diff --git a/fdupes-1.50-destdir.patch b/fdupes-1.50-destdir.patch new file mode 100644 index 0000000..960afcd --- /dev/null +++ b/fdupes-1.50-destdir.patch @@ -0,0 +1,29 @@ +diff -urNp fdupes-1.50-PR2.orig/Makefile fdupes-1.50-PR2/Makefile +--- fdupes-1.50-PR2.orig/Makefile 2009-01-31 20:11:49.577968848 +0530 ++++ fdupes-1.50-PR2/Makefile 2009-01-31 21:17:01.207220400 +0530 +@@ -40,6 +40,8 @@ include Makefile.inc/VERSION + # + PROGRAM_NAME=fdupes + ++DESTDIR = ++ + # + # BIN_DIR indicates directory where program is to be installed. + # Suggested value is "$(PREFIX)/bin" +@@ -97,12 +99,12 @@ fdupes: $(OBJECT_FILES) + $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) + + installdirs: +- test -d $(BIN_DIR) || -$(MKDIR) $(BIN_DIR) +- test -d $(MAN_DIR) || -$(MKDIR) $(MAN_DIR) ++ test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR) ++ test -d $(DESTDIR)$(MAN_DIR) || $(MKDIR) $(DESTDIR)$(MAN_DIR) + + install: fdupes installdirs +- $(INSTALL_PROGRAM) fdupes $(BIN_DIR)/$(PROGRAM_NAME) +- $(INSTALL_DATA) fdupes.1 $(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT) ++ $(INSTALL_PROGRAM) fdupes $(DESTDIR)$(BIN_DIR)/$(PROGRAM_NAME) ++ $(INSTALL_DATA) fdupes.1 $(DESTDIR)$(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT) + + clean: + $(RM) $(OBJECT_FILES) diff --git a/fdupes-1.50-lfs.patch b/fdupes-1.50-lfs.patch new file mode 100644 index 0000000..d3b83f3 --- /dev/null +++ b/fdupes-1.50-lfs.patch @@ -0,0 +1,33 @@ +diff -urNp fdupes-1.50-PR2.orig/fdupes.c fdupes-1.50-PR2/fdupes.c +--- fdupes-1.50-PR2.orig/fdupes.c 2009-01-31 20:11:49.577968848 +0530 ++++ fdupes-1.50-PR2/fdupes.c 2009-01-31 20:29:17.103220311 +0530 +@@ -643,7 +643,7 @@ void printmatches(file_t *files) + while (files != NULL) { + if (files->hasdupes) { + if (!ISFLAG(flags, F_OMITFIRST)) { +- if (ISFLAG(flags, F_SHOWSIZE)) printf("%ld byte%seach:\n", files->size, ++ if (ISFLAG(flags, F_SHOWSIZE)) printf("%lld byte%seach:\n", files->size, + (files->size != 1) ? "s " : " "); + if (ISFLAG(flags, F_DSAMELINE)) escapefilename("\\ ", &files->d_name); + printf("%s%c", files->d_name, ISFLAG(flags, F_DSAMELINE)?' ':'\n'); +@@ -796,7 +796,7 @@ void deletefiles(file_t *files, int prom + do { + printf("Set %d of %d, preserve files [1 - %d, all]", + curgroup, groups, counter); +- if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%ld byte%seach)", files->size, ++ if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%lld byte%seach)", files->size, + (files->size != 1) ? "s " : " "); + printf(": "); + fflush(stdout); +diff -urNp fdupes-1.50-PR2.orig/Makefile fdupes-1.50-PR2/Makefile +--- fdupes-1.50-PR2.orig/Makefile 2009-01-31 20:11:49.577968848 +0530 ++++ fdupes-1.50-PR2/Makefile 2009-01-31 20:25:59.639218322 +0530 +@@ -74,7 +74,7 @@ MKDIR = mkdir -p + CC = gcc + COMPILER_OPTIONS = -Wall -O -g + +-CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG) ++CFLAGS= $(COMPILER_OPTIONS) -I. -D_FILE_OFFSET_BITS=64 -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG) + + INSTALL_PROGRAM = $(INSTALL) -c -m 0755 + INSTALL_DATA = $(INSTALL) -c -m 0644 diff --git a/fdupes-1.50-typo.patch b/fdupes-1.50-typo.patch new file mode 100644 index 0000000..1615a15 --- /dev/null +++ b/fdupes-1.50-typo.patch @@ -0,0 +1,12 @@ +diff -urNp fdupes-1.50-PR2.orig/fdupes.1 fdupes-1.50-PR2/fdupes.1 +--- fdupes-1.50-PR2.orig/fdupes.1 2009-01-31 20:11:49.581967819 +0530 ++++ fdupes-1.50-PR2/fdupes.1 2009-01-31 20:32:46.383969471 +0530 +@@ -84,7 +84,7 @@ If fdupes returns with an error message + .B fdupes: error invoking md5sum + it means the program has been compiled to use an external + program to calculate MD5 signatures (otherwise, fdupes uses +-interal routines for this purpose), and an error has occurred ++internal routines for this purpose), and an error has occurred + while attempting to execute it. If this is the case, the + specified program should be properly installed prior + to running fdupes. diff --git a/fdupes.spec b/fdupes.spec index 97f679a..bcf6b56 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,14 +1,19 @@ Summary: Finds duplicate files in a given set of directories Name: fdupes -Version: 1.40 -Release: 12%{?dist} +Version: 1.50 +Release: 0.1.PR2%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html -Source0: http://netdial.caribe.net/~adrian2/programs/%{name}-%{version}.tar.gz +Source0: http://netdial.caribe.net/~adrian2/programs/fdupes/beta/%{name}-%{version}-PR2.tar.gz Patch0: %{name}-%{version}-destdir.patch -Patch1: %{name}-%{version}-string.patch +# http://bugs.debian.org/213385 +Patch1: %{name}-%{version}-compare-file.patch +# http://bugs.debian.org/447601 +Patch2: %{name}-%{version}-lfs.patch +# http://bugs.debian.org/353789 +Patch3: %{name}-%{version}-typo.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) @@ -17,16 +22,14 @@ FDUPES is a program for identifying duplicate files residing within specified directories. %prep -%setup -q +%setup -q -n %{name}-%{version}-PR2 %patch0 -p1 %patch1 -p1 - -sed --expression "s/-Wall/$RPM_OPT_FLAGS/" Makefile > Makefile.tmp -touch --reference Makefile Makefile.tmp -mv Makefile.tmp Makefile +%patch2 -p1 +%patch3 -p1 %build -make %{?_smp_mflags} +make %{?_smp_mflags} COMPILER_OPTIONS="$RPM_OPT_FLAGS" %check ./%{name} testdir @@ -37,11 +40,9 @@ make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_bindir} -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -make install INSTALLDIR=%{_bindir} MANPAGEDIR=%{_mandir} \ - DESTDIR=$RPM_BUILD_ROOT +make install INSTALL="%{__install} -p" BIN_DIR=%{_bindir} \ + MAN_BASE_DIR=%{_mandir} DESTDIR=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT @@ -52,12 +53,32 @@ rm -rf $RPM_BUILD_ROOT %doc CONTRIBUTORS %doc README %doc TODO +%doc %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} -%{_mandir}/man1/%{name}.1.gz %changelog -* Tue Feb 19 2008 Fedora Release Engineering - 1.40-12 -- Autorebuild for GCC 4.3 +* Sun Feb 01 2009 Debarshi Ray - 1.50-0.1.PR2 +- Version bump to 1.50 PR2. + * Added --noprompt, --recurse and --summarize options + * Now sorts duplicates (old to new) for consistent order when listing or + deleting duplicate files. + * Now tests for early matching of files, which should help speed up the + matching process when large files are involved. + * Added warning whenever a file cannot be deleted. + * Fixed bug where some files would not be closed after failure. + * Fixed bug where confirmmatch() function wouldn't always deal properly with + zero-length files. + * Fixed bug where progress indicator would not be cleared when no files were + found. +- Inclusion of string.h now added by upstream. +- Added patch to fix file comparisons from Debian. (Debian BTS #213385) +- Added patch to enable large file support on 32-bit systems from Debian. + (Debian BTS #447601) +- Added patch to fix typo in the online manual page from Debian. (Debian BTS + #353789) + +* Tue Feb 19 2008 Release Engineering - 1.40-12 +- Autorebuild for gcc-4.3. * Thu Dec 27 2007 Debarshi Ray - 1.40-11 - Fixed Makefile to preserve timestamps using 'cp -p'. diff --git a/sources b/sources index 5308ac1..16c7e05 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -11de9ab4466089b6acbb62816b30b189 fdupes-1.40.tar.gz +a4f0de2d9a79efce3d712d6520e58c7f fdupes-1.50-PR2.tar.gz From 69c38facf33773363b884fa29f5886f9682837eb Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 24 Jul 2009 22:34:32 +0000 Subject: [PATCH 14/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index bcf6b56..90e239d 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Summary: Finds duplicate files in a given set of directories Name: fdupes Version: 1.50 -Release: 0.1.PR2%{?dist} +Release: 0.2.PR2%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html @@ -57,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/%{name} %changelog +* Fri Jul 24 2009 Fedora Release Engineering - 1.50-0.2.PR2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Sun Feb 01 2009 Debarshi Ray - 1.50-0.1.PR2 - Version bump to 1.50 PR2. * Added --noprompt, --recurse and --summarize options From 6ea8fb03fc9da8b22ffd630363dd0c87d1832b60 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:16:22 +0000 Subject: [PATCH 15/48] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index df05e98..42d3c29 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ NAME := fdupes SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From 0d735505ae1fd03d1506e9777f5d2ff310facdcc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 28 Jul 2010 14:15:00 +0000 Subject: [PATCH 16/48] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 42d3c29..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: fdupes -# $Id$ -NAME := fdupes -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 00147500db3d55f30c94ca20372020a771afc76a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 13:27:21 -0600 Subject: [PATCH 17/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 90e239d..b8d2e88 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Summary: Finds duplicate files in a given set of directories Name: fdupes Version: 1.50 -Release: 0.2.PR2%{?dist} +Release: 0.3.PR2%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html @@ -57,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/%{name} %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 1.50-0.3.PR2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Fri Jul 24 2009 Fedora Release Engineering - 1.50-0.2.PR2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 6ad5e37839090d12d839c520e994646e786738fa Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 12 Jan 2012 20:15:09 -0600 Subject: [PATCH 18/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index b8d2e88..8dfcef9 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Summary: Finds duplicate files in a given set of directories Name: fdupes Version: 1.50 -Release: 0.3.PR2%{?dist} +Release: 0.4.PR2%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html @@ -57,6 +57,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/%{name} %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 1.50-0.4.PR2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Tue Feb 08 2011 Fedora Release Engineering - 1.50-0.3.PR2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From a8b6c2fefe516feb048c10612ecd94d0c9ab3876 Mon Sep 17 00:00:00 2001 From: "Richard M. Shaw" Date: Tue, 15 May 2012 16:20:48 -0500 Subject: [PATCH 19/48] Add RPM macro. --- fdupes.spec | 64 +++++++++++++++++++++++++++------------------------ macros.fdupes | 21 +++++++++++++++++ 2 files changed, 55 insertions(+), 30 deletions(-) create mode 100644 macros.fdupes diff --git a/fdupes.spec b/fdupes.spec index 8dfcef9..3ff13b3 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,62 +1,66 @@ -Summary: Finds duplicate files in a given set of directories -Name: fdupes -Version: 1.50 -Release: 0.4.PR2%{?dist} -License: MIT -Group: Applications/File -URL: http://netdial.caribe.net/~adrian2/fdupes.html -Source0: http://netdial.caribe.net/~adrian2/programs/fdupes/beta/%{name}-%{version}-PR2.tar.gz - -Patch0: %{name}-%{version}-destdir.patch +Name: fdupes +Summary: Finds duplicate files in a given set of directories +Version: 1.50 +Release: 0.5.PR2%{?dist} +License: MIT +Group: Applications/File +URL: http://netdial.caribe.net/~adrian2/fdupes.html +Source0: http://netdial.caribe.net/~adrian2/programs/fdupes/beta/%{name}-%{version}-PR2.tar.gz +Source1: macros.fdupes + +Patch0: %{name}-%{version}-destdir.patch # http://bugs.debian.org/213385 -Patch1: %{name}-%{version}-compare-file.patch +Patch1: %{name}-%{version}-compare-file.patch # http://bugs.debian.org/447601 -Patch2: %{name}-%{version}-lfs.patch +Patch2: %{name}-%{version}-lfs.patch # http://bugs.debian.org/353789 -Patch3: %{name}-%{version}-typo.patch +Patch3: %{name}-%{version}-typo.patch -BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %description FDUPES is a program for identifying duplicate files residing within specified directories. + %prep %setup -q -n %{name}-%{version}-PR2 -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%patch0 -p1 -b .destdir +%patch1 -p1 -b .cmp +%patch2 -p1 -b .lfs +%patch3 -p1 -b .typo + %build -make %{?_smp_mflags} COMPILER_OPTIONS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} COMPILER_OPTIONS="%{optflags}" + %check ./%{name} testdir ./%{name} --omitfirst testdir ./%{name} --recurse testdir ./%{name} --size testdir -# ... etc.. + %install -rm -rf $RPM_BUILD_ROOT +make install INSTALL="%{__install} -p" \ + BIN_DIR=%{_bindir} \ + MAN_BASE_DIR=%{_mandir} \ + DESTDIR=%{buildroot} -make install INSTALL="%{__install} -p" BIN_DIR=%{_bindir} \ - MAN_BASE_DIR=%{_mandir} DESTDIR=$RPM_BUILD_ROOT +mkdir -p %{buildroot}%{_sysconfdir}/rpm +install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/ -%clean -rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root,-) -%doc CHANGES -%doc CONTRIBUTORS -%doc README -%doc TODO +%doc CHANGES CONTRIBUTORS README TODO %doc %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} +%{_sysconfdir}/rpm/macros.fdupes %changelog +* Tue May 15 2012 Richard Shaw - 1.50-0.5.PR2 +- Add RPM macro. + * Fri Jan 13 2012 Fedora Release Engineering - 1.50-0.4.PR2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/macros.fdupes b/macros.fdupes new file mode 100644 index 0000000..a847ac8 --- /dev/null +++ b/macros.fdupes @@ -0,0 +1,21 @@ +%fdupes(s) \ + _target=""; \ + _symlinks=0; \ + %{-s:_symlinks=1;} \ + fdupes -q -n -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} From 828c7b4204691481728f09c483e4e6db53f3d6a9 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 18 Jul 2012 20:43:06 -0500 Subject: [PATCH 20/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 3ff13b3..414cf4c 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Name: fdupes Summary: Finds duplicate files in a given set of directories Version: 1.50 -Release: 0.5.PR2%{?dist} +Release: 0.6.PR2%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html @@ -58,6 +58,9 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/ %{_sysconfdir}/rpm/macros.fdupes %changelog +* Thu Jul 19 2012 Fedora Release Engineering - 1.50-0.6.PR2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Tue May 15 2012 Richard Shaw - 1.50-0.5.PR2 - Add RPM macro. From 2bf0c8407b1ed693e773dc7ba991bca312e56e7f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 13 Feb 2013 15:27:49 -0600 Subject: [PATCH 21/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 414cf4c..bc3cca2 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Name: fdupes Summary: Finds duplicate files in a given set of directories Version: 1.50 -Release: 0.6.PR2%{?dist} +Release: 0.7.PR2%{?dist} License: MIT Group: Applications/File URL: http://netdial.caribe.net/~adrian2/fdupes.html @@ -58,6 +58,9 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/ %{_sysconfdir}/rpm/macros.fdupes %changelog +* Wed Feb 13 2013 Fedora Release Engineering - 1.50-0.7.PR2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Thu Jul 19 2012 Fedora Release Engineering - 1.50-0.6.PR2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 6328e658134a586b843faabfb4a8aabfc15eea46 Mon Sep 17 00:00:00 2001 From: "Richard M. Shaw" Date: Tue, 16 Jul 2013 13:24:00 -0500 Subject: [PATCH 22/48] Update to latest upstream release. Fixes security bugs BZ#865591 & 865592. --- .gitignore | 1 + fdupes-1.50-compare-file.patch | 58 ------------------- fdupes-1.50-destdir.patch | 29 ---------- fdupes-1.50-lfs.patch | 33 ----------- fdupes-1.51-check-permissions.patch | 90 +++++++++++++++++++++++++++++ fdupes-1.51-destdir.patch | 29 ++++++++++ fdupes.spec | 38 ++++++------ macros.fdupes | 2 +- sources | 2 +- 9 files changed, 142 insertions(+), 140 deletions(-) delete mode 100644 fdupes-1.50-compare-file.patch delete mode 100644 fdupes-1.50-destdir.patch delete mode 100644 fdupes-1.50-lfs.patch create mode 100644 fdupes-1.51-check-permissions.patch create mode 100644 fdupes-1.51-destdir.patch diff --git a/.gitignore b/.gitignore index f326f44..2df5027 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ fdupes-1.50-PR2.tar.gz +/fdupes-1.51.tar.gz diff --git a/fdupes-1.50-compare-file.patch b/fdupes-1.50-compare-file.patch deleted file mode 100644 index fa9e2a3..0000000 --- a/fdupes-1.50-compare-file.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -urNp fdupes-1.50-PR2.orig/fdupes.c fdupes-1.50-PR2/fdupes.c ---- fdupes-1.50-PR2.orig/fdupes.c 2009-01-31 20:11:49.577968848 +0530 -+++ fdupes-1.50-PR2/fdupes.c 2009-01-31 22:01:11.872219443 +0530 -@@ -492,7 +492,10 @@ file_t **checkmatch(filetree_t **root, f - else { - if (checktree->file->crcpartial == NULL) { - crcsignature = getcrcpartialsignature(checktree->file->d_name); -- if (crcsignature == NULL) return NULL; -+ if (crcsignature == NULL) { -+ errormsg ("cannot read file %s\n", checktree->file->d_name); -+ return NULL; -+ } - - checktree->file->crcpartial = (char*) malloc(strlen(crcsignature)+1); - if (checktree->file->crcpartial == NULL) { -@@ -504,7 +507,10 @@ file_t **checkmatch(filetree_t **root, f - - if (file->crcpartial == NULL) { - crcsignature = getcrcpartialsignature(file->d_name); -- if (crcsignature == NULL) return NULL; -+ if (crcsignature == NULL) { -+ errormsg ("cannot read file %s\n", file->d_name); -+ return NULL; -+ } - - file->crcpartial = (char*) malloc(strlen(crcsignature)+1); - if (file->crcpartial == NULL) { -@@ -577,8 +583,8 @@ file_t **checkmatch(filetree_t **root, f - - int confirmmatch(FILE *file1, FILE *file2) - { -- unsigned char c1 = 0; -- unsigned char c2 = 0; -+ unsigned char c1[CHUNK_SIZE]; -+ unsigned char c2[CHUNK_SIZE]; - size_t r1; - size_t r2; - -@@ -586,14 +592,13 @@ int confirmmatch(FILE *file1, FILE *file - fseek(file2, 0, SEEK_SET); - - do { -- r1 = fread(&c1, sizeof(c1), 1, file1); -- r2 = fread(&c2, sizeof(c2), 1, file2); -+ r1 = fread(c1, 1, sizeof(c1), file1); -+ r2 = fread(c2, 1, sizeof(c2), file2); - -- if (c1 != c2) return 0; /* file contents are different */ -- } while (r1 && r2); -+ if (r1 != r2) return 0; /* file lengths are different */ -+ if (memcmp (c1, c2, r1)) return 0; /* file contents are different */ -+ } while (r2); - -- if (r1 != r2) return 0; /* file lengths are different */ -- - return 1; - } - diff --git a/fdupes-1.50-destdir.patch b/fdupes-1.50-destdir.patch deleted file mode 100644 index 960afcd..0000000 --- a/fdupes-1.50-destdir.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -urNp fdupes-1.50-PR2.orig/Makefile fdupes-1.50-PR2/Makefile ---- fdupes-1.50-PR2.orig/Makefile 2009-01-31 20:11:49.577968848 +0530 -+++ fdupes-1.50-PR2/Makefile 2009-01-31 21:17:01.207220400 +0530 -@@ -40,6 +40,8 @@ include Makefile.inc/VERSION - # - PROGRAM_NAME=fdupes - -+DESTDIR = -+ - # - # BIN_DIR indicates directory where program is to be installed. - # Suggested value is "$(PREFIX)/bin" -@@ -97,12 +99,12 @@ fdupes: $(OBJECT_FILES) - $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) - - installdirs: -- test -d $(BIN_DIR) || -$(MKDIR) $(BIN_DIR) -- test -d $(MAN_DIR) || -$(MKDIR) $(MAN_DIR) -+ test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR) -+ test -d $(DESTDIR)$(MAN_DIR) || $(MKDIR) $(DESTDIR)$(MAN_DIR) - - install: fdupes installdirs -- $(INSTALL_PROGRAM) fdupes $(BIN_DIR)/$(PROGRAM_NAME) -- $(INSTALL_DATA) fdupes.1 $(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT) -+ $(INSTALL_PROGRAM) fdupes $(DESTDIR)$(BIN_DIR)/$(PROGRAM_NAME) -+ $(INSTALL_DATA) fdupes.1 $(DESTDIR)$(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT) - - clean: - $(RM) $(OBJECT_FILES) diff --git a/fdupes-1.50-lfs.patch b/fdupes-1.50-lfs.patch deleted file mode 100644 index d3b83f3..0000000 --- a/fdupes-1.50-lfs.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff -urNp fdupes-1.50-PR2.orig/fdupes.c fdupes-1.50-PR2/fdupes.c ---- fdupes-1.50-PR2.orig/fdupes.c 2009-01-31 20:11:49.577968848 +0530 -+++ fdupes-1.50-PR2/fdupes.c 2009-01-31 20:29:17.103220311 +0530 -@@ -643,7 +643,7 @@ void printmatches(file_t *files) - while (files != NULL) { - if (files->hasdupes) { - if (!ISFLAG(flags, F_OMITFIRST)) { -- if (ISFLAG(flags, F_SHOWSIZE)) printf("%ld byte%seach:\n", files->size, -+ if (ISFLAG(flags, F_SHOWSIZE)) printf("%lld byte%seach:\n", files->size, - (files->size != 1) ? "s " : " "); - if (ISFLAG(flags, F_DSAMELINE)) escapefilename("\\ ", &files->d_name); - printf("%s%c", files->d_name, ISFLAG(flags, F_DSAMELINE)?' ':'\n'); -@@ -796,7 +796,7 @@ void deletefiles(file_t *files, int prom - do { - printf("Set %d of %d, preserve files [1 - %d, all]", - curgroup, groups, counter); -- if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%ld byte%seach)", files->size, -+ if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%lld byte%seach)", files->size, - (files->size != 1) ? "s " : " "); - printf(": "); - fflush(stdout); -diff -urNp fdupes-1.50-PR2.orig/Makefile fdupes-1.50-PR2/Makefile ---- fdupes-1.50-PR2.orig/Makefile 2009-01-31 20:11:49.577968848 +0530 -+++ fdupes-1.50-PR2/Makefile 2009-01-31 20:25:59.639218322 +0530 -@@ -74,7 +74,7 @@ MKDIR = mkdir -p - CC = gcc - COMPILER_OPTIONS = -Wall -O -g - --CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG) -+CFLAGS= $(COMPILER_OPTIONS) -I. -D_FILE_OFFSET_BITS=64 -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG) - - INSTALL_PROGRAM = $(INSTALL) -c -m 0755 - INSTALL_DATA = $(INSTALL) -c -m 0644 diff --git a/fdupes-1.51-check-permissions.patch b/fdupes-1.51-check-permissions.patch new file mode 100644 index 0000000..6977773 --- /dev/null +++ b/fdupes-1.51-check-permissions.patch @@ -0,0 +1,90 @@ +diff -Naur fdupes-1.51.orig/fdupes.1 fdupes-1.51/fdupes.1 +--- fdupes-1.51.orig/fdupes.1 2013-04-20 12:00:09.000000000 -0500 ++++ fdupes-1.51/fdupes.1 2013-07-16 13:01:16.264491871 -0500 +@@ -56,6 +56,9 @@ + when used together with --delete, preserve the first file in each + set of duplicates and delete the others without prompting the user + .TP ++.B -p --permissions ++don't consider files with different owner/group or permission bits as duplicates ++.TP + .B -v --version + display fdupes version + .TP +diff -Naur fdupes-1.51.orig/fdupes.c fdupes-1.51/fdupes.c +--- fdupes-1.51.orig/fdupes.c 2013-04-20 13:02:18.000000000 -0500 ++++ fdupes-1.51/fdupes.c 2013-07-16 13:03:04.529344704 -0500 +@@ -51,6 +51,7 @@ + #define F_RECURSEAFTER 0x0200 + #define F_NOPROMPT 0x0400 + #define F_SUMMARIZEMATCHES 0x0800 ++#define F_PERMISSIONS 0x1000 + + char *program_name; + +@@ -467,6 +468,19 @@ + return 1; + } + ++int same_permissions(char* name1, char* name2) ++{ ++ struct stat s1, s2; ++ ++ if (stat(name1, &s1) != 0) return -1; ++ if (stat(name2, &s2) != 0) return -1; ++ ++ return (s1.st_mode == s2.st_mode && ++ s1.st_uid == s2.st_uid && ++ s1.st_gid == s2.st_gid); ++} ++ ++ + file_t **checkmatch(filetree_t **root, filetree_t *checktree, file_t *file) + { + int cmpresult; +@@ -489,6 +503,10 @@ + cmpresult = -1; + else + if (fsize > checktree->file->size) cmpresult = 1; ++ else ++ if (ISFLAG(flags, F_PERMISSIONS) && ++ !same_permissions(file->d_name, checktree->file->d_name)) ++ cmpresult = -1; + else { + if (checktree->file->crcpartial == NULL) { + crcsignature = getcrcpartialsignature(checktree->file->d_name); +@@ -958,6 +976,7 @@ + printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n"); + printf(" \teach set of duplicates and delete the rest without\n"); + printf(" \tprompting the user\n"); ++ printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n"); + printf(" -v --version \tdisplay fdupes version\n"); + printf(" -h --help \tdisplay this help message\n\n"); + #ifdef OMIT_GETOPT_LONG +@@ -1000,6 +1019,7 @@ + { "noprompt", 0, 0, 'N' }, + { "summarize", 0, 0, 'm'}, + { "summary", 0, 0, 'm' }, ++ { "permissions", 0, 0, 'p' }, + { 0, 0, 0, 0 } + }; + #define GETOPT getopt_long +@@ -1011,7 +1031,7 @@ + + oldargv = cloneargs(argc, argv); + +- while ((opt = GETOPT(argc, argv, "frRq1Ss::HlndvhNm" ++ while ((opt = GETOPT(argc, argv, "frRq1Ss::HlndvhNmp" + #ifndef OMIT_GETOPT_LONG + , long_options, NULL + #endif +@@ -1059,6 +1079,9 @@ + case 'm': + SETFLAG(flags, F_SUMMARIZEMATCHES); + break; ++ case 'p': ++ SETFLAG(flags, F_PERMISSIONS); ++ break; + + default: + fprintf(stderr, "Try `fdupes --help' for more information.\n"); diff --git a/fdupes-1.51-destdir.patch b/fdupes-1.51-destdir.patch new file mode 100644 index 0000000..e2fd8b2 --- /dev/null +++ b/fdupes-1.51-destdir.patch @@ -0,0 +1,29 @@ +diff -Naur fdupes-1.51.orig/Makefile fdupes-1.51/Makefile +--- fdupes-1.51.orig/Makefile 2013-04-20 12:51:58.000000000 -0500 ++++ fdupes-1.51/Makefile 2013-07-16 09:22:30.169197997 -0500 +@@ -46,6 +46,8 @@ + # + PROGRAM_NAME=fdupes + ++DESTDIR = ++ + # + # BIN_DIR indicates directory where program is to be installed. + # Suggested value is "$(PREFIX)/bin" +@@ -103,12 +105,12 @@ + $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) + + installdirs: +- test -d $(BIN_DIR) || $(MKDIR) $(BIN_DIR) +- test -d $(MAN_DIR) || $(MKDIR) $(MAN_DIR) ++ test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR) ++ test -d $(DESTDIR)$(MAN_DIR) || $(MKDIR) $(DESTDIR)$(MAN_DIR) + + install: fdupes installdirs +- $(INSTALL_PROGRAM) fdupes $(BIN_DIR)/$(PROGRAM_NAME) +- $(INSTALL_DATA) fdupes.1 $(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT) ++ $(INSTALL_PROGRAM) fdupes $(DESTDIR)$(BIN_DIR)/$(PROGRAM_NAME) ++ $(INSTALL_DATA) fdupes.1 $(DESTDIR)$(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT) + + clean: + $(RM) $(OBJECT_FILES) diff --git a/fdupes.spec b/fdupes.spec index bc3cca2..7100065 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,20 +1,18 @@ -Name: fdupes -Summary: Finds duplicate files in a given set of directories -Version: 1.50 -Release: 0.7.PR2%{?dist} -License: MIT -Group: Applications/File -URL: http://netdial.caribe.net/~adrian2/fdupes.html -Source0: http://netdial.caribe.net/~adrian2/programs/fdupes/beta/%{name}-%{version}-PR2.tar.gz +Name: fdupes +Summary: Finds duplicate files in a given set of directories +Version: 1.51 +Release: 1%{?dist} +License: MIT +Group: Applications/File +URL: https://code.google.com/p/fdupes/ +Source0: https://fdupes.googlecode.com/files/%{name}-%{version}.tar.gz Source1: macros.fdupes -Patch0: %{name}-%{version}-destdir.patch -# http://bugs.debian.org/213385 -Patch1: %{name}-%{version}-compare-file.patch -# http://bugs.debian.org/447601 -Patch2: %{name}-%{version}-lfs.patch +Patch0: fdupes-1.51-destdir.patch # http://bugs.debian.org/353789 -Patch3: %{name}-%{version}-typo.patch +Patch1: fdupes-1.50-typo.patch +# Fix CVE +Patch2: fdupes-1.51-check-permissions.patch %description @@ -23,11 +21,10 @@ directories. %prep -%setup -q -n %{name}-%{version}-PR2 +%setup -q -n %{name}-%{version} +%patch2 -p1 -b .cve %patch0 -p1 -b .destdir -%patch1 -p1 -b .cmp -%patch2 -p1 -b .lfs -%patch3 -p1 -b .typo +%patch1 -p1 -b .typo %build @@ -57,7 +54,12 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/ %{_bindir}/%{name} %{_sysconfdir}/rpm/macros.fdupes + %changelog +* Tue Jul 16 2013 Richard Shaw - 1.51-1 +- Update to latest upstream release. +- Fixes security bugs BZ#865591 & 865592. + * Wed Feb 13 2013 Fedora Release Engineering - 1.50-0.7.PR2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild diff --git a/macros.fdupes b/macros.fdupes index a847ac8..d01d65c 100644 --- a/macros.fdupes +++ b/macros.fdupes @@ -2,7 +2,7 @@ _target=""; \ _symlinks=0; \ %{-s:_symlinks=1;} \ - fdupes -q -n -r %1 | \ + fdupes -q -n -r -p %1 | \ while read _file; do \ if test -z "$_target" ; then \ _target="$_file"; \ diff --git a/sources b/sources index 16c7e05..d6651ba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a4f0de2d9a79efce3d712d6520e58c7f fdupes-1.50-PR2.tar.gz +47d0410c90c9e51e450933ba35a32b62 fdupes-1.51.tar.gz From dffcedeb283e49de9a33b363cb6495d84f8aae21 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 3 Aug 2013 05:47:30 -0500 Subject: [PATCH 23/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 7100065..c7084f9 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Name: fdupes Summary: Finds duplicate files in a given set of directories Version: 1.51 -Release: 1%{?dist} +Release: 2%{?dist} License: MIT Group: Applications/File URL: https://code.google.com/p/fdupes/ @@ -56,6 +56,9 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/ %changelog +* Sat Aug 03 2013 Fedora Release Engineering - 1.51-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Tue Jul 16 2013 Richard Shaw - 1.51-1 - Update to latest upstream release. - Fixes security bugs BZ#865591 & 865592. From 02d841df93f6684449e8eaacff9d2836442bb758 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 20 Jan 2014 00:01:08 +0200 Subject: [PATCH 24/48] Move macros to %{_rpmconfigdir}/macros.d. https://bugzilla.redhat.com/show_bug.cgi?id=1055257 --- fdupes.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fdupes.spec b/fdupes.spec index c7084f9..d71a7a6 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,7 @@ Name: fdupes Summary: Finds duplicate files in a given set of directories Version: 1.51 -Release: 2%{?dist} +Release: 3%{?dist} License: MIT Group: Applications/File URL: https://code.google.com/p/fdupes/ @@ -44,18 +44,21 @@ make install INSTALL="%{__install} -p" \ MAN_BASE_DIR=%{_mandir} \ DESTDIR=%{buildroot} -mkdir -p %{buildroot}%{_sysconfdir}/rpm -install -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/ +mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d +install -m 0644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/ %files %doc CHANGES CONTRIBUTORS README TODO %doc %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} -%{_sysconfdir}/rpm/macros.fdupes +%{_rpmconfigdir}/macros.d/macros.fdupes %changelog +* Sun Jan 19 2014 Ville Skyttä - 1.51-3 +- Move macros to %%{_rpmconfigdir}/macros.d. + * Sat Aug 03 2013 Fedora Release Engineering - 1.51-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From cdec22faccf6f31f3f066ec766f20e33c08f5385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Mar 2014 13:30:28 +0100 Subject: [PATCH 25/48] Place rpm-macros into proper location using %%global macrosdir --- fdupes.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fdupes.spec b/fdupes.spec index d71a7a6..310fa13 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,7 +1,10 @@ +# Place rpm-macros into proper location. +%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) + Name: fdupes Summary: Finds duplicate files in a given set of directories Version: 1.51 -Release: 3%{?dist} +Release: 4%{?dist} License: MIT Group: Applications/File URL: https://code.google.com/p/fdupes/ @@ -45,17 +48,20 @@ make install INSTALL="%{__install} -p" \ DESTDIR=%{buildroot} mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d -install -m 0644 %{SOURCE1} %{buildroot}%{_rpmconfigdir}/macros.d/ +install -m 0644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.d/ %files %doc CHANGES CONTRIBUTORS README TODO %doc %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} -%{_rpmconfigdir}/macros.d/macros.fdupes +%{macrosdir}/macros.d/macros.fdupes %changelog +* Tue Mar 18 2014 Björn Esser - 1.51-4 +- Place rpm-macros into proper location using %%global macrosdir + * Sun Jan 19 2014 Ville Skyttä - 1.51-3 - Move macros to %%{_rpmconfigdir}/macros.d. From 2f1af9cb7c87f1242106d98e950e17d8639993dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Mar 2014 13:34:16 +0100 Subject: [PATCH 26/48] Apply proper LDFLAGS --- fdupes.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 310fa13..b2c7e19 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -16,6 +16,8 @@ Patch0: fdupes-1.51-destdir.patch Patch1: fdupes-1.50-typo.patch # Fix CVE Patch2: fdupes-1.51-check-permissions.patch +# Apply proper LDFLAGS +Patch3: fdupes-1.51-obey-ldflags.patch %description @@ -28,10 +30,13 @@ directories. %patch2 -p1 -b .cve %patch0 -p1 -b .destdir %patch1 -p1 -b .typo +%patch3 -p1 -b .ldflags %build -make %{?_smp_mflags} COMPILER_OPTIONS="%{optflags}" +make %{?_smp_mflags} \ + COMPILER_OPTIONS="%{?optflags}" \ + LDFLAGS="%{?__global_ldflags}" %check @@ -61,6 +66,7 @@ install -m 0644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.d/ %changelog * Tue Mar 18 2014 Björn Esser - 1.51-4 - Place rpm-macros into proper location using %%global macrosdir +- Apply proper LDFLAGS * Sun Jan 19 2014 Ville Skyttä - 1.51-3 - Move macros to %%{_rpmconfigdir}/macros.d. From bffb657822e92e5323176dccd8b32fce3b3544b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Mar 2014 13:43:50 +0100 Subject: [PATCH 27/48] fix wrong macrosdir --- fdupes.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index b2c7e19..b172a5c 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -52,7 +52,7 @@ make install INSTALL="%{__install} -p" \ MAN_BASE_DIR=%{_mandir} \ DESTDIR=%{buildroot} -mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d +mkdir -p %{buildroot}%{macrosdir}/macros.d install -m 0644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.d/ From e56dea6043948e22489aeb2b2ab6d8cd9c8f8592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Mar 2014 13:48:21 +0100 Subject: [PATCH 28/48] fix offset in patch --- fdupes-1.50-typo.patch => fdupes-1.51-typo.patch | 2 +- fdupes.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename fdupes-1.50-typo.patch => fdupes-1.51-typo.patch (91%) diff --git a/fdupes-1.50-typo.patch b/fdupes-1.51-typo.patch similarity index 91% rename from fdupes-1.50-typo.patch rename to fdupes-1.51-typo.patch index 1615a15..d115cfa 100644 --- a/fdupes-1.50-typo.patch +++ b/fdupes-1.51-typo.patch @@ -1,7 +1,7 @@ diff -urNp fdupes-1.50-PR2.orig/fdupes.1 fdupes-1.50-PR2/fdupes.1 --- fdupes-1.50-PR2.orig/fdupes.1 2009-01-31 20:11:49.581967819 +0530 +++ fdupes-1.50-PR2/fdupes.1 2009-01-31 20:32:46.383969471 +0530 -@@ -84,7 +84,7 @@ If fdupes returns with an error message +@@ -87,7 +87,7 @@ If fdupes returns with an error message .B fdupes: error invoking md5sum it means the program has been compiled to use an external program to calculate MD5 signatures (otherwise, fdupes uses diff --git a/fdupes.spec b/fdupes.spec index b172a5c..9a6a5b3 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -13,7 +13,7 @@ Source1: macros.fdupes Patch0: fdupes-1.51-destdir.patch # http://bugs.debian.org/353789 -Patch1: fdupes-1.50-typo.patch +Patch1: fdupes-1.51-typo.patch # Fix CVE Patch2: fdupes-1.51-check-permissions.patch # Apply proper LDFLAGS From 2fefedf7da42a6e73894e6d361e65b054ce80001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Mar 2014 13:51:11 +0100 Subject: [PATCH 29/48] added Patch3: fdupes-1.51-obey-ldflags.patch to repo --- fdupes-1.51-obey-ldflags.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fdupes-1.51-obey-ldflags.patch diff --git a/fdupes-1.51-obey-ldflags.patch b/fdupes-1.51-obey-ldflags.patch new file mode 100644 index 0000000..dfb741a --- /dev/null +++ b/fdupes-1.51-obey-ldflags.patch @@ -0,0 +1,13 @@ +Index: fdupes-1.51/Makefile +=================================================================== +--- fdupes-1.51.orig/Makefile ++++ fdupes-1.51/Makefile +@@ -102,7 +102,7 @@ OBJECT_FILES = fdupes.o md5/md5.o $(ADDI + all: fdupes + + fdupes: $(OBJECT_FILES) +- $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o fdupes $(OBJECT_FILES) + + installdirs: + test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR) From 0cc2c54dd07b4523ff921e403f9224fce073564f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Mar 2014 13:53:29 +0100 Subject: [PATCH 30/48] updated %%changelog --- fdupes.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/fdupes.spec b/fdupes.spec index 9a6a5b3..c72a358 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -67,6 +67,7 @@ install -m 0644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.d/ * Tue Mar 18 2014 Björn Esser - 1.51-4 - Place rpm-macros into proper location using %%global macrosdir - Apply proper LDFLAGS +- Fix offset in Patch1 and renamed it to match current version * Sun Jan 19 2014 Ville Skyttä - 1.51-3 - Move macros to %%{_rpmconfigdir}/macros.d. From f4dd072b5037fb03637bf682012b26abcbe63945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Mar 2014 14:13:13 +0100 Subject: [PATCH 31/48] Add needed bits for el5 Fix `mixed use of spaces-and tabs` Minor cleanup and improved readability --- fdupes.spec | 54 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/fdupes.spec b/fdupes.spec index c72a358..bd19cef 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,24 +1,26 @@ # Place rpm-macros into proper location. %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) -Name: fdupes -Summary: Finds duplicate files in a given set of directories -Version: 1.51 -Release: 4%{?dist} -License: MIT -Group: Applications/File -URL: https://code.google.com/p/fdupes/ -Source0: https://fdupes.googlecode.com/files/%{name}-%{version}.tar.gz -Source1: macros.fdupes - -Patch0: fdupes-1.51-destdir.patch +Name: fdupes +Version: 1.51 +Release: 5%{?dist} +Summary: Finds duplicate files in a given set of directories +%{?el5:Group: Applications/File} + +License: MIT +URL: https://code.google.com/p/fdupes/ +Source0: https://fdupes.googlecode.com/files/%{name}-%{version}.tar.gz +Source1: macros.fdupes + +Patch0: fdupes-1.51-destdir.patch # http://bugs.debian.org/353789 -Patch1: fdupes-1.51-typo.patch +Patch1: fdupes-1.51-typo.patch # Fix CVE -Patch2: fdupes-1.51-check-permissions.patch +Patch2: fdupes-1.51-check-permissions.patch # Apply proper LDFLAGS -Patch3: fdupes-1.51-obey-ldflags.patch +Patch3: fdupes-1.51-obey-ldflags.patch +%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} %description FDUPES is a program for identifying duplicate files residing within specified @@ -34,9 +36,9 @@ directories. %build -make %{?_smp_mflags} \ - COMPILER_OPTIONS="%{?optflags}" \ - LDFLAGS="%{?__global_ldflags}" +make %{?_smp_mflags} \ + COMPILER_OPTIONS="%{?optflags}" \ + LDFLAGS="%{?__global_ldflags}" %check @@ -47,15 +49,20 @@ make %{?_smp_mflags} \ %install -make install INSTALL="%{__install} -p" \ - BIN_DIR=%{_bindir} \ - MAN_BASE_DIR=%{_mandir} \ - DESTDIR=%{buildroot} +%{?el5:rm -rf %{buildroot}} +make install INSTALL="%{__install} -p" \ + BIN_DIR=%{_bindir} \ + MAN_BASE_DIR=%{_mandir} \ + DESTDIR=%{buildroot} mkdir -p %{buildroot}%{macrosdir}/macros.d install -m 0644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.d/ +%clean +%{?el5:rm -rf %{buildroot}} + + %files %doc CHANGES CONTRIBUTORS README TODO %doc %{_mandir}/man1/%{name}.1* @@ -64,6 +71,11 @@ install -m 0644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.d/ %changelog +* Tue Mar 18 2014 Björn Esser - 1.51-5 +- Add needed bits for el5 +- Fix `mixed use of spaces-and tabs` +- Minor cleanup and improved readability + * Tue Mar 18 2014 Björn Esser - 1.51-4 - Place rpm-macros into proper location using %%global macrosdir - Apply proper LDFLAGS From 394b4c4e332fc6a06f6fda6e5d17fc6d0c23f02f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Tue, 18 Mar 2014 14:14:50 +0100 Subject: [PATCH 32/48] small clean-up --- fdupes.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index bd19cef..d87edb8 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -28,7 +28,7 @@ directories. %prep -%setup -q -n %{name}-%{version} +%setup -q %patch2 -p1 -b .cve %patch0 -p1 -b .destdir %patch1 -p1 -b .typo From 57fdb45d92bc3dde36c97292bd2ce80179286bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Fri, 18 Apr 2014 12:06:28 +0200 Subject: [PATCH 33/48] remove duplicated `macros.d`-dir (#1088566) --- fdupes.spec | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fdupes.spec b/fdupes.spec index d87edb8..c622d31 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -3,7 +3,7 @@ Name: fdupes Version: 1.51 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Finds duplicate files in a given set of directories %{?el5:Group: Applications/File} @@ -36,7 +36,7 @@ directories. %build -make %{?_smp_mflags} \ +make %{?_smp_mflags} \ COMPILER_OPTIONS="%{?optflags}" \ LDFLAGS="%{?__global_ldflags}" @@ -55,8 +55,8 @@ make install INSTALL="%{__install} -p" \ MAN_BASE_DIR=%{_mandir} \ DESTDIR=%{buildroot} -mkdir -p %{buildroot}%{macrosdir}/macros.d -install -m 0644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.d/ +mkdir -p %{buildroot}%{macrosdir} +install -pm 0644 %{SOURCE1} %{buildroot}%{macrosdir} %clean @@ -67,10 +67,13 @@ install -m 0644 %{SOURCE1} %{buildroot}%{macrosdir}/macros.d/ %doc CHANGES CONTRIBUTORS README TODO %doc %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} -%{macrosdir}/macros.d/macros.fdupes +%{macrosdir}/macros.fdupes %changelog +* Fri Apr 18 2014 Björn Esser - 1.51-6 +- remove duplicated `macros.d`-dir (#1088566) + * Tue Mar 18 2014 Björn Esser - 1.51-5 - Add needed bits for el5 - Fix `mixed use of spaces-and tabs` From 46e394cd8278d0b82a2860d417fd9e1ba66daa71 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 06:37:07 -0500 Subject: [PATCH 34/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index c622d31..9b3d7a0 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -3,7 +3,7 @@ Name: fdupes Version: 1.51 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Finds duplicate files in a given set of directories %{?el5:Group: Applications/File} @@ -71,6 +71,9 @@ install -pm 0644 %{SOURCE1} %{buildroot}%{macrosdir} %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.51-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Fri Apr 18 2014 Björn Esser - 1.51-6 - remove duplicated `macros.d`-dir (#1088566) From 3c70daf1ee85ead03d93abd91d2e872474bc58a8 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 16 Aug 2014 12:11:46 +0000 Subject: [PATCH 35/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 9b3d7a0..d56db18 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -3,7 +3,7 @@ Name: fdupes Version: 1.51 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Finds duplicate files in a given set of directories %{?el5:Group: Applications/File} @@ -71,6 +71,9 @@ install -pm 0644 %{SOURCE1} %{buildroot}%{macrosdir} %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 1.51-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 1.51-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 4041ccd760d6b0d378faaf588124e64b90f06276 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 06:04:01 +0000 Subject: [PATCH 36/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index d56db18..d48c924 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -3,7 +3,7 @@ Name: fdupes Version: 1.51 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Finds duplicate files in a given set of directories %{?el5:Group: Applications/File} @@ -71,6 +71,9 @@ install -pm 0644 %{SOURCE1} %{buildroot}%{macrosdir} %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 1.51-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat Aug 16 2014 Fedora Release Engineering - 1.51-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 36ec3ed9ea44fec5c3271927ffe67d9080a0e1ee Mon Sep 17 00:00:00 2001 From: Jon Schlueter Date: Fri, 19 Jun 2015 22:05:31 -0400 Subject: [PATCH 37/48] rebaseline using new home for fdupes github updated URL and source URL new source file added had to adapt setup to deal with differently named folder in release tarball --- fdupes.spec | 12 ++++++++---- sources | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fdupes.spec b/fdupes.spec index d48c924..4fb2540 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -3,13 +3,13 @@ Name: fdupes Version: 1.51 -Release: 9%{?dist} +Release: 10%{?dist} Summary: Finds duplicate files in a given set of directories %{?el5:Group: Applications/File} License: MIT -URL: https://code.google.com/p/fdupes/ -Source0: https://fdupes.googlecode.com/files/%{name}-%{version}.tar.gz +URL: https://github.com/adrianlopezroche/fdupes +Source0: https://github.com/adrianlopezroche/%{name}/archive/%{name}-%{version}.tar.gz Source1: macros.fdupes Patch0: fdupes-1.51-destdir.patch @@ -28,7 +28,7 @@ directories. %prep -%setup -q +%setup -q -n %{name}-%{name}-%{version} %patch2 -p1 -b .cve %patch0 -p1 -b .destdir %patch1 -p1 -b .typo @@ -71,6 +71,10 @@ install -pm 0644 %{SOURCE1} %{buildroot}%{macrosdir} %changelog +* Fri Jun 19 2015 Jon Schlueter - 1.51-10 +- Rebaseline using github which is new home of fdupes +- source tarball has unusual folder naming of fdupes-fdupes-1.51 instead of normal fdupes-1.51 + * Wed Jun 17 2015 Fedora Release Engineering - 1.51-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index d6651ba..fbfdd47 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -47d0410c90c9e51e450933ba35a32b62 fdupes-1.51.tar.gz +cc90047dea9f1e0a849c3c1a6e8b2d68 fdupes-1.51.tar.gz From 0e85dc5d4076a5e509beb0e98c24e7872e76590a Mon Sep 17 00:00:00 2001 From: Jon Schlueter Date: Fri, 19 Jun 2015 22:48:05 -0400 Subject: [PATCH 38/48] updating patches to reflect upstream submittion of patches prepped build folder is identical after remastering patch set --- fdupes-1.51-check-permissions.patch | 2 ++ fdupes-1.51-destdir.patch | 3 +++ fdupes-1.51-obey-ldflags.patch | 35 ++++++++++++++++++++++++----- fdupes-1.51-typo.patch | 24 ++++++++++++++++---- 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/fdupes-1.51-check-permissions.patch b/fdupes-1.51-check-permissions.patch index 6977773..b58b7f0 100644 --- a/fdupes-1.51-check-permissions.patch +++ b/fdupes-1.51-check-permissions.patch @@ -1,3 +1,5 @@ +# cherry picked from commit: c62a5331a5feef2b09556546d02a2b2fc67f6e67 +# which fixed this CVE in upstream master diff -Naur fdupes-1.51.orig/fdupes.1 fdupes-1.51/fdupes.1 --- fdupes-1.51.orig/fdupes.1 2013-04-20 12:00:09.000000000 -0500 +++ fdupes-1.51/fdupes.1 2013-07-16 13:01:16.264491871 -0500 diff --git a/fdupes-1.51-destdir.patch b/fdupes-1.51-destdir.patch index e2fd8b2..a5df72d 100644 --- a/fdupes-1.51-destdir.patch +++ b/fdupes-1.51-destdir.patch @@ -1,3 +1,6 @@ +# cherry picked from commit: 5d9143b8168cbf7fe55e2273f42486bcc9175208 +# and adapted +# This effective patch has already been applied to upstream diff -Naur fdupes-1.51.orig/Makefile fdupes-1.51/Makefile --- fdupes-1.51.orig/Makefile 2013-04-20 12:51:58.000000000 -0500 +++ fdupes-1.51/Makefile 2013-07-16 09:22:30.169197997 -0500 diff --git a/fdupes-1.51-obey-ldflags.patch b/fdupes-1.51-obey-ldflags.patch index dfb741a..5531d87 100644 --- a/fdupes-1.51-obey-ldflags.patch +++ b/fdupes-1.51-obey-ldflags.patch @@ -1,8 +1,30 @@ -Index: fdupes-1.51/Makefile -=================================================================== ---- fdupes-1.51.orig/Makefile -+++ fdupes-1.51/Makefile -@@ -102,7 +102,7 @@ OBJECT_FILES = fdupes.o md5/md5.o $(ADDI +From b8f3a4ea82bbff053ba785fb2e719d2ac6d82e15 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Fri, 19 Jun 2015 22:15:52 -0400 +Subject: [PATCH] obey ldflags +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +backport of patch submitted to fedora dist-git repo for fdupes +cherry picked from commit: b8f3a4ea82bbff053ba785fb2e719d2ac6d82e15 + +commit 2fefedf7da42a6e73894e6d361e65b054ce80001 +Author: Björn Esser +Date: Tue Mar 18 13:51:11 2014 +0100 + + added Patch3: fdupes-1.51-obey-ldflags.patch to repo + +Signed-off-by: Jon Schlueter +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 921d910..e6947ea 100644 +--- a/Makefile ++++ b/Makefile +@@ -100,7 +100,7 @@ OBJECT_FILES = fdupes.o md5/md5.o $(ADDITIONAL_OBJECTS) all: fdupes fdupes: $(OBJECT_FILES) @@ -11,3 +33,6 @@ Index: fdupes-1.51/Makefile installdirs: test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR) +-- +2.1.0 + diff --git a/fdupes-1.51-typo.patch b/fdupes-1.51-typo.patch index d115cfa..5d119d4 100644 --- a/fdupes-1.51-typo.patch +++ b/fdupes-1.51-typo.patch @@ -1,7 +1,20 @@ -diff -urNp fdupes-1.50-PR2.orig/fdupes.1 fdupes-1.50-PR2/fdupes.1 ---- fdupes-1.50-PR2.orig/fdupes.1 2009-01-31 20:11:49.581967819 +0530 -+++ fdupes-1.50-PR2/fdupes.1 2009-01-31 20:32:46.383969471 +0530 -@@ -87,7 +87,7 @@ If fdupes returns with an error message +From cc2fe14c2397b84ff61d00e038462dc6dac3bda2 Mon Sep 17 00:00:00 2001 +From: Alfie Costa +Date: Fri, 12 Oct 2012 14:58:00 +0200 +Subject: [PATCH 03/17] Fix a typo in a manpage + +Fixes: http://bugs.debian.org/353789 + +cherry picked from commit: cc2fe14c2397b84ff61d00e038462dc6dac3bda2 +--- + fdupes.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fdupes.1 b/fdupes.1 +index c0a02f0..71da2c4 100644 +--- a/fdupes.1 ++++ b/fdupes.1 +@@ -84,7 +84,7 @@ If fdupes returns with an error message such as .B fdupes: error invoking md5sum it means the program has been compiled to use an external program to calculate MD5 signatures (otherwise, fdupes uses @@ -10,3 +23,6 @@ diff -urNp fdupes-1.50-PR2.orig/fdupes.1 fdupes-1.50-PR2/fdupes.1 while attempting to execute it. If this is the case, the specified program should be properly installed prior to running fdupes. +-- +2.1.0 + From 1fe3afb49dcc0f1e4f70ef29588d1d1a74513acd Mon Sep 17 00:00:00 2001 From: Jon Schlueter Date: Wed, 24 Jun 2015 05:53:57 -0400 Subject: [PATCH 39/48] update offsets for patches so they cleanly apply --- fdupes-1.51-obey-ldflags.patch | 2 +- fdupes-1.51-typo.patch | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fdupes-1.51-obey-ldflags.patch b/fdupes-1.51-obey-ldflags.patch index 5531d87..6300439 100644 --- a/fdupes-1.51-obey-ldflags.patch +++ b/fdupes-1.51-obey-ldflags.patch @@ -24,7 +24,7 @@ diff --git a/Makefile b/Makefile index 921d910..e6947ea 100644 --- a/Makefile +++ b/Makefile -@@ -100,7 +100,7 @@ OBJECT_FILES = fdupes.o md5/md5.o $(ADDITIONAL_OBJECTS) +@@ -102,7 +102,7 @@ OBJECT_FILES = fdupes.o md5/md5.o $(ADDITIONAL_OBJECTS) all: fdupes fdupes: $(OBJECT_FILES) diff --git a/fdupes-1.51-typo.patch b/fdupes-1.51-typo.patch index 5d119d4..670f5e2 100644 --- a/fdupes-1.51-typo.patch +++ b/fdupes-1.51-typo.patch @@ -14,7 +14,7 @@ diff --git a/fdupes.1 b/fdupes.1 index c0a02f0..71da2c4 100644 --- a/fdupes.1 +++ b/fdupes.1 -@@ -84,7 +84,7 @@ If fdupes returns with an error message such as +@@ -87,7 +87,7 @@ If fdupes returns with an error message such as .B fdupes: error invoking md5sum it means the program has been compiled to use an external program to calculate MD5 signatures (otherwise, fdupes uses From 522f1dd0eb23d780c95b2bd47e56dacdfcb4dc54 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 20:18:21 +0000 Subject: [PATCH 40/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 4fb2540..9d71c49 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -3,7 +3,7 @@ Name: fdupes Version: 1.51 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Finds duplicate files in a given set of directories %{?el5:Group: Applications/File} @@ -71,6 +71,9 @@ install -pm 0644 %{SOURCE1} %{buildroot}%{macrosdir} %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 1.51-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Jun 19 2015 Jon Schlueter - 1.51-10 - Rebaseline using github which is new home of fdupes - source tarball has unusual folder naming of fdupes-fdupes-1.51 instead of normal fdupes-1.51 From 93b73c6d63c54532e25dbb1b908b392939daffb9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 09:37:29 +0000 Subject: [PATCH 41/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 9d71c49..c2c43de 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -3,7 +3,7 @@ Name: fdupes Version: 1.51 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Finds duplicate files in a given set of directories %{?el5:Group: Applications/File} @@ -71,6 +71,9 @@ install -pm 0644 %{SOURCE1} %{buildroot}%{macrosdir} %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.51-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Feb 03 2016 Fedora Release Engineering - 1.51-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 4be68f260cd87e75bed70513113a89dff960ad0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sun, 9 Apr 2017 13:13:15 +0200 Subject: [PATCH 42/48] Updated to new upstream-release Upstream changed versioning-scheme, Epoch is needed Drop old patches, applied upstream Update spec-file to recent guidelines Drop el5-bits --- .gitignore | 1 + fdupes-1.51-check-permissions.patch | 92 ------------ fdupes-1.51-destdir.patch | 32 ----- fdupes-1.51-obey-ldflags.patch | 38 ----- fdupes-1.51-typo.patch | 28 ---- fdupes-1.6.1-allow_a_instead_of_all.patch | 24 ++++ fdupes-1.6.1-delete_old_TODO.patch | 88 ++++++++++++ fdupes-1.6.1-option_sort_by_ctime.patch | 167 ++++++++++++++++++++++ fdupes.spec | 100 +++++++------ sources | 2 +- 10 files changed, 340 insertions(+), 232 deletions(-) delete mode 100644 fdupes-1.51-check-permissions.patch delete mode 100644 fdupes-1.51-destdir.patch delete mode 100644 fdupes-1.51-obey-ldflags.patch delete mode 100644 fdupes-1.51-typo.patch create mode 100644 fdupes-1.6.1-allow_a_instead_of_all.patch create mode 100644 fdupes-1.6.1-delete_old_TODO.patch create mode 100644 fdupes-1.6.1-option_sort_by_ctime.patch diff --git a/.gitignore b/.gitignore index 2df5027..35706ae 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ fdupes-1.50-PR2.tar.gz /fdupes-1.51.tar.gz +/fdupes-1.6.1.tar.gz diff --git a/fdupes-1.51-check-permissions.patch b/fdupes-1.51-check-permissions.patch deleted file mode 100644 index b58b7f0..0000000 --- a/fdupes-1.51-check-permissions.patch +++ /dev/null @@ -1,92 +0,0 @@ -# cherry picked from commit: c62a5331a5feef2b09556546d02a2b2fc67f6e67 -# which fixed this CVE in upstream master -diff -Naur fdupes-1.51.orig/fdupes.1 fdupes-1.51/fdupes.1 ---- fdupes-1.51.orig/fdupes.1 2013-04-20 12:00:09.000000000 -0500 -+++ fdupes-1.51/fdupes.1 2013-07-16 13:01:16.264491871 -0500 -@@ -56,6 +56,9 @@ - when used together with --delete, preserve the first file in each - set of duplicates and delete the others without prompting the user - .TP -+.B -p --permissions -+don't consider files with different owner/group or permission bits as duplicates -+.TP - .B -v --version - display fdupes version - .TP -diff -Naur fdupes-1.51.orig/fdupes.c fdupes-1.51/fdupes.c ---- fdupes-1.51.orig/fdupes.c 2013-04-20 13:02:18.000000000 -0500 -+++ fdupes-1.51/fdupes.c 2013-07-16 13:03:04.529344704 -0500 -@@ -51,6 +51,7 @@ - #define F_RECURSEAFTER 0x0200 - #define F_NOPROMPT 0x0400 - #define F_SUMMARIZEMATCHES 0x0800 -+#define F_PERMISSIONS 0x1000 - - char *program_name; - -@@ -467,6 +468,19 @@ - return 1; - } - -+int same_permissions(char* name1, char* name2) -+{ -+ struct stat s1, s2; -+ -+ if (stat(name1, &s1) != 0) return -1; -+ if (stat(name2, &s2) != 0) return -1; -+ -+ return (s1.st_mode == s2.st_mode && -+ s1.st_uid == s2.st_uid && -+ s1.st_gid == s2.st_gid); -+} -+ -+ - file_t **checkmatch(filetree_t **root, filetree_t *checktree, file_t *file) - { - int cmpresult; -@@ -489,6 +503,10 @@ - cmpresult = -1; - else - if (fsize > checktree->file->size) cmpresult = 1; -+ else -+ if (ISFLAG(flags, F_PERMISSIONS) && -+ !same_permissions(file->d_name, checktree->file->d_name)) -+ cmpresult = -1; - else { - if (checktree->file->crcpartial == NULL) { - crcsignature = getcrcpartialsignature(checktree->file->d_name); -@@ -958,6 +976,7 @@ - printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n"); - printf(" \teach set of duplicates and delete the rest without\n"); - printf(" \tprompting the user\n"); -+ printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n"); - printf(" -v --version \tdisplay fdupes version\n"); - printf(" -h --help \tdisplay this help message\n\n"); - #ifdef OMIT_GETOPT_LONG -@@ -1000,6 +1019,7 @@ - { "noprompt", 0, 0, 'N' }, - { "summarize", 0, 0, 'm'}, - { "summary", 0, 0, 'm' }, -+ { "permissions", 0, 0, 'p' }, - { 0, 0, 0, 0 } - }; - #define GETOPT getopt_long -@@ -1011,7 +1031,7 @@ - - oldargv = cloneargs(argc, argv); - -- while ((opt = GETOPT(argc, argv, "frRq1Ss::HlndvhNm" -+ while ((opt = GETOPT(argc, argv, "frRq1Ss::HlndvhNmp" - #ifndef OMIT_GETOPT_LONG - , long_options, NULL - #endif -@@ -1059,6 +1079,9 @@ - case 'm': - SETFLAG(flags, F_SUMMARIZEMATCHES); - break; -+ case 'p': -+ SETFLAG(flags, F_PERMISSIONS); -+ break; - - default: - fprintf(stderr, "Try `fdupes --help' for more information.\n"); diff --git a/fdupes-1.51-destdir.patch b/fdupes-1.51-destdir.patch deleted file mode 100644 index a5df72d..0000000 --- a/fdupes-1.51-destdir.patch +++ /dev/null @@ -1,32 +0,0 @@ -# cherry picked from commit: 5d9143b8168cbf7fe55e2273f42486bcc9175208 -# and adapted -# This effective patch has already been applied to upstream -diff -Naur fdupes-1.51.orig/Makefile fdupes-1.51/Makefile ---- fdupes-1.51.orig/Makefile 2013-04-20 12:51:58.000000000 -0500 -+++ fdupes-1.51/Makefile 2013-07-16 09:22:30.169197997 -0500 -@@ -46,6 +46,8 @@ - # - PROGRAM_NAME=fdupes - -+DESTDIR = -+ - # - # BIN_DIR indicates directory where program is to be installed. - # Suggested value is "$(PREFIX)/bin" -@@ -103,12 +105,12 @@ - $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) - - installdirs: -- test -d $(BIN_DIR) || $(MKDIR) $(BIN_DIR) -- test -d $(MAN_DIR) || $(MKDIR) $(MAN_DIR) -+ test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR) -+ test -d $(DESTDIR)$(MAN_DIR) || $(MKDIR) $(DESTDIR)$(MAN_DIR) - - install: fdupes installdirs -- $(INSTALL_PROGRAM) fdupes $(BIN_DIR)/$(PROGRAM_NAME) -- $(INSTALL_DATA) fdupes.1 $(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT) -+ $(INSTALL_PROGRAM) fdupes $(DESTDIR)$(BIN_DIR)/$(PROGRAM_NAME) -+ $(INSTALL_DATA) fdupes.1 $(DESTDIR)$(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT) - - clean: - $(RM) $(OBJECT_FILES) diff --git a/fdupes-1.51-obey-ldflags.patch b/fdupes-1.51-obey-ldflags.patch deleted file mode 100644 index 6300439..0000000 --- a/fdupes-1.51-obey-ldflags.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b8f3a4ea82bbff053ba785fb2e719d2ac6d82e15 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= -Date: Fri, 19 Jun 2015 22:15:52 -0400 -Subject: [PATCH] obey ldflags -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -backport of patch submitted to fedora dist-git repo for fdupes -cherry picked from commit: b8f3a4ea82bbff053ba785fb2e719d2ac6d82e15 - -commit 2fefedf7da42a6e73894e6d361e65b054ce80001 -Author: Björn Esser -Date: Tue Mar 18 13:51:11 2014 +0100 - - added Patch3: fdupes-1.51-obey-ldflags.patch to repo - -Signed-off-by: Jon Schlueter ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 921d910..e6947ea 100644 ---- a/Makefile -+++ b/Makefile -@@ -102,7 +102,7 @@ OBJECT_FILES = fdupes.o md5/md5.o $(ADDITIONAL_OBJECTS) - all: fdupes - - fdupes: $(OBJECT_FILES) -- $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) -+ $(CC) $(CFLAGS) $(LDFLAGS) -o fdupes $(OBJECT_FILES) - - installdirs: - test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR) --- -2.1.0 - diff --git a/fdupes-1.51-typo.patch b/fdupes-1.51-typo.patch deleted file mode 100644 index 670f5e2..0000000 --- a/fdupes-1.51-typo.patch +++ /dev/null @@ -1,28 +0,0 @@ -From cc2fe14c2397b84ff61d00e038462dc6dac3bda2 Mon Sep 17 00:00:00 2001 -From: Alfie Costa -Date: Fri, 12 Oct 2012 14:58:00 +0200 -Subject: [PATCH 03/17] Fix a typo in a manpage - -Fixes: http://bugs.debian.org/353789 - -cherry picked from commit: cc2fe14c2397b84ff61d00e038462dc6dac3bda2 ---- - fdupes.1 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/fdupes.1 b/fdupes.1 -index c0a02f0..71da2c4 100644 ---- a/fdupes.1 -+++ b/fdupes.1 -@@ -87,7 +87,7 @@ If fdupes returns with an error message such as - .B fdupes: error invoking md5sum - it means the program has been compiled to use an external - program to calculate MD5 signatures (otherwise, fdupes uses --interal routines for this purpose), and an error has occurred -+internal routines for this purpose), and an error has occurred - while attempting to execute it. If this is the case, the - specified program should be properly installed prior - to running fdupes. --- -2.1.0 - diff --git a/fdupes-1.6.1-allow_a_instead_of_all.patch b/fdupes-1.6.1-allow_a_instead_of_all.patch new file mode 100644 index 0000000..89115e0 --- /dev/null +++ b/fdupes-1.6.1-allow_a_instead_of_all.patch @@ -0,0 +1,24 @@ +From 88f3d2dd31fbef7e539b2523724221e8e8e5a9f0 Mon Sep 17 00:00:00 2001 +From: Falk +Date: Thu, 27 Oct 2016 18:10:48 +0200 +Subject: [PATCH] allow to type just a instead of all + +Typing all many times can be boring/annoying, So I propose to allow people to type just a for all. +(sometimes there can be very large duplicate sets) +--- + fdupes.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/fdupes.c b/fdupes.c +index 7eee165..7a8a6ed 100644 +--- a/fdupes.c ++++ b/fdupes.c +@@ -886,7 +886,7 @@ void deletefiles(file_t *files, int prompt, FILE *tty) + token = strtok(preservestr, " ,\n"); + + while (token != NULL) { +- if (strcasecmp(token, "all") == 0) ++ if (strcasecmp(token, "all") == 0 || strcasecmp(token, "a") == 0) + for (x = 0; x <= counter; x++) preserve[x] = 1; + + number = 0; diff --git a/fdupes-1.6.1-delete_old_TODO.patch b/fdupes-1.6.1-delete_old_TODO.patch new file mode 100644 index 0000000..ac9ad2d --- /dev/null +++ b/fdupes-1.6.1-delete_old_TODO.patch @@ -0,0 +1,88 @@ +From 315f6702f1cc37036d9f826314245b44a781c387 Mon Sep 17 00:00:00 2001 +From: Adrian Lopez +Date: Sun, 21 Aug 2016 02:04:15 -0400 +Subject: [PATCH] Delete old TODO file. + +--- + TODO | 72 -------------------------------------------------------------------- + 1 file changed, 72 deletions(-) + delete mode 100644 TODO + +diff --git a/TODO b/TODO +deleted file mode 100644 +index f7f77c4..0000000 +--- a/TODO ++++ /dev/null +@@ -1,72 +0,0 @@ +-- A bug with -S shows wrong results. +- +-- A bug causes the following behavior: +- +- $ fdupes --symlinks testdir +- testdir/with spaces b +- testdir/with spaces a +- +- testdir/zero_b +- testdir/zero_a +- +- testdir/symlink_two +- testdir/twice_one +- +- $ cp testdir/two testdir/two_again +- $ fdupes --symlinks testdir +- testdir/two_again +- testdir/two +- testdir/twice_one +- testdir/symlink_two +- +- testdir/with spaces b +- testdir/with spaces a +- +- testdir/zero_b +- testdir/zero_a +- +- ** This is not the desired behavior. Likewise: +- +- $ fdupes testdir +- testdir/with spaces b +- testdir/with spaces a +- +- testdir/zero_b +- testdir/zero_a +- +- testdir/twice_one +- testdir/two +- +- $ fdupes --symlinks testdir +- testdir/with spaces b +- testdir/with spaces a +- +- testdir/zero_b +- testdir/zero_a +- +- testdir/symlink_two +- testdir/twice_one +- +-- Don't assume that stat always works. +- +-- Add partial checksumming where instead of MD5ing whole +- files we MD5 and compare every so many bytes, caching +- these partial results for subsequent comparisons. +- +-- Option -R should not have to be separated from the rest, +- such that "fdupes -dR testdir", "fdupes -d -R testdir", +- "fdupes -Rd testdir", etc., all yield the same results. +- +-- Add option to highlight or identify symlinked files (suggest +- using --classify to identify symlinks with @ suffix... when +- specified, files containing @ are listed using \@). +- +-- Consider autodeletion option without user intervention. +- +-- Consider option to match only to files in specific directory. +- +-- Do a little commenting, to avoid rolling eyes and/or snickering. +- +-- Fix problem where MD5 collisions will result in one of the +- files not being registered (causing it to be ignored). +- diff --git a/fdupes-1.6.1-option_sort_by_ctime.patch b/fdupes-1.6.1-option_sort_by_ctime.patch new file mode 100644 index 0000000..8529323 --- /dev/null +++ b/fdupes-1.6.1-option_sort_by_ctime.patch @@ -0,0 +1,167 @@ +From e95ec42dc178eff0410880c3dc4c0dac3df442df Mon Sep 17 00:00:00 2001 +From: Adrian Lopez +Date: Tue, 23 Aug 2016 18:21:18 -0400 +Subject: [PATCH] Add an option to sort duplicate files by ctime. + +--- + README | 5 +++-- + fdupes.1 | 2 +- + fdupes.c | 49 +++++++++++++++++++++++++++++++++++++------------ + 3 files changed, 41 insertions(+), 15 deletions(-) + +diff --git a/README b/README +index c748d05..c27f043 100644 +--- a/README ++++ b/README +@@ -37,8 +37,9 @@ Usage: fdupes [options] DIRECTORY... + grouping into sets; implies --noprompt + -p --permissions don't consider files with different owner/group or + permission bits as duplicates +- -o --order=BY select sort order for output, linking and deleting; by +- mtime (BY='time'; default) or filename (BY='name') ++ -o --order=BY select sort order for output and deleting; by file ++ modification time (BY='time'; default), status ++ change time (BY='ctime'), or filename (BY='name') + -i --reverse reverse order while sorting + -v --version display fdupes version + -h --help display this help message +diff --git a/fdupes.1 b/fdupes.1 +index 5ddad87..969a5d8 100644 +--- a/fdupes.1 ++++ b/fdupes.1 +@@ -72,7 +72,7 @@ don't consider files with different owner/group or permission bits as duplicates + .TP + .B -o --order\fR=\fIWORD\fR + order files according to WORD: +-time - sort by mtime, name - sort by filename ++time - sort by modification time, ctime - sort by status change time, name - sort by filename + .TP + .B -i --reverse + reverse order while sorting +diff --git a/fdupes.c b/fdupes.c +index ef64c45..7eee165 100644 +--- a/fdupes.c ++++ b/fdupes.c +@@ -56,7 +56,8 @@ + #define F_IMMEDIATE 0x8000 + + typedef enum { +- ORDER_TIME = 0, ++ ORDER_MTIME = 0, ++ ORDER_CTIME, + ORDER_NAME + } ordertype_t; + +@@ -64,6 +65,8 @@ char *program_name; + + unsigned long flags = 0; + ++ordertype_t ordertype = ORDER_MTIME; ++ + #define CHUNK_SIZE 8192 + + #define INPUT_SIZE 256 +@@ -97,7 +100,7 @@ typedef struct _file { + md5_byte_t *crcsignature; + dev_t device; + ino_t inode; +- time_t mtime; ++ time_t sorttime; + int hasdupes; /* true only if file is first on duplicate chain */ + struct _file *duplicates; + struct _file *next; +@@ -183,6 +186,14 @@ time_t getmtime(char *filename) { + return s.st_mtime; + } + ++time_t getctime(char *filename) { ++ struct stat s; ++ ++ if (stat(filename, &s) != 0) return 0; ++ ++ return s.st_ctime; ++} ++ + char **cloneargs(int argc, char **argv) + { + int x; +@@ -435,7 +446,17 @@ void getfilestats(file_t *file) + file->size = filesize(file->d_name); + file->inode = getinode(file->d_name); + file->device = getdevice(file->d_name); +- file->mtime = getmtime(file->d_name); ++ ++ switch (ordertype) ++ { ++ case ORDER_CTIME: ++ file->sorttime = getctime(file->d_name); ++ break; ++ case ORDER_MTIME: ++ default: ++ file->sorttime = getmtime(file->d_name); ++ break; ++ } + } + + int registerfile(filetree_t **branch, file_t *file) +@@ -911,11 +932,11 @@ int sort_pairs_by_arrival(file_t *f1, file_t *f2) + return !ISFLAG(flags, F_REVERSE) ? -1 : 1; + } + +-int sort_pairs_by_mtime(file_t *f1, file_t *f2) ++int sort_pairs_by_time(file_t *f1, file_t *f2) + { +- if (f1->mtime < f2->mtime) ++ if (f1->sorttime < f2->sorttime) + return !ISFLAG(flags, F_REVERSE) ? -1 : 1; +- else if (f1->mtime > f2->mtime) ++ else if (f1->sorttime > f2->sorttime) + return !ISFLAG(flags, F_REVERSE) ? 1 : -1; + + return 0; +@@ -1038,8 +1059,9 @@ void help_text() + printf(" \tgrouping into sets; implies --noprompt\n"); + printf(" -p --permissions \tdon't consider files with different owner/group or\n"); + printf(" \tpermission bits as duplicates\n"); +- printf(" -o --order=BY \tselect sort order for output, linking and deleting; by\n"); +- printf(" \tmtime (BY='time'; default) or filename (BY='name')\n"); ++ printf(" -o --order=BY \tselect sort order for output and deleting; by file\n"); ++ printf(" \tmodification time (BY='time'; default), status\n"); ++ printf(" \tchange time (BY='ctime'), or filename (BY='name')\n"); + printf(" -i --reverse \treverse order while sorting\n"); + printf(" -v --version \tdisplay fdupes version\n"); + printf(" -h --help \tdisplay this help message\n\n"); +@@ -1061,7 +1083,6 @@ int main(int argc, char **argv) { + int progress = 0; + char **oldargv; + int firstrecurse; +- ordertype_t ordertype = ORDER_TIME; + + #ifndef OMIT_GETOPT_LONG + static struct option long_options[] = +@@ -1161,7 +1182,9 @@ int main(int argc, char **argv) { + if (!strcasecmp("name", optarg)) { + ordertype = ORDER_NAME; + } else if (!strcasecmp("time", optarg)) { +- ordertype = ORDER_TIME; ++ ordertype = ORDER_MTIME; ++ } else if (!strcasecmp("ctime", optarg)) { ++ ordertype = ORDER_CTIME; + } else { + errormsg("invalid value for --order: '%s'\n", optarg); + exit(1); +@@ -1247,10 +1270,12 @@ int main(int argc, char **argv) { + if (confirmmatch(file1, file2)) { + if (ISFLAG(flags, F_DELETEFILES) && ISFLAG(flags, F_IMMEDIATE)) + deletesuccessor(match, curfile, +- (ordertype == ORDER_TIME) ? sort_pairs_by_mtime : sort_pairs_by_filename ); ++ (ordertype == ORDER_MTIME || ++ ordertype == ORDER_CTIME) ? sort_pairs_by_time : sort_pairs_by_filename ); + else + registerpair(match, curfile, +- (ordertype == ORDER_TIME) ? sort_pairs_by_mtime : sort_pairs_by_filename ); ++ (ordertype == ORDER_MTIME || ++ ordertype == ORDER_CTIME) ? sort_pairs_by_time : sort_pairs_by_filename ); + } + + fclose(file1); diff --git a/fdupes.spec b/fdupes.spec index c2c43de..ce2fcb5 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -1,26 +1,21 @@ # Place rpm-macros into proper location. -%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) +%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; /bin/echo $d) -Name: fdupes -Version: 1.51 -Release: 12%{?dist} -Summary: Finds duplicate files in a given set of directories -%{?el5:Group: Applications/File} +Name: fdupes +Epoch: 1 +Version: 1.6.1 +Release: 1%{?dist} +Summary: Finds duplicate files in a given set of directories -License: MIT -URL: https://github.com/adrianlopezroche/fdupes -Source0: https://github.com/adrianlopezroche/%{name}/archive/%{name}-%{version}.tar.gz -Source1: macros.fdupes +License: MIT +URL: https://github.com/adrianlopezroche/%{name} +Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: macros.%{name} -Patch0: fdupes-1.51-destdir.patch -# http://bugs.debian.org/353789 -Patch1: fdupes-1.51-typo.patch -# Fix CVE -Patch2: fdupes-1.51-check-permissions.patch -# Apply proper LDFLAGS -Patch3: fdupes-1.51-obey-ldflags.patch - -%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} +# From upstream. +Patch0: %{url}/commit/315f6702f1cc37036d9f826314245b44a781c387.patch#/%{name}-1.6.1-delete_old_TODO.patch +Patch1: %{url}/commit/e95ec42dc178eff0410880c3dc4c0dac3df442df.patch#/%{name}-1.6.1-option_sort_by_ctime.patch +Patch2: %{url}/commit/88f3d2dd31fbef7e539b2523724221e8e8e5a9f0.patch#/%{name}-1.6.1-allow_a_instead_of_all.patch %description FDUPES is a program for identifying duplicate files residing within specified @@ -28,19 +23,49 @@ directories. %prep -%setup -q -n %{name}-%{name}-%{version} -%patch2 -p1 -b .cve -%patch0 -p1 -b .destdir -%patch1 -p1 -b .typo -%patch3 -p1 -b .ldflags +%autosetup -p 1 + +# From README. +%{__cat} << EOF > LICENSE +FDUPES Copyright (c) 1999 Adrian Lopez + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation files +(the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, +and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +EOF %build -make %{?_smp_mflags} \ +%make_build \ COMPILER_OPTIONS="%{?optflags}" \ LDFLAGS="%{?__global_ldflags}" +%install +%make_install \ + INSTALL="%{__install} -p" \ + BIN_DIR=%{_bindir} \ + MAN_BASE_DIR=%{_mandir} + +%{__install} -Dpm 0644 %{SOURCE1} \ + %{buildroot}%{macrosdir}/macros.%{name} + + %check ./%{name} testdir ./%{name} --omitfirst testdir @@ -48,29 +73,22 @@ make %{?_smp_mflags} \ ./%{name} --size testdir -%install -%{?el5:rm -rf %{buildroot}} -make install INSTALL="%{__install} -p" \ - BIN_DIR=%{_bindir} \ - MAN_BASE_DIR=%{_mandir} \ - DESTDIR=%{buildroot} - -mkdir -p %{buildroot}%{macrosdir} -install -pm 0644 %{SOURCE1} %{buildroot}%{macrosdir} - - -%clean -%{?el5:rm -rf %{buildroot}} - - %files -%doc CHANGES CONTRIBUTORS README TODO +%license CONTRIBUTORS LICENSE +%doc CHANGES README %doc %{_mandir}/man1/%{name}.1* %{_bindir}/%{name} %{macrosdir}/macros.fdupes %changelog +* Sun Apr 09 2017 Björn Esser - 1:1.6.1-1 +- Updated to new upstream-release +- Upstream changed versioning-scheme, Epoch is needed +- Drop old patches, applied upstream +- Update spec-file to recent guidelines +- Drop el5-bits + * Fri Feb 10 2017 Fedora Release Engineering - 1.51-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index fbfdd47..1fc4c22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cc90047dea9f1e0a849c3c1a6e8b2d68 fdupes-1.51.tar.gz +SHA512 (fdupes-1.6.1.tar.gz) = 6c6662b70068c2f48f4be64a6830c81a66852d650391d0756f20b9ac0df7d70c1a32918bd7cbd50e19de524d9ebc09ea338c19636e1807b071eb96b325e641db From 1c0bdcc79060d0b32af9f3504165573df0c5f3d4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 08:07:47 +0000 Subject: [PATCH 43/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index ce2fcb5..d31bac1 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -4,7 +4,7 @@ Name: fdupes Epoch: 1 Version: 1.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Finds duplicate files in a given set of directories License: MIT @@ -82,6 +82,9 @@ EOF %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1:1.6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sun Apr 09 2017 Björn Esser - 1:1.6.1-1 - Updated to new upstream-release - Upstream changed versioning-scheme, Epoch is needed From f2008fe6b7461a865284b4cdf9f1ee49844d79c2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 20:30:31 +0000 Subject: [PATCH 44/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index d31bac1..1305652 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -4,7 +4,7 @@ Name: fdupes Epoch: 1 Version: 1.6.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Finds duplicate files in a given set of directories License: MIT @@ -82,6 +82,9 @@ EOF %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 1:1.6.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1:1.6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 3b3858338d4809d8f64ca5ded49a5cd6eeedbc0c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 7 Feb 2018 09:21:23 +0000 Subject: [PATCH 45/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 1305652..69dc57b 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -4,7 +4,7 @@ Name: fdupes Epoch: 1 Version: 1.6.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Finds duplicate files in a given set of directories License: MIT @@ -82,6 +82,9 @@ EOF %changelog +* Wed Feb 07 2018 Fedora Release Engineering - 1:1.6.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Wed Aug 02 2017 Fedora Release Engineering - 1:1.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From bcdd87f284fd04f80871fa5c7636edcb48c98aa5 Mon Sep 17 00:00:00 2001 From: Richard Shaw Date: Sun, 18 Feb 2018 11:35:48 -0600 Subject: [PATCH 46/48] Update build requirements for gcc per https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires --- fdupes.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fdupes.spec b/fdupes.spec index 69dc57b..ceeea64 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -12,6 +12,8 @@ URL: https://github.com/adrianlopezroche/%{name} Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: macros.%{name} +BuildRequires: gcc + # From upstream. Patch0: %{url}/commit/315f6702f1cc37036d9f826314245b44a781c387.patch#/%{name}-1.6.1-delete_old_TODO.patch Patch1: %{url}/commit/e95ec42dc178eff0410880c3dc4c0dac3df442df.patch#/%{name}-1.6.1-option_sort_by_ctime.patch From 0567abcffb1b41fd89edfff7d00e5965a94dc437 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 00:24:03 +0000 Subject: [PATCH 47/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index ceeea64..95fe739 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -4,7 +4,7 @@ Name: fdupes Epoch: 1 Version: 1.6.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Finds duplicate files in a given set of directories License: MIT @@ -84,6 +84,9 @@ EOF %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 1:1.6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Wed Feb 07 2018 Fedora Release Engineering - 1:1.6.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 9c7485e5e573ef91177d0e27ab99f642bcd4015a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 31 Jan 2019 19:27:06 +0000 Subject: [PATCH 48/48] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- fdupes.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fdupes.spec b/fdupes.spec index 95fe739..0f25b62 100644 --- a/fdupes.spec +++ b/fdupes.spec @@ -4,7 +4,7 @@ Name: fdupes Epoch: 1 Version: 1.6.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Finds duplicate files in a given set of directories License: MIT @@ -84,6 +84,9 @@ EOF %changelog +* Thu Jan 31 2019 Fedora Release Engineering - 1:1.6.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Fri Jul 13 2018 Fedora Release Engineering - 1:1.6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild