[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2023-12-27 Thread Sam James
commit: 0e92bbf0f0596a082f71e915fcea8f4477d7b659
Author: Sam James  gentoo  org>
AuthorDate: Thu Dec 28 04:03:22 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Dec 28 04:03:22 2023 +
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  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..
--- 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} ==  ]] ; 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} ==  ]] ; then
-   eautoreconf
-   else
-   elibtoolize
-   fi
-
-   # Don't let python README 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2023-10-19 Thread Mike Gilbert
commit: dbbbf5f526aff28f9c8ba79c7a277bc3aa09398b
Author: Mike Gilbert  gentoo  org>
AuthorDate: Thu Oct 19 18:06:37 2023 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Thu Oct 19 18:08:42 2023 +
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  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 ..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 
+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
+



[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

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

sys-apps/file: drop 5.43-r3

Signed-off-by: Sam James  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..
--- 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} ==  ]] ; 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} ==  ]] ; 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=(
-   

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

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

sys-apps/file: backport decompression fix

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

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2022-12-27 Thread Fabian Groffen
commit: eedc8deda6d12b9e02f97c44dc16e95680e14c3e
Author: Fabian Groffen  gentoo  org>
AuthorDate: Tue Dec 27 19:30:13 2022 +
Commit: Fabian Groffen  gentoo  org>
CommitDate: Tue Dec 27 19:30:52 2022 +
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  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 ..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 
+
+--- a/src/softmagic.c
 b/src/softmagic.c
+@@ -42,6 +42,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ #include "der.h"
+
+ file_private int match(struct magic_set *, struct magic *, file_regex_t **,   
 size_t,
+
+



[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

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

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

Signed-off-by: Sam James  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 ..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 
++#include 
+ int
+ main (void)
+ {
+ #if !HAVE_DECL_DAYLIGHT
+ extern int daylight;
+ #endif
+-atoi(daylight);
++daylight = atoi("1");
+   ;
+   return 0;
+ }



[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2021-07-18 Thread Mike Gilbert
commit: 2e20ec0fa649b0720f862615c6099b947848fd3c
Author: Mike Gilbert  gentoo  org>
AuthorDate: Sun Jul 18 17:46:26 2021 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Sun Jul 18 17:46:26 2021 +
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  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 000..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 
+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
+



[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2021-04-23 Thread Mike Gilbert
commit: 0813d843cb2a43c748fdf6c9d5ac6dc882104dcf
Author: Mike Gilbert  gentoo  org>
AuthorDate: Fri Apr 23 19:10:09 2021 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Fri Apr 23 19:10:09 2021 +
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  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 000..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 
+Date: Tue, 6 Apr 2021 22:02:17 +
+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 000..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 
+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
+



[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

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

sys-apps/file: Removed old

Signed-off-by: Lars Wendler  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 
4e15a1ca62fe7c03c90b0e509dc899b87f4474f758ad3d08172b3d838dc3f7c2954ba1074b3da8c04b8df84eff2b8cdf3177da334a926914429df67f60bf
 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..000
--- 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} == "" ]] ; 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} == "" ]] && 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} \
-   

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2021-03-11 Thread Sam James
commit: 5b30e5f884f0602a68780d2c4d9c3ebe9e418a5c
Author: Sam James  gentoo  org>
AuthorDate: Thu Mar 11 16:45:05 2021 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Mar 11 16:46:41 2021 +
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  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 000..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} == "" ]] ; 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} ==  ]]; 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 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2020-09-07 Thread Mike Gilbert
commit: 728f8c43b8b540f37871be3080ac63c05a9cf6a7
Author: Mike Gilbert  gentoo  org>
AuthorDate: Mon Sep  7 16:55:11 2020 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Mon Sep  7 16:55:11 2020 +
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  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..000
--- 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} == "" ]] ; 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 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2020-06-24 Thread Lars Wendler
commit: 0e7234f3304d3a7471390c4699892d49d41028e2
Author: Lars Wendler  gentoo  org>
AuthorDate: Wed Jun 24 09:26:16 2020 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Wed Jun 24 09:27:50 2020 +
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  kamph.org>
Bug: https://bugs.gentoo.org/728978
Package-Manager: Portage-2.3.102, Repoman-2.3.23
Signed-off-by: Lars Wendler  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 000..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} == "" ]] ; 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" 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2019-10-26 Thread Thomas Deutschmann
commit: e4782ac407f7b8744abf6bb7fe9e60bdd2dffa64
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Sun Oct 27 00:41:03 2019 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Sun Oct 27 00:41:03 2019 +
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  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 7aa0f8d..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 000..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_LIMIT1
++#define CDF_ELEMENT_LIMIT 10
+ 
+ #define CDF_SECID_NULL0
+ #define CDF_SECID_FREE-1



[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2018-11-27 Thread Lars Wendler
commit: 84feef34d820a60fdfdb1636b3233c1331399d97
Author: Lars Wendler  gentoo  org>
AuthorDate: Tue Nov 27 14:38:16 2018 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Tue Nov 27 14:38:16 2018 +
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  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..000
--- 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} == "" ]] ; 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} == "" ]] && 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
-
-   

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2018-07-19 Thread Thomas Deutschmann
commit: 9bb8160bd3bbd28d2b5f3b50e9e657537a4a32ba
Author: Thomas Deutschmann  gentoo  org>
AuthorDate: Thu Jul 19 16:12:18 2018 +
Commit: Thomas Deutschmann  gentoo  org>
CommitDate: Thu Jul 19 16:12:18 2018 +
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} == "" ]] && 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 000..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 

[gentoo-commits] repo/gentoo:master commit in: sys-apps/file/files/, sys-apps/file/

2017-01-17 Thread Lars Wendler
commit: 0d0ddd19f8af195c7ec4e60a4db7ca3dba756c2f
Author: Lars Wendler  gentoo  org>
AuthorDate: Tue Jan 17 15:17:02 2017 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Tue Jan 17 16:22:59 2017 +
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..
--- 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} == "" ]] ; 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} == "" ]] && 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
-}
-