summaryrefslogtreecommitdiff
path: root/sys-apps/file
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-29 11:38:31 +0100
commit90c88731bd036e5698b281fbc0a5f3aa4c9983ac (patch)
tree83fc5facb6b12be510a37bc3d241cc63e965b13a /sys-apps/file
parentfeb0daf81d888e9160f9f94502de09b66f2a63fd (diff)
gentoo resync : 29.06.2020
Diffstat (limited to 'sys-apps/file')
-rw-r--r--sys-apps/file/Manifest6
-rw-r--r--sys-apps/file/file-5.39-r1.ebuild140
-rw-r--r--sys-apps/file/file-5.39-r2.ebuild141
-rw-r--r--sys-apps/file/file-9999.ebuild2
-rw-r--r--sys-apps/file/files/file-5.39-add-missing-termios.patch27
-rw-r--r--sys-apps/file/files/file-5.39-portage_sandbox.patch28
6 files changed, 342 insertions, 2 deletions
diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index cc1d7b4f004e..18fe50194b8a 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -2,12 +2,16 @@ AUX file-5.37-CVE-2019-18218.patch 1038 BLAKE2B 30622d39fb4006b07fabab70dfe6fc3f
AUX file-5.38-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch 1184 BLAKE2B a2b6a11c1d89ac5683422e9d9734990d5b54dc14cc295853920c5ebfe28a5de2055c889d5f708ab55d8e292a514ce51fdbd260f0e15dce74ee048fe0f8a7d93b SHA512 7a710d32232d3484923937add7dd56e6d4c6160e32da4d65cb9b4083fbc85df229af108728f3cdf9313291bdf96259c7471c1b6c4b3548033205de47e0280e6c
AUX file-5.38-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch 823 BLAKE2B c2d4c40224d2fa3db4ca0069e1f5bf111cc782879c97f642d91dc4d545544af22ed11bade5c014494838d75ac8e4d607009af77d0dc9d3457d1eb28d8e2ea192 SHA512 4ddc901be88b61ab860817daeb9f4021a6dff1473d0a64ff6409b8327e07011b1d86f2a2c54e1751d03518fa5def25fed644c1a6cd691f2737b526e43098603c
AUX file-5.38-td-is-for-ptrdiff_t-not-for-off_t.patch 813 BLAKE2B e0d0168f41eb868131cbed1e657f4a1e4f4d1f29d22f4a4685b43a6bece5a9229a25a1d96bbc4deca065dcb6342d388ebe86e984e3dda66729f974bcc4e7a32b SHA512 eae1267cf6f49d448cad51f3ba97cd1f8598bebccc014b8702cf3ea330184718dacd1570f20efdd119951b55fe57729392197cb86f89dcce23654e745c846417
+AUX file-5.39-add-missing-termios.patch 813 BLAKE2B 6b65d89bcf6b3a5b7d125e05b951d7ea0e06ba821d06e3165a6fedaada07d4bb78a35f1fe541f741e88cc1f5e179215626db35d894bf7aab84b132b9e5afc29d SHA512 a1ee1fe9dab05057d962ba9f8fb811aff49794ca0e8f82bf582e17bba884c73e792230ed90450e16c4203aea7f20dd6cb26dd3a22ca66a19074c6a62fe794dd9
+AUX file-5.39-portage_sandbox.patch 668 BLAKE2B ed7556d2f602d848411a5252825401042bef816601f767bc2d24a8e84be7845c459d1149d9a5adfddb59843474dea0f52aead6c4a17ffb27dbd0c7cf14d9cc0b SHA512 c648b7cdd520a91f1c152e1d098db4a0d1877a473bddb5f8fa511b0f556d7a15b958451e071c25595fe1ac8c2a81b475846c13f415d861dc48184d6b19b8b7b7
AUX file-5.39-seccomp_sandbox.patch 320 BLAKE2B ab7c89575e61cfcaa4072b33716f1aa9af437541e3248b329d6cb44c62581ab65c7b7d455f5e0bbe95103f15c24a54a15325af8947da614c83f9f4bad7148eb3 SHA512 3219903e1c3d9f8973515871f073b54bb3396550b308dcb307d0d8cdbd7d76bbc35417e9764c8d3adc257fdcb4a5c62aa136f5175c420c54b86ea03fede6b2d4
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
EBUILD file-5.37-r1.ebuild 3186 BLAKE2B ae1dc50d4a3e863b7ad9e1732c96b75c97d780bd7b42a34b3cdf8559e21e55724df58e5cb0ec54d1ce33c33c180755803b4545fdec3026a66f364b4436610328 SHA512 58fe1683e40742719d76cb17e0d8cebbf04de75fe1c8d4c4d8873ed75c0a0f1a4f196fa74c182c170ef00a19e42e9e892ef0ce68ef7709194f55cddb0f382eb1
EBUILD file-5.38-r1.ebuild 3397 BLAKE2B 7cd1c545d4df9e9f448a07ae492df789fe2503c81dc7ec1bf530904099a0ec25789e205e33c725feeb03671f2fab11d04052a161c895f42e7fa2994aea316002 SHA512 baef4c52a5e40e35a3cb1717f78ecb066a10513c1e75e2c69e9ac381c58fdaf1cdb935cfc51720c382ecead25ea485163d544ba6ca19ece6dc556ec7e75c32c1
+EBUILD file-5.39-r1.ebuild 3291 BLAKE2B ae8369b3553dd3b7813b3f45cebf7334e9508deaa4c0a6fbfcc0e3df5caf0111ba3943b788f18cfab3b74238c1e95f97965775c536060516f2ed83a4a3e720f6 SHA512 2ff57e9b96bfc89a77d848e75d9420699999f6c73f12a1282877cd4f3b64454b3249cbb151b4078984454eed13c824956b4edde6f4d238cc7eb83131ef887c4e
+EBUILD file-5.39-r2.ebuild 3345 BLAKE2B 42e68fc14e26709f9f4b92f05f7f0e9ce78c83b41b05bc51c7e706282c40088b14c1efd6a394ecee611871f4e6d5279ba59802f0a28a0cff1320cc4fc073dbbb SHA512 a00a867a66f5a0ddd91cc3de97c425d2103e8823d0b38da75d8cf5d4eafa009b2043c78e37b931ed9b52996931524b601c76423efd4c27dd0395ac3d333578c8
EBUILD file-5.39.ebuild 3283 BLAKE2B de652a223726670f67d97998e9285b4b997ea3809ac76a41618d9295f2635833ea98e0e93c8cad47c5531cf2babe83bbf1b6b7a20c1e9f9f862ac99a607c50d1 SHA512 17cc98d07cad36198d8069d35ef36f973290402db72561ca42c0c935d61acf6592eb8d2fa5550c457e738bcea2bbebc233870932ea4a37508fd2f0adf4ca51a1
-EBUILD file-9999.ebuild 3283 BLAKE2B de652a223726670f67d97998e9285b4b997ea3809ac76a41618d9295f2635833ea98e0e93c8cad47c5531cf2babe83bbf1b6b7a20c1e9f9f862ac99a607c50d1 SHA512 17cc98d07cad36198d8069d35ef36f973290402db72561ca42c0c935d61acf6592eb8d2fa5550c457e738bcea2bbebc233870932ea4a37508fd2f0adf4ca51a1
+EBUILD file-9999.ebuild 3291 BLAKE2B ae8369b3553dd3b7813b3f45cebf7334e9508deaa4c0a6fbfcc0e3df5caf0111ba3943b788f18cfab3b74238c1e95f97965775c536060516f2ed83a4a3e720f6 SHA512 2ff57e9b96bfc89a77d848e75d9420699999f6c73f12a1282877cd4f3b64454b3249cbb151b4078984454eed13c824956b4edde6f4d238cc7eb83131ef887c4e
MISC metadata.xml 381 BLAKE2B 242f4a2403d0a4c69c7ff400fdbd447bb7fb8572dc57dc05f3edd0c875da68433217bec46d43467fa03c5e9ec69616e3450635ff2662ae3ed830a138521e23ab SHA512 f69d67890ecb0b574d414c432df12f6e8d31ceb7755055683941017563da8713d07728e49cd4a7277699a97cd3ba732c946ecf5435cee94778a0d5652e7d6857
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 000000000000..8333fd922e2c
--- /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/file-5.39-r2.ebuild b/sys-apps/file/file-5.39-r2.ebuild
new file mode 100644
index 000000000000..204826c0d4d5
--- /dev/null
+++ b/sys-apps/file/file-5.39-r2.ebuild
@@ -0,0 +1,141 @@
+# 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
+ "${FILESDIR}/${P}-add-missing-termios.patch" #728416
+)
+
+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-9999.ebuild b/sys-apps/file/file-9999.ebuild
index 98499a3c73df..8333fd922e2c 100644
--- a/sys-apps/file/file-9999.ebuild
+++ b/sys-apps/file/file-9999.ebuild
@@ -37,7 +37,7 @@ RDEPEND="${DEPEND}
seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-5.39-seccomp_sandbox.patch" #713710
+ "${FILESDIR}/${PN}-5.39-portage_sandbox.patch" #713710 #728978
)
src_prepare() {
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
new file mode 100644
index 000000000000..e6cba0d4c28c
--- /dev/null
+++ b/sys-apps/file/files/file-5.39-add-missing-termios.patch
@@ -0,0 +1,27 @@
+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
+
+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(+)
+
+diff --git a/src/seccomp.c b/src/seccomp.c
+index e667adf..296f5b3 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 $")
+ #if HAVE_LIBSECCOMP
+ #include <seccomp.h> /* libseccomp */
+ #include <sys/prctl.h> /* prctl */
++#include <termios.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+ #include <fcntl.h>
+--
+2.27.0
+
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 000000000000..ff2caed413fc
--- /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
+