summaryrefslogtreecommitdiff
path: root/sys-apps/file
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-09-16 09:32:48 +0100
commit9ee6d97c2883d42f204a533a8bc1f4562df778fb (patch)
treeb690ddc0ca30f1472887edbb0b8313629bfcbbb2 /sys-apps/file
parentb17a3ef12038de50228bade1f05502c74e135321 (diff)
gentoo resync : 16.09.2020
Diffstat (limited to 'sys-apps/file')
-rw-r--r--sys-apps/file/Manifest12
-rw-r--r--sys-apps/file/file-5.39-r1.ebuild140
-rw-r--r--sys-apps/file/file-5.39-r3.ebuild (renamed from sys-apps/file/file-5.39-r2.ebuild)15
-rw-r--r--sys-apps/file/file-5.39.ebuild140
-rw-r--r--sys-apps/file/file-9999.ebuild12
-rw-r--r--sys-apps/file/files/file-5.39-add-missing-termios.patch35
-rw-r--r--sys-apps/file/files/file-5.39-portage-sandbox.patch (renamed from sys-apps/file/files/file-5.39-portage_sandbox.patch)18
-rw-r--r--sys-apps/file/files/file-5.39-seccomp-musl.patch37
-rw-r--r--sys-apps/file/files/file-5.39-seccomp_sandbox.patch13
9 files changed, 87 insertions, 335 deletions
diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index 1f527a153089..a1359f482d99 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -2,16 +2,14 @@ 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
+AUX file-5.39-add-missing-termios.patch 917 BLAKE2B 12a0dd712fe7b3755e5fa6dcda0d3a5586be36b0e4fee237ba86b9dcc7b533e57f6094e49599489b8563756764c8a7d6c31d9d20245cb3971c4944ee05413cc2 SHA512 a56a617a212f2e0e348d358e09076ea25bd396f426ce4ab7c090ba702d2d20fdc5b425e2a7baac5abc78bab0320fe1b917b511c0a87b40067f7f1489508107e3
+AUX file-5.39-portage-sandbox.patch 604 BLAKE2B d755d85ae85826df5d2beb2d05f570e230af671c23f27bb1e3e811d1f2f710ae3d4f14d271f9dc4da4d1aa4e71070561d1121deaccf8781de72ff9aec059caa3 SHA512 a65368ed9225b0ca6e7341283a20b308c5d5ca38838849d5228be762d4d87de0438084af8f7cd7b6ee1a707125226940490a80cc1eafc2c817fc865a6211c890
+AUX file-5.39-seccomp-musl.patch 1021 BLAKE2B ffb395d7ebf1a96a7f74c8c8462e561f31a6d46bf8d0b047b370edd0bc9ada254ddfdf1de6217e0d1e85a973880c1f55add5c8dbd40b9db4c693c36d15c5250f SHA512 d5742e169c0a5b40e8dfe3830caf5c6ee21d09122ae409c4b3f357cb517abb8a39c6af2ba6a51fa9155437ae6aa5f30b76b1f8f3d31be9bcd6e6e4e666be1a87
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 3336 BLAKE2B 2f9e33e72c810d726bc347c8a5ec715b6c3bcb0e0244cb34b99aae882a8ac85d2551f1740bd698b5198459a8d36558df4616edb1e91dde5db54ad4ad2b478b33 SHA512 1dfd5cca1c66f9a4e97b28a2242c9200f20a009296c018e558f0ce24b7ddf1a2d6f0e9e01488148c9617e58f72a543da1fd042e8163f719c2aa57b4accbf0fe4
-EBUILD file-5.39.ebuild 3283 BLAKE2B de652a223726670f67d97998e9285b4b997ea3809ac76a41618d9295f2635833ea98e0e93c8cad47c5531cf2babe83bbf1b6b7a20c1e9f9f862ac99a607c50d1 SHA512 17cc98d07cad36198d8069d35ef36f973290402db72561ca42c0c935d61acf6592eb8d2fa5550c457e738bcea2bbebc233870932ea4a37508fd2f0adf4ca51a1
-EBUILD file-9999.ebuild 3291 BLAKE2B ae8369b3553dd3b7813b3f45cebf7334e9508deaa4c0a6fbfcc0e3df5caf0111ba3943b788f18cfab3b74238c1e95f97965775c536060516f2ed83a4a3e720f6 SHA512 2ff57e9b96bfc89a77d848e75d9420699999f6c73f12a1282877cd4f3b64454b3249cbb151b4078984454eed13c824956b4edde6f4d238cc7eb83131ef887c4e
+EBUILD file-5.39-r3.ebuild 3421 BLAKE2B fdc83d16ac687dd6704cb7e97b0bfae816a52464a2da83fa735e60114f8775c488f4fb4f7ed357674cb482e8c2910436971db03c0e56a35e017396e3e4ecf912 SHA512 7a9e2909287aa002e8733e1c252413e9e53072ab8a24b0574a2868be105fbb2a8c1b95fe0112757df2074239b6df9769762b03d7e97a05e03421fa168b81ef38
+EBUILD file-9999.ebuild 3327 BLAKE2B 2d1c3d2ca36a831a192f3e867dd1d027166fa3aa70b2fb3ddc250209ca1e65b38caa476560cd05e67814a5bfe3ac6e695df97f8f737f380bc64507e2052b482d SHA512 9dcc56dfd1b5e4c2143e1411aa897ced3f505a74bbe0b3e14d1d565569aead68e4afe48799a9ff32d2c7ba0ddef6a887dd90b855e5ae7a476535df8bd9508f87
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
deleted file mode 100644
index 8333fd922e2c..000000000000
--- 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
index 645a85169629..d9f6397209d1 100644
--- a/sys-apps/file/file-5.39-r2.ebuild
+++ b/sys-apps/file/file-5.39-r3.ebuild
@@ -6,11 +6,11 @@ EAPI=7
PYTHON_COMPAT=( python3_{6..9} )
DISTUTILS_OPTIONAL=1
-inherit autotools distutils-r1 libtool toolchain-funcs multilib-minimal
+inherit distutils-r1 libtool toolchain-funcs multilib-minimal
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/glensc/file.git"
- inherit git-r3
+ 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 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
@@ -37,13 +37,18 @@ 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() {
default
- eautoreconf
+
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ fi
+
elibtoolize
# don't let python README kill main README #60043
diff --git a/sys-apps/file/file-5.39.ebuild b/sys-apps/file/file-5.39.ebuild
deleted file mode 100644
index 98499a3c73df..000000000000
--- 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/file-9999.ebuild b/sys-apps/file/file-9999.ebuild
index 8333fd922e2c..71c29604e7d5 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 autotools distutils-r1 libtool toolchain-funcs multilib-minimal
+inherit distutils-r1 libtool toolchain-funcs multilib-minimal
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/glensc/file.git"
- inherit git-r3
+ 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 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
@@ -37,12 +37,16 @@ RDEPEND="${DEPEND}
seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
PATCHES=(
- "${FILESDIR}/${PN}-5.39-portage_sandbox.patch" #713710 #728978
+ "${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
)
src_prepare() {
default
- eautoreconf
+
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ fi
+
elibtoolize
# don't let python README kill main README #60043
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 e6cba0d4c28c..0614f52dd275 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
index ff2caed413fc..3ea26641671f 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 000000000000..72836de67e58
--- /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 da0a0ff1f284..000000000000
--- 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