1 |
commit: a17ee3f8845cacb0d3ab80433a250cb324c34747 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 28 20:17:40 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 28 20:17:40 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=a17ee3f8 |
7 |
|
8 |
app-misc/fdupes: remove stdin as an lvalue, bug #574610 |
9 |
|
10 |
Package-Manager: portage-2.2.26 |
11 |
RepoMan-Options: --force |
12 |
|
13 |
app-misc/fdupes/Manifest | 8 +++ |
14 |
app-misc/fdupes/fdupes-1.51-r99.ebuild | 43 ++++++++++++++++ |
15 |
.../files/fdupes-1.50_pre2-compare-file.patch | 58 ++++++++++++++++++++++ |
16 |
app-misc/fdupes/files/fdupes-1.50_pre2-typo.patch | 12 +++++ |
17 |
app-misc/fdupes/files/fdupes-1.51-makefile.patch | 23 +++++++++ |
18 |
.../files/fdupes-1.51-remove-stdin-lvalue.patch | 12 +++++ |
19 |
app-misc/fdupes/files/fdupes-9999-makefile.patch | 28 +++++++++++ |
20 |
app-misc/fdupes/metadata.xml | 11 ++++ |
21 |
8 files changed, 195 insertions(+) |
22 |
|
23 |
diff --git a/app-misc/fdupes/Manifest b/app-misc/fdupes/Manifest |
24 |
new file mode 100644 |
25 |
index 0000000..e57810b |
26 |
--- /dev/null |
27 |
+++ b/app-misc/fdupes/Manifest |
28 |
@@ -0,0 +1,8 @@ |
29 |
+AUX fdupes-1.50_pre2-compare-file.patch 2002 SHA256 a4e7bf30c18c81a3a5f5d37b0bf22354860512b1feb6a2307fa8a0c905b76ffb SHA512 53a61081cf4f0cde8ec98926edea6a6d46864b0b48f30c2112148f1aa92971b3127dd04a55689a9ba408d52a43ff0a6ebccbe5f1ff918e83943c942beca086a3 WHIRLPOOL 0633b1a6bc23a946a0f446596870fd1a0f35dbf6578a8df6205b07153f50f8807704b5f1e6c05b8706c4621ff4e28706334a5caf593927bf644e29a1fc152be3 |
30 |
+AUX fdupes-1.50_pre2-typo.patch 675 SHA256 414555ab71bf985da76d5b7163870ff069ec8116ea1561e48f32309caef53980 SHA512 fdc313c2bfa44c17bc30f2f001f06b818eeea7fddc0b2c6a600b4694cbaeb53aa4fcfd93a7fe6eb0b6d48297b1a8654481f8efa57e2a78908e75b35df5959619 WHIRLPOOL 252fde3e9a853ec76c66bad35b5cb84f65ad54d486c67e57ef041b080af8c529d16d2c0889562586574013f903e6e204dde5b1f1d9da7e2107394bce32f54843 |
31 |
+AUX fdupes-1.51-makefile.patch 779 SHA256 96d8eb5023b0b96eff7a88c1a5686c35ab8dd67e3d5ae14a80636da4d82b0971 SHA512 965b8eda17f52b822657373f3aa6d624900477c43d50fd507f853ffe10764184dac6c0f46cf40cbe371eec69f12434a63b49759c94512896640c9001641d0a8d WHIRLPOOL 87c08a67af5da2357302837904272cdad692b168ce9883f8221c807d05efea4f0b688449bfe4864c31feaac1a3c4d2779388a6fe29b63e9ec2500fe4ffbcc7ae |
32 |
+AUX fdupes-1.51-remove-stdin-lvalue.patch 368 SHA256 c58ec5755c38e4325e0a50da43c8240151ffd95bdff006628c72d6595fd3fd36 SHA512 fa6dcd5bced22c0200683e22323ca7e559408cd6192b11b23592f6dead71695e53af7f510256a531b83e9b73fe432d107fefc100f00ba0a6558436e6ee7effaf WHIRLPOOL 00798743d667c98e1c5bf1441c0fc3d81c84708dc29cec2504b308c3b3671e374fc1458f67de28a52573d34702decc00248bbe81046f9f206b88bbb8516d841c |
33 |
+AUX fdupes-9999-makefile.patch 883 SHA256 e922ed8309786ad3eedeffb90daaf2f812db48954deafcfff7a3fdc13f8e219e SHA512 2c12263ec5228f53cdb0d83f1b072a67232c86f06adc6487a543791d339421b499476462650c73ae1e87e367a69d2f9a97e7b62ee779ab8b0534843cb8c61c21 WHIRLPOOL b0f251157106123781e8df4874be99a335f946795f0acf0a28cd027fc4b2f4e1b70c87f733e05cd9008e8a1167331995cfb4bce6541a382540dd8a2ad63dcece |
34 |
+DIST fdupes-1.51.tar.gz 48942 SHA256 87dbc85b7b9cdb9626e713dd8078bd7487bceb58d47ceaff5404a9e6fd062881 SHA512 7cbc414f25427793317667b8d5494f7247a08ba402855929de77d1db01eb3dce41ea608f8dcca047c4a7856e02b10261982cf2acd7f6a79ab726b3009c710a8d WHIRLPOOL 49c4ac195270972246e54f1249749afde889926067e6a3c88f14dbe738b1ba40c085c4b6c9fc0bcbb3fa83de0bf21c54a24eea91307143083648b333c50d7305 |
35 |
+EBUILD fdupes-1.51-r99.ebuild 946 SHA256 fcfe4d3fb44064977d2c5d47edb575b9ec17e2f7cc0637981348e1432e649ec2 SHA512 86b74c571de8b84e8b94ebce64243253f678ff84375e692fb90266dd86e80ad46ad7d4252d57d5aee27af96861b1df55869d58ab8f79451af192697b3d17f2e0 WHIRLPOOL 1d2ed6522c9d7eb823083fb3ba533724a3822aa5234b7f0389ccc58c559f8770aaa60cbc23c5e5a623a0025743bcf1a707da830f48d03a84bacfb3250a9131cc |
36 |
+MISC metadata.xml 363 SHA256 29714862330e9fb0e8de365a54eafb1c4eb8a30d3b974c2dcb5fadb7b6dd1bb7 SHA512 83e4a993108b382cedc49b94c8930219ec19a884fa2ee180b6a0bd29e7d4fd9deaaeab2e101eb08e96876495b3e578321aa332473d998704cdceb3fe7e030eba WHIRLPOOL dc8ab1ce5cccde63bedafb8c825ec3f0f3721b9409a96f4f8917bbf5355248e8bfc749a28745c8ebc2846b097034a1aad652eb44ab03ba5800da6e8d581ba171 |
37 |
|
38 |
diff --git a/app-misc/fdupes/fdupes-1.51-r99.ebuild b/app-misc/fdupes/fdupes-1.51-r99.ebuild |
39 |
new file mode 100644 |
40 |
index 0000000..0b5ffca |
41 |
--- /dev/null |
42 |
+++ b/app-misc/fdupes/fdupes-1.51-r99.ebuild |
43 |
@@ -0,0 +1,43 @@ |
44 |
+# Copyright 1999-2015 Gentoo Foundation |
45 |
+# Distributed under the terms of the GNU General Public License v2 |
46 |
+# $Id$ |
47 |
+ |
48 |
+EAPI=5 |
49 |
+ |
50 |
+inherit eutils flag-o-matic toolchain-funcs |
51 |
+ |
52 |
+MY_P="${PN}-${PV/_pre/-PR}" |
53 |
+ |
54 |
+DESCRIPTION="Identify/delete duplicate files residing within specified directories" |
55 |
+HOMEPAGE="https://github.com/adrianlopezroche/fdupes https://code.google.com/p/fdupes/" |
56 |
+SRC_URI=" |
57 |
+ https://fdupes.googlecode.com/files/${P}.tar.gz |
58 |
+ https://github.com/adrianlopezroche/${PN}/archive/${P}.tar.gz |
59 |
+ " |
60 |
+ |
61 |
+LICENSE="MIT" |
62 |
+SLOT="0" |
63 |
+KEYWORDS="amd64 arm ~mips ppc x86" |
64 |
+IUSE="" |
65 |
+ |
66 |
+S="${WORKDIR}/${MY_P}" |
67 |
+ |
68 |
+src_prepare() { |
69 |
+ epatch \ |
70 |
+ "${FILESDIR}"/${P}-makefile.patch \ |
71 |
+ "${FILESDIR}"/${PN}-1.50_pre2-compare-file.patch \ |
72 |
+ "${FILESDIR}"/${PN}-1.50_pre2-typo.patch \ |
73 |
+ "${FILESDIR}"/${P}-remove-stdin-lvalue.patch |
74 |
+ |
75 |
+ append-lfs-flags |
76 |
+} |
77 |
+ |
78 |
+src_compile() { |
79 |
+ emake CC=$(tc-getCC) |
80 |
+} |
81 |
+ |
82 |
+src_install() { |
83 |
+ dobin fdupes |
84 |
+ doman fdupes.1 |
85 |
+ dodoc CHANGES CONTRIBUTORS README TODO |
86 |
+} |
87 |
|
88 |
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 |
89 |
new file mode 100644 |
90 |
index 0000000..fa9e2a3 |
91 |
--- /dev/null |
92 |
+++ b/app-misc/fdupes/files/fdupes-1.50_pre2-compare-file.patch |
93 |
@@ -0,0 +1,58 @@ |
94 |
+diff -urNp fdupes-1.50-PR2.orig/fdupes.c fdupes-1.50-PR2/fdupes.c |
95 |
+--- fdupes-1.50-PR2.orig/fdupes.c 2009-01-31 20:11:49.577968848 +0530 |
96 |
++++ fdupes-1.50-PR2/fdupes.c 2009-01-31 22:01:11.872219443 +0530 |
97 |
+@@ -492,7 +492,10 @@ file_t **checkmatch(filetree_t **root, f |
98 |
+ else { |
99 |
+ if (checktree->file->crcpartial == NULL) { |
100 |
+ crcsignature = getcrcpartialsignature(checktree->file->d_name); |
101 |
+- if (crcsignature == NULL) return NULL; |
102 |
++ if (crcsignature == NULL) { |
103 |
++ errormsg ("cannot read file %s\n", checktree->file->d_name); |
104 |
++ return NULL; |
105 |
++ } |
106 |
+ |
107 |
+ checktree->file->crcpartial = (char*) malloc(strlen(crcsignature)+1); |
108 |
+ if (checktree->file->crcpartial == NULL) { |
109 |
+@@ -504,7 +507,10 @@ file_t **checkmatch(filetree_t **root, f |
110 |
+ |
111 |
+ if (file->crcpartial == NULL) { |
112 |
+ crcsignature = getcrcpartialsignature(file->d_name); |
113 |
+- if (crcsignature == NULL) return NULL; |
114 |
++ if (crcsignature == NULL) { |
115 |
++ errormsg ("cannot read file %s\n", file->d_name); |
116 |
++ return NULL; |
117 |
++ } |
118 |
+ |
119 |
+ file->crcpartial = (char*) malloc(strlen(crcsignature)+1); |
120 |
+ if (file->crcpartial == NULL) { |
121 |
+@@ -577,8 +583,8 @@ file_t **checkmatch(filetree_t **root, f |
122 |
+ |
123 |
+ int confirmmatch(FILE *file1, FILE *file2) |
124 |
+ { |
125 |
+- unsigned char c1 = 0; |
126 |
+- unsigned char c2 = 0; |
127 |
++ unsigned char c1[CHUNK_SIZE]; |
128 |
++ unsigned char c2[CHUNK_SIZE]; |
129 |
+ size_t r1; |
130 |
+ size_t r2; |
131 |
+ |
132 |
+@@ -586,14 +592,13 @@ int confirmmatch(FILE *file1, FILE *file |
133 |
+ fseek(file2, 0, SEEK_SET); |
134 |
+ |
135 |
+ do { |
136 |
+- r1 = fread(&c1, sizeof(c1), 1, file1); |
137 |
+- r2 = fread(&c2, sizeof(c2), 1, file2); |
138 |
++ r1 = fread(c1, 1, sizeof(c1), file1); |
139 |
++ r2 = fread(c2, 1, sizeof(c2), file2); |
140 |
+ |
141 |
+- if (c1 != c2) return 0; /* file contents are different */ |
142 |
+- } while (r1 && r2); |
143 |
++ if (r1 != r2) return 0; /* file lengths are different */ |
144 |
++ if (memcmp (c1, c2, r1)) return 0; /* file contents are different */ |
145 |
++ } while (r2); |
146 |
+ |
147 |
+- if (r1 != r2) return 0; /* file lengths are different */ |
148 |
+- |
149 |
+ return 1; |
150 |
+ } |
151 |
+ |
152 |
|
153 |
diff --git a/app-misc/fdupes/files/fdupes-1.50_pre2-typo.patch b/app-misc/fdupes/files/fdupes-1.50_pre2-typo.patch |
154 |
new file mode 100644 |
155 |
index 0000000..1615a15 |
156 |
--- /dev/null |
157 |
+++ b/app-misc/fdupes/files/fdupes-1.50_pre2-typo.patch |
158 |
@@ -0,0 +1,12 @@ |
159 |
+diff -urNp fdupes-1.50-PR2.orig/fdupes.1 fdupes-1.50-PR2/fdupes.1 |
160 |
+--- fdupes-1.50-PR2.orig/fdupes.1 2009-01-31 20:11:49.581967819 +0530 |
161 |
++++ fdupes-1.50-PR2/fdupes.1 2009-01-31 20:32:46.383969471 +0530 |
162 |
+@@ -84,7 +84,7 @@ If fdupes returns with an error message |
163 |
+ .B fdupes: error invoking md5sum |
164 |
+ it means the program has been compiled to use an external |
165 |
+ program to calculate MD5 signatures (otherwise, fdupes uses |
166 |
+-interal routines for this purpose), and an error has occurred |
167 |
++internal routines for this purpose), and an error has occurred |
168 |
+ while attempting to execute it. If this is the case, the |
169 |
+ specified program should be properly installed prior |
170 |
+ to running fdupes. |
171 |
|
172 |
diff --git a/app-misc/fdupes/files/fdupes-1.51-makefile.patch b/app-misc/fdupes/files/fdupes-1.51-makefile.patch |
173 |
new file mode 100644 |
174 |
index 0000000..1389142 |
175 |
--- /dev/null |
176 |
+++ b/app-misc/fdupes/files/fdupes-1.51-makefile.patch |
177 |
@@ -0,0 +1,23 @@ |
178 |
+--- fdupes-1.50-PR2/Makefile.orig 2010-11-19 19:05:18.152330536 -0800 |
179 |
++++ fdupes-1.50-PR2/Makefile 2010-11-19 19:06:00.998659992 -0800 |
180 |
+@@ -72,9 +72,9 @@ |
181 |
+ # Make Configuration |
182 |
+ # |
183 |
+ CC = gcc |
184 |
+-COMPILER_OPTIONS = -Wall -O -g |
185 |
++COMPILER_OPTIONS = -Wall |
186 |
+ |
187 |
+-CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT) |
188 |
++CFLAGS += $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT) |
189 |
+ |
190 |
+ INSTALL_PROGRAM = $(INSTALL) -c -m 0755 |
191 |
+ INSTALL_DATA = $(INSTALL) -c -m 0644 |
192 |
+@@ -94,7 +94,7 @@ |
193 |
+ all: fdupes |
194 |
+ |
195 |
+ fdupes: $(OBJECT_FILES) |
196 |
+- $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) |
197 |
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fdupes $(OBJECT_FILES) |
198 |
+ |
199 |
+ installdirs: |
200 |
+ test -d $(BIN_DIR) || $(MKDIR) $(BIN_DIR) |
201 |
|
202 |
diff --git a/app-misc/fdupes/files/fdupes-1.51-remove-stdin-lvalue.patch b/app-misc/fdupes/files/fdupes-1.51-remove-stdin-lvalue.patch |
203 |
new file mode 100644 |
204 |
index 0000000..0a27079 |
205 |
--- /dev/null |
206 |
+++ b/app-misc/fdupes/files/fdupes-1.51-remove-stdin-lvalue.patch |
207 |
@@ -0,0 +1,12 @@ |
208 |
+diff -Naur fdupes-1.51.orig/fdupes.c fdupes-1.51/fdupes.c |
209 |
+--- fdupes-1.51.orig/fdupes.c 2016-02-28 15:12:08.484104756 -0500 |
210 |
++++ fdupes-1.51/fdupes.c 2016-02-28 15:12:49.244105441 -0500 |
211 |
+@@ -1169,7 +1169,7 @@ |
212 |
+ } |
213 |
+ else |
214 |
+ { |
215 |
+- stdin = freopen("/dev/tty", "r", stdin); |
216 |
++ freopen("/dev/tty", "r", stdin); |
217 |
+ deletefiles(files, 1, stdin); |
218 |
+ } |
219 |
+ } |
220 |
|
221 |
diff --git a/app-misc/fdupes/files/fdupes-9999-makefile.patch b/app-misc/fdupes/files/fdupes-9999-makefile.patch |
222 |
new file mode 100644 |
223 |
index 0000000..b534c64 |
224 |
--- /dev/null |
225 |
+++ b/app-misc/fdupes/files/fdupes-9999-makefile.patch |
226 |
@@ -0,0 +1,28 @@ |
227 |
+ Makefile | 6 +++--- |
228 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
229 |
+ |
230 |
+diff --git a/Makefile b/Makefile |
231 |
+index 921d910..67576f9 100644 |
232 |
+--- a/Makefile |
233 |
++++ b/Makefile |
234 |
+@@ -78,9 +78,9 @@ MKDIR = mkdir -p |
235 |
+ # Make Configuration |
236 |
+ # |
237 |
+ CC ?= gcc |
238 |
+-COMPILER_OPTIONS = -Wall -O -g |
239 |
++CFLAGS ?= -Wall -O -g |
240 |
+ |
241 |
+-CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT) |
242 |
++CFLAGS += -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT) |
243 |
+ |
244 |
+ INSTALL_PROGRAM = $(INSTALL) -c -m 0755 |
245 |
+ INSTALL_DATA = $(INSTALL) -c -m 0644 |
246 |
+@@ -100,7 +100,7 @@ OBJECT_FILES = fdupes.o md5/md5.o $(ADDITIONAL_OBJECTS) |
247 |
+ all: fdupes |
248 |
+ |
249 |
+ fdupes: $(OBJECT_FILES) |
250 |
+- $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES) |
251 |
++ $(CC) $(CFLAGS) $(LDFLAGS) -o fdupes $(OBJECT_FILES) |
252 |
+ |
253 |
+ installdirs: |
254 |
+ test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR) |
255 |
|
256 |
diff --git a/app-misc/fdupes/metadata.xml b/app-misc/fdupes/metadata.xml |
257 |
new file mode 100644 |
258 |
index 0000000..71d25d6 |
259 |
--- /dev/null |
260 |
+++ b/app-misc/fdupes/metadata.xml |
261 |
@@ -0,0 +1,11 @@ |
262 |
+<?xml version="1.0" encoding="UTF-8"?> |
263 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
264 |
+<pkgmetadata> |
265 |
+ <maintainer type="project"> |
266 |
+ <email>shell-tools@g.o</email> |
267 |
+ <name>Gentoo Shell Tools Project</name> |
268 |
+ </maintainer> |
269 |
+ <upstream> |
270 |
+ <remote-id type="github">adrianlopezroche/fdupes</remote-id> |
271 |
+ </upstream> |
272 |
+</pkgmetadata> |