From b01620a0be615b78784bdc090335c5c559bcd3e3 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Wed, 11 Jan 2017 11:45:20 +0100 Subject: dev-lang/python: add security bump 2.7.12 Package-Manager: portage-2.2.28-prefix --- dev-lang/python/Manifest | 3 + dev-lang/python/python-2.7.12.ebuild | 621 +++++++++++++++++++++++++++++++++++ 2 files changed, 624 insertions(+) create mode 100644 dev-lang/python/python-2.7.12.ebuild (limited to 'dev-lang') diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest index b92d486bdc..11fbfa8fc1 100644 --- a/dev-lang/python/Manifest +++ b/dev-lang/python/Manifest @@ -1,11 +1,14 @@ DIST 7be648659ef46f33db6913ca0ca5a809219d5629.zip 9173 SHA256 39e2c7367357110d4bc89a5ba515cd0f419a22e45f0ffda73db6b676ac28b718 SHA512 b1c654c852baf7891b834124607115cfaf3f1b8b7a58a9c3e8e46dd5b2f608d05d27e8a6222cc98ed83634bcfdcbbddcb888070d079cc8438db7e52320f113f9 DIST 8ee84829be03c2a1aa74f0f095c994c1f43f4688.zip 14239 SHA256 811b6fe82630a04a44a6d16074af76964e7e4005136ba479647eb741639099da SHA512 2f3ada7ff2bd97f90e3b972b681624ddf45c6d1db8d5e89f1313b4693db240a3c4e27c84bd2cf8ff71d5fb276b381ca6a3b8a6945f8db53ff3496cc4cc0b1d62 DIST Python-2.7.11.tar.xz 12277476 SHA256 962b4c45af50124ea61f11a30deb4342fc0bc21126790fa1d7f6c79809413f46 SHA512 72166763a2fe6aab45ecf378f55a1efc7322d1742c4638bae84f4ed4b9fb4c01f2a0293733c64426ae2c70df24d95ff2b1e2a4f3c2715de00d8f320d4d939ea0 WHIRLPOOL 7ebcff7a2fe775a21a3847dee10369b73aaea8685eb63b4bc33dab0f562b8fb984c398cb34e8158cf1e24f106002829649540aad30a5ec7f4de0018ce7449f69 +DIST Python-2.7.12.tar.xz 12390820 SHA256 d7837121dd5652a05fef807c361909d255d173280c4e1a4ded94d73d80a1f978 SHA512 6ddbbce47cc49597433d98ca05c2f62f07ed1070807b645602a8e9e9b996adc6fa66fa20a33cd7d23d4e7e925e25071d7301d288149fbe4e8c5f06d5438dda1f WHIRLPOOL fe4224f4c3dc8dc5c49005051da0069922c86f39880a0072c09fac422e1913d924ac695e22be11603a961329dd8c17b1cf7696b31b62ef93398e42745a6446d6 DIST Python-3.4.3.tar.xz 14421964 SHA256 b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8 SHA512 55b2d7c07da8ad3a3971b4687da2e45809c6f1474732e93b0432f121f287d0b63ad8a9bf381987ea70f47a03d9474c3e55b7d86d14800bf7ef29b3324d8d35b9 WHIRLPOOL f851dedc6a1ea35adec83d60784a5fbcd9dfcf6aa8858bb5ada114fa2ff55add1fbf323ab94ec039ecdedb26d59e8f2e6e171cd9fc1ed41ad9cfa434a555cff3 DIST Python-3.5.1.tar.xz 14830408 SHA256 c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9 SHA512 261c9e42ae351853c718707a8887817e308b3ba7a37e9463a0bc8f50ee9be9ac1a011b2891f8877ecdb40beab99279bcfa8e04f813b8998fcf6cefb7fd52d850 WHIRLPOOL 7ff4ddb852c74f75d1f327e418f5af09ae66403cc3fb2431ab31786c046cec2d761ee57e8c6674a92bb08f95cfff7c7c7d5ddd965994096a0380fbd6b55fcc8f DIST python-gentoo-patches-2.7.11-0.tar.xz 12916 SHA256 e14b47bb1fd64d366d7dfb8339cc2cbf4a53fc288b11dd83f575eb36a8a6408d SHA512 f0447bb699a163afc08df39b111394377539935546ae23732d7239e78d2bff0c04bc94949f86aef0c1be83736127dbd25c2c531e49befed2d638c3cd4940ac52 WHIRLPOOL 305992849d9d244da1e308e739c9bf62a3ef5c74eb65c765bdc666fb5767eb16c7a609f7c442c17da17f76c3ab81e4b09fa8c21e43f89366539a6a9d656bea77 +DIST python-gentoo-patches-2.7.12-0.tar.xz 13576 SHA256 cd842eec7202df57c153adc1fbb81e70b26ef651f8e9346e065d8577b93f343b SHA512 8bf530fca15c47fa5d9bc958e433b35943a12c98e4172806a45aa60dc85ec92f8ab6ffcd90f752dc5bf8ffc711414894c15820c4b6ef72dbcedc2808119fb1f6 WHIRLPOOL 54b8ca6a4371d460dadccfdffcc096c12930d58714eef95117a658d7a1337ea89c45c69553b5b993017211faaa0f8d670e09a8452e53c0fb176be3e908524ee6 DIST python-gentoo-patches-3.4.3-0.tar.xz 11736 SHA256 917a9d98d40a91379c81ea57922a8632ba3c6f6db6f304ed6262bc88c5044946 SHA512 7ad1b30cf8bb7900fe518ed71e4ee55dd92ce7e23ae583a1f2f851b26cfa8c4f4271d28f418e780f3725a48d4ca8eeb8fd083f850810c66c29fb08c430828d72 WHIRLPOOL 074e8c0055b49a028eebda21d1acfb8a25ec968eb8b350c2bed37e042f9f354871e413db13e0ef2fe41d7e56d647178a7b3622019f36c4819c2c68f088366eb1 DIST python-gentoo-patches-3.5.1-0.tar.xz 11788 SHA256 668fabdb9326ba3df81dd299619d5245b7806934e9341ef89a06f90c9a98018b SHA512 3948af801e3e70b55b15165d6cc56fb33cdb9fcc9d80b913550c8609273bad28db0c10ec64cb14d010b80020716a1e45d720e08864f6ac850291cb1713800a1a WHIRLPOOL 2fd3b25186c26412dc642f76228d8e75f24cdc7452407dd105f027be5841b1b865f6b5b74a0072a0299153e5d5af699542253b366e4eb78dfbf114ad02b14bcc DIST python-prefix-2.7.11-gentoo-patches-r1.tar.xz 17268 SHA256 ecebc430e475030fdbfcd940f314f80ebcb8c6e01a6b2498478bb8f37e525484 SHA512 22218128ff83856dd042ecd6aab3615282ab29c4420e6cce4a0bba8b6508e3f5649c27cdf50cf342fffd3c87ea29f8b7d32d28b9b1f4dc200771b52ee41f27e5 WHIRLPOOL 2a942b39e56955df5b24f50d68a39ca78152e10f13ccc856340cd4651eb87847097ec3ff79efde81c2130b12f2885764194fb8d51c05278f4acc550bcd4ba032 +DIST python-prefix-2.7.12-gentoo-patches-r0.tar.xz 17380 SHA256 c488011046a678eaf2febe3d02726a0efbd2f8378a0c5b896b03bcbed5b5f00a SHA512 ef17c8e8083da0ed0e6a63c96f59cc1243b0376fc6d4d7fcecb165e557403c54ae87625ed6dfe4d7d73693f8220ec98ef8a3f16124d8022dbac6a3a9d5514d9c WHIRLPOOL 7e427be36a8d558193058d7112f704993474eff7bb554b6f2f0d9cfe085c653a9cf0522a33249a92e813fad667a53439c9f70d74bcde0df9f78824bfbbfaae46 DIST python-prefix-3.4.3-gentoo-patches-r1.tar.xz 12896 SHA256 39da669913d8627a74e6d9a7e1ee6eae3e184d7525097090d4b05a71b0a79100 SHA512 dd1082ef9605fdcb84bcc769318be6934c889a5b6134971fb121b3be8301cb9519fb687841a359c65e0614d05a8c27eab4b3dbfe94ed8dbbf2fc64f82206a6d9 WHIRLPOOL 884f0e9e5e177543c74f3c3e87629113db6c53c556f55bf7310de79f101fa825472d886eea216cea471e981dc4fd6743622e1c7472b5ffe04eda4c6790d73c62 DIST python-prefix-3.5.1-gentoo-patches-r2.tar.xz 12680 SHA256 73b1166eded9867b473c90171b613d32bbe8f72e523c74b1563a9c25c555e13b SHA512 82b08b8cf7f3620c4c2a6a6c3ed5ec8c3318c6f43e4bcc4950c7aeb56ec755e0e47d46f068843f5b04159583994c8620dab14827278a199789a3867532cc6e0c WHIRLPOOL ac4ea106ca744d6e154e14a53ae2e8eeb119207069ead95d0ef19657a58e1d31ed1933de6315ab61ce532c11d1ae4a999c73d34121028a0a246b7dd2b1ac857a diff --git a/dev-lang/python/python-2.7.12.ebuild b/dev-lang/python/python-2.7.12.ebuild new file mode 100644 index 0000000000..72468a03a8 --- /dev/null +++ b/dev-lang/python/python-2.7.12.ebuild @@ -0,0 +1,621 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +WANT_LIBTOOL="none" + +inherit autotools eutils flag-o-matic multilib pax-utils python-utils-r1 toolchain-funcs multiprocessing + +MY_P="Python-${PV}" +PATCHSET_VERSION="2.7.12-0" +PREFIX_PATCHREV="r0" +CYGWINPORTS_GITREV="7be648659ef46f33db6913ca0ca5a809219d5629" + +DESCRIPTION="An interpreted, interactive, object-oriented programming language" +HOMEPAGE="http://www.python.org/" +SRC_URI="https://www.python.org/ftp/python/${PV}/${MY_P}.tar.xz + https://dev.gentoo.org/~floppym/python/python-gentoo-patches-${PATCHSET_VERSION}.tar.xz + https://dev.gentoo.org/~grobian/distfiles/python-prefix-${PV}-gentoo-patches-${PREFIX_PATCHREV}.tar.xz" + +[[ -n ${CYGWINPORTS_GITREV} ]] && +SRC_URI+=" elibc_Cygwin? ( https://github.com/cygwinports/python/archive/${CYGWINPORTS_GITREV}.zip )" + +LICENSE="PSF-2" +SLOT="2.7" +KEYWORDS="~ppc-aix ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="aqua -berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" + +# Do not add a dependency on dev-lang/python to this ebuild. +# If you need to apply a patch which requires python for bootstrapping, please +# run the bootstrap code on your dev box and include the results in the +# patchset. See bug 447752. + +RDEPEND="app-arch/bzip2:0= + >=sys-libs/zlib-1.1.3:0= + !m68k-mint? ( virtual/libffi ) + virtual/libintl + berkdb? ( || ( + sys-libs/db:5.3 + sys-libs/db:5.2 + sys-libs/db:5.1 + sys-libs/db:5.0 + sys-libs/db:4.8 + sys-libs/db:4.7 + sys-libs/db:4.6 + sys-libs/db:4.5 + sys-libs/db:4.4 + sys-libs/db:4.3 + sys-libs/db:4.2 + ) ) + gdbm? ( sys-libs/gdbm:0=[berkdb] ) + ncurses? ( + >=sys-libs/ncurses-5.2:0= + readline? ( >=sys-libs/readline-4.1:0= ) + ) + sqlite? ( >=dev-db/sqlite-3.3.8:3= ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + tk? ( + >=dev-lang/tcl-8.0:0= + >=dev-lang/tk-8.0:0=[-aqua] + dev-tcltk/blt:0= + dev-tcltk/tix + ) + xml? ( >=dev-libs/expat-2.1 ) + !! /dev/null + rm -f python python-config python${SLOT}-config + # python${SLOT} was created above + for f in pythonw smtpd${SLOT}.py pydoc idle ; do + rm -f ${f} ${f}${SLOT} + done + # pythonw needs to remain in the framework (that's the whole + # reason we go through this framework hassle) + ln -s ../lib/Python.framework/Versions/${SLOT}/bin/pythonw${SLOT} || die + # copy the scripts to we can fix their shebangs + for f in 2to3 pydoc${SLOT} idle${SLOT} python${SLOT}-config ; do + # for some reason sometimes they already exist, bug #347321 + rm -f ${f} + cp "${D}${fwdir}"/Versions/${SLOT}/bin/${f} . || die + sed -i -e '1c\#!'"${EPREFIX}"'/usr/bin/python'"${SLOT}" \ + ${f} || die + done + # "fix" to have below collision fix not to bail + mv pydoc${SLOT} pydoc || die + mv idle${SLOT} idle || die + popd > /dev/null + + # basically we don't like the framework stuff at all, so just move + # stuff around or add some symlinks to make our life easier + mkdir -p "${ED}"/usr + mv "${D}${fwdir}"/Versions/${SLOT}/share \ + "${ED}"/usr/ || die "can't move share" + # get includes just UNIX style + mkdir -p "${ED}"/usr/include + mv "${D}${fwdir}"/Versions/${SLOT}/include/python${SLOT} \ + "${ED}"/usr/include/ || die "can't move include" + pushd "${D}${fwdir}"/Versions/${SLOT}/include > /dev/null + ln -s ../../../../../include/python${SLOT} || die + popd > /dev/null + rm -f "${ED}"/usr/share/man/man1/python{,2}.1 + + # same for libs + # NOTE: can't symlink the entire dir, because a real dir already exists + # on upgrade (site-packages), however since we h4x0rzed python to + # actually look into the UNIX-style dir, we just switch them around. + mkdir -p "${ED}"/usr/$(get_libdir)/python${SLOT} + mv "${D}${fwdir}"/Versions/${SLOT}/lib/python${SLOT}/* \ + "${ED}"/usr/$(get_libdir)/python${SLOT}/ \ + || die "can't move python${SLOT}" + rmdir "${D}${fwdir}"/Versions/${SLOT}/lib/python${SLOT} || die + pushd "${D}${fwdir}"/Versions/${SLOT}/lib > /dev/null + ln -s ../../../../python${SLOT} || die + popd > /dev/null + + # fix up Makefile + sed -i \ + -e '/^LINKFORSHARED=/s/-u _PyMac_Error.*$//' \ + -e '/^LDFLAGS=/s/=.*$/=/' \ + -e '/^prefix=/s:=.*$:= '"${EPREFIX}"'/usr:' \ + -e '/^PYTHONFRAMEWORK=/s/=.*$/=/' \ + -e '/^PYTHONFRAMEWORKDIR=/s/=.*$/= no-framework/' \ + -e '/^PYTHONFRAMEWORKPREFIX=/s/=.*$/=/' \ + -e '/^PYTHONFRAMEWORKINSTALLDIR=/s/=.*$/=/' \ + -e '/^LDLIBRARY=/s:=.*$:libpython$(VERSION).dylib:' \ + "${libdir}"/config/Makefile || die + # and sysconfigdata likewise + sed -i \ + -e "/'LINKFORSHARED'/s/-u _PyMac_Error[^']*'/'/" \ + -e "/'LDFLAGS'/s/:.*$/:'',/" \ + -e "/'prefix'/s|:.*$|:'${EPREFIX}/usr',|" \ + -e "/'PYTHONFRAMEWORK'/s/:.*$/:'',/" \ + -e "/'PYTHONFRAMEWORKDIR'/s/:.*$/:'no-framework',/" \ + -e "/'PYTHONFRAMEWORKPREFIX'/s/:.*$/:'',/" \ + -e "/'PYTHONFRAMEWORKINSTALLDIR'/s/:.*$/:'',/" \ + -e "/'LDLIBRARY'/s|:.*$|:'libpython${SLOT}.dylib',|" \ + "${libdir}"/_sysconfigdata.py || die + + # add missing version.plist file + mkdir -p "${D}${fwdir}"/Versions/${SLOT}/Resources + cat > "${D}${fwdir}"/Versions/${SLOT}/Resources/version.plist << EOF + + + + + BuildVersion + 1 + CFBundleShortVersionString + ${PV} + CFBundleVersion + ${PV} + ProjectName + Python + SourceVersion + ${PV} + + +EOF + else + emake DESTDIR="${D}" altinstall + fi + + sed -e "s/\(LDFLAGS=\).*/\1/" -i "${libdir}/config/Makefile" || die "sed failed" + if [[ ${CHOST} == *-aix* ]]; then + # fix upstream bugs with quite large proposed diffs still to be sorted out: + # http://bugs.python.org/issue13493 + # http://bugs.python.org/issue14150 + # http://bugs.python.org/issue15590 + # http://bugs.python.org/issue16189 + sed -e "/Libs:/s|\$| -Wl,-bE:${EPREFIX}/${libdir#$ED}/config/python.exp -lld|" \ + -i "${ED}"usr/$(get_libdir)/pkgconfig/python-${SLOT}.pc || die "sed failed" + sed -e "s|:Modules/python.exp|:${EPREFIX}/${libdir#$ED}/config/python.exp|" \ + -e 's| -bI:| -Wl,-bI:|g' \ + -e '/LINKFORSHARED/s|-bE:|-bI:|g' \ + -e '/LINKFORSHARED/s| -lld||g' \ + -i "${libdir}"/{_sysconfigdata.py,config/Makefile} || die "sed failed" + fi + + # Fix collisions between different slots of Python. + mv "${ED}usr/bin/2to3" "${ED}usr/bin/2to3-${SLOT}" + mv "${ED}usr/bin/pydoc" "${ED}usr/bin/pydoc${SLOT}" + mv "${ED}usr/bin/idle" "${ED}usr/bin/idle${SLOT}" + rm -f "${ED}usr/bin/smtpd.py" + + # http://src.opensolaris.org/source/xref/jds/spec-files/trunk/SUNWPython.spec + # These #defines cause problems when building c99 compliant python modules + # http://bugs.python.org/issue1759169 + [[ ${CHOST} == *-solaris* ]] && sed -i -e \ + 's:^\(^#define \(_POSIX_C_SOURCE\|_XOPEN_SOURCE\|_XOPEN_SOURCE_EXTENDED\).*$\):/* \1 */:' \ + "${ED}"/usr/include/python${SLOT}/pyconfig.h + + use berkdb || rm -r "${libdir}/"{bsddb,dbhash.py,test/test_bsddb*} || die + use sqlite || rm -r "${libdir}/"{sqlite3,test/test_sqlite*} || die + use tk || rm -r "${ED}usr/bin/idle${SLOT}" "${libdir}/"{idlelib,lib-tk} || die + use elibc_uclibc && rm -fr "${libdir}/"{bsddb/test,test} + + use threads || rm -r "${libdir}/multiprocessing" || die + use wininst || rm -r "${libdir}/distutils/command/"wininst-*.exe || die + + dodoc "${S}"/Misc/{ACKS,HISTORY,NEWS} + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins -r "${S}"/Tools + fi + insinto /usr/share/gdb/auto-load/usr/$(get_libdir) #443510 + local libname + if use aqua ; then + # we do framework, so the emake trick below returns a pathname + # since that won't work here, use a (cheap) trick instead + libname=libpython${SLOT} + else + libname=$(printf 'e:\n\t@echo $(INSTSONAME)\ninclude Makefile\n' | \ + emake --no-print-directory -s -f - 2>/dev/null) + fi + newins "${S}"/Tools/gdb/libpython.py "${libname}"-gdb.py + + newconfd "${FILESDIR}/pydoc.conf" pydoc-${SLOT} + newinitd "${FILESDIR}/pydoc.init" pydoc-${SLOT} + sed \ + -e "s:@PYDOC_PORT_VARIABLE@:PYDOC${SLOT/./_}_PORT:" \ + -e "s:@PYDOC@:pydoc${SLOT}:" \ + -i "${ED}etc/conf.d/pydoc-${SLOT}" "${ED}etc/init.d/pydoc-${SLOT}" || die "sed failed" + + # for python-exec + local vars=( EPYTHON PYTHON_SITEDIR PYTHON_SCRIPTDIR ) + + # if not using a cross-compiler, use the fresh binary + if ! tc-is-cross-compiler; then + local -x PYTHON=./python$(sed -n '/BUILDEXE=/s/^.*=\s\+//p' Makefile) + local -x LD_LIBRARY_PATH=${LD_LIBRARY_PATH+${LD_LIBRARY_PATH}:}. + local -x DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH+${DYLD_LIBRARY_PATH}:}. + else + vars=( PYTHON "${vars[@]}" ) + fi + + python_export "python${SLOT}" "${vars[@]}" + echo "EPYTHON='${EPYTHON}'" > epython.py || die + python_domodule epython.py + + # python-exec wrapping support + local pymajor=${SLOT%.*} + mkdir -p "${D}${PYTHON_SCRIPTDIR}" || die + # python and pythonX + ln -s "../../../bin/python${SLOT}" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}" || die + ln -s "python${pymajor}" \ + "${D}${PYTHON_SCRIPTDIR}/python" || die + # python-config and pythonX-config + ln -s "../../../bin/python${SLOT}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python${pymajor}-config" || die + ln -s "python${pymajor}-config" \ + "${D}${PYTHON_SCRIPTDIR}/python-config" || die + # 2to3, pydoc, pyvenv + ln -s "../../../bin/2to3-${SLOT}" \ + "${D}${PYTHON_SCRIPTDIR}/2to3" || die + ln -s "../../../bin/pydoc${SLOT}" \ + "${D}${PYTHON_SCRIPTDIR}/pydoc" || die + # idle + if use tk; then + ln -s "../../../bin/idle${SLOT}" \ + "${D}${PYTHON_SCRIPTDIR}/idle" || die + fi +} + +eselect_python_update() { + if [[ -z "$(eselect python show)" || ! -f "${EROOT}usr/bin/$(eselect python show)" ]]; then + eselect python update + fi + + if [[ -z "$(eselect python show --python${PV%%.*})" || ! -f "${EROOT}usr/bin/$(eselect python show --python${PV%%.*})" ]]; then + eselect python update --python${PV%%.*} + fi +} + +pkg_postinst() { + eselect_python_update +} + +pkg_postrm() { + eselect_python_update +} -- cgit v1.2.3-18-g5258