public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2017-01-17 16:23 Lars Wendler
  0 siblings, 0 replies; 16+ messages in thread
From: Lars Wendler @ 2017-01-17 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     0d0ddd19f8af195c7ec4e60a4db7ca3dba756c2f
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 17 15:17:02 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jan 17 16:22:59 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d0ddd19

sys-apps/file: Removed old.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sys-apps/file/Manifest                       |   2 -
 sys-apps/file/file-5.22.ebuild               | 105 -------------------------
 sys-apps/file/file-5.28.ebuild               | 112 ---------------------------
 sys-apps/file/files/file-5.28-der-mmap.patch |  36 ---------
 4 files changed, 255 deletions(-)

diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index 58b3473..61881b5 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -1,4 +1,2 @@
-DIST file-5.22.tar.gz 732556 SHA256 c4e3a8e44cb888c5e4b476e738503e37fb9de3b25a38c143e214bfc12109fc0b SHA512 e9f1648c3b490bac642a2a9e01d31a8bd49c3e2a1feea1b25869aa1d5e37aa99bbf3fdc5d301618a8b97aec046f10e400a57f8a1d0dd61d3583830aaf3fcbda8 WHIRLPOOL de9ce9305fd824d85128617e196fe6b02ea470b63eb2a35d31e857f7cf91e09f85166aaa72695aaf4a7516413b3a146db85588e7da65f32b131a477b3dece176
 DIST file-5.25.tar.gz 739485 SHA256 3735381563f69fb4239470b8c51b876a80425348b8285a7cded8b61d6b890eca SHA512 4a5176a7e80df2bb7e45916490433d22eb98a442d49d04146afcbdcf92ff619ea3e73e95c8991e6b6a0628efb9d127bfa4aafc1cae523f8261ca693bc5e13402 WHIRLPOOL 70c682ff05e58487a551cd98091e27272baa41e034157bec93ac4d69b2f3e93caed40f37d64ef698527124e86ba4a5cb5975abacfd9eb30e4d3583262e5f0b0b
-DIST file-5.28.tar.gz 777859 SHA256 0ecb5e146b8655d1fa84159a847ee619fc102575205a0ff9c6cc60fc5ee2e012 SHA512 42136505e21b14396e3af4e0d3f349687176cf0771d2dc9fed3599a30c7bab59184459f1e51033bce2d6ee0e292eba034bdfda727decca1219c1b3419e6bbfdc WHIRLPOOL f12889fc2a692084989d7029d8b9c849344e4236df8afc9e46c6441712aace5e07fee3bb05267ef76da7d41fbcb6b21db4e3bf6e22af660d43b2edeb6ff1571c
 DIST file-5.29.tar.gz 783919 SHA256 ea661277cd39bf8f063d3a83ee875432cc3680494169f952787e002bdd3884c0 SHA512 58db17a6bea5d71723f3f7d25300985b3aa78f27fdb1e8b9bb41e61dc325236acaca7c1475cc2725ed672151e1764892dff83d37c24313fe26f45ee3388d4462 WHIRLPOOL e80f117f3db08707c197db2f30aa81407c85b6a5ff0125b41a311c1d6f7dfbf3c0a315ebd1115bef3eecf05beed1fad3570a90d047ecbc7d3a29adcb8ea5c094

diff --git a/sys-apps/file/file-5.22.ebuild b/sys-apps/file/file-5.22.ebuild
deleted file mode 100644
index ed536e5..00000000
--- a/sys-apps/file/file-5.22.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="4"
-PYTHON_COMPAT=( python{2_7,3_4} )
-DISTUTILS_OPTIONAL=1
-
-inherit eutils distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="git://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz
-		ftp://ftp.gw.com/mirrors/pub/unix/file/${P}.tar.gz"
-	KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-fi
-
-DESCRIPTION="identify a file's format by scanning binary data for patterns"
-HOMEPAGE="http://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="python static-libs zlib"
-
-DEPEND="python? ( ${PYTHON_DEPS} )
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-	abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20131008-r21
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-RDEPEND="${DEPEND}
-	python? ( !dev-python/python-magic )"
-
-src_prepare() {
-	[[ ${PV} == "9999" ]] && eautoreconf
-	elibtoolize
-
-	# don't let python README kill main README #60043
-	mv python/README{,.python}
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE=${S} \
-	ac_cv_header_zlib_h=$(usex zlib) \
-	ac_cv_lib_z_gzopen=$(usex zlib)
-	econf \
-		$(use_enable static-libs static)
-}
-
-src_configure() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions #362941
-	if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
-		mkdir -p "${WORKDIR}"/build
-		cd "${WORKDIR}"/build
-		tc-export_build_env BUILD_C{C,XX}
-		ECONF_SOURCE=${S} \
-		ac_cv_header_zlib_h=no \
-		ac_cv_lib_z_gzopen=no \
-		CHOST=${CBUILD} \
-		CFLAGS=${BUILD_CFLAGS} \
-		CXXFLAGS=${BUILD_CXXFLAGS} \
-		CPPFLAGS=${BUILD_CPPFLAGS} \
-		LDFLAGS="${BUILD_LDFLAGS} -static" \
-		CC=${BUILD_CC} \
-		CXX=${BUILD_CXX} \
-		econf --disable-shared
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		emake -C src libmagic.la
-	fi
-}
-
-src_compile() {
-	if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
-		emake -C "${WORKDIR}"/build/src file
-		PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-	multilib-minimal_src_compile
-
-	use python && cd python && distutils-r1_src_compile
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT README
-
-	use python && cd python && distutils-r1_src_install
-	prune_libtool_files
-}

diff --git a/sys-apps/file/file-5.28.ebuild b/sys-apps/file/file-5.28.ebuild
deleted file mode 100644
index ca94714..00000000
--- a/sys-apps/file/file-5.28.ebuild
+++ /dev/null
@@ -1,112 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PYTHON_COMPAT=( python{2_7,3_4,3_5} pypy )
-DISTUTILS_OPTIONAL=1
-
-inherit eutils distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="git://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz
-		ftp://ftp.gw.com/mirrors/pub/unix/file/${P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-fi
-
-DESCRIPTION="identify a file's format by scanning binary data for patterns"
-HOMEPAGE="http://www.darwinsys.com/file/ http://mx.gw.com/pipermail/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="python static-libs zlib"
-
-DEPEND="
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}
-	python? ( !dev-python/python-magic )"
-
-src_prepare() {
-	[[ ${PV} == "9999" ]] && eautoreconf
-	elibtoolize
-
-	epatch "${FILESDIR}"/${P}-der-mmap.patch
-
-	# don't let python README kill main README #60043
-	mv python/README{,.python}
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE=${S} \
-	econf \
-		--enable-fsect-man5 \
-		$(use_enable static-libs static) \
-		$(use_enable zlib)
-}
-
-src_configure() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions #362941
-	if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
-		mkdir -p "${WORKDIR}"/build
-		cd "${WORKDIR}"/build
-		tc-export_build_env BUILD_C{C,XX}
-		ECONF_SOURCE=${S} \
-		ac_cv_header_zlib_h=no \
-		ac_cv_lib_z_gzopen=no \
-		CHOST=${CBUILD} \
-		CFLAGS=${BUILD_CFLAGS} \
-		CXXFLAGS=${BUILD_CXXFLAGS} \
-		CPPFLAGS=${BUILD_CPPFLAGS} \
-		LDFLAGS="${BUILD_LDFLAGS} -static" \
-		CC=${BUILD_CC} \
-		CXX=${BUILD_CXX} \
-		econf --disable-shared
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		cd src
-		emake magic.h #586444
-		emake libmagic.la
-	fi
-}
-
-src_compile() {
-	if tc-is-cross-compiler && ! ROOT=/ has_version "~${CATEGORY}/${P}" ; then
-		emake -C "${WORKDIR}"/build/src magic.h #586444
-		emake -C "${WORKDIR}"/build/src file
-		PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-	multilib-minimal_src_compile
-
-	use python && cd python && distutils-r1_src_compile
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT README
-
-	use python && cd python && distutils-r1_src_install
-	prune_libtool_files
-}

diff --git a/sys-apps/file/files/file-5.28-der-mmap.patch b/sys-apps/file/files/file-5.28-der-mmap.patch
deleted file mode 100644
index 50542a6..00000000
--- a/sys-apps/file/files/file-5.28-der-mmap.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-fix from upstream for building on systems w/out mmap (e.g. mingw)
-
-From 6f1fbff8114ec2319dd874f3552105b378931eb9 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Fri, 15 Jul 2016 00:56:04 +0000
-Subject: [PATCH] we only need mman for testing.
-
----
- src/der.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/der.c b/src/der.c
-index fcdeb6c79814..fd093d29ee89 100644
---- a/src/der.c
-+++ b/src/der.c
-@@ -35,8 +35,6 @@
- #endif
- 
- #include <sys/types.h>
--#include <sys/stat.h>
--#include <sys/mman.h>
- 
- #include <stdio.h>
- #include <fcntl.h>
-@@ -53,6 +51,8 @@
- #include "magic.h"
- #include "der.h"
- #else
-+#include <sys/mman.h>
-+#include <sys/stat.h>
- #include <err.h>
- #endif
- 
--- 
-2.9.0
-


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2018-07-19 16:12 Thomas Deutschmann
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Deutschmann @ 2018-07-19 16:12 UTC (permalink / raw
  To: gentoo-commits

commit:     9bb8160bd3bbd28d2b5f3b50e9e657537a4a32ba
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 19 16:12:18 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Jul 19 16:12:18 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bb8160b

sys-apps/file: Add missing gl_VISIBILITY macro in configure script

Closes: https://bugs.gentoo.org/661508
Package-Manager: Portage-2.3.42, Repoman-2.3.9
RepoMan-Options: --force

 .../{file-5.33-r2.ebuild => file-5.33-r3.ebuild}   |   8 +-
 .../file/files/file-5.33-gl_VISIBILITY-macro.patch | 116 +++++++++++++++++++++
 2 files changed, 123 insertions(+), 1 deletion(-)

diff --git a/sys-apps/file/file-5.33-r2.ebuild b/sys-apps/file/file-5.33-r3.ebuild
similarity index 93%
rename from sys-apps/file/file-5.33-r2.ebuild
rename to sys-apps/file/file-5.33-r3.ebuild
index e67df7bc93a..e9203f385ff 100644
--- a/sys-apps/file/file-5.33-r2.ebuild
+++ b/sys-apps/file/file-5.33-r3.ebuild
@@ -33,11 +33,17 @@ DEPEND="
 RDEPEND="${DEPEND}
 	python? ( !dev-python/python-magic )"
 
-PATCHES=( "${FILESDIR}"/${P}-CVE-2018-10360.patch )
+PATCHES=(
+	"${FILESDIR}"/${P}-CVE-2018-10360.patch
+	"${FILESDIR}"/${P}-gl_VISIBILITY-macro.patch
+)
 
 src_prepare() {
 	default
 
+	# We are patching configure script so fix timestamp to avoid autoreconf
+	touch -r compile configure
+
 	[[ ${PV} == "9999" ]] && eautoreconf
 	elibtoolize
 

diff --git a/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch b/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch
new file mode 100644
index 00000000000..cef3cb5518b
--- /dev/null
+++ b/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch
@@ -0,0 +1,116 @@
+https://bugs.gentoo.org/661508
+
+--- a/configure
++++ b/configure
+@@ -638,6 +638,8 @@
+ IS_CROSS_COMPILE_FALSE
+ IS_CROSS_COMPILE_TRUE
+ LIBOBJS
++HAVE_VISIBILITY
++CFLAG_VISIBILITY
+ OTOOL64
+ OTOOL
+ LIPO
+@@ -12512,7 +12519,92 @@
+ # Only expand once:
+ 
+ 
+-gl_VISIBILITY
++
++
++  CFLAG_VISIBILITY=
++  HAVE_VISIBILITY=0
++  if test -n "$GCC"; then
++                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
++$as_echo_n "checking whether the -Werror option is usable... " >&6; }
++    if ${gl_cv_cc_vis_werror+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++
++      gl_save_CFLAGS="$CFLAGS"
++      CFLAGS="$CFLAGS -Werror"
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  gl_cv_cc_vis_werror=yes
++else
++  gl_cv_cc_vis_werror=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++      CFLAGS="$gl_save_CFLAGS"
++fi
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
++$as_echo "$gl_cv_cc_vis_werror" >&6; }
++        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
++$as_echo_n "checking for simple visibility declarations... " >&6; }
++    if ${gl_cv_cc_visibility+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++
++      gl_save_CFLAGS="$CFLAGS"
++      CFLAGS="$CFLAGS -fvisibility=hidden"
++                                    if test $gl_cv_cc_vis_werror = yes; then
++        CFLAGS="$CFLAGS -Werror"
++      fi
++      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++extern __attribute__((__visibility__("hidden"))) int hiddenvar;
++             extern __attribute__((__visibility__("default"))) int exportedvar;
++             extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
++             extern __attribute__((__visibility__("default"))) int exportedfunc (void);
++             void dummyfunc (void) {}
++
++int
++main ()
++{
++
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  gl_cv_cc_visibility=yes
++else
++  gl_cv_cc_visibility=no
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
++      CFLAGS="$gl_save_CFLAGS"
++fi
++
++    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
++$as_echo "$gl_cv_cc_visibility" >&6; }
++    if test $gl_cv_cc_visibility = yes; then
++      CFLAG_VISIBILITY="-fvisibility=hidden"
++      HAVE_VISIBILITY=1
++    fi
++  fi
++
++
++
++cat >>confdefs.h <<_ACEOF
++#define HAVE_VISIBILITY $HAVE_VISIBILITY
++_ACEOF
++
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+ $as_echo_n "checking for ANSI C header files... " >&6; }
+ if ${ac_cv_header_stdc+:} false; then :
+@@ -16194,7 +16286,7 @@
+     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+     test -z "$DEPDIR" && continue
+     am__include=`sed -n 's/^am__include = //p' < "$mf"`
+-    test -z "am__include" && continue
++    test -z "$am__include" && continue
+     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+     # Find all dependency output files, they are included files with
+     # $(DEPDIR) in their names.  We invoke sed twice because it is the


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2018-11-27 14:38 Lars Wendler
  0 siblings, 0 replies; 16+ messages in thread
