summaryrefslogtreecommitdiff
path: root/app-misc/fdupes/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/fdupes/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/fdupes/files')
-rw-r--r--app-misc/fdupes/files/fdupes-1.50_pre2-compare-file.patch58
-rw-r--r--app-misc/fdupes/files/fdupes-1.50_pre2-typo.patch12
-rw-r--r--app-misc/fdupes/files/fdupes-1.51-fix-stdin-lvalue.patch20
-rw-r--r--app-misc/fdupes/files/fdupes-1.51-makefile.patch23
-rw-r--r--app-misc/fdupes/files/fdupes-9999-gentoo.patch14
5 files changed, 127 insertions, 0 deletions
diff --git a/app-misc/fdupes/files/fdupes-1.50_pre2-compare-file.patch b/app-misc/fdupes/files/fdupes-1.50_pre2-compare-file.patch
new file mode 100644
index 000000000000..fa9e2a34a893
--- /dev/null
+++ b/app-misc/fdupes/files/fdupes-1.50_pre2-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/app-misc/fdupes/files/fdupes-1.50_pre2-typo.patch b/app-misc/fdupes/files/fdupes-1.50_pre2-typo.patch
new file mode 100644
index 000000000000..1615a15f49b1
--- /dev/null
+++ b/app-misc/fdupes/files/fdupes-1.50_pre2-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/app-misc/fdupes/files/fdupes-1.51-fix-stdin-lvalue.patch b/app-misc/fdupes/files/fdupes-1.51-fix-stdin-lvalue.patch
new file mode 100644
index 000000000000..65c06e3f1ddf
--- /dev/null
+++ b/app-misc/fdupes/files/fdupes-1.51-fix-stdin-lvalue.patch
@@ -0,0 +1,20 @@
+This is a combination of upstream's fe2d8334 and 03abad. See
+https://bugs.gentoo.org/show_bug.cgi?id=574610.
+
+diff -Naur fdupes-1.51.orig/fdupes.c fdupes-1.51/fdupes.c
+--- fdupes-1.51.orig/fdupes.c 2013-04-20 14:02:18.000000000 -0400
++++ fdupes-1.51/fdupes.c 2016-02-29 02:45:36.360804360 -0500
+@@ -1164,7 +1164,12 @@
+ }
+ else
+ {
+- stdin = freopen("/dev/tty", "r", stdin);
++ if (freopen("/dev/tty", "r", stdin) == 0)
++ {
++ errormsg("could not open terminal for input\n");
++ exit(1);
++ }
++
+ deletefiles(files, 1, stdin);
+ }
+ }
diff --git a/app-misc/fdupes/files/fdupes-1.51-makefile.patch b/app-misc/fdupes/files/fdupes-1.51-makefile.patch
new file mode 100644
index 000000000000..138914239a90
--- /dev/null
+++ b/app-misc/fdupes/files/fdupes-1.51-makefile.patch
@@ -0,0 +1,23 @@
+--- fdupes-1.50-PR2/Makefile.orig 2010-11-19 19:05:18.152330536 -0800
++++ fdupes-1.50-PR2/Makefile 2010-11-19 19:06:00.998659992 -0800
+@@ -72,9 +72,9 @@
+ # Make Configuration
+ #
+ CC = gcc
+-COMPILER_OPTIONS = -Wall -O -g
++COMPILER_OPTIONS = -Wall
+
+-CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT)
++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
+@@ -94,7 +94,7 @@
+ all: fdupes
+
+ fdupes: $(OBJECT_FILES)
+- $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fdupes $(OBJECT_FILES)
+
+ installdirs:
+ test -d $(BIN_DIR) || $(MKDIR) $(BIN_DIR)
diff --git a/app-misc/fdupes/files/fdupes-9999-gentoo.patch b/app-misc/fdupes/files/fdupes-9999-gentoo.patch
new file mode 100644
index 000000000000..4c6edda50e04
--- /dev/null
+++ b/app-misc/fdupes/files/fdupes-9999-gentoo.patch
@@ -0,0 +1,14 @@
+--- a/Makefile
++++ b/Makefile
+@@ -71,9 +71,9 @@
+ # Make Configuration
+ #
+ CC ?= gcc
+-COMPILER_OPTIONS = -Wall -O -g
++COMPILER_OPTIONS = -Wall
+
+-CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT)
++CFLAGS += $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT)
+
+ INSTALL_PROGRAM = $(INSTALL) -c -m 0755
+ INSTALL_DATA = $(INSTALL) -c -m 0644