summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2009-06-20 13:55:19 +0000
committerPeter Volkov <pva@gentoo.org>2009-06-20 13:55:19 +0000
commit864ab3894ee387a6ef72b2cf608bbae8684f1b3c (patch)
tree65d5a8662a70728c66a92d8029b3e0133419a733 /app-misc/fdupes
parentStable for HPPA (bug #274666). (diff)
downloadhistorical-864ab3894ee387a6ef72b2cf608bbae8684f1b3c.tar.gz
historical-864ab3894ee387a6ef72b2cf608bbae8684f1b3c.tar.bz2
historical-864ab3894ee387a6ef72b2cf608bbae8684f1b3c.zip
Fixed another regression cause by md5sum-external USE flag, bug #273597, thank Sven Wehner for detailed report.
Package-Manager: portage-2.2_rc33/cvs/Linux i686
Diffstat (limited to 'app-misc/fdupes')
-rw-r--r--app-misc/fdupes/ChangeLog9
-rw-r--r--app-misc/fdupes/Manifest4
-rw-r--r--app-misc/fdupes/fdupes-1.40-r4.ebuild40
-rw-r--r--app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation-1.patch72
4 files changed, 123 insertions, 2 deletions
diff --git a/app-misc/fdupes/ChangeLog b/app-misc/fdupes/ChangeLog
index 9c76dd0dff4e..a2506a6bd306 100644
--- a/app-misc/fdupes/ChangeLog
+++ b/app-misc/fdupes/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-misc/fdupes
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/fdupes/ChangeLog,v 1.28 2009/06/16 18:07:05 klausman Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/fdupes/ChangeLog,v 1.29 2009/06/20 13:55:18 pva Exp $
+
+*fdupes-1.40-r4 (20 Jun 2009)
+
+ 20 Jun 2009; Peter Volkov <pva@gentoo.org> +fdupes-1.40-r4.ebuild,
+ +files/fdupes-1.40-external-md5sum-quotation-1.patch:
+ Fixed another regression cause by md5sum-external USE flag, bug #273597,
+ thank Sven Wehner for detailed report.
16 Jun 2009; Tobias Klausmann <klausman@gentoo.org> fdupes-1.40-r3.ebuild:
Keyworded on alpha, bug #272785
diff --git a/app-misc/fdupes/Manifest b/app-misc/fdupes/Manifest
index ed807d148cf7..62d4d21476bc 100644
--- a/app-misc/fdupes/Manifest
+++ b/app-misc/fdupes/Manifest
@@ -1,6 +1,8 @@
+AUX fdupes-1.40-external-md5sum-quotation-1.patch 1869 RMD160 ff8040a2df43b46ee1ea36fd0d90a719b542beb8 SHA1 484a8ebd131e5b20125a8b7ae0162ab496e5b4c8 SHA256 a4425dc0237018b5297d2f0e76c1449893692107c350b212e930100c525bf5a9
AUX fdupes-1.40-external-md5sum-quotation.patch 501 RMD160 0e0b49c6ab776e73f3cffd0908f0999c446a8e72 SHA1 17c79d78db68e236db7666696557944aaad48243 SHA256 b7793ba36f71e1037375e96aee95b525e0c57b49d9bd3274d5c10626ad3bc841
AUX fdupes-1.40-memcpy.patch 404 RMD160 3eb921066e968f8616b2425d0c327b4da1b2a22e SHA1 0f253ff9995edd7afb06a835ac3c1e8823202761 SHA256 fab0d75c156101524e105902a488de4bcebdec415c2dfa6cec596b757cb576d4
DIST fdupes-1.40.tar.gz 16026 RMD160 0abd2f0dfee38cb333c1069363a65f8ab37e18dd SHA1 e1bce9bdf50d7bf700dda3eb8a3d218b181b3931 SHA256 e1ed91c44bf4a08de9a92cb019c20420874fdeed49a56e8f270ad7fc26bbdde7
EBUILD fdupes-1.40-r3.ebuild 1109 RMD160 e2013ffb666fd48b4e6817e72dee95c6b4996329 SHA1 56c4e5e9377947cd17b3af33700378f828c4f6d4 SHA256 a7cca9d29d41fdd5c8158bb79e81a89d8ef979a4065a8d0460b6db4d9564e0d2
-MISC ChangeLog 3400 RMD160 2942ef5f7135f36bd42180082902c00ea5462803 SHA1 63f59664fceff1522c06c6fa003e7d5dee2241c1 SHA256 70c2ab9a860161812eac00bc460c384ecb20b5a6b0de01cad75aff203556dd00
+EBUILD fdupes-1.40-r4.ebuild 1114 RMD160 0df0306fa3e6c54d1764f534fbed0b5b384703cc SHA1 99394aedd5de9d4aa9236e34e446b6b65e7c94d0 SHA256 dc822dd263196a324abb1302706da554b1baf8e6c0c3b56ce3bd90d572832eb7
+MISC ChangeLog 3668 RMD160 1666e58511347491177a7ca8bfd639a5b4a29377 SHA1 62f4825fa091de8d4143c1fe490489d66a19d871 SHA256 1171d26880cfcb481fa5ffbbd5df06bf1f02d834158ee9b85f5833b01df07fca
MISC metadata.xml 282 RMD160 0addf414937c807aed4272638129c7a77ef84d1e SHA1 54b1a28038a54e30507143e1974b043213d294dd SHA256 3acb9f2c77ca228e238de954252e9e42644263ff549565bdf268340f0e45a21f
diff --git a/app-misc/fdupes/fdupes-1.40-r4.ebuild b/app-misc/fdupes/fdupes-1.40-r4.ebuild
new file mode 100644
index 000000000000..c9250372b349
--- /dev/null
+++ b/app-misc/fdupes/fdupes-1.40-r4.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/fdupes/fdupes-1.40-r4.ebuild,v 1.1 2009/06/20 13:55:18 pva Exp $
+
+inherit eutils toolchain-funcs
+
+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/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="md5sum-external"
+
+DEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-memcpy.patch
+ epatch "${FILESDIR}"/${P}-external-md5sum-quotation-1.patch
+ if use md5sum-external; then
+ sed -i -e 's/^#EXTERNAL_MD5[[:blank:]]*= /EXTERNAL_MD5 = /g' \
+ Makefile || die "sed failed"
+ fi
+ sed -e 's/-o fdupes/${CFLAGS} ${LDFLAGS} -o fdupes/' -i Makefile
+}
+
+src_compile() {
+ sed -i -e "s:gcc:$(tc-getCC):" Makefile
+ emake || die
+}
+
+src_install() {
+ dobin fdupes || die
+ doman fdupes.1
+ dodoc CHANGES CONTRIBUTORS INSTALL 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
new file mode 100644
index 000000000000..1815f7b6d152
--- /dev/null
+++ b/app-misc/fdupes/files/fdupes-1.40-external-md5sum-quotation-1.patch
@@ -0,0 +1,72 @@
+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) {
+