[gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/

2022-09-21 Thread Sam James
commit: 8fb0d9000464e255de67283f67805ec15683ab69
Author: Sam James  gentoo  org>
AuthorDate: Thu Sep 22 03:03:30 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Sep 22 03:03:30 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8fb0d900

sys-fs/ntfs3g: fix configure bashism

Signed-off-by: Sam James  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 ..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 
+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 
+--- 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 ..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
+}



[gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/

2021-05-14 Thread David Seifert
commit: 6117c5631916c07eff368af7373a6561b005dcad
Author: David Seifert  gentoo  org>
AuthorDate: Fri May 14 10:03:48 2021 +
Commit: David Seifert  gentoo  org>
CommitDate: Fri May 14 10:03:48 2021 +
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  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..000
--- 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?= 
-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 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/

2020-06-09 Thread Mike Gilbert
commit: 3f7be9e54a478c557dba6ffe32362d7cc5b4d107
Author: Mike Gilbert  gentoo  org>
AuthorDate: Tue Jun  9 23:40:02 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Tue Jun  9 23:41:22 2020 +
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  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 
6028048d676372c062cda1cf9ee43f2c1f035d080dde1201746d994e705756ab219de8359b1f8708e83e11c0036cdc9e54299aa433f383e698e425ff2fed
 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..000
--- 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..000
--- 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="!=dev-libs/libgcrypt-1.2.2:0
-   >=net-libs/gnutls-1.4.4
-   )
-   external-fuse? (
-   >=sys-fs/fuse-2.8.0
-   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="!=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
-  

[gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/

2019-03-23 Thread Pacho Ramos
commit: e97a616356b7dccec15d1c5be2c2c861afa160fa
Author: Pacho Ramos  gentoo  org>
AuthorDate: Sat Mar 23 12:58:31 2019 +
Commit: Pacho Ramos  gentoo  org>
CommitDate: Sat Mar 23 12:58:49 2019 +
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  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 000..1cb8bb6c46c
--- /dev/null
+++ b/sys-fs/ntfs3g/files/ntfs3g-2017.3.23-big-sectors.patch
@@ -0,0 +1,379 @@
+--- a/libntfs-3g/bootsect.c.ref2017-03-23 10:42:44.0 +0100
 b/libntfs-3g/bootsect.c2018-05-07 09:11:13.004710800 +0200
+@@ -38,6 +38,7 @@ 
+ #include 
+ #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.ref2017-03-23 10:42:44.0 +0100
 b/ntfsprogs/mkntfs.8.in2018-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.0 +0100
 b/ntfsprogs/mkntfs.c   2018-05-07 09:11:13.035522300 +0200
+@@ -6,7 +6,7 @@ 
+  * Copyright (c) 2002-2006 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/

2017-02-01 Thread Patrick McLean
commit: 63ab8f5018576fc957feef2f1cc35fc7aabd12df
Author: Patrick McLean  gentoo  org>
AuthorDate: Wed Feb  1 22:35:58 2017 +
Commit: Patrick McLean  gentoo  org>
CommitDate: Wed Feb  1 22:36:29 2017 +
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 ..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, 1 };   /* 100 msec */
+   fuse_fstype fstype;
+ 
+   if (!stat(cmd, ) && !geteuid()) {
+   pid = fork();
+   if (!pid) {
+-  execl(cmd, cmd, "fuse", NULL);
++  execle(cmd, cmd, "fuse", NULL, );
+   _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, 1 };   /* 100 msec */
+   fuse_fstype fstype;
+   
+   if (!stat(cmd, ) && !geteuid()) {
+   pid = fork();
+   if (!pid) {
+-  execl(cmd, cmd, "fuse", NULL);
++  execle(cmd, cmd, "fuse", NULL, );
+   _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 ..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="!=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 

[gentoo-commits] repo/gentoo:master commit in: sys-fs/ntfs3g/, sys-fs/ntfs3g/files/

2016-05-23 Thread Mike Frysinger
commit: 875494e780053656659967370155f221dcdfb5af
Author: Mike Frysinger  gentoo  org>
AuthorDate: Mon May 23 19:07:18 2016 +
Commit: Mike Frysinger  gentoo  org>
CommitDate: Mon May 23 19:08:17 2016 +
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 000..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 
+ #endif
++#ifdef HAVE_SYS_MKDEV_H
++#include 
++#endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ 
+ #ifdef HAVE_SYS_STAT_H
+ #include 
+--- a/src/lowntfs-3g.c
 b/src/lowntfs-3g.c
+@@ -76,6 +76,9 @@
+ #ifdef HAVE_SYS_MKDEV_H
+ #include 
+ #endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ 
+ #if defined(__APPLE__) || defined(__DARWIN__)
+ #include 
+--- a/src/ntfs-3g.c
 b/src/ntfs-3g.c
+@@ -75,6 +75,9 @@
+ #ifdef HAVE_SYS_MKDEV_H
+ #include 
+ #endif
++#ifdef HAVE_SYS_SYSMACROS_H
++#include 
++#endif
+ 
+ #if defined(__APPLE__) || defined(__DARWIN__)
+ #include 

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() {