summaryrefslogtreecommitdiff
path: root/sys-apps/file
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-21 17:50:24 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-21 17:50:24 +0100
commitfeb0daf81d888e9160f9f94502de09b66f2a63fd (patch)
treeb6e5c40ce2abef3da27ed50a023153f475e0ddef /sys-apps/file
parent9452a6e87b6c2c70513bc47a2470bf9f1168920e (diff)
gentoo resync : 21.06.2020
Diffstat (limited to 'sys-apps/file')
-rw-r--r--sys-apps/file/Manifest5
-rw-r--r--sys-apps/file/file-5.39.ebuild140
-rw-r--r--sys-apps/file/file-9999.ebuild11
-rw-r--r--sys-apps/file/files/file-5.39-seccomp_sandbox.patch13
4 files changed, 164 insertions, 5 deletions
diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index 85baf38263aa..cc1d7b4f004e 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -2,9 +2,12 @@ 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-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-9999.ebuild 3240 BLAKE2B 09f3355bc2b9ebdc2e760ace847c02096ba7b7c8a77535a23f3109212063bbd1e8b535a76e25c19a71a90afdc13766ac1af743ca325e850427ba695c53d80e2a SHA512 10c411763893d29d31aabb52da0dc579bc0a820b1cab4d535987823d915efde8c10b1b8b622a980b8d8e2d9bebc40b13182152270a86606b69d25f44f32a7bc4
+EBUILD file-5.39.ebuild 3283 BLAKE2B de652a223726670f67d97998e9285b4b997ea3809ac76a41618d9295f2635833ea98e0e93c8cad47c5531cf2babe83bbf1b6b7a20c1e9f9f862ac99a607c50d1 SHA512 17cc98d07cad36198d8069d35ef36f973290402db72561ca42c0c935d61acf6592eb8d2fa5550c457e738bcea2bbebc233870932ea4a37508fd2f0adf4ca51a1
+EBUILD file-9999.ebuild 3283 BLAKE2B de652a223726670f67d97998e9285b4b997ea3809ac76a41618d9295f2635833ea98e0e93c8cad47c5531cf2babe83bbf1b6b7a20c1e9f9f862ac99a607c50d1 SHA512 17cc98d07cad36198d8069d35ef36f973290402db72561ca42c0c935d61acf6592eb8d2fa5550c457e738bcea2bbebc233870932ea4a37508fd2f0adf4ca51a1
MISC metadata.xml 381 BLAKE2B 242f4a2403d0a4c69c7ff400fdbd447bb7fb8572dc57dc05f3edd0c875da68433217bec46d43467fa03c5e9ec69616e3450635ff2662ae3ed830a138521e23ab SHA512 f69d67890ecb0b574d414c432df12f6e8d31ceb7755055683941017563da8713d07728e49cd4a7277699a97cd3ba732c946ecf5435cee94778a0d5652e7d6857
diff --git a/sys-apps/file/file-5.39.ebuild b/sys-apps/file/file-5.39.ebuild
new file mode 100644
index 000000000000..98499a3c73df
--- /dev/null
+++ b/sys-apps/file/file-5.39.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-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/file-9999.ebuild b/sys-apps/file/file-9999.ebuild
index 0fd7e8ca10da..98499a3c73df 100644
--- a/sys-apps/file/file-9999.ebuild
+++ b/sys-apps/file/file-9999.ebuild
@@ -6,11 +6,11 @@ EAPI=7
PYTHON_COMPAT=( python3_{6..9} )
DISTUTILS_OPTIONAL=1
-inherit distutils-r1 libtool toolchain-funcs multilib-minimal
+inherit autotools distutils-r1 libtool toolchain-funcs multilib-minimal
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/glensc/file.git"
- inherit autotools git-r3
+ 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"
@@ -36,10 +36,13 @@ 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
-
- [[ ${PV} == "9999" ]] && eautoreconf
+ eautoreconf
elibtoolize
# don't let python README kill main README #60043
diff --git a/sys-apps/file/files/file-5.39-seccomp_sandbox.patch b/sys-apps/file/files/file-5.39-seccomp_sandbox.patch
new file mode 100644
index 000000000000..da0a0ff1f284
--- /dev/null
+++ b/sys-apps/file/files/file-5.39-seccomp_sandbox.patch
@@ -0,0 +1,13 @@
+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