summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-misc/fdupes/ChangeLog14
-rw-r--r--app-misc/fdupes/fdupes-1.50_pre2-r1.ebuild40
-rw-r--r--app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation-1.patch72
-rw-r--r--app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation.patch17
-rw-r--r--app-misc/fdupes/files/fdupes-1.40-memcpy.patch20
-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-lfs.patch21
-rw-r--r--app-misc/fdupes/files/fdupes-1.50_pre2-typo.patch12
8 files changed, 143 insertions, 111 deletions
diff --git a/app-misc/fdupes/ChangeLog b/app-misc/fdupes/ChangeLog
index f90eb5a952ae..d94cab7eb362 100644
--- a/app-misc/fdupes/ChangeLog
+++ b/app-misc/fdupes/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for app-misc/fdupes
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/fdupes/ChangeLog,v 1.46 2011/10/12 16:50:09 jlec Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/fdupes/ChangeLog,v 1.47 2012/07/06 07:28:37 jlec Exp $
+
+*fdupes-1.50_pre2-r1 (06 Jul 2012)
+
+ 06 Jul 2012; Justin Lecher <jlec@gentoo.org>
+ -files/fdupes-1.40-external-md5sum-quotation.patch,
+ -files/fdupes-1.40-external-md5sum-quotation-1.patch,
+ -files/fdupes-1.40-memcpy.patch, +fdupes-1.50_pre2-r1.ebuild,
+ +files/fdupes-1.50_pre2-compare-file.patch,
+ +files/fdupes-1.50_pre2-lfs.patch, +files/fdupes-1.50_pre2-typo.patch:
+ Import some fixes from fedora
12 Oct 2011; Justin Lecher <jlec@gentoo.org> fdupes-1.50_pre2.ebuild,
metadata.xml:
diff --git a/app-misc/fdupes/fdupes-1.50_pre2-r1.ebuild b/app-misc/fdupes/fdupes-1.50_pre2-r1.ebuild
new file mode 100644
index 000000000000..8dce9b58c7df
--- /dev/null
+++ b/app-misc/fdupes/fdupes-1.50_pre2-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/fdupes/fdupes-1.50_pre2-r1.ebuild,v 1.1 2012/07/06 07:28:37 jlec Exp $
+
+EAPI=4
+
+inherit eutils flag-o-matic toolchain-funcs
+
+MY_P="${PN}-${PV/_pre/-PR}"
+
+DESCRIPTION="Identify/delete duplicate files residing within specified directories"
+HOMEPAGE="http://netdial.caribe.net/~adrian2/fdupes.html"
+SRC_URI="http://netdial.caribe.net/~adrian2/programs/${PN}/beta/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-makefile.patch \
+ "${FILESDIR}"/${P}-compare-file.patch \
+ "${FILESDIR}"/${P}-lfs.patch \
+ "${FILESDIR}"/${P}-typo.patch
+
+ append-lfs-flags
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_install() {
+ dobin fdupes
+ doman fdupes.1
+ dodoc CHANGES CONTRIBUTORS README TODO
+}
diff --git a/app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation-1.patch b/app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation-1.patch
deleted file mode 100644
index 1815f7b6d152..000000000000
--- a/app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation-1.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-Source: Peter Volkov <pva@gentoo.org>
-Upstream: notified (sent email to <adrian2 AT caribe DOT net>
-Reason: bugs.gentoo.org/237828 comment #1
-With USE=md5sum-external fails on filenames with spaces in their names.
-
-Updated on 2009/06/20:
- * Fixed free due to wrong length of memory allocation bugs.gentoo.org/273597
- * Now works with filename that have " in name...
-
---- fdupes.c 2009-06-20 10:51:31 +0000
-+++ fdupes.c 2009-06-20 13:38:39 +0000
-@@ -291,17 +291,48 @@
- char *getcrcsignature(char *filename)
- {
- static char signature[256];
-+ char *backslashedfilename;
- char *command;
- char *separator;
- FILE *result;
--
-- command = (char*) malloc(strlen(filename)+strlen(EXTERNAL_MD5)+2);
-+ int i=0;
-+ int j=0;
-+ int numofquotes=0;
-+
-+ /* Find number of " in filename */
-+ while ( filename[i] != '\0' ) {
-+ if ( filename[i] == '\"' )
-+ numofquotes++;
-+ i++;
-+ }
-+
-+ backslashedfilename = (char*) malloc(strlen(filename)+numofquotes+1);
-+ if (backslashedfilename == NULL) {
-+ errormsg("out of memory\n");
-+ exit(1);
-+ }
-+
-+ /* Put backslash before each " */
-+ i=0;
-+ while ( filename[i] != '\0' ) {
-+ if ( filename[i] == '\"' ) {
-+ backslashedfilename[j]='\\';
-+ j++;
-+ }
-+ backslashedfilename[j]=filename[i];
-+ i++;
-+ j++;
-+ }
-+ backslashedfilename[j]='\0';
-+
-+ command = (char*) malloc(strlen(backslashedfilename)+strlen(EXTERNAL_MD5)+6);
- if (command == NULL) {
- errormsg("out of memory\n");
- exit(1);
- }
-
-- sprintf(command, "%s %s", EXTERNAL_MD5, filename);
-+ /* Qoutation required to works spaces in filenames */
-+ sprintf(command, "%s \"%s\"", EXTERNAL_MD5, backslashedfilename);
-
- result = popen(command, "r");
- if (result == NULL) {
-@@ -309,6 +340,7 @@
- exit(1);
- }
-
-+ free(backslashedfilename);
- free(command);
-
- if (fgets(signature, 256, result) == NULL) {
-
diff --git a/app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation.patch b/app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation.patch
deleted file mode 100644
index f52908d723d4..000000000000
--- a/app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Source: Peter Volkov <pva@gentoo.org>
-Upstream: notified (sent email to <adrian2 AT caribe DOT net>
-Reason: bugs.gentoo.org/237828 comment #1
-With md5sum-external fails on filenames with spaces in their names.
-
---- fdupes.c 2008-09-17 08:33:26 +0000
-+++ fdupes.c 2008-09-17 08:33:42 +0000
-@@ -301,7 +301,7 @@
- exit(1);
- }
-
-- sprintf(command, "%s %s", EXTERNAL_MD5, filename);
-+ sprintf(command, "%s '%s'", EXTERNAL_MD5, filename);
-
- result = popen(command, "r");
- if (result == NULL) {
-
diff --git a/app-misc/fdupes/files/fdupes-1.40-memcpy.patch b/app-misc/fdupes/files/fdupes-1.40-memcpy.patch
deleted file mode 100644
index 03ec0ce2ca8c..000000000000
--- a/app-misc/fdupes/files/fdupes-1.40-memcpy.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-=== modified file 'md5/md5.c'
---- md5/md5.c 2008-05-12 21:06:07 +0000
-+++ md5/md5.c 2008-05-12 21:06:23 +0000
-@@ -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] = {
-
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-lfs.patch b/app-misc/fdupes/files/fdupes-1.50_pre2-lfs.patch
new file mode 100644
index 000000000000..bd63f83291c1
--- /dev/null
+++ b/app-misc/fdupes/files/fdupes-1.50_pre2-lfs.patch
@@ -0,0 +1,21 @@
+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 --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.