diff options
Diffstat (limited to 'sys-apps/file')
16 files changed, 118 insertions, 662 deletions
diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest index e520841378a7..6d6e9720bec4 100644 --- a/sys-apps/file/Manifest +++ b/sys-apps/file/Manifest @@ -1,17 +1,8 @@ -AUX file-5.37-CVE-2019-18218.patch 1038 BLAKE2B 30622d39fb4006b07fabab70dfe6fc3f574aac769c7728bada7b622fd670616efc12d42cabf95b32a8a98c811e171059af2e127c170c1935dc00def4a1fc05b6 SHA512 3517e35db03944bcca6da28ddac9f0d08ce052b03d1508d26851fd6691bedc89f3974822a1559576987c8c10a0343bc8788cc7df52406d66a591ddcd39b23a5c -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 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 -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 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 3450 BLAKE2B 236f6da314ad6971e594e40853efc87b2fa32e4389553fa2a11b7cc3dbf4c1291e74285e0e2ed6489a5b67d843319d16b23471f1a74e0e201a9935bb2d4db63f SHA512 3056f15679b56f34406a2e9669ed56c33ea7185435c8a7c0b75b3e58480ddf1e204955932ff1b31ef09a7cf71ee7f1e3533606bf87d3f4d65b9501df60448886 -EBUILD file-9999.ebuild 3296 BLAKE2B 6e56f6436decee04e4c97dfccbe87d5942e328b003a7898e4ae12bb8a9c8c5150c0cb4b304cc3488f6698f2b33456e2d296dddda709cc351f69d07ac95378647 SHA512 4842d01087da26426d0ebe4438e2d20da6653e258e3848f2e01b0433856a9c08258a0391b6a6455714682baab67423660570f01cdd927bd0ed3c5fb4fcd2438c +AUX file-5.40-seccomp-faccessat.patch 1006 BLAKE2B 80a33bec7dd36e146c713c8bb639744f11f2fb094f0870d10071a472dc3e6036cfe6cce4a1570a0876fd6c7c3f8f7f4e1ae39aa46f7cc39ee7e49ea1c9c1b22a SHA512 a475835fac9556ef4a799a5b406acdbbdb7bd09233a5563a386f110355a8e5a4581eed69bcc968df12985f6e910ea7da0deec9f510dd891b633b369afd816ff8 +AUX file-5.40-seccomp-fstatat64.patch 727 BLAKE2B 164574b98126ad8804c7a3ef51c80567a83d89c609b731b84f2d5e0b8fe54d060f45b6db38258ece2e2af1e0d0674e4fdf5b62df6217695d06042bb86ad72f5b SHA512 5e5364659e2c96e438000e698f9099be1d2bee94890c51ed849f6e0d139ba637a8026d975200476636cd8282791b6c3e5b71326fb8519323d6c07604975b5b0c +AUX file-5.40-xz_magic.patch 1277 BLAKE2B 3af2322360ab9d7b3340dd34a2190e249dac5d0dc91843efd07e9fdd92f48ebab0a67decae23e68d9dc6a5fae38880d56977dfa4b3a72d74e362c8f3aab42fee SHA512 4e9e64c1ac0e7e95a113577a32be0fe2f2c2d9acbbe323622c2409d2e1b9f9a6cb3e8572569bbef156ca06c6470ee7db38d2579582622f224919eb37243319e5 +DIST file-5.40.tar.gz 1004214 BLAKE2B 4e15a1ca62fe7c03c90b0e509dc899b87f4474f758ad3d08172b3d838dc3f7c2954ba1074eeeeb3da8c04b8df84eff2b8cdf3177da334a926914429df67f60bf SHA512 3b70df75fa4c9050d55b1ffdc28e5f3c8b8ef7d4efd1a06bf53f113b676d81114a85aae56e0897d32b53716662d64ad18ab251ca8c92c6405c69eb758bb99afb +EBUILD file-5.40-r2.ebuild 3418 BLAKE2B 05d0f47c954197f1105e0ce284a0986f0352072caf98b4dd3af439e58cc6e1015786f1cd4196fbf5950d1def62717a5bbbf3a58aacf2a012d6bb4dd3b1d73842 SHA512 d9fd16e393b90d09edc074cb0f58f972e99f5f7a22d8a106ed74db95cd30f508a48aaf5a476f900d2914b6b3c6668c6a09a7fcb11ca46efaa61f65069414738b +EBUILD file-9999.ebuild 3272 BLAKE2B d585df4df18b289e21ef901b9abcde83cbf99aa234107013fe896974018176cc78d02f92c49fe13785b2ee2f9350d017993f38a78897ef20617214f14c9dd481 SHA512 bf305f9f9e635cdf3edd8c33cad98c0cc05a6bbb190ffb3df9d8cb46517fb50b66089becf395fd44457c69f5ccf91dcb64979fcf4e1507bfc9488d26e21cf90b MISC metadata.xml 381 BLAKE2B 242f4a2403d0a4c69c7ff400fdbd447bb7fb8572dc57dc05f3edd0c875da68433217bec46d43467fa03c5e9ec69616e3450635ff2662ae3ed830a138521e23ab SHA512 f69d67890ecb0b574d414c432df12f6e8d31ceb7755055683941017563da8713d07728e49cd4a7277699a97cd3ba732c946ecf5435cee94778a0d5652e7d6857 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 8daeba6eac10..000000000000 --- 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} == "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="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} == "9999" ]] && 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} \ - CPPFLAGS=${BUILD_CPPFLAGS} \ - LDFLAGS="${BUILD_LDFLAGS} -static" \ - CC=${BUILD_CC} \ - CXX=${BUILD_CXX} \ - econf --disable-shared --disable-libseccomp - 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 tc-is-cross-compiler && ! ROOT=/ has_version "~${CATEGORY}/${P}" ; then - emake -C "${WORKDIR}"/build/src magic.h #586444 - emake -C "${WORKDIR}"/build/src file - 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.38-r1.ebuild b/sys-apps/file/file-5.38-r1.ebuild deleted file mode 100644 index d318c4e309e9..000000000000 --- a/sys-apps/file/file-5.38-r1.ebuild +++ /dev/null @@ -1,142 +0,0 @@ -# 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 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 )" - -PATCHES=( - "${FILESDIR}"/${P}-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch - "${FILESDIR}"/${P}-td-is-for-ptrdiff_t-not-for-off_t.patch - "${FILESDIR}"/${P}-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch -) - -src_prepare() { - default - - [[ ${PV} == "9999" ]] && 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 bzip2 bzlib) - $(use_enable lzma xzlib) - $(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-r4.ebuild b/sys-apps/file/file-5.39-r4.ebuild deleted file mode 100644 index 14b4cbfa64a4..000000000000 --- a/sys-apps/file/file-5.39-r4.ebuild +++ /dev/null @@ -1,147 +0,0 @@ -# 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/file-5.39-r3.ebuild b/sys-apps/file/file-5.40-r2.ebuild index b64fe567d8eb..036079303892 100644 --- a/sys-apps/file/file-5.39-r3.ebuild +++ b/sys-apps/file/file-5.40-r2.ebuild @@ -13,7 +13,7 @@ if [[ ${PV} == "9999" ]] ; then 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" + 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" @@ -37,15 +37,16 @@ RDEPEND="${DEPEND} 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.40-xz_magic.patch" #784773 + "${FILESDIR}/file-5.40-seccomp-faccessat.patch" + "${FILESDIR}/file-5.40-seccomp-fstatat64.patch" #784857 ) src_prepare() { default - if [[ ${PV} == 9999 ]]; then + if [[ ${PV} == 9999 ]] ; then eautoreconf fi @@ -87,9 +88,9 @@ need_build_file() { } src_configure() { - local ECONF_SOURCE=${S} + local ECONF_SOURCE="${S}" - if need_build_file; then + if need_build_file ; then mkdir -p "${WORKDIR}"/build || die cd "${WORKDIR}"/build || die build_src_configure @@ -109,7 +110,7 @@ multilib_src_compile() { } src_compile() { - if need_build_file; then + 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}" @@ -134,7 +135,6 @@ 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/* diff --git a/sys-apps/file/file-9999.ebuild b/sys-apps/file/file-9999.ebuild index 8e6aab3b29e6..67c33d9f4859 100644 --- a/sys-apps/file/file-9999.ebuild +++ b/sys-apps/file/file-9999.ebuild @@ -43,7 +43,7 @@ PATCHES=( src_prepare() { default - if [[ ${PV} == 9999 ]]; then + if [[ ${PV} == 9999 ]] ; then eautoreconf fi @@ -85,9 +85,9 @@ need_build_file() { } src_configure() { - local ECONF_SOURCE=${S} + local ECONF_SOURCE="${S}" - if need_build_file; then + if need_build_file ; then mkdir -p "${WORKDIR}"/build || die cd "${WORKDIR}"/build || die build_src_configure @@ -107,7 +107,7 @@ multilib_src_compile() { } src_compile() { - if need_build_file; then + 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}" @@ -132,7 +132,6 @@ 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/* 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 deleted file mode 100644 index 1cd02b778abf..000000000000 --- a/sys-apps/file/files/file-5.37-CVE-2019-18218.patch +++ /dev/null @@ -1,36 +0,0 @@ -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_LIMIT 10000 -+#define CDF_ELEMENT_LIMIT 100000 - - #define CDF_SECID_NULL 0 - #define CDF_SECID_FREE -1 diff --git a/sys-apps/file/files/file-5.38-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch b/sys-apps/file/files/file-5.38-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch deleted file mode 100644 index 240edc11f680..000000000000 --- a/sys-apps/file/files/file-5.38-Revert-PR-93-iaeiaeiaeiae-Do-as-the-comment-says-and.patch +++ /dev/null @@ -1,40 +0,0 @@ -From c9d21a58bea2ecb2dc8876e09e471094d54a25e4 Mon Sep 17 00:00:00 2001 -From: Thomas Deutschmann <whissi@gentoo.org> -Date: Mon, 13 Apr 2020 01:08:12 +0200 -Subject: [PATCH 1/3] Revert "PR/93: iaeiaeiaeiae: Do as the comment says, and - count as dynamically linked" - -This reverts commit 24c9c086cd7c55b7b0a003a145b32466468e2608. - -Fixes misdetection of shared libraries as statically linked as -reported in bug 717264. - -Bug: https://bugs.gentoo.org/717264 -Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> ---- - src/readelf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/readelf.c b/src/readelf.c -index 40bcfab1..afec31d1 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -1638,6 +1638,7 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, - /* Things we can determine before we seek */ - switch (xph_type) { - case PT_DYNAMIC: -+ linking_style = "dynamically"; - doread = 1; - break; - case PT_NOTE: -@@ -1653,7 +1654,6 @@ dophn_exec(struct magic_set *ms, int clazz, int swap, int fd, off_t off, - } - /*FALLTHROUGH*/ - case PT_INTERP: -- linking_style = "dynamically"; - doread = 1; - break; - default: --- -2.26.0 - diff --git a/sys-apps/file/files/file-5.38-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch b/sys-apps/file/files/file-5.38-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch deleted file mode 100644 index bb211f355f77..000000000000 --- a/sys-apps/file/files/file-5.38-The-executable-bit-is-only-set-when-DF_1_PIE-bit-is-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ed971e5e3ae79bd28697d16c8b78b693052484e4 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Wed, 12 Feb 2020 22:17:33 +0000 -Subject: [PATCH 3/3] The executable bit is only set when DF_1_PIE bit is set - so it is fine. - ---- - magic/Magdir/elf | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/magic/Magdir/elf b/magic/Magdir/elf -index b5a2e00b..f5e1af9a 100644 ---- a/magic/Magdir/elf -+++ b/magic/Magdir/elf -@@ -50,8 +50,9 @@ - !:mime application/x-object - >16 leshort 2 executable, - !:mime application/x-executable -->16 leshort 3 shared object, --!:mime application/x-sharedlib -+>16 leshort 3 ${x?pie executable:shared object}, -+ -+!:mime application/x-${x?pie-executable:sharedlib} - >16 leshort 4 core file, - !:mime application/x-coredump - # OS-specific --- -2.26.0 - diff --git a/sys-apps/file/files/file-5.38-td-is-for-ptrdiff_t-not-for-off_t.patch b/sys-apps/file/files/file-5.38-td-is-for-ptrdiff_t-not-for-off_t.patch deleted file mode 100644 index 09fcaef151ea..000000000000 --- a/sys-apps/file/files/file-5.38-td-is-for-ptrdiff_t-not-for-off_t.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c49dc91df427f89ebcf9cdec556b8fc88cdfc3c1 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas <christos@zoulas.com> -Date: Tue, 17 Dec 2019 15:27:27 +0000 -Subject: [PATCH 2/3] %td is for ptrdiff_t not for off_t. - ---- - src/readelf.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/src/readelf.c b/src/readelf.c -index afec31d1..8ac3b7d6 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -1349,8 +1349,8 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, - name_off = xsh_offset; - - if (fsize != SIZE_UNKNOWN && fsize < name_off) { -- if (file_printf(ms, ", too large section header offset %td", -- name_off) == -1) -+ if (file_printf(ms, ", too large section header offset %jd", -+ (intmax_t)name_off) == -1) - return -1; - return 0; - } --- -2.26.0 - 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 deleted file mode 100644 index 0614f52dd275..000000000000 --- a/sys-apps/file/files/file-5.39-add-missing-termios.patch +++ /dev/null @@ -1,30 +0,0 @@ -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> - ---- - src/seccomp.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/seccomp.c b/src/seccomp.c -index e667adfe4..68c56485d 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.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 -@@ -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 <sys/ioctl.h> - #include <sys/socket.h> -+#include <termios.h> - #include <fcntl.h> - #include <stdlib.h> - #include <errno.h> 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 deleted file mode 100644 index 8d9e3d1eb660..000000000000 --- a/sys-apps/file/files/file-5.39-allow-futex-seccomp.patch +++ /dev/null @@ -1,18 +0,0 @@ -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); diff --git a/sys-apps/file/files/file-5.39-seccomp-musl.patch b/sys-apps/file/files/file-5.39-seccomp-musl.patch deleted file mode 100644 index 72836de67e58..000000000000 --- a/sys-apps/file/files/file-5.39-seccomp-musl.patch +++ /dev/null @@ -1,37 +0,0 @@ -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.40-seccomp-faccessat.patch b/sys-apps/file/files/file-5.40-seccomp-faccessat.patch new file mode 100644 index 000000000000..4aeb88cfe875 --- /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 <christos@zoulas.com> +Date: Tue, 6 Apr 2021 22:02:17 +0000 +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 000000000000..57d04e5f40cf --- /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 <floppym@gentoo.org> +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 + diff --git a/sys-apps/file/files/file-5.40-xz_magic.patch b/sys-apps/file/files/file-5.40-xz_magic.patch new file mode 100644 index 000000000000..e4fed0421f78 --- /dev/null +++ b/sys-apps/file/files/file-5.40-xz_magic.patch @@ -0,0 +1,37 @@ +From 9b0459afab309a82aa4e46f73a4e50dd641f3d39 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas <christos@zoulas.com> +Date: Mon, 19 Apr 2021 17:01:45 +0000 +Subject: [PATCH] PR/257: cuihao: put attributes inside the xz magic. + +--- + magic/Magdir/compress | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/magic/Magdir/compress b/magic/Magdir/compress +index 64d11a736..41a65738f 100644 +--- a/magic/Magdir/compress ++++ b/magic/Magdir/compress +@@ -1,5 +1,5 @@ + #------------------------------------------------------------------------------ +-# $File: compress,v 1.80 2021/03/15 17:49:24 christos Exp $ ++# $File: compress,v 1.81 2021/04/19 17:01:45 christos Exp $ + # compress: file(1) magic for pure-compression formats (no archives) + # + # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. +@@ -265,14 +265,13 @@ + + # http://tukaani.org/xz/xz-file-format.txt + 0 ustring \xFD7zXZ\x00 XZ compressed data, checksum ++!:strength * 2 ++!:mime application/x-xz + >7 byte&0xf 0x0 NONE + >7 byte&0xf 0x1 CRC32 + >7 byte&0xf 0x4 CRC64 + >7 byte&0xf 0xa SHA-256 + +-!:strength * 2 +-!:mime application/x-xz +- + # https://github.com/ckolivas/lrzip/blob/master/doc/magic.header.txt + 0 string LRZI LRZIP compressed data + >4 byte x - version %d |