public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/
@ 2016-05-23 19:08 Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2016-05-23 19:08 UTC (permalink / raw
  To: gentoo-commits

commit:     875494e780053656659967370155f221dcdfb5af
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon May 23 19:07:18 2016 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon May 23 19:08:17 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=875494e7

sys-fs/ntfs3g: fix build w/newer glibc #580136

 .../ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch  | 43 ++++++++++++++++++++++
 sys-fs/ntfs3g/ntfs3g-2016.2.22.ebuild              |  1 +
 2 files changed, 44 insertions(+)

diff --git a/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch b/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch
new file mode 100644
index 0000000..2fa1f2b
--- /dev/null
+++ b/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch
@@ -0,0 +1,43 @@
+include the headers that define major/minor/makedev in more places
+
+https://bugs.gentoo.org/580136
+
+--- a/libntfs-3g/ioctl.c
++++ b/libntfs-3g/ioctl.c
+@@ -57,6 +57,12 @@
+ #ifdef HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
++#ifdef HAVE_SYS_MKDEV_H
++#include <sys/mkdev.h>
++#endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include <sys/sysmacros.h>
++#endif
+ 
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+--- a/src/lowntfs-3g.c
++++ b/src/lowntfs-3g.c
+@@ -76,6 +76,9 @@
+ #ifdef HAVE_SYS_MKDEV_H
+ #include <sys/mkdev.h>
+ #endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include <sys/sysmacros.h>
++#endif
+ 
+ #if defined(__APPLE__) || defined(__DARWIN__)
+ #include <sys/dirent.h>
+--- a/src/ntfs-3g.c
++++ b/src/ntfs-3g.c
+@@ -75,6 +75,9 @@
+ #ifdef HAVE_SYS_MKDEV_H
+ #include <sys/mkdev.h>
+ #endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include <sys/sysmacros.h>
++#endif
+ 
+ #if defined(__APPLE__) || defined(__DARWIN__)
+ #include <sys/dirent.h>

diff --git a/sys-fs/ntfs3g/ntfs3g-2016.2.22.ebuild b/sys-fs/ntfs3g/ntfs3g-2016.2.22.ebuild
index fbac7ac..4222ccd 100644
--- a/sys-fs/ntfs3g/ntfs3g-2016.2.22.ebuild
+++ b/sys-fs/ntfs3g/ntfs3g-2016.2.22.ebuild
@@ -34,6 +34,7 @@ DOCS="AUTHORS ChangeLog CREDITS README"
 
 PATCHES=(
 	"${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
+	"${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
 )
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/
@ 2017-02-01 22:36 Patrick McLean
  0 siblings, 0 replies; 6+ messages in thread
From: Patrick McLean @ 2017-02-01 22:36 UTC (permalink / raw
  To: gentoo-commits

commit:     63ab8f5018576fc957feef2f1cc35fc7aabd12df
Author:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  1 22:35:58 2017 +0000
Commit:     Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Wed Feb  1 22:36:29 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63ab8f50

sys-fs/ntfs3g: Revision bump to 2016.2.22-r2 to add patch for CVE-2017-0358

Gentoo-Bug: 607912

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../files/ntfs3g-2016.2.22-CVE-2017-0358.patch     | 40 ++++++++++
 sys-fs/ntfs3g/ntfs3g-2016.2.22-r2.ebuild           | 91 ++++++++++++++++++++++
 2 files changed, 131 insertions(+)

diff --git a/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-CVE-2017-0358.patch b/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-CVE-2017-0358.patch
new file mode 100644
index 00000000..1ce7e9c
--- /dev/null
+++ b/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-CVE-2017-0358.patch
@@ -0,0 +1,40 @@
+diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
+index 0bb38f97..c6d1dad3 100644
+--- a/src/lowntfs-3g.c
++++ b/src/lowntfs-3g.c
+@@ -3827,13 +3827,14 @@ static fuse_fstype load_fuse_module(void)
+ 	struct stat st;
+ 	pid_t pid;
+ 	const char *cmd = "/sbin/modprobe";
++	char *env = (char*)NULL;
+ 	struct timespec req = { 0, 100000000 };   /* 100 msec */
+ 	fuse_fstype fstype;
+         
+ 	if (!stat(cmd, &st) && !geteuid()) {
+ 		pid = fork();
+ 		if (!pid) {
+-			execl(cmd, cmd, "fuse", NULL);
++			execle(cmd, cmd, "fuse", NULL, &env);
+ 			_exit(1);
+ 		} else if (pid != -1)
+ 			waitpid(pid, NULL, 0);
+diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
+index 268b0569..945fc0be 100644
+--- a/src/ntfs-3g.c
++++ b/src/ntfs-3g.c
+@@ -3612,13 +3612,14 @@ static fuse_fstype load_fuse_module(void)
+ 	struct stat st;
+ 	pid_t pid;
+ 	const char *cmd = "/sbin/modprobe";
++	char *env = (char*)NULL;
+ 	struct timespec req = { 0, 100000000 };   /* 100 msec */
+ 	fuse_fstype fstype;
+ 	
+ 	if (!stat(cmd, &st) && !geteuid()) {
+ 		pid = fork();
+ 		if (!pid) {
+-			execl(cmd, cmd, "fuse", NULL);
++			execle(cmd, cmd, "fuse", NULL, &env);
+ 			_exit(1);
+ 		} else if (pid != -1)
+ 			waitpid(pid, NULL, 0);

diff --git a/sys-fs/ntfs3g/ntfs3g-2016.2.22-r2.ebuild b/sys-fs/ntfs3g/ntfs3g-2016.2.22-r2.ebuild
new file mode 100644
index 00000000..65d95f8
--- /dev/null
+++ b/sys-fs/ntfs3g/ntfs3g-2016.2.22-r2.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils linux-info udev toolchain-funcs libtool
+
+MY_PN=${PN/3g/-3g}
+MY_P=${MY_PN}_ntfsprogs-${PV}
+
+DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
+HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
+SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+# The subslot matches the SONAME major #.
+SLOT="0/87"
+KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr"
+
+RDEPEND="!<sys-apps/util-linux-2.20.1-r2
+	!sys-fs/ntfsprogs
+	ntfsdecrypt? (
+		>=dev-libs/libgcrypt-1.2.2:0
+		>=net-libs/gnutls-1.4.4
+	)
+	external-fuse? ( >=sys-fs/fuse-2.8.0 )"
+DEPEND="${RDEPEND}
+	sys-apps/attr
+	virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="AUTHORS ChangeLog CREDITS README"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
+	"${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
+	"${FILESDIR}"/${PN}-2016.2.22-CVE-2017-0358.patch #607912
+)
+
+pkg_setup() {
+	if use external-fuse && use kernel_linux; then
+		if kernel_is lt 2 6 9; then
+			die "Your kernel is too old."
+		fi
+		CONFIG_CHECK="~FUSE_FS"
+		FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	epatch "${PATCHES[@]}"
+	# Keep the symlinks in the same place we put the main binaries.
+	# Having them in / when all the progs are in /usr is pointless.
+	sed -i \
+		-e 's:/sbin:$(sbindir):g' \
+		{ntfsprogs,src}/Makefile.in || die #578336
+	# Note: patches apply to Makefile.in, so don't run autotools here.
+	elibtoolize
+}
+
+src_configure() {
+	tc-ld-disable-gold
+	econf \
+		--prefix="${EPREFIX}"/usr \
+		--exec-prefix="${EPREFIX}"/usr \
+		--docdir="${EPREFIX}"/usr/share/doc/${PF} \
+		$(use_enable debug) \
+		--enable-ldscript \
+		--disable-ldconfig \
+		$(use_enable acl posix-acls) \
+		$(use_enable xattr xattr-mappings) \
+		$(use_enable ntfsdecrypt crypto) \
+		$(use_enable ntfsprogs) \
+		$(use_enable ntfsprogs quarantined) \
+		--without-uuid \
+		--enable-extras \
+		$(use_enable static-libs static) \
+		--with-fuse=$(usex external-fuse external internal)
+}
+
+src_install() {
+	default
+
+	use suid && fperms u+s /usr/bin/${MY_PN}
+	udev_dorules "${FILESDIR}"/99-ntfs3g.rules
+	prune_libtool_files
+
+	dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/
@ 2019-03-23 12:59 Pacho Ramos
  0 siblings, 0 replies; 6+ messages in thread
From: Pacho Ramos @ 2019-03-23 12:59 UTC (permalink / raw
  To: gentoo-commits

commit:     e97a616356b7dccec15d1c5be2c2c861afa160fa
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 12:58:31 2019 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 12:58:49 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e97a6163

sys-fs/ntfs3g: Support Windows 10, fix automagic dep...

- Apply Fedora fixes, this also adds support for windows 10 (#660374)
- Prevent it from wrongly linking to hwinfo (#602360)
- udev rule is not needed and causes issues (#635080)

Closes: https://bugs.gentoo.org/660374
Closes: https://bugs.gentoo.org/635080
Bug: https://bugs.gentoo.org/602360
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 .../files/ntfs3g-2017.3.23-big-sectors.patch       | 379 +++++++++++++++++++++
 .../files/ntfs3g-2017.3.23-check-mftmirr.patch     |  12 +
 .../files/ntfs3g-2017.3.23-full-clusters.patch     |  81 +++++
 sys-fs/ntfs3g/ntfs3g-2017.3.23-r2.ebuild           | 103 ++++++
 4 files changed, 575 insertions(+)

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
new file mode 100644
index 00000000000..1cb8bb6c46c
--- /dev/null
+++ b/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-big-sectors.patch
@@ -0,0 +1,379 @@
+--- a/libntfs-3g/bootsect.c.ref	2017-03-23 10:42:44.000000000 +0100
++++ b/libntfs-3g/bootsect.c	2018-05-07 09:11:13.004710800 +0200
+@@ -38,6 +38,7 @@ 
+ #include <errno.h>
+ #endif
+ 
++#include "param.h"
+ #include "compat.h"
+ #include "bootsect.h"
+ #include "debug.h"
+@@ -61,6 +62,7 @@ 
+ {
+ 	u32 i;
+ 	BOOL ret = FALSE;
++	u16 sectors_per_cluster;
+ 
+ 	ntfs_log_debug("Beginning bootsector check.\n");
+ 
+@@ -83,15 +85,27 @@ 
+ 	case 1: case 2: case 4: case 8: case 16: case 32: case 64: case 128:
+ 		break;
+ 	default:
+-		ntfs_log_error("Unexpected sectors per cluster value (%d).\n",
+-			       b->bpb.sectors_per_cluster);
+-		goto not_ntfs;
++		if ((b->bpb.sectors_per_cluster < 240)
++		    || (b->bpb.sectors_per_cluster > 249)) {
++			if (b->bpb.sectors_per_cluster > 128)
++				ntfs_log_error("Unexpected sectors"
++					" per cluster value (code 0x%x)\n",
++					b->bpb.sectors_per_cluster);
++			else
++				ntfs_log_error("Unexpected sectors"
++					" per cluster value (%d).\n",
++					b->bpb.sectors_per_cluster);
++			goto not_ntfs;
++		}
+ 	}
+ 
+ 	ntfs_log_debug("Checking cluster size.\n");
+-	i = (u32)le16_to_cpu(b->bpb.bytes_per_sector) * 
+-		b->bpb.sectors_per_cluster;
+-	if (i > 65536) {
++	if (b->bpb.sectors_per_cluster > 128)
++		sectors_per_cluster = 1 << (256 - b->bpb.sectors_per_cluster);
++	else
++		sectors_per_cluster = b->bpb.sectors_per_cluster;
++	i = (u32)le16_to_cpu(b->bpb.bytes_per_sector) * sectors_per_cluster;
++	if (i > NTFS_MAX_CLUSTER_SIZE) {
+ 		ntfs_log_error("Unexpected cluster size (%d).\n", i);
+ 		goto not_ntfs;
+ 	}
+@@ -171,7 +185,7 @@ 
+ int ntfs_boot_sector_parse(ntfs_volume *vol, const NTFS_BOOT_SECTOR *bs)
+ {
+ 	s64 sectors;
+-	u8  sectors_per_cluster;
++	u16  sectors_per_cluster;
+ 	s8  c;
+ 
+ 	/* We return -1 with errno = EINVAL on error. */
+@@ -186,7 +200,10 @@ 
+ 	 * below or equal the number_of_clusters) really belong in the
+ 	 * ntfs_boot_sector_is_ntfs but in this way we can just do this once.
+ 	 */
+-	sectors_per_cluster = bs->bpb.sectors_per_cluster;
++	if (bs->bpb.sectors_per_cluster > 128)
++		sectors_per_cluster = 1 << (256 - bs->bpb.sectors_per_cluster);
++	else
++		sectors_per_cluster = bs->bpb.sectors_per_cluster;
+ 	ntfs_log_debug("SectorsPerCluster = 0x%x\n", sectors_per_cluster);
+ 	if (sectors_per_cluster & (sectors_per_cluster - 1)) {
+ 		ntfs_log_error("sectors_per_cluster (%d) is not a power of 2."
+--- a/ntfsprogs/mkntfs.8.in.ref	2017-03-23 10:42:44.000000000 +0100
++++ b/ntfsprogs/mkntfs.8.in	2018-05-07 09:11:13.014132400 +0200
+@@ -132,7 +132,7 @@ 
+ .TP
+ \fB\-c\fR, \fB\-\-cluster\-size\fR BYTES
+ Specify the size of clusters in bytes. Valid cluster size values are powers of
+-two, with at least 256, and at most 65536 bytes per cluster. If omitted,
++two, with at least 256, and at most 2097152 bytes (2MB) per cluster. If omitted,
+ .B mkntfs
+ uses 4096 bytes as the default cluster size.
+ .sp
+--- a/ntfsprogs/mkntfs.c.ref	2017-03-23 10:42:44.000000000 +0100
++++ b/ntfsprogs/mkntfs.c	2018-05-07 09:11:13.035522300 +0200
+@@ -6,7 +6,7 @@ 
+  * Copyright (c) 2002-2006 Szabolcs Szakacsits
+  * Copyright (c) 2005      Erik Sornes
+  * Copyright (c) 2007      Yura Pakhuchiy
+- * Copyright (c) 2010-2014 Jean-Pierre Andre
++ * Copyright (c) 2010-2018 Jean-Pierre Andre
+  *
+  * This utility will create an NTFS 1.2 or 3.1 volume on a user
+  * specified (block) device.
+@@ -119,6 +119,7 @@ 
+ #	endif
+ #endif
+ 
++#include "param.h"
+ #include "security.h"
+ #include "types.h"
+ #include "attrib.h"
+@@ -287,7 +288,7 @@ 
+ 	ntfs_log_info("Copyright (c) 2002-2006 Szabolcs Szakacsits\n");
+ 	ntfs_log_info("Copyright (c) 2005      Erik Sornes\n");
+ 	ntfs_log_info("Copyright (c) 2007      Yura Pakhuchiy\n");
+-	ntfs_log_info("Copyright (c) 2010-2014 Jean-Pierre Andre\n");
++	ntfs_log_info("Copyright (c) 2010-2018 Jean-Pierre Andre\n");
+ 	ntfs_log_info("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home);
+ }
+ 
+@@ -3719,11 +3720,11 @@ 
+ 		/*
+ 		 * For huge volumes, grow the cluster size until the number of
+ 		 * clusters fits into 32 bits or the cluster size exceeds the
+-		 * maximum limit of 64kiB.
++		 * maximum limit of NTFS_MAX_CLUSTER_SIZE.
+ 		 */
+ 		while (volume_size >> (ffs(vol->cluster_size) - 1 + 32)) {
+ 			vol->cluster_size <<= 1;
+-			if (vol->cluster_size > 65535) {
++			if (vol->cluster_size >= NTFS_MAX_CLUSTER_SIZE) {
+ 				ntfs_log_error("Device is too large to hold an "
+ 						"NTFS volume (maximum size is "
+ 						"256TiB).\n");
+@@ -3744,15 +3745,18 @@ 
+ 				"to, or larger than, the sector size.\n");
+ 		return FALSE;
+ 	}
+-	if (vol->cluster_size > 128 * (u32)opts.sector_size) {
++		/* Before Windows 10 Creators, the limit was 128 */
++	if (vol->cluster_size > 4096 * (u32)opts.sector_size) {
+ 		ntfs_log_error("The cluster size is invalid.  It cannot be "
+-				"more that 128 times the size of the sector "
++				"more that 4096 times the size of the sector "
+ 				"size.\n");
+ 		return FALSE;
+ 	}
+-	if (vol->cluster_size > 65536) {
++	if (vol->cluster_size > NTFS_MAX_CLUSTER_SIZE) {
+ 		ntfs_log_error("The cluster size is invalid.  The maximum "
+-			"cluster size is 65536 bytes (64kiB).\n");
++			"cluster size is %lu bytes (%lukiB).\n",
++			(unsigned long)NTFS_MAX_CLUSTER_SIZE,
++			(unsigned long)(NTFS_MAX_CLUSTER_SIZE >> 10));
+ 		return FALSE;
+ 	}
+ 	vol->cluster_size_bits = ffs(vol->cluster_size) - 1;
+@@ -4387,6 +4391,7 @@ 
+ 	u8 *sd;
+ 	FILE_ATTR_FLAGS extend_flags;
+ 	VOLUME_FLAGS volume_flags = const_cpu_to_le16(0);
++	int sectors_per_cluster;
+ 	int nr_sysfiles;
+ 	int buf_sds_first_size;
+ 	char *buf_sds;
+@@ -4639,8 +4644,11 @@ 
+ 	 * already inserted, so no need to worry about these things.
+ 	 */
+ 	bs->bpb.bytes_per_sector = cpu_to_le16(opts.sector_size);
+-	bs->bpb.sectors_per_cluster = (u8)(g_vol->cluster_size /
+-			opts.sector_size);
++	sectors_per_cluster = g_vol->cluster_size / opts.sector_size;
++	if (sectors_per_cluster > 128)
++		bs->bpb.sectors_per_cluster = 257 - ffs(sectors_per_cluster);
++	else
++		bs->bpb.sectors_per_cluster = sectors_per_cluster;
+ 	bs->bpb.media_type = 0xf8; /* hard disk */
+ 	bs->bpb.sectors_per_track = cpu_to_le16(opts.sectors_per_track);
+ 	ntfs_log_debug("sectors per track = %ld (0x%lx)\n",
+--- a/ntfsprogs/ntfsclone.c.ref	2017-03-23 10:42:44.000000000 +0100
++++ b/ntfsprogs/ntfsclone.c	2018-05-07 09:11:38.245007100 +0200
+@@ -3,7 +3,7 @@ 
+  *
+  * Copyright (c) 2003-2006 Szabolcs Szakacsits
+  * Copyright (c) 2004-2006 Anton Altaparmakov
+- * Copyright (c) 2010-2016 Jean-Pierre Andre
++ * Copyright (c) 2010-2018 Jean-Pierre Andre
+  * Special image format support copyright (c) 2004 Per Olofsson
+  *
+  * Clone NTFS data and/or metadata to a sparse file, image, device or stdout.
+@@ -71,6 +71,7 @@ 
+  */
+ #define NTFS_DO_NOT_CHECK_ENDIANS
+ 
++#include "param.h"
+ #include "debug.h"
+ #include "types.h"
+ #include "support.h"
+@@ -270,7 +271,6 @@ 
+ 
+ #define LAST_METADATA_INODE	11
+ 
+-#define NTFS_MAX_CLUSTER_SIZE	65536
+ #define NTFS_SECTOR_SIZE	  512
+ 
+ #define rounded_up_division(a, b) (((a) + (b - 1)) / (b))
+@@ -393,7 +393,7 @@ 
+ 		   "Efficiently clone, image, restore or rescue an NTFS Volume.\n\n"
+ 		   "Copyright (c) 2003-2006 Szabolcs Szakacsits\n"
+ 		   "Copyright (c) 2004-2006 Anton Altaparmakov\n"
+-		   "Copyright (c) 2010-2016 Jean-Pierre Andre\n\n");
++		   "Copyright (c) 2010-2018 Jean-Pierre Andre\n\n");
+ 	fprintf(stderr, "%s\n%s%s", ntfs_gpl, ntfs_bugs, ntfs_home);
+ 	exit(0);
+ }
+@@ -756,7 +756,7 @@ 
+ 
+ static void copy_cluster(int rescue, u64 rescue_lcn, u64 lcn)
+ {
+-	char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */
++	char *buff;
+ 	/* vol is NULL if opt.restore_image is set */
+ 	s32 csize = le32_to_cpu(image_hdr.cluster_size);
+ 	BOOL backup_bootsector;
+@@ -783,6 +783,10 @@ 
+ 		}
+ 	}
+ 
++	buff = (char*)ntfs_malloc(csize);
++	if (!buff)
++		err_exit("Not enough memory");
++
+ // need reading when not about to write ?
+ 	if (read_all(fd, buff, csize) == -1) {
+ 
+@@ -858,6 +862,7 @@ 
+ 		perr_printf("Write failed");
+ #endif
+ 	}
++	free(buff);
+ }
+ 
+ static s64 lseek_out(int fd, s64 pos, int mode)
+@@ -995,7 +1000,11 @@ 
+ 				 struct progress_bar *progress, u64 *p_counter)
+ {
+ 	s64 i;
+-	char buff[NTFS_MAX_CLUSTER_SIZE];
++	char *buff;
++
++	buff = (char*)ntfs_malloc(csize);
++	if (!buff)
++		err_exit("Not enough memory");
+ 
+ 	memset(buff, 0, csize);
+ 
+@@ -1004,6 +1013,7 @@ 
+ 			perr_exit("write_all");
+ 		progress_update(progress, ++(*p_counter));
+ 	}
++	free(buff);
+ }
+ 
+ static void restore_image(void)
+@@ -1492,7 +1502,7 @@ 
+ 
+ static void copy_wipe_mft(ntfs_walk_clusters_ctx *image, runlist *rl)
+ {
+-	char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */
++	char *buff;
+ 	void *fd;
+ 	s64 mft_no;
+ 	u32 mft_record_size;
+@@ -1522,6 +1532,10 @@ 
+ 		clusters_per_set = mft_record_size/csize;
+ 		records_per_set = 1;
+ 	}
++	buff = (char*)ntfs_malloc(mft_record_size);
++	if (!buff)
++		err_exit("Not enough memory");
++
+ 	mft_no = 0;
+ 	ri = rj = 0;
+ 	wi = wj = 0;
+@@ -1554,6 +1568,7 @@ 
+ 		}
+ 	}
+ 	image->current_lcn = current_lcn;
++	free(buff);
+ }
+ 
+ /*
+@@ -1566,7 +1581,7 @@ 
+ 
+ static void copy_wipe_i30(ntfs_walk_clusters_ctx *image, runlist *rl)
+ {
+-	char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */
++	char *buff;
+ 	void *fd;
+ 	u32 indx_record_size;
+ 	u32 csize;
+@@ -1595,6 +1610,10 @@ 
+ 		clusters_per_set = indx_record_size/csize;
+ 		records_per_set = 1;
+ 	}
++	buff = (char*)ntfs_malloc(indx_record_size);
++	if (!buff)
++		err_exit("Not enough memory");
++
+ 	ri = rj = 0;
+ 	wi = wj = 0;
+ 	if (rl[ri].length)
+@@ -1627,6 +1646,7 @@ 
+ 		}
+ 	}
+ 	image->current_lcn = current_lcn;
++	free(buff);
+ }
+ 
+ static void dump_clusters(ntfs_walk_clusters_ctx *image, runlist *rl)
+--- a/ntfsprogs/ntfsresize.c.ref	2017-03-23 10:42:44.000000000 +0100
++++ b/ntfsprogs/ntfsresize.c	2018-05-07 09:11:13.076883400 +0200
+@@ -59,6 +59,7 @@ 
+ #include <fcntl.h>
+ #endif
+ 
++#include "param.h"
+ #include "debug.h"
+ #include "types.h"
+ #include "support.h"
+@@ -243,8 +244,6 @@ 
+ #define DIRTY_INODE		(1)
+ #define DIRTY_ATTRIB		(2)
+ 
+-#define NTFS_MAX_CLUSTER_SIZE	(65536)
+-
+ static s64 rounded_up_division(s64 numer, s64 denom)
+ {
+ 	return (numer + (denom - 1)) / denom;
+@@ -404,7 +403,7 @@ 
+ 	printf("Copyright (c) 2002-2005  Anton Altaparmakov\n");
+ 	printf("Copyright (c) 2002-2003  Richard Russon\n");
+ 	printf("Copyright (c) 2007       Yura Pakhuchiy\n");
+-	printf("Copyright (c) 2011-2016  Jean-Pierre Andre\n");
++	printf("Copyright (c) 2011-2018  Jean-Pierre Andre\n");
+ 	printf("\n%s\n%s%s", ntfs_gpl, ntfs_bugs, ntfs_home);
+ }
+ 
+@@ -1849,9 +1848,13 @@ 
+ static void copy_clusters(ntfs_resize_t *resize, s64 dest, s64 src, s64 len)
+ {
+ 	s64 i;
+-	char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */
++	char *buff;
+ 	ntfs_volume *vol = resize->vol;
+ 
++	buff = (char*)ntfs_malloc(vol->cluster_size);
++	if (!buff)
++		perr_exit("ntfs_malloc");
++
+ 	for (i = 0; i < len; i++) {
+ 
+ 		lseek_to_cluster(vol, src + i);
+@@ -1875,6 +1878,7 @@ 
+ 		resize->relocations++;
+ 		progress_update(&resize->progress, resize->relocations);
+ 	}
++	free(buff);
+ }
+ 
+ static void relocate_clusters(ntfs_resize_t *r, runlist *dest_rl, s64 src_lcn)
+--- a/include/ntfs-3g/param.h.ref	2017-03-23 10:42:44.000000000 +0100
++++ b/include/ntfs-3g/param.h	2018-05-07 09:11:13.088302600 +0200
+@@ -40,6 +40,13 @@ 
+ };
+ 
+ /*
++ *		Parameters for formatting
++ */
++
++		/* Up to Windows 10, the cluster size was limited to 64K */
++#define NTFS_MAX_CLUSTER_SIZE 2097152 /* Windows 10 Creators allows 2MB */
++
++/*
+  *		Parameters for compression
+  */
+ 

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
new file mode 100644
index 00000000000..f56eadc882f
--- /dev/null
+++ b/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-check-mftmirr.patch
@@ -0,0 +1,12 @@
+--- a/libntfs-3g/volume.c.ref	2017-03-23 10:42:44.000000000 +0100
++++ b/libntfs-3g/volume.c	2017-12-20 08:11:51.842424300 +0100
+@@ -959,7 +959,8 @@
+ 		vol->mftmirr_size = l;
+ 	}
+ 	ntfs_log_debug("Comparing $MFTMirr to $MFT...\n");
+-	for (i = 0; i < vol->mftmirr_size; ++i) {
++		/* Windows 10 does not update the full $MFTMirr any more */
++	for (i = 0; (i < vol->mftmirr_size) && (i < FILE_first_user); ++i) {
+ 		MFT_RECORD *mrec, *mrec2;
+ 		const char *ESTR[12] = { "$MFT", "$MFTMirr", "$LogFile",
+ 			"$Volume", "$AttrDef", "root directory", "$Bitmap",

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
new file mode 100644
index 00000000000..7d2496d372d
--- /dev/null
+++ b/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-full-clusters.patch
@@ -0,0 +1,81 @@
+--- a/ntfsprogs/ntfsclone.c	2018-05-16 18:46:47.114964000 +0200
++++ b/ntfsprogs/ntfsclone.c	2018-07-16 14:03:20.273809100 +0200
+@@ -776,6 +776,10 @@ 
+ 
+ 		/* possible partial cluster holding the backup boot sector */
+ 	backup_bootsector = (lcn + 1)*csize >= full_device_size;
++	buff = (char*)ntfs_malloc(csize);
++	if (!buff)
++		err_exit("Not enough memory");
++
+ 	if (backup_bootsector) {
+ 		csize = full_device_size - lcn*csize;
+ 		if (csize < 0) {
+@@ -783,10 +787,6 @@ 
+ 		}
+ 	}
+ 
+-	buff = (char*)ntfs_malloc(csize);
+-	if (!buff)
+-		err_exit("Not enough memory");
+-
+ // need reading when not about to write ?
+ 	if (read_all(fd, buff, csize) == -1) {
+ 
+@@ -1507,6 +1507,7 @@ 
+ 	s64 mft_no;
+ 	u32 mft_record_size;
+ 	u32 csize;
++	u32 buff_size;
+ 	u32 bytes_per_sector;
+ 	u32 records_per_set;
+ 	u32 clusters_per_set;
+@@ -1524,15 +1525,18 @@ 
+ 		/*
+ 		 * Depending on the sizes, there may be several records
+ 		 * per cluster, or several clusters per record.
++		 * Anyway, full clusters are needed for rescuing bad ones.
+ 		 */
+ 	if (csize >= mft_record_size) {
+ 		records_per_set = csize/mft_record_size;
+ 		clusters_per_set = 1;
++		buff_size = csize;
+ 	} else {
+ 		clusters_per_set = mft_record_size/csize;
+ 		records_per_set = 1;
++		buff_size = mft_record_size;
+ 	}
+-	buff = (char*)ntfs_malloc(mft_record_size);
++	buff = (char*)ntfs_malloc(buff_size);
+ 	if (!buff)
+ 		err_exit("Not enough memory");
+ 
+@@ -1585,6 +1589,7 @@ 
+ 	void *fd;
+ 	u32 indx_record_size;
+ 	u32 csize;
++	u32 buff_size;
+ 	u32 bytes_per_sector;
+ 	u32 records_per_set;
+ 	u32 clusters_per_set;
+@@ -1601,16 +1606,19 @@ 
+ 		/*
+ 		 * Depending on the sizes, there may be several records
+ 		 * per cluster, or several clusters per record.
++		 * Anyway, full clusters are needed for rescuing bad ones.
+ 		 */
+ 	indx_record_size = image->ni->vol->indx_record_size;
+ 	if (csize >= indx_record_size) {
+ 		records_per_set = csize/indx_record_size;
+ 		clusters_per_set = 1;
++		buff_size = csize;
+ 	} else {
+ 		clusters_per_set = indx_record_size/csize;
+ 		records_per_set = 1;
++		buff_size = indx_record_size;
+ 	}
+-	buff = (char*)ntfs_malloc(indx_record_size);
++	buff = (char*)ntfs_malloc(buff_size);
+ 	if (!buff)
+ 		err_exit("Not enough memory");
+ 

diff --git a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r2.ebuild b/sys-fs/ntfs3g/ntfs3g-2017.3.23-r2.ebuild
new file mode 100644
index 00000000000..fb67e549b9c
--- /dev/null
+++ b/sys-fs/ntfs3g/ntfs3g-2017.3.23-r2.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit linux-info udev toolchain-funcs libtool
+
+MY_PN=${PN/3g/-3g}
+MY_P=${MY_PN}_ntfsprogs-${PV}
+
+DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
+HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
+SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+# The subslot matches the SONAME major #.
+SLOT="0/88"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr"
+
+RDEPEND="!<sys-apps/util-linux-2.20.1-r2
+	!sys-fs/ntfsprogs
+	ntfsdecrypt? (
+		>=dev-libs/libgcrypt-1.2.2:0
+		>=net-libs/gnutls-1.4.4
+	)
+	external-fuse? (
+		>=sys-fs/fuse-2.8.0:0
+	)
+"
+DEPEND="${RDEPEND}
+	sys-apps/attr
+	virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_P}"
+
+DOCS="AUTHORS ChangeLog CREDITS README"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
+	"${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
+	# Fedora fixes
+	"${FILESDIR}"/${PN}-2017.3.23-check-mftmirr.patch
+	"${FILESDIR}"/${PN}-2017.3.23-big-sectors.patch
+	"${FILESDIR}"/${PN}-2017.3.23-full-clusters.patch
+)
+
+pkg_setup() {
+	if use external-fuse && use kernel_linux; then
+		if kernel_is lt 2 6 9; then
+			die "Your kernel is too old."
+		fi
+		CONFIG_CHECK="~FUSE_FS"
+		FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	default
+	# Keep the symlinks in the same place we put the main binaries.
+	# Having them in / when all the progs are in /usr is pointless.
+	sed -i \
+		-e 's:/sbin:$(sbindir):g' \
+		{ntfsprogs,src}/Makefile.in || die #578336
+	# Note: patches apply to Makefile.in, so don't run autotools here.
+	elibtoolize
+}
+
+src_configure() {
+	# disable hd library until we have the right library in the tree and
+	# don't links to hwinfo one causing issues like bug #602360
+	tc-ld-disable-gold
+	econf \
+		--prefix="${EPREFIX}"/usr \
+		--exec-prefix="${EPREFIX}"/usr \
+		--docdir="${EPREFIX}"/usr/share/doc/${PF} \
+		$(use_enable debug) \
+		--enable-ldscript \
+		--disable-ldconfig \
+		$(use_enable acl posix-acls) \
+		$(use_enable xattr xattr-mappings) \
+		$(use_enable ntfsdecrypt crypto) \
+		$(use_enable ntfsprogs) \
+		$(use_enable ntfsprogs quarantined) \
+		--without-uuid \
+		--without-hd \
+		--enable-extras \
+		$(use_enable static-libs static) \
+		--with-fuse=$(usex external-fuse external internal)
+}
+
+src_install() {
+	default
+
+	use suid && fperms u+s /usr/bin/${MY_PN}
+	# Not needed with the link of mount.ntfs being created, causes
+	# issues like bug #635080
+#	udev_dorules "${FILESDIR}"/99-ntfs3g.rules
+	dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
+
+	find "${D}" -name '*.la' -type f -delete || die
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/
@ 2020-06-09 23:41 Mike Gilbert
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Gilbert @ 2020-06-09 23:41 UTC (permalink / raw
  To: gentoo-commits

commit:     3f7be9e54a478c557dba6ffe32362d7cc5b4d107
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Tue Jun  9 23:40:02 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Tue Jun  9 23:41:22 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f7be9e5

sys-fs/ntfs3g: remove old

Bug: https://bugs.gentoo.org/717640
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-fs/ntfs3g/Manifest                   |   1 -
 sys-fs/ntfs3g/files/99-ntfs3g.rules      |   1 -
 sys-fs/ntfs3g/ntfs3g-2016.2.22-r2.ebuild |  96 ----------------------------
 sys-fs/ntfs3g/ntfs3g-2017.3.23-r1.ebuild |  93 ---------------------------
 sys-fs/ntfs3g/ntfs3g-2017.3.23-r2.ebuild | 104 -------------------------------
 5 files changed, 295 deletions(-)

diff --git a/sys-fs/ntfs3g/Manifest b/sys-fs/ntfs3g/Manifest
index d9a6eaac1cf..c7ad50e6157 100644
--- a/sys-fs/ntfs3g/Manifest
+++ b/sys-fs/ntfs3g/Manifest
@@ -1,3 +1,2 @@
-DIST ntfs-3g_ntfsprogs-2016.2.22.tgz 1264364 BLAKE2B 6028048d676372c062cda1cf9ee43f2c1f035d080dde1201746d994e705756ab219de8359b1f8708e83e11c0036cdc33339e54299aa433f383e698e425ff2fed SHA512 dbd36fadd2881db1d17fdbf5d2b4e50bbe11dc9dd0ad4917e7f8bc4032c2287346143756ce8754df0d46ce9209f2c0c41b626cad929d76a9bc881712c7101c15
 DIST ntfs-3g_ntfsprogs-2017.3.23.tgz 1259054 BLAKE2B 4f12a6061ef0c116f26225eb3fb5cb84e469b63710115fbfb54fa3802ea94192afa973a553742818ff6849b72919069ec92aca2d4d6f58d8cabca1b0fefa3abe SHA512 3a607f0d7be35204c992d8931de0404fbc52032c13b4240d2c5e6f285c318a28eb2a385d7cf5ac4cd445876aee5baa5753bb636ada0d870d84a9d3fdbce794ef
 DIST ntfs-3g_ntfsprogs-2017.3.23AR.5.tgz 1278315 BLAKE2B d4f84bf744b12fec7faff82bd3d3048282a3cbcde2ca75e5d3a295206585c4cee68e25dff5fb20b034f516a3f2cd95c489105d9df810f8a9378024ef065b67d3 SHA512 8534970ba9f07999c5ff433144ad3a59640fb9a28fb30b37b5d736101e19f9fec1c222152338be382c894f972fce2b2a83680b85a28cf147cb5500b40a0a25cc

diff --git a/sys-fs/ntfs3g/files/99-ntfs3g.rules b/sys-fs/ntfs3g/files/99-ntfs3g.rules
deleted file mode 100644
index 52dca406476..00000000000
--- a/sys-fs/ntfs3g/files/99-ntfs3g.rules
+++ /dev/null
@@ -1 +0,0 @@
-ENV{ID_FS_TYPE}=="ntfs", ENV{ID_FS_TYPE}="ntfs-3g"

diff --git a/sys-fs/ntfs3g/ntfs3g-2016.2.22-r2.ebuild b/sys-fs/ntfs3g/ntfs3g-2016.2.22-r2.ebuild
deleted file mode 100644
index 6d2c789ca34..00000000000
--- a/sys-fs/ntfs3g/ntfs3g-2016.2.22-r2.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils linux-info ltprune udev toolchain-funcs libtool
-
-MY_PN=${PN/3g/-3g}
-MY_P=${MY_PN}_ntfsprogs-${PV}
-
-DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
-HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
-SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
-
-LICENSE="GPL-2"
-# The subslot matches the SONAME major #.
-SLOT="0/87"
-KEYWORDS="~alpha amd64 arm ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr"
-
-RDEPEND="!<sys-apps/util-linux-2.20.1-r2
-	!sys-fs/ntfsprogs
-	ntfsdecrypt? (
-		>=dev-libs/libgcrypt-1.2.2:0
-		>=net-libs/gnutls-1.4.4
-	)
-	external-fuse? (
-		>=sys-fs/fuse-2.8.0
-		<sys-fs/fuse-3.0.0_pre
-	)"
-DEPEND="${RDEPEND}
-	sys-apps/attr
-	virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
-
-DOCS="AUTHORS ChangeLog CREDITS README"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
-	"${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
-	"${FILESDIR}"/${PN}-2016.2.22-CVE-2017-0358.patch #607912
-)
-
-pkg_setup() {
-	if use external-fuse && use kernel_linux; then
-		if kernel_is lt 2 6 9; then
-			die "Your kernel is too old."
-		fi
-		CONFIG_CHECK="~FUSE_FS"
-		FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	epatch "${PATCHES[@]}"
-	# Keep the symlinks in the same place we put the main binaries.
-	# Having them in / when all the progs are in /usr is pointless.
-	sed -i \
-		-e 's:/sbin:$(sbindir):g' \
-		{ntfsprogs,src}/Makefile.in || die #578336
-	# Note: patches apply to Makefile.in, so don't run autotools here.
-	elibtoolize
-}
-
-src_configure() {
-	tc-ld-disable-gold
-	# passing --exec-prefix is needed as the build system is trying to be clever
-	# and install itself into / instead of /usr in order to be compatible with
-	# separate-/usr setups (which we don't support without an initrd).
-	econf \
-		--exec-prefix="${EPREFIX}"/usr \
-		--docdir="${EPREFIX}"/usr/share/doc/${PF} \
-		$(use_enable debug) \
-		--enable-ldscript \
-		--disable-ldconfig \
-		$(use_enable acl posix-acls) \
-		$(use_enable xattr xattr-mappings) \
-		$(use_enable ntfsdecrypt crypto) \
-		$(use_enable ntfsprogs) \
-		$(use_enable ntfsprogs quarantined) \
-		--without-uuid \
-		--enable-extras \
-		$(use_enable static-libs static) \
-		--with-fuse=$(usex external-fuse external internal)
-}
-
-src_install() {
-	default
-
-	use suid && fperms u+s /usr/bin/${MY_PN}
-	udev_dorules "${FILESDIR}"/99-ntfs3g.rules
-	prune_libtool_files
-
-	dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
-}

diff --git a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r1.ebuild b/sys-fs/ntfs3g/ntfs3g-2017.3.23-r1.ebuild
deleted file mode 100644
index d73ec168776..00000000000
--- a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r1.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils linux-info ltprune udev toolchain-funcs libtool
-
-MY_PN=${PN/3g/-3g}
-MY_P=${MY_PN}_ntfsprogs-${PV}
-
-DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
-HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
-SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
-
-LICENSE="GPL-2"
-# The subslot matches the SONAME major #.
-SLOT="0/88"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr"
-
-RDEPEND="!<sys-apps/util-linux-2.20.1-r2
-	!sys-fs/ntfsprogs
-	ntfsdecrypt? (
-		>=dev-libs/libgcrypt-1.2.2:0
-		>=net-libs/gnutls-1.4.4
-	)
-	external-fuse? (
-		>=sys-fs/fuse-2.8.0:0
-	)"
-DEPEND="${RDEPEND}
-	sys-apps/attr
-	virtual/pkgconfig"
-
-S="${WORKDIR}/${MY_P}"
-
-DOCS="AUTHORS ChangeLog CREDITS README"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
-	"${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
-)
-
-pkg_setup() {
-	if use external-fuse && use kernel_linux; then
-		if kernel_is lt 2 6 9; then
-			die "Your kernel is too old."
-		fi
-		CONFIG_CHECK="~FUSE_FS"
-		FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	default
-	# Keep the symlinks in the same place we put the main binaries.
-	# Having them in / when all the progs are in /usr is pointless.
-	sed -i \
-		-e 's:/sbin:$(sbindir):g' \
-		{ntfsprogs,src}/Makefile.in || die #578336
-	# Note: patches apply to Makefile.in, so don't run autotools here.
-	elibtoolize
-}
-
-src_configure() {
-	tc-ld-disable-gold
-	# passing --exec-prefix is needed as the build system is trying to be clever
-	# and install itself into / instead of /usr in order to be compatible with
-	# separate-/usr setups (which we don't support without an initrd).
-	econf \
-		--exec-prefix="${EPREFIX}"/usr \
-		$(use_enable debug) \
-		--enable-ldscript \
-		--disable-ldconfig \
-		$(use_enable acl posix-acls) \
-		$(use_enable xattr xattr-mappings) \
-		$(use_enable ntfsdecrypt crypto) \
-		$(use_enable ntfsprogs) \
-		$(use_enable ntfsprogs quarantined) \
-		--without-uuid \
-		--enable-extras \
-		$(use_enable static-libs static) \
-		--with-fuse=$(usex external-fuse external internal)
-}
-
-src_install() {
-	default
-
-	use suid && fperms u+s /usr/bin/${MY_PN}
-	udev_dorules "${FILESDIR}"/99-ntfs3g.rules
-	prune_libtool_files
-
-	dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
-}

diff --git a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r2.ebuild b/sys-fs/ntfs3g/ntfs3g-2017.3.23-r2.ebuild
deleted file mode 100644
index 83370cc1123..00000000000
--- a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r2.ebuild
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit linux-info udev toolchain-funcs libtool
-
-MY_PN=${PN/3g/-3g}
-MY_P=${MY_PN}_ntfsprogs-${PV}
-
-DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
-HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
-SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
-
-LICENSE="GPL-2"
-# The subslot matches the SONAME major #.
-SLOT="0/88"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr"
-
-RDEPEND="!<sys-apps/util-linux-2.20.1-r2
-	!sys-fs/ntfsprogs
-	ntfsdecrypt? (
-		>=dev-libs/libgcrypt-1.2.2:0
-		>=net-libs/gnutls-1.4.4
-	)
-	external-fuse? (
-		>=sys-fs/fuse-2.8.0:0
-	)
-"
-DEPEND="${RDEPEND}
-	sys-apps/attr
-	virtual/pkgconfig
-"
-
-S="${WORKDIR}/${MY_P}"
-
-DOCS="AUTHORS ChangeLog CREDITS README"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
-	"${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
-	# Fedora fixes
-	"${FILESDIR}"/${PN}-2017.3.23-check-mftmirr.patch
-	"${FILESDIR}"/${PN}-2017.3.23-big-sectors.patch
-	"${FILESDIR}"/${PN}-2017.3.23-full-clusters.patch
-)
-
-pkg_setup() {
-	if use external-fuse && use kernel_linux; then
-		if kernel_is lt 2 6 9; then
-			die "Your kernel is too old."
-		fi
-		CONFIG_CHECK="~FUSE_FS"
-		FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	default
-	# Keep the symlinks in the same place we put the main binaries.
-	# Having them in / when all the progs are in /usr is pointless.
-	sed -i \
-		-e 's:/sbin:$(sbindir):g' \
-		{ntfsprogs,src}/Makefile.in || die #578336
-	# Note: patches apply to Makefile.in, so don't run autotools here.
-	elibtoolize
-}
-
-src_configure() {
-	# disable hd library until we have the right library in the tree and
-	# don't links to hwinfo one causing issues like bug #602360
-	tc-ld-disable-gold
-	# passing --exec-prefix is needed as the build system is trying to be clever
-	# and install itself into / instead of /usr in order to be compatible with
-	# separate-/usr setups (which we don't support without an initrd).
-	econf \
-		--exec-prefix="${EPREFIX}"/usr \
-		$(use_enable debug) \
-		--enable-ldscript \
-		--disable-ldconfig \
-		$(use_enable acl posix-acls) \
-		$(use_enable xattr xattr-mappings) \
-		$(use_enable ntfsdecrypt crypto) \
-		$(use_enable ntfsprogs) \
-		$(use_enable ntfsprogs quarantined) \
-		--without-uuid \
-		--without-hd \
-		--enable-extras \
-		$(use_enable static-libs static) \
-		--with-fuse=$(usex external-fuse external internal)
-}
-
-src_install() {
-	default
-
-	use suid && fperms u+s /usr/bin/${MY_PN}
-	# Not needed with the link of mount.ntfs being created, causes
-	# issues like bug #635080
-#	udev_dorules "${FILESDIR}"/99-ntfs3g.rules
-	dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
-
-	find "${D}" -name '*.la' -type f -delete || die
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/
@ 2021-05-14 10:04 David Seifert
  0 siblings, 0 replies; 6+ messages in thread
From: David Seifert @ 2021-05-14 10:04 UTC (permalink / raw
  To: gentoo-commits

commit:     6117c5631916c07eff368af7373a6561b005dcad
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Fri May 14 10:03:48 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri May 14 10:03:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6117c563

sys-fs/ntfs3g: Remove old 2017.3.23-r3

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-fs/ntfs3g/Manifest                             |   1 -
 sys-fs/ntfs3g/files/CVE-2019-9755.patch            |  63 ----
 .../files/ntfs3g-2014.2.15-no-split-usr.patch      |  25 --
 .../ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch  |  43 ---
 .../files/ntfs3g-2017.3.23-big-sectors.patch       | 379 ---------------------
 .../files/ntfs3g-2017.3.23-check-mftmirr.patch     |  12 -
 .../files/ntfs3g-2017.3.23-full-clusters.patch     |  81 -----
 sys-fs/ntfs3g/metadata.xml                         |  50 ++-
 sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild           | 106 ------
 9 files changed, 23 insertions(+), 737 deletions(-)

diff --git a/sys-fs/ntfs3g/Manifest b/sys-fs/ntfs3g/Manifest
index c7ad50e6157..a087229bff9 100644
--- a/sys-fs/ntfs3g/Manifest
+++ b/sys-fs/ntfs3g/Manifest
@@ -1,2 +1 @@
-DIST ntfs-3g_ntfsprogs-2017.3.23.tgz 1259054 BLAKE2B 4f12a6061ef0c116f26225eb3fb5cb84e469b63710115fbfb54fa3802ea94192afa973a553742818ff6849b72919069ec92aca2d4d6f58d8cabca1b0fefa3abe SHA512 3a607f0d7be35204c992d8931de0404fbc52032c13b4240d2c5e6f285c318a28eb2a385d7cf5ac4cd445876aee5baa5753bb636ada0d870d84a9d3fdbce794ef
 DIST ntfs-3g_ntfsprogs-2017.3.23AR.5.tgz 1278315 BLAKE2B d4f84bf744b12fec7faff82bd3d3048282a3cbcde2ca75e5d3a295206585c4cee68e25dff5fb20b034f516a3f2cd95c489105d9df810f8a9378024ef065b67d3 SHA512 8534970ba9f07999c5ff433144ad3a59640fb9a28fb30b37b5d736101e19f9fec1c222152338be382c894f972fce2b2a83680b85a28cf147cb5500b40a0a25cc

diff --git a/sys-fs/ntfs3g/files/CVE-2019-9755.patch b/sys-fs/ntfs3g/files/CVE-2019-9755.patch
deleted file mode 100644
index caa079d607b..00000000000
--- a/sys-fs/ntfs3g/files/CVE-2019-9755.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 85c1634a26faa572d3c558d4cf8aaaca5202d4e9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= <jean-pierre.andre@wanadoo.fr>
-Date: Wed, 19 Dec 2018 15:57:50 +0100
-Subject: [PATCH] Fixed reporting an error when failed to build the mountpoint
-
-The size check was inefficient because getcwd() uses an unsigned int
-argument.
----
- src/lowntfs-3g.c | 6 +++++-
- src/ntfs-3g.c    | 6 +++++-
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c
-index 993867fa..0660439b 100644
---- a/src/lowntfs-3g.c
-+++ b/src/lowntfs-3g.c
-@@ -4411,7 +4411,8 @@ int main(int argc, char *argv[])
- 	else {
- 		ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
- 		if (ctx->abs_mnt_point) {
--			if (getcwd(ctx->abs_mnt_point,
-+			if ((strlen(opts.mnt_point) < PATH_MAX)
-+			    && getcwd(ctx->abs_mnt_point,
- 				     PATH_MAX - strlen(opts.mnt_point) - 1)) {
- 				strcat(ctx->abs_mnt_point, "/");
- 				strcat(ctx->abs_mnt_point, opts.mnt_point);
-@@ -4419,6 +4420,9 @@ int main(int argc, char *argv[])
- 			/* Solaris also wants the absolute mount point */
- 				opts.mnt_point = ctx->abs_mnt_point;
- #endif /* defined(__sun) && defined (__SVR4) */
-+			} else {
-+				free(ctx->abs_mnt_point);
-+				ctx->abs_mnt_point = (char*)NULL;
- 			}
- 		}
- 	}
-diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c
-index 6ce89fef..4e0912ae 100644
---- a/src/ntfs-3g.c
-+++ b/src/ntfs-3g.c
-@@ -4148,7 +4148,8 @@ int main(int argc, char *argv[])
- 	else {
- 		ctx->abs_mnt_point = (char*)ntfs_malloc(PATH_MAX);
- 		if (ctx->abs_mnt_point) {
--			if (getcwd(ctx->abs_mnt_point,
-+			if ((strlen(opts.mnt_point) < PATH_MAX)
-+			    && getcwd(ctx->abs_mnt_point,
- 				     PATH_MAX - strlen(opts.mnt_point) - 1)) {
- 				strcat(ctx->abs_mnt_point, "/");
- 				strcat(ctx->abs_mnt_point, opts.mnt_point);
-@@ -4156,6 +4157,9 @@ int main(int argc, char *argv[])
- 			/* Solaris also wants the absolute mount point */
- 				opts.mnt_point = ctx->abs_mnt_point;
- #endif /* defined(__sun) && defined (__SVR4) */
-+			} else {
-+				free(ctx->abs_mnt_point);
-+				ctx->abs_mnt_point = (char*)NULL;
- 			}
- 		}
- 	}
--- 
-2.26.1
-

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
deleted file mode 100644
index 0228bfec330..00000000000
--- a/sys-fs/ntfs3g/files/ntfs3g-2014.2.15-no-split-usr.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-we handle split /usr logic ourselves.  this ends up breaking when building
-for an abi that doesn't exist in / (like cross-compiling) as the tests fail.
-
---- a/libntfs-3g/Makefile.in
-+++ b/libntfs-3g/Makefile.in
-@@ -912,19 +912,6 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-local \
- 	uninstall-rootlibLTLIBRARIES
- 
- 
--# We may need to move .so files to root
--# And create ldscript or symbolic link from /usr
--install-exec-hook: install-rootlibLTLIBRARIES
--@INSTALL_LIBRARY_TRUE@	if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \
--@INSTALL_LIBRARY_TRUE@		$(MV) -f "$(DESTDIR)/$(libdir)"/libntfs-3g.so* "$(DESTDIR)/$(rootlibdir)";  \
--@INSTALL_LIBRARY_TRUE@	fi
--@GENERATE_LDSCRIPT_TRUE@@INSTALL_LIBRARY_TRUE@	if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \
--@GENERATE_LDSCRIPT_TRUE@@INSTALL_LIBRARY_TRUE@		$(install_sh_PROGRAM) "libntfs-3g.script.so" "$(DESTDIR)/$(libdir)/libntfs-3g.so"; \
--@GENERATE_LDSCRIPT_TRUE@@INSTALL_LIBRARY_TRUE@	fi
--@GENERATE_LDSCRIPT_FALSE@@INSTALL_LIBRARY_TRUE@	if [ ! "$(rootlibdir)" -ef "$(libdir)" ]; then \
--@GENERATE_LDSCRIPT_FALSE@@INSTALL_LIBRARY_TRUE@		$(LN_S) "$(rootlibdir)/libntfs-3g.so" "$(DESTDIR)/$(libdir)/libntfs-3g.so"; \
--@GENERATE_LDSCRIPT_FALSE@@INSTALL_LIBRARY_TRUE@	fi
--
- uninstall-local:
- @INSTALL_LIBRARY_TRUE@	$(RM) -f "$(DESTDIR)/$(rootlibdir)"/libntfs-3g.so*
- 

diff --git a/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch b/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch
deleted file mode 100644
index 2fa1f2b34c8..00000000000
--- a/sys-fs/ntfs3g/files/ntfs3g-2016.2.22-sysmacros.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-include the headers that define major/minor/makedev in more places
-
-https://bugs.gentoo.org/580136
-
---- a/libntfs-3g/ioctl.c
-+++ b/libntfs-3g/ioctl.c
-@@ -57,6 +57,12 @@
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
-+#ifdef HAVE_SYS_MKDEV_H
-+#include <sys/mkdev.h>
-+#endif
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
- 
- #ifdef HAVE_SYS_STAT_H
- #include <sys/stat.h>
---- a/src/lowntfs-3g.c
-+++ b/src/lowntfs-3g.c
-@@ -76,6 +76,9 @@
- #ifdef HAVE_SYS_MKDEV_H
- #include <sys/mkdev.h>
- #endif
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
- 
- #if defined(__APPLE__) || defined(__DARWIN__)
- #include <sys/dirent.h>
---- a/src/ntfs-3g.c
-+++ b/src/ntfs-3g.c
-@@ -75,6 +75,9 @@
- #ifdef HAVE_SYS_MKDEV_H
- #include <sys/mkdev.h>
- #endif
-+#ifdef HAVE_SYS_SYSMACROS_H
-+#include <sys/sysmacros.h>
-+#endif
- 
- #if defined(__APPLE__) || defined(__DARWIN__)
- #include <sys/dirent.h>

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
deleted file mode 100644
index 1cb8bb6c46c..00000000000
--- a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-big-sectors.patch
+++ /dev/null
@@ -1,379 +0,0 @@
---- a/libntfs-3g/bootsect.c.ref	2017-03-23 10:42:44.000000000 +0100
-+++ b/libntfs-3g/bootsect.c	2018-05-07 09:11:13.004710800 +0200
-@@ -38,6 +38,7 @@ 
- #include <errno.h>
- #endif
- 
-+#include "param.h"
- #include "compat.h"
- #include "bootsect.h"
- #include "debug.h"
-@@ -61,6 +62,7 @@ 
- {
- 	u32 i;
- 	BOOL ret = FALSE;
-+	u16 sectors_per_cluster;
- 
- 	ntfs_log_debug("Beginning bootsector check.\n");
- 
-@@ -83,15 +85,27 @@ 
- 	case 1: case 2: case 4: case 8: case 16: case 32: case 64: case 128:
- 		break;
- 	default:
--		ntfs_log_error("Unexpected sectors per cluster value (%d).\n",
--			       b->bpb.sectors_per_cluster);
--		goto not_ntfs;
-+		if ((b->bpb.sectors_per_cluster < 240)
-+		    || (b->bpb.sectors_per_cluster > 249)) {
-+			if (b->bpb.sectors_per_cluster > 128)
-+				ntfs_log_error("Unexpected sectors"
-+					" per cluster value (code 0x%x)\n",
-+					b->bpb.sectors_per_cluster);
-+			else
-+				ntfs_log_error("Unexpected sectors"
-+					" per cluster value (%d).\n",
-+					b->bpb.sectors_per_cluster);
-+			goto not_ntfs;
-+		}
- 	}
- 
- 	ntfs_log_debug("Checking cluster size.\n");
--	i = (u32)le16_to_cpu(b->bpb.bytes_per_sector) * 
--		b->bpb.sectors_per_cluster;
--	if (i > 65536) {
-+	if (b->bpb.sectors_per_cluster > 128)
-+		sectors_per_cluster = 1 << (256 - b->bpb.sectors_per_cluster);
-+	else
-+		sectors_per_cluster = b->bpb.sectors_per_cluster;
-+	i = (u32)le16_to_cpu(b->bpb.bytes_per_sector) * sectors_per_cluster;
-+	if (i > NTFS_MAX_CLUSTER_SIZE) {
- 		ntfs_log_error("Unexpected cluster size (%d).\n", i);
- 		goto not_ntfs;
- 	}
-@@ -171,7 +185,7 @@ 
- int ntfs_boot_sector_parse(ntfs_volume *vol, const NTFS_BOOT_SECTOR *bs)
- {
- 	s64 sectors;
--	u8  sectors_per_cluster;
-+	u16  sectors_per_cluster;
- 	s8  c;
- 
- 	/* We return -1 with errno = EINVAL on error. */
-@@ -186,7 +200,10 @@ 
- 	 * below or equal the number_of_clusters) really belong in the
- 	 * ntfs_boot_sector_is_ntfs but in this way we can just do this once.
- 	 */
--	sectors_per_cluster = bs->bpb.sectors_per_cluster;
-+	if (bs->bpb.sectors_per_cluster > 128)
-+		sectors_per_cluster = 1 << (256 - bs->bpb.sectors_per_cluster);
-+	else
-+		sectors_per_cluster = bs->bpb.sectors_per_cluster;
- 	ntfs_log_debug("SectorsPerCluster = 0x%x\n", sectors_per_cluster);
- 	if (sectors_per_cluster & (sectors_per_cluster - 1)) {
- 		ntfs_log_error("sectors_per_cluster (%d) is not a power of 2."
---- a/ntfsprogs/mkntfs.8.in.ref	2017-03-23 10:42:44.000000000 +0100
-+++ b/ntfsprogs/mkntfs.8.in	2018-05-07 09:11:13.014132400 +0200
-@@ -132,7 +132,7 @@ 
- .TP
- \fB\-c\fR, \fB\-\-cluster\-size\fR BYTES
- Specify the size of clusters in bytes. Valid cluster size values are powers of
--two, with at least 256, and at most 65536 bytes per cluster. If omitted,
-+two, with at least 256, and at most 2097152 bytes (2MB) per cluster. If omitted,
- .B mkntfs
- uses 4096 bytes as the default cluster size.
- .sp
---- a/ntfsprogs/mkntfs.c.ref	2017-03-23 10:42:44.000000000 +0100
-+++ b/ntfsprogs/mkntfs.c	2018-05-07 09:11:13.035522300 +0200
-@@ -6,7 +6,7 @@ 
-  * Copyright (c) 2002-2006 Szabolcs Szakacsits
-  * Copyright (c) 2005      Erik Sornes
-  * Copyright (c) 2007      Yura Pakhuchiy
-- * Copyright (c) 2010-2014 Jean-Pierre Andre
-+ * Copyright (c) 2010-2018 Jean-Pierre Andre
-  *
-  * This utility will create an NTFS 1.2 or 3.1 volume on a user
-  * specified (block) device.
-@@ -119,6 +119,7 @@ 
- #	endif
- #endif
- 
-+#include "param.h"
- #include "security.h"
- #include "types.h"
- #include "attrib.h"
-@@ -287,7 +288,7 @@ 
- 	ntfs_log_info("Copyright (c) 2002-2006 Szabolcs Szakacsits\n");
- 	ntfs_log_info("Copyright (c) 2005      Erik Sornes\n");
- 	ntfs_log_info("Copyright (c) 2007      Yura Pakhuchiy\n");
--	ntfs_log_info("Copyright (c) 2010-2014 Jean-Pierre Andre\n");
-+	ntfs_log_info("Copyright (c) 2010-2018 Jean-Pierre Andre\n");
- 	ntfs_log_info("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home);
- }
- 
-@@ -3719,11 +3720,11 @@ 
- 		/*
- 		 * For huge volumes, grow the cluster size until the number of
- 		 * clusters fits into 32 bits or the cluster size exceeds the
--		 * maximum limit of 64kiB.
-+		 * maximum limit of NTFS_MAX_CLUSTER_SIZE.
- 		 */
- 		while (volume_size >> (ffs(vol->cluster_size) - 1 + 32)) {
- 			vol->cluster_size <<= 1;
--			if (vol->cluster_size > 65535) {
-+			if (vol->cluster_size >= NTFS_MAX_CLUSTER_SIZE) {
- 				ntfs_log_error("Device is too large to hold an "
- 						"NTFS volume (maximum size is "
- 						"256TiB).\n");
-@@ -3744,15 +3745,18 @@ 
- 				"to, or larger than, the sector size.\n");
- 		return FALSE;
- 	}
--	if (vol->cluster_size > 128 * (u32)opts.sector_size) {
-+		/* Before Windows 10 Creators, the limit was 128 */
-+	if (vol->cluster_size > 4096 * (u32)opts.sector_size) {
- 		ntfs_log_error("The cluster size is invalid.  It cannot be "
--				"more that 128 times the size of the sector "
-+				"more that 4096 times the size of the sector "
- 				"size.\n");
- 		return FALSE;
- 	}
--	if (vol->cluster_size > 65536) {
-+	if (vol->cluster_size > NTFS_MAX_CLUSTER_SIZE) {
- 		ntfs_log_error("The cluster size is invalid.  The maximum "
--			"cluster size is 65536 bytes (64kiB).\n");
-+			"cluster size is %lu bytes (%lukiB).\n",
-+			(unsigned long)NTFS_MAX_CLUSTER_SIZE,
-+			(unsigned long)(NTFS_MAX_CLUSTER_SIZE >> 10));
- 		return FALSE;
- 	}
- 	vol->cluster_size_bits = ffs(vol->cluster_size) - 1;
-@@ -4387,6 +4391,7 @@ 
- 	u8 *sd;
- 	FILE_ATTR_FLAGS extend_flags;
- 	VOLUME_FLAGS volume_flags = const_cpu_to_le16(0);
-+	int sectors_per_cluster;
- 	int nr_sysfiles;
- 	int buf_sds_first_size;
- 	char *buf_sds;
-@@ -4639,8 +4644,11 @@ 
- 	 * already inserted, so no need to worry about these things.
- 	 */
- 	bs->bpb.bytes_per_sector = cpu_to_le16(opts.sector_size);
--	bs->bpb.sectors_per_cluster = (u8)(g_vol->cluster_size /
--			opts.sector_size);
-+	sectors_per_cluster = g_vol->cluster_size / opts.sector_size;
-+	if (sectors_per_cluster > 128)
-+		bs->bpb.sectors_per_cluster = 257 - ffs(sectors_per_cluster);
-+	else
-+		bs->bpb.sectors_per_cluster = sectors_per_cluster;
- 	bs->bpb.media_type = 0xf8; /* hard disk */
- 	bs->bpb.sectors_per_track = cpu_to_le16(opts.sectors_per_track);
- 	ntfs_log_debug("sectors per track = %ld (0x%lx)\n",
---- a/ntfsprogs/ntfsclone.c.ref	2017-03-23 10:42:44.000000000 +0100
-+++ b/ntfsprogs/ntfsclone.c	2018-05-07 09:11:38.245007100 +0200
-@@ -3,7 +3,7 @@ 
-  *
-  * Copyright (c) 2003-2006 Szabolcs Szakacsits
-  * Copyright (c) 2004-2006 Anton Altaparmakov
-- * Copyright (c) 2010-2016 Jean-Pierre Andre
-+ * Copyright (c) 2010-2018 Jean-Pierre Andre
-  * Special image format support copyright (c) 2004 Per Olofsson
-  *
-  * Clone NTFS data and/or metadata to a sparse file, image, device or stdout.
-@@ -71,6 +71,7 @@ 
-  */
- #define NTFS_DO_NOT_CHECK_ENDIANS
- 
-+#include "param.h"
- #include "debug.h"
- #include "types.h"
- #include "support.h"
-@@ -270,7 +271,6 @@ 
- 
- #define LAST_METADATA_INODE	11
- 
--#define NTFS_MAX_CLUSTER_SIZE	65536
- #define NTFS_SECTOR_SIZE	  512
- 
- #define rounded_up_division(a, b) (((a) + (b - 1)) / (b))
-@@ -393,7 +393,7 @@ 
- 		   "Efficiently clone, image, restore or rescue an NTFS Volume.\n\n"
- 		   "Copyright (c) 2003-2006 Szabolcs Szakacsits\n"
- 		   "Copyright (c) 2004-2006 Anton Altaparmakov\n"
--		   "Copyright (c) 2010-2016 Jean-Pierre Andre\n\n");
-+		   "Copyright (c) 2010-2018 Jean-Pierre Andre\n\n");
- 	fprintf(stderr, "%s\n%s%s", ntfs_gpl, ntfs_bugs, ntfs_home);
- 	exit(0);
- }
-@@ -756,7 +756,7 @@ 
- 
- static void copy_cluster(int rescue, u64 rescue_lcn, u64 lcn)
- {
--	char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */
-+	char *buff;
- 	/* vol is NULL if opt.restore_image is set */
- 	s32 csize = le32_to_cpu(image_hdr.cluster_size);
- 	BOOL backup_bootsector;
-@@ -783,6 +783,10 @@ 
- 		}
- 	}
- 
-+	buff = (char*)ntfs_malloc(csize);
-+	if (!buff)
-+		err_exit("Not enough memory");
-+
- // need reading when not about to write ?
- 	if (read_all(fd, buff, csize) == -1) {
- 
-@@ -858,6 +862,7 @@ 
- 		perr_printf("Write failed");
- #endif
- 	}
-+	free(buff);
- }
- 
- static s64 lseek_out(int fd, s64 pos, int mode)
-@@ -995,7 +1000,11 @@ 
- 				 struct progress_bar *progress, u64 *p_counter)
- {
- 	s64 i;
--	char buff[NTFS_MAX_CLUSTER_SIZE];
-+	char *buff;
-+
-+	buff = (char*)ntfs_malloc(csize);
-+	if (!buff)
-+		err_exit("Not enough memory");
- 
- 	memset(buff, 0, csize);
- 
-@@ -1004,6 +1013,7 @@ 
- 			perr_exit("write_all");
- 		progress_update(progress, ++(*p_counter));
- 	}
-+	free(buff);
- }
- 
- static void restore_image(void)
-@@ -1492,7 +1502,7 @@ 
- 
- static void copy_wipe_mft(ntfs_walk_clusters_ctx *image, runlist *rl)
- {
--	char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */
-+	char *buff;
- 	void *fd;
- 	s64 mft_no;
- 	u32 mft_record_size;
-@@ -1522,6 +1532,10 @@ 
- 		clusters_per_set = mft_record_size/csize;
- 		records_per_set = 1;
- 	}
-+	buff = (char*)ntfs_malloc(mft_record_size);
-+	if (!buff)
-+		err_exit("Not enough memory");
-+
- 	mft_no = 0;
- 	ri = rj = 0;
- 	wi = wj = 0;
-@@ -1554,6 +1568,7 @@ 
- 		}
- 	}
- 	image->current_lcn = current_lcn;
-+	free(buff);
- }
- 
- /*
-@@ -1566,7 +1581,7 @@ 
- 
- static void copy_wipe_i30(ntfs_walk_clusters_ctx *image, runlist *rl)
- {
--	char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */
-+	char *buff;
- 	void *fd;
- 	u32 indx_record_size;
- 	u32 csize;
-@@ -1595,6 +1610,10 @@ 
- 		clusters_per_set = indx_record_size/csize;
- 		records_per_set = 1;
- 	}
-+	buff = (char*)ntfs_malloc(indx_record_size);
-+	if (!buff)
-+		err_exit("Not enough memory");
-+
- 	ri = rj = 0;
- 	wi = wj = 0;
- 	if (rl[ri].length)
-@@ -1627,6 +1646,7 @@ 
- 		}
- 	}
- 	image->current_lcn = current_lcn;
-+	free(buff);
- }
- 
- static void dump_clusters(ntfs_walk_clusters_ctx *image, runlist *rl)
---- a/ntfsprogs/ntfsresize.c.ref	2017-03-23 10:42:44.000000000 +0100
-+++ b/ntfsprogs/ntfsresize.c	2018-05-07 09:11:13.076883400 +0200
-@@ -59,6 +59,7 @@ 
- #include <fcntl.h>
- #endif
- 
-+#include "param.h"
- #include "debug.h"
- #include "types.h"
- #include "support.h"
-@@ -243,8 +244,6 @@ 
- #define DIRTY_INODE		(1)
- #define DIRTY_ATTRIB		(2)
- 
--#define NTFS_MAX_CLUSTER_SIZE	(65536)
--
- static s64 rounded_up_division(s64 numer, s64 denom)
- {
- 	return (numer + (denom - 1)) / denom;
-@@ -404,7 +403,7 @@ 
- 	printf("Copyright (c) 2002-2005  Anton Altaparmakov\n");
- 	printf("Copyright (c) 2002-2003  Richard Russon\n");
- 	printf("Copyright (c) 2007       Yura Pakhuchiy\n");
--	printf("Copyright (c) 2011-2016  Jean-Pierre Andre\n");
-+	printf("Copyright (c) 2011-2018  Jean-Pierre Andre\n");
- 	printf("\n%s\n%s%s", ntfs_gpl, ntfs_bugs, ntfs_home);
- }
- 
-@@ -1849,9 +1848,13 @@ 
- static void copy_clusters(ntfs_resize_t *resize, s64 dest, s64 src, s64 len)
- {
- 	s64 i;
--	char buff[NTFS_MAX_CLUSTER_SIZE]; /* overflow checked at mount time */
-+	char *buff;
- 	ntfs_volume *vol = resize->vol;
- 
-+	buff = (char*)ntfs_malloc(vol->cluster_size);
-+	if (!buff)
-+		perr_exit("ntfs_malloc");
-+
- 	for (i = 0; i < len; i++) {
- 
- 		lseek_to_cluster(vol, src + i);
-@@ -1875,6 +1878,7 @@ 
- 		resize->relocations++;
- 		progress_update(&resize->progress, resize->relocations);
- 	}
-+	free(buff);
- }
- 
- static void relocate_clusters(ntfs_resize_t *r, runlist *dest_rl, s64 src_lcn)
---- a/include/ntfs-3g/param.h.ref	2017-03-23 10:42:44.000000000 +0100
-+++ b/include/ntfs-3g/param.h	2018-05-07 09:11:13.088302600 +0200
-@@ -40,6 +40,13 @@ 
- };
- 
- /*
-+ *		Parameters for formatting
-+ */
-+
-+		/* Up to Windows 10, the cluster size was limited to 64K */
-+#define NTFS_MAX_CLUSTER_SIZE 2097152 /* Windows 10 Creators allows 2MB */
-+
-+/*
-  *		Parameters for compression
-  */
- 

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
deleted file mode 100644
index f56eadc882f..00000000000
--- a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-check-mftmirr.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/libntfs-3g/volume.c.ref	2017-03-23 10:42:44.000000000 +0100
-+++ b/libntfs-3g/volume.c	2017-12-20 08:11:51.842424300 +0100
-@@ -959,7 +959,8 @@
- 		vol->mftmirr_size = l;
- 	}
- 	ntfs_log_debug("Comparing $MFTMirr to $MFT...\n");
--	for (i = 0; i < vol->mftmirr_size; ++i) {
-+		/* Windows 10 does not update the full $MFTMirr any more */
-+	for (i = 0; (i < vol->mftmirr_size) && (i < FILE_first_user); ++i) {
- 		MFT_RECORD *mrec, *mrec2;
- 		const char *ESTR[12] = { "$MFT", "$MFTMirr", "$LogFile",
- 			"$Volume", "$AttrDef", "root directory", "$Bitmap",

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
deleted file mode 100644
index 7d2496d372d..00000000000
--- a/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-full-clusters.patch
+++ /dev/null
@@ -1,81 +0,0 @@
---- a/ntfsprogs/ntfsclone.c	2018-05-16 18:46:47.114964000 +0200
-+++ b/ntfsprogs/ntfsclone.c	2018-07-16 14:03:20.273809100 +0200
-@@ -776,6 +776,10 @@ 
- 
- 		/* possible partial cluster holding the backup boot sector */
- 	backup_bootsector = (lcn + 1)*csize >= full_device_size;
-+	buff = (char*)ntfs_malloc(csize);
-+	if (!buff)
-+		err_exit("Not enough memory");
-+
- 	if (backup_bootsector) {
- 		csize = full_device_size - lcn*csize;
- 		if (csize < 0) {
-@@ -783,10 +787,6 @@ 
- 		}
- 	}
- 
--	buff = (char*)ntfs_malloc(csize);
--	if (!buff)
--		err_exit("Not enough memory");
--
- // need reading when not about to write ?
- 	if (read_all(fd, buff, csize) == -1) {
- 
-@@ -1507,6 +1507,7 @@ 
- 	s64 mft_no;
- 	u32 mft_record_size;
- 	u32 csize;
-+	u32 buff_size;
- 	u32 bytes_per_sector;
- 	u32 records_per_set;
- 	u32 clusters_per_set;
-@@ -1524,15 +1525,18 @@ 
- 		/*
- 		 * Depending on the sizes, there may be several records
- 		 * per cluster, or several clusters per record.
-+		 * Anyway, full clusters are needed for rescuing bad ones.
- 		 */
- 	if (csize >= mft_record_size) {
- 		records_per_set = csize/mft_record_size;
- 		clusters_per_set = 1;
-+		buff_size = csize;
- 	} else {
- 		clusters_per_set = mft_record_size/csize;
- 		records_per_set = 1;
-+		buff_size = mft_record_size;
- 	}
--	buff = (char*)ntfs_malloc(mft_record_size);
-+	buff = (char*)ntfs_malloc(buff_size);
- 	if (!buff)
- 		err_exit("Not enough memory");
- 
-@@ -1585,6 +1589,7 @@ 
- 	void *fd;
- 	u32 indx_record_size;
- 	u32 csize;
-+	u32 buff_size;
- 	u32 bytes_per_sector;
- 	u32 records_per_set;
- 	u32 clusters_per_set;
-@@ -1601,16 +1606,19 @@ 
- 		/*
- 		 * Depending on the sizes, there may be several records
- 		 * per cluster, or several clusters per record.
-+		 * Anyway, full clusters are needed for rescuing bad ones.
- 		 */
- 	indx_record_size = image->ni->vol->indx_record_size;
- 	if (csize >= indx_record_size) {
- 		records_per_set = csize/indx_record_size;
- 		clusters_per_set = 1;
-+		buff_size = csize;
- 	} else {
- 		clusters_per_set = indx_record_size/csize;
- 		records_per_set = 1;
-+		buff_size = indx_record_size;
- 	}
--	buff = (char*)ntfs_malloc(indx_record_size);
-+	buff = (char*)ntfs_malloc(buff_size);
- 	if (!buff)
- 		err_exit("Not enough memory");
- 

diff --git a/sys-fs/ntfs3g/metadata.xml b/sys-fs/ntfs3g/metadata.xml
index 20cef377f9b..e443af38590 100644
--- a/sys-fs/ntfs3g/metadata.xml
+++ b/sys-fs/ntfs3g/metadata.xml
@@ -1,31 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="person">
-	<email>chutzpah@gentoo.org</email>
-</maintainer>
-<maintainer type="project">
-	<email>base-system@gentoo.org</email>
-	<name>Gentoo Base System</name>
-</maintainer>
-<longdescription lang="en">
-The ntfs-3g driver is an open source, GPL licensed, third generation Linux 
-NTFS driver for 32-bit, little-endian architectures which was implemented 
-by the Linux-NTFS project. It provides full read-write access to NTFS, 
-excluding access to encrypted files, writing compressed files, changing 
-file ownership, access right.
-</longdescription>
-<use>
-	<flag name="external-fuse">
-		Use external FUSE library instead of internal one. Must be disabled
-		for unprivileged mounting to work.
-	</flag>
-	<flag name="ntfsdecrypt">Build and install the ntfsdecrypt application.</flag>
-	<flag name="ntfsprogs">Include internal version of ntfsprogs.</flag>
-</use>
-<upstream>
-	<bugs-to>http://tuxera.com/forum/</bugs-to>
-	<remote-id type="cpe">cpe:/a:ntfs-3g:ntfs-3g</remote-id>
-	<remote-id type="sourceforge">ntfs-3g</remote-id>
-</upstream>
+	<maintainer type="person">
+		<email>chutzpah@gentoo.org</email>
+	</maintainer>
+	<maintainer type="project">
+		<email>base-system@gentoo.org</email>
+		<name>Gentoo Base System</name>
+	</maintainer>
+	<longdescription lang="en">
+		The ntfs-3g driver is an open source, GPL licensed, third generation Linux 
+		NTFS driver for 32-bit, little-endian architectures which was implemented 
+		by the Linux-NTFS project. It provides full read-write access to NTFS, 
+		excluding access to encrypted files, writing compressed files, changing 
+		file ownership, access right.
+	</longdescription>
+	<use>
+		<flag name="ntfsdecrypt">Build and install the ntfsdecrypt application.</flag>
+		<flag name="ntfsprogs">Include internal version of ntfsprogs.</flag>
+	</use>
+	<upstream>
+		<bugs-to>http://tuxera.com/forum/</bugs-to>
+		<remote-id type="cpe">cpe:/a:ntfs-3g:ntfs-3g</remote-id>
+		<remote-id type="sourceforge">ntfs-3g</remote-id>
+	</upstream>
 </pkgmetadata>

diff --git a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild b/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild
deleted file mode 100644
index 2915df67727..00000000000
--- a/sys-fs/ntfs3g/ntfs3g-2017.3.23-r3.ebuild
+++ /dev/null
@@ -1,106 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit linux-info udev toolchain-funcs libtool
-
-MY_PN=${PN/3g/-3g}
-MY_P=${MY_PN}_ntfsprogs-${PV}
-
-DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
-HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
-SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
-
-LICENSE="GPL-2"
-# The subslot matches the SONAME major #.
-SLOT="0/88"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="acl debug +external-fuse ntfsdecrypt +ntfsprogs static-libs suid xattr"
-
-RDEPEND="
-	ntfsdecrypt? (
-		>=dev-libs/libgcrypt-1.2.2:0
-		>=net-libs/gnutls-1.4.4
-	)
-	external-fuse? (
-		>=sys-fs/fuse-2.8.0:0
-	)
-"
-DEPEND="${RDEPEND}
-	sys-apps/attr
-"
-BDEPEND="
-	virtual/pkgconfig
-"
-
-S="${WORKDIR}/${MY_P}"
-
-DOCS="AUTHORS ChangeLog CREDITS README"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2014.2.15-no-split-usr.patch
-	"${FILESDIR}"/${PN}-2016.2.22-sysmacros.patch #580136
-	# Fedora fixes
-	"${FILESDIR}"/${PN}-2017.3.23-check-mftmirr.patch
-	"${FILESDIR}"/${PN}-2017.3.23-big-sectors.patch
-	"${FILESDIR}"/${PN}-2017.3.23-full-clusters.patch
-	"${FILESDIR}"/CVE-2019-9755.patch
-)
-
-pkg_setup() {
-	if use external-fuse && use kernel_linux; then
-		if kernel_is lt 2 6 9; then
-			die "Your kernel is too old."
-		fi
-		CONFIG_CHECK="~FUSE_FS"
-		FUSE_FS_WARNING="You need to have FUSE module built to use ntfs-3g"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	default
-	# Keep the symlinks in the same place we put the main binaries.
-	# Having them in / when all the progs are in /usr is pointless.
-	sed -i \
-		-e 's:/sbin:$(sbindir):g' \
-		{ntfsprogs,src}/Makefile.in || die #578336
-	# Note: patches apply to Makefile.in, so don't run autotools here.
-	elibtoolize
-}
-
-src_configure() {
-	# disable hd library until we have the right library in the tree and
-	# don't links to hwinfo one causing issues like bug #602360
-	tc-ld-disable-gold
-	# passing --exec-prefix is needed as the build system is trying to be clever
-	# and install itself into / instead of /usr in order to be compatible with
-	# separate-/usr setups (which we don't support without an initrd).
-	econf \
-		--exec-prefix="${EPREFIX}"/usr \
-		$(use_enable debug) \
-		--enable-ldscript \
-		--disable-ldconfig \
-		$(use_enable acl posix-acls) \
-		$(use_enable xattr xattr-mappings) \
-		$(use_enable ntfsdecrypt crypto) \
-		$(use_enable ntfsprogs) \
-		$(use_enable ntfsprogs quarantined) \
-		--without-uuid \
-		--without-hd \
-		--enable-extras \
-		$(use_enable static-libs static) \
-		--with-fuse=$(usex external-fuse external internal)
-}
-
-src_install() {
-	default
-
-	use suid && fperms u+s /usr/bin/ntfs-3g
-	# Not needed with the link of mount.ntfs being created, causes
-	# issues like bug #635080
-#	udev_dorules "${FILESDIR}"/99-ntfs3g.rules
-	dosym mount.ntfs-3g /usr/sbin/mount.ntfs #374197
-
-	find "${D}" -name '*.la' -type f -delete || die
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/
@ 2022-09-22  3:04 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-09-22  3:04 UTC (permalink / raw
  To: gentoo-commits

commit:     8fb0d9000464e255de67283f67805ec15683ab69
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 22 03:03:30 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 22 03:03:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fb0d900

sys-fs/ntfs3g: fix configure bashism

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/ntfs3g-2022.5.17-configure-bashism.patch | 36 +++++++++
 sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild           | 94 ++++++++++++++++++++++
 2 files changed, 130 insertions(+)

diff --git a/sys-fs/ntfs3g/files/ntfs3g-2022.5.17-configure-bashism.patch b/sys-fs/ntfs3g/files/ntfs3g-2022.5.17-configure-bashism.patch
new file mode 100644
index 000000000000..280620d0ee68
--- /dev/null
+++ b/sys-fs/ntfs3g/files/ntfs3g-2022.5.17-configure-bashism.patch
@@ -0,0 +1,36 @@
+https://github.com/tuxera/ntfs-3g/pull/58
+
+From a008fc4b3553583369111b145172a92542de4598 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Thu, 22 Sep 2022 04:00:45 +0100
+Subject: [PATCH] configure.ac: fix bashism in fuse check
+
+configure scripts need to be runnable with a POSIX-compliant /bin/sh.
+
+On many (but not all!) systems, /bin/sh is provided by Bash, so errors
+like this aren't spotted. Notably Debian defaults to /bin/sh provided
+by dash which doesn't tolerate such bashisms as '=='.
+
+This retains compatibility with bash.
+
+Fixes configure warnings/errors like:
+```
+checking Windows OS... no
+./configure: 13360: test: xinternal: unexpected operator
+checking for pthread_create in -lpthread... yes
+checking Solaris OS... no
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -228,7 +228,7 @@ esac
+ 
+ if test "x${enable_ntfs_3g}" != "xyes"; then
+ 	with_fuse="none"
+-elif test "x${with_fuse}" == "x"; then
++elif test "x${with_fuse}" = "x"; then
+ 	AC_MSG_CHECKING([fuse compatibility])
+ 	case "${target_os}" in
+ 	linux*|solaris*)
+

diff --git a/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild b/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild
new file mode 100644
index 000000000000..085691d55b6d
--- /dev/null
+++ b/sys-fs/ntfs3g/ntfs3g-2022.5.17-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 2006-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools toolchain-funcs
+
+MY_P="ntfs-3g_ntfsprogs-${PV}"
+
+DESCRIPTION="Open source read-write NTFS driver that runs under FUSE"
+HOMEPAGE="http://www.tuxera.com/community/ntfs-3g-download/"
+HOMEPAGE="https://jp-andre.pagesperso-orange.fr/advanced-ntfs-3g.html"
+SRC_URI="http://tuxera.com/opensource/${MY_P}.tgz"
+
+LICENSE="GPL-2"
+# The subslot matches the SONAME major #.
+SLOT="0/89"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug +fuse +mount-ntfs ntfsdecrypt +ntfsprogs static-libs suid xattr"
+
+RDEPEND="
+	sys-apps/util-linux:0=
+	ntfsdecrypt? (
+		>=dev-libs/libgcrypt-1.2.2:0
+		>=net-libs/gnutls-1.4.4
+	)
+"
+DEPEND="${RDEPEND}
+	sys-apps/attr
+"
+BDEPEND="
+	virtual/pkgconfig
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2022.5.17-configure-bashism.patch
+)
+
+src_prepare() {
+	default
+
+	# Only needed for bashism patch
+	eautoreconf
+}
+
+src_configure() {
+	tc-ld-disable-gold
+
+	local myconf=(
+		# passing --exec-prefix is needed as the build system is trying to be clever
+		# and install itself into / instead of /usr in order to be compatible with
+		# separate-/usr setups (which we don't support without an initrd).
+		--exec-prefix="${EPREFIX}"/usr
+
+		--disable-ldconfig
+		--enable-extras
+		$(use_enable debug)
+		$(use_enable fuse ntfs-3g)
+		$(use_enable acl posix-acls)
+		$(use_enable xattr xattr-mappings)
+		$(use_enable ntfsdecrypt crypto)
+		$(use_enable ntfsprogs)
+		$(use_enable static-libs static)
+
+		--with-uuid
+
+		# disable hd library until we have the right library in the tree and
+		# don't links to hwinfo one causing issues like bug #602360
+		--without-hd
+
+		# Needed for suid
+		# https://bugs.gentoo.org/822024
+		--with-fuse=internal
+	)
+
+	econf "${myconf[@]}"
+}
+
+src_install() {
+	default
+	if use fuse; then
+		# Plugins directory
+		keepdir "/usr/$(get_libdir)/ntfs-3g"
+		if use suid; then
+			fperms u+s /usr/bin/ntfs-3g
+		fi
+		if use mount-ntfs; then
+			dosym mount.ntfs-3g /sbin/mount.ntfs
+		fi
+	fi
+	find "${ED}" -name '*.la' -type f -delete || die
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-09-22  3:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-23 19:08 [gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/ Mike Frysinger
  -- strict thread matches above, loose matches on Subject: below --
2017-02-01 22:36 Patrick McLean
2019-03-23 12:59 Pacho Ramos
2020-06-09 23:41 Mike Gilbert
2021-05-14 10:04 David Seifert
2022-09-22  3:04 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox