commit fdupes for openSUSE:Factory
Hello community, here is the log from the commit of package fdupes for openSUSE:Factory checked in at 2015-09-19 07:56:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fdupes (Old) and /work/SRC/openSUSE:Factory/.fdupes.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "fdupes" Changes: -------- --- /work/SRC/openSUSE:Factory/fdupes/fdupes.changes 2014-12-29 00:29:42.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.fdupes.new/fdupes.changes 2015-09-19 07:56:24.000000000 +0200 @@ -1,0 +2,22 @@ +Tue Aug 4 13:01:47 UTC 2015 - tchvatal@suse.com + +- By default relink hardlinks too, should fix bnc#940296 + +------------------------------------------------------------------- +Mon Aug 3 19:26:55 UTC 2015 - tchvatal@suse.com + +- Update to upstream git repo on github +- Refresh patches: + * fdupes-makefile.patch + * 0008-speedup-the-file-compare.patch + * 0010-add-permissions-mode.patch + * 0011-add-an-option-to-sort-duplicate-files-by-name.patch + * 50_bts284274_hardlinkreplace.dpatch +- Upstreamed patch: + * 0004-Large-file-support-for-2GB-files-bts447601.patch +- Remove whitespace from fdupes.macros file +- Cleanup with spec-cleaner + - Obey rpm-opt-flags + - run test phase + +------------------------------------------------------------------- Old: ---- 0004-Large-file-support-for-2GB-files-bts447601.patch fdupes-1.50-PR2.tar.gz New: ---- fdupes-1.51.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fdupes.spec ++++++ --- /var/tmp/diff_new_pack.uARldX/_old 2015-09-19 07:56:26.000000000 +0200 +++ /var/tmp/diff_new_pack.uARldX/_new 2015-09-19 07:56:26.000000000 +0200 @@ -1,7 +1,7 @@ # -# spec file for package fdupes (Version 1.40) +# spec file for package fdupes # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,14 +15,15 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: fdupes -Version: 1.50 +Version: 1.51 Release: 0 Summary: Identifying or deleting duplicate files -Url: http://code.google.com/p/fdupes/ -Group: Productivity/Archiving/Compression License: MIT -Source0: http://fdupes.googlecode.com/files/fdupes-1.50-PR2.tar.gz +Group: Productivity/Archiving/Compression +Url: https://github.com/adrianlopezroche/fdupes +Source0: https://github.com/adrianlopezroche/%{name}/archive/%{name}-%{version}.tar.gz Source1: macros.fdupes #PATCH-FIX-SUSE: fix patch according distro's needs Patch0: fdupes-makefile.patch @@ -35,8 +36,6 @@ Patch2: 0002-Added-to-escape-minus-signs-in-manpage-lintian-warni.patch #PATCH-FIX-DEBIAN: dtto Patch3: 0003-Fix-a-typo-in-a-manpage-bts353789.patch -#PATCH-FIX-DEBIAN: support for large files -Patch4: 0004-Large-file-support-for-2GB-files-bts447601.patch #PATCH-FIX-DEBIAN: manpage fix Patch5: 0005-add-summarize-to-manpage-bts481809.patch #PATCH-FIX-DEBIAN: dtto @@ -53,24 +52,18 @@ Patch11: 0011-add-an-option-to-sort-duplicate-files-by-name.patch #PATCH-FIX-DEBIAN: add -L/--linkhard Patch20: 50_bts284274_hardlinkreplace.dpatch - BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?centos_version} || 0%{?rhel_version} || 0%{?fedora_version} -BuildRequires: which -%endif %description FDUPES is a program for identifying or deleting duplicate files residing within specified directories %prep -%setup -q -n %name-%{version}-PR2 +%setup -q -n %{name}-%{name}-%{version} %patch0 - %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 @@ -81,16 +74,19 @@ %patch20 -p1 %build -echo -e "#!/bin/bash\n`which %__cc` \"\$@\"" >gcc -chmod 755 gcc -export PATH=`pwd`:$PATH -make %{?_smp_mflags} +make %{?_smp_mflags} COMPILER_OPTIONS="%{optflags}" %install install -D -m755 %{name} %{buildroot}%{_bindir}/%{name} install -D -m644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.%{name} +%check +./%{name} testdir +./%{name} --omitfirst testdir +./%{name} --recurse testdir +./%{name} --size testdir + %files %defattr(-, root, root) %doc CHANGES ++++++ 0008-speedup-the-file-compare.patch ++++++ --- /var/tmp/diff_new_pack.uARldX/_old 2015-09-19 07:56:26.000000000 +0200 +++ /var/tmp/diff_new_pack.uARldX/_new 2015-09-19 07:56:26.000000000 +0200 @@ -10,11 +10,11 @@ fdupes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -diff --git a/fdupes.c b/fdupes.c -index 1e9e620..678f31f 100644 ---- a/fdupes.c -+++ b/fdupes.c -@@ -370,7 +370,7 @@ char *getcrcsignatureuntil(char *filename, off_t max_read) +Index: fdupes-fdupes-1.51/fdupes.c +=================================================================== +--- fdupes-fdupes-1.51.orig/fdupes.c ++++ fdupes-fdupes-1.51/fdupes.c +@@ -370,7 +370,7 @@ char *getcrcsignatureuntil(char *filenam } while (fsize > 0) { @@ -22,8 +22,8 @@ + toread = (fsize >= CHUNK_SIZE) ? CHUNK_SIZE : fsize; if (fread(chunk, toread, 1, file) != 1) { errormsg("error reading from file %s\n", filename); - fclose(file); // bugfix -@@ -606,8 +606,8 @@ int confirmmatch(FILE *file1, FILE *file2) + fclose(file); +@@ -606,8 +606,8 @@ int confirmmatch(FILE *file1, FILE *file fseek(file2, 0, SEEK_SET); do { @@ -34,6 +34,3 @@ if (r1 != r2) return 0; /* file lengths are different */ if (memcmp (c1, c2, r1)) return 0; /* file contents are different */ --- -1.7.11.5 - ++++++ 0010-add-permissions-mode.patch ++++++ --- /var/tmp/diff_new_pack.uARldX/_old 2015-09-19 07:56:26.000000000 +0200 +++ /var/tmp/diff_new_pack.uARldX/_new 2015-09-19 07:56:26.000000000 +0200 @@ -13,10 +13,10 @@ fdupes.c | 25 ++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) -diff --git a/fdupes.1 b/fdupes.1 -index 9263adc..e0516f1 100644 ---- a/fdupes.1 -+++ b/fdupes.1 +Index: fdupes-fdupes-1.51/fdupes.1 +=================================================================== +--- fdupes-fdupes-1.51.orig/fdupes.1 ++++ fdupes-fdupes-1.51/fdupes.1 @@ -63,6 +63,9 @@ below) when used together with \-\-delete, preserve the first file in each set of duplicates and delete the others without prompting the user @@ -27,10 +27,10 @@ .B -v --version display fdupes version .TP -diff --git a/fdupes.c b/fdupes.c -index 678f31f..b3275a9 100644 ---- a/fdupes.c -+++ b/fdupes.c +Index: fdupes-fdupes-1.51/fdupes.c +=================================================================== +--- fdupes-fdupes-1.51.orig/fdupes.c ++++ fdupes-fdupes-1.51/fdupes.c @@ -53,6 +53,7 @@ #define F_NOPROMPT 0x0400 #define F_SUMMARIZEMATCHES 0x0800 @@ -39,7 +39,7 @@ char *program_name; -@@ -481,6 +482,19 @@ int registerfile(filetree_t **branch, file_t *file) +@@ -481,6 +482,19 @@ int registerfile(filetree_t **branch, fi return 1; } @@ -59,7 +59,7 @@ file_t **checkmatch(filetree_t **root, filetree_t *checktree, file_t *file) { int cmpresult; -@@ -503,6 +517,10 @@ file_t **checkmatch(filetree_t **root, filetree_t *checktree, file_t *file) +@@ -503,6 +517,10 @@ file_t **checkmatch(filetree_t **root, f cmpresult = -1; else if (fsize > checktree->file->size) cmpresult = 1; @@ -70,15 +70,15 @@ else { if (checktree->file->crcpartial == NULL) { crcsignature = getcrcpartialsignature(checktree->file->d_name); -@@ -976,6 +994,7 @@ void help_text() +@@ -979,6 +997,7 @@ void help_text() printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n"); printf(" \teach set of duplicates and delete the rest without\n"); - printf(" \twithout prompting the user\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 -@@ -1019,6 +1038,7 @@ int main(int argc, char **argv) { +@@ -1022,6 +1041,7 @@ int main(int argc, char **argv) { { "noprompt", 0, 0, 'N' }, { "summarize", 0, 0, 'm'}, { "summary", 0, 0, 'm' }, @@ -86,7 +86,7 @@ { 0, 0, 0, 0 } }; #define GETOPT getopt_long -@@ -1030,7 +1050,7 @@ int main(int argc, char **argv) { +@@ -1033,7 +1053,7 @@ int main(int argc, char **argv) { oldargv = cloneargs(argc, argv); @@ -95,7 +95,7 @@ #ifndef OMIT_GETOPT_LONG , long_options, NULL #endif -@@ -1081,6 +1101,9 @@ int main(int argc, char **argv) { +@@ -1084,6 +1104,9 @@ int main(int argc, char **argv) { case 'm': SETFLAG(flags, F_SUMMARIZEMATCHES); break; @@ -105,6 +105,3 @@ default: fprintf(stderr, "Try `fdupes --help' for more information.\n"); --- -1.7.11.5 - ++++++ 0011-add-an-option-to-sort-duplicate-files-by-name.patch ++++++ --- /var/tmp/diff_new_pack.uARldX/_old 2015-09-19 07:56:26.000000000 +0200 +++ /var/tmp/diff_new_pack.uARldX/_new 2015-09-19 07:56:26.000000000 +0200 @@ -12,11 +12,11 @@ fdupes.c | 30 ++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) -diff --git a/fdupes.1 b/fdupes.1 -index e0516f1..b5fb0f6 100644 ---- a/fdupes.1 -+++ b/fdupes.1 -@@ -66,6 +66,10 @@ set of duplicates and delete the others without prompting the user +Index: fdupes-fdupes-1.51/fdupes.1 +=================================================================== +--- fdupes-fdupes-1.51.orig/fdupes.1 ++++ fdupes-fdupes-1.51/fdupes.1 +@@ -66,6 +66,10 @@ set of duplicates and delete the others .B -p --permissions don't consider files with different owner/group or permission bits as duplicates .TP @@ -27,10 +27,10 @@ .B -v --version display fdupes version .TP -diff --git a/fdupes.c b/fdupes.c -index b6aeaa7..08f9e2c 100644 ---- a/fdupes.c -+++ b/fdupes.c +Index: fdupes-fdupes-1.51/fdupes.c +=================================================================== +--- fdupes-fdupes-1.51.orig/fdupes.c ++++ fdupes-fdupes-1.51/fdupes.c @@ -55,6 +55,11 @@ #define F_EXCLUDEHIDDEN 0x1000 #define F_PERMISSIONS 0x2000 @@ -43,7 +43,7 @@ char *program_name; unsigned long flags = 0; -@@ -918,6 +923,11 @@ int sort_pairs_by_mtime(file_t *f1, file_t *f2) +@@ -921,6 +926,11 @@ int sort_pairs_by_mtime(file_t *f1, file return 0; } @@ -55,9 +55,9 @@ void registerpair(file_t **matchlist, file_t *newmatch, int (*comparef)(file_t *f1, file_t *f2)) { -@@ -995,6 +1005,9 @@ void help_text() +@@ -998,6 +1008,9 @@ void help_text() printf(" \teach set of duplicates and delete the rest without\n"); - printf(" \twithout prompting the user\n"); + printf(" \tprompting the user\n"); printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n"); + printf(" -o --order \tselect sort order for output, linking and deleting. One of:\n"); + printf(" time \torder by mtime (default)\n"); @@ -65,7 +65,7 @@ printf(" -v --version \tdisplay fdupes version\n"); printf(" -h --help \tdisplay this help message\n\n"); #ifdef OMIT_GETOPT_LONG -@@ -1015,6 +1028,7 @@ int main(int argc, char **argv) { +@@ -1018,6 +1031,7 @@ int main(int argc, char **argv) { int progress = 0; char **oldargv; int firstrecurse; @@ -73,7 +73,7 @@ #ifndef OMIT_GETOPT_LONG static struct option long_options[] = -@@ -1039,6 +1053,7 @@ int main(int argc, char **argv) { +@@ -1042,6 +1056,7 @@ int main(int argc, char **argv) { { "summarize", 0, 0, 'm'}, { "summary", 0, 0, 'm' }, { "permissions", 0, 0, 'p' }, @@ -81,7 +81,7 @@ { 0, 0, 0, 0 } }; #define GETOPT getopt_long -@@ -1050,7 +1065,7 @@ int main(int argc, char **argv) { +@@ -1053,7 +1068,7 @@ int main(int argc, char **argv) { oldargv = cloneargs(argc, argv); @@ -90,7 +90,7 @@ #ifndef OMIT_GETOPT_LONG , long_options, NULL #endif -@@ -1104,6 +1119,16 @@ int main(int argc, char **argv) { +@@ -1107,6 +1122,16 @@ int main(int argc, char **argv) { case 'p': SETFLAG(flags, F_PERMISSIONS); break; @@ -107,7 +107,7 @@ default: fprintf(stderr, "Try `fdupes --help' for more information.\n"); -@@ -1179,7 +1204,8 @@ int main(int argc, char **argv) { +@@ -1182,7 +1207,8 @@ int main(int argc, char **argv) { } if (confirmmatch(file1, file2)) { @@ -115,8 +115,5 @@ + registerpair(match, curfile, + (ordertype == ORDER_TIME) ? sort_pairs_by_mtime : sort_pairs_by_filename ); - //match->hasdupes = 1; - //curfile->duplicates = match->duplicates; --- -1.8.4.5 - + /*match->hasdupes = 1; + curfile->duplicates = match->duplicates; ++++++ 50_bts284274_hardlinkreplace.dpatch ++++++ --- /var/tmp/diff_new_pack.uARldX/_old 2015-09-19 07:56:26.000000000 +0200 +++ /var/tmp/diff_new_pack.uARldX/_new 2015-09-19 07:56:26.000000000 +0200 @@ -5,10 +5,10 @@ ## DP: Replace duplicate files with hardlinks @DPATCH@ -Index: fdupes-1.50-PR2/fdupes.c +Index: fdupes-fdupes-1.51/fdupes.c =================================================================== ---- fdupes-1.50-PR2.orig/fdupes.c -+++ fdupes-1.50-PR2/fdupes.c +--- fdupes-fdupes-1.51.orig/fdupes.c ++++ fdupes-fdupes-1.51/fdupes.c @@ -54,6 +54,8 @@ #define F_SUMMARIZEMATCHES 0x0800 #define F_EXCLUDEHIDDEN 0x1000 @@ -18,7 +18,7 @@ typedef enum { ORDER_TIME = 0, -@@ -904,6 +906,88 @@ void deletefiles(file_t *files, int prom +@@ -908,6 +910,88 @@ void deletefiles(file_t *files, int prom free(preservestr); } @@ -107,21 +107,21 @@ int sort_pairs_by_arrival(file_t *f1, file_t *f2) { if (f2->duplicates != 0) -@@ -1000,10 +1084,12 @@ void help_text() +@@ -1003,10 +1087,12 @@ void help_text() printf(" \twith -s or --symlinks, or when specifying a\n"); printf(" \tparticular directory more than once; refer to the\n"); printf(" \tfdupes documentation for additional information\n"); -- //printf(" -l --relink \t(description)\n"); +- /*printf(" -l --relink \t(description)\n");*/ + printf(" -L --linkhard \thardlink duplicate files to the first file in\n"); + printf(" \teach set of duplicates without prompting the user\n"); printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n"); printf(" \teach set of duplicates and delete the rest without\n"); - printf(" \twithout prompting the user\n"); + printf(" \tprompting the user\n"); + printf(" -D --debug \tenable debugging information\n"); printf(" -p --permissions \tdon't consider files with different owner/group or permission bits as duplicates\n"); printf(" -o --order \tselect sort order for output, linking and deleting. One of:\n"); printf(" time \torder by mtime (default)\n"); -@@ -1044,12 +1130,14 @@ int main(int argc, char **argv) { +@@ -1047,12 +1133,14 @@ int main(int argc, char **argv) { { "symlinks", 0, 0, 's' }, { "hardlinks", 0, 0, 'H' }, { "relink", 0, 0, 'l' }, @@ -136,7 +136,7 @@ { "summarize", 0, 0, 'm'}, { "summary", 0, 0, 'm' }, { "permissions", 0, 0, 'p' }, -@@ -1065,7 +1153,7 @@ int main(int argc, char **argv) { +@@ -1068,7 +1156,7 @@ int main(int argc, char **argv) { oldargv = cloneargs(argc, argv); @@ -145,7 +145,7 @@ #ifndef OMIT_GETOPT_LONG , long_options, NULL #endif -@@ -1104,6 +1192,12 @@ int main(int argc, char **argv) { +@@ -1107,6 +1195,12 @@ int main(int argc, char **argv) { case 'd': SETFLAG(flags, F_DELETEFILES); break; @@ -158,7 +158,7 @@ case 'v': printf("fdupes %s\n", VERSION); exit(0); -@@ -1151,6 +1245,16 @@ int main(int argc, char **argv) { +@@ -1154,6 +1248,16 @@ int main(int argc, char **argv) { exit(1); } @@ -175,7 +175,7 @@ if (ISFLAG(flags, F_RECURSEAFTER)) { firstrecurse = nonoptafter("--recurse:", argc, oldargv, argv, optind); -@@ -1237,12 +1341,23 @@ int main(int argc, char **argv) { +@@ -1245,12 +1349,23 @@ int main(int argc, char **argv) { else @@ -204,10 +204,10 @@ while (files) { curfile = files->next; -Index: fdupes-1.50-PR2/fdupes.1 +Index: fdupes-fdupes-1.51/fdupes.1 =================================================================== ---- fdupes-1.50-PR2.orig/fdupes.1 -+++ fdupes-1.50-PR2/fdupes.1 +--- fdupes-fdupes-1.51.orig/fdupes.1 ++++ fdupes-fdupes-1.51/fdupes.1 @@ -59,10 +59,17 @@ prompt user for files to preserve, delet .B CAVEATS below) ++++++ fdupes-1.50-PR2.tar.gz -> fdupes-1.51.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fdupes-1.50-PR2/CHANGES new/fdupes-fdupes-1.51/CHANGES --- old/fdupes-1.50-PR2/CHANGES 2007-04-08 04:58:40.000000000 +0200 +++ new/fdupes-fdupes-1.51/CHANGES 2013-04-20 20:21:46.000000000 +0200 @@ -7,8 +7,18 @@ contributors names and identifiers please see the CONTRIBUTORS file. +Changes from 1.50 to 1.51 + +- Added support for 64-bit file offsets on 32-bit systems. +- Using tty for interactive input instead of regular stdin. This is to + allow feeding filenames via stdin in future versions of fdupes without + breaking interactive deletion feature. +- Fixed some typos in --help. +- Turned C++ style comments into C style comments. + Changes from 1.40 to 1.50-PR2 +- Fixed memory leak. [JB] - Added "--summarize" option. [AL] - Added "--recurse:" selective recursion option. [AL] - Added "--noprompt" option for totally automated deletion of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fdupes-1.50-PR2/CONTRIBUTORS new/fdupes-fdupes-1.51/CONTRIBUTORS --- old/fdupes-1.50-PR2/CONTRIBUTORS 2002-05-31 09:21:35.000000000 +0200 +++ new/fdupes-fdupes-1.51/CONTRIBUTORS 2013-04-20 20:21:46.000000000 +0200 @@ -8,6 +8,7 @@ [FD] Frank DENIS, a.k.a. Jedi/Sector One, a.k.a. DJ Chrysalis (j@4u.net) + [JB] Jean-Baptiste () [KK] Kresimir Kukulj (madmax@pc-hrvoje.srce.hr) [LB] Laurent Bonnaud (Laurent.Bonnaud@iut2.upmf-grenoble.fr) [LM] Luca Montecchiani (m.luca@iname.com) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fdupes-1.50-PR2/Makefile new/fdupes-fdupes-1.51/Makefile --- old/fdupes-1.50-PR2/Makefile 2002-05-31 09:31:45.000000000 +0200 +++ new/fdupes-fdupes-1.51/Makefile 2013-04-20 20:21:46.000000000 +0200 @@ -14,6 +14,12 @@ PREFIX = /usr/local # +# When compiling for 32-bit systems, FILEOFFSET_64BIT must be enabled +# for fdupes to handle files greater than (2<<31)-1 bytes. +# +FILEOFFSET_64BIT = -D_FILE_OFFSET_BITS=64 + +# # Certain platforms do not support long options (command line options). # To disable long options, uncomment the following line. # @@ -74,7 +80,7 @@ CC = gcc COMPILER_OPTIONS = -Wall -O -g -CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG) +CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT) INSTALL_PROGRAM = $(INSTALL) -c -m 0755 INSTALL_DATA = $(INSTALL) -c -m 0644 @@ -97,8 +103,8 @@ $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) installdirs: - test -d $(BIN_DIR) || -$(MKDIR) $(BIN_DIR) - test -d $(MAN_DIR) || -$(MKDIR) $(MAN_DIR) + test -d $(BIN_DIR) || $(MKDIR) $(BIN_DIR) + test -d $(MAN_DIR) || $(MKDIR) $(MAN_DIR) install: fdupes installdirs $(INSTALL_PROGRAM) fdupes $(BIN_DIR)/$(PROGRAM_NAME) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fdupes-1.50-PR2/Makefile.inc/VERSION new/fdupes-fdupes-1.51/Makefile.inc/VERSION --- old/fdupes-1.50-PR2/Makefile.inc/VERSION 2002-05-29 04:44:29.000000000 +0200 +++ new/fdupes-fdupes-1.51/Makefile.inc/VERSION 2013-04-20 20:21:46.000000000 +0200 @@ -2,4 +2,4 @@ # VERSION determines the program's version number. # -VERSION = 1.50-PR2 +VERSION = 1.51 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fdupes-1.50-PR2/fdupes.c new/fdupes-fdupes-1.51/fdupes.c --- old/fdupes-1.50-PR2/fdupes.c 2007-04-08 04:53:24.000000000 +0200 +++ new/fdupes-fdupes-1.51/fdupes.c 2013-04-20 20:21:46.000000000 +0200 @@ -359,7 +359,7 @@ toread = (fsize % CHUNK_SIZE) ? (fsize % CHUNK_SIZE) : CHUNK_SIZE; if (fread(chunk, toread, 1, file) != 1) { errormsg("error reading from file %s\n", filename); - fclose(file); // bugfix + fclose(file); return NULL; } md5_append(&state, chunk, toread); @@ -515,7 +515,7 @@ } cmpresult = strcmp(file->crcpartial, checktree->file->crcpartial); - //if (cmpresult != 0) errormsg(" on %s vs %s\n", file->d_name, checktree->file->d_name); + /*if (cmpresult != 0) errormsg(" on %s vs %s\n", file->d_name, checktree->file->d_name);*/ if (cmpresult == 0) { if (checktree->file->crcsignature == NULL) { @@ -543,11 +543,11 @@ } cmpresult = strcmp(file->crcsignature, checktree->file->crcsignature); - //if (cmpresult != 0) errormsg("P on %s vs %s\n", - //file->d_name, checktree->file->d_name); - //else errormsg("P F on %s vs %s\n", file->d_name, - //checktree->file->d_name); - //printf("%s matches %s\n", file->d_name, checktree->file->d_name); + /*if (cmpresult != 0) errormsg("P on %s vs %s\n", + file->d_name, checktree->file->d_name); + else errormsg("P F on %s vs %s\n", file->d_name, + checktree->file->d_name); + printf("%s matches %s\n", file->d_name, checktree->file->d_name);*/ } } @@ -643,7 +643,7 @@ 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'); @@ -709,17 +709,17 @@ if (link(oldfile, newfile) != 0) return 0; - // make sure we're working with the right file (the one we created) + /* make sure we're working with the right file (the one we created) */ nd = getdevice(newfile); ni = getinode(newfile); if (nd != od || oi != ni) - return 0; // file is not what we expected + return 0; /* file is not what we expected */ return 1; } -void deletefiles(file_t *files, int prompt) +void deletefiles(file_t *files, int prompt, FILE *tty) { int counter; int groups = 0; @@ -796,12 +796,13 @@ 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); - fgets(preservestr, INPUT_SIZE, stdin); + if (!fgets(preservestr, INPUT_SIZE, tty)) + preservestr[0] = '\n'; /* treat fgets() failure as if nothing was entered */ i = strlen(preservestr) - 1; @@ -814,8 +815,11 @@ } preservestr = tstr; - if (!fgets(preservestr + i + 1, INPUT_SIZE, stdin)) - break; /* stop if fgets fails -- possible EOF? */ + if (!fgets(preservestr + i + 1, INPUT_SIZE, tty)) + { + preservestr[0] = '\n'; /* treat fgets() failure as if nothing was entered */ + break; + } i = strlen(preservestr)-1; } @@ -877,7 +881,6 @@ else if (f1->mtime > f2->mtime) return 1; - //return sort_pairs_by_arrival(f1, f2); return 0; } @@ -899,10 +902,10 @@ if (back == 0) { - *matchlist = newmatch; // update pointer to head of list + *matchlist = newmatch; /* update pointer to head of list */ newmatch->hasdupes = 1; - traverse->hasdupes = 0; // flag is only for first file in dupe chain + traverse->hasdupes = 0; /* flag is only for first file in dupe chain */ } else back->duplicates = newmatch; @@ -951,10 +954,10 @@ printf(" \twith -s or --symlinks, or when specifying a\n"); printf(" \tparticular directory more than once; refer to the\n"); printf(" \tfdupes documentation for additional information\n"); - //printf(" -l --relink \t(description)\n"); + /*printf(" -l --relink \t(description)\n");*/ printf(" -N --noprompt \ttogether with --delete, preserve the first file in\n"); printf(" \teach set of duplicates and delete the rest without\n"); - printf(" \twithout prompting the user\n"); + printf(" \tprompting the user\n"); printf(" -v --version \tdisplay fdupes version\n"); printf(" -h --help \tdisplay this help message\n\n"); #ifdef OMIT_GETOPT_LONG @@ -1133,9 +1136,9 @@ if (confirmmatch(file1, file2)) { registerpair(match, curfile, sort_pairs_by_mtime); - //match->hasdupes = 1; - //curfile->duplicates = match->duplicates; - //match->duplicates = curfile; + /*match->hasdupes = 1; + curfile->duplicates = match->duplicates; + match->duplicates = curfile;*/ } fclose(file1); @@ -1156,9 +1159,14 @@ if (ISFLAG(flags, F_DELETEFILES)) { if (ISFLAG(flags, F_NOPROMPT)) - deletefiles(files, 0); + { + deletefiles(files, 0, 0); + } else - deletefiles(files, 1); + { + stdin = freopen("/dev/tty", "r", stdin); + deletefiles(files, 1, stdin); + } } else @@ -1173,10 +1181,17 @@ while (files) { curfile = files->next; free(files->d_name); + free(files->crcsignature); + free(files->crcpartial); free(files); files = curfile; } - + + for (x = 0; x < argc; x++) + free(oldargv[x]); + + free(oldargv); + purgetree(checktree); return 0; ++++++ fdupes-makefile.patch ++++++ --- /var/tmp/diff_new_pack.uARldX/_old 2015-09-19 07:56:26.000000000 +0200 +++ /var/tmp/diff_new_pack.uARldX/_new 2015-09-19 07:56:26.000000000 +0200 @@ -1,7 +1,7 @@ Index: Makefile =================================================================== ---- Makefile.orig 2002-05-31 09:31:45.000000000 +0200 -+++ Makefile 2012-10-12 11:46:35.152408642 +0200 +--- Makefile.orig ++++ Makefile @@ -11,7 +11,7 @@ # determination of the actual installation directories. # Suggested values are "/usr/local", "/usr", "/pkgs/fdupes-$(VERSION)" @@ -10,8 +10,8 @@ +PREFIX = /usr # - # Certain platforms do not support long options (command line options). -@@ -50,7 +50,7 @@ + # When compiling for 32-bit systems, FILEOFFSET_64BIT must be enabled +@@ -56,7 +56,7 @@ BIN_DIR = $(PREFIX)/bin # MAN_DIR indicates directory where the fdupes man page is to be # installed. Suggested value is "$(PREFIX)/man/man1" # ++++++ macros.fdupes ++++++ --- /var/tmp/diff_new_pack.uARldX/_old 2015-09-19 07:56:26.000000000 +0200 +++ /var/tmp/diff_new_pack.uARldX/_new 2015-09-19 07:56:26.000000000 +0200 @@ -1,9 +1,8 @@ - %fdupes(s) \ _target=""; \ _symlinks=0; \ %{-s:_symlinks=1;} \ - fdupes -q -p -n -o name -r %1 | \ + fdupes -q -p -n -H -o name -r %1 | \ while read _file; do \ if test -z "$_target" ; then \ _target="$_file"; \ @@ -20,4 +19,3 @@ fi ; \ done \ %{nil} -
participants (1)
-
root@hilbert.suse.de