From: Lars Wendler @ 2018-11-27 14:38 UTC (permalink / raw
  To: gentoo-commits

commit:     84feef34d820a60fdfdb1636b3233c1331399d97
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 27 14:38:16 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 14:38:16 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84feef34

sys-apps/file: Removed old.

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/file/Manifest                             |   1 -
 sys-apps/file/file-5.33-r4.ebuild                  | 134 ---------------------
 sys-apps/file/files/file-5.33-CVE-2018-10360.patch |  18 ---
 .../file/files/file-5.33-berkdb_bogus_magic.patch  |  33 -----
 .../file/files/file-5.33-gl_VISIBILITY-macro.patch | 116 ------------------
 5 files changed, 302 deletions(-)

diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index 4999f4b174c..9eb27558139 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -1,3 +1,2 @@
-DIST file-5.33.tar.gz 817060 BLAKE2B 735f176f09085243dacaddda1b734ef2191ff1684f08022ed1874e84fd0c84679b5a765383c5c5ad27a7216abc23b9c2211fb7110846122563e18285de0f0e51 SHA512 36c9f2e2aa814b5557eef114fdd3de159688c7a3c9632a9f5c6355c4d2a5694cee81279bda80897616fca07289a7fedb1f797439a2903c76dc84870694773c9e
 DIST file-5.34.tar.gz 840219 BLAKE2B 20f34684e583d1cb42967f1106d979a42f55fd78097e26929ab4e6cd470b0d3a12c9f1fad89c982ed42869455ba0f3381c812ed00c31112e5ad17edcd50783e0 SHA512 57849f8496fd356a66e5559804fdd907059dc2e2f75ede470a25c65b1c499481aad3d7978454b15a15e94c07c9d6795864e8705304a2281dacf1c4e31501bed8
 DIST file-5.35.tar.gz 865425 BLAKE2B 325b95bc45b8e21b568ad816f8c1817dc170f56b78e460ac9bb18c70f22df2491c37f7f9c38c3d85010a7a609e75c26b19b6adef208137cb04c4c40fbe8c1d05 SHA512 cbecc52e9209be8bc090752d0672efa181625d4e1e688e63edd1f5657b29bad69364a477fb4ed85d1fa413b8002c8578c86153d2acaaecce78446c0ca6ea9e38

diff --git a/sys-apps/file/file-5.33-r4.ebuild b/sys-apps/file/file-5.33-r4.ebuild
deleted file mode 100644
index 1221edeea29..00000000000
--- a/sys-apps/file/file-5.33-r4.ebuild
+++ /dev/null
@@ -1,134 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-DESCRIPTION="identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="python static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}
-	python? ( !dev-python/python-magic )"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-CVE-2018-10360.patch
-	"${FILESDIR}"/${P}-gl_VISIBILITY-macro.patch
-	"${FILESDIR}"/${P}-berkdb_bogus_magic.patch #661922
-)
-
-src_prepare() {
-	default
-
-	# We are patching configure script so fix timestamp to avoid autoreconf
-	touch -r compile configure
-
-	[[ ${PV} == "9999" ]] && eautoreconf
-	elibtoolize
-
-	# don't let python README kill main README #60043
-	mv python/README{,.python} || die
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--disable-libseccomp
-		--enable-fsect-man5
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-src_configure() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions #362941
-	if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		tc-export_build_env BUILD_C{C,XX}
-		ECONF_SOURCE=${S} \
-		ac_cv_header_zlib_h=no \
-		ac_cv_lib_z_gzopen=no \
-		CHOST=${CBUILD} \
-		CFLAGS=${BUILD_CFLAGS} \
-		CXXFLAGS=${BUILD_CXXFLAGS} \
-		CPPFLAGS=${BUILD_CPPFLAGS} \
-		LDFLAGS="${BUILD_LDFLAGS} -static" \
-		CC=${BUILD_CC} \
-		CXX=${BUILD_CXX} \
-		econf --disable-shared --disable-libseccomp
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		cd src || die
-		emake magic.h #586444
-		emake libmagic.la
-	fi
-}
-
-src_compile() {
-	if tc-is-cross-compiler && ! ROOT=/ has_version "~${CATEGORY}/${P}" ; then
-		emake -C "${WORKDIR}"/build/src magic.h #586444
-		emake -C "${WORKDIR}"/build/src file
-		PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT README
-
-	# Required for `file -C`
-	dodir /usr/share/misc/magic
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-	find "${ED}" -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/files/file-5.33-CVE-2018-10360.patch b/sys-apps/file/files/file-5.33-CVE-2018-10360.patch
deleted file mode 100644
index a489846b10f..00000000000
--- a/sys-apps/file/files/file-5.33-CVE-2018-10360.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Avoid reading past the end of buffer
-
-CVE-2018-10360
-
-https://github.com/file/file/commit/a642587a9c9e2dd7feacdf513c3643ce26ad3c22
-
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -842,7 +842,8 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type,
- 
- 				cname = (unsigned char *)
- 				    &nbuf[doff + prpsoffsets(i)];
--				for (cp = cname; *cp && isprint(*cp); cp++)
-+				for (cp = cname; cp < nbuf + size && *cp
-+				    && isprint(*cp); cp++)
- 					continue;
- 				/*
- 				 * Linux apparently appends a space at the end

diff --git a/sys-apps/file/files/file-5.33-berkdb_bogus_magic.patch b/sys-apps/file/files/file-5.33-berkdb_bogus_magic.patch
deleted file mode 100644
index 7627bafc6ef..00000000000
--- a/sys-apps/file/files/file-5.33-berkdb_bogus_magic.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 4fb6a59df80d4974f8230bfce36e38e6de7d574f Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Thu, 24 May 2018 18:54:40 +0000
-Subject: [PATCH] fix bogus magic
-
----
- magic/Magdir/dbpf | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/magic/Magdir/dbpf b/magic/Magdir/dbpf
-index 65cab61e..8545720d 100644
---- a/magic/Magdir/dbpf
-+++ b/magic/Magdir/dbpf
-@@ -1,6 +1,6 @@
- 
- #------------------------------------------------------------------------------
--# $File: dbpf,v 1.1 2017/10/13 20:47:14 christos Exp $
-+# $File: dbpf,v 1.2 2018/05/24 18:54:40 christos Exp $
- # dppf:	Maxis Database Packed Files, the stored data file format used by all
- #	Maxis games after the Sims: http://wiki.niotso.org/DBPF
- # 	http://www.wiki.sc4devotion.com/index.php?title=DBPF
-@@ -9,9 +9,7 @@
- >4	ulelong	x	\b, version: %u.
- >>8	ulelong	x	\b%u
- >>>36	ulelong	x       \b, files: %u
-+>>24	ledate	!0	\b, created: %s
-+>>28	ledate	!0	\b, modified: %s
- !:ext	dbpf/package/dat/sc4
- !:mime	application/x-maxis-dbpf
--4	ulelong	1
-->8	ulelong	!1
-->>24	ledate	!0	\b, created: %s
-->>>28	ledate	!0	\b, modified: %s

diff --git a/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch b/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch
deleted file mode 100644
index cef3cb5518b..00000000000
--- a/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-https://bugs.gentoo.org/661508
-
---- a/configure
-+++ b/configure
-@@ -638,6 +638,8 @@
- IS_CROSS_COMPILE_FALSE
- IS_CROSS_COMPILE_TRUE
- LIBOBJS
-+HAVE_VISIBILITY
-+CFLAG_VISIBILITY
- OTOOL64
- OTOOL
- LIPO
-@@ -12512,7 +12519,92 @@
- # Only expand once:
- 
- 
--gl_VISIBILITY
-+
-+
-+  CFLAG_VISIBILITY=
-+  HAVE_VISIBILITY=0
-+  if test -n "$GCC"; then
-+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
-+$as_echo_n "checking whether the -Werror option is usable... " >&6; }
-+    if ${gl_cv_cc_vis_werror+:} false; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+      gl_save_CFLAGS="$CFLAGS"
-+      CFLAGS="$CFLAGS -Werror"
-+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+
-+int
-+main ()
-+{
-+
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  gl_cv_cc_vis_werror=yes
-+else
-+  gl_cv_cc_vis_werror=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+      CFLAGS="$gl_save_CFLAGS"
-+fi
-+
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
-+$as_echo "$gl_cv_cc_vis_werror" >&6; }
-+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
-+$as_echo_n "checking for simple visibility declarations... " >&6; }
-+    if ${gl_cv_cc_visibility+:} false; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+
-+      gl_save_CFLAGS="$CFLAGS"
-+      CFLAGS="$CFLAGS -fvisibility=hidden"
-+                                    if test $gl_cv_cc_vis_werror = yes; then
-+        CFLAGS="$CFLAGS -Werror"
-+      fi
-+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h.  */
-+extern __attribute__((__visibility__("hidden"))) int hiddenvar;
-+             extern __attribute__((__visibility__("default"))) int exportedvar;
-+             extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
-+             extern __attribute__((__visibility__("default"))) int exportedfunc (void);
-+             void dummyfunc (void) {}
-+
-+int
-+main ()
-+{
-+
-+  ;
-+  return 0;
-+}
-+_ACEOF
-+if ac_fn_c_try_compile "$LINENO"; then :
-+  gl_cv_cc_visibility=yes
-+else
-+  gl_cv_cc_visibility=no
-+fi
-+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-+      CFLAGS="$gl_save_CFLAGS"
-+fi
-+
-+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
-+$as_echo "$gl_cv_cc_visibility" >&6; }
-+    if test $gl_cv_cc_visibility = yes; then
-+      CFLAG_VISIBILITY="-fvisibility=hidden"
-+      HAVE_VISIBILITY=1
-+    fi
-+  fi
-+
-+
-+
-+cat >>confdefs.h <<_ACEOF
-+#define HAVE_VISIBILITY $HAVE_VISIBILITY
-+_ACEOF
-+
-+
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
- $as_echo_n "checking for ANSI C header files... " >&6; }
- if ${ac_cv_header_stdc+:} false; then :
-@@ -16194,7 +16286,7 @@
-     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-     test -z "$DEPDIR" && continue
-     am__include=`sed -n 's/^am__include = //p' < "$mf"`
--    test -z "am__include" && continue
-+    test -z "$am__include" && continue
-     am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-     # Find all dependency output files, they are included files with
-     # $(DEPDIR) in their names.  We invoke sed twice because it is the


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2019-10-27  0:41 Thomas Deutschmann
  0 siblings, 0 replies; 16+ messages in thread
