summaryrefslogtreecommitdiff
path: root/sys-apps/file
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-12 21:55:15 +0000
commit7218e1b46bceac05841e90472501742d905fb3fc (patch)
tree56fae051db521b8fce8014cbc8b11484885b14b3 /sys-apps/file
parent6d691ad5b6239929063441bbd14c489e92e7396e (diff)
gentoo resync : 12.03.2021
Diffstat (limited to 'sys-apps/file')
-rw-r--r--sys-apps/file/Manifest2
-rw-r--r--sys-apps/file/file-5.39-r4.ebuild147
-rw-r--r--sys-apps/file/files/file-5.39-allow-futex-seccomp.patch18
3 files changed, 167 insertions, 0 deletions
diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest
index 18947baea3a8..1a14d81a25e8 100644
--- a/sys-apps/file/Manifest
+++ b/sys-apps/file/Manifest
@@ -3,6 +3,7 @@ AUX file-5.38-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch 1184 BL
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 917 BLAKE2B 12a0dd712fe7b3755e5fa6dcda0d3a5586be36b0e4fee237ba86b9dcc7b533e57f6094e49599489b8563756764c8a7d6c31d9d20245cb3971c4944ee05413cc2 SHA512 a56a617a212f2e0e348d358e09076ea25bd396f426ce4ab7c090ba702d2d20fdc5b425e2a7baac5abc78bab0320fe1b917b511c0a87b40067f7f1489508107e3
+AUX file-5.39-allow-futex-seccomp.patch 473 BLAKE2B d575e64d3d3b7f772b240bb30ad171a85e69b5282dbef43ece466dfcfed4b1ead9c8f038948010e00d7c0a029d8896d32e252ad02789725eb9fa2d61f3abf1b0 SHA512 c22098f467b41f23f9b94dae91d89008c01b5bf7534df662541bd86170feb64190a4b742e2d7130fd57973b4d565d8bc63d0d67d83399afec943e00f2ad5b847
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
@@ -11,5 +12,6 @@ DIST file-5.39.tar.gz 954266 BLAKE2B 4d6d9a6317961e0a2aa391f502b0be8bbb40ede57c3
EBUILD file-5.37-r1.ebuild 3153 BLAKE2B 19df45e9db45ca58085f3758d9396a074b6cd3a2475228ff7774551e85adb321203091958ae36eaa2aa12bbbfc2bf7aa79ad1e8b95345a106accd20fd621f54a SHA512 786d0ad8abe705e1e5ed1c3604dc4d6e4ae00ab27150368dd00475baefaeb37ec72c45297fd68def3fcb276b2ee29a8b8982e0010223d87df55450d49c8a1d76
EBUILD file-5.38-r1.ebuild 3366 BLAKE2B cde302d8a08639b8b2a5f8aec2f4f00a0dce1bcc7a9b34b7ce9e2786cbc421659fba7acd50d81b90604dcdca84ee3ef9d8fb7bb431d01a98a2e47c7a82832e37 SHA512 af1fae92b1c27efb812b4a6b6944f9ebbdd35e0cf852b6e69bde503bcc9c5c08e97d4e7eac7139e674c4651650eb5e853dd3e3d4ee094d234d54606dd66b13ff
EBUILD file-5.39-r3.ebuild 3390 BLAKE2B b8443b97f7364c7958ead19c0485321f821fe2a3c5d489be5c25a2dd9257faa0937cd0ddf900f860bd1790a2c196cc8d8566c65139619777335d742605e3d9f0 SHA512 6f8ff5ff5658fc9abe9d7803058763cf76ff63f269482c74956756befc95b993d2587f94b428305e19e5b66fb6b95f04d4eb32be4264bdf60cff07cbedbe0088
+EBUILD file-5.39-r4.ebuild 3458 BLAKE2B 42284b9cca829b4602bc383761feffe15f2eb1e6c3d6732edf6e71937702b9de0546baefe47e318a29b0c3e1535a3c8fc1b325ca73e9a2c80ef0d4f4bca1268d SHA512 cd689bf33cdcaef5f23b239103c6ba5ba46a0194007ef8f81c616fcd185c2c0d79ba70dfa250df6aba39373cc346e5fb77c8c6e17e264df4f2b379b311b9164d
EBUILD file-9999.ebuild 3296 BLAKE2B 6e56f6436decee04e4c97dfccbe87d5942e328b003a7898e4ae12bb8a9c8c5150c0cb4b304cc3488f6698f2b33456e2d296dddda709cc351f69d07ac95378647 SHA512 4842d01087da26426d0ebe4438e2d20da6653e258e3848f2e01b0433856a9c08258a0391b6a6455714682baab67423660570f01cdd927bd0ed3c5fb4fcd2438c
MISC metadata.xml 381 BLAKE2B 242f4a2403d0a4c69c7ff400fdbd447bb7fb8572dc57dc05f3edd0c875da68433217bec46d43467fa03c5e9ec69616e3450635ff2662ae3ed830a138521e23ab SHA512 f69d67890ecb0b574d414c432df12f6e8d31ceb7755055683941017563da8713d07728e49cd4a7277699a97cd3ba732c946ecf5435cee94778a0d5652e7d6857
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 000000000000..70dea08b9d9f
--- /dev/null
+++ b/sys-apps/file/file-5.39-r4.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+DISTUTILS_OPTIONAL=1
+
+inherit distutils-r1 libtool toolchain-funcs multilib-minimal
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://github.com/glensc/file.git"
+ inherit autotools git-r3
+else
+ SRC_URI="ftp://ftp.astron.com/pub/file/${P}.tar.gz"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+DESCRIPTION="identify a file's format by scanning binary data for patterns"
+HOMEPAGE="https://www.darwinsys.com/file/"
+
+LICENSE="BSD-2"
+SLOT="0"
+IUSE="bzip2 lzma python seccomp static-libs zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+ bzip2? ( app-arch/bzip2[${MULTILIB_USEDEP}] )
+ lzma? ( app-arch/xz-utils[${MULTILIB_USEDEP}] )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )"
+RDEPEND="${DEPEND}
+ python? ( !dev-python/python-magic )
+ seccomp? ( sys-libs/libseccomp[${MULTILIB_USEDEP}] )"
+
+PATCHES=(
+ "${FILESDIR}/file-5.39-add-missing-termios.patch" #728416
+ "${FILESDIR}/file-5.39-seccomp-musl.patch"
+ "${FILESDIR}/file-5.39-portage-sandbox.patch" #713710 #728978
+ "${FILESDIR}/file-5.39-allow-futex-seccomp.patch" #771096
+)
+
+src_prepare() {
+ default
+
+ if [[ ${PV} == 9999 ]]; then
+ eautoreconf
+ fi
+
+ elibtoolize
+
+ # don't let python README kill main README #60043
+ mv python/README.md python/README.python.md || die
+ sed 's@README.md@README.python.md@' -i python/setup.py || die #662090
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ --enable-fsect-man5
+ $(use_enable bzip2 bzlib)
+ $(use_enable lzma xzlib)
+ $(use_enable seccomp libseccomp)
+ $(use_enable static-libs static)
+ $(use_enable zlib)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+build_src_configure() {
+ local myeconfargs=(
+ --disable-shared
+ --disable-libseccomp
+ --disable-bzlib
+ --disable-xzlib
+ --disable-zlib
+ )
+ tc-env_build econf "${myeconfargs[@]}"
+}
+
+need_build_file() {
+ # when cross-compiling, we need to build up our own file
+ # because people often don't keep matching host/target
+ # file versions #362941
+ tc-is-cross-compiler && ! has_version -b "~${CATEGORY}/${P}"
+}
+
+src_configure() {
+ local ECONF_SOURCE=${S}
+
+ if need_build_file; then
+ mkdir -p "${WORKDIR}"/build || die
+ cd "${WORKDIR}"/build || die
+ build_src_configure
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi ; then
+ emake
+ else
+ cd src || die
+ emake magic.h #586444
+ emake libmagic.la
+ fi
+}
+
+src_compile() {
+ if need_build_file; then
+ emake -C "${WORKDIR}"/build/src magic.h #586444
+ emake -C "${WORKDIR}"/build/src file
+ local -x PATH="${WORKDIR}/build/src:${PATH}"
+ fi
+ multilib-minimal_src_compile
+
+ if use python ; then
+ cd python || die
+ distutils-r1_src_compile
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi ; then
+ default
+ else
+ emake -C src install-{nodist_includeHEADERS,libLTLIBRARIES} DESTDIR="${D}"
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc ChangeLog MAINT README
+
+ # Required for `file -C`
+ dodir /usr/share/misc/magic
+ insinto /usr/share/misc/magic
+ doins -r magic/Magdir/*
+
+ if use python ; then
+ cd python || die
+ distutils-r1_src_install
+ fi
+ find "${ED}" -type f -name "*.la" -delete || die
+}
diff --git a/sys-apps/file/files/file-5.39-allow-futex-seccomp.patch b/sys-apps/file/files/file-5.39-allow-futex-seccomp.patch
new file mode 100644
index 000000000000..8d9e3d1eb660
--- /dev/null
+++ b/sys-apps/file/files/file-5.39-allow-futex-seccomp.patch
@@ -0,0 +1,18 @@
+In some situations, futex() is called even when lzma
+support is not compiled in. Let's enable it unconditionally
+for now.
+
+https://bugs.gentoo.org/771096
+https://bugs.astron.com/view.php?id=241
+--- a/src/seccomp.c
++++ b/src/seccomp.c
+@@ -175,9 +175,7 @@ enable_sandbox_full(void)
+ ALLOW_RULE(fcntl64);
+ ALLOW_RULE(fstat);
+ ALLOW_RULE(fstat64);
+-#ifdef XZLIBSUPPORT
+ ALLOW_RULE(futex);
+-#endif
+ ALLOW_RULE(getdents);
+ #ifdef __NR_getdents64
+ ALLOW_RULE(getdents64);