1 |
commit: 6117c5631916c07eff368af7373a6561b005dcad |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 14 10:03:48 2021 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 14 10:03:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6117c563 |
7 |
|
8 |
sys-fs/ntfs3g: Remove old 2017.3.23-r3 |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
11 |
Signed-off-by: David Seifert <soap <AT> gentoo.org> |
12 |
|
13 |
sys-fs/ntfs3g/Manifest | 1 - |
14 |
sys-fs/ntfs3g/files/CVE-2019-9755.patch | 63 ---- |
15 |
.../files/ntfs3g-2014.2.15-no-split-usr.patch | 25 -- |
16 |
.../ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch | 43 --- |
17 |
.../files/ntfs3g-2017.3.23-big-sectors.patch | 379 --------------------- |
18 |
.../files/ntfs3g-2017.3.23-check-mftmirr.patch | 12 - |
19 |
.../files/ntfs3g-2017.3.23-full-clusters.patch | 81 ----- |
20 |
sys-fs/ntfs3g/metadata.xml | 50 ++- |
21 |
sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild | 106 ------ |
22 |
9 files changed, 23 insertions(+), 737 deletions(-) |
23 |
|
24 |
diff --git a/sys-fs/ntfs3g/Manifest b/sys-fs/ntfs3g/Manifest |
25 |
index c7ad50e6157..a087229bff9 100644 |
26 |
--- a/sys-fs/ntfs3g/Manifest |
27 |
+++ b/sys-fs/ntfs3g/Manifest |
28 |
@@ -1,2 +1 @@ |
29 |
-DIST ntfs-3g_ntfsprogs-2017.3.23.tgz 1259054 BLAKE2B 4f12a6061ef0c116f26225eb3fb5cb84e469b63710115fbfb54fa3802ea94192afa973a553742818ff6849b72919069ec92aca2d4d6f58d8cabca1b0fefa3abe SHA512 3a607f0d7be35204c992d8931de0404fbc52032c13b4240d2c5e6f285c318a28eb2a385d7cf5ac4cd445876aee5baa5753bb636ada0d870d84a9d3fdbce794ef |
30 |
DIST ntfs-3g_ntfsprogs-2017.3.23AR.5.tgz 1278315 BLAKE2B d4f84bf744b12fec7faff82bd3d3048282a3cbcde2ca75e5d3a295206585c4cee68e25dff5fb20b034f516a3f2cd95c489105d9df810f8a9378024ef065b67d3 SHA512 8534970ba9f07999c5ff433144ad3a59640fb9a28fb30b37b5d736101e19f9fec1c222152338be382c894f972fce2b2a83680b85a28cf147cb5500b40a0a25cc |
31 |
|
32 |
diff --git a/sys-fs/ntfs3g/files/CVE-2019-9755.patch b/sys-fs/ntfs3g/files/CVE-2019-9755.patch |
33 |
deleted file mode 100644 |
34 |
index caa079d607b..00000000000 |
35 |
--- a/sys-fs/ntfs3g/files/CVE-2019-9755.patch |
36 |
+++ /dev/null |
37 |
@@ -1,63 +0,0 @@ |
38 |
-From 85c1634a26faa572d3c558d4cf8aaaca5202d4e9 Mon Sep 17 00:00:00 2001 |
39 |
-From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= <jean-pierre.andre@×××××××.fr> |
40 |
-Date: Wed, 19 Dec 2018 15:57:50 +0100 |
41 |
-Subject: [PATCH] Fixed reporting an error when failed to build the mountpoint |
42 |
- |
43 |
-The size check was inefficient because getcwd() uses an unsigned int |
44 |
-argument. |
45 |
---- |
46 |
- src/lowntfs-3g.c | 6 +++++- |
47 |
- src/ntfs-3g.c | 6 +++++- |
48 |
- 2 files changed, 10 insertions(+), 2 deletions(-) |
49 |
- |
50 |
-diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c |
51 |
-index 993867fa..0660439b 100644 |
52 |
---- a/src/lowntfs-3g.c |
53 |
-+++ b/src/lowntfs-3g.c |
54 |
-@@ -4411,7 +4411,8 @@ int main(int argc, char *argv[]) |
55 |
- else { |
56 |
- ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX); |
57 |
- if (ctx->abs_mnt_point) { |
58 |
-- if (getcwd(ctx->abs_mnt_point, |
59 |
-+ if ((strlen(opts.mnt_point) < PATH_MAX) |
60 |
-+ && getcwd(ctx->abs_mnt_point, |
61 |
- PATH_MAX - strlen(opts.mnt_point) - 1)) { |
62 |
- strcat(ctx->abs_mnt_point, "/"); |
63 |
- strcat(ctx->abs_mnt_point, opts.mnt_point); |
64 |
-@@ -4419,6 +4420,9 @@ int main(int argc, char *argv[]) |
65 |
- /* Solaris also wants the absolute mount point */ |
66 |
- opts.mnt_point = ctx->abs_mnt_point; |
67 |
- #endif /* defined(__sun) && defined (__SVR4) */ |
68 |
-+ } else { |
69 |
-+ free(ctx->abs_mnt_point); |
70 |
-+ ctx->abs_mnt_point = (char*)NULL; |
71 |
- } |
72 |
- } |
73 |
- } |
74 |
-diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c |
75 |
-index 6ce89fef..4e0912ae 100644 |
76 |
---- a/src/ntfs-3g.c |
77 |
-+++ b/src/ntfs-3g.c |
78 |
-@@ -4148,7 +4148,8 @@ int main(int argc, char *argv[]) |
79 |
- else { |
80 |
- ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX); |
81 |
- if (ctx->abs_mnt_point) { |
82 |
-- if (getcwd(ctx->abs_mnt_point, |
83 |
-+ if ((strlen(opts.mnt_point) < PATH_MAX) |
84 |
-+ && getcwd(ctx->abs_mnt_point, |
85 |
- PATH_MAX - strlen(opts.mnt_point) - 1)) { |
86 |
- strcat(ctx->abs_mnt_point, "/"); |
87 |
- strcat(ctx->abs_mnt_point, opts.mnt_point); |
88 |
-@@ -4156,6 +4157,9 @@ int main(int argc, char *argv[]) |
89 |
- /* Solaris also wants the absolute mount point */ |
90 |
- opts.mnt_point = ctx->abs_mnt_point; |
91 |
- #endif /* defined(__sun) && defined (__SVR4) */ |
92 |
-+ } else { |
93 |
-+ free(ctx->abs_mnt_point); |
94 |
-+ ctx->abs_mnt_point = (char*)NULL; |
95 |
- } |
96 |
- } |
97 |
- } |
98 |
--- |
99 |
-2.26.1 |
100 |
- |
101 |
|
102 |
diff --git a/sys-fs/ntfs3g/files/ntfs3g-2014.2.15-no-split-usr.patch b/sys-fs/ntfs3g/files/ntfs3g-2014.2.15-no-split-usr.patch |
103 |
deleted file mode 100644 |
104 |
index 0228bfec330..00000000000 |
105 |
--- a/sys-fs/ntfs3g/files/ntfs3g-2014.2.15-no-split-usr.patch |
106 |
+++ /dev/null |
107 |
@@ -1,25 +0,0 @@ |
108 |
-we handle split /usr logic ourselves. this ends up breaking when building |
109 |
-for an abi that doesn't exist in / (like cross-compiling) as the tests fail. |
110 |
- |
111 |
---- a/libntfs-3g/Makefile.in |
112 |
-+++ b/libntfs-3g/Makefile.in |
113 |
-@@ -912,19 +912,6 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local \ |
114 |
- uninstall-rootlibLTLIBRARIES |
115 |
- |
116 |
- |
117 |
--# We may need to move .so files to root |
118 |
--# And create ldscript or symbolic link from /usr |
119 |
--install-exec-hook: install-rootlibLTLIBRARIES |
120 |
--@INSTALL_LIBRARY_TRUE@ if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \ |
121 |
--@INSTALL_LIBRARY_TRUE@ $(MV) -f "$(DESTDIR)/$(libdir)"/libntfs-3g.so* "$(DESTDIR)/$(rootlibdir)"; \ |
122 |
--@INSTALL_LIBRARY_TRUE@ fi |
123 |
--@GENERATE_LDSCRIPT_TRUE@@INSTALL_LIBRARY_TRUE@ if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \ |
124 |
--@GENERATE_LDSCRIPT_TRUE@@INSTALL_LIBRARY_TRUE@ $(install_sh_PROGRAM) "libntfs-3g.script.so" "$(DESTDIR)/$(libdir)/libntfs-3g.so"; \ |
125 |
--@GENERATE_LDSCRIPT_TRUE@@INSTALL_LIBRARY_TRUE@ fi |
126 |
--@GENERATE_LDSCRIPT_FALSE@@INSTALL_LIBRARY_TRUE@ if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \ |
127 |
--@GENERATE_LDSCRIPT_FALSE@@INSTALL_LIBRARY_TRUE@ $(LN_S) "$(rootlibdir)/libntfs-3g.so" "$(DESTDIR)/$(libdir)/libntfs-3g.so"; \ |
128 |
--@GENERATE_LDSCRIPT_FALSE@@INSTALL_LIBRARY_TRUE@ fi |
129 |
-- |
130 |
- uninstall-local: |
131 |
- @INSTALL_LIBRARY_TRUE@ $(RM) -f "$(DESTDIR)/$(rootlibdir)"/libntfs-3g.so* |
132 |
- |
133 |
|
134 |
diff --git a/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch b/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch |
135 |
deleted file mode 100644 |
136 |
index 2fa1f2b34c8..00000000000 |
137 |
--- a/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch |
138 |
+++ /dev/null |
139 |
@@ -1,43 +0,0 @@ |
140 |
-include the headers that define major/minor/makedev in more places |
141 |
- |
142 |
-https://bugs.gentoo.org/580136 |
143 |
- |
144 |
---- a/libntfs-3g/ioctl.c |
145 |
-+++ b/libntfs-3g/ioctl.c |
146 |
-@@ -57,6 +57,12 @@ |
147 |
- #ifdef HAVE_SYS_TYPES_H |
148 |
- #include <sys/types.h> |
149 |
- #endif |
150 |
-+#ifdef HAVE_SYS_MKDEV_H |
151 |
-+#include <sys/mkdev.h> |
152 |
-+#endif |
153 |
-+#ifdef HAVE_SYS_SYSMACROS_H |
154 |
-+#include <sys/sysmacros.h> |
155 |
-+#endif |
156 |
- |
157 |
- #ifdef HAVE_SYS_STAT_H |
158 |
- #include <sys/stat.h> |
159 |
---- a/src/lowntfs-3g.c |
160 |
-+++ b/src/lowntfs-3g.c |
161 |
-@@ -76,6 +76,9 @@ |
162 |
- #ifdef HAVE_SYS_MKDEV_H |
163 |
- #include <sys/mkdev.h> |
164 |
- #endif |
165 |
-+#ifdef HAVE_SYS_SYSMACROS_H |
166 |
-+#include <sys/sysmacros.h> |
167 |
-+#endif |
168 |
- |
169 |
- #if defined(__APPLE__) || defined(__DARWIN__) |
170 |
- #include <sys/dirent.h> |
171 |
---- a/src/ntfs-3g.c |
172 |
-+++ b/src/ntfs-3g.c |
173 |
-@@ -75,6 +75,9 @@ |
174 |
- #ifdef HAVE_SYS_MKDEV_H |
175 |
- #include <sys/mkdev.h> |
176 |
- #endif |
177 |
-+#ifdef HAVE_SYS_SYSMACROS_H |
178 |
-+#include <sys/sysmacros.h> |
179 |
-+#endif |
180 |
- |
181 |
- #if defined(__APPLE__) || defined(__DARWIN__) |
182 |
- #include <sys/dirent.h> |
183 |
|
184 |
diff --git a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-big-sectors.patch b/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-big-sectors.patch |
185 |
deleted file mode 100644 |
186 |
index 1cb8bb6c46c..00000000000 |
187 |
--- a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-big-sectors.patch |
188 |
+++ /dev/null |
189 |
@@ -1,379 +0,0 @@ |
190 |
---- a/libntfs-3g/bootsect.c.ref 2017-03-23 10:42:44.000000000 +0100 |
191 |
-+++ b/libntfs-3g/bootsect.c 2018-05-07 09:11:13.004710800 +0200 |
192 |
-@@ -38,6 +38,7 @@ |
193 |
- #include <errno.h> |
194 |
- #endif |
195 |
- |
196 |
-+#include "param.h" |
197 |
- #include "compat.h" |
198 |
- #include "bootsect.h" |
199 |
- #include "debug.h" |
200 |
-@@ -61,6 +62,7 @@ |
201 |
- { |
202 |
- u32 i; |
203 |
- BOOL ret = FALSE; |
204 |
-+ u16 sectors_per_cluster; |
205 |
- |
206 |
- ntfs_log_debug("Beginning bootsector check.\n"); |
207 |
- |
208 |
-@@ -83,15 +85,27 @@ |
209 |
- case 1: case 2: case 4: case 8: case 16: case 32: case 64: case 128: |
210 |
- break; |
211 |
- default: |
212 |
-- ntfs_log_error("Unexpected sectors per cluster value (%d).\n", |
213 |
-- b->bpb.sectors_per_cluster); |
214 |
-- goto not_ntfs; |
215 |
-+ if ((b->bpb.sectors_per_cluster < 240) |
216 |
-+ || (b->bpb.sectors_per_cluster > 249)) { |
217 |
-+ if (b->bpb.sectors_per_cluster > 128) |
218 |
-+ ntfs_log_error("Unexpected sectors" |
219 |
-+ " per cluster value (code 0x%x)\n", |
220 |
-+ b->bpb.sectors_per_cluster); |
221 |
-+ else |
222 |
-+ ntfs_log_error("Unexpected sectors" |
223 |
-+ " per cluster value (%d).\n", |
224 |
-+ b->bpb.sectors_per_cluster); |
225 |
-+ goto not_ntfs; |
226 |
-+ } |
227 |
- } |
228 |
- |
229 |
- ntfs_log_debug("Checking cluster size.\n"); |
230 |
-- i = (u32)le16_to_cpu(b->bpb.bytes_per_sector) * |
231 |
-- b->bpb.sectors_per_cluster; |
232 |
-- if (i > 65536) { |
233 |
-+ if (b->bpb.sectors_per_cluster > 128) |
234 |
-+ sectors_per_cluster = 1 << (256 - b->bpb.sectors_per_cluster); |
235 |
-+ else |
236 |
-+ sectors_per_cluster = b->bpb.sectors_per_cluster; |
237 |
-+ i = (u32)le16_to_cpu(b->bpb.bytes_per_sector) * sectors_per_cluster; |
238 |
-+ if (i > NTFS_MAX_CLUSTER_SIZE) { |
239 |
- ntfs_log_error("Unexpected cluster size (%d).\n", i); |
240 |
- goto not_ntfs; |
241 |
- } |
242 |
-@@ -171,7 +185,7 @@ |
243 |
- int ntfs_boot_sector_parse(ntfs_volume *vol, const NTFS_BOOT_SECTOR *bs) |
244 |
- { |
245 |
- s64 sectors; |
246 |
-- u8 sectors_per_cluster; |
247 |
-+ u16 sectors_per_cluster; |
248 |
- s8 c; |
249 |
- |
250 |
- /* We return -1 with errno = EINVAL on error. */ |
251 |
-@@ -186,7 +200,10 @@ |
252 |
- * below or equal the number_of_clusters) really belong in the |
253 |
- * ntfs_boot_sector_is_ntfs but in this way we can just do this once. |
254 |
- */ |
255 |
-- sectors_per_cluster = bs->bpb.sectors_per_cluster; |
256 |
-+ if (bs->bpb.sectors_per_cluster > 128) |
257 |
-+ sectors_per_cluster = 1 << (256 - bs->bpb.sectors_per_cluster); |
258 |
-+ else |
259 |
-+ sectors_per_cluster = bs->bpb.sectors_per_cluster; |
260 |
- ntfs_log_debug("SectorsPerCluster = 0x%x\n", sectors_per_cluster); |
261 |
- if (sectors_per_cluster & (sectors_per_cluster - 1)) { |
262 |
- ntfs_log_error("sectors_per_cluster (%d) is not a power of 2." |
263 |
---- a/ntfsprogs/mkntfs.8.in.ref 2017-03-23 10:42:44.000000000 +0100 |
264 |
-+++ b/ntfsprogs/mkntfs.8.in 2018-05-07 09:11:13.014132400 +0200 |
265 |
-@@ -132,7 +132,7 @@ |
266 |
- .TP |
267 |
- \fB\-c\fR, \fB\-\-cluster\-size\fR BYTES |
268 |
- Specify the size of clusters in bytes. Valid cluster size values are powers of |
269 |
--two, with at least 256, and at most 65536 bytes per cluster. If omitted, |
270 |
-+two, with at least 256, and at most 2097152 bytes (2MB) per cluster. If omitted, |
271 |
- .B mkntfs |
272 |
- uses 4096 bytes as the default cluster size. |
273 |
- .sp |
274 |
---- a/ntfsprogs/mkntfs.c.ref 2017-03-23 10:42:44.000000000 +0100 |
275 |
-+++ b/ntfsprogs/mkntfs.c 2018-05-07 09:11:13.035522300 +0200 |
276 |
-@@ -6,7 +6,7 @@ |
277 |
- * Copyright (c) 2002-2006 Szabolcs Szakacsits |
278 |
- * Copyright (c) 2005 Erik Sornes |
279 |
- * Copyright (c) 2007 Yura Pakhuchiy |
280 |
-- * Copyright (c) 2010-2014 Jean-Pierre Andre |
281 |
-+ * Copyright (c) 2010-2018 Jean-Pierre Andre |
282 |
- * |
283 |
- * This utility will create an NTFS 1.2 or 3.1 volume on a user |
284 |
- * specified (block) device. |
285 |
-@@ -119,6 +119,7 @@ |
286 |
- # endif |
287 |
- #endif |
288 |
- |
289 |
-+#include "param.h" |
290 |
- #include "security.h" |
291 |
- #include "types.h" |
292 |
- #include "attrib.h" |
293 |
-@@ -287,7 +288,7 @@ |
294 |
- ntfs_log_info("Copyright (c) 2002-2006 Szabolcs Szakacsits\n"); |
295 |
- ntfs_log_info("Copyright (c) 2005 Erik Sornes\n"); |
296 |
- ntfs_log_info("Copyright (c) 2007 Yura Pakhuchiy\n"); |
297 |
-- ntfs_log_info("Copyright (c) 2010-2014 Jean-Pierre Andre\n"); |
298 |
-+ ntfs_log_info("Copyright (c) 2010-2018 Jean-Pierre Andre\n"); |
299 |
- ntfs_log_info("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); |
300 |
- } |
301 |
- |
302 |
-@@ -3719,11 +3720,11 @@ |
303 |
- /* |
304 |
- * For huge volumes, grow the cluster size until the number of |
305 |
- * clusters fits into 32 bits or the cluster size exceeds the |
306 |
-- * maximum limit of 64kiB. |
307 |
-+ * maximum limit of NTFS_MAX_CLUSTER_SIZE. |
308 |
- */ |
309 |
- while (volume_size >> (ffs(vol->cluster_size) - 1 + 32)) { |
310 |
- vol->cluster_size <<= 1; |
311 |
-- if (vol->cluster_size > 65535) { |
312 |
-+ if (vol->cluster_size >= NTFS_MAX_CLUSTER_SIZE) { |
313 |
- ntfs_log_error("Device is too large to hold an " |
314 |
- "NTFS volume (maximum size is " |
315 |
- "256TiB).\n"); |
316 |
-@@ -3744,15 +3745,18 @@ |
317 |
- "to, or larger than, the sector size.\n"); |
318 |
- return FALSE; |
319 |
- } |
320 |
-- if (vol->cluster_size > 128 * (u32)opts.sector_size) { |
321 |
-+ /* Before Windows 10 Creators, the limit was 128 */ |
322 |
-+ if (vol->cluster_size > 4096 * (u32)opts.sector_size) { |
323 |
- ntfs_log_error("The cluster size is invalid. It cannot be " |
324 |
-- "more that 128 times the size of the sector " |
325 |
-+ "more that 4096 times the size of the sector " |
326 |
- "size.\n"); |
327 |
- return FALSE; |
328 |
- } |
329 |
-- if (vol->cluster_size > 65536) { |
330 |
-+ if (vol->cluster_size > NTFS_MAX_CLUSTER_SIZE) { |
331 |
- ntfs_log_error("The cluster size is invalid. The maximum " |
332 |
-- "cluster size is 65536 bytes (64kiB).\n"); |
333 |
-+ "cluster size is %lu bytes (%lukiB).\n", |
334 |
-+ (unsigned long)NTFS_MAX_CLUSTER_SIZE, |
335 |
-+ (unsigned long)(NTFS_MAX_CLUSTER_SIZE >> 10)); |
336 |
- return FALSE; |
337 |
- } |
338 |
- vol->cluster_size_bits = ffs(vol->cluster_size) - 1; |
339 |
-@@ -4387,6 +4391,7 @@ |
340 |
- u8 *sd; |
341 |
- FILE_ATTR_FLAGS extend_flags; |
342 |
- VOLUME_FLAGS volume_flags = const_cpu_to_le16(0); |
343 |
-+ int sectors_per_cluster; |
344 |
- int nr_sysfiles; |
345 |
- int buf_sds_first_size; |
346 |
- char *buf_sds; |
347 |
-@@ -4639,8 +4644,11 @@ |
348 |
- * already inserted, so no need to worry about these things. |
349 |
- */ |
350 |
- bs->bpb.bytes_per_sector = cpu_to_le16(opts.sector_size); |
351 |
-- bs->bpb.sectors_per_cluster = (u8)(g_vol->cluster_size / |
352 |
-- opts.sector_size); |
353 |
-+ sectors_per_cluster = g_vol->cluster_size / opts.sector_size; |
354 |
-+ if (sectors_per_cluster > 128) |
355 |
-+ bs->bpb.sectors_per_cluster = 257 - ffs(sectors_per_cluster); |
356 |
-+ else |
357 |
-+ bs->bpb.sectors_per_cluster = sectors_per_cluster; |
358 |
- bs->bpb.media_type = 0xf8; /* hard disk */ |
359 |
- bs->bpb.sectors_per_track = cpu_to_le16(opts.sectors_per_track); |
360 |
- ntfs_log_debug("sectors per track = %ld (0x%lx)\n", |
361 |
---- a/ntfsprogs/ntfsclone.c.ref 2017-03-23 10:42:44.000000000 +0100 |
362 |
-+++ b/ntfsprogs/ntfsclone.c 2018-05-07 09:11:38.245007100 +0200 |
363 |
-@@ -3,7 +3,7 @@ |
364 |
- * |
365 |
- * Copyright (c) 2003-2006 Szabolcs Szakacsits |
366 |
- * Copyright (c) 2004-2006 Anton Altaparmakov |
367 |
-- * Copyright (c) 2010-2016 Jean-Pierre Andre |
368 |
-+ * Copyright (c) 2010-2018 Jean-Pierre Andre |
369 |
- * Special image format support copyright (c) 2004 Per Olofsson |
370 |
- * |
371 |
- * Clone NTFS data and/or metadata to a sparse file, image, device or stdout. |
372 |
-@@ -71,6 +71,7 @@ |
373 |
- */ |
374 |
- #define NTFS_DO_NOT_CHECK_ENDIANS |
375 |
- |
376 |
-+#include "param.h" |
377 |
- #include "debug.h" |
378 |
- #include "types.h" |
379 |
- #include "support.h" |
380 |
-@@ -270,7 +271,6 @@ |
381 |
- |
382 |
- #define LAST_METADATA_INODE 11 |
383 |
- |
384 |
--#define NTFS_MAX_CLUSTER_SIZE 65536 |
385 |
- #define NTFS_SECTOR_SIZE 512 |
386 |
- |
387 |
- #define rounded_up_division(a, b) (((a) + (b - 1)) / (b)) |
388 |
-@@ -393,7 +393,7 @@ |
389 |
- "Efficiently clone, image, restore or rescue an NTFS Volume.\n\n" |
390 |
- "Copyright (c) 2003-2006 Szabolcs Szakacsits\n" |
391 |
- "Copyright (c) 2004-2006 Anton Altaparmakov\n" |
392 |
-- "Copyright (c) 2010-2016 Jean-Pierre Andre\n\n"); |
393 |
-+ "Copyright (c) 2010-2018 Jean-Pierre Andre\n\n"); |
394 |
- fprintf(stderr, "%s\n%s%s", ntfs_gpl, ntfs_bugs, ntfs_home); |
395 |
- exit(0); |
396 |
- } |
397 |
-@@ -756,7 +756,7 @@ |
398 |
- |
399 |
- static void copy_cluster(int rescue, u64 rescue_lcn, u64 lcn) |
400 |
- { |
401 |
-- char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */ |
402 |
-+ char *buff; |
403 |
- /* vol is NULL if opt.restore_image is set */ |
404 |
- s32 csize = le32_to_cpu(image_hdr.cluster_size); |
405 |
- BOOL backup_bootsector; |
406 |
-@@ -783,6 +783,10 @@ |
407 |
- } |
408 |
- } |
409 |
- |
410 |
-+ buff = (char*)ntfs_malloc(csize); |
411 |
-+ if (!buff) |
412 |
-+ err_exit("Not enough memory"); |
413 |
-+ |
414 |
- // need reading when not about to write ? |
415 |
- if (read_all(fd, buff, csize) == -1) { |
416 |
- |
417 |
-@@ -858,6 +862,7 @@ |
418 |
- perr_printf("Write failed"); |
419 |
- #endif |
420 |
- } |
421 |
-+ free(buff); |
422 |
- } |
423 |
- |
424 |
- static s64 lseek_out(int fd, s64 pos, int mode) |
425 |
-@@ -995,7 +1000,11 @@ |
426 |
- struct progress_bar *progress, u64 *p_counter) |
427 |
- { |
428 |
- s64 i; |
429 |
-- char buff[NTFS_MAX_CLUSTER_SIZE]; |
430 |
-+ char *buff; |
431 |
-+ |
432 |
-+ buff = (char*)ntfs_malloc(csize); |
433 |
-+ if (!buff) |
434 |
-+ err_exit("Not enough memory"); |
435 |
- |
436 |
- memset(buff, 0, csize); |
437 |
- |
438 |
-@@ -1004,6 +1013,7 @@ |
439 |
- perr_exit("write_all"); |
440 |
- progress_update(progress, ++(*p_counter)); |
441 |
- } |
442 |
-+ free(buff); |
443 |
- } |
444 |
- |
445 |
- static void restore_image(void) |
446 |
-@@ -1492,7 +1502,7 @@ |
447 |
- |
448 |
- static void copy_wipe_mft(ntfs_walk_clusters_ctx *image, runlist *rl) |
449 |
- { |
450 |
-- char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */ |
451 |
-+ char *buff; |
452 |
- void *fd; |
453 |
- s64 mft_no; |
454 |
- u32 mft_record_size; |
455 |
-@@ -1522,6 +1532,10 @@ |
456 |
- clusters_per_set = mft_record_size/csize; |
457 |
- records_per_set = 1; |
458 |
- } |
459 |
-+ buff = (char*)ntfs_malloc(mft_record_size); |
460 |
-+ if (!buff) |
461 |
-+ err_exit("Not enough memory"); |
462 |
-+ |
463 |
- mft_no = 0; |
464 |
- ri = rj = 0; |
465 |
- wi = wj = 0; |
466 |
-@@ -1554,6 +1568,7 @@ |
467 |
- } |
468 |
- } |
469 |
- image->current_lcn = current_lcn; |
470 |
-+ free(buff); |
471 |
- } |
472 |
- |
473 |
- /* |
474 |
-@@ -1566,7 +1581,7 @@ |
475 |
- |
476 |
- static void copy_wipe_i30(ntfs_walk_clusters_ctx *image, runlist *rl) |
477 |
- { |
478 |
-- char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */ |
479 |
-+ char *buff; |
480 |
- void *fd; |
481 |
- u32 indx_record_size; |
482 |
- u32 csize; |
483 |
-@@ -1595,6 +1610,10 @@ |
484 |
- clusters_per_set = indx_record_size/csize; |
485 |
- records_per_set = 1; |
486 |
- } |
487 |
-+ buff = (char*)ntfs_malloc(indx_record_size); |
488 |
-+ if (!buff) |
489 |
-+ err_exit("Not enough memory"); |
490 |
-+ |
491 |
- ri = rj = 0; |
492 |
- wi = wj = 0; |
493 |
- if (rl[ri].length) |
494 |
-@@ -1627,6 +1646,7 @@ |
495 |
- } |
496 |
- } |
497 |
- image->current_lcn = current_lcn; |
498 |
-+ free(buff); |
499 |
- } |
500 |
- |
501 |
- static void dump_clusters(ntfs_walk_clusters_ctx *image, runlist *rl) |
502 |
---- a/ntfsprogs/ntfsresize.c.ref 2017-03-23 10:42:44.000000000 +0100 |
503 |
-+++ b/ntfsprogs/ntfsresize.c 2018-05-07 09:11:13.076883400 +0200 |
504 |
-@@ -59,6 +59,7 @@ |
505 |
- #include <fcntl.h> |
506 |
- #endif |
507 |
- |
508 |
-+#include "param.h" |
509 |
- #include "debug.h" |
510 |
- #include "types.h" |
511 |
- #include "support.h" |
512 |
-@@ -243,8 +244,6 @@ |
513 |
- #define DIRTY_INODE (1) |
514 |
- #define DIRTY_ATTRIB (2) |
515 |
- |
516 |
--#define NTFS_MAX_CLUSTER_SIZE (65536) |
517 |
-- |
518 |
- static s64 rounded_up_division(s64 numer, s64 denom) |
519 |
- { |
520 |
- return (numer + (denom - 1)) / denom; |
521 |
-@@ -404,7 +403,7 @@ |
522 |
- printf("Copyright (c) 2002-2005 Anton Altaparmakov\n"); |
523 |
- printf("Copyright (c) 2002-2003 Richard Russon\n"); |
524 |
- printf("Copyright (c) 2007 Yura Pakhuchiy\n"); |
525 |
-- printf("Copyright (c) 2011-2016 Jean-Pierre Andre\n"); |
526 |
-+ printf("Copyright (c) 2011-2018 Jean-Pierre Andre\n"); |
527 |
- printf("\n%s\n%s%s", ntfs_gpl, ntfs_bugs, ntfs_home); |
528 |
- } |
529 |
- |
530 |
-@@ -1849,9 +1848,13 @@ |
531 |
- static void copy_clusters(ntfs_resize_t *resize, s64 dest, s64 src, s64 len) |
532 |
- { |
533 |
- s64 i; |
534 |
-- char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */ |
535 |
-+ char *buff; |
536 |
- ntfs_volume *vol = resize->vol; |
537 |
- |
538 |
-+ buff = (char*)ntfs_malloc(vol->cluster_size); |
539 |
-+ if (!buff) |
540 |
-+ perr_exit("ntfs_malloc"); |
541 |
-+ |
542 |
- for (i = 0; i < len; i++) { |
543 |
- |
544 |
- lseek_to_cluster(vol, src + i); |
545 |
-@@ -1875,6 +1878,7 @@ |
546 |
- resize->relocations++; |
547 |
- progress_update(&resize->progress, resize->relocations); |
548 |
- } |
549 |
-+ free(buff); |
550 |
- } |
551 |
- |
552 |
- static void relocate_clusters(ntfs_resize_t *r, runlist *dest_rl, s64 src_lcn) |
553 |
---- a/include/ntfs-3g/param.h.ref 2017-03-23 10:42:44.000000000 +0100 |
554 |
-+++ b/include/ntfs-3g/param.h 2018-05-07 09:11:13.088302600 +0200 |
555 |
-@@ -40,6 +40,13 @@ |
556 |
- }; |
557 |
- |
558 |
- /* |
559 |
-+ * Parameters for formatting |
560 |
-+ */ |
561 |
-+ |
562 |
-+ /* Up to Windows 10, the cluster size was limited to 64K */ |
563 |
-+#define NTFS_MAX_CLUSTER_SIZE 2097152 /* Windows 10 Creators allows 2MB */ |
564 |
-+ |
565 |
-+/* |
566 |
- * Parameters for compression |
567 |
- */ |
568 |
- |
569 |
|
570 |
diff --git a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-check-mftmirr.patch b/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-check-mftmirr.patch |
571 |
deleted file mode 100644 |
572 |
index f56eadc882f..00000000000 |
573 |
--- a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-check-mftmirr.patch |
574 |
+++ /dev/null |
575 |
@@ -1,12 +0,0 @@ |
576 |
---- a/libntfs-3g/volume.c.ref 2017-03-23 10:42:44.000000000 +0100 |
577 |
-+++ b/libntfs-3g/volume.c 2017-12-20 08:11:51.842424300 +0100 |
578 |
-@@ -959,7 +959,8 @@ |
579 |
- vol->mftmirr_size = l; |
580 |
- } |
581 |
- ntfs_log_debug("Comparing $MFTMirr to $MFT...\n"); |
582 |
-- for (i = 0; i < vol->mftmirr_size; ++i) { |
583 |
-+ /* Windows 10 does not update the full $MFTMirr any more */ |
584 |
-+ for (i = 0; (i < vol->mftmirr_size) && (i < FILE_first_user); ++i) { |
585 |
- MFT_RECORD *mrec, *mrec2; |
586 |
- const char *ESTR[12] = { "$MFT", "$MFTMirr", "$LogFile", |
587 |
- "$Volume", "$AttrDef", "root directory", "$Bitmap", |
588 |
|
589 |
diff --git a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-full-clusters.patch b/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-full-clusters.patch |
590 |
deleted file mode 100644 |
591 |
index 7d2496d372d..00000000000 |
592 |
--- a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-full-clusters.patch |
593 |
+++ /dev/null |
594 |
@@ -1,81 +0,0 @@ |
595 |
---- a/ntfsprogs/ntfsclone.c 2018-05-16 18:46:47.114964000 +0200 |
596 |
-+++ b/ntfsprogs/ntfsclone.c 2018-07-16 14:03:20.273809100 +0200 |
597 |
-@@ -776,6 +776,10 @@ |
598 |
- |
599 |
- /* possible partial cluster holding the backup boot sector */ |
600 |
- backup_bootsector = (lcn + 1)*csize >= full_device_size; |
601 |
-+ buff = (char*)ntfs_malloc(csize); |
602 |
-+ if (!buff) |
603 |
-+ err_exit("Not enough memory"); |
604 |
-+ |
605 |
- if (backup_bootsector) { |
606 |
- csize = full_device_size - lcn*csize; |
607 |
- if (csize < 0) { |
608 |
-@@ -783,10 +787,6 @@ |
609 |
- } |
610 |
- } |
611 |
- |
612 |
-- buff = (char*)ntfs_malloc(csize); |
613 |
-- if (!buff) |
614 |
-- err_exit("Not enough memory"); |
615 |
-- |
616 |
- // need reading when not about to write ? |
617 |
- if (read_all(fd, buff, csize) == -1) { |
618 |
- |
619 |
-@@ -1507,6 +1507,7 @@ |
620 |
- s64 mft_no; |
621 |
- u32 mft_record_size; |
622 |
- u32 csize; |
623 |
-+ u32 buff_size; |
624 |
- u32 bytes_per_sector; |
625 |
- u32 records_per_set; |
626 |
- u32 clusters_per_set; |
627 |
-@@ -1524,15 +1525,18 @@ |
628 |
- /* |
629 |
- * Depending on the sizes, there may be several records |
630 |
- * per cluster, or several clusters per record. |
631 |
-+ * Anyway, full clusters are needed for rescuing bad ones. |
632 |
- */ |
633 |
- if (csize >= mft_record_size) { |
634 |
- records_per_set = csize/mft_record_size; |
635 |
- clusters_per_set = 1; |
636 |
-+ buff_size = csize; |
637 |
- } else { |
638 |
- clusters_per_set = mft_record_size/csize; |
639 |
- records_per_set = 1; |
640 |
-+ buff_size = mft_record_size; |
641 |
- } |
642 |
-- buff = (char*)ntfs_malloc(mft_record_size); |
643 |
-+ buff = (char*)ntfs_malloc(buff_size); |
644 |
- if (!buff) |
645 |
- err_exit("Not enough memory"); |
646 |
- |
647 |
-@@ -1585,6 +1589,7 @@ |
648 |
- void *fd; |
649 |
- u32 indx_record_size; |
650 |
- u32 csize; |
651 |
-+ u32 buff_size; |
652 |
- u32 bytes_per_sector; |
653 |
- u32 records_per_set; |
654 |
- u32 clusters_per_set; |
655 |
-@@ -1601,16 +1606,19 @@ |
656 |
- /* |
657 |
- * Depending on the sizes, there may be several records |
658 |
- * per cluster, or several clusters per record. |
659 |
-+ * Anyway, full clusters are needed for rescuing bad ones. |
660 |
- */ |
661 |
- indx_record_size = image->ni->vol->indx_record_size; |
662 |
- if (csize >= indx_record_size) { |
663 |
- records_per_set = csize/indx_record_size; |
664 |
- clusters_per_set = 1; |
665 |
-+ buff_size = csize; |
666 |
- } else { |
667 |
- clusters_per_set = indx_record_size/csize; |
668 |
- records_per_set = 1; |
669 |
-+ buff_size = indx_record_size; |
670 |
- } |
671 |
-- buff = (char*)ntfs_malloc(indx_record_size); |
672 |
-+ buff = (char*)ntfs_malloc(buff_size); |
673 |
- if (!buff) |
674 |
- err_exit("Not enough memory"); |
675 |
- |
676 |
|
677 |
diff --git a/sys-fs/ntfs3g/metadata.xml b/sys-fs/ntfs3g/metadata.xml |
678 |
index 20cef377f9b..e443af38590 100644 |
679 |
--- a/sys-fs/ntfs3g/metadata.xml |
680 |
+++ b/sys-fs/ntfs3g/metadata.xml |
681 |
@@ -1,31 +1,27 @@ |
682 |
<?xml version="1.0" encoding="UTF-8"?> |
683 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
684 |
<pkgmetadata> |
685 |
-<maintainer type="person"> |
686 |
- <email>chutzpah@g.o</email> |
687 |
-</maintainer> |
688 |
-<maintainer type="project"> |
689 |
- <email>base-system@g.o</email> |
690 |
- <name>Gentoo Base System</name> |
691 |
-</maintainer> |
692 |
-<longdescription lang="en"> |
693 |
-The ntfs-3g driver is an open source, GPL licensed, third generation Linux |
694 |
-NTFS driver for 32-bit, little-endian architectures which was implemented |
695 |
-by the Linux-NTFS project. It provides full read-write access to NTFS, |
696 |
-excluding access to encrypted files, writing compressed files, changing |
697 |
-file ownership, access right. |
698 |
-</longdescription> |
699 |
-<use> |
700 |
- <flag name="external-fuse"> |
701 |
- Use external FUSE library instead of internal one. Must be disabled |
702 |
- for unprivileged mounting to work. |
703 |
- </flag> |
704 |
- <flag name="ntfsdecrypt">Build and install the ntfsdecrypt application.</flag> |
705 |
- <flag name="ntfsprogs">Include internal version of ntfsprogs.</flag> |
706 |
-</use> |
707 |
-<upstream> |
708 |
- <bugs-to>http://tuxera.com/forum/</bugs-to> |
709 |
- <remote-id type="cpe">cpe:/a:ntfs-3g:ntfs-3g</remote-id> |
710 |
- <remote-id type="sourceforge">ntfs-3g</remote-id> |
711 |
-</upstream> |
712 |
+ <maintainer type="person"> |
713 |
+ <email>chutzpah@g.o</email> |
714 |
+ </maintainer> |
715 |
+ <maintainer type="project"> |
716 |
+ <email>base-system@g.o</email> |
717 |
+ <name>Gentoo Base System</name> |
718 |
+ </maintainer> |
719 |
+ <longdescription lang="en"> |
720 |
+ The ntfs-3g driver is an open source, GPL licensed, third generation Linux |
721 |
+ NTFS driver for 32-bit, little-endian architectures which was implemented |
722 |
+ by the Linux-NTFS project. It provides full read-write access to NTFS, |
723 |
+ excluding access to encrypted files, writing compressed files, changing |
724 |
+ file ownership, access right. |
725 |
+ </longdescription> |
726 |
+ <use> |
727 |
+ <flag name="ntfsdecrypt">Build and install the ntfsdecrypt application.</flag> |
728 |
+ <flag name="ntfsprogs">Include internal version of ntfsprogs.</flag> |
729 |
+ </use> |
730 |
+ <upstream> |
731 |
+ <bugs-to>http://tuxera.com/forum/</bugs-to> |
732 |
+ <remote-id type="cpe">cpe:/a:ntfs-3g:ntfs-3g</remote-id> |
733 |
+ <remote-id type="sourceforge">ntfs-3g</remote-id> |
734 |
+ </upstream> |
735 |
</pkgmetadata> |
736 |
|
737 |
diff --git a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild b/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild |
738 |
deleted file mode 100644 |
739 |
index 2915df67727..00000000000 |
740 |
--- a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild |
741 |
+++ /dev/null |
742 |
@@ -1,106 +0,0 @@ |
743 |
-# Copyright 1999-2020 Gentoo Authors |
744 |
-# Distributed under the terms of the GNU General Public License v2 |
745 |
- |
746 |
-EAPI=7 |
747 |
-inherit linux-info udev toolchain-funcs libtool |
748 |
- |
749 |
-MY_PN=${PN/3g/-3g} |
750 |
-MY_P=${MY_PN}_ntfsprogs-${PV} |
751 |
- |
752 |
-DESCRIPTION="Open source read-write NTFS driver that runs under FUSE" |
753 |
-HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/" |
754 |
-SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz" |
755 |
- |
756 |
-LICENSE="GPL-2" |
757 |
-# The subslot matches the SONAME major #. |
758 |
-SLOT="0/88" |
759 |
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux" |
760 |
-IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr" |
761 |
- |
762 |
-RDEPEND=" |
763 |
- ntfsdecrypt? ( |
764 |
- >=dev-libs/libgcrypt-1.2.2:0 |
765 |
- >=net-libs/gnutls-1.4.4 |
766 |
- ) |
767 |
- external-fuse? ( |
768 |
- >=sys-fs/fuse-2.8.0:0 |
769 |
- ) |
770 |
-" |
771 |
-DEPEND="${RDEPEND} |
772 |
- sys-apps/attr |
773 |
-" |
774 |
-BDEPEND=" |
775 |
- virtual/pkgconfig |
776 |
-" |
777 |
- |
778 |
-S="${WORKDIR}/${MY_P}" |
779 |
- |
780 |
-DOCS="AUTHORS ChangeLog CREDITS README" |
781 |
- |
782 |
-PATCHES=( |
783 |
- "${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch |
784 |
- "${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136 |
785 |
- # Fedora fixes |
786 |
- "${FILESDIR}"/${PN}-2017.3.23-check-mftmirr.patch |
787 |
- "${FILESDIR}"/${PN}-2017.3.23-big-sectors.patch |
788 |
- "${FILESDIR}"/${PN}-2017.3.23-full-clusters.patch |
789 |
- "${FILESDIR}"/CVE-2019-9755.patch |
790 |
-) |
791 |
- |
792 |
-pkg_setup() { |
793 |
- if use external-fuse && use kernel_linux; then |
794 |
- if kernel_is lt 2 6 9; then |
795 |
- die "Your kernel is too old." |
796 |
- fi |
797 |
- CONFIG_CHECK="~FUSE_FS" |
798 |
- FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g" |
799 |
- linux-info_pkg_setup |
800 |
- fi |
801 |
-} |
802 |
- |
803 |
-src_prepare() { |
804 |
- default |
805 |
- # Keep the symlinks in the same place we put the main binaries. |
806 |
- # Having them in / when all the progs are in /usr is pointless. |
807 |
- sed -i \ |
808 |
- -e 's:/sbin:$(sbindir):g' \ |
809 |
- {ntfsprogs,src}/Makefile.in || die #578336 |
810 |
- # Note: patches apply to Makefile.in, so don't run autotools here. |
811 |
- elibtoolize |
812 |
-} |
813 |
- |
814 |
-src_configure() { |
815 |
- # disable hd library until we have the right library in the tree and |
816 |
- # don't links to hwinfo one causing issues like bug #602360 |
817 |
- tc-ld-disable-gold |
818 |
- # passing --exec-prefix is needed as the build system is trying to be clever |
819 |
- # and install itself into / instead of /usr in order to be compatible with |
820 |
- # separate-/usr setups (which we don't support without an initrd). |
821 |
- econf \ |
822 |
- --exec-prefix="${EPREFIX}"/usr \ |
823 |
- $(use_enable debug) \ |
824 |
- --enable-ldscript \ |
825 |
- --disable-ldconfig \ |
826 |
- $(use_enable acl posix-acls) \ |
827 |
- $(use_enable xattr xattr-mappings) \ |
828 |
- $(use_enable ntfsdecrypt crypto) \ |
829 |
- $(use_enable ntfsprogs) \ |
830 |
- $(use_enable ntfsprogs quarantined) \ |
831 |
- --without-uuid \ |
832 |
- --without-hd \ |
833 |
- --enable-extras \ |
834 |
- $(use_enable static-libs static) \ |
835 |
- --with-fuse=$(usex external-fuse external internal) |
836 |
-} |
837 |
- |
838 |
-src_install() { |
839 |
- default |
840 |
- |
841 |
- use suid && fperms u+s /usr/bin/ntfs-3g |
842 |
- # Not needed with the link of mount.ntfs being created, causes |
843 |
- # issues like bug #635080 |
844 |
-# udev_dorules "${FILESDIR}"/99-ntfs3g.rules |
845 |
- dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197 |
846 |
- |
847 |
- find "${D}" -name '*.la' -type f -delete || die |
848 |
-} |