From: Thomas Deutschmann @ 2019-10-27  0:41 UTC (permalink / raw
  To: gentoo-commits

commit:     e4782ac407f7b8744abf6bb7fe9e60bdd2dffa64
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 27 00:41:03 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Oct 27 00:41:03 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4782ac4

sys-apps/file: fix CVE-2019-18218

Bug: https://bugs.gentoo.org/698610
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../file/{file-5.37.ebuild => file-5.37-r1.ebuild} |  2 ++
 sys-apps/file/files/file-5.37-CVE-2019-18218.patch | 36 ++++++++++++++++++++++
 2 files changed, 38 insertions(+)

diff --git a/sys-apps/file/file-5.37.ebuild b/sys-apps/file/file-5.37-r1.ebuild
similarity index 98%
rename from sys-apps/file/file-5.37.ebuild
rename to sys-apps/file/file-5.37-r1.ebuild
index 7aa0f8d8888..5b6cf1db5d0 100644
--- a/sys-apps/file/file-5.37.ebuild
+++ b/sys-apps/file/file-5.37-r1.ebuild
@@ -33,6 +33,8 @@ DEPEND="
 RDEPEND="${DEPEND}
 	python? ( !dev-python/python-magic )"
 
+PATCHES=( "${FILESDIR}"/${P}-CVE-2019-18218.patch )
+
 src_prepare() {
 	default
 

diff --git a/sys-apps/file/files/file-5.37-CVE-2019-18218.patch b/sys-apps/file/files/file-5.37-CVE-2019-18218.patch
new file mode 100644
index 00000000000..1cd02b778ab
--- /dev/null
+++ b/sys-apps/file/files/file-5.37-CVE-2019-18218.patch
@@ -0,0 +1,36 @@
+CVE-2019-18218
+https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84
+
+--- a/src/cdf.c
++++ b/src/cdf.c
+@@ -1027,8 +1027,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
+ 				goto out;
+ 			}
+ 			nelements = CDF_GETUINT32(q, 1);
+-			if (nelements == 0) {
+-				DPRINTF(("CDF_VECTOR with nelements == 0\n"));
++			if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) {
++				DPRINTF(("CDF_VECTOR with nelements == %"
++				    SIZE_T_FORMAT "u\n", nelements));
+ 				goto out;
+ 			}
+ 			slen = 2;
+@@ -1070,8 +1071,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
+ 					goto out;
+ 				inp += nelem;
+ 			}
+-			DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
+-			    nelements));
+ 			for (j = 0; j < nelements && i < sh.sh_properties;
+ 			    j++, i++)
+ 			{
+--- a/src/cdf.h
++++ b/src/cdf.h
+@@ -48,6 +48,7 @@
+ typedef int32_t cdf_secid_t;
+ 
+ #define CDF_LOOP_LIMIT					10000
++#define CDF_ELEMENT_LIMIT				100000
+ 
+ #define CDF_SECID_NULL					0
+ #define CDF_SECID_FREE					-1


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2020-06-24  9:27 Lars Wendler
  0 siblings, 0 replies; 16+ messages in thread
From: Lars Wendler @ 2020-06-24  9:27 UTC (permalink / raw
  To: gentoo-commits

commit:     0e7234f3304d3a7471390c4699892d49d41028e2
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 24 09:26:16 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jun 24 09:27:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e7234f3

sys-apps/file: Attempt to fix seccomp in portage's sandbox

Thanks-to: tka <tka <AT> kamph.org>
Bug: https://bugs.gentoo.org/728978
Package-Manager: Portage-2.3.102, Repoman-2.3.23
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/file/file-5.39-r1.ebuild                  | 140 +++++++++++++++++++++
 .../file/files/file-5.39-portage_sandbox.patch     |  28 +++++
 2 files changed, 168 insertions(+)

diff --git a/sys-apps/file/file-5.39-r1.ebuild b/sys-apps/file/file-5.39-r1.ebuild
new file mode 100644
index 00000000000..8333fd922e2
--- /dev/null
+++ b/sys-apps/file/file-5.39-r1.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6..9} )
+DISTUTILS_OPTIONAL=1
+
+inherit autotools distutils-r1 libtool toolchain-funcs multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/glensc/file.git"
+	inherit git-r3
+else
+	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="identify a file's format by scanning binary data for patterns"
+HOMEPAGE="https://www.darwinsys.com/file/"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="bzip2 lzma python seccomp static-libs zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
+	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	)
+	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}
+	python? ( !dev-python/python-magic )
+	seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-5.39-portage_sandbox.patch" #713710 #728978
+)
+
+src_prepare() {
+	default
+	eautoreconf
+	elibtoolize
+
+	# don't let python README kill main README #60043
+	mv python/README.md python/README.python.md || die
+	sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		--enable-fsect-man5
+		$(use_enable bzip2 bzlib)
+		$(use_enable lzma xzlib)
+		$(use_enable seccomp libseccomp)
+		$(use_enable static-libs static)
+		$(use_enable zlib)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+build_src_configure() {
+	local myeconfargs=(
+		--disable-shared
+		--disable-libseccomp
+		--disable-bzlib
+		--disable-xzlib
+		--disable-zlib
+	)
+	tc-env_build econf "${myeconfargs[@]}"
+}
+
+need_build_file() {
+	# when cross-compiling, we need to build up our own file
+	# because people often don't keep matching host/target
+	# file versions #362941
+	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
+}
+
+src_configure() {
+	local ECONF_SOURCE=${S}
+
+	if need_build_file; then
+		mkdir -p "${WORKDIR}"/build || die
+		cd "${WORKDIR}"/build || die
+		build_src_configure
+	fi
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi ; then
+		emake
+	else
+		cd src || die
+		emake magic.h #586444
+		emake libmagic.la
+	fi
+}
+
+src_compile() {
+	if need_build_file; then
+		emake -C "${WORKDIR}"/build/src magic.h #586444
+		emake -C "${WORKDIR}"/build/src file
+		local -x PATH="${WORKDIR}/build/src:${PATH}"
+	fi
+	multilib-minimal_src_compile
+
+	if use python ; then
+		cd python || die
+		distutils-r1_src_compile
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi ; then
+		default
+	else
+		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
+	fi
+}
+
+multilib_src_install_all() {
+	dodoc ChangeLog MAINT README
+
+	# Required for `file -C`
+	dodir /usr/share/misc/magic
+	insinto /usr/share/misc/magic
+	doins -r magic/Magdir/*
+
+	if use python ; then
+		cd python || die
+		distutils-r1_src_install
+	fi
+	find "${ED}" -type f -name "*.la" -delete || die
+}

diff --git a/sys-apps/file/files/file-5.39-portage_sandbox.patch b/sys-apps/file/files/file-5.39-portage_sandbox.patch
new file mode 100644
index 00000000000..ff2caed413f
--- /dev/null
+++ b/sys-apps/file/files/file-5.39-portage_sandbox.patch
@@ -0,0 +1,28 @@
+From 7e1d9d51329a0e0f3d9cd1dbc3f9509251950e81 Mon Sep 17 00:00:00 2001
+From: tka <tka@kamph.org>
+Date: Wed, 24 Jun 2020 11:18:45 +0200
+Subject: [PATCH] Allow getcwd for Gentoo's portage sandbox
+
+Gentoo-bug: https://bugs.gentoo.org/728978
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ src/seccomp.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index 68c56485..af55918e 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -227,6 +227,9 @@ enable_sandbox_full(void)
+ 	ALLOW_RULE(unlink);
+ 	ALLOW_RULE(write);
+ 
++	// needed by Gentoo's portage sandbox
++	ALLOW_RULE(getcwd);
++
+ 
+ #if 0
+ 	// needed by valgrind
+-- 
+2.27.0
+


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2020-09-07 16:56 Mike Gilbert
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Gilbert @ 2020-09-07 16:56 UTC (permalink / raw
  To: gentoo-commits

commit:     728f8c43b8b540f37871be3080ac63c05a9cf6a7
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Mon Sep  7 16:55:11 2020 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Mon Sep  7 16:55:11 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=728f8c43

sys-apps/file: backport a seccomp fix for musl

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

 sys-apps/file/file-5.39-r1.ebuild                  | 140 ---------------------
 .../{file-5.39-r2.ebuild => file-5.39-r3.ebuild}   |   5 +-
 sys-apps/file/file-5.39.ebuild                     | 140 ---------------------
 .../file/files/file-5.39-add-missing-termios.patch |  35 +++---
 ...ndbox.patch => file-5.39-portage-sandbox.patch} |  18 ++-
 sys-apps/file/files/file-5.39-seccomp-musl.patch   |  37 ++++++
 .../file/files/file-5.39-seccomp_sandbox.patch     |  13 --
 7 files changed, 67 insertions(+), 321 deletions(-)

diff --git a/sys-apps/file/file-5.39-r1.ebuild b/sys-apps/file/file-5.39-r1.ebuild
deleted file mode 100644
index 8333fd922e2..00000000000
--- a/sys-apps/file/file-5.39-r1.ebuild
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..9} )
-DISTUTILS_OPTIONAL=1
-
-inherit autotools distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit git-r3
-else
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-DESCRIPTION="identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="bzip2 lzma python seccomp static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}
-	python? ( !dev-python/python-magic )
-	seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-5.39-portage_sandbox.patch" #713710 #728978
-)
-
-src_prepare() {
-	default
-	eautoreconf
-	elibtoolize
-
-	# don't let python README kill main README #60043
-	mv python/README.md python/README.python.md || die
-	sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--enable-fsect-man5
-		$(use_enable bzip2 bzlib)
-		$(use_enable lzma xzlib)
-		$(use_enable seccomp libseccomp)
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-build_src_configure() {
-	local myeconfargs=(
-		--disable-shared
-		--disable-libseccomp
-		--disable-bzlib
-		--disable-xzlib
-		--disable-zlib
-	)
-	tc-env_build econf "${myeconfargs[@]}"
-}
-
-need_build_file() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions #362941
-	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
-}
-
-src_configure() {
-	local ECONF_SOURCE=${S}
-
-	if need_build_file; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		build_src_configure
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		cd src || die
-		emake magic.h #586444
-		emake libmagic.la
-	fi
-}
-
-src_compile() {
-	if need_build_file; then
-		emake -C "${WORKDIR}"/build/src magic.h #586444
-		emake -C "${WORKDIR}"/build/src file
-		local -x PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT README
-
-	# Required for `file -C`
-	dodir /usr/share/misc/magic
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-	find "${ED}" -type f -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/file-5.39-r2.ebuild b/sys-apps/file/file-5.39-r3.ebuild
similarity index 95%
rename from sys-apps/file/file-5.39-r2.ebuild
rename to sys-apps/file/file-5.39-r3.ebuild
index 645a8516962..c8425291ed7 100644
--- a/sys-apps/file/file-5.39-r2.ebuild
+++ b/sys-apps/file/file-5.39-r3.ebuild
@@ -37,8 +37,9 @@ RDEPEND="${DEPEND}
 	seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-5.39-portage_sandbox.patch" #713710 #728978
-	"${FILESDIR}/${P}-add-missing-termios.patch" #728416
+	"${FILESDIR}/file-5.39-add-missing-termios.patch" #728416
+	"${FILESDIR}/file-5.39-seccomp-musl.patch"
+	"${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
 )
 
 src_prepare() {

diff --git a/sys-apps/file/file-5.39.ebuild b/sys-apps/file/file-5.39.ebuild
deleted file mode 100644
index 98499a3c73d..00000000000
--- a/sys-apps/file/file-5.39.ebuild
+++ /dev/null
@@ -1,140 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{6..9} )
-DISTUTILS_OPTIONAL=1
-
-inherit autotools distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit git-r3
-else
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-DESCRIPTION="identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="bzip2 lzma python seccomp static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}
-	python? ( !dev-python/python-magic )
-	seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-5.39-seccomp_sandbox.patch" #713710
-)
-
-src_prepare() {
-	default
-	eautoreconf
-	elibtoolize
-
-	# don't let python README kill main README #60043
-	mv python/README.md python/README.python.md || die
-	sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--enable-fsect-man5
-		$(use_enable bzip2 bzlib)
-		$(use_enable lzma xzlib)
-		$(use_enable seccomp libseccomp)
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-build_src_configure() {
-	local myeconfargs=(
-		--disable-shared
-		--disable-libseccomp
-		--disable-bzlib
-		--disable-xzlib
-		--disable-zlib
-	)
-	tc-env_build econf "${myeconfargs[@]}"
-}
-
-need_build_file() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions #362941
-	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
-}
-
-src_configure() {
-	local ECONF_SOURCE=${S}
-
-	if need_build_file; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		build_src_configure
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		cd src || die
-		emake magic.h #586444
-		emake libmagic.la
-	fi
-}
-
-src_compile() {
-	if need_build_file; then
-		emake -C "${WORKDIR}"/build/src magic.h #586444
-		emake -C "${WORKDIR}"/build/src file
-		local -x PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT README
-
-	# Required for `file -C`
-	dodir /usr/share/misc/magic
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-	find "${ED}" -type f -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/files/file-5.39-add-missing-termios.patch b/sys-apps/file/files/file-5.39-add-missing-termios.patch
index e6cba0d4c28..0614f52dd27 100644
--- a/sys-apps/file/files/file-5.39-add-missing-termios.patch
+++ b/sys-apps/file/files/file-5.39-add-missing-termios.patch
@@ -1,27 +1,30 @@
-From 769e9868c17a471323b81b12cab851c9fd22baf4 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Mon, 15 Jun 2020 14:18:45 -0700
-Subject: [PATCH] add missing termios.h include
+From 471e2c6c61ecd30ba6e304ae0444d364cfd44254 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Thu, 18 Jun 2020 16:25:12 +0000
+Subject: [PATCH] PR/168: gyakovlev: Include <termios.h>
 
-on ppc, TCGETS relies on struct termios being complete, on other
-architectures it does not.
-so termios.h should be included before ioctl.h
 ---
- src/seccomp.c      |   1 +
- 1 file changed, 1 insertion(+)
+ src/seccomp.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/src/seccomp.c b/src/seccomp.c
-index e667adf..296f5b3 100644
+index e667adfe4..68c56485d 100644
 --- a/src/seccomp.c
 +++ b/src/seccomp.c
-@@ -33,6 +33,7 @@ FILE_RCSID("@(#)$File: seccomp.c,v 1.15 2020/05/30 23:56:26 christos Exp $")
+@@ -27,7 +27,7 @@
+ #include "file.h"
+ 
+ #ifndef	lint
+-FILE_RCSID("@(#)$File: seccomp.c,v 1.15 2020/05/30 23:56:26 christos Exp $")
++FILE_RCSID("@(#)$File: seccomp.c,v 1.16 2020/06/18 16:25:12 christos Exp $")
+ #endif	/* lint */
+ 
  #if HAVE_LIBSECCOMP
- #include <seccomp.h> /* libseccomp */
+@@ -35,6 +35,7 @@ FILE_RCSID("@(#)$File: seccomp.c,v 1.15 2020/05/30 23:56:26 christos Exp $")
  #include <sys/prctl.h> /* prctl */
-+#include <termios.h>
  #include <sys/ioctl.h>
  #include <sys/socket.h>
++#include <termios.h>
  #include <fcntl.h>
--- 
-2.27.0
-
+ #include <stdlib.h>
+ #include <errno.h>

diff --git a/sys-apps/file/files/file-5.39-portage_sandbox.patch b/sys-apps/file/files/file-5.39-portage-sandbox.patch
similarity index 51%
rename from sys-apps/file/files/file-5.39-portage_sandbox.patch
rename to sys-apps/file/files/file-5.39-portage-sandbox.patch
index ff2caed413f..3ea26641671 100644
--- a/sys-apps/file/files/file-5.39-portage_sandbox.patch
+++ b/sys-apps/file/files/file-5.39-portage-sandbox.patch
@@ -1,28 +1,26 @@
-From 7e1d9d51329a0e0f3d9cd1dbc3f9509251950e81 Mon Sep 17 00:00:00 2001
+From 81765a2d4fcce23f42495d5ec03bbfecb2a3c381 Mon Sep 17 00:00:00 2001
 From: tka <tka@kamph.org>
 Date: Wed, 24 Jun 2020 11:18:45 +0200
 Subject: [PATCH] Allow getcwd for Gentoo's portage sandbox
 
-Gentoo-bug: https://bugs.gentoo.org/728978
-Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+Bug: https://bugs.gentoo.org/728978
 ---
- src/seccomp.c | 3 +++
- 1 file changed, 3 insertions(+)
+ src/seccomp.c | 2 ++
+ 1 file changed, 2 insertions(+)
 
 diff --git a/src/seccomp.c b/src/seccomp.c
-index 68c56485..af55918e 100644
+index db9364ae..7f5d6f26 100644
 --- a/src/seccomp.c
 +++ b/src/seccomp.c
-@@ -227,6 +227,9 @@ enable_sandbox_full(void)
- 	ALLOW_RULE(unlink);
+@@ -229,6 +229,8 @@ enable_sandbox_full(void)
  	ALLOW_RULE(write);
+ 	ALLOW_RULE(writev);
  
 +	// needed by Gentoo's portage sandbox
 +	ALLOW_RULE(getcwd);
-+
  
  #if 0
  	// needed by valgrind
 -- 
-2.27.0
+2.28.0
 

diff --git a/sys-apps/file/files/file-5.39-seccomp-musl.patch b/sys-apps/file/files/file-5.39-seccomp-musl.patch
new file mode 100644
index 00000000000..72836de67e5
--- /dev/null
+++ b/sys-apps/file/files/file-5.39-seccomp-musl.patch
@@ -0,0 +1,37 @@
+From 93c91e2ba8042d499fee168e27cbd526438454c6 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Sat, 5 Sep 2020 17:20:32 +0000
+Subject: [PATCH] PR/194: puchuu: Handle muslc syscalls
+
+---
+ src/seccomp.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index 68c56485d..db9364ae4 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -27,7 +27,7 @@
+ #include "file.h"
+ 
+ #ifndef	lint
+-FILE_RCSID("@(#)$File: seccomp.c,v 1.16 2020/06/18 16:25:12 christos Exp $")
++FILE_RCSID("@(#)$File: seccomp.c,v 1.17 2020/09/05 17:20:32 christos Exp $")
+ #endif	/* lint */
+ 
+ #if HAVE_LIBSECCOMP
+@@ -220,12 +220,14 @@ enable_sandbox_full(void)
+ 	ALLOW_RULE(rt_sigreturn);
+ 	ALLOW_RULE(select);
+ 	ALLOW_RULE(stat);
++	ALLOW_RULE(statx);
+ 	ALLOW_RULE(stat64);
+ 	ALLOW_RULE(sysinfo);
+ 	ALLOW_RULE(umask);	// Used in file_pipe2file()
+ 	ALLOW_RULE(getpid);	// Used by glibc in file_pipe2file()
+ 	ALLOW_RULE(unlink);
+ 	ALLOW_RULE(write);
++	ALLOW_RULE(writev);
+ 
+ 
+ #if 0

diff --git a/sys-apps/file/files/file-5.39-seccomp_sandbox.patch b/sys-apps/file/files/file-5.39-seccomp_sandbox.patch
deleted file mode 100644
index da0a0ff1f28..00000000000
--- a/sys-apps/file/files/file-5.39-seccomp_sandbox.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Don't call file with seccomp in portage sandbox. This will fail:
-
-  make[2]: *** [Makefile:834: magic.mgc] Bad system call
-
---- file-5.39/magic/Makefile.am
-+++ file-5.39/magic/Makefile.am
-@@ -352,5 +352,5 @@
- 		exit 1; \
- 	    fi; \
- 	  fi)
--	$(FILE_COMPILE) -C -m magic
-+	$(FILE_COMPILE) -S -C -m magic
- 	@rm -fr magic


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2021-03-11 16:46 Sam James
  0 siblings, 0 replies; 16+ messages in thread
From: Sam James @ 2021-03-11 16:46 UTC (permalink / raw
  To: gentoo-commits

commit:     5b30e5f884f0602a68780d2c4d9c3ebe9e418a5c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 11 16:45:05 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 16:46:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b30e5f8

sys-apps/file: allow futex() syscall unconditionally

In some cases, the futex() syscall is emitted even
if lzma support is not compiled in. Allow it
unconditionally for now.

Bug: https://bugs.gentoo.org/771096
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/file/file-5.39-r4.ebuild                  | 147 +++++++++++++++++++++
 .../file/files/file-5.39-allow-futex-seccomp.patch |  18 +++
 2 files changed, 165 insertions(+)

diff --git a/sys-apps/file/file-5.39-r4.ebuild b/sys-apps/file/file-5.39-r4.ebuild
new file mode 100644
index 00000000000..70dea08b9d9
--- /dev/null
+++ b/sys-apps/file/file-5.39-r4.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+DISTUTILS_OPTIONAL=1
+
+inherit distutils-r1 libtool toolchain-funcs multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+	EGIT_REPO_URI="https://github.com/glensc/file.git"
+	inherit autotools git-r3
+else
+	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="identify a file's format by scanning binary data for patterns"
+HOMEPAGE="https://www.darwinsys.com/file/"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="bzip2 lzma python seccomp static-libs zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
+	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	)
+	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}
+	python? ( !dev-python/python-magic )
+	seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
+
+PATCHES=(
+	"${FILESDIR}/file-5.39-add-missing-termios.patch" #728416
+	"${FILESDIR}/file-5.39-seccomp-musl.patch"
+	"${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
+	"${FILESDIR}/file-5.39-allow-futex-seccomp.patch" #771096
+)
+
+src_prepare() {
+	default
+
+	if [[ ${PV} == 9999 ]]; then
+		eautoreconf
+	fi
+
+	elibtoolize
+
+	# don't let python README kill main README #60043
+	mv python/README.md python/README.python.md || die
+	sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		--enable-fsect-man5
+		$(use_enable bzip2 bzlib)
+		$(use_enable lzma xzlib)
+		$(use_enable seccomp libseccomp)
+		$(use_enable static-libs static)
+		$(use_enable zlib)
+	)
+	econf "${myeconfargs[@]}"
+}
+
+build_src_configure() {
+	local myeconfargs=(
+		--disable-shared
+		--disable-libseccomp
+		--disable-bzlib
+		--disable-xzlib
+		--disable-zlib
+	)
+	tc-env_build econf "${myeconfargs[@]}"
+}
+
+need_build_file() {
+	# when cross-compiling, we need to build up our own file
+	# because people often don't keep matching host/target
+	# file versions #362941
+	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
+}
+
+src_configure() {
+	local ECONF_SOURCE=${S}
+
+	if need_build_file; then
+		mkdir -p "${WORKDIR}"/build || die
+		cd "${WORKDIR}"/build || die
+		build_src_configure
+	fi
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi ; then
+		emake
+	else
+		cd src || die
+		emake magic.h #586444
+		emake libmagic.la
+	fi
+}
+
+src_compile() {
+	if need_build_file; then
+		emake -C "${WORKDIR}"/build/src magic.h #586444
+		emake -C "${WORKDIR}"/build/src file
+		local -x PATH="${WORKDIR}/build/src:${PATH}"
+	fi
+	multilib-minimal_src_compile
+
+	if use python ; then
+		cd python || die
+		distutils-r1_src_compile
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi ; then
+		default
+	else
+		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
+	fi
+}
+
+multilib_src_install_all() {
+	dodoc ChangeLog MAINT README
+
+	# Required for `file -C`
+	dodir /usr/share/misc/magic
+	insinto /usr/share/misc/magic
+	doins -r magic/Magdir/*
+
+	if use python ; then
+		cd python || die
+		distutils-r1_src_install
+	fi
+	find "${ED}" -type f -name "*.la" -delete || die
+}

diff --git a/sys-apps/file/files/file-5.39-allow-futex-seccomp.patch b/sys-apps/file/files/file-5.39-allow-futex-seccomp.patch
new file mode 100644
index 00000000000..8d9e3d1eb66
--- /dev/null
+++ b/sys-apps/file/files/file-5.39-allow-futex-seccomp.patch
@@ -0,0 +1,18 @@
+In some situations, futex() is called even when lzma
+support is not compiled in. Let's enable it unconditionally
+for now.
+
+https://bugs.gentoo.org/771096
+https://bugs.astron.com/view.php?id=241
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -175,9 +175,7 @@ enable_sandbox_full(void)
+  	ALLOW_RULE(fcntl64);
+ 	ALLOW_RULE(fstat);
+  	ALLOW_RULE(fstat64);
+-#ifdef XZLIBSUPPORT
+ 	ALLOW_RULE(futex);
+-#endif
+ 	ALLOW_RULE(getdents);
+ #ifdef __NR_getdents64
+ 	ALLOW_RULE(getdents64);


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2021-03-31  8:03 Lars Wendler
  0 siblings, 0 replies; 16+ messages in thread
From: Lars Wendler @ 2021-03-31  8:03 UTC (permalink / raw
  To: gentoo-commits

commit:     dee3f0719ff53493e78d1953108ba85b1897fcd4
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 31 08:02:52 2021 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Mar 31 08:03:10 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dee3f071

sys-apps/file: Removed old

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/file/Manifest                             |   2 -
 sys-apps/file/file-5.37-r1.ebuild                  | 128 ------------------
 sys-apps/file/file-5.38-r1.ebuild                  | 142 --------------------
 sys-apps/file/file-5.39-r3.ebuild                  | 146 ---------------------
 sys-apps/file/files/file-5.37-CVE-2019-18218.patch |  36 -----
 ...3-iaeiaeiaeiae-Do-as-the-comment-says-and.patch |  40 ------
 ...ble-bit-is-only-set-when-DF_1_PIE-bit-is-.patch |  29 ----
 ...le-5.38-td-is-for-ptrdiff_t-not-for-off_t.patch |  27 ----
 8 files changed, 550 deletions(-)

diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index ec875e6062a..128c4b0fb4f 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -1,4 +1,2 @@
-DIST file-5.37.tar.gz 887682 BLAKE2B c5635e5de879af31cbef1c988275ab8620133909d146769b27a2f8eefa90871fad5fa75e66b9e1d77a6261e5d6dec315fb5a8ad587d8c214eaa0bc2e5a929fe7 SHA512 bf153c15aebdd00329806231d20f295077b8b99efd0181d01279bcf3734a1718567df38cf75bc929eb8015ac98d29bb4bf1228d7ece8bfdfe14dd976391dd06d
-DIST file-5.38.tar.gz 932528 BLAKE2B 08d8d56e2e1b6a0c9fb0caed89ca6145bf683ecc52a639c036ded01b913e7eea75d9235851a2fbd410cbc9b929c26579b06fe1d54fb73817c951bef3544bc345 SHA512 9eeeba69cbc9f0c00a0bdf9eaf60c73a4a709e797068f109d85c1ef2a19c8b0e012ecd73714f03cbb1770dfa717e8a661ad746b644cc030cafbfb1f7aac35a40
 DIST file-5.39.tar.gz 954266 BLAKE2B 4d6d9a6317961e0a2aa391f502b0be8bbb40ede57c3470230d91aaf9ce5d35bcaceb32d551ca5a391fc8c40b64517fdb996833a8b1ca47ced7e92e9e545d2682 SHA512 9cf1a7b769c56eb6f5b25c66ce85fa1300128396e445b2e53dbbd8951e5da973a7a07c4ef9f7ebd1fe945d47bdaf2cd9ef09bd2be6c217a0bcb907d9449835e6
 DIST file-5.40.tar.gz 1004214 BLAKE2B 4e15a1ca62fe7c03c90b0e509dc899b87f4474f758ad3d08172b3d838dc3f7c2954ba1074eeeeb3da8c04b8df84eff2b8cdf3177da334a926914429df67f60bf SHA512 3b70df75fa4c9050d55b1ffdc28e5f3c8b8ef7d4efd1a06bf53f113b676d81114a85aae56e0897d32b53716662d64ad18ab251ca8c92c6405c69eb758bb99afb

diff --git a/sys-apps/file/file-5.37-r1.ebuild b/sys-apps/file/file-5.37-r1.ebuild
deleted file mode 100644
index 8daeba6eac1..00000000000
--- a/sys-apps/file/file-5.37-r1.ebuild
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7,8} )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-DESCRIPTION="identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="python static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}
-	python? ( !dev-python/python-magic )"
-
-PATCHES=( "${FILESDIR}"/${P}-CVE-2019-18218.patch )
-
-src_prepare() {
-	default
-
-	[[ ${PV} == "9999" ]] && eautoreconf
-	elibtoolize
-
-	# don't let python README kill main README #60043
-	mv python/README.md python/README.python.md || die
-	sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--disable-libseccomp
-		--enable-fsect-man5
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-	)
-	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
-}
-
-src_configure() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions #362941
-	if tc-is-cross-compiler && ! ROOT=/ has_version ~${CATEGORY}/${P} ; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		tc-export_build_env BUILD_C{C,XX}
-		ECONF_SOURCE="${S}" \
-		ac_cv_header_zlib_h=no \
-		ac_cv_lib_z_gzopen=no \
-		CHOST=${CBUILD} \
-		CFLAGS=${BUILD_CFLAGS} \
-		CXXFLAGS=${BUILD_CXXFLAGS} \
-		CPPFLAGS=${BUILD_CPPFLAGS} \
-		LDFLAGS="${BUILD_LDFLAGS} -static" \
-		CC=${BUILD_CC} \
-		CXX=${BUILD_CXX} \
-		econf --disable-shared --disable-libseccomp
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		cd src || die
-		emake magic.h #586444
-		emake libmagic.la
-	fi
-}
-
-src_compile() {
-	if tc-is-cross-compiler && ! ROOT=/ has_version "~${CATEGORY}/${P}" ; then
-		emake -C "${WORKDIR}"/build/src magic.h #586444
-		emake -C "${WORKDIR}"/build/src file
-		PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT README
-
-	# Required for `file -C`
-	dodir /usr/share/misc/magic
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-	find "${ED}" -type f -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/file-5.38-r1.ebuild b/sys-apps/file/file-5.38-r1.ebuild
deleted file mode 100644
index d318c4e309e..00000000000
--- a/sys-apps/file/file-5.38-r1.ebuild
+++ /dev/null
@@ -1,142 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-DESCRIPTION="identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="bzip2 lzma python static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}
-	python? ( !dev-python/python-magic )"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch
-	"${FILESDIR}"/${P}-td-is-for-ptrdiff_t-not-for-off_t.patch
-	"${FILESDIR}"/${P}-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch
-)
-
-src_prepare() {
-	default
-
-	[[ ${PV} == "9999" ]] && eautoreconf
-	elibtoolize
-
-	# don't let python README kill main README #60043
-	mv python/README.md python/README.python.md || die
-	sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--disable-libseccomp
-		--enable-fsect-man5
-		$(use_enable bzip2 bzlib)
-		$(use_enable lzma xzlib)
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-build_src_configure() {
-	local myeconfargs=(
-		--disable-shared
-		--disable-libseccomp
-		--disable-bzlib
-		--disable-xzlib
-		--disable-zlib
-	)
-	tc-env_build econf "${myeconfargs[@]}"
-}
-
-need_build_file() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions #362941
-	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
-}
-
-src_configure() {
-	local ECONF_SOURCE=${S}
-
-	if need_build_file; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		build_src_configure
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		cd src || die
-		emake magic.h #586444
-		emake libmagic.la
-	fi
-}
-
-src_compile() {
-	if need_build_file; then
-		emake -C "${WORKDIR}"/build/src magic.h #586444
-		emake -C "${WORKDIR}"/build/src file
-		local -x PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT README
-
-	# Required for `file -C`
-	dodir /usr/share/misc/magic
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-	find "${ED}" -type f -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/file-5.39-r3.ebuild b/sys-apps/file/file-5.39-r3.ebuild
deleted file mode 100644
index b64fe567d8e..00000000000
--- a/sys-apps/file/file-5.39-r3.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{7..9} )
-DISTUTILS_OPTIONAL=1
-
-inherit distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == "9999" ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-fi
-
-DESCRIPTION="identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="bzip2 lzma python seccomp static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
-RDEPEND="${DEPEND}
-	python? ( !dev-python/python-magic )
-	seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
-
-PATCHES=(
-	"${FILESDIR}/file-5.39-add-missing-termios.patch" #728416
-	"${FILESDIR}/file-5.39-seccomp-musl.patch"
-	"${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
-)
-
-src_prepare() {
-	default
-
-	if [[ ${PV} == 9999 ]]; then
-		eautoreconf
-	fi
-
-	elibtoolize
-
-	# don't let python README kill main README #60043
-	mv python/README.md python/README.python.md || die
-	sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--enable-fsect-man5
-		$(use_enable bzip2 bzlib)
-		$(use_enable lzma xzlib)
-		$(use_enable seccomp libseccomp)
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-build_src_configure() {
-	local myeconfargs=(
-		--disable-shared
-		--disable-libseccomp
-		--disable-bzlib
-		--disable-xzlib
-		--disable-zlib
-	)
-	tc-env_build econf "${myeconfargs[@]}"
-}
-
-need_build_file() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions #362941
-	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
-}
-
-src_configure() {
-	local ECONF_SOURCE=${S}
-
-	if need_build_file; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		build_src_configure
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		cd src || die
-		emake magic.h #586444
-		emake libmagic.la
-	fi
-}
-
-src_compile() {
-	if need_build_file; then
-		emake -C "${WORKDIR}"/build/src magic.h #586444
-		emake -C "${WORKDIR}"/build/src file
-		local -x PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT README
-
-	# Required for `file -C`
-	dodir /usr/share/misc/magic
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-	find "${ED}" -type f -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/files/file-5.37-CVE-2019-18218.patch b/sys-apps/file/files/file-5.37-CVE-2019-18218.patch
deleted file mode 100644
index 1cd02b778ab..00000000000
--- a/sys-apps/file/files/file-5.37-CVE-2019-18218.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-CVE-2019-18218
-https://github.com/file/file/commit/46a8443f76cec4b41ec736eca396984c74664f84
-
---- a/src/cdf.c
-+++ b/src/cdf.c
-@@ -1027,8 +1027,9 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
- 				goto out;
- 			}
- 			nelements = CDF_GETUINT32(q, 1);
--			if (nelements == 0) {
--				DPRINTF(("CDF_VECTOR with nelements == 0\n"));
-+			if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) {
-+				DPRINTF(("CDF_VECTOR with nelements == %"
-+				    SIZE_T_FORMAT "u\n", nelements));
- 				goto out;
- 			}
- 			slen = 2;
-@@ -1070,8 +1071,6 @@ cdf_read_property_info(const cdf_stream_t *sst, const cdf_header_t *h,
- 					goto out;
- 				inp += nelem;
- 			}
--			DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n",
--			    nelements));
- 			for (j = 0; j < nelements && i < sh.sh_properties;
- 			    j++, i++)
- 			{
---- a/src/cdf.h
-+++ b/src/cdf.h
-@@ -48,6 +48,7 @@
- typedef int32_t cdf_secid_t;
- 
- #define CDF_LOOP_LIMIT					10000
-+#define CDF_ELEMENT_LIMIT				100000
- 
- #define CDF_SECID_NULL					0
- #define CDF_SECID_FREE					-1

diff --git a/sys-apps/file/files/file-5.38-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch b/sys-apps/file/files/file-5.38-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch
deleted file mode 100644
index 240edc11f68..00000000000
--- a/sys-apps/file/files/file-5.38-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c9d21a58bea2ecb2dc8876e09e471094d54a25e4 Mon Sep 17 00:00:00 2001
-From: Thomas Deutschmann <whissi@gentoo.org>
-Date: Mon, 13 Apr 2020 01:08:12 +0200
-Subject: [PATCH 1/3] Revert "PR/93: iaeiaeiaeiae: Do as the comment says, and
- count as dynamically linked"
-
-This reverts commit 24c9c086cd7c55b7b0a003a145b32466468e2608.
-
-Fixes misdetection of shared libraries as statically linked as
-reported in bug 717264.
-
-Bug: https://bugs.gentoo.org/717264
-Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
----
- src/readelf.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/readelf.c b/src/readelf.c
-index 40bcfab1..afec31d1 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -1638,6 +1638,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- 		/* Things we can determine before we seek */
- 		switch (xph_type) {
- 		case PT_DYNAMIC:
-+			linking_style = "dynamically";
- 			doread = 1;
- 			break;
- 		case PT_NOTE:
-@@ -1653,7 +1654,6 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off,
- 			}
- 			/*FALLTHROUGH*/
- 		case PT_INTERP:
--			linking_style = "dynamically";
- 			doread = 1;
- 			break;
- 		default:
--- 
-2.26.0
-

diff --git a/sys-apps/file/files/file-5.38-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch b/sys-apps/file/files/file-5.38-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch
deleted file mode 100644
index bb211f355f7..00000000000
--- a/sys-apps/file/files/file-5.38-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ed971e5e3ae79bd28697d16c8b78b693052484e4 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Wed, 12 Feb 2020 22:17:33 +0000
-Subject: [PATCH 3/3] The executable bit is only set when DF_1_PIE bit is set
- so it is fine.
-
----
- magic/Magdir/elf | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/magic/Magdir/elf b/magic/Magdir/elf
-index b5a2e00b..f5e1af9a 100644
---- a/magic/Magdir/elf
-+++ b/magic/Magdir/elf
-@@ -50,8 +50,9 @@
- !:mime	application/x-object
- >16	leshort		2		executable,
- !:mime	application/x-executable
-->16	leshort		3		shared object,
--!:mime	application/x-sharedlib
-+>16	leshort		3		${x?pie executable:shared object},
-+
-+!:mime	application/x-${x?pie-executable:sharedlib}
- >16	leshort		4		core file,
- !:mime	application/x-coredump
- # OS-specific
--- 
-2.26.0
-

diff --git a/sys-apps/file/files/file-5.38-td-is-for-ptrdiff_t-not-for-off_t.patch b/sys-apps/file/files/file-5.38-td-is-for-ptrdiff_t-not-for-off_t.patch
deleted file mode 100644
index 09fcaef151e..00000000000
--- a/sys-apps/file/files/file-5.38-td-is-for-ptrdiff_t-not-for-off_t.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From c49dc91df427f89ebcf9cdec556b8fc88cdfc3c1 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Tue, 17 Dec 2019 15:27:27 +0000
-Subject: [PATCH 2/3] %td is for ptrdiff_t not for off_t.
-
----
- src/readelf.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/readelf.c b/src/readelf.c
-index afec31d1..8ac3b7d6 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -1349,8 +1349,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
- 	name_off = xsh_offset;
- 
- 	if (fsize != SIZE_UNKNOWN && fsize < name_off) {
--		if (file_printf(ms, ", too large section header offset %td",
--		    name_off) == -1)
-+		if (file_printf(ms, ", too large section header offset %jd",
-+		    (intmax_t)name_off) == -1)
- 			return -1;
- 		return 0;
- 	}
--- 
-2.26.0
-


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2021-04-23 19:11 Mike Gilbert
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Gilbert @ 2021-04-23 19:11 UTC (permalink / raw
  To: gentoo-commits

commit:     0813d843cb2a43c748fdf6c9d5ac6dc882104dcf
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 23 19:10:09 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr 23 19:10:09 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0813d843

sys-apps/file: allow faccessat and fstatat64 syscalls

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

 .../{file-5.40-r1.ebuild => file-5.40-r2.ebuild}   |  2 ++
 .../file/files/file-5.40-seccomp-faccessat.patch   | 34 ++++++++++++++++++++++
 .../file/files/file-5.40-seccomp-fstatat64.patch   | 29 ++++++++++++++++++
 3 files changed, 65 insertions(+)

diff --git a/sys-apps/file/file-5.40-r1.ebuild b/sys-apps/file/file-5.40-r2.ebuild
similarity index 96%
rename from sys-apps/file/file-5.40-r1.ebuild
rename to sys-apps/file/file-5.40-r2.ebuild
index a901c2a4003..f46a59bccfa 100644
--- a/sys-apps/file/file-5.40-r1.ebuild
+++ b/sys-apps/file/file-5.40-r2.ebuild
@@ -39,6 +39,8 @@ RDEPEND="${DEPEND}
 PATCHES=(
 	"${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
 	"${FILESDIR}/file-5.40-xz_magic.patch" #784773
+	"${FILESDIR}/file-5.40-seccomp-faccessat.patch"
+	"${FILESDIR}/file-5.40-seccomp-fstatat64.patch" #784857
 )
 
 src_prepare() {

diff --git a/sys-apps/file/files/file-5.40-seccomp-faccessat.patch b/sys-apps/file/files/file-5.40-seccomp-faccessat.patch
new file mode 100644
index 00000000000..4aeb88cfe87
--- /dev/null
+++ b/sys-apps/file/files/file-5.40-seccomp-faccessat.patch
@@ -0,0 +1,34 @@
+From abcd583135bb0762e6bfd0f2e06c50bea1fb3cd0 Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Tue, 6 Apr 2021 22:02:17 +0000
+Subject: [PATCH] On ARM64 Linux access() syscall is no longer a real syscall
+ to the kernel. Instead it's emulated by glibc with a new faccessat() syscall.
+ (Icenowy Zheng)
+
+---
+ src/seccomp.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index 0da907ff7..81842cf5c 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -27,7 +27,7 @@
+ #include "file.h"
+ 
+ #ifndef	lint
+-FILE_RCSID("@(#)$File: seccomp.c,v 1.18 2021/03/14 17:01:58 christos Exp $")
++FILE_RCSID("@(#)$File: seccomp.c,v 1.19 2021/04/06 22:02:17 christos Exp $")
+ #endif	/* lint */
+ 
+ #if HAVE_LIBSECCOMP
+@@ -171,6 +171,9 @@ enable_sandbox_full(void)
+ 	ALLOW_RULE(dup2);
+ 	ALLOW_RULE(exit);
+ 	ALLOW_RULE(exit_group);
++#ifdef __NR_faccessat
++	ALLOW_RULE(faccessat);
++#endif
+ 	ALLOW_RULE(fcntl);
+  	ALLOW_RULE(fcntl64);
+ 	ALLOW_RULE(fstat);

diff --git a/sys-apps/file/files/file-5.40-seccomp-fstatat64.patch b/sys-apps/file/files/file-5.40-seccomp-fstatat64.patch
new file mode 100644
index 00000000000..57d04e5f40c
--- /dev/null
+++ b/sys-apps/file/files/file-5.40-seccomp-fstatat64.patch
@@ -0,0 +1,29 @@
+From e3d0265a147878b6c2903bcc83b9842dff68ceb4 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Fri, 23 Apr 2021 15:00:42 -0400
+Subject: [PATCH] seccomp: allow fstatat64
+
+This is needed for the libsandbox LD_PRELOAD wrapper on Gentoo Linux.
+
+Bug: https://bugs.gentoo.org/784857
+---
+ src/seccomp.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index 81842cf5..43abc684 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -178,6 +178,9 @@ enable_sandbox_full(void)
+  	ALLOW_RULE(fcntl64);
+ 	ALLOW_RULE(fstat);
+  	ALLOW_RULE(fstat64);
++#ifdef __NR_fstatat64
++	ALLOW_RULE(fstatat64);
++#endif
+ 	ALLOW_RULE(futex);
+ 	ALLOW_RULE(getdents);
+ #ifdef __NR_getdents64
+-- 
+2.31.1
+


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2021-07-18 17:46 Mike Gilbert
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Gilbert @ 2021-07-18 17:46 UTC (permalink / raw
  To: gentoo-commits

commit:     2e20ec0fa649b0720f862615c6099b947848fd3c
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 18 17:46:26 2021 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Jul 18 17:46:26 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e20ec0f

sys-apps/file: fix seccomp build failure with musl

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

 sys-apps/file/file-5.40-r3.ebuild                  |  1 +
 .../files/file-5.40-seccomp-fstatat64-musl.patch   | 31 ++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/sys-apps/file/file-5.40-r3.ebuild b/sys-apps/file/file-5.40-r3.ebuild
index 90b41899e80..7cb5ba7a5cd 100644
--- a/sys-apps/file/file-5.40-r3.ebuild
+++ b/sys-apps/file/file-5.40-r3.ebuild
@@ -42,6 +42,7 @@ PATCHES=(
 	"${FILESDIR}/file-5.40-seccomp-faccessat.patch"
 	"${FILESDIR}/file-5.40-seccomp-fstatat64.patch" #784857
 	"${FILESDIR}/file-5.40-revert-char-count.patch" #799188
+	"${FILESDIR}/file-5.40-seccomp-fstatat64-musl.patch" #789336, not upstream yet
 )
 
 src_prepare() {

diff --git a/sys-apps/file/files/file-5.40-seccomp-fstatat64-musl.patch b/sys-apps/file/files/file-5.40-seccomp-fstatat64-musl.patch
new file mode 100644
index 00000000000..4cc64801786
--- /dev/null
+++ b/sys-apps/file/files/file-5.40-seccomp-fstatat64-musl.patch
@@ -0,0 +1,31 @@
+From 8c13923a8e17a02be0989649b2edc20124816729 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Tue, 15 Jun 2021 16:08:22 -0400
+Subject: [PATCH] seccomp: undef fstatat64 to avoid build failure on musl
+
+sys/stat.h in musl does this:
+
+  #define fstatat64 fstatat
+
+Counteract this with an #undef.
+
+Bug: https://bugs.gentoo.org/789336
+---
+ src/seccomp.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index 3318367c..eb8b1e57 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -179,6 +179,7 @@ enable_sandbox_full(void)
+ 	ALLOW_RULE(fstat);
+  	ALLOW_RULE(fstat64);
+ #ifdef __NR_fstatat64
++#undef fstatat64
+ 	ALLOW_RULE(fstatat64);
+ #endif
+ 	ALLOW_RULE(futex);
+-- 
+2.32.0
+


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2022-11-19 23:37 Sam James
  0 siblings, 0 replies; 16+ messages in thread
From: Sam James @ 2022-11-19 23:37 UTC (permalink / raw
  To: gentoo-commits

commit:     faa75d431684f8efcebf1116128ae3e528d0889a
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 19 23:36:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 19 23:37:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faa75d43

sys-apps/file: fix configure w/ clang 16

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

 .../file/{file-5.43.ebuild => file-5.43-r1.ebuild}   |  1 +
 .../file/files/file-5.43-configure-clang16.patch     | 20 ++++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/sys-apps/file/file-5.43.ebuild b/sys-apps/file/file-5.43-r1.ebuild
similarity index 98%
rename from sys-apps/file/file-5.43.ebuild
rename to sys-apps/file/file-5.43-r1.ebuild
index 7a43ed771918..10bf50a18e4f 100644
--- a/sys-apps/file/file-5.43.ebuild
+++ b/sys-apps/file/file-5.43-r1.ebuild
@@ -51,6 +51,7 @@ BDEPEND+="
 PATCHES=(
 	"${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
 	"${FILESDIR}/file-5.40-seccomp-fstatat64-musl.patch" #789336, not upstream yet
+	"${FILESDIR}/${P}-configure-clang16.patch"
 )
 
 src_prepare() {

diff --git a/sys-apps/file/files/file-5.43-configure-clang16.patch b/sys-apps/file/files/file-5.43-configure-clang16.patch
new file mode 100644
index 000000000000..15fd5b1c4a05
--- /dev/null
+++ b/sys-apps/file/files/file-5.43-configure-clang16.patch
@@ -0,0 +1,20 @@
+https://github.com/file/file/commit/4502517cc7316569d5902ab65c97b3b8e46f8a25
+https://github.com/file/file/commit/8c845b7bbad085678695d3e70467b8eec3dfa7af
+--- a/configure
++++ b/configure
+@@ -14037,13 +14037,14 @@ else $as_nop
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #include <time.h>
++#include <stdlib.h>
+ int
+ main (void)
+ {
+ #if !HAVE_DECL_DAYLIGHT
+ extern int daylight;
+ #endif
+-atoi(daylight);
++daylight = atoi("1");
+   ;
+   return 0;
+ }


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2022-12-27 19:30 Fabian Groffen
  0 siblings, 0 replies; 16+ messages in thread
From: Fabian Groffen @ 2022-12-27 19:30 UTC (permalink / raw
  To: gentoo-commits

commit:     eedc8deda6d12b9e02f97c44dc16e95680e14c3e
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 19:30:13 2022 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 19:30:52 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eedc8ded

sys-apps/file-5.44: add build patch for Solaris

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-apps/file/file-5.44.ebuild                     |  1 +
 sys-apps/file/files/file-5.44-limits-solaris.patch | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/sys-apps/file/file-5.44.ebuild b/sys-apps/file/file-5.44.ebuild
index 41f62b904bd3..e300174f860d 100644
--- a/sys-apps/file/file-5.44.ebuild
+++ b/sys-apps/file/file-5.44.ebuild
@@ -54,6 +54,7 @@ BDEPEND+="
 PATCHES=(
 	"${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
 	"${FILESDIR}/file-5.40-seccomp-fstatat64-musl.patch" #789336, not upstream yet
+	"${FILESDIR}/file-5.44-limits-solaris.patch" # not upstream yet
 )
 
 src_prepare() {

diff --git a/sys-apps/file/files/file-5.44-limits-solaris.patch b/sys-apps/file/files/file-5.44-limits-solaris.patch
new file mode 100644
index 000000000000..7a04535577b4
--- /dev/null
+++ b/sys-apps/file/files/file-5.44-limits-solaris.patch
@@ -0,0 +1,19 @@
+softmagic: include limits.h for UINT_MAX usage
+
+Platforms like Solaris need this to compile.
+
+Bug: https://bugs.astron.com/view.php?id=413
+Signed-off-by: Fabian Groffen <grobian@gentoo.org>
+
+--- a/src/softmagic.c
++++ b/src/softmagic.c
+@@ -42,6 +42,7 @@
+ #include <ctype.h>
+ #include <stdlib.h>
+ #include <time.h>
++#include <limits.h>
+ #include "der.h"
+
+ file_private int match(struct magic_set *, struct magic *, file_regex_t **,    size_t,
+
+


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2023-01-11 21:40 Sam James
  0 siblings, 0 replies; 16+ messages in thread
From: Sam James @ 2023-01-11 21:40 UTC (permalink / raw
  To: gentoo-commits

commit:     5e07fccffc54abe0e18cf91fd5b430625da28561
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 11 21:38:49 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 11 21:39:40 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e07fccf

sys-apps/file: backport decompression fix

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

 sys-apps/file/file-5.44-r2.ebuild                  | 171 +++++++++++++++++++++
 .../file/files/file-5.44-decompress-empty.patch    | 126 +++++++++++++++
 2 files changed, 297 insertions(+)

diff --git a/sys-apps/file/file-5.44-r2.ebuild b/sys-apps/file/file-5.44-r2.ebuild
new file mode 100644
index 000000000000..fd89f18309c4
--- /dev/null
+++ b/sys-apps/file/file-5.44-r2.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_OPTIONAL=1
+PYTHON_COMPAT=( python3_{8..11} )
+
+inherit distutils-r1 libtool toolchain-funcs multilib-minimal
+
+if [[ ${PV} == 9999 ]] ; then
+	EGIT_REPO_URI="https://github.com/glensc/file.git"
+	inherit autotools git-r3
+else
+	VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/file.asc
+	inherit verify-sig
+	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
+	SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )"
+
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+
+	BDEPEND="verify-sig? ( sec-keys/openpgp-keys-file )"
+fi
+
+DESCRIPTION="Identify a file's format by scanning binary data for patterns"
+HOMEPAGE="https://www.darwinsys.com/file/"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="bzip2 lzip lzma python seccomp static-libs zlib zstd"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
+	lzip? ( app-arch/lzlib )
+	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
+	python? (
+		${PYTHON_DEPS}
+		dev-python/setuptools[${PYTHON_USEDEP}]
+	)
+	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}
+	python? ( !dev-python/python-magic )
+	seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
+BDEPEND+="
+	python? (
+		${PYTHON_DEPS}
+		${DISTUTILS_DEPS}
+	)"
+
+PATCHES=(
+	"${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet
+	"${FILESDIR}/file-5.43-portage-sandbox.patch" #889046
+	"${FILESDIR}/file-5.44-limits-solaris.patch" # applied upstream
+	"${FILESDIR}/file-5.44-seccomp-utimes.patch" # upstream
+	"${FILESDIR}/file-5.44-decompress-empty.patch" # upstream
+)
+
+src_prepare() {
+	default
+
+	if [[ ${PV} == 9999 ]] ; then
+		eautoreconf
+	else
+		elibtoolize
+	fi
+
+	# Don't let python README kill main README, bug ##60043
+	mv python/README.md python/README.python.md || die
+
+	# bug #662090
+	sed 's@README.md@README.python.md@' -i python/setup.py || die
+}
+
+multilib_src_configure() {
+	local myeconfargs=(
+		--enable-fsect-man5
+		$(use_enable bzip2 bzlib)
+		$(multilib_native_use_enable lzip lzlib)
+		$(use_enable lzma xzlib)
+		$(use_enable seccomp libseccomp)
+		$(use_enable static-libs static)
+		$(use_enable zlib)
+		$(use_enable zstd zstdlib)
+	)
+
+	econf "${myeconfargs[@]}"
+}
+
+build_src_configure() {
+	local myeconfargs=(
+		--disable-shared
+		--disable-libseccomp
+		--disable-bzlib
+		--disable-xzlib
+		--disable-zlib
+	)
+
+	econf_build "${myeconfargs[@]}"
+}
+
+need_build_file() {
+	# When cross-compiling, we need to build up our own file
+	# because people often don't keep matching host/target
+	# file versions, bug #362941
+	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
+}
+
+src_configure() {
+	local ECONF_SOURCE="${S}"
+
+	if need_build_file ; then
+		mkdir -p "${WORKDIR}"/build || die
+		cd "${WORKDIR}"/build || die
+		build_src_configure
+	fi
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi ; then
+		emake
+	else
+		# bug #586444
+		emake -C src magic.h
+		emake -C src libmagic.la
+	fi
+}
+
+src_compile() {
+	if need_build_file ; then
+		# bug #586444
+		emake -C "${WORKDIR}"/build/src magic.h
+		emake -C "${WORKDIR}"/build/src file
+		local -x PATH="${WORKDIR}/build/src:${PATH}"
+	fi
+
+	multilib-minimal_src_compile
+
+	if use python ; then
+		cd python || die
+		distutils-r1_src_compile
+	fi
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi ; then
+		default
+	else
+		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
+	fi
+}
+
+multilib_src_install_all() {
+	dodoc ChangeLog MAINT # README
+
+	# Required for `file -C`
+	insinto /usr/share/misc/magic
+	doins -r magic/Magdir/*
+
+	if use python ; then
+		cd python || die
+		distutils-r1_src_install
+	fi
+
+	find "${ED}" -type f -name "*.la" -delete || die
+}

diff --git a/sys-apps/file/files/file-5.44-decompress-empty.patch b/sys-apps/file/files/file-5.44-decompress-empty.patch
new file mode 100644
index 000000000000..21dcfa4c94c5
--- /dev/null
+++ b/sys-apps/file/files/file-5.44-decompress-empty.patch
@@ -0,0 +1,126 @@
+https://bugs.astron.com/view.php?id=415
+https://github.com/file/file/commit/1dd21dd360472d7b830825df8e40a06cdc1cbbcf
+
+From 1dd21dd360472d7b830825df8e40a06cdc1cbbcf Mon Sep 17 00:00:00 2001
+From: Christos Zoulas <christos@zoulas.com>
+Date: Sun, 8 Jan 2023 18:09:16 +0000
+Subject: [PATCH] fix decompression always returning empty.
+
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -609,6 +609,7 @@ uncompresszlib(const unsigned char *old, unsigned char **newch,
+ 	int rc;
+ 	z_stream z;
+ 
++	DPRINTF("builtin zlib decompression\n");
+ 	z.next_in = CCAST(Bytef *, old);
+ 	z.avail_in = CAST(uint32_t, *n);
+ 	z.next_out = *newch;
+@@ -650,6 +651,7 @@ uncompressbzlib(const unsigned char *old, unsigned char **newch,
+ 	int rc;
+ 	bz_stream bz;
+ 
++	DPRINTF("builtin bzlib decompression\n");
+ 	memset(&bz, 0, sizeof(bz));
+ 	rc = BZ2_bzDecompressInit(&bz, 0, 0);
+ 	if (rc != BZ_OK)
+@@ -690,6 +692,7 @@ uncompressxzlib(const unsigned char *old, unsigned char **newch,
+ 	int rc;
+ 	lzma_stream xz;
+ 
++	DPRINTF("builtin xzlib decompression\n");
+ 	memset(&xz, 0, sizeof(xz));
+ 	rc = lzma_auto_decoder(&xz, UINT64_MAX, 0);
+ 	if (rc != LZMA_OK)
+@@ -729,6 +732,7 @@ uncompresszstd(const unsigned char *old, unsigned char **newch,
+ 	ZSTD_inBuffer in;
+ 	ZSTD_outBuffer out;
+ 
++	DPRINTF("builtin zstd decompression\n");
+ 	if ((zstd = ZSTD_createDStream()) == NULL) {
+ 		return makeerror(newch, n, "No ZSTD decompression stream, %s",
+ 		    strerror(errno));
+@@ -777,6 +781,7 @@ uncompresslzlib(const unsigned char *old, unsigned char **newch,
+ 
+ 	bufp = *newch;
+ 
++	DPRINTF("builtin lzlib decompression\n");
+ 	dec = LZ_decompress_open();
+ 	if (!dec) {
+ 		return makeerror(newch, n, "unable to allocate LZ_Decoder");
+@@ -833,11 +838,13 @@ makeerror(unsigned char **buf, size_t *len, const char *fmt, ...)
+ 	va_list ap;
+ 	int rv;
+ 
++	DPRINTF("Makeerror %s\n", fmt);
+ 	free(*buf);
+ 	va_start(ap, fmt);
+ 	rv = vasprintf(&msg, fmt, ap);
+ 	va_end(ap);
+ 	if (rv < 0) {
++		DPRINTF("Makeerror failed");
+ 		*buf = NULL;
+ 		*len = 0;
+ 		return NODATA;
+@@ -1048,7 +1055,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
+ 	pid_t pid;
+ 	pid_t writepid = -1;
+ 	size_t i;
+-	ssize_t r;
++	ssize_t r, re;
+ 	char *const *args;
+ #ifdef HAVE_POSIX_SPAWNP
+ 	posix_spawn_file_actions_t fa;
+@@ -1103,6 +1110,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
+ 
+ 	handledesc(&fa, fd, fdp);
+ 
++	DPRINTF("Executing %s\n", compr[method].argv[0]);
+ 	status = posix_spawnp(&pid, compr[method].argv[0], &fa, NULL,
+ 	    args, NULL);
+ 
+@@ -1128,6 +1136,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
+ 		 * do not modify fdp[i][j].
+ 		 */
+ 		handledesc(NULL, fd, fdp);
++		DPRINTF("Executing %s\n", compr[method].argv[0]);
+ 
+ 		(void)execvp(compr[method].argv[0], args);
+ 		dprintf(STDERR_FILENO, "exec `%s' failed, %s",
+@@ -1146,6 +1155,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
+ 		if (writepid == (pid_t)-1) {
+ 			rv = makeerror(newch, n, "Write to child failed, %s",
+ 			    strerror(errno));
++			DPRINTF("Write to child failed\n");
+ 			goto err;
+ 		}
+ 		closefd(fdp[STDIN_FILENO], 1);
+@@ -1153,6 +1163,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
+ 
+ 	rv = OKDATA;
+ 	r = sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0);
++	DPRINTF("read got %zd\n", r);
+ 	if (r < 0) {
+ 		rv = ERRDATA;
+ 		DPRINTF("Read stdout failed %d (%s)\n", fdp[STDOUT_FILENO][0],
+@@ -1165,15 +1176,17 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
+ 		 * errors, otherwise we risk the child blocking and never
+ 		 * exiting.
+ 		 */
++		DPRINTF("Closing stdout for bytes_max\n");
+ 		closefd(fdp[STDOUT_FILENO], 0);
+ 		goto ok;
+ 	}
+-	if ((r = sread(fdp[STDERR_FILENO][0], *newch, bytes_max, 0)) > 0) {
++	if ((re = sread(fdp[STDERR_FILENO][0], *newch, bytes_max, 0)) > 0) {
++		DPRINTF("Got stuff from stderr %s\n", *newch);
+ 		rv = ERRDATA;
+ 		r = filter_error(*newch, r);
+ 		goto ok;
+ 	}
+-	if  (r == 0)
++	if  (re == 0)
+ 		goto ok;
+ 	rv = makeerror(newch, n, "Read stderr failed, %s",
+ 	    strerror(errno));
+


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2023-01-13 16:47 Sam James
  0 siblings, 0 replies; 16+ messages in thread
From: Sam James @ 2023-01-13 16:47 UTC (permalink / raw
  To: gentoo-commits

commit:     60f7d9b860472c9074d0df011641fdb555437cdf
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 16:35:33 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 16:46:36 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60f7d9b8

sys-apps/file: drop 5.43-r3

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

 sys-apps/file/Manifest                             |   2 -
 sys-apps/file/file-5.43-r3.ebuild                  | 166 ---------------------
 .../file/files/file-5.43-configure-clang16.patch   |  20 ---
 3 files changed, 188 deletions(-)

diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index 86eb997f0bb1..4ecddd747bee 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -1,4 +1,2 @@
-DIST file-5.43.tar.gz 1162786 BLAKE2B aaaf32c5054fb83e912af6656e5e67947f45576ec3711c7cba5531ed780e142a448580e0db41a828c8a3c5d2f1bf0c8ed49bc9688499caaae4a08baa16b3610c SHA512 9d02f4e7a69d90468d6bd35df5ec240ddee8c2408b7df3e73427d7f18736baf77db0638a1fe8283f4e6abd1d5ad653890ed3a5a0d48bb52d4023ca4070ecdf06
-DIST file-5.43.tar.gz.asc 195 BLAKE2B d7f83b3e21d1390467989f8870e36daa48ebb8c5ac7ab8dc6d667a65d10561126d32cfc5ef3d81a130990b3e46bcba9b5e03f0a7dd169782351b02cebec2471f SHA512 c565958840f2f5c62821cd08d4149ec97c574232913ec00400473364e160250cfaced8c715e109c4c617359e33d2470f7ca6af1891cbdf994329e890f90c8be3
 DIST file-5.44.tar.gz 1186437 BLAKE2B a90ccae738a95315d75a0aaee7bbff3624425cc9267daf18ba9147b7c9b9ebfb31288b54c63a73e4695eca0e876f206e40bcb81c422f1bf572b976e753b25a42 SHA512 26c3b9c7a6950649d0b2de896bfeca54289febe4cd487c0f91aa6ff1857fa49f9077f8738a17b86100125668a31dae05b586615c564f78da47ac20a1e4a74f63
 DIST file-5.44.tar.gz.asc 195 BLAKE2B a0905d42fec0fa052d75fb5b267c6ae223176451c0f1d3346006d4b760c3d858f2dcda5f0a30c6aa4b09b5afee427b75bc4debd5033d978f39dc1da01d3e1bd1 SHA512 1a4dc39283f4859581441aa35b3ed72b323c4e05ca0960d17126d1b9ec18465c695c0545e24f09f8437a60ab52e582be67b6cbbc656bbb676de00148c3644d23

diff --git a/sys-apps/file/file-5.43-r3.ebuild b/sys-apps/file/file-5.43-r3.ebuild
deleted file mode 100644
index 040db6fb3eb5..000000000000
--- a/sys-apps/file/file-5.43-r3.ebuild
+++ /dev/null
@@ -1,166 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/file.asc
-	inherit verify-sig
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )"
-
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-
-	BDEPEND="verify-sig? ( sec-keys/openpgp-keys-file )"
-fi
-
-DESCRIPTION="Identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="bzip2 lzma python seccomp static-libs zlib"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] )
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-"
-RDEPEND="
-	${DEPEND}
-	python? ( !dev-python/python-magic )
-"
-BDEPEND+="
-	python? (
-		${PYTHON_DEPS}
-		${DISTUTILS_DEPS}
-	)
-"
-
-PATCHES=(
-	"${FILESDIR}/file-5.43-portage-sandbox.patch" #713710 #728978
-	"${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet
-	"${FILESDIR}/${P}-configure-clang16.patch"
-)
-
-src_prepare() {
-	default
-
-	if [[ ${PV} == 9999 ]] ; then
-		eautoreconf
-	else
-		elibtoolize
-	fi
-
-	# don't let python README kill main README, bug ##60043
-	mv python/README.md python/README.python.md || die
-	# bug #662090
-	sed 's@README.md@README.python.md@' -i python/setup.py || die
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--enable-fsect-man5
-		$(use_enable bzip2 bzlib)
-		$(use_enable lzma xzlib)
-		$(use_enable seccomp libseccomp)
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-	)
-	econf "${myeconfargs[@]}"
-}
-
-build_src_configure() {
-	local myeconfargs=(
-		--disable-shared
-		--disable-libseccomp
-		--disable-bzlib
-		--disable-xzlib
-		--disable-zlib
-	)
-
-	econf_build "${myeconfargs[@]}"
-}
-
-need_build_file() {
-	# when cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions, bug #362941
-	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
-}
-
-src_configure() {
-	local ECONF_SOURCE="${S}"
-
-	if need_build_file ; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		build_src_configure
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		# bug #586444
-		emake -C src magic.h
-		emake -C src libmagic.la
-	fi
-}
-
-src_compile() {
-	if need_build_file ; then
-		# bug #586444
-		emake -C "${WORKDIR}"/build/src magic.h
-		emake -C "${WORKDIR}"/build/src file
-		local -x PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT # README
-
-	# Required for `file -C`
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-
-	find "${ED}" -type f -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/files/file-5.43-configure-clang16.patch b/sys-apps/file/files/file-5.43-configure-clang16.patch
deleted file mode 100644
index 15fd5b1c4a05..000000000000
--- a/sys-apps/file/files/file-5.43-configure-clang16.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://github.com/file/file/commit/4502517cc7316569d5902ab65c97b3b8e46f8a25
-https://github.com/file/file/commit/8c845b7bbad085678695d3e70467b8eec3dfa7af
---- a/configure
-+++ b/configure
-@@ -14037,13 +14037,14 @@ else $as_nop
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <time.h>
-+#include <stdlib.h>
- int
- main (void)
- {
- #if !HAVE_DECL_DAYLIGHT
- extern int daylight;
- #endif
--atoi(daylight);
-+daylight = atoi("1");
-   ;
-   return 0;
- }


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2023-10-19 18:09 Mike Gilbert
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Gilbert @ 2023-10-19 18:09 UTC (permalink / raw
  To: gentoo-commits

commit:     dbbbf5f526aff28f9c8ba79c7a277bc3aa09398b
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 19 18:06:37 2023 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Oct 19 18:08:42 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dbbbf5f5

sys-apps/file: add another seccomp fix for sandbox

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

 .../{file-5.45-r1.ebuild => file-5.45-r2.ebuild}   |  2 +-
 .../file/files/file-5.45-seccomp-sandbox.patch     | 48 ++++++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/sys-apps/file/file-5.45-r1.ebuild b/sys-apps/file/file-5.45-r2.ebuild
similarity index 98%
rename from sys-apps/file/file-5.45-r1.ebuild
rename to sys-apps/file/file-5.45-r2.ebuild
index 84d29bfbdf00..6626b607e4b4 100644
--- a/sys-apps/file/file-5.45-r1.ebuild
+++ b/sys-apps/file/file-5.45-r2.ebuild
@@ -60,7 +60,7 @@ QA_CONFIG_IMPL_DECL_SKIP=( makedev )
 
 PATCHES=(
 	"${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet
-	"${FILESDIR}/file-5.43-portage-sandbox.patch" #889046
+	"${FILESDIR}/file-5.45-seccomp-sandbox.patch"
 	"${FILESDIR}/${P}-32-bit-time_t.patch"
 	"${FILESDIR}/${P}-32-bit-time_t-deux.patch"
 	"${FILESDIR}/${P}-weak-magic-shell.patch" #908401

diff --git a/sys-apps/file/files/file-5.45-seccomp-sandbox.patch b/sys-apps/file/files/file-5.45-seccomp-sandbox.patch
new file mode 100644
index 000000000000..4ae62b5aa947
--- /dev/null
+++ b/sys-apps/file/files/file-5.45-seccomp-sandbox.patch
@@ -0,0 +1,48 @@
+From 056d8aa6e0a743ff743c60a1fca67126f3dce0b6 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Thu, 19 Oct 2023 13:58:20 -0400
+Subject: [PATCH] seccomp: allow syscalls used by Gentoo's LD_PRELOAD sandbox
+
+Bug: https://bugs.gentoo.org/728978
+Bug: https://bugs.gentoo.org/889046
+Bug: https://bugs.gentoo.org/915890
+---
+ src/seccomp.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index 87d4c49e..31954ff4 100644
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -174,6 +174,9 @@ enable_sandbox_full(void)
+ 	ALLOW_RULE(exit_group);
+ #ifdef __NR_faccessat
+ 	ALLOW_RULE(faccessat);
++#endif
++#ifdef __NR_faccessat2
++        ALLOW_RULE(faccessat2);
+ #endif
+ 	ALLOW_RULE(fcntl);
+  	ALLOW_RULE(fcntl64);
+@@ -185,9 +188,18 @@ enable_sandbox_full(void)
+ 	ALLOW_RULE(fstatat64);
+ #endif
+ 	ALLOW_RULE(futex);
++	ALLOW_RULE(getcwd);
+ 	ALLOW_RULE(getdents);
+ #ifdef __NR_getdents64
+ 	ALLOW_RULE(getdents64);
++#endif
++	ALLOW_RULE(getgid);
++#ifdef __NR_getgid32
++	ALLOW_RULE(getgid32);
++#endif
++	ALLOW_RULE(getuid);
++#ifdef __NR_getuid32
++	ALLOW_RULE(getuid32);
+ #endif
+ #ifdef FIONREAD
+ 	// called in src/compress.c under sread
+-- 
+2.42.0
+


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

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/
@ 2023-12-28  4:04 Sam James
  0 siblings, 0 replies; 16+ messages in thread
From: Sam James @ 2023-12-28  4:04 UTC (permalink / raw
  To: gentoo-commits

commit:     0e92bbf0f0596a082f71e915fcea8f4477d7b659
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 04:03:22 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 04:03:22 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e92bbf0

sys-apps/file: drop 5.44-r3, 5.45

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

 sys-apps/file/Manifest                             |   2 -
 sys-apps/file/file-5.44-r3.ebuild                  | 178 ---------------------
 sys-apps/file/file-5.45.ebuild                     | 175 --------------------
 .../file/files/file-5.43-portage-sandbox.patch     |  28 ----
 .../file/files/file-5.44-decompress-empty.patch    | 126 ---------------
 sys-apps/file/files/file-5.44-limits-solaris.patch |  19 ---
 sys-apps/file/files/file-5.44-seccomp-utimes.patch |  18 ---
 7 files changed, 546 deletions(-)

diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index fa88c96b450d..c4c8697aff68 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -1,4 +1,2 @@
-DIST file-5.44.tar.gz 1186437 BLAKE2B a90ccae738a95315d75a0aaee7bbff3624425cc9267daf18ba9147b7c9b9ebfb31288b54c63a73e4695eca0e876f206e40bcb81c422f1bf572b976e753b25a42 SHA512 26c3b9c7a6950649d0b2de896bfeca54289febe4cd487c0f91aa6ff1857fa49f9077f8738a17b86100125668a31dae05b586615c564f78da47ac20a1e4a74f63
-DIST file-5.44.tar.gz.asc 195 BLAKE2B a0905d42fec0fa052d75fb5b267c6ae223176451c0f1d3346006d4b760c3d858f2dcda5f0a30c6aa4b09b5afee427b75bc4debd5033d978f39dc1da01d3e1bd1 SHA512 1a4dc39283f4859581441aa35b3ed72b323c4e05ca0960d17126d1b9ec18465c695c0545e24f09f8437a60ab52e582be67b6cbbc656bbb676de00148c3644d23
 DIST file-5.45.tar.gz 1246503 BLAKE2B 30fc77c091e6624f2e9a950f4c6fe69ea6aa46d4a8ad9f20d49320a3675617c5bfbc9ff1ebba5eeb2cf4435c38d71b47b8beeb5146c9f55fe3bac11fe65e89bd SHA512 12611a59ff766c22a55db4b4a9f80f95a0a2e916a1d8593612c6ead32c247102a8fdc23693c6bf81bda9b604d951a62c0051e91580b1b79e190a3504c0efc20a
 DIST file-5.45.tar.gz.asc 163 BLAKE2B 1405080c63412e9c66bfe06086ecee28b276b77cc2ddacb20cfd370c539a0d983812fd29dcf7a33bad69d6490cd439ef8d1219bfaf3928fb835a38da85013af3 SHA512 56bf131b2f35e896788be19b4d8cd1c7ec942c794fb584d5e589375d22fbccebdd04c03e779fafc0c10840586dc41e64251b3de1767ae9ab95f5d3300f9af254

diff --git a/sys-apps/file/file-5.44-r3.ebuild b/sys-apps/file/file-5.44-r3.ebuild
deleted file mode 100644
index b707b4b3b516..000000000000
--- a/sys-apps/file/file-5.44-r3.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/file.asc
-	inherit verify-sig
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )"
-
-	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-
-	BDEPEND="verify-sig? ( sec-keys/openpgp-keys-file )"
-fi
-
-DESCRIPTION="Identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="bzip2 lzip lzma python seccomp static-libs zlib zstd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	lzip? ( app-arch/lzlib )
-	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] )
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-RDEPEND="
-	${DEPEND}
-	python? ( !dev-python/python-magic )
-	seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] )
-"
-BDEPEND+="
-	python? (
-		${PYTHON_DEPS}
-		${DISTUTILS_DEPS}
-	)
-"
-
-# https://bugs.gentoo.org/898676
-QA_CONFIG_IMPL_DECL_SKIP=( makedev )
-
-PATCHES=(
-	"${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet
-	"${FILESDIR}/file-5.43-portage-sandbox.patch" #889046
-	"${FILESDIR}/file-5.44-limits-solaris.patch" # applied upstream
-	"${FILESDIR}/file-5.44-seccomp-utimes.patch" # upstream
-	"${FILESDIR}/file-5.44-decompress-empty.patch" # upstream
-)
-
-src_prepare() {
-	default
-
-	if [[ ${PV} == 9999 ]] ; then
-		eautoreconf
-	else
-		elibtoolize
-	fi
-
-	# Don't let python README kill main README, bug ##60043
-	mv python/README.md python/README.python.md || die
-
-	# bug #662090
-	sed -i 's@README.md@README.python.md@' python/setup.py || die
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--enable-fsect-man5
-		$(use_enable bzip2 bzlib)
-		$(multilib_native_use_enable lzip lzlib)
-		$(use_enable lzma xzlib)
-		$(use_enable seccomp libseccomp)
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-		$(use_enable zstd zstdlib)
-	)
-
-	econf "${myeconfargs[@]}"
-}
-
-build_src_configure() {
-	local myeconfargs=(
-		--disable-shared
-		--disable-libseccomp
-		--disable-bzlib
-		--disable-xzlib
-		--disable-zlib
-	)
-
-	econf_build "${myeconfargs[@]}"
-}
-
-need_build_file() {
-	# When cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions, bug #362941
-	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
-}
-
-src_configure() {
-	local ECONF_SOURCE="${S}"
-
-	if need_build_file ; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		build_src_configure
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		# bug #586444
-		emake -C src magic.h
-		emake -C src libmagic.la
-	fi
-}
-
-src_compile() {
-	if need_build_file ; then
-		# bug #586444
-		emake -C "${WORKDIR}"/build/src magic.h
-		emake -C "${WORKDIR}"/build/src file
-		local -x PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT # README
-
-	# Required for `file -C`
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-
-	find "${ED}" -type f -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/file-5.45.ebuild b/sys-apps/file/file-5.45.ebuild
deleted file mode 100644
index 1f2cf6f8d1ac..000000000000
--- a/sys-apps/file/file-5.45.ebuild
+++ /dev/null
@@ -1,175 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit distutils-r1 libtool toolchain-funcs multilib-minimal
-
-if [[ ${PV} == 9999 ]] ; then
-	EGIT_REPO_URI="https://github.com/glensc/file.git"
-	inherit autotools git-r3
-else
-	VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/file.asc
-	inherit verify-sig
-	SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
-	SRC_URI+=" verify-sig? ( ftp://ftp.astron.com/pub/file/${P}.tar.gz.asc )"
-
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-
-	BDEPEND="verify-sig? ( sec-keys/openpgp-keys-file )"
-fi
-
-DESCRIPTION="Identify a file's format by scanning binary data for patterns"
-HOMEPAGE="https://www.darwinsys.com/file/"
-
-LICENSE="BSD-2"
-SLOT="0"
-IUSE="bzip2 lzip lzma python seccomp static-libs zlib zstd"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-DEPEND="
-	bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
-	lzip? ( app-arch/lzlib )
-	lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
-	python? (
-		${PYTHON_DEPS}
-		dev-python/setuptools[${PYTHON_USEDEP}]
-	)
-	seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] )
-	zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
-	zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
-"
-RDEPEND="
-	${DEPEND}
-	python? ( !dev-python/python-magic )
-	seccomp? ( >=sys-libs/libseccomp-2.5.4[${MULTILIB_USEDEP}] )
-"
-BDEPEND+="
-	python? (
-		${PYTHON_DEPS}
-		${DISTUTILS_DEPS}
-	)
-"
-
-# https://bugs.gentoo.org/898676
-QA_CONFIG_IMPL_DECL_SKIP=( makedev )
-
-PATCHES=(
-	"${FILESDIR}/file-5.43-seccomp-fstatat64-musl.patch" #789336, not upstream yet
-	"${FILESDIR}/file-5.43-portage-sandbox.patch" #889046
-)
-
-src_prepare() {
-	default
-
-	if [[ ${PV} == 9999 ]] ; then
-		eautoreconf
-	else
-		elibtoolize
-	fi
-
-	# Don't let python README kill main README, bug #60043
-	mv python/README.md python/README.python.md || die
-
-	# bug #662090
-	sed -i 's@README.md@README.python.md@' python/setup.py || die
-}
-
-multilib_src_configure() {
-	local myeconfargs=(
-		--enable-fsect-man5
-		$(use_enable bzip2 bzlib)
-		$(multilib_native_use_enable lzip lzlib)
-		$(use_enable lzma xzlib)
-		$(use_enable seccomp libseccomp)
-		$(use_enable static-libs static)
-		$(use_enable zlib)
-		$(use_enable zstd zstdlib)
-	)
-
-	econf "${myeconfargs[@]}"
-}
-
-build_src_configure() {
-	local myeconfargs=(
-		--disable-shared
-		--disable-libseccomp
-		--disable-bzlib
-		--disable-xzlib
-		--disable-zlib
-	)
-
-	econf_build "${myeconfargs[@]}"
-}
-
-need_build_file() {
-	# When cross-compiling, we need to build up our own file
-	# because people often don't keep matching host/target
-	# file versions, bug #362941
-	tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
-}
-
-src_configure() {
-	local ECONF_SOURCE="${S}"
-
-	if need_build_file ; then
-		mkdir -p "${WORKDIR}"/build || die
-		cd "${WORKDIR}"/build || die
-		build_src_configure
-	fi
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi ; then
-		emake
-	else
-		# bug #586444
-		emake -C src magic.h
-		emake -C src libmagic.la
-	fi
-}
-
-src_compile() {
-	if need_build_file ; then
-		# bug #586444
-		emake -C "${WORKDIR}"/build/src magic.h
-		emake -C "${WORKDIR}"/build/src file
-		local -x PATH="${WORKDIR}/build/src:${PATH}"
-	fi
-
-	multilib-minimal_src_compile
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_compile
-	fi
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi ; then
-		default
-	else
-		emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
-	fi
-}
-
-multilib_src_install_all() {
-	dodoc ChangeLog MAINT # README
-
-	# Required for `file -C`
-	insinto /usr/share/misc/magic
-	doins -r magic/Magdir/*
-
-	if use python ; then
-		cd python || die
-		distutils-r1_src_install
-	fi
-
-	find "${ED}" -type f -name "*.la" -delete || die
-}

diff --git a/sys-apps/file/files/file-5.43-portage-sandbox.patch b/sys-apps/file/files/file-5.43-portage-sandbox.patch
deleted file mode 100644
index f9e715cc366f..000000000000
--- a/sys-apps/file/files/file-5.43-portage-sandbox.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Allow syscalls for Gentoo's portage sandbox
-
-- Add getcwd (bug #728978)
-- Add faccessat2 (bug #889046)
-
-Bug: https://bugs.gentoo.org/728978
-Bug: https://bugs.gentoo.org/889046
---- a/src/seccomp.c
-+++ b/src/seccomp.c
-@@ -174,6 +174,9 @@ enable_sandbox_full(void)
- 	ALLOW_RULE(exit_group);
- #ifdef __NR_faccessat
- 	ALLOW_RULE(faccessat);
-+#endif
-+#ifdef __NR_faccessat2
-+        ALLOW_RULE(faccessat2);
- #endif
- 	ALLOW_RULE(fcntl);
-  	ALLOW_RULE(fcntl64);
-@@ -237,6 +240,8 @@ enable_sandbox_full(void)
- 	ALLOW_RULE(write);
- 	ALLOW_RULE(writev);
- 
-+	// needed by Gentoo's portage sandbox
-+	ALLOW_RULE(getcwd);
- 
- #if 0
- 	// needed by valgrind

diff --git a/sys-apps/file/files/file-5.44-decompress-empty.patch b/sys-apps/file/files/file-5.44-decompress-empty.patch
deleted file mode 100644
index 21dcfa4c94c5..000000000000
--- a/sys-apps/file/files/file-5.44-decompress-empty.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-https://bugs.astron.com/view.php?id=415
-https://github.com/file/file/commit/1dd21dd360472d7b830825df8e40a06cdc1cbbcf
-
-From 1dd21dd360472d7b830825df8e40a06cdc1cbbcf Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Sun, 8 Jan 2023 18:09:16 +0000
-Subject: [PATCH] fix decompression always returning empty.
-
---- a/src/compress.c
-+++ b/src/compress.c
-@@ -609,6 +609,7 @@ uncompresszlib(const unsigned char *old, unsigned char **newch,
- 	int rc;
- 	z_stream z;
- 
-+	DPRINTF("builtin zlib decompression\n");
- 	z.next_in = CCAST(Bytef *, old);
- 	z.avail_in = CAST(uint32_t, *n);
- 	z.next_out = *newch;
-@@ -650,6 +651,7 @@ uncompressbzlib(const unsigned char *old, unsigned char **newch,
- 	int rc;
- 	bz_stream bz;
- 
-+	DPRINTF("builtin bzlib decompression\n");
- 	memset(&bz, 0, sizeof(bz));
- 	rc = BZ2_bzDecompressInit(&bz, 0, 0);
- 	if (rc != BZ_OK)
-@@ -690,6 +692,7 @@ uncompressxzlib(const unsigned char *old, unsigned char **newch,
- 	int rc;
- 	lzma_stream xz;
- 
-+	DPRINTF("builtin xzlib decompression\n");
- 	memset(&xz, 0, sizeof(xz));
- 	rc = lzma_auto_decoder(&xz, UINT64_MAX, 0);
- 	if (rc != LZMA_OK)
-@@ -729,6 +732,7 @@ uncompresszstd(const unsigned char *old, unsigned char **newch,
- 	ZSTD_inBuffer in;
- 	ZSTD_outBuffer out;
- 
-+	DPRINTF("builtin zstd decompression\n");
- 	if ((zstd = ZSTD_createDStream()) == NULL) {
- 		return makeerror(newch, n, "No ZSTD decompression stream, %s",
- 		    strerror(errno));
-@@ -777,6 +781,7 @@ uncompresslzlib(const unsigned char *old, unsigned char **newch,
- 
- 	bufp = *newch;
- 
-+	DPRINTF("builtin lzlib decompression\n");
- 	dec = LZ_decompress_open();
- 	if (!dec) {
- 		return makeerror(newch, n, "unable to allocate LZ_Decoder");
-@@ -833,11 +838,13 @@ makeerror(unsigned char **buf, size_t *len, const char *fmt, ...)
- 	va_list ap;
- 	int rv;
- 
-+	DPRINTF("Makeerror %s\n", fmt);
- 	free(*buf);
- 	va_start(ap, fmt);
- 	rv = vasprintf(&msg, fmt, ap);
- 	va_end(ap);
- 	if (rv < 0) {
-+		DPRINTF("Makeerror failed");
- 		*buf = NULL;
- 		*len = 0;
- 		return NODATA;
-@@ -1048,7 +1055,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
- 	pid_t pid;
- 	pid_t writepid = -1;
- 	size_t i;
--	ssize_t r;
-+	ssize_t r, re;
- 	char *const *args;
- #ifdef HAVE_POSIX_SPAWNP
- 	posix_spawn_file_actions_t fa;
-@@ -1103,6 +1110,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
- 
- 	handledesc(&fa, fd, fdp);
- 
-+	DPRINTF("Executing %s\n", compr[method].argv[0]);
- 	status = posix_spawnp(&pid, compr[method].argv[0], &fa, NULL,
- 	    args, NULL);
- 
-@@ -1128,6 +1136,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
- 		 * do not modify fdp[i][j].
- 		 */
- 		handledesc(NULL, fd, fdp);
-+		DPRINTF("Executing %s\n", compr[method].argv[0]);
- 
- 		(void)execvp(compr[method].argv[0], args);
- 		dprintf(STDERR_FILENO, "exec `%s' failed, %s",
-@@ -1146,6 +1155,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
- 		if (writepid == (pid_t)-1) {
- 			rv = makeerror(newch, n, "Write to child failed, %s",
- 			    strerror(errno));
-+			DPRINTF("Write to child failed\n");
- 			goto err;
- 		}
- 		closefd(fdp[STDIN_FILENO], 1);
-@@ -1153,6 +1163,7 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
- 
- 	rv = OKDATA;
- 	r = sread(fdp[STDOUT_FILENO][0], *newch, bytes_max, 0);
-+	DPRINTF("read got %zd\n", r);
- 	if (r < 0) {
- 		rv = ERRDATA;
- 		DPRINTF("Read stdout failed %d (%s)\n", fdp[STDOUT_FILENO][0],
-@@ -1165,15 +1176,17 @@ uncompressbuf(int fd, size_t bytes_max, size_t method, int nofork,
- 		 * errors, otherwise we risk the child blocking and never
- 		 * exiting.
- 		 */
-+		DPRINTF("Closing stdout for bytes_max\n");
- 		closefd(fdp[STDOUT_FILENO], 0);
- 		goto ok;
- 	}
--	if ((r = sread(fdp[STDERR_FILENO][0], *newch, bytes_max, 0)) > 0) {
-+	if ((re = sread(fdp[STDERR_FILENO][0], *newch, bytes_max, 0)) > 0) {
-+		DPRINTF("Got stuff from stderr %s\n", *newch);
- 		rv = ERRDATA;
- 		r = filter_error(*newch, r);
- 		goto ok;
- 	}
--	if  (r == 0)
-+	if  (re == 0)
- 		goto ok;
- 	rv = makeerror(newch, n, "Read stderr failed, %s",
- 	    strerror(errno));
-

diff --git a/sys-apps/file/files/file-5.44-limits-solaris.patch b/sys-apps/file/files/file-5.44-limits-solaris.patch
deleted file mode 100644
index 7a04535577b4..000000000000
--- a/sys-apps/file/files/file-5.44-limits-solaris.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-softmagic: include limits.h for UINT_MAX usage
-
-Platforms like Solaris need this to compile.
-
-Bug: https://bugs.astron.com/view.php?id=413
-Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-
---- a/src/softmagic.c
-+++ b/src/softmagic.c
-@@ -42,6 +42,7 @@
- #include <ctype.h>
- #include <stdlib.h>
- #include <time.h>
-+#include <limits.h>
- #include "der.h"
-
- file_private int match(struct magic_set *, struct magic *, file_regex_t **,    size_t,
-
-

diff --git a/sys-apps/file/files/file-5.44-seccomp-utimes.patch b/sys-apps/file/files/file-5.44-seccomp-utimes.patch
deleted file mode 100644
index 49f1c2e4b739..000000000000
--- a/sys-apps/file/files/file-5.44-seccomp-utimes.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-https://github.com/file/file/commit/1590a653b520123d47070a47436abfba42d4c943
-
-From 1590a653b520123d47070a47436abfba42d4c943 Mon Sep 17 00:00:00 2001
-From: Christos Zoulas <christos@zoulas.com>
-Date: Mon, 26 Dec 2022 18:57:29 +0000
-Subject: [PATCH] PR/408: SpraxDev: Add utimes to the allow list for -p
-
---- a/src/seccomp.c
-+++ b/src/seccomp.c
-@@ -233,6 +233,7 @@ enable_sandbox_full(void)
- 	ALLOW_RULE(umask);	// Used in file_pipe2file()
- 	ALLOW_RULE(getpid);	// Used by glibc in file_pipe2file()
- 	ALLOW_RULE(unlink);
-+	ALLOW_RULE(utimes);
- 	ALLOW_RULE(write);
- 	ALLOW_RULE(writev);
- 
-


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

end of thread, other threads:[~2023-12-28  4:04 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-11 16:46 [gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-12-28  4:04 Sam James
2023-10-19 18:09 Mike Gilbert
2023-01-13 16:47 Sam James
2023-01-11 21:40 Sam James
2022-12-27 19:30 Fabian Groffen
2022-11-19 23:37 Sam James
2021-07-18 17:46 Mike Gilbert
2021-04-23 19:11 Mike Gilbert
2021-03-31  8:03 Lars Wendler
2020-09-07 16:56 Mike Gilbert
2020-06-24  9:27 Lars Wendler
2019-10-27  0:41 Thomas Deutschmann
2018-11-27 14:38 Lars Wendler
2018-07-19 16:12 Thomas Deutschmann
2017-01-17 16:23 Lars Wendler

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