From 9c0a2358763d5637ca11fe0d263ff4c9fca70a9e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 21 Jul 2018 19:10:49 +0100 Subject: gentoo resync : 21.07.2018 --- sys-apps/file/Manifest | 5 +- sys-apps/file/file-5.33-r2.ebuild | 127 -------------------- sys-apps/file/file-5.33-r3.ebuild | 133 +++++++++++++++++++++ sys-apps/file/file-9999.ebuild | 2 +- .../file/files/file-5.33-gl_VISIBILITY-macro.patch | 116 ++++++++++++++++++ 5 files changed, 253 insertions(+), 130 deletions(-) delete mode 100644 sys-apps/file/file-5.33-r2.ebuild create mode 100644 sys-apps/file/file-5.33-r3.ebuild create mode 100644 sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch (limited to 'sys-apps/file') diff --git a/sys-apps/file/Manifest b/sys-apps/file/Manifest index 3848a33e46dd..60bedf29d53b 100644 --- a/sys-apps/file/Manifest +++ b/sys-apps/file/Manifest @@ -1,5 +1,6 @@ AUX file-5.33-CVE-2018-10360.patch 538 BLAKE2B 78c6006285e3ba254cc2dcb1196fe95217d1ccda46b3f652cbc99c9750b74a47ddbed33f01ef01e7f8c58205dd4c1f9669cb982e08679dd0b45214915883fb75 SHA512 7f6fd05fe29081039c57d22f5122364bf6ccfe869745f1306ceff13e876cb88e03263d2f11558ccbffebe227bcb9c2c6872d1fdb9b2823d16b001f6598f25c6f +AUX file-5.33-gl_VISIBILITY-macro.patch 3209 BLAKE2B 50fa53df86ce25bbc1f64525a23adbd7f117d6f97e97dacc56031f564dfd2c4742a86128738acc0495869500c986273f815c5f49c24c79e8e0659fc26f3e38fc SHA512 e3d0be41d4889db8b77a7c8a56c0f7996071277e5288af18010c5736555b1a4f31ac1767969e8b3f1cbe8d4bc800e8c1faa27aa82ac58069faa2d314c6737ad1 DIST file-5.33.tar.gz 817060 BLAKE2B 735f176f09085243dacaddda1b734ef2191ff1684f08022ed1874e84fd0c84679b5a765383c5c5ad27a7216abc23b9c2211fb7110846122563e18285de0f0e51 SHA512 36c9f2e2aa814b5557eef114fdd3de159688c7a3c9632a9f5c6355c4d2a5694cee81279bda80897616fca07289a7fedb1f797439a2903c76dc84870694773c9e -EBUILD file-5.33-r2.ebuild 3108 BLAKE2B 6fe4ebecc9cc975d3ab46abf7fc2cd5a18e78fa1094e3f93fd4987b638af867adfe776e45baa7f71e6fe89a5e61ae3331cc66df52d436032fbb5de6654d25612 SHA512 f17969fd656652da3032aa00324d140537ee060db77191720b7be5cf336856411e5a8763cd945d8955131934f19e2b346da20cde77d98265b8d311cc7105170b -EBUILD file-9999.ebuild 3141 BLAKE2B 89cee448db824b8746f088e25ae2e4e1ac6951a13b5ea925283f4395b683203a90406caa523be5e96238666b0f000288f8d46f5f867074d6e55351e703b40ff9 SHA512 733e1e18d808031be18afe662079a7f130f2cb61e6c071c00ca202d7938ea9577dbdafb99fc6d534ba84f485c1b8de645e67e1d92c1dfeb0caf645ff863857a3 +EBUILD file-5.33-r3.ebuild 3259 BLAKE2B 5efff0eaca07d57e1c077e9941d95cc95899a4a649f696ab4999b4524ba1f2127332682d4607c6e00346f102b58987ef8084dc3fa9be48c78c85d8ca1e7649b9 SHA512 9b2930225b8687fc5a8ad32b0400d51f2caad3ce857e107d95b06250466f0915e7dda6a236f0ea3be0723e785482d191d82b82b9bf2b640992e417160f30fa9b +EBUILD file-9999.ebuild 3143 BLAKE2B 4c9bb3c75d7422f3d681612e79877930277f96a3996b2424cb2f70416f4dff17f9f97a30cae8897983b317a0538d99a8392fb72d59a0fb0d56847ee3cde9592a SHA512 8d90ff5243e257617e93c791d59267381356bcf3a761ef9d8bb2ac0a52471bb4f4dd4c95449bb8e4a04820d880ba6b4e44c07b0df54e330522100573e9cea1b1 MISC metadata.xml 316 BLAKE2B 475092518eaf152f7e153e84a12c7089e665a5fc089045b6fa2d452eaf726566cade92c65ef19ba5cb205e586d161e90e514b60c8587699ca5c9885565ca3b60 SHA512 8b334ba7a606600ad0548ef0ab7aa809a8fda040104d1663bfe179828a831e621128145325aba158fccf94a7f9a3ca1c9164db979a85e639403a079f0deb622a diff --git a/sys-apps/file/file-5.33-r2.ebuild b/sys-apps/file/file-5.33-r2.ebuild deleted file mode 100644 index c01383f72055..000000000000 --- a/sys-apps/file/file-5.33-r2.ebuild +++ /dev/null @@ -1,127 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) -DISTUTILS_OPTIONAL=1 - -inherit distutils-r1 libtool ltprune 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 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~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="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-2018-10360.patch ) - -src_prepare() { - default - - [[ ${PV} == "9999" ]] && eautoreconf - elibtoolize - - # don't let python README kill main README #60043 - mv python/README{,.python} || die -} - -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 - prune_libtool_files -} diff --git a/sys-apps/file/file-5.33-r3.ebuild b/sys-apps/file/file-5.33-r3.ebuild new file mode 100644 index 000000000000..e9203f385ff5 --- /dev/null +++ b/sys-apps/file/file-5.33-r3.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy ) +DISTUTILS_OPTIONAL=1 + +inherit distutils-r1 libtool ltprune 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 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~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="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-2018-10360.patch + "${FILESDIR}"/${P}-gl_VISIBILITY-macro.patch +) + +src_prepare() { + default + + # We are patching configure script so fix timestamp to avoid autoreconf + touch -r compile configure + + [[ ${PV} == "9999" ]] && eautoreconf + elibtoolize + + # don't let python README kill main README #60043 + mv python/README{,.python} || die +} + +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 + prune_libtool_files +} diff --git a/sys-apps/file/file-9999.ebuild b/sys-apps/file/file-9999.ebuild index 72de11bc5919..eb7620e857d8 100644 --- a/sys-apps/file/file-9999.ebuild +++ b/sys-apps/file/file-9999.ebuild @@ -3,7 +3,7 @@ EAPI=6 -PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy ) +PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} pypy ) DISTUTILS_OPTIONAL=1 inherit distutils-r1 libtool ltprune toolchain-funcs multilib-minimal diff --git a/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch b/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch new file mode 100644 index 000000000000..cef3cb5518bb --- /dev/null +++ b/sys-apps/file/files/file-5.33-gl_VISIBILITY-macro.patch @@ -0,0 +1,116 @@ +https://bugs.gentoo.org/661508 + +--- a/configure ++++ b/configure +@@ -638,6 +638,8 @@ + IS_CROSS_COMPILE_FALSE + IS_CROSS_COMPILE_TRUE + LIBOBJS ++HAVE_VISIBILITY ++CFLAG_VISIBILITY + OTOOL64 + OTOOL + LIPO +@@ -12512,7 +12519,92 @@ + # Only expand once: + + +-gl_VISIBILITY ++ ++ ++ CFLAG_VISIBILITY= ++ HAVE_VISIBILITY=0 ++ if test -n "$GCC"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 ++$as_echo_n "checking whether the -Werror option is usable... " >&6; } ++ if ${gl_cv_cc_vis_werror+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ gl_save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -Werror" ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_cc_vis_werror=yes ++else ++ gl_cv_cc_vis_werror=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS="$gl_save_CFLAGS" ++fi ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 ++$as_echo "$gl_cv_cc_vis_werror" >&6; } ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 ++$as_echo_n "checking for simple visibility declarations... " >&6; } ++ if ${gl_cv_cc_visibility+:} false; then : ++ $as_echo_n "(cached) " >&6 ++else ++ ++ gl_save_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -fvisibility=hidden" ++ if test $gl_cv_cc_vis_werror = yes; then ++ CFLAGS="$CFLAGS -Werror" ++ fi ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++extern __attribute__((__visibility__("hidden"))) int hiddenvar; ++ extern __attribute__((__visibility__("default"))) int exportedvar; ++ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); ++ extern __attribute__((__visibility__("default"))) int exportedfunc (void); ++ void dummyfunc (void) {} ++ ++int ++main () ++{ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ gl_cv_cc_visibility=yes ++else ++ gl_cv_cc_visibility=no ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS="$gl_save_CFLAGS" ++fi ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 ++$as_echo "$gl_cv_cc_visibility" >&6; } ++ if test $gl_cv_cc_visibility = yes; then ++ CFLAG_VISIBILITY="-fvisibility=hidden" ++ HAVE_VISIBILITY=1 ++ fi ++ fi ++ ++ ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_VISIBILITY $HAVE_VISIBILITY ++_ACEOF ++ ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 + $as_echo_n "checking for ANSI C header files... " >&6; } + if ${ac_cv_header_stdc+:} false; then : +@@ -16194,7 +16286,7 @@ + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` +- test -z "am__include" && continue ++ test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the -- cgit v1.2.3