- 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)
epel9
Debarshi Ray 16 years ago
parent 21cf9e788b
commit 58a5af4d38

@ -1 +1 @@
fdupes-1.40.tar.gz
fdupes-1.50-PR2.tar.gz

@ -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)

@ -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 <string.h>
#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 <string.h>
main()
{
static const char *const test[7] = {

@ -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;
}

@ -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)

@ -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

@ -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.

@ -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 <rel-eng@fedoraproject.org> - 1.40-12
- Autorebuild for GCC 4.3
* Sun Feb 01 2009 Debarshi Ray <rishi@fedoraproject.org> - 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 <rel-eng@fedoraproject.org> - 1.40-12
- Autorebuild for gcc-4.3.
* Thu Dec 27 2007 Debarshi Ray <rishi@fedoraproject.org> - 1.40-11
- Fixed Makefile to preserve timestamps using 'cp -p'.

@ -1 +1 @@
11de9ab4466089b6acbb62816b30b189 fdupes-1.40.tar.gz
a4f0de2d9a79efce3d712d6520e58c7f fdupes-1.50-PR2.tar.gz

Loading…
Cancel
Save