diff -uNr a/app-admin/eselect/Manifest b/app-admin/eselect/Manifest --- a/app-admin/eselect/Manifest false +++ b/app-admin/eselect/Manifest 621131061ad9525e3a35d4386c2efe5778a62efbecfe15d72e0a3250ea6d428bb51f61f07e103eebff9948c90a1e5835f33b7b673eac20252f49c02aafc47ed4 @@ -0,0 +1,3 @@ +DIST eselect-1.4.12.tar.xz 177520 BLAKE2B 0938fe9bd8785fe711edc1af63a9c318a4a5fe9141c61d7f1c4da0352242322f1e18e4f68f7e219a1aa2beae5b25ddac58d7c47d4272408fd8fe5207324ef7c7 SHA512 2ea182364dfb2333112e9eebe691e1963e95a4c9ab40945eb2e5bc8c81da76105c1ae6aa3d153b78dea6c1e0cadb9b0237f7556b8ceb9d48e0fba67a642d6081 +EBUILD eselect-1.4.12.ebuild 1634 BLAKE2B e28298f0caa8e8751385c546d23bebbcf6839481a43a3752c5b1e35e7d62822dbf961c58f8c81b5d7eab01cfbb0ddecf88697670c2c6003ab73906078270b3d9 SHA512 22e4238d5ed8f6229236bdcd3cb6186a1fe80bbf5b51a356392d382fbe83839a5287bf212603214dbd2f40e155dc647c3a4fd366676a707339b4550c0223d8a9 +MISC metadata.xml 272 BLAKE2B 68f9c1edf77cdf1dc46891129ed694307cab4e954c6cb002c3fc32fba216949c83a21dc0618f4bf24fd8e1da5558043709210e6697fda3881adeb69a30eb569f SHA512 55cba722900834986e0ea0c9cd8463c3b69d3ada26227d45c8cc3aa07f6ca40919457f80b03a559a8f9ad55636d931cc2101b928b438aeca19b0531c90ec40a3 diff -uNr a/app-admin/eselect/eselect-1.4.12.ebuild b/app-admin/eselect/eselect-1.4.12.ebuild --- a/app-admin/eselect/eselect-1.4.12.ebuild false +++ b/app-admin/eselect/eselect-1.4.12.ebuild 6021df7c4bb17431b5f0d45210b260eb3a1d9afc5a996c12eb9a575b6d0d25ce2fac86bfa7cad37d4039c947034126267db4a066c2c543bb5893e9928e37fa19 @@ -0,0 +1,61 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit bash-completion-r1 + +DESCRIPTION="Gentoo's multi-purpose configuration and management tool" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Eselect" +SRC_URI="https://dev.gentoo.org/~ulm/eselect/${P}.tar.xz" + +LICENSE="GPL-2+ || ( GPL-2+ CC-BY-SA-3.0 )" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="doc emacs vim-syntax" + +RDEPEND="sys-apps/sed + || ( + sys-apps/coreutils + sys-freebsd/freebsd-bin + app-misc/realpath + )" +DEPEND="${RDEPEND} + doc? ( dev-python/docutils )" +RDEPEND="${RDEPEND} + sys-apps/file + sys-libs/ncurses:0" + +PDEPEND="emacs? ( app-emacs/eselect-mode ) + vim-syntax? ( app-vim/eselect-syntax )" + +src_compile() { + emake + use doc && emake html +} + +src_install() { + emake DESTDIR="${D}" install + newbashcomp misc/${PN}.bashcomp ${PN} + dodoc AUTHORS ChangeLog NEWS README TODO doc/*.txt + if use doc; then + docinto html + dodoc *.html doc/*.html doc/*.css + fi + + # needed by news module + keepdir /var/lib/gentoo/news + if ! use prefix; then + fowners root:portage /var/lib/gentoo/news + fperms g+w /var/lib/gentoo/news + fi +} + +pkg_postinst() { + # fowners in src_install doesn't work for the portage group: + # merging changes the group back to root + if ! use prefix; then + chgrp portage "${EROOT}/var/lib/gentoo/news" \ + && chmod g+w "${EROOT}/var/lib/gentoo/news" + fi +} diff -uNr a/app-admin/eselect/metadata.xml b/app-admin/eselect/metadata.xml --- a/app-admin/eselect/metadata.xml false +++ b/app-admin/eselect/metadata.xml 8b1c662f9688a88e1bd6aa61990775753feff9b658aa40ed3f27f2f0e38175bff1ebafa07caf4a6402391628cfc8fb6c50479af0b4a34dea896a9195f86c3b7d @@ -0,0 +1,8 @@ + + + + + eselect@gentoo.org + eselect configuration and management tool + + diff -uNr a/app-admin/metalog/Manifest b/app-admin/metalog/Manifest --- a/app-admin/metalog/Manifest false +++ b/app-admin/metalog/Manifest 2934cd6e502b8aae5fde0cae564fa473c3df3c919de63ce4aa30365efb360def0303c5a091a7e0143832781c7115b72d2fcf65b3c47a035ab07647ed49979946 @@ -0,0 +1,8 @@ +AUX consolelog.sh 269 BLAKE2B 83aefc979d30847eb2d0b588232361cf129dec5a01ff8fafea7dd14daf4e2376c7381ce43e715e1093f13083d0e42cb037fcd65ae83f13b964c946f147e42cb9 SHA512 4cbf2145480d67b46db8a291137f5d953ce07d5d35b7c011e3dec13e4e5ab729f81666884c23db568065cb0b16fddba7178570c04777428861107aeb7c48f332 +AUX metalog-0.9-metalog-conf.patch 269 BLAKE2B ed59aa36a7388b4f91be80731fcfda0c806fc8bb90b86ca6357fea949ff6f231b42b37fdf2f044541c07fbbc4b0a67db4d6dcdcb18c9cd5091e2c3106bb4fc34 SHA512 0c95e8461e89d9469452d2ef66fa52f469b61578b12a6c72adb73e48807f998f8fb58cf0b3f1bc5caa38296fd59c8f8d1fc209beec81790387816d1c497a07df +AUX metalog.confd 393 BLAKE2B 326653a23ff4e6bc78a4ddebf8af7c517f7b67973063ce1ac642195c7566667c7a330a4113acdd451522c907aa0814195ed5124aa92184bfca08eddc670b2d3f SHA512 4fea6b7f48e55d5f69a9c9a69f54623bb9d515e2fd2eda6829f8b769eec85e3de448eb42feb6bf65645400480169b3d70d56dff090103cfc95a3810515c42b2e +AUX metalog.initd 701 BLAKE2B 9cb211b887b7294a11649710d45c104603fa9b9c27469f33c20613b58d0eede015cc7faa7d489530150bacc9ae5c4f4ecdee69ac2a9fbd4eb7157296413d0594 SHA512 45eb2f4c5a99723ac24bdb90726a81efef422aab7c991d1502a0bb728a4138cda74b2f8efb4cc70f1375b21b92039639e8bd5ab01af310991a81fce668f6f096 +AUX metalog.service-r1 153 BLAKE2B 0353f6c1983b7146ce6471be82540aeb87d930e5c9f7334a4133754c52c2c8770c04a9eeb6f9f20ecc41359b1eae135e525d2dbde2471f2d973bb751690703d7 SHA512 72076f6aeab9975dedd824ea1d48b96f6a964d06f529923d4f7a1280a1123a63c0e958f74c6a1417c6362487a69d165bf3eb6c417aae3887ff43ae726f5a30d8 +DIST metalog-3.tar.xz 360784 BLAKE2B 951841d423769cd97e14985e15d5a2499ca351e082c0effe28dc16d46db91235b7ef0448fe32d38b2ed5b53011d04b3375dc87c2a859c49bede2ae177ec16954 SHA512 2ac614bb85fe466308c4ced0842fdab5f056eda60e892189a8220719f1e06a72fce3c76842a2ac8c63a6808c20d8b7a7d8676896e14f7f54e40630ecbd21e289 +EBUILD metalog-3-r2.ebuild 1471 BLAKE2B 5da0f4866c405bd0d7073a1d98a8ad9acef166ff67af57c3330aafd68aacc7bc6ae8c81d28e402554ee637d26f5ce3aa14adfcdcb5a4cad3422a44f849e5bdb9 SHA512 91abf5ae5b73cd63246672d6bffe3ecbef91c271556958f7d1488bece9445109030752d5c932050e0413541aa240b3f09afd881f0a7350b58bfcf8dafe76bf70 +MISC metadata.xml 334 BLAKE2B 2d9ae46fcede549cabba6654513afcb6bee8ea22ba48bdc910c7b136e4d27bf6e223db5b13501b275790ecbf4fcbcb4ebf5ac9b6b81c6fa098e2f2c402793b0b SHA512 14ef6878732ffc5d14d1d27cec55ec886e76969e016ce8a009cafffa0b8d4e470c1b0f2480da5aaf0ed885c101b20d5edd7ce333efb9bc6f0bf56462e7260b37 diff -uNr a/app-admin/metalog/files/consolelog.sh b/app-admin/metalog/files/consolelog.sh --- a/app-admin/metalog/files/consolelog.sh false +++ b/app-admin/metalog/files/consolelog.sh c3c532788716377f949037a92fa3abf2d907f1eae2b66929a2b909d3c6dccd0a9b4fecd92a9e40d5d3f191f9d2247516fe554d21cd1d0d0487f187cbfa9db014 @@ -0,0 +1,20 @@ +#!/bin/sh +# consolelog.sh +# For metalog -- log to a console + +set -f + +. /etc/conf.d/metalog +if [ -z "${CONSOLE}" ] ; then + CONSOLE="/dev/console" +fi + +if [ -z "${FORMAT}" ] ; then + FORMAT='$1 [$2] $3' +fi + +for d in ${CONSOLE} ; do + eval echo ${FORMAT} > ${d} +done + +exit 0 diff -uNr a/app-admin/metalog/files/metalog-0.9-metalog-conf.patch b/app-admin/metalog/files/metalog-0.9-metalog-conf.patch --- a/app-admin/metalog/files/metalog-0.9-metalog-conf.patch false +++ b/app-admin/metalog/files/metalog-0.9-metalog-conf.patch abc03d8808f0ec2e960f652cdba6420a4a8ffe7582340a07f01c7d90ab276f306fb84181ca551911a630a1f4dcb3209dc3e91b5d0a7470167a9c4b3108913aba @@ -0,0 +1,11 @@ +--- a/metalog.conf ++++ b/metalog.conf +@@ -21,6 +21,8 @@ + # merely write $@ to some device (your console for messages): + # echo "$@" > /dev/tty10 + # ++# Hint: you can control the consolelog.sh behavior in /etc/conf.d/metalog ++# + #console logging : + # + # facility = "*" diff -uNr a/app-admin/metalog/files/metalog.confd b/app-admin/metalog/files/metalog.confd --- a/app-admin/metalog/files/metalog.confd false +++ b/app-admin/metalog/files/metalog.confd af6754e4cfc12e0992b4d59a0cf408fbf73e5454d64694e43412ba6cdf3c2e6206d3ae5bd84e9ce0edd0b2f0bf9d7fc255ea152273b039f575ac580d9cd6c7ba @@ -0,0 +1,18 @@ +# /etc/conf.d/metalog + +# Some useful options: +# -a Log with buffering +# -s Log without buffering +# See `metalog --help` for more + +METALOG_OPTS="" + + +# Options used by /usr/sbin/consolelog.sh + +# Space delimited list of devices to write "console" messages to +#CONSOLE="/dev/console /dev/tty10" +CONSOLE="/dev/tty10" + +# Format of logging (make sure you use single quotes) +FORMAT='$1 [$2] $3' diff -uNr a/app-admin/metalog/files/metalog.initd b/app-admin/metalog/files/metalog.initd --- a/app-admin/metalog/files/metalog.initd false +++ b/app-admin/metalog/files/metalog.initd 48e1cfd00328b4bb953d2640a8733eebbb7b6748eace9680e36f34142eb061b051f437a8dab4872d0b017e66e9dd850a7dd02b2a72ae269429f963add928343f @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="buffer unbuffer" + +PIDFILE=/var/run/metalog.pid + +depend() { + need localmount + use clock hostname + after bootmisc + provide logger +} + +ssd() { start-stop-daemon --exec /usr/sbin/metalog --pidfile "${PIDFILE}" "$@" ; } + +start() { + ebegin "Starting metalog" + ssd --start -- \ + --daemonize --pidfile="${PIDFILE}" ${METALOG_OPTS} + eend $? +} + +stop() { + ebegin "Stopping metalog" + ssd --stop + eend $? +} + +buffer() { + ebegin "Enabling log buffering" + ssd --signal USR2 + eend $? +} + +unbuffer() { + ebegin "Disabling log buffering" + ssd --signal USR1 + eend $? +} diff -uNr a/app-admin/metalog/files/metalog.service-r1 b/app-admin/metalog/files/metalog.service-r1 --- a/app-admin/metalog/files/metalog.service-r1 false +++ b/app-admin/metalog/files/metalog.service-r1 01b45eef79dfe78c4d4f782806e37dd2ffb24e4588d4ac987db3c9b9b9810213a1bc1537a3830f7f58d26ab940bc1944cda00fca29b9eafc43263a9813cd0033 @@ -0,0 +1,10 @@ +[Unit] +Description=System Logger Daemon + +[Service] +ExecStart=/usr/sbin/metalog +Restart=always + +[Install] +WantedBy=multi-user.target +Alias=syslog.service diff -uNr a/app-admin/metalog/metadata.xml b/app-admin/metalog/metadata.xml --- a/app-admin/metalog/metadata.xml false +++ b/app-admin/metalog/metadata.xml cc4111d6c9dae4f522c9e04c7e82ab58e1cb0d0b29d68b21b5fce046eae317fe8c47347ae63f314d0e2b0f1861e2e194923b0195bda98dbe116d68640294f84d @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + metalog + + diff -uNr a/app-admin/metalog/metalog-3-r2.ebuild b/app-admin/metalog/metalog-3-r2.ebuild --- a/app-admin/metalog/metalog-3-r2.ebuild false +++ b/app-admin/metalog/metalog-3-r2.ebuild f7b30141fe7241cf86dc67fe750fdd00675fe889d4cc730553f52952e44da77a6961e32a4627682f3e7495ee68be1af943f19f66a2a197c8c63a6c5a109a836a @@ -0,0 +1,56 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit eutils systemd + +DESCRIPTION="A highly configurable replacement for syslogd/klogd" +HOMEPAGE="http://metalog.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +IUSE="unicode" + +RDEPEND=">=dev-libs/libpcre-3.4" +DEPEND="${RDEPEND} + virtual/pkgconfig + app-arch/xz-utils" + +PATCHES=( "${FILESDIR}"/${PN}-0.9-metalog-conf.patch ) + +src_configure() { + econf $(use_with unicode) +} + +src_install() { + emake DESTDIR="${D}" install + dodoc AUTHORS ChangeLog README NEWS metalog.conf + + into / + dosbin "${FILESDIR}"/consolelog.sh + + newinitd "${FILESDIR}"/metalog.initd metalog + newconfd "${FILESDIR}"/metalog.confd metalog + systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service" +} + +pkg_preinst() { + if [[ -d "${ROOT}"/etc/metalog ]] && [[ ! -e "${ROOT}"/etc/metalog.conf ]] ; then + mv -f "${ROOT}"/etc/metalog/metalog.conf "${ROOT}"/etc/metalog.conf + rmdir "${ROOT}"/etc/metalog + export MOVED_METALOG_CONF=true + else + export MOVED_METALOG_CONF=false + fi +} + +pkg_postinst() { + if ${MOVED_METALOG_CONF} ; then + ewarn "The default metalog.conf file has been moved" + ewarn "from /etc/metalog/metalog.conf to just" + ewarn "/etc/metalog.conf. If you had a standard" + ewarn "setup, the file has been moved for you." + fi +} diff -uNr a/app-admin/perl-cleaner/Manifest b/app-admin/perl-cleaner/Manifest --- a/app-admin/perl-cleaner/Manifest false +++ b/app-admin/perl-cleaner/Manifest a8d4fa3a1cf574df409c78a23225e49a93a622f1452e87ea443c1e0a839ac5668b954d6d711b6862a5d29b0b80dc755551a8bd14a01159c5713c2537ae51ebd8 @@ -0,0 +1,4 @@ +AUX perl-cleaner-2.20-prefix.patch 4874 BLAKE2B cf598a2e1aa03959ac1f1a799daaf33ceb640e99652da386e4a15e58fd02a06d4462251a347431ca943dad2cd3945942d4a9d3e95bb9cd607bda61c1843018cc SHA512 217ab3c7958e791c7e71ede8763ff98db7479d7eaeaa5fc9b0eb8607ed4a28ee1e7bb648a8e6fbc05913755b6eb0555fb70cd81c9124ebf562119b24ce66cb6f +DIST perl-cleaner-2.25.tar.bz2 7435 BLAKE2B 348f5429874bf7b1db5c9ba5b1479c3d5fbce68fc9ef91aa44dad3325ab2287d4bfda9221063dd643ec3b6df465443bb9a024705ec46f15c50ccd618ef193ce6 SHA512 5ef5682872ce840c0df98de82a6cf622120435f542206a00bb8fe0f9d5e46fb9898a89ab576b08a74b0d69d57a90a930d9f8d7d0b527fa3a928a6e4ddbad6ee9 +EBUILD perl-cleaner-2.25.ebuild 1052 BLAKE2B 9ec3cfc3c17e3ea15805c9587d4120eee87cafbe8664300f7bf1ccf871ceecee63cd5c83fc6c3fd63e4f1750dc0bbc3aa0f786c3b33731f4e8211edd989c40db SHA512 5cf28cf372371dfc165d64ea4fdfc989ea153357ff678b6f97716d7870df4d2a8e0140e33ba02762c62befb0bb647b1b0655e3cdcc0ea9c7f231f9be4b00e04c +MISC metadata.xml 248 BLAKE2B 7e969e31666e369b4b1826230eb9c103e51962ac23701a7d5e49d211d6da6ee2f6a8372d72b3ba454140d2c1fb7ab6d122f011e9c8144e95a9cc11f01d2e6481 SHA512 53fd9b61e8fd7f18f9493861896a34938e5f6ee4efb3d2c71703dfa81587d0943f0d439fac0e0c106966dabba08d6aeb4b0a2ff85addf30d992c9b7c78ab6314 diff -uNr a/app-admin/perl-cleaner/files/perl-cleaner-2.20-prefix.patch b/app-admin/perl-cleaner/files/perl-cleaner-2.20-prefix.patch --- a/app-admin/perl-cleaner/files/perl-cleaner-2.20-prefix.patch false +++ b/app-admin/perl-cleaner/files/perl-cleaner-2.20-prefix.patch 481ca64cf34693ee46d834be4135b08f51afb80129f3e6815f5648cf3bf12e70412b2bc9bf4d9e13d68cf2ec961bad51abf364e3920b75bc0d504e0149d94aab @@ -0,0 +1,111 @@ +add Prefix and Darwin support + +--- perl-cleaner ++++ perl-cleaner +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!@GENTOO_PORTAGE_EPREFIX@/bin/bash + # vim: set et sw=4 sts=4 tw=80: + # Copyright 2005-2014 Gentoo Foundation + # Distributed under the terms of the GNU General Public License v2 +@@ -22,13 +22,13 @@ + PKGS_EXCEPTIONS="dev-lang/perl sys-devel/libperl app-emulation/emul-linux-x86-baselibs" + PKGS_MANUAL="" + +-PKG_DBDIR=/var/db/pkg ++PKG_DBDIR="@GENTOO_PORTAGE_EPREFIX@/var/db/pkg" + + # See bug 504116 for details +-if [ -e /lib/gentoo/functions.sh ]; then +- . /lib/gentoo/functions.sh +-elif [ -e /etc/init.d/functions.sh ]; then +- . /etc/init.d/functions.sh ++if [ -e "@GENTOO_PORTAGE_EPREFIX@/lib/gentoo/functions.sh" ]; then ++ . "@GENTOO_PORTAGE_EPREFIX@/lib/gentoo/functions.sh" ++elif [ -e "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh" ]; then ++ . "@GENTOO_PORTAGE_EPREFIX@/etc/init.d/functions.sh" + else + echo "$0: Unable to find functions.sh" + exit 1 +@@ -157,7 +157,7 @@ + + veinfo 1 "Locating ph files for removal" + eindent "" +- for i in /usr/lib{,64,x32}/perl5 ; do ++ for i in "@GENTOO_PORTAGE_EPREFIX@"/usr/lib{,64,x32}/perl5 ; do + [[ ! -d ${i} ]] && continue + veinfo 4 "...in ${i}" + while IFS= read -r -d $'\0' file ; do +@@ -183,13 +183,13 @@ + veinfo 1 "Pretend. Nothing to do." + return + fi +- pushd /usr/include > /dev/null ++ pushd "@GENTOO_PORTAGE_EPREFIX@"/usr/include > /dev/null + if [[ ${version} =~ ^5.(8|10) ]] ; then + eindent +- veinfo 2 "...in /usr/include" ++ veinfo 2 "...in @GENTOO_PORTAGE_EPREFIX@/usr/include" + h2ph ${option} * 2>/dev/null + for dir in sys arpa netinet bits security asm gnu linux ; do +- veinfo 2 "...in /usr/include/$dir/" ++ veinfo 2 "...in @GENTOO_PORTAGE_EPREFIX@/usr/include/$dir/" + h2ph ${option} -r $dir/* + done + eoutdent +@@ -220,13 +220,16 @@ + veinfo 1 "Locating ebuilds linked against libperl" + fi + ++ local scanelf=scanelf ++ [[ -e "@GENTOO_PORTAGE_EPREFIX@"/usr/lib/libperl.dylib ]] \ ++ && scanelf=scanmacho + if ${LIBPERL} ; then +- if ! type -P scanelf >/dev/null 2>&1; then +- ewarn "scanelf not found! Install app-misc/pax-utils." ++ if ! type -P ${scanelf} >/dev/null 2>&1; then ++ ewarn "${scanelf} not found! Install app-misc/pax-utils." + ewarn "--libperl is disbled." + LIBPERL=false + else +- SONAME="$(scanelf -qBS "$(realpath /usr/lib/libperl.so 2>/dev/null )" | awk '{ print $1 }')" ++ SONAME="$(${scanelf} -qBS "$(realpath "@GENTOO_PORTAGE_EPREFIX@"/usr/lib/libperl.{so,dylib} 2>/dev/null )" | awk '{ print $1 }')" + veinfo 4 SONAME="${SONAME}" + fi + fi +@@ -268,7 +271,7 @@ + while read -r type file ; do + shopt -s extglob + [[ ${type} == obj ]] || [[ ${type} == sym ]] || continue +- [[ ${file} =~ ^/usr/(share|lib(32|64|x32)?)/perl5 ]] || continue ++ [[ ${file} =~ ^"@GENTOO_PORTAGE_EPREFIX@"/usr/(share|lib(32|64|x32)?)/perl5 ]] || continue + file=${file% +(!([[:space:]])) +([[:digit:]])} + shopt -u extglob + if ${FORCE} || outdated_path "${file}" ; then +@@ -302,7 +305,7 @@ + + if ${LIBPERL} ; then + # We assume the broken libs have all bin or lib in their path +- broken_libs="$(scanelf -qBn < <(awk '/^(obj|sym) [^ ]*\/(s?bin|lib(32|64|x32)?)\// && ! /^obj [^ ]*\/usr\/lib\/debug\//{ print $2 }' ${content} ) | grep -o 'libperl\.so\.[0-9.]*' | sort -u )" ++ broken_libs="$(${scanelf} -qBn < <(awk '/^(obj|sym) [^ ]*\/(s?bin|lib(32|64|x32)?)\// && ! /^obj [^ ]*\/usr\/lib\/debug\//{ print $2 }' ${content} ) | grep -o 'libperl\.\(so\|dylib\)\.[0-9.]*' | sort -u )" + if [[ -n "${broken_libs}" ]] ; then + if ${FORCE} || [[ ${broken_libs} != ${SONAME} ]] ; then + PKGS_TO_REMERGE+=" ${CATPKGVER}" +@@ -327,7 +330,7 @@ + exit $? + fi + +- if [[ ${PMS_COMMAND[${PMS_INDEX}]} == emerge && -x /usr/bin/portageq ]] ; then ++ if [[ ${PMS_COMMAND[${PMS_INDEX}]} == emerge && -x "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/portageq ]] ; then + # Filter out --getbinpkg, --getbinpkgonly, --usepkg and --usepkgonly options in EMERGE_DEFAULT_OPTS + emerge_default_opts="" + for option in $(portageq envvar EMERGE_DEFAULT_OPTS ) ; do +@@ -383,7 +386,7 @@ + veinfo 1 "or edited. This script cannot deal with them." + vecho 1 + +- for i in /usr/{share,lib{,32,64,x32}}/perl5 ; do ++ for i in "@GENTOO_PORTAGE_EPREFIX@"/usr/{share,lib{,32,64,x32}}/perl5 ; do + [[ -d $i ]] && perlpath[${#perlpath[*]}]="$(realpath $i 2>/dev/null )" + done + [[ ${#perlpath[*]} == 0 ]] && return diff -uNr a/app-admin/perl-cleaner/metadata.xml b/app-admin/perl-cleaner/metadata.xml --- a/app-admin/perl-cleaner/metadata.xml false +++ b/app-admin/perl-cleaner/metadata.xml 3e8e970ba6c4ad9e864399041ac78d1def6bdc13613fa40ebf87f2b07e6f499221d598b23cfb8ad8533b43c5341908fbfb17047d9e9d19d06672eafdb6daccce @@ -0,0 +1,9 @@ + + + + + perl@gentoo.org + Gentoo Perl Project + + + diff -uNr a/app-admin/perl-cleaner/perl-cleaner-2.25.ebuild b/app-admin/perl-cleaner/perl-cleaner-2.25.ebuild --- a/app-admin/perl-cleaner/perl-cleaner-2.25.ebuild false +++ b/app-admin/perl-cleaner/perl-cleaner-2.25.ebuild e0caaf565005ef7a704d06e0d6cd24d61a6f2b0ffa01f88649013682648e40e150a09e66ea2cf6d16f271e37cd7bb413d99b04ca67714d68fe3731c583379224 @@ -0,0 +1,42 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit prefix + +DESCRIPTION="User land tool for cleaning up old perl installs" +HOMEPAGE="https://www.gentoo.org/proj/en/perl/" + +if [[ "${PV}" == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/gentoo-perl/perl-cleaner.git" +else + SRC_URI="mirror://gentoo/${P}.tar.bz2 https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2" + 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 + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +[[ "${PV}" == "9999" ]] && DEPEND="sys-apps/help2man" + +RDEPEND="app-shells/bash + dev-lang/perl + || ( + ( sys-apps/portage app-portage/portage-utils ) + sys-apps/pkgcore + sys-apps/paludis + ) +" + +src_prepare() { + default + eprefixify ${PN} +} + +src_install() { + dosbin perl-cleaner + doman perl-cleaner.1 +} diff -uNr a/app-admin/sudo/Manifest b/app-admin/sudo/Manifest --- a/app-admin/sudo/Manifest false +++ b/app-admin/sudo/Manifest 780cc6f6f59ba769a5ab8e8071a151998757e253c60650a99e7b1cbc2bf9f36d1ba988f338f2378505d5a8f9eca8869b4355694f6de92bc5b351b48db542446a @@ -0,0 +1,3 @@ +DIST sudo-1.8.22.tar.gz 3029051 BLAKE2B c77e05b6e9cee738902d6289327fb5d34d19833d96597f983d8af01434d224dd698f9257b0965a0e480e8d19eb38eef0c8216942ca5217c3fe7516cdf397f7b7 SHA512 5ce10a9302d25bb726e347499d26a0b3697446cfcdf0fd9094ee35198db7b023d5250a53fdcb4184d1a09f5fd2a78fc645bc8e80f265666b05a91f62f49b0695 +EBUILD sudo-1.8.22-r2.ebuild 6056 BLAKE2B a737eb8863356270e64a60f681cb37bed81de09899cb6edca61e8c1b69653f318212f99e46a6861a6574fbc7ea9b3c7433f6daf636280922ec9350ba185376fb SHA512 64f6f9d83bcf5fc1eb8323b33b5dee9f96f89782a3ba0f7b41c517dbe6eade6524faad5d4b8dac4020b3454a7783ff123e4f2ec99c885f3c0dbf778c3ee29ec8 +MISC metadata.xml 1060 BLAKE2B 9d18c75cd15621433e2391bceaff27f7bafcf9fe39691b62ee040e894055193eb1d68acef48b467244978dcac79bc1bfb20af11952f641eab75104b2350b3d7c SHA512 e229a2df28f8bb87efb05a2980860fc37f8e324633444e26d9eb303397e16ca12e9e17ed6939e8e8044f03ab45eda4cb0401e38fdb9409229fc99a64c6da007e diff -uNr a/app-admin/sudo/metadata.xml b/app-admin/sudo/metadata.xml --- a/app-admin/sudo/metadata.xml false +++ b/app-admin/sudo/metadata.xml 56efe19bc255f5309fe0b2e9ff212563866220adfbcb4cdc65bcf97f173ab7196c9fb8e3f8ab6a9dcdaac0436f2a132aa04616f618014539dd3aca591df5fea1 @@ -0,0 +1,24 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + Sudo (superuser do) allows a system administrator to give certain + users (or groups of users) the ability to run some (or all) + commands as root or another user while logging the commands and + arguments. + + + Use SHA2 from dev-libs/libgcrypt instead of sudo's internal SHA2 + Let sudo print insults when the user types the wrong password + Use SHA2 from dev-libs/openssl instead of sudo's internal SHA2 + Allow sudo to send emails with sendmail + Add System Security Services Daemon support + + + cpe:/a:todd_miller:sudo + + diff -uNr a/app-admin/sudo/sudo-1.8.22-r2.ebuild b/app-admin/sudo/sudo-1.8.22-r2.ebuild --- a/app-admin/sudo/sudo-1.8.22-r2.ebuild false +++ b/app-admin/sudo/sudo-1.8.22-r2.ebuild e9db0d90ac3098d352526eaf06fbc449d4ea5a99d60ebb50d816b461e7cc4769c52569288cf830b3c53eac3e8a71845fa6d78136f0342f2722f47dc189819972 @@ -0,0 +1,228 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils pam multilib libtool + +MY_P=${P/_/} +MY_P=${MY_P/beta/b} + +uri_prefix= +case ${P} in + *_beta*|*_rc*) uri_prefix=beta/ ;; +esac + +DESCRIPTION="Allows users or groups to run commands as other users" +HOMEPAGE="https://www.sudo.ws/" +SRC_URI="https://www.sudo.ws/sudo/dist/${uri_prefix}${MY_P}.tar.gz + ftp://ftp.sudo.ws/pub/sudo/${uri_prefix}${MY_P}.tar.gz" + +# Basic license is ISC-style as-is, some files are released under +# 3-clause BSD license +LICENSE="ISC BSD" +SLOT="0" +if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then + KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~sparc-solaris" +fi +IUSE="gcrypt ldap libressl nls pam offensive openssl sasl selinux +sendmail skey" + +CDEPEND=" + gcrypt? ( dev-libs/libgcrypt:= ) + openssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + pam? ( virtual/pam ) + sasl? ( dev-libs/cyrus-sasl ) + skey? ( >=sys-auth/skey-1.1.5-r1 ) + ldap? ( + >=net-nds/openldap-2.1.30-r1 + dev-libs/cyrus-sasl + ) + sys-libs/zlib +" +RDEPEND=" + ${CDEPEND} + selinux? ( sec-policy/selinux-sudo ) + ldap? ( dev-lang/perl ) + pam? ( sys-auth/pambase ) + >=app-misc/editor-wrapper-3 + virtual/editor + sendmail? ( virtual/mta ) +" +DEPEND=" + ${CDEPEND} + sys-devel/bison +" + +S="${WORKDIR}/${MY_P}" + +REQUIRED_USE=" + pam? ( !skey ) + skey? ( !pam ) + ?? ( gcrypt openssl ) +" + +MAKEOPTS+=" SAMPLES=" + +src_prepare() { + default + elibtoolize +} + +set_rootpath() { + # FIXME: secure_path is a compile time setting. using ROOTPATH + # is not perfect, env-update may invalidate this, but until it + # is available as a sudoers setting this will have to do. + einfo "Setting secure_path ..." + + # first extract the default ROOTPATH from build env + ROOTPATH=$(unset ROOTPATH; . "${EPREFIX}"/etc/profile.env; echo "${ROOTPATH}") + if [[ -z ${ROOTPATH} ]] ; then + ewarn " Failed to find ROOTPATH, please report this" + fi + + # then remove duplicate path entries + cleanpath() { + local newpath thisp IFS=: + for thisp in $1 ; do + if [[ :${newpath}: != *:${thisp}:* ]] ; then + newpath+=:$thisp + else + einfo " Duplicate entry ${thisp} removed..." + fi + done + ROOTPATH=${newpath#:} + } + cleanpath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin${ROOTPATH:+:${ROOTPATH}} + + # finally, strip gcc paths #136027 + rmpath() { + local e newpath thisp IFS=: + for thisp in ${ROOTPATH} ; do + for e ; do [[ $thisp == $e ]] && continue 2 ; done + newpath+=:$thisp + done + ROOTPATH=${newpath#:} + } + rmpath '*/gcc-bin/*' '*/gnat-gcc-bin/*' '*/gnat-gcc/*' + + einfo "... done" +} + +src_configure() { + local ROOTPATH + set_rootpath + + # audit: somebody got to explain me how I can test this before I + # enable it.. - Diego + # plugindir: autoconf code is crappy and does not delay evaluation + # until `make` time, so we have to use a full path here rather than + # basing off other values. + myeconfargs=( + --enable-zlib=system + --with-editor="${EPREFIX}"/usr/libexec/editor + --with-env-editor + --with-plugindir="${EPREFIX}"/usr/$(get_libdir)/sudo + --with-rundir="${EPREFIX}"/var/run/sudo + --with-secure-path="${ROOTPATH}" + --with-vardir="${EPREFIX}"/var/db/sudo + --without-linux-audit + --without-opie + $(use_enable gcrypt) + $(use_enable nls) + $(use_enable openssl) + $(use_enable sasl) + $(use_with offensive insults) + $(use_with offensive all-insults) + $(use_with ldap ldap_conf_file /etc/ldap.conf.sudo) + $(use_with ldap) + $(use_with pam) + $(use_with skey) + $(use_with selinux) + $(use_with sendmail) + ) + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use ldap ; then + dodoc README.LDAP + dosbin plugins/sudoers/sudoers2ldif + + cat <<-EOF > "${T}"/ldap.conf.sudo + # See ldap.conf(5) and README.LDAP for details + # This file should only be readable by root + + # supported directives: host, port, ssl, ldap_version + # uri, binddn, bindpw, sudoers_base, sudoers_debug + # tls_{checkpeer,cacertfile,cacertdir,randfile,ciphers,cert,key} + EOF + + insinto /etc + doins "${T}"/ldap.conf.sudo + fperms 0440 /etc/ldap.conf.sudo + + insinto /etc/openldap/schema + newins doc/schema.OpenLDAP sudo.schema + fi + + pamd_mimic system-auth sudo auth account session + + keepdir /var/db/sudo/lectured + fperms 0700 /var/db/sudo/lectured + fperms 0711 /var/db/sudo #652958 + + # Don't install into /var/run as that is a tmpfs most of the time + # (bug #504854) + rm -rf "${ED}"/var/run +} + +pkg_postinst() { + #652958 + local sudo_db="${EROOT}/var/db/sudo" + if [[ "$(stat -c %a "${sudo_db}")" -ne 711 ]] ; then + chmod 711 "${sudo_db}" || die + fi + + if use ldap ; then + ewarn + ewarn "sudo uses the /etc/ldap.conf.sudo file for ldap configuration." + ewarn + if grep -qs '^[[:space:]]*sudoers:' "${ROOT}"/etc/nsswitch.conf ; then + ewarn "In 1.7 series, LDAP is no more consulted, unless explicitly" + ewarn "configured in /etc/nsswitch.conf." + ewarn + ewarn "To make use of LDAP, add this line to your /etc/nsswitch.conf:" + ewarn " sudoers: ldap files" + ewarn + fi + fi + if use prefix ; then + ewarn + ewarn "To use sudo, you need to change file ownership and permissions" + ewarn "with root privileges, as follows:" + ewarn + ewarn " # chown root:root ${EPREFIX}/usr/bin/sudo" + ewarn " # chown root:root ${EPREFIX}/usr/lib/sudo/sudoers.so" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers" + ewarn " # chown root:root ${EPREFIX}/etc/sudoers.d" + ewarn " # chown root:root ${EPREFIX}/var/db/sudo" + ewarn " # chmod 4111 ${EPREFIX}/usr/bin/sudo" + ewarn + fi + + elog "To use the -A (askpass) option, you need to install a compatible" + elog "password program from the following list. Starred packages will" + elog "automatically register for the use with sudo (but will not force" + elog "the -A option):" + elog "" + elog " [*] net-misc/ssh-askpass-fullscreen" + elog " net-misc/x11-ssh-askpass" + elog "" + elog "You can override the choice by setting the SUDO_ASKPASS environmnent" + elog "variable to the program you want to use." +} diff -uNr a/app-arch/bzip2/Manifest b/app-arch/bzip2/Manifest --- a/app-arch/bzip2/Manifest false +++ b/app-arch/bzip2/Manifest c5b1f70f7f81d8a191d017fb43422cc89a1e1dab393e16888212b77cb83f524cfa8dbd28c157516d88c4ec6e3b030c51b7b30c86430ad5a60fe8f4f0fe17ed5c @@ -0,0 +1,12 @@ +AUX bzip2-1.0.3-no-test.patch 165 BLAKE2B 48f0f9393d1f7e6f56c93ecc53e80ea7507b7ac921e0d459082c9ac51eb98f9e89233c12975c2346b1c7e424e505116df881b1e57207a7ef325e0c55e2ce90ce SHA512 c6064aada01b9eebdaf5350bcc0f9b52dcc03fa8b5e361d5cb09260de0d301c190e406c5daa0edfb808bc2cb5061a4cd5361f920741024b750fa8e7570715e95 +AUX bzip2-1.0.4-POSIX-shell.patch 676 BLAKE2B f6ba04224ad924979221924dc81398455404a18b36754bc104ec67c4aa44e15512e51b84f5247f4737b1e242b5aa1497c76ebfd5cefa05d3ed4cfb2ee53c1781 SHA512 66e02e9422ecee1ae6e8e007eba95581313fcfa5703fa648470ff8975b5453e3d5323a4acf6264658612a6a2972e5c74cce061ce749e51d5e74769d068e4b365 +AUX bzip2-1.0.4-makefile-CFLAGS.patch 577 BLAKE2B adc265fbd71745e1f688c85386e48389c15569263861efa3aaa76a0328d71724fda22a23e95234cc13c90c95536b21e776bebffa79433d4f42e82d44c88588a7 SHA512 031780e77710619eb8c91350885a602b1cc1768e3776e46313a9535df6d8eb9502fa99624d81e5eccdebfaf97786148c3cd10fb2faed69c5a2ba24158915c0cd +AUX bzip2-1.0.4-man-links.patch 402 BLAKE2B 9a3cabc0e3964f75408445d7a2d94422ffa38e22d0869e4f97b252ef2947173ab9a504f0c1cd82fc7479494038f899f4a2429e39729d6f3d80e570ca8ef97797 SHA512 91abd3af9ffb339cbf85e28cc65b9193d8799d81281320d4709e234f3f40483b390fd9517ad3a8aab8d240f011786df8f17e9240104a43d1292bca983c1c22cc +AUX bzip2-1.0.6-CVE-2016-3189.patch 594 BLAKE2B b4a9f6e0267637d1f815e1b8cdbddfdd5e54fcc05cbd2f31c7e64494626b7531f2bb2b5ae8b288ce0ca116abc131235dbf31f32411b58b91e156a136adbc7ad1 SHA512 0b1d5814b93397c588c9b22a7bba57e2a7360ec30a781ca3c9236781089fb8e9f0393a9fd93c880517d084f54712b631302cffa4af81a91dff791717645ec81b +AUX bzip2-1.0.6-mingw.patch 556 BLAKE2B 1885f5fe9a895e365606fd48d616553a23aa40d381ee87de8f725ed39b936e778ab517d00807a3a84120802d23fc5b54df48b3d33bebb18c7f9ba1c9afa961cc SHA512 e28442acc456c996eb6bc1866cd3814a9aea9c8a4ac2767a59bd03273ee95e34efdb4d00a17c64242a3395056b38c7083ec6f4c986e91d02f5348af1af2a35c8 +AUX bzip2-1.0.6-out-of-tree-build.patch 2121 BLAKE2B ff2d18e161e2ed437b3452639b352984e1037bbfa86857d90836994f306ddc375353c36a0afad15c58ad84021f1180bcdd10002c0ce546acc9426a68d263570b SHA512 f4a85c8b9ba0fe0ffadcb058550bb948e84c51f4c213957ffeb1072258efb1caa957c496ce0a0fb4d4b5f7dfdf062995a819487b9475389cfb25583fa061143e +AUX bzip2-1.0.6-progress.patch 5716 BLAKE2B 8f89dcc1f9d95440cba7df54ee80e861e02e8f88d1ad906ef4bcecf4796ec125434b0e4d56f83715f30114d808aad9811b72cc890e85ace1901350d96f9d3f91 SHA512 e72ada256b08b539e4489d714d4d8612c643549cd25b1ec4e455b2c769c0955fe0e1f54504b259db213f3c72aa78c08d1f0513ce1ae113182691b504bd9c09b7 +AUX bzip2-1.0.6-saneso.patch 443 BLAKE2B b496406e6f3c520886fff99c9206d6d1a01dc0e55a8491bec0318741dc53ad6da321553e73c8929c5fb4938e7275671c04d4b5c86730b580a042a18bb81b7116 SHA512 b9798368d12ab3547ccd3bb614e3a81f1b232990c0f9e3e4472532a8070a3c212274d5b9d093cd046cfee7c8d25da9cfd368c7ca4bd86fbb67f34510107159ab +DIST bzip2-1.0.6.tar.gz 782025 BLAKE2B b31533af7c71d715e6600874bb0a11b9b3aebbb08af0414a6d88bd5a2ad879a482ad408338159cb6c241815da8f48798d2ea7789ea971431d0be42ee827b0a7e SHA512 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12 +EBUILD bzip2-1.0.6-r9.ebuild 3055 BLAKE2B c5efbec64d753aff0c0c1e6f3d85304795046583da91dcc2d5947426572f80047fac16f6476b13d9c35d7faffbfde25941c26434d8ab776b787195f263c82ef2 SHA512 9a8cc1ebe60852e1a4c0893531ef90d87f8d82151dbac64e820717c5983947ff068aec05d2907464634d174bb60fc36d95e2bd1ca5406de318237dc7da573625 +MISC metadata.xml 332 BLAKE2B b949c1c7d17334fcb499bbbd042cb217092743b6ae29fc64e634f7957767bf8c6a46f865b1681ce165d60143307795ebc417887fa8ba7a69afee95062411ea07 SHA512 1a7f730b73728875e428e7b123cd8e7773e8ea88a02d6891727775b50196854c608ae541846063a258874a83aab38800dc697b37196fe1c75162abe21b8f92d0 diff -uNr a/app-arch/bzip2/bzip2-1.0.6-r9.ebuild b/app-arch/bzip2/bzip2-1.0.6-r9.ebuild --- a/app-arch/bzip2/bzip2-1.0.6-r9.ebuild false +++ b/app-arch/bzip2/bzip2-1.0.6-r9.ebuild 8b696550a4e8ebafd002556bbd3dc620c793e6d4d1c4dd1533a3e529f96a08e43481e63ebc9c005dace12152c66168524f6af9f57bf82190c8e1a1b19b2b5220 @@ -0,0 +1,116 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly +# (since we're building shared libs) ... + +EAPI=6 + +inherit toolchain-funcs multilib-minimal + +DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux" +HOMEPAGE="http://www.bzip.org/" +SRC_URI="http://www.bzip.org/${PV}/${P}.tar.gz" + +LICENSE="BZIP2" +SLOT="0/1" # subslot = SONAME +KEYWORDS="~alpha amd64 arm arm64 ~hppa ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="static static-libs" + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch + "${FILESDIR}"/${PN}-1.0.6-saneso.patch + "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986 + "${FILESDIR}"/${PN}-1.0.6-progress.patch + "${FILESDIR}"/${PN}-1.0.3-no-test.patch + "${FILESDIR}"/${PN}-1.0.4-POSIX-shell.patch #193365 + "${FILESDIR}"/${PN}-1.0.6-mingw.patch #393573 + "${FILESDIR}"/${PN}-1.0.6-out-of-tree-build.patch + "${FILESDIR}"/${PN}-1.0.6-CVE-2016-3189.patch #620466 +) + +DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf ) +HTML_DOCS=( manual.html ) + +src_prepare() { + default + + # - Use right man path + # - Generate symlinks instead of hardlinks + # - pass custom variables to control libdir + sed -i \ + -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \ + -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \ + -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \ + Makefile || die +} + +bemake() { + emake \ + VPATH="${S}" \ + CC="$(tc-getCC)" \ + AR="$(tc-getAR)" \ + RANLIB="$(tc-getRANLIB)" \ + "$@" +} + +multilib_src_compile() { + bemake -f "${S}"/Makefile-libbz2_so all + # Make sure we link against the shared lib #504648 + ln -s libbz2.so.${PV} libbz2.so || die + bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')" +} + +multilib_src_install() { + into /usr + + # Install the shared lib manually. We install: + # .x.x.x - standard shared lib behavior + # .x.x - SONAME some distros use #338321 + # .x - SONAME Gentoo uses + dolib.so libbz2.so.${PV} + local v + for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do + dosym libbz2.so.${PV} /usr/$(get_libdir)/${v} + done + use static-libs && dolib.a libbz2.a + + if multilib_is_native_abi ; then + gen_usr_ldscript -a bz2 + + dobin bzip2recover + into / + dobin bzip2 + fi +} + +multilib_src_install_all() { + # `make install` doesn't cope with out-of-tree builds, nor with + # installing just non-binaries, so handle things ourselves. + insinto /usr/include + doins bzlib.h + into /usr + dobin bz{diff,grep,more} + doman *.1 + + dosym bzdiff /usr/bin/bzcmp + dosym bzdiff.1 /usr/share/man/man1/bzcmp.1 + + dosym bzmore /usr/bin/bzless + dosym bzmore.1 /usr/share/man/man1/bzless.1 + + local x + for x in bunzip2 bzcat bzip2recover ; do + dosym bzip2.1 /usr/share/man/man1/${x}.1 + done + for x in bz{e,f}grep ; do + dosym bzgrep /usr/bin/${x} + dosym bzgrep.1 /usr/share/man/man1/${x}.1 + done + + einstalldocs + + # move "important" bzip2 binaries to /bin and use the shared libbz2.so + dosym bzip2 /bin/bzcat + dosym bzip2 /bin/bunzip2 +} diff -uNr a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch --- a/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.3-no-test.patch 0c01ec63b5e908dc4fa0375b0e4b692530bd7f8824dd6ea289fa57ff260024dde0ee265f240f8facb11d9920f0ea522077b3ab8530c395ed24abf5b3905913f5 @@ -0,0 +1,9 @@ +--- a/Makefile ++++ b/Makefile +@@ -23,5 +23,5 @@ + bzlib.o + +-all: libbz2.a bzip2 bzip2recover test ++all: libbz2.a bzip2 bzip2recover + + bzip2: libbz2.a bzip2.o diff -uNr a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch --- a/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.4-POSIX-shell.patch b5f7bc081efe41d9a4aa5fa5121d0e2319130c61fe162790bcadf2794a8416358746cb28147e66bc19ccf03ebe61f663badc6cf0946e05fcb30facb04e94c3ce @@ -0,0 +1,21 @@ +bzgrep uses !/bin/sh but then uses the bashism ${var//} so replace those +with calls to sed so POSIX shells work + +http://bugs.gentoo.org/193365 + +--- a/bzgrep ++++ b/bzgrep +@@ -63,10 +63,9 @@ + bzip2 -cdfq "$i" | $grep $opt "$pat" + r=$? + else +- j=${i//\\/\\\\} +- j=${j//|/\\|} +- j=${j//&/\\&} +- j=`printf "%s" "$j" | tr '\n' ' '` ++ # the backslashes here are doubled up as we have to escape each one for the ++ # shell and then escape each one for the sed expression ++ j=`printf "%s" "${i}" | sed -e 's:\\\\:\\\\\\\\:g' -e 's:[|]:\\\\|:g' -e 's:[&]:\\\\&:g' | tr '\n' ' '` + bzip2 -cdfq "$i" | $grep $opt "$pat" | sed "s|^|${j}:|" + r=$? + fi diff -uNr a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch --- a/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.4-makefile-CFLAGS.patch 2b44e442330df28707c743b899fca213b3ac381ade623f686738421c7abc127bcde3da6ec97392b904c0961e6ba0c13de4c671779ec47075c0bc7a78de06b705 @@ -0,0 +1,25 @@ +--- a/Makefile ++++ b/Makefile +@@ -18,10 +18,9 @@ + CC=gcc + AR=ar + RANLIB=ranlib +-LDFLAGS= + + BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) ++CFLAGS+=-Wall -Winline $(BIGFILES) $(CPPFLAGS) + + # Where you want it installed when you do 'make install' + PREFIX=/usr/local +--- a/Makefile-libbz2_so ++++ b/Makefile-libbz2_so +@@ -24,7 +24,7 @@ + SHELL=/bin/sh + CC=gcc + BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) ++CFLAGS+=-fpic -fPIC -Wall -Winline $(BIGFILES) $(CPPFLAGS) + + OBJS= blocksort.o \ + huffman.o \ diff -uNr a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch --- a/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.4-man-links.patch f0eb84bf073d1bdff68664176521dcd57611ca6f9aee64c56ba65a8eab65401b8cc2f8fabf3b165b99d1410aa88361248d6305c4436eed7dfb99ead17cf6f62d @@ -0,0 +1,12 @@ +http://bugs.gentoo.org/172986 + +--- a/Makefile ++++ b/Makefile +@@ -85,4 +85,7 @@ + cp -f bzip2.1 $(PREFIX)/share/man/man1 + chmod a+r $(PREFIX)/share/man/man1/bzip2.1 ++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bunzip2.1 ++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bzcat.1 ++ ln -s -f bzip2.1 $(PREFIX)/share/man/man1/bzip2recover.1 + cp -f bzlib.h $(PREFIX)/include + chmod a+r $(PREFIX)/include/bzlib.h diff -uNr a/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch b/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch --- a/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.6-CVE-2016-3189.patch 6de15f3f53ce40666efc5130bdb379b117efed13ff226b09ebb71a0567214b35f72d58537966833f1e8901087f617976218c5dacc8169fe508a0852a4dd86f75 @@ -0,0 +1,18 @@ +Upstream-Status: Backport +https://bugzilla.suse.com/attachment.cgi?id=681334 + +CVE: CVE-2016-3189 +Signed-off-by: Armin Kuster + +Index: bzip2-1.0.6/bzip2recover.c +=================================================================== +--- a/bzip2recover.c ++++ b/bzip2recover.c +@@ -457,6 +457,7 @@ Int32 main ( Int32 argc, Char** argv ) + bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 ); + bsPutUInt32 ( bsWr, blockCRC ); + bsClose ( bsWr ); ++ outFile = NULL; + } + if (wrBlock >= rbCtr) break; + wrBlock++; diff -uNr a/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch b/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch --- a/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.6-mingw.patch 9ea665c74a3801a663834ab40c6d8f9df07d6fa80ba64f3ab1c6e598ff7c12234b470c674b93650549d0474c54dd851ae2bc8da4e32e741767fa4455b6f34e66 @@ -0,0 +1,27 @@ +make it build for mingw targets + +https://bugs.gentoo.org/393573 + +--- a/bzip2.c ++++ b/bzip2.c +@@ -129,7 +129,7 @@ + #if BZ_LCCWIN32 + # include + # include +-# include ++# include + + # define NORETURN /**/ + # define PATH_SEP '\\' +--- a/bzlib.h ++++ b/bzlib.h +@@ -81,6 +81,9 @@ typedef + /* windows.h define small to char */ + # undef small + # endif ++# ifndef WINAPI ++# define WINAPI ++# endif + # ifdef BZ_EXPORT + # define BZ_API(func) WINAPI func + # define BZ_EXTERN extern diff -uNr a/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch b/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch --- a/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.6-out-of-tree-build.patch c4cf74af81214f1567b8f4ecd71611a4734f8272a4ee4e507bc9f4d4e37761d6c931f6419c3a5d20311694af7891cca930a2905dfa384155e933bfcda6bb3603 @@ -0,0 +1,79 @@ +--- a/Makefile ++++ b/Makefile +@@ -53,7 +53,6 @@ libbz2.a: $(OBJS) + + check: test + test: bzip2 +- @cat words1 + ./bzip2 -1 < sample1.ref > sample1.rb2 + ./bzip2 -2 < sample2.ref > sample2.rb2 + ./bzip2 -3 < sample3.ref > sample3.rb2 +@@ -66,7 +65,6 @@ test: bzip2 + cmp sample1.tst sample1.ref + cmp sample2.tst sample2.ref + cmp sample3.tst sample3.ref +- @cat words3 + + install: bzip2 bzip2recover + if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi +@@ -115,25 +113,8 @@ clean: + sample1.rb2 sample2.rb2 sample3.rb2 \ + sample1.tst sample2.tst sample3.tst + +-blocksort.o: blocksort.c +- @cat words0 +- $(CC) $(CFLAGS) -c blocksort.c +-huffman.o: huffman.c +- $(CC) $(CFLAGS) -c huffman.c +-crctable.o: crctable.c +- $(CC) $(CFLAGS) -c crctable.c +-randtable.o: randtable.c +- $(CC) $(CFLAGS) -c randtable.c +-compress.o: compress.c +- $(CC) $(CFLAGS) -c compress.c +-decompress.o: decompress.c +- $(CC) $(CFLAGS) -c decompress.c +-bzlib.o: bzlib.c +- $(CC) $(CFLAGS) -c bzlib.c +-bzip2.o: bzip2.c +- $(CC) $(CFLAGS) -c bzip2.c +-bzip2recover.o: bzip2recover.c +- $(CC) $(CFLAGS) -c bzip2recover.c ++%.o: %.c ++ $(CC) $(CFLAGS) -c $< + + + distclean: clean +--- a/Makefile-libbz2_so ++++ b/Makefile-libbz2_so +@@ -36,9 +36,7 @@ OBJS= blocksort.o \ + + all: $(OBJS) + $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS) +- $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 +- rm -f libbz2.so.1.0 +- ln -s libbz2.so.1.0.6 libbz2.so.1.0 ++ ln -sf libbz2.so.1.0.6 libbz2.so.1.0 + + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared +@@ -43,17 +43,5 @@ all: $(OBJS) + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared + +-blocksort.o: blocksort.c +- $(CC) $(CFLAGS) -c blocksort.c +-huffman.o: huffman.c +- $(CC) $(CFLAGS) -c huffman.c +-crctable.o: crctable.c +- $(CC) $(CFLAGS) -c crctable.c +-randtable.o: randtable.c +- $(CC) $(CFLAGS) -c randtable.c +-compress.o: compress.c +- $(CC) $(CFLAGS) -c compress.c +-decompress.o: decompress.c +- $(CC) $(CFLAGS) -c decompress.c +-bzlib.o: bzlib.c +- $(CC) $(CFLAGS) -c bzlib.c ++%.o: %.c ++ $(CC) $(CFLAGS) -c $< diff -uNr a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch --- a/app-arch/bzip2/files/bzip2-1.0.6-progress.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.6-progress.patch 914f708bed165a995380f7feb5521c351a57e438584b9f79c9a2e12141e11bc049c77827d2e95b89fd614a28e5078738d20c73bae5ad000d22821769a86306c3 @@ -0,0 +1,163 @@ +Ripped from Mandrake + +http://bugs.gentoo.org/82192 + +--- a/bzip2.1 ++++ b/bzip2.1 +@@ -235,6 +235,10 @@ + Suppress non-essential warning messages. Messages pertaining to + I/O errors and other critical events will not be suppressed. + .TP ++.B \-p \-\-show\-progress ++Show percentage of input\-file done and while compressing show the percentage ++of the original file the new file is. ++.TP + .B \-v --verbose + Verbose mode -- show the compression ratio for each file processed. + Further \-v's increase the verbosity level, spewing out lots of +--- a/bzip2.c ++++ b/bzip2.c +@@ -145,6 +145,7 @@ + #include + #include + #include ++#include + #include + #include "bzlib.h" + +@@ -301,6 +302,7 @@ + Char progNameReally[FILE_NAME_LEN]; + FILE *outputHandleJustInCase; + Int32 workFactor; ++Char showProgress; + + static void panic ( Char* ) NORETURN; + static void ioError ( void ) NORETURN; +@@ -425,6 +427,12 @@ + UInt32 nbytes_in_lo32, nbytes_in_hi32; + UInt32 nbytes_out_lo32, nbytes_out_hi32; + Int32 bzerr, bzerr_dummy, ret; ++ double fileSize = 0; /* initialized to make the compiler stop crying */ ++ /* double because big files might otherwhise give ++ * overflows. not long long since not all compilers ++ * support that one ++ */ ++ time_t startTime, currentTime; + + SET_BINARY_MODE(stream); + SET_BINARY_MODE(zStream); +@@ -432,12 +440,21 @@ + if (ferror(stream)) goto errhandler_io; + if (ferror(zStream)) goto errhandler_io; + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ (void)fseek(stream, 0, SEEK_END); ++ fileSize = ftello(stream); ++ rewind(stream); ++ if (verbosity >= 1) ++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize); ++ } ++ + bzf = BZ2_bzWriteOpen ( &bzerr, zStream, + blockSize100k, verbosity, workFactor ); + if (bzerr != BZ_OK) goto errhandler; + + if (verbosity >= 2) fprintf ( stderr, "\n" ); + ++ time(&startTime); + while (True) { + + if (myfeof(stream)) break; +@@ -446,6 +463,22 @@ + if (nIbuf > 0) BZ2_bzWrite ( &bzerr, bzf, (void*)ibuf, nIbuf ); + if (bzerr != BZ_OK) goto errhandler; + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ time(¤tTime); ++ ++ if ((currentTime - startTime) > 1) { /* show progress every 2 seconds */ ++ double curInPos = ftello(stream); ++ double curOutPos = ftello(zStream); ++ ++ startTime = currentTime; ++ ++ fprintf(stderr, "%.2f%% done", (curInPos * 100.0) / fileSize); ++ if (srcMode == SM_F2F) ++ fprintf(stderr, ", new size: %.2f%%", (curOutPos * 100.0) / curInPos); ++ ++ fprintf(stderr, " \r"); ++ } ++ } + } + + BZ2_bzWriteClose64 ( &bzerr, bzf, 0, +@@ -526,6 +559,8 @@ + UChar unused[BZ_MAX_UNUSED]; + Int32 nUnused; + UChar* unusedTmp; ++ double fileSize = 0; /* initialized to make the compiler stop crying */ ++ time_t startTime, currentTime; + + nUnused = 0; + streamNo = 0; +@@ -533,9 +568,19 @@ + SET_BINARY_MODE(stream); + SET_BINARY_MODE(zStream); + ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ off_t dummy = ftello(zStream); ++ (void)fseeko(zStream, 0, SEEK_END); ++ fileSize = ftello(zStream); ++ (void)fseeko(zStream, dummy, SEEK_SET); ++ if (verbosity >= 1) ++ fprintf(stderr, "Input-file size: %ld\n", (long)fileSize); ++ } ++ + if (ferror(stream)) goto errhandler_io; + if (ferror(zStream)) goto errhandler_io; + ++ time(&startTime); + while (True) { + + bzf = BZ2_bzReadOpen ( +@@ -551,6 +596,16 @@ + if ((bzerr == BZ_OK || bzerr == BZ_STREAM_END) && nread > 0) + fwrite ( obuf, sizeof(UChar), nread, stream ); + if (ferror(stream)) goto errhandler_io; ++ ++ if ((srcMode == SM_F2F || srcMode == SM_F2O) && showProgress == True) { ++ time(¤tTime); ++ if ((currentTime - startTime) >= 2) { ++ double curInPos = ftello(zStream); ++ startTime = currentTime; ++ ++ fprintf(stderr, "%.2f%% done\r", (curInPos * 100.0) / fileSize); ++ } ++ } + } + if (bzerr != BZ_STREAM_END) goto errhandler; + +@@ -1872,6 +1927,7 @@ + deleteOutputOnInterrupt = False; + exitValue = 0; + i = j = 0; /* avoid bogus warning from egcs-1.1.X */ ++ showProgress = False; + + /*-- Set up signal handlers for mem access errors --*/ + signal (SIGSEGV, mySIGSEGVorSIGBUScatcher); +@@ -1949,6 +2005,7 @@ + case 'k': keepInputFiles = True; break; + case 's': smallMode = True; break; + case 'q': noisy = False; break; ++ case 'p': showProgress = True; break; + case '1': blockSize100k = 1; break; + case '2': blockSize100k = 2; break; + case '3': blockSize100k = 3; break; +@@ -1985,6 +2042,7 @@ + if (ISFLAG("--keep")) keepInputFiles = True; else + if (ISFLAG("--small")) smallMode = True; else + if (ISFLAG("--quiet")) noisy = False; else ++ if (ISFLAG("--show-progress")) showProgress = True; else + if (ISFLAG("--version")) license(); else + if (ISFLAG("--license")) license(); else + if (ISFLAG("--exponential")) workFactor = 1; else diff -uNr a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch --- a/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch false +++ b/app-arch/bzip2/files/bzip2-1.0.6-saneso.patch 127b9afba341ef467054eef952548a5b77180cbabb4e94b7be19bfa168e5357dbb1cdfb38daf14de25bf6620f0c21c31bcb7d9af139e69386974dd0a3909b575 @@ -0,0 +1,13 @@ +--- a/Makefile-libbz2_so ++++ b/Makefile-libbz2_so +@@ -35,8 +35,8 @@ + bzlib.o + + all: $(OBJS) +- $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) +- $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 ++ $(CC) $(LDFLAGS) -shared -Wl,-soname -Wl,libbz2.so.1 -o libbz2.so.1.0.6 $(OBJS) ++ $(CC) $(LDFLAGS) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 + rm -f libbz2.so.1.0 + ln -s libbz2.so.1.0.6 libbz2.so.1.0 + diff -uNr a/app-arch/bzip2/metadata.xml b/app-arch/bzip2/metadata.xml --- a/app-arch/bzip2/metadata.xml false +++ b/app-arch/bzip2/metadata.xml ae1cc92ee9a4bccb7d43fd83cf405ae3d6b48479cff35d8311f25206a3016c0bcd3083c6516f748fb4601fb69382cc89e619effcc825aff221126bdccee02166 @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:bzip:bzip2 + + diff -uNr a/app-arch/cpio/Manifest b/app-arch/cpio/Manifest --- a/app-arch/cpio/Manifest false +++ b/app-arch/cpio/Manifest 6417f4f4b80a547dfd428e1b91961a49a596fb3e6cb283775b9311ed518f1a544df9c33b9f9f8ec2877d269cde8523c6eba49f7b99a0c8c9869263ac9bf69312 @@ -0,0 +1,5 @@ +AUX cpio-2.12-name-overflow.patch 404 BLAKE2B f15aaffd716a6dca8b00f0831cd3bfa8971ca8beee6eb04b6ad3974c0d2770ac23669839b348013974ee827affb7b943d4dfa1be8d29b0b77c8ebea5e01791df SHA512 725468331dbb24e37333f9f56d8f295a7e521dd855f97993a2f62bf6b3a8f44d924b868ad5315dd90706ac28fcbb0b7da4c30e77ad5f401e7c5543410cc42f7a +AUX cpio-2.12-non-gnu-compilers.patch 223 BLAKE2B e5ba3da0c1dc23199e52c3782d3a11504b075b1216d20cd8643591abdc3a69afe1db254800327ece8f07f83438756d88c5c10c606b4e14c76a309941dc4ed1f9 SHA512 369efc3393affdb91191ab7a55a6dd3a1157ddfa294bd9a4763cc63e6df72af3a7ab614234d69e327edf14a97e4fb800aee32a379ade73c0f80b0dd8ecf33f03 +DIST cpio-2.12.tar.bz2 1258605 BLAKE2B 4b6d42a1d8aaeaa980cab5894b2e264451e96a108f2c3aa89d3e6fde0bff338e026ee233ebd7c8cf41f3c926d42d38b866778244db774055736ca8792889e160 SHA512 0cd4da5f2fbca179ab4e666a5f878414c086a5f98bce4c76273f21d9b2a6fe422d901b5d453826c5f81bbe363aa015047a1e99779ad1a451c8feca6205c63120 +EBUILD cpio-2.12-r1.ebuild 870 BLAKE2B a86550e4b94d3f69a47389a56187a469aaba96528030d9d0794f281849aacb99bfeaaa77aa0e67fe628c6eefbb7af20b862728b330fddcb8640403daad0712e7 SHA512 b18f461cea53f0ea28ca50da48449cc6670e2ddac21b6939caf07af304730727a7835245be73454639c149ad502fe704851c156fbf97311a19510efe00d7f397 +MISC metadata.xml 253 BLAKE2B 295e9d6d93aaa12af413972e1590c67087801cc09c9aa6b59d4606c0f4106d1dacf2baa9858559083b4c6d91beeef218d0729e8593a33788958da6d2897e8ce2 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 diff -uNr a/app-arch/cpio/cpio-2.12-r1.ebuild b/app-arch/cpio/cpio-2.12-r1.ebuild --- a/app-arch/cpio/cpio-2.12-r1.ebuild false +++ b/app-arch/cpio/cpio-2.12-r1.ebuild d942ff497b12c2f34a184e7be10e705c203e4ded2f2e42ee7d3cb04f6648e4e6f931f954a6de87e71418251d911350615bb96eb4b93f22388a9e75cfa61af9cd @@ -0,0 +1,27 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils + +DESCRIPTION="A file archival tool which can also read and write tar files" +HOMEPAGE="https://www.gnu.org/software/cpio/cpio.html" +SRC_URI="mirror://gnu/cpio/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="nls" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.12-non-gnu-compilers.patch #275295 + epatch "${FILESDIR}"/${PN}-2.12-name-overflow.patch #572428 +} + +src_configure() { + econf \ + $(use_enable nls) \ + --bindir="${EPREFIX}"/bin \ + --with-rmt="${EPREFIX}"/usr/sbin/rmt +} diff -uNr a/app-arch/cpio/files/cpio-2.12-name-overflow.patch b/app-arch/cpio/files/cpio-2.12-name-overflow.patch --- a/app-arch/cpio/files/cpio-2.12-name-overflow.patch false +++ b/app-arch/cpio/files/cpio-2.12-name-overflow.patch 2e9d71eac00b30eeab402d14f7f7ba5f1dd5685f66d76e1ae324c1ad12bcfa36977ab8de5379516cf570933c092f093b3fca3a4e38c660d0a8b105855939f498 @@ -0,0 +1,15 @@ +https://bugs.gentoo.org/572428 +https://lists.gnu.org/archive/html/bug-cpio/2016-01/msg00002.html +http://seclists.org/oss-sec/2016/q1/136 + +--- a/src/copyin.c ++++ b/src/copyin.c +@@ -1385,6 +1385,8 @@ + break; + } + ++ if (file_hdr.c_namesize <= 1) ++ file_hdr.c_name = xrealloc (file_hdr.c_name, 2); + cpio_safer_name_suffix (file_hdr.c_name, false, !no_abs_paths_flag, + false); + diff -uNr a/app-arch/cpio/files/cpio-2.12-non-gnu-compilers.patch b/app-arch/cpio/files/cpio-2.12-non-gnu-compilers.patch --- a/app-arch/cpio/files/cpio-2.12-non-gnu-compilers.patch false +++ b/app-arch/cpio/files/cpio-2.12-non-gnu-compilers.patch 9d3d476ee66c2c911e11df6ba77a0df4e53af545e18229d658c637b8155fe4f2d41e1e28d32ad91fdccb937de2efa29e00fe25c923fc32513c795783b4372bce @@ -0,0 +1,11 @@ +--- cpio-2.12/src/cpiohdr.h ++++ cpio-2.12/src/cpiohdr.h +@@ -25,6 +25,8 @@ + + # ifdef HAVE_ATTRIB_PACKED + # define ATTRIB_PACKED __attribute__((packed)) ++# else ++# define ATTRIB_PACKED + # endif + + # ifdef HAVE_PRAGMA_PACK diff -uNr a/app-arch/cpio/metadata.xml b/app-arch/cpio/metadata.xml --- a/app-arch/cpio/metadata.xml false +++ b/app-arch/cpio/metadata.xml c1cc15704207fae53d995d26fa94ebc8fb592f14ab069aeb21afb5a2fefec7fe7eb8cf99f39d287c2ae9c8966132f703727c1964c17a22228765b0c3efc677b0 @@ -0,0 +1,8 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + diff -uNr a/app-arch/gzip/Manifest b/app-arch/gzip/Manifest --- a/app-arch/gzip/Manifest false +++ b/app-arch/gzip/Manifest 23f478d676a30daa5697a5a9c0f40086271e2388ae9e22ba1d7fea1522fe1069e49c5684638bb5d6ebb3d38e6d4066fd78d498a0ad929576265f4e94ee029292 @@ -0,0 +1,5 @@ +AUX gzip-1.3.8-install-symlinks.patch 284 BLAKE2B f461a822371d56505aa3e436c4d611823dfe81ab72f9e1a2bd3547b8fbbae07d2108ac255a1a9dae604f9acb77744bda3a9eec2a575580558a4ca7042164c563 SHA512 4a20d61d48c456c4f5cca31b38e6f26460f781782c66ff4cd1b193eb1a48dd9fa88967989b2698b5e45a61d64c9ce3b87fba0f6b67bf507c5bb386a847f477fd +AUX gzip-1.4-asmv.patch 630 BLAKE2B 64508293c8257db3dafd2b20fe5bc23aa37b54f90b63eaeb7a67643ea837b88d58b90fa8b177d84a538eef183d5e49ab98e6b5f8a482303e68ef2c5acb390faf SHA512 7769c98cfc8d6c7c48bc1772d45b44c6c4e1a9fa266dbe5bfe1b9822434b96f7c42ec0d2f4444a5ee8ae8086e571f6891756c7c22f61352649721044eda61a0f +DIST gzip-1.8.tar.xz 728116 BLAKE2B 34b707bd403791aca8620de3520637c460dbd9167a4fb693c78438115862781350ef5e256ad0accce75b25515b82fcd3e405cc310d6ea36f2d2609b0a270c4db SHA512 efd3e2439476054badeb127d9156e24e9252129111219f13fd939596c057b2a96291630b2717181984b391abf249ac8699488bbd01ceeb8a70b121c500b10c55 +EBUILD gzip-1.8.ebuild 1177 BLAKE2B aaf2b99cec28e67f048a05c88d3a958140a322cc7f232242c06cd800443e8cb5f5e05d19bb60e6662aa01dea521a0ccb79cddc2bc8160880eaf3ea501da10a32 SHA512 f64ac3b923a2dfcb881f90cadfe64cabde16cbde83fef903b35bae5ce23f5422f281cc04e37c3a043978d59d08cc506a06b489d02b4a347a15b7aee1b43b4a4c +MISC metadata.xml 421 BLAKE2B cd73d8b6c846ebae069903fefc36cd0c2835cee6c137e1cc642cae9628be6fd3678c9002defeb2a63ca592f96f9f8032e99535f398a60989df9fb66270d6ec4f SHA512 fef953770d98077b95afc5f2d7fc208dc74453c403dd4220c8b35b837a485dbe8d98e1f669b5661633f599246752f1ee4136ee886ca6c15c2dcc0da73d976e96 diff -uNr a/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch b/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch --- a/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch false +++ b/app-arch/gzip/files/gzip-1.3.8-install-symlinks.patch c17c9212bb84b09627a47edd3d4fceb7c3417b39b433fb7aac068d28f7ca6f21d8c4da20065ef9a10342c8761042208f7a326efae839b6dee71a25249d1a2176 @@ -0,0 +1,11 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -926,7 +926,7 @@ + rm -f "$$dest" && \ + case $@ in \ + install-exec-hook) \ +- ln "$$source" "$$dest" || $(LN_S) "$$source" "$$dest";; \ ++ $(LN_S) "$$source" "$$dest";; \ + esac \ + ) || exit; \ + done; \ diff -uNr a/app-arch/gzip/files/gzip-1.4-asmv.patch b/app-arch/gzip/files/gzip-1.4-asmv.patch --- a/app-arch/gzip/files/gzip-1.4-asmv.patch false +++ b/app-arch/gzip/files/gzip-1.4-asmv.patch 3a5d8b4d0fb3ca31cbb0280340f512a0727c5547821f7fe92e59cbaa644056ddfb7c0ff7dd3270233345afccb826a138cf71d69d4faae9d50115b1c9ff6950cf @@ -0,0 +1,30 @@ +http://bugs.gentoo.org/show_bug.cgi?id=302773 + +--- a/tailor.h ++++ b/tailor.h +@@ -69,9 +69,6 @@ + # include + # define OS_CODE 0x00 + # define SET_BINARY_MODE(fd) setmode(fd, O_BINARY) +-# if !defined(NO_ASM) && !defined(ASMV) +-# define ASMV +-# endif + #else + # define near + #endif +@@ -182,7 +179,6 @@ + # define PATH_SEP2 ':' + # define STDC_HEADERS + # define OS_CODE 0x01 +-# define ASMV + # ifdef __GNUC__ + # define HAVE_DIRENT_H + # define HAVE_FCNTL_H +@@ -201,7 +197,6 @@ + #endif + + #if defined(ATARI) || defined(atarist) +-# define ASMV + # define OS_CODE 0x05 + # ifdef TOSFS + # define PATH_SEP2 '\\' diff -uNr a/app-arch/gzip/gzip-1.8.ebuild b/app-arch/gzip/gzip-1.8.ebuild --- a/app-arch/gzip/gzip-1.8.ebuild false +++ b/app-arch/gzip/gzip-1.8.ebuild ead6095a6dd81329efb4b2551e86fca45d78a133bf4cf57cc4582992575d7fead74f81cfa9ba8c3f8530d2ea2d212f16b61c25c7281baf9c1c4c6982b0480225 @@ -0,0 +1,44 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils flag-o-matic + +DESCRIPTION="Standard GNU compressor" +HOMEPAGE="https://www.gnu.org/software/gzip/" +SRC_URI="mirror://gnu/gzip/${P}.tar.xz + mirror://gnu-alpha/gzip/${P}.tar.xz + mirror://gentoo/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +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" +IUSE="pic static" + +PATCHES=( + "${FILESDIR}/${PN}-1.3.8-install-symlinks.patch" + "${FILESDIR}/${PN}-1.4-asmv.patch" +) + +src_prepare() { + epatch "${PATCHES[@]}" +} + +src_configure() { + use static && append-flags -static + # avoid text relocation in gzip + use pic && export DEFS="NO_ASM" + econf +} + +src_install() { + default + docinto txt + dodoc algorithm.doc gzip.doc + + # keep most things in /usr, just the fun stuff in / + dodir /bin + mv "${ED}"/usr/bin/{gunzip,gzip,uncompress,zcat} "${ED}"/bin/ || die + sed -e "s:${EPREFIX}/usr:${EPREFIX}:" -i "${ED}"/bin/gunzip || die +} diff -uNr a/app-arch/gzip/metadata.xml b/app-arch/gzip/metadata.xml --- a/app-arch/gzip/metadata.xml false +++ b/app-arch/gzip/metadata.xml 87476a1c7e4ac72e82812403bcc4b0abc80db4751dcd9b862349200aba8d9e8222a0f085ccbfe51c3bcafff9839599d20cdf8888c136d15144bb1deb7ff9f5df @@ -0,0 +1,14 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + cpe:/a:gnu:gzip + + +disable optimized assembly code that is not PIC friendly + + diff -uNr a/app-arch/tar/Manifest b/app-arch/tar/Manifest --- a/app-arch/tar/Manifest false +++ b/app-arch/tar/Manifest 05b613b11a6704db39f95f010ca8fd499cf3837722cf3df5b9fffa2b0296e6f09fcaf4eef8d0d014a216e068d0766361f115e012e131f600f42bba5f41e1cf8a @@ -0,0 +1,8 @@ +AUX rmt 263 BLAKE2B 7535dd27d5ba367066cd519dee06f053cde9d4f1e86728059935fb80e9a9880e7a934076949af54e47ee7de3f91452f2c642780e7d56619f166574633d1e4759 SHA512 2f1a9d3a522fc1f0d5385d1ea4c27da88a1c9357b866340432c6310604c01d3e328e33080ed1e951c0da6f025c3ee2a0c9f170d4b86a1d235ebb56be48fef152 +AUX tar-1.29-add-files.patch 6602 BLAKE2B ac4687bccd88e1fb3b2c565901815988b0ff0d9d42b46f71878c0293db0e0ce453d3b2fd3ead26d136997bd6f87b1400eb2310fd4d40c07a56b63a5528e5a7fa SHA512 5c87dd4a8e6d86c8e2311ac8487958abbda846484aec664ab82b7502ac1bb6a6cd43d3869fc64e06f792915b6a0659c41b9481357e5da19fbe43f9c913a10f3e +AUX tar-1.29-extract-pathname-bypass-upstream.patch 1604 BLAKE2B 83364c5dee8d12b7cb67d8497666ec3082e0e209aeb4c84cc26292d43da0820bd14188f3003244a379cf5b6bdb5d3d7d566b42ec2c35d62f1d5713be7395e001 SHA512 c13046f8b0bcc435197c859006b1cfd12b79377f3b90edfd4b77f86ec6d3ca431c716d731be84884f0ec6d6129765cbfbccb5971d0b909c3f45aff8f0b9b45cb +AUX tar-1.29-extract-pathname-bypass.patch 723 BLAKE2B c63c23dd1f256263cb4d1371e7a3eeccfe1da4aa74c13fd23f9bc1721b06e06d388eb99e1d9d17fb3344875be8b80e2a433f78360c89f6b2b7408302f346d0cc SHA512 ba06ae53b4effcdd0996be07ae03fae7237c579a82d2606fe25100bed447287a68e37282ba2b017eed0c26cb0f4bf77dcdb4fca2f5175e1bbaed91408b0bd54a +AUX tar-1.30-fix-test-92.patch 257 BLAKE2B ee4fe8420f56191a8e4d9edefd109c948eb693532e2c3bb2073a8d55631aed142ab9c3adfa64d6461eb1aa9221a1aca6ec5086f15b3b9154effdb8e7128a8601 SHA512 aa1c80edbf1c846e23aa34ed343ffebad969b26fed9d4ccdc779f3df5bc384bb44d6c78044c385dbb7c01e68462568b941e8ec1060eb97bf36606d7beb790c1c +DIST tar-1.29.tar.bz2 2715993 BLAKE2B 656b77a49c463ec7ade87a97b71469dadbf01551131bdf0cfa895b7b2a7d073a4cd51e9bec4169b134d83155aca18af1a89ddb5d14cb1dc0d9968184870d69f3 SHA512 d2cea9892892dfa0c8efd390303b75dccc085c4895e07ced684074592d69729916d6ea12475aa6aff873d076a729bb7dc2499c233edcfb9c7e8e8995481eef3b +EBUILD tar-1.29-r3.ebuild 2227 BLAKE2B 50afab4df588f55fdab5d3cfd4258d3c65192ee0cc7079527a05fcbee0a2ec50e3875302a241faa351edc41e5f77351382ecd3e291037eec11115d4c729aebde SHA512 270db39d7490c4829fb11cb680b39e75963bb065fe3ebdf78ab024300dae27f78e18453dc76c029a6cdfc4af9511074322aaafc3e89910e63e976065d92867a3 +MISC metadata.xml 387 BLAKE2B 6d37d364bd888503b868af168aa496d57abf7bac5c4c69f4c02933b5715312ec65f43babb347d34c665873247e4feaa9b9de2d3bb2d224e1751922c159f2fa87 SHA512 e5bce64bc18a7c6313d0818182941f49ea7e89617c97338fff29297bb2bfc2f4e56a9c124aa97fcb5f2a3a54e0e7cfd209bce09c2ced40a398381b7970c08cf7 diff -uNr a/app-arch/tar/files/rmt b/app-arch/tar/files/rmt --- a/app-arch/tar/files/rmt false +++ b/app-arch/tar/files/rmt 75f01fcd06fef2641a2acd3f353a269f456d89af8d2c465eddb00336247cb262dc492dd217fc7fc8ac8e9a39c61b0796f8a34e9eca1511dc2b8f20685db42f91 @@ -0,0 +1,8 @@ +#!/bin/sh +# +# This is not a mistake. This shell script (/etc/rmt) has been provided +# for compatibility with other Unix-like systems, some of which have +# utilities that expect to find (and execute) rmt in the /etc directory +# on remote systems. +# +exec rmt "$@" diff -uNr a/app-arch/tar/files/tar-1.29-add-files.patch b/app-arch/tar/files/tar-1.29-add-files.patch --- a/app-arch/tar/files/tar-1.29-add-files.patch false +++ b/app-arch/tar/files/tar-1.29-add-files.patch 76b5f3089ab191931c74ae6579349ac6c7a6cb45aa7b9bb2dc873e6d0a21e88d8d27f9868ccf1840107a4ec5e83dfe324e327e0b4b7611191df3be285de1b15d @@ -0,0 +1,194 @@ +From 3a283cfe9f8f1f127e8dc5597a5ea1d249985a54 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Sat, 12 Nov 2016 11:20:47 +0200 +Subject: [PATCH] Fix the --add-file option. + +* src/common.h (name_more_files): New proto. +(files_from_option): Remove. +* src/names.c (name_more_files): New file. +(names_options): Fix declaration of the +add-file option. +(names_parse_opt): Handle --add-file. +* src/tar.c (struct tar_args): Remove the input_files member. +Change all uses: use name_more_files() instead. +* tests/Makefile.am: Add new test. +* tests/add-file.at: New testcase. +* tests/testsuite.at: Add new test. +--- + src/common.h | 4 +--- + src/names.c | 24 ++++++++++++------- + src/tar.c | 16 ++++--------- + tests/Makefile.am | 3 ++- + tests/add-file.at | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + tests/testsuite.at | 1 + + 6 files changed, 92 insertions(+), 23 deletions(-) + create mode 100644 tests/add-file.at + +diff --git a/src/common.h b/src/common.h +index 50c34cc7c09b..6fdb6225f18b 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -414,9 +414,6 @@ GLOBAL bool show_transformed_names_option; + timestamps from archives with an unusual member order. It is automatically + set for incremental archives. */ + GLOBAL bool delay_directory_restore_option; +- +-/* When set, tar will not refuse to create empty archives */ +-GLOBAL bool files_from_option; + + /* Declarations for each module. */ + +@@ -738,6 +735,7 @@ void uid_to_uname (uid_t uid, char **uname); + int uname_to_uid (char const *uname, uid_t *puid); + + void name_init (void); ++bool name_more_files (void); + void name_add_name (const char *name); + void name_term (void); + const char *name_next (int change_dirs); +diff --git a/src/names.c b/src/names.c +index 219aa77a4356..1a9465667cd3 100644 +--- a/src/names.c ++++ b/src/names.c +@@ -32,7 +32,8 @@ static void name_add_file (const char *name); + + enum + { +- EXCLUDE_BACKUPS_OPTION = 256, ++ ADD_FILE_OPTION = 256, ++ EXCLUDE_BACKUPS_OPTION, + EXCLUDE_CACHES_OPTION, + EXCLUDE_CACHES_UNDER_OPTION, + EXCLUDE_CACHES_ALL_OPTION, +@@ -67,7 +68,7 @@ static struct argp_option names_options[] = { + {NULL, 0, NULL, 0, + N_("Local file name selection:"), GRID }, + +- {"add-file", ARGP_KEY_ARG, N_("FILE"), 0, ++ {"add-file", ADD_FILE_OPTION, N_("FILE"), 0, + N_("add given FILE to the archive (useful if its name starts with a dash)"), GRID+1 }, + {"directory", 'C', N_("DIR"), 0, + N_("change to directory DIR"), GRID+1 }, +@@ -190,10 +191,10 @@ names_parse_opt (int key, char *arg, struct argp_state *state) + + case 'T': + name_add_file (arg); +- /* Indicate we've been given -T option. This is for backward +- compatibility only, so that `tar cfT archive /dev/null will +- succeed */ +- files_from_option = true; ++ break; ++ ++ case ADD_FILE_OPTION: ++ name_add_name (arg); + break; + + default: +@@ -651,8 +652,8 @@ struct name_elt /* A name_array element. */ + } v; + }; + +-static struct name_elt *name_head; /* store a list of names */ +-size_t name_count; /* how many of the entries are names? */ ++static struct name_elt *name_head;/* store a list of names */ ++size_t name_count; /* how many of the entries are file names? */ + + static struct name_elt * + name_elt_alloc (void) +@@ -784,6 +785,12 @@ name_list_advance (void) + } + } + ++/* Return true if there are names or options in the list */ ++bool ++name_more_files (void) ++{ ++ return name_count > 0; ++} + + /* Add to name_array the file NAME with fnmatch options MATFLAGS */ + void +@@ -823,6 +830,7 @@ name_add_file (const char *name) + ep->v.file.name = name; + ep->v.file.line = 0; + ep->v.file.fp = NULL; ++ name_count++; + } + + /* Names from external name file. */ +diff --git a/src/tar.c b/src/tar.c +index 35bac38c2793..a361fc2c607f 100644 +--- a/src/tar.c ++++ b/src/tar.c +@@ -813,7 +813,6 @@ struct tar_args /* Variables used during option parsing */ + bool pax_option; /* True if --pax-option was given */ + char const *backup_suffix_string; /* --suffix option argument */ + char const *version_control_string; /* --backup option argument */ +- bool input_files; /* True if some input files where given */ + int compress_autodetect; /* True if compression autodetection should + be attempted when creating archives */ + }; +@@ -1322,7 +1321,6 @@ parse_opt (int key, char *arg, struct argp_state *state) + case ARGP_KEY_ARG: + /* File name or non-parsed option, because of ARGP_IN_ORDER */ + name_add_name (arg); +- args->input_files = true; + break; + + case 'A': +@@ -2179,7 +2177,7 @@ more_options (int argc, char **argv, struct option_locus *loc) + args.loc = loc; + if (argp_parse (&argp, argc, argv, ARGP_IN_ORDER|ARGP_NO_EXIT, &idx, &args)) + abort (); /* shouldn't happen */ +- if (loc->source == OPTS_ENVIRON && args.input_files) ++ if (loc->source == OPTS_ENVIRON && name_more_files ()) + USAGE_ERROR ((0, 0, _("non-option arguments in %s"), loc->name)); + } + +@@ -2221,7 +2219,6 @@ decode_options (int argc, char **argv) + args.pax_option = false; + args.backup_suffix_string = getenv ("SIMPLE_BACKUP_SUFFIX"); + args.version_control_string = 0; +- args.input_files = false; + args.compress_autodetect = false; + + subcommand_option = UNKNOWN_SUBCOMMAND; +@@ -2340,10 +2337,7 @@ decode_options (int argc, char **argv) + + /* Handle operands after any "--" argument. */ + for (; idx < argc; idx++) +- { +- name_add_name (argv[idx]); +- args.input_files = true; +- } ++ name_add_name (argv[idx]); + + /* Derive option values and check option consistency. */ + +@@ -2365,7 +2359,7 @@ decode_options (int argc, char **argv) + + if (occurrence_option) + { +- if (!args.input_files) ++ if (!name_more_files ()) + USAGE_ERROR ((0, 0, + _("--occurrence is meaningless without a file list"))); + if (!IS_SUBCOMMAND_CLASS (SUBCL_OCCUR)) +@@ -2569,7 +2563,7 @@ decode_options (int argc, char **argv) + { + /* --test-label is silent if the user has specified the label name to + compare against. */ +- if (!args.input_files) ++ if (!name_more_files ()) + verbose_option++; + } + else if (utc_option) +@@ -2598,7 +2592,7 @@ decode_options (int argc, char **argv) + switch (subcommand_option) + { + case CREATE_SUBCOMMAND: +- if (!args.input_files && !files_from_option) ++ if (!name_more_files ()) + USAGE_ERROR ((0, 0, + _("Cowardly refusing to create an empty archive"))); + if (args.compress_autodetect && archive_names diff -uNr a/app-arch/tar/files/tar-1.29-extract-pathname-bypass-upstream.patch b/app-arch/tar/files/tar-1.29-extract-pathname-bypass-upstream.patch --- a/app-arch/tar/files/tar-1.29-extract-pathname-bypass-upstream.patch false +++ b/app-arch/tar/files/tar-1.29-extract-pathname-bypass-upstream.patch 31942e8a3a9a7c0c564a7b9e1fd7b3b52d0753906489ed2089c28075d2f0e72dbeb79a8ea79d6e73d792e2ddd91179c846c3ca7d3ffcd0a385be0c9b882262e4 @@ -0,0 +1,60 @@ +https://bugs.gentoo.org/598334 + +From 7340f67b9860ea0531c1450e5aa261c50f67165d Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sat, 29 Oct 2016 21:04:40 -0700 +Subject: [PATCH] When extracting, skip ".." members + +* NEWS: Document this. +* src/extract.c (extract_archive): Skip members whose names +contain "..". +--- + NEWS | 8 +++++++- + src/extract.c | 8 ++++++++ + 2 files changed, 15 insertions(+), 1 deletion(-) + +--- a/NEWS ++++ b/NEWS +@@ -1,6 +1,16 @@ + GNU tar NEWS - User visible changes. 2016-05-16 + Please send GNU tar bug reports to + ++ ++ ++version 1.29-r2+ Gentoo ++ ++* Member names containing '..' components are now skipped when extracting. ++ ++This fixes tar's behavior to match its documentation, and is a bit ++safer when extracting untrusted archives over old files (an unsafe ++practice that the tar manual has long recommended against). ++ + + version 1.29 - Sergey Poznyakoff, 2016-05-16 + +--- a/src/extract.c ++++ b/src/extract.c +@@ -1629,12 +1629,20 @@ + { + char typeflag; + tar_extractor_t fun; ++ bool skip_dotdot_name; + + fatal_exit_hook = extract_finish; + + set_next_block_after (current_header); + ++ skip_dotdot_name = (!absolute_names_option ++ && contains_dot_dot (current_stat_info.orig_file_name)); ++ if (skip_dotdot_name) ++ ERROR ((0, 0, _("%s: Member name contains '..'"), ++ quotearg_colon (current_stat_info.orig_file_name))); ++ + if (!current_stat_info.file_name[0] ++ || skip_dotdot_name + || (interactive_option + && !confirm ("extract", current_stat_info.file_name))) + { +-- +2.11.0.rc2 + diff -uNr a/app-arch/tar/files/tar-1.29-extract-pathname-bypass.patch b/app-arch/tar/files/tar-1.29-extract-pathname-bypass.patch --- a/app-arch/tar/files/tar-1.29-extract-pathname-bypass.patch false +++ b/app-arch/tar/files/tar-1.29-extract-pathname-bypass.patch 90231267470c43db32b0471244c247aea2275293520da78c34e8817fa86b13f498d271f0f2fb187dabdbcfaf69d3c342f90d1478794c8c16e89236ccf19c8a9c @@ -0,0 +1,27 @@ +--- a/lib/paxnames.c 2016-04-06 00:04:47.314860045 +0300 ++++ b/lib/paxnames.c 2016-04-06 02:08:44.962297881 +0300 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + + /* Hash tables of strings. */ +@@ -114,7 +115,15 @@ + for (p = file_name + prefix_len; *p; ) + { + if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2])) +- prefix_len = p + 2 - file_name; ++ { ++ static char const *const diagnostic[] = ++ { ++ N_("%s: Member name contains '..'"), ++ N_("%s: Hard link target contains '..'") ++ }; ++ ERROR ((0, 0, _(diagnostic[link_target]), ++ quotearg_colon (file_name))); ++ } + + do + { diff -uNr a/app-arch/tar/files/tar-1.30-fix-test-92.patch b/app-arch/tar/files/tar-1.30-fix-test-92.patch --- a/app-arch/tar/files/tar-1.30-fix-test-92.patch false +++ b/app-arch/tar/files/tar-1.30-fix-test-92.patch 1d36d145e8d829e433a33e2ea68c8aa21585ea1d5e825ada1a0d4b6a8e1ad0586ab385c82e77d6d127bf24df54f38391f7947cc48371b6fe4375da67fa5d730f @@ -0,0 +1,13 @@ +http://lists.gnu.org/archive/html/bug-tar/2017-12/msg00027.html + +--- a/tests/difflink.at ++++ b/tests/difflink.at +@@ -21,7 +21,7 @@ mkdir a + genfile -f a/x + ln -s x a/y + ln a/y a/z +-tar cf a.tar a ++tar cf a.tar a/x a/y a/z + rm a/z + ln -s x a/z + tar df a.tar diff -uNr a/app-arch/tar/metadata.xml b/app-arch/tar/metadata.xml --- a/app-arch/tar/metadata.xml false +++ b/app-arch/tar/metadata.xml c265857eaf1d2756ac11a81816ff336d4f8f031d73c008627b3f796f18947163596a1e91f59550a9c2524099492fc550834715a719b93fa3a75e68e2faf37329 @@ -0,0 +1,14 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + just install `tar` + + + cpe:/a:gnu:tar + + diff -uNr a/app-arch/tar/tar-1.29-r3.ebuild b/app-arch/tar/tar-1.29-r3.ebuild --- a/app-arch/tar/tar-1.29-r3.ebuild false +++ b/app-arch/tar/tar-1.29-r3.ebuild 3a99e4834ee9938d9aac506cb3afc254146bc416f2b7a1e07fb9fd0166b51c161f344462a0588b531ee6db06fca0806f1dd9f02a6b277731562a2e8dc8ba92b0 @@ -0,0 +1,81 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit flag-o-matic eutils + +DESCRIPTION="Use this to make tarballs :)" +HOMEPAGE="https://www.gnu.org/software/tar/" +SRC_URI="mirror://gnu/tar/${P}.tar.bz2 + mirror://gnu-alpha/tar/${P}.tar.bz2" + +LICENSE="GPL-3+" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="acl elibc_glibc minimal nls selinux static userland_GNU xattr" + +RDEPEND="acl? ( virtual/acl ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + nls? ( >=sys-devel/gettext-0.10.35 ) + xattr? ( elibc_glibc? ( sys-apps/attr ) )" + +PATCHES=( + "${FILESDIR}/${P}-extract-pathname-bypass-upstream.patch" #598334 + "${FILESDIR}/${P}-add-files.patch" +) + +src_prepare() { + epatch "${PATCHES[@]}" + epatch_user + + if ! use userland_GNU ; then + sed -i \ + -e 's:/backup\.sh:/gbackup.sh:' \ + scripts/{backup,dump-remind,restore}.in \ + || die "sed non-GNU" + fi +} + +src_configure() { + use static && append-ldflags -static + FORCE_UNSAFE_CONFIGURE=1 \ + econf \ + --enable-backup-scripts \ + --bindir="${EPREFIX}"/bin \ + --libexecdir="${EPREFIX}"/usr/sbin \ + $(usex userland_GNU "" "--program-prefix=g") \ + $(use_with acl posix-acls) \ + $(use_enable nls) \ + $(use_with selinux) \ + $(use_with xattr xattrs) +} + +src_install() { + default + + local p=$(usex userland_GNU "" "g") + if [[ -z ${p} ]] ; then + # a nasty yet required piece of baggage + exeinto /etc + doexe "${FILESDIR}"/rmt + fi + + # autoconf looks for gtar before tar (in configure scripts), hence + # in Prefix it is important that it is there, otherwise, a gtar from + # the host system (FreeBSD, Solaris, Darwin) will be found instead + # of the Prefix provided (GNU) tar + if use prefix ; then + dosym tar /bin/gtar + fi + + mv "${ED}"/usr/sbin/${p}backup{,-tar} || die + mv "${ED}"/usr/sbin/${p}restore{,-tar} || die + + if use minimal ; then + find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \ + -type f -a '!' '(' -name tar -o -name ${p}tar ')' \ + -delete || die + fi +} diff -uNr a/app-arch/unzip/Manifest b/app-arch/unzip/Manifest --- a/app-arch/unzip/Manifest false +++ b/app-arch/unzip/Manifest fee4982db60c0e56333fef62549cc1163b46ea5585e3816c3d65ec02d3b5613bcaa18be33a5545114d8f9addbedf6ff9ab99a6ee2b7ec87f8e87452a10d743da @@ -0,0 +1,7 @@ +AUX unzip-6.0-format-security.patch 4424 BLAKE2B c76ac7c9874238ff20c85e35d8bab809c4b668ff22eb93a3ac614653ab3843fbd80aebb552d285640b13f38f5bb264f6fe3c192b1d30128dfbd33fd9f28da40f SHA512 78340a1a16ed1951e5311fcfb76e38ec58ec0b6dcd74951624dc7778e41ae067d7dba38f394ed3a03436df197582f5d47c49e7c2d62d04c4fcd974eedb9bc726 +AUX unzip-6.0-natspec.patch 14304 BLAKE2B 87f724fcdb0960bfa17d609dbb764f3469b1ddfee1abc810e57cef52780482abd8c25950cf0da4d976d89745f4aa65b6269f21d0eac290230621b782fa1e0d06 SHA512 189ce2045430d2d04e27049672a3cfb205319edab1ac1522700a7f89344e5718235d8a15238390f6b4317af493796a65cac6a83f7dceb402bc736628d7a89cda +AUX unzip-6.0-no-exec-stack.patch 381 BLAKE2B c298afe0df1c903c0894bf55e55b3f4f0d616662e3fa706bcb9813707af3f2bfebff1a2b4290d943718ca35aa2ce098f20b5d370a624c1a16b81d4e921a3bdeb SHA512 a00ba3c805aa64bebeb3194cd75093c1e7c951366d40bba4852837dcb355eedf1ca6a6e648ea007fcb71124e778e54b5168a7b38a7b7268bc3983d87594633a5 +DIST unzip60.tar.gz 1376845 BLAKE2B 5016d300b4452018a391f4ebc03c6960c068df400a0407c0c60bd7bb5ec5012031f916d8b204a6149ba291c2c35beba40d9b43c76fc093026e79471329ab0e47 SHA512 0694e403ebc57b37218e00ec1a406cae5cc9c5b52b6798e0d4590840b6cdbf9ddc0d9471f67af783e960f8fa2e620394d51384257dca23d06bcd90224a80ce5d +DIST unzip_6.0-21.debian.tar.xz 17740 BLAKE2B 098a84e5b05f819f9c8c6a6656fdb2359dfb5b93f63444e55347e0bef9735fa48bf1631a658a2cb6d0c604e7e740e47b57910d251b74e5df7c8b9468acfe55f4 SHA512 f7bce4156ac13c34da3f991df3ae88b0db99b0810c7f8904ea3ac666a4cb2788d7182056f2bbd82d7519d0e0ee31a10af47bee08f360ceb859e5fbfc6e15ef36 +EBUILD unzip-6.0_p21-r2.ebuild 2603 BLAKE2B 3048169f536561dbefb24bdf58a6d6bd9cd765debea8a96d29af7583313a73d20de06c18301df70205bec6c4829aa6dc54340413a758a5aeb249b4ee5f567f9f SHA512 66197722dae7909378d5b7f66c81924ca1a6d04947549460708bf63aaf19e833fb958b0d5b0e90e07900c25cdb14530983fc98132f8509f779a254e0434d2e61 +MISC metadata.xml 476 BLAKE2B 4cd0cc36008b6ec9ee618ef2e8a9c48e7fc6228e051a5c24e922faace6645de951a6836cc5d49a6041102944bf5b1901a5febcd6db86b67eb4182cad46a2a100 SHA512 0b82799f21ec8d57451ce8f231d24eabb02f637ee6fd2c32af12f9806f104ea53dc4d848b29950c1d5e848ea81f04a58422fa37f39287937dfb54e186f30b653 diff -uNr a/app-arch/unzip/files/unzip-6.0-format-security.patch b/app-arch/unzip/files/unzip-6.0-format-security.patch --- a/app-arch/unzip/files/unzip-6.0-format-security.patch false +++ b/app-arch/unzip/files/unzip-6.0-format-security.patch 4049ff47d8aa7194caa8633e9f153de4ac60267d0f8eda1b84ad8fa4784cf1482c75abe7c7abd11b0a1f48b5ecf722c35aa3e08c3355b0166a40a879f5e184e4 @@ -0,0 +1,91 @@ +Fix build with -Werror=format-security + +Origin: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=master-next&id=f7d80257afcfefdc85b6745328f2d12b957a848b +Author: Edwin Plauchu + +diff --git a/extract.c b/extract.c +index 7cd9123..25c5a62 100644 +--- a/extract.c ++++ b/extract.c +@@ -475,7 +475,7 @@ int extract_or_test_files(__G) /* return PK-type error code */ + Info(slide, 0x401, ((char *)slide, + LoadFarString(CentSigMsg), j + blknum*DIR_BLKSIZ + 1)); + Info(slide, 0x401, ((char *)slide, +- LoadFarString(ReportMsg))); ++ "%s",LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; + } + reached_end = TRUE; /* ...so no more left to do */ +@@ -754,8 +754,8 @@ int extract_or_test_files(__G) /* return PK-type error code */ + + #ifndef SFX + if (no_endsig_found) { /* just to make sure */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); +- Info(slide, 0x401, ((char *)slide, LoadFarString(ReportMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(ReportMsg))); + if (!error_in_archive) /* don't overwrite stronger error */ + error_in_archive = PK_WARN; + } +diff --git a/list.c b/list.c +index 15e0011..0b484f6 100644 +--- a/list.c ++++ b/list.c +@@ -181,7 +181,7 @@ int list_files(__G) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + } +@@ -507,7 +507,7 @@ int list_files(__G) /* return PK-type error code */ + && (!G.ecrec.is_zip64_archive) + && (memcmp(G.sig, end_central_sig, 4) != 0) + ) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + +@@ -591,7 +591,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + return PK_BADERR; /* sig not found */ + } + } +@@ -674,7 +674,7 @@ int get_time_stamp(__G__ last_modtime, nmember) /* return PK-type error code */ + ---------------------------------------------------------------------------*/ + + if (memcmp(G.sig, end_central_sig, 4)) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; + } + if (*nmember == 0L && error_in_archive <= PK_WARN) +diff --git a/zipinfo.c b/zipinfo.c +index 0ac75b3..1e7fa82 100644 +--- a/zipinfo.c ++++ b/zipinfo.c +@@ -833,7 +833,7 @@ int zipinfo(__G) /* return PK-type error code */ + Info(slide, 0x401, + ((char *)slide, LoadFarString(CentSigMsg), j)); + Info(slide, 0x401, +- ((char *)slide, LoadFarString(ReportMsg))); ++ ((char *)slide, "%s", LoadFarString(ReportMsg))); + error_in_archive = PK_BADERR; /* sig not found */ + break; + } +@@ -1022,7 +1022,7 @@ int zipinfo(__G) /* return PK-type error code */ + && (!G.ecrec.is_zip64_archive) + && (memcmp(G.sig, end_central_sig, 4) != 0) + ) { /* just to make sure again */ +- Info(slide, 0x401, ((char *)slide, LoadFarString(EndSigMsg))); ++ Info(slide, 0x401, ((char *)slide, "%s", LoadFarString(EndSigMsg))); + error_in_archive = PK_WARN; /* didn't find sig */ + } + diff -uNr a/app-arch/unzip/files/unzip-6.0-natspec.patch b/app-arch/unzip/files/unzip-6.0-natspec.patch --- a/app-arch/unzip/files/unzip-6.0-natspec.patch false +++ b/app-arch/unzip/files/unzip-6.0-natspec.patch 4a2c3ffd1062ae4e5aa73f5d110cb77cc6fcf7322da3769abe31fb07becba31488147c820dda29b60fb5791f709b5600811a46fa538824af4362150f0e2a7aa8 @@ -0,0 +1,372 @@ +This patch makes zip use libnatspec to recode file names is national charset. +Initially this patch was written for altlinux: +http://sisyphus.ru/ru/srpm/Sisyphus/zip/patches + +Later it was a bit improved and improved version was posted here (in Russian): +http://www.opennet.ru/tips/info/2494.shtml + +Gentoo reference: +https://bugs.gentoo.org/show_bug.cgi?id=275244 + +diff -pur unzip60orig/unix/configure unzip60/unix/configure +--- unzip60orig/unix/configure 2009-04-16 23:25:12.000000000 +0400 ++++ unzip60/unix/configure 2010-11-26 19:07:43.000000000 +0300 +@@ -17,7 +17,7 @@ CFLAGSR=${CFLAGS} + IZ_BZIP2=${3} + CFLAGS="${CFLAGS} -I. -DUNIX" + LFLAGS1="" +-LFLAGS2="-s" ++LFLAGS2="-l natspec" + LN="ln -s" + + CFLAGS_OPT='' +diff -pur unzip60orig/unix/Makefile unzip60/unix/Makefile +--- unzip60orig/unix/Makefile 2009-01-19 01:41:18.000000000 +0300 ++++ unzip60/unix/Makefile 2010-11-29 14:25:58.461000001 +0300 +@@ -45,14 +45,14 @@ + CC = cc# try using "gcc" target rather than changing this (CC and LD + LD = $(CC)# must match, else "unresolved symbol: ___main" is possible) + AS = as +-LOC = $(D_USE_BZ2) $(LOCAL_UNZIP) ++LOC = $(D_USE_BZ2) -DNO_SETLOCALE $(LOCAL_UNZIP) + AF = $(LOC) + CFLAGS = -O + CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC) + CF = $(CFLAGS) $(CF_NOOPT) + LFLAGS1 = + LF = -o unzip$E $(LFLAGS1) +-LF2 = -s ++LF2 = -l natspec + + # UnZipSFX flags + SL = -o unzipsfx$E $(LFLAGS1) +@@ -121,7 +121,7 @@ INSTALL_PROGRAM = $(INSTALL) + INSTALL_D = mkdir -p + # on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate + manext = 1 +-prefix = /usr/local ++prefix = /usr + BINDIR = $(prefix)/bin# where to install executables + MANDIR = $(prefix)/man/man$(manext)# where to install man pages + INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/unzip$E $(BINDIR)/unzipsfx$E \ +diff -pur unzip60orig/unix/unix.c unzip60/unix/unix.c +--- unzip60orig/unix/unix.c 2009-01-24 02:31:26.000000000 +0300 ++++ unzip60/unix/unix.c 2010-11-26 16:58:35.000000000 +0300 +@@ -30,6 +30,9 @@ + #define UNZIP_INTERNAL + #include "unzip.h" + ++#include ++#include ++ + #ifdef SCO_XENIX + # define SYSNDIR + #else /* SCO Unix, AIX, DNIX, TI SysV, Coherent 4.x, ... */ +@@ -1874,3 +1877,44 @@ static void qlfix(__G__ ef_ptr, ef_len) + } + } + #endif /* QLZIP */ ++ ++ ++char OEM_CP[MAX_CP_NAME] = ""; ++char ISO_CP[MAX_CP_NAME] = ""; ++ ++/* Getr the default value of OEM_CP based on the current locale. ++ * ISO_CP is left alone for now. */ ++void init_conversion_charsets() ++{ ++ /* Make a guess only if OEM_CP not already set. */ ++ if(*OEM_CP == '\0') { ++ const char * archive_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, ""); ++ strncpy(OEM_CP, archive_charset, sizeof(OEM_CP)); ++ } ++ ++ if(*ISO_CP == '\0') { ++ const char * archive_charset = natspec_get_charset_by_locale(NATSPEC_WINCS, ""); ++ strncpy(ISO_CP, archive_charset, sizeof(ISO_CP)); ++ } ++ ++} ++ ++/* Convert a string from OEM_CP to the current locale charset. */ ++inline void oem_intern(char *string) ++{ ++ char *buf = natspec_convert(string, 0, OEM_CP, 0); ++ /* Since Ext_ASCII_TO_Native used only for G.filename[FILNAMESIZE], ++ use FILNAMSIZ as string size */ ++ strncpy(string, buf, FILNAMSIZ); ++ free (buf); ++} ++ ++/* Convert a string from ISO_CP to the current locale charset. */ ++inline void iso_intern(char *string) ++{ ++ char *buf = natspec_convert(string, 0, ISO_CP, 0); ++ /* Since Ext_ASCII_TO_Native used only for G.filename[FILNAMESIZE], ++ use FILNAMSIZ as string size */ ++ strncpy(string, buf, FILNAMSIZ); ++ free (buf); ++} +diff -pur unzip60orig/unix/unxcfg.h unzip60/unix/unxcfg.h +--- unzip60orig/unix/unxcfg.h 2009-04-16 22:36:12.000000000 +0400 ++++ unzip60/unix/unxcfg.h 2010-11-26 16:58:35.000000000 +0300 +@@ -227,4 +227,30 @@ typedef struct stat z_stat; + /* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */ + /* and notfirstcall are used by do_wild(). */ + ++ ++#define MAX_CP_NAME 25 ++ ++#ifdef SETLOCALE ++# undef SETLOCALE ++#endif ++#define SETLOCALE(category, locale) setlocale(category, locale) ++#include ++ ++#ifdef _ISO_INTERN ++# undef _ISO_INTERN ++#endif ++#define _ISO_INTERN(str1) iso_intern(str1) ++ ++#ifdef _OEM_INTERN ++# undef _OEM_INTERN ++#endif ++#ifndef IZ_OEM2ISO_ARRAY ++# define IZ_OEM2ISO_ARRAY ++#endif ++#define _OEM_INTERN(str1) oem_intern(str1) ++ ++void iso_intern(char *); ++void oem_intern(char *); ++void init_conversion_charsets(void); ++ + #endif /* !__unxcfg_h */ +diff -pur unzip60orig/unzip.c unzip60/unzip.c +--- unzip60orig/unzip.c 2009-04-16 22:26:52.000000000 +0400 ++++ unzip60/unzip.c 2010-11-26 16:58:35.000000000 +0300 +@@ -331,7 +331,9 @@ static ZCONST char Far ZipInfoUsageLine3 + -h print header line -t print totals for listed files or for all\n\ + -z print zipfile comment -T print file times in sortable decimal format\ + \n -C be case-insensitive %s\ +- -x exclude filenames that follow from listing\n"; ++ -x exclude filenames that follow from listing\n\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; + #ifdef MORE + static ZCONST char Far ZipInfoUsageLine4[] = + " -M page output through built-in \"more\"\n"; +@@ -673,7 +674,9 @@ modifiers:\n\ + -j junk paths (do not make directories) -aa treat ALL files as text\n\ + -U use escapes for all non-ASCII Unicode -UU ignore any Unicode fields\n\ + -C match filenames case-insensitively -L make (some) names \ +-lowercase\n %-42s -V retain VMS version numbers\n%s"; ++lowercase\n %-42s -V retain VMS version numbers\n%s\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; + #endif /* ?VMS */ + #else /* !UNICODE_SUPPORT */ + #ifdef VMS +@@ -692,7 +695,9 @@ modifiers:\n\ + -o overwrite files WITHOUT prompting -a auto-convert any text files\n\ + -j junk paths (do not make directories) -aa treat ALL files as text\n\ + -C match filenames case-insensitively -L make (some) names \ +-lowercase\n %-42s -V retain VMS version numbers\n%s"; ++lowercase\n %-42s -V retain VMS version numbers\n%s\ ++ -O CHARSET specify a character encoding for DOS, Windows and OS/2 archives\n\ ++ -I CHARSET specify a character encoding for UNIX and other archives\n"; + #endif /* ?VMS */ + #endif /* ?UNICODE_SUPPORT */ + +@@ -803,6 +808,10 @@ int unzip(__G__ argc, argv) + #endif /* UNICODE_SUPPORT */ + + ++#ifdef UNIX ++ init_conversion_charsets(); ++#endif ++ + #if (defined(__IBMC__) && defined(__DEBUG_ALLOC__)) + extern void DebugMalloc(void); + +@@ -1336,6 +1345,11 @@ int uz_opts(__G__ pargc, pargv) + argc = *pargc; + argv = *pargv; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif ++ + while (++argv, (--argc > 0 && *argv != NULL && **argv == '-')) { + s = *argv + 1; + while ((c = *s++) != 0) { /* "!= 0": prevent Turbo C warning */ +@@ -1517,6 +1531,35 @@ int uz_opts(__G__ pargc, pargv) + } + break; + #endif /* MACOS */ ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('j'): /* junk pathnames/directory structure */ + if (negative) + uO.jflag = FALSE, negative = 0; +@@ -1592,6 +1635,35 @@ int uz_opts(__G__ pargc, pargv) + } else + ++uO.overwrite_all; + break; ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case ('p'): /* pipes: extract to stdout, no messages */ + if (negative) { + uO.cflag = FALSE; +diff -pur unzip60orig/unzpriv.h unzip60/unzpriv.h +--- unzip60orig/unzpriv.h 2009-04-20 03:59:26.000000000 +0400 ++++ unzip60/unzpriv.h 2010-11-26 16:58:35.000000000 +0300 +@@ -3008,7 +3008,7 @@ char *GetLoadPath OF((__GPRO)); + !(((islochdr) || (isuxatt)) && \ + ((hostver) == 25 || (hostver) == 26 || (hostver) == 40))) || \ + (hostnum) == FS_HPFS_ || \ +- ((hostnum) == FS_NTFS_ && (hostver) == 50)) { \ ++ ((hostnum) == FS_NTFS_/* && (hostver) == 50*/)) { \ + _OEM_INTERN((string)); \ + } else { \ + _ISO_INTERN((string)); \ +diff -pur unzip60orig/zipinfo.c unzip60/zipinfo.c +--- unzip60orig/zipinfo.c 2009-02-08 20:04:30.000000000 +0300 ++++ unzip60/zipinfo.c 2010-11-26 16:58:35.000000000 +0300 +@@ -457,6 +457,10 @@ int zi_opts(__G__ pargc, pargv) + int tflag_slm=TRUE, tflag_2v=FALSE; + int explicit_h=FALSE, explicit_t=FALSE; + ++#ifdef UNIX ++ extern char OEM_CP[MAX_CP_NAME]; ++ extern char ISO_CP[MAX_CP_NAME]; ++#endif + + #ifdef MACOS + uO.lflag = LFLAG; /* reset default on each call */ +@@ -501,6 +505,35 @@ int zi_opts(__G__ pargc, pargv) + uO.lflag = 0; + } + break; ++#ifdef UNIX ++ case ('I'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Icharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } else { /* -I charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(ISO_CP, s, sizeof(ISO_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 'l': /* longer form of "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; +@@ -521,6 +554,35 @@ int zi_opts(__G__ pargc, pargv) + G.M_flag = TRUE; + break; + #endif ++#ifdef UNIX ++ case ('O'): ++ if (negative) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: encodings can't be negated")); ++ return(PK_PARAM); ++ } else { ++ if(*s) { /* Handle the -Ocharset case */ ++ /* Assume that charsets can't start with a dash to spot arguments misuse */ ++ if(*s == '-') { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -I argument")); ++ return(PK_PARAM); ++ } ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } else { /* -O charset */ ++ ++argv; ++ if(!(--argc > 0 && *argv != NULL && **argv != '-')) { ++ Info(slide, 0x401, ((char *)slide, ++ "error: a valid character encoding should follow the -O argument")); ++ return(PK_PARAM); ++ } ++ s = *argv; ++ strncpy(OEM_CP, s, sizeof(OEM_CP)); ++ } ++ while(*(++s)); /* No params straight after charset name */ ++ } ++ break; ++#endif /* ?UNIX */ + case 's': /* default: shorter "ls -l" type listing */ + if (negative) + uO.lflag = -2, negative = 0; diff -uNr a/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch b/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch --- a/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch false +++ b/app-arch/unzip/files/unzip-6.0-no-exec-stack.patch cf2a78feea53882abf8afbe7cd6f9bc3cdbf54a3ca012e5c4c90efbd9b6e3ca90f1f77641b5cdef3165704098ed5171dd0dd40e75d5855cb45f5b90a0d368e43 @@ -0,0 +1,13 @@ +Make sure that the asm files don't incorrectly trigger an executable +stack marking in the final shared library. That's bad, mmmkay. + +--- unzip/crc_i386.S ++++ unzip/crc_i386.S +@@ -302,3 +302,7 @@ + #endif /* i386 || _i386 || _I386 || __i386 */ + + #endif /* !USE_ZLIB && !CRC_TABLE_ONLY */ ++ ++#if defined(__linux__) && defined(__ELF__) ++.section .note.GNU-stack,"",%progbits ++#endif diff -uNr a/app-arch/unzip/metadata.xml b/app-arch/unzip/metadata.xml --- a/app-arch/unzip/metadata.xml false +++ b/app-arch/unzip/metadata.xml b8bfffbae1464a5db858a02cf7a97c90b116974a3cd65869e3ce0b99cdd772dbbd5b74cadca7700f8ff367784f036c411b2ee9bbf1d73bbd2213c23da4e6caac @@ -0,0 +1,14 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + Use dev-libs/libnatspec to correctly decode non-ascii file names archived in Windows. + + + infozip + + diff -uNr a/app-arch/unzip/unzip-6.0_p21-r2.ebuild b/app-arch/unzip/unzip-6.0_p21-r2.ebuild --- a/app-arch/unzip/unzip-6.0_p21-r2.ebuild false +++ b/app-arch/unzip/unzip-6.0_p21-r2.ebuild d3b1658bb8c11c650cce585f963463841a641474adfe1680ab33ab096424445b52e45029b89addc5f1a399a9f6b9d43a1e6595f2dd5b94dd3678a30f2447838b @@ -0,0 +1,86 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit eutils toolchain-funcs flag-o-matic + +MY_PV="${PV//.}" +MY_PV="${MY_PV%_p*}" +MY_P="${PN}${MY_PV}" + +DESCRIPTION="unzipper for pkzip-compressed files" +HOMEPAGE="http://www.info-zip.org/" +SRC_URI="mirror://sourceforge/infozip/${MY_P}.tar.gz + mirror://debian/pool/main/u/${PN}/${PN}_${PV/_p/-}.debian.tar.xz" + +LICENSE="Info-ZIP" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~arm-linux ~x86-linux" +IUSE="bzip2 natspec unicode" + +DEPEND="bzip2? ( app-arch/bzip2 ) + natspec? ( dev-libs/libnatspec )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + local deb="${WORKDIR}"/debian/patches + rm "${deb}"/02-this-is-debian-unzip.patch || die + eapply "${deb}"/*.patch + + eapply "${FILESDIR}"/${PN}-6.0-no-exec-stack.patch + eapply "${FILESDIR}"/${PN}-6.0-format-security.patch + use natspec && eapply "${FILESDIR}/${PN}-6.0-natspec.patch" #275244 + sed -i -r \ + -e '/^CFLAGS/d' \ + -e '/CFLAGS/s:-O[0-9]?:$(CFLAGS) $(CPPFLAGS):' \ + -e '/^STRIP/s:=.*:=true:' \ + -e "s:\:CC=\"$(tc-getCC)\":" \ + -e "s:\:LD=\"$(tc-getCC)\":" \ + -e "s:\:AS=\"$(tc-getCC)\":" \ + -e 's:LF2 = -s:LF2 = :' \ + -e 's:LF = :LF = $(LDFLAGS) :' \ + -e 's:SL = :SL = $(LDFLAGS) :' \ + -e 's:FL = :FL = $(LDFLAGS) :' \ + -e "/^#L_BZ2/s:^$(use bzip2 && echo .)::" \ + -e 's:$(AS) :$(AS) $(ASFLAGS) :g' \ + unix/Makefile \ + || die "sed unix/Makefile failed" + + # Delete bundled code to make sure we don't use it. + rm -r bzip2 || die + + eapply_user +} + +src_configure() { + case ${CHOST} in + i?86*-*linux*) TARGET="linux_asm" ;; + *linux*) TARGET="linux_noasm" ;; + i?86*-*bsd* | \ + i?86*-dragonfly*) TARGET="freebsd" ;; # mislabelled bsd with x86 asm + *bsd* | *dragonfly*) TARGET="bsd" ;; + *-darwin*) TARGET="macosx" ;; + *-cygwin*) TARGET="cygwin" ;; + *) die "Unknown target; please update the ebuild to handle ${CHOST} " ;; + esac + + [[ ${CHOST} == *linux* ]] && append-cppflags -DNO_LCHMOD + use bzip2 && append-cppflags -DUSE_BZIP2 + use unicode && append-cppflags -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DUSE_ICONV_MAPPING + append-cppflags -DLARGE_FILE_SUPPORT #281473 +} + +src_compile() { + ASFLAGS="${ASFLAGS} $(get_abi_var CFLAGS)" \ + emake -f unix/Makefile ${TARGET} +} + +src_install() { + dobin unzip funzip unzipsfx unix/zipgrep + dosym unzip /usr/bin/zipinfo + doman man/*.1 + dodoc BUGS History* README ToDo WHERE +} diff -uNr a/app-arch/xz-utils/Manifest b/app-arch/xz-utils/Manifest --- a/app-arch/xz-utils/Manifest false +++ b/app-arch/xz-utils/Manifest 42fc4b09009f2f2105f60faf77482358ddcb198b43d9e5fb08fe2ff1ebbaa331d46c1a73732ebeaf19a99e5094dbf8673a1162fa722a22e03b1c6437f480b699 @@ -0,0 +1,3 @@ +DIST xz-5.2.3.tar.gz 1490665 BLAKE2B 470791a67fe635165559b0364c9c0e968f3fc32ba7af53d0173d620ca65c68428e0d4d18ada341a063ea3eabb1b51a71cf873218ca0622fd41e01c20a6f04078 SHA512 a5eb4f707cf31579d166a6f95dbac45cf7ea181036d1632b4f123a4072f502f8d57cd6e7d0588f0bf831a07b8fc4065d26589a25c399b95ddcf5f73435163da6 +EBUILD xz-utils-5.2.3.ebuild 2600 BLAKE2B 3543e5f2c3021c9243b4484359fefd4705d6f7cef894ea14aa54190ff07f7b75e63996efcbd7c809b3125084c572b0141902bda3afce0bffd004ca43912818f8 SHA512 1e60ce955c6b67554ba5e59d1d7eb7d4ed37b830c4ea2d039732232057039a6b4a5b626bc333f93fa61e63c967ba3a33514427466e7ecdbb7db8e12f289950f4 +MISC metadata.xml 462 BLAKE2B 66d5625b239d042389ce8fef820efdc3ce3b5cbf21f6d0aedc4874d450ea1897dc8438575f3efc5a491ea857a8b990e6a51b16d0ff0b4982b41307bb52535cf1 SHA512 8f4ca7b987587a240f932ff1719f096de148db6e11c4e0af5f2f55552cab5d0af1256be337dbe8493b584d2c25a70a308dc28b90712078fb58f40cae37cfe5b1 diff -uNr a/app-arch/xz-utils/metadata.xml b/app-arch/xz-utils/metadata.xml --- a/app-arch/xz-utils/metadata.xml false +++ b/app-arch/xz-utils/metadata.xml da8eaf8a57950e487af8c676c53bb0f53a3e272cea262fbce541a3de6ce58f3f21800ea403208bf32b8bd38b26fed1ca0dc3074062d0597a7d096f6414f06c68 @@ -0,0 +1,13 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + Build additional filters that are not + used in any of the default xz presets. This includes delta + and BCJ coders, additional match finders and SHA256 checks. + + diff -uNr a/app-arch/xz-utils/xz-utils-5.2.3.ebuild b/app-arch/xz-utils/xz-utils-5.2.3.ebuild --- a/app-arch/xz-utils/xz-utils-5.2.3.ebuild false +++ b/app-arch/xz-utils/xz-utils-5.2.3.ebuild 0172eea04de283c31eb633518a1bc483014548dee94ebf5277dbcb6a812b441a3455cb0ea1cc173e3850f98bce44e93473bef9c283fd964a0041dd556c4a483c @@ -0,0 +1,91 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Remember: we cannot leverage autotools in this ebuild in order +# to avoid circular deps with autotools + +EAPI=5 + +inherit multilib toolchain-funcs libtool multilib-minimal preserve-libs + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://git.tukaani.org/xz.git" + inherit git-r3 autotools + SRC_URI="" + EXTRA_DEPEND="sys-devel/gettext dev-vcs/cvs >=sys-devel/libtool-2" #272880 286068 +else + MY_P="${PN/-utils}-${PV/_}" + SRC_URI="https://tukaani.org/xz/${MY_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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + S=${WORKDIR}/${MY_P} + EXTRA_DEPEND= +fi + +DESCRIPTION="utils for managing LZMA compressed files" +HOMEPAGE="https://tukaani.org/xz/" + +# See top-level COPYING file as it outlines the various pieces and their licenses. +LICENSE="public-domain LGPL-2.1+ GPL-2+" +SLOT="0" +IUSE="elibc_FreeBSD +extra-filters nls static-libs +threads" + +RDEPEND="! +Date: Mon, 8 May 2017 13:52:39 +0200 +Subject: [PATCH] gpg: Fix typo. + +-- +Signed-off-by: Justus Winter +--- + g10/packet.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/g10/packet.h b/g10/packet.h +index a10495c..d42510d 100644 +--- a/g10/packet.h ++++ b/g10/packet.h +@@ -623,7 +623,7 @@ struct parse_packet_ctx_s + iobuf_t inp; /* The input stream with the packets. */ + struct packet_struct last_pkt; /* The last parsed packet. */ + int free_last_pkt; /* Indicates that LAST_PKT must be freed. */ +- int skip_meta; /* Skip right trust packets. */ ++ int skip_meta; /* Skip ring trust packets. */ + }; + typedef struct parse_packet_ctx_s *parse_packet_ctx_t; + +-- +2.10.2 + diff -uNr a/app-crypt/gnupg/files/gnupg-2.1.20-gpg-Properly-account-for-ring-trust-packets.patch b/app-crypt/gnupg/files/gnupg-2.1.20-gpg-Properly-account-for-ring-trust-packets.patch --- a/app-crypt/gnupg/files/gnupg-2.1.20-gpg-Properly-account-for-ring-trust-packets.patch false +++ b/app-crypt/gnupg/files/gnupg-2.1.20-gpg-Properly-account-for-ring-trust-packets.patch 5e2fcc20004da01abdcffdaf0c1a7f14ac9664284915df6eb9449be98028bfba6f061733d0f4ebb0e567fb0e98591577138238dfbc7972eb5ab788929380142d @@ -0,0 +1,86 @@ +From 22739433e98be80e46fe7d01d52a9627c1aebaae Mon Sep 17 00:00:00 2001 +From: Justus Winter +Date: Mon, 8 May 2017 14:24:00 +0200 +Subject: [PATCH] gpg: Properly account for ring trust packets. + +* g10/keyring.c (keyring_get_keyblock): Use the parser's packet count +instead of counting ourself. +* g10/packet.h (struct parse_packet_ctx_s): New field +'n_parsed_packets'. +(init_parse_packet): Initialize new field. +* g10/parse-packet.c (parse): Count packets. +-- + +The 'keyring' keystore depends on the number of packets for delete and +update operations. With the rework of the ring trust packets, the +trust packets were no longer properly accounted for leading to keyring +corruptions. + +The 'keybox' store was not affected. + +GnuPG-bug-id: 3123 +GnuPG-bug-id: 3135 +GnuPG-bug-id: 3144 +Fixes-commit: a8895c99a7d0750132477d80cd66caaf3a709113 +Signed-off-by: Justus Winter +--- + g10/keyring.c | 4 ++-- + g10/packet.h | 2 ++ + g10/parse-packet.c | 3 +++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/g10/keyring.c b/g10/keyring.c +index e223f0f..50f1b82 100644 +--- a/g10/keyring.c ++++ b/g10/keyring.c +@@ -409,11 +409,11 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb) + pkt = xmalloc (sizeof *pkt); + init_packet (pkt); + init_parse_packet (&parsectx, a); +- hd->found.n_packets = 0;; ++ hd->found.n_packets = 0; + lastnode = NULL; + save_mode = set_packet_list_mode(0); + while ((rc=parse_packet (&parsectx, pkt)) != -1) { +- hd->found.n_packets++; ++ hd->found.n_packets = parsectx.n_parsed_packets; + if (gpg_err_code (rc) == GPG_ERR_UNKNOWN_PACKET) { + free_packet (pkt, &parsectx); + init_packet (pkt); +diff --git a/g10/packet.h b/g10/packet.h +index d42510d..cf2121c 100644 +--- a/g10/packet.h ++++ b/g10/packet.h +@@ -624,6 +624,7 @@ struct parse_packet_ctx_s + struct packet_struct last_pkt; /* The last parsed packet. */ + int free_last_pkt; /* Indicates that LAST_PKT must be freed. */ + int skip_meta; /* Skip ring trust packets. */ ++ unsigned int n_parsed_packets; /* Number of parsed packets. */ + }; + typedef struct parse_packet_ctx_s *parse_packet_ctx_t; + +@@ -633,6 +634,7 @@ typedef struct parse_packet_ctx_s *parse_packet_ctx_t; + (a)->last_pkt.pkt.generic= NULL;\ + (a)->free_last_pkt = 0; \ + (a)->skip_meta = 0; \ ++ (a)->n_parsed_packets = 0; \ + } while (0) + + #define deinit_parse_packet(a) do { \ +diff --git a/g10/parse-packet.c b/g10/parse-packet.c +index fa44f83..dbb7af8 100644 +--- a/g10/parse-packet.c ++++ b/g10/parse-packet.c +@@ -764,6 +764,9 @@ parse (parse_packet_ctx_t ctx, PACKET *pkt, int onlykeypkts, off_t * retpos, + partial? (new_ctb ? " partial" : " indeterminate") :"", + new_ctb? " new-ctb":""); + ++ /* Count it. */ ++ ctx->n_parsed_packets++; ++ + pkt->pkttype = pkttype; + rc = GPG_ERR_UNKNOWN_PACKET; /* default error */ + switch (pkttype) +-- +2.10.2 + diff -uNr a/app-crypt/gnupg/files/gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch b/app-crypt/gnupg/files/gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch --- a/app-crypt/gnupg/files/gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch false +++ b/app-crypt/gnupg/files/gnupg-2.1.20-gpgscm-Use-shorter-socket-path-lengts-to-improve-tes.patch e3982af208293640515bf44807f8192e59b21c14eaadd6499f095ca5a35a058b8561feed3e0bb5aa62197789fd457112d6df353167cddf0c053c48644037191c @@ -0,0 +1,33 @@ +From e3bdb7d17264b8d5bd9abab97c96d9c4a50e4f61 Mon Sep 17 00:00:00 2001 +From: Kristian Fiskerstrand +Date: Mon, 3 Apr 2017 23:44:56 +0300 +Subject: [PATCH] gpgscm: Use shorter socket path lengts to improve test + reliability + +-- +As socket lengths are normally restricted to 108 characters +(UNIX_PATH_MAX variable in /usr/include/linux/un.h), using 42 characters +by default easily results in errors. +--- + tests/gpgscm/tests.scm | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/gpgscm/tests.scm b/tests/gpgscm/tests.scm +index 592b36f..f54a387 100644 +--- a/tests/gpgscm/tests.scm ++++ b/tests/gpgscm/tests.scm +@@ -273,9 +273,9 @@ + (canonical-path (_mkdtemp (if (null? components) + (path-join + (get-temp-path) +- (string-append "gpgscm-" (get-isotime) "-" ++ (string-append "gscm" + (basename-suffix *scriptname* ".scm") +- "-XXXXXX")) ++ "XXXXXX")) + (apply path-join components))))) + + ;; Make a temporary directory and remove it at interpreter shutdown. +-- +2.10.2 + diff -uNr a/app-crypt/gnupg/files/gnupg-2.2.4-dirmngr-Handle-failures-related-to-missing-IPv6.patch b/app-crypt/gnupg/files/gnupg-2.2.4-dirmngr-Handle-failures-related-to-missing-IPv6.patch --- a/app-crypt/gnupg/files/gnupg-2.2.4-dirmngr-Handle-failures-related-to-missing-IPv6.patch false +++ b/app-crypt/gnupg/files/gnupg-2.2.4-dirmngr-Handle-failures-related-to-missing-IPv6.patch 1cf29dad555232545e7246710a2081001b6c01d23389101f3bb72c1184560160dcb74b0a8c40fafaa5f54400bb4e910a0075f0cf6865d63f659fac69078bf388 @@ -0,0 +1,31 @@ +From b7f48a0095a5b010b94f8192f4adc1adf8697567 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Wed, 31 Jan 2018 16:57:19 +0100 +Subject: [PATCH] dirmngr: Handle failures related to missing IPv6 gracefully + +Handle the two possible connect failures related to missing IPv6 support +gracefully by marking the host dead and retrying with another one. +If IPv6 is disabled via procfs, connect() will return EADDRNOTAVAIL. +If IPv6 is not compiled into the kernel, it will return EAFNOSUPPORT. +This makes it possible to use dual-stack hkp servers on hosts not having +IPv6 without random connection failures. +--- + dirmngr/ks-engine-hkp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c +index 4a0b08f4f..a9bb93666 100644 +--- a/dirmngr/ks-engine-hkp.c ++++ b/dirmngr/ks-engine-hkp.c +@@ -1353,6 +1353,8 @@ handle_send_request_error (ctrl_t ctrl, gpg_error_t err, const char *request, + case GPG_ERR_UNKNOWN_HOST: + case GPG_ERR_NETWORK: + case GPG_ERR_EIO: /* Sometimes used by estream cookie functions. */ ++ case GPG_ERR_EADDRNOTAVAIL: /* e.g. when IPv6 is disabled */ ++ case GPG_ERR_EAFNOSUPPORT: /* e.g. when IPv6 is not compiled in */ + if (mark_host_dead (request) && *tries_left) + retry = 1; + break; +-- +2.16.1 + diff -uNr a/app-crypt/gnupg/gnupg-1.4.21.ebuild b/app-crypt/gnupg/gnupg-1.4.21.ebuild --- a/app-crypt/gnupg/gnupg-1.4.21.ebuild false +++ b/app-crypt/gnupg/gnupg-1.4.21.ebuild a4179354a71ec1e0785cfdad65e8fe8ff505667e8144079b66e23b2349d25f4b95f17d4b6393137b05d7016b217dd889cc67bdb7505c61923127050b3383ac12 @@ -0,0 +1,114 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils flag-o-matic toolchain-funcs + +ECCVER="0.2.0" +ECCVER_GNUPG="1.4.9" +ECC_PATCH="${PN}-${ECCVER_GNUPG}-ecc${ECCVER}.diff" +MY_P=${P/_/} + +DESCRIPTION="The GNU Privacy Guard, a GPL pgp replacement" +HOMEPAGE="http://www.gnupg.org/" +SRC_URI="mirror://gnupg/gnupg/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos" +IUSE="bzip2 curl ldap mta nls readline selinux smartcard static usb zlib" + +COMMON_DEPEND=" + ldap? ( net-nds/openldap ) + bzip2? ( app-arch/bzip2 ) + zlib? ( sys-libs/zlib ) + curl? ( net-misc/curl ) + mta? ( virtual/mta ) + readline? ( sys-libs/readline:0= ) + smartcard? ( =virtual/libusb-0* ) + usb? ( =virtual/libusb-0* )" + +RDEPEND="!static? ( ${COMMON_DEPEND} ) + selinux? ( sec-policy/selinux-gpg ) + nls? ( virtual/libintl )" + +DEPEND="${COMMON_DEPEND} + dev-lang/perl + nls? ( sys-devel/gettext )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + # bug#469388 + sed -i -e 's/--batch --dearmor/--homedir . --batch --dearmor/' checks/Makefile.in + + # Fix PIC definitions + sed -i -e 's:PIC:__PIC__:' mpi/i386/mpih-{add,sub}1.S intl/relocatable.c \ + || die "sed PIC failed" + sed -i -e 's:if PIC:ifdef __PIC__:' mpi/sparc32v8/mpih-mul{1,2}.S || \ + die "sed PIC failed" +} + +src_configure() { + # Certain sparc32 machines seem to have trouble building correctly with + # -mcpu enabled. While this is not a gnupg problem, it is a temporary + # fix until the gcc problem can be tracked down. + if [ "${ARCH}" == "sparc" ] && [ "${PROFILE_ARCH}" == "sparc" ]; then + filter-flags -mcpu=supersparc -mcpu=v8 -mcpu=v7 + fi + + # 'USE=static' support was requested in #29299 + use static && append-ldflags -static + + econf \ + --docdir="${EPREFIX}/usr/share/doc/${PF}" \ + $(use_enable ldap) \ + $(use_enable mta mailto) \ + --enable-hkp \ + --enable-finger \ + $(use_with !zlib included-zlib) \ + $(use_with curl libcurl /usr) \ + $(use_enable nls) \ + $(use_enable bzip2) \ + $(use_enable smartcard card-support) \ + $(use_enable selinux selinux-support) \ + --without-capabilities \ + $(use_with readline) \ + $(use_with usb libusb /usr) \ + --enable-static-rnd=linux \ + --libexecdir="${EPREFIX}/usr/libexec" \ + --enable-noexecstack \ + CC_FOR_BUILD=$(tc-getBUILD_CC) \ + ${myconf} +} + +src_install() { + default + + # keep the documentation in /usr/share/doc/... + rm -rf "${ED}usr/share/gnupg/FAQ" "${ED}usr/share/gnupg/faq.html" || die + + dodoc AUTHORS BUGS ChangeLog NEWS PROJECTS README THANKS \ + TODO VERSION doc/{FAQ,HACKING,DETAILS,OpenPGP} + + exeinto /usr/libexec/gnupg + doexe tools/make-dns-cert +} + +pkg_postinst() { + ewarn "If you are using a non-Linux system, or a kernel older than 2.6.9," + ewarn "you MUST make the gpg binary setuid." + echo +# if use !bindist && use ecc; then +# ewarn +# ewarn "The elliptical curves patch is experimental" +# ewarn "Further info available at http://alumnes.eps.udl.es/%7Ed4372211/index.en.html" +# fi + elog + elog "See https://wiki.gentoo.org/wiki/GnuPG for documentation on gnupg" + elog + elog "If you wish to view images emerge:" + elog "media-gfx/xloadimage, media-gfx/xli or any other viewer" + elog "Remember to use photo-viewer option in configuration file to activate the right viewer" +} diff -uNr a/app-crypt/gnupg/metadata.xml b/app-crypt/gnupg/metadata.xml --- a/app-crypt/gnupg/metadata.xml false +++ b/app-crypt/gnupg/metadata.xml 259af91109664e2a07af4167adabef2cd3453371c9847ff090e23b86716a7cd67003fb5f2a7958fa12348eda8ca81cc2ab4ca7380734a2ed901c1f5209defb78 @@ -0,0 +1,38 @@ + + + + + k_f@gentoo.org + Kristian Fiskerstrand + + + crypto@gentoo.org + Crypto + + + GnuPG is a complete and free implementation of the OpenPGP standard as + defined by RFC4880. + + + + Build scdaemon software. Enables usage of OpenPGP cards. For + other type of smartcards, try app-crypt/gnupg-pkcs11-scd. + Bring in dev-libs/libusb as a dependency; enable scdaemon. + + + Build direct CCID access for scdaemon; requires dev-libs/libusb. + + + Build mta support using virtual/mta. + + + Enable support for Trust on First use trust model; requires dev-db/sqlite. + + + Install extra tools (including gpgsplit and gpg-zip). + + + Install the wks-server + + + diff -uNr a/app-editors/nano/Manifest b/app-editors/nano/Manifest --- a/app-editors/nano/Manifest false +++ b/app-editors/nano/Manifest 581247a6b20e4436ca77b1a6584fcbed3291990c4d92b021ed69c375a06c8910d71eb24c1c2b3a360f17da734f0352aebcfaf1ef068cee632753bb616882d10a @@ -0,0 +1,4 @@ +AUX nano-2.8.7-minimal_compile_fix.patch 1206 BLAKE2B 72265b226a23282baf1d16fe62637a3a6123342da9ddf9fa205d7eaafea710aa62fcafad1188cc1c08bd537be3ddb98403afbfd035fdac5712d6bf24bf2fa40e SHA512 1ebf43ca322c0cd49b7a3ffaad33057d4ac899c7a930569df124e54f713b28ece7e01aa625db91ece0126a07228256d188154bce464bd4c1a97945d686d9f0f3 +DIST nano-2.8.7.tar.gz 2822417 BLAKE2B 2559497b9aee4d4c3cfc86e8af6a54bc0af58588c7bd1142a0e97c6ce50aed66c3852745b83a457263659e97592f0775dcc94c44d818e20440b6524202bfe49a SHA512 511b57f8fe82872827829bca91f7a8666a6ee75924cf2c853332ddd0467abf281c6d3cbaa5dd208c579cbace5bef23d36bd7b62be116aa2175262ed1d15aaf79 +EBUILD nano-2.8.7.ebuild 2307 BLAKE2B b7ab4e20fcb2dcec5b6f2a198fbcb2a2619f9f29081521d1ce7a555be8bf44ef060ad9b8f3f229bf272bd5cf6c5f066e10d08f2596b5d3954279be71a4d09ad6 SHA512 693683af78bc48911cb50813cd8e02ded2546ce8efc79c5897c804c64479d889518d88f1cbcfa79e11409fd0f26543be270f2da451618d4b3756dd7d2bc7b4bc +MISC metadata.xml 1548 BLAKE2B 36d9d02603b824fd0af0f1a487fcdcd7ffe2266acc1459b137612efb7ff6af7b8dfd19d6deb0177dc5120eadb27e277e25ef01288c930c97bdab34cdc15b581b SHA512 97bce71ba1b5b906c48be48c5f0af78092acbef27c62bce92b515b773242e81a6e9b978970eda192df66e244e58832783147f0d35f0fab5350f1f9f0a0d83c82 diff -uNr a/app-editors/nano/files/nano-2.8.7-minimal_compile_fix.patch b/app-editors/nano/files/nano-2.8.7-minimal_compile_fix.patch --- a/app-editors/nano/files/nano-2.8.7-minimal_compile_fix.patch false +++ b/app-editors/nano/files/nano-2.8.7-minimal_compile_fix.patch 123e8b69edc09cd7faa9defa8d95ca9648988e46c75591d8004fbd60411f06ac9f8771bcacfbd3f289dff8213c4c31300a96aaf2f4048b7924a3dcc1a2c71ec1 @@ -0,0 +1,38 @@ +From 28cfab7580c42a6d6c9c5d787ce736094fd51a0c Mon Sep 17 00:00:00 2001 +From: Benno Schulenberg +Date: Tue, 29 Aug 2017 19:28:44 +0200 +Subject: tweaks: fix compilation when configured with --enable-tiny + +When moving the cursor to the top-left corner, it is not necessary +to compute leftedge because firstcolumn IS the relevant leftedge. + +Reported-by: Jordi Mallach +--- + src/move.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/move.c b/src/move.c +index d138356..ce276e4 100644 +--- a/src/move.c ++++ b/src/move.c +@@ -121,7 +121,7 @@ void do_page_up(void) + openfile->current = openfile->edittop; + openfile->current_y = 0; + +- leftedge = leftedge_for(openfile->firstcolumn, openfile->edittop); ++ leftedge = openfile->firstcolumn; + target_column = 0; + } else + get_edge_and_target(&leftedge, &target_column); +@@ -152,7 +152,7 @@ void do_page_down(void) + openfile->current = openfile->edittop; + openfile->current_y = 0; + +- leftedge = leftedge_for(openfile->firstcolumn, openfile->edittop); ++ leftedge = openfile->firstcolumn; + target_column = 0; + } else + get_edge_and_target(&leftedge, &target_column); +-- +cgit v1.0-41-gc330 + diff -uNr a/app-editors/nano/metadata.xml b/app-editors/nano/metadata.xml --- a/app-editors/nano/metadata.xml false +++ b/app-editors/nano/metadata.xml 15f7ba139ffd12f12648c5733fa6406beae11565bfac9bb2a576457392b1f79e647712a958f73ce53d3017e3d45a9676da9fa873640fbd6f6e15565a416b3b76 @@ -0,0 +1,39 @@ + + + + + polynomial-c@gentoo.org + Lars Wendler + + +GNU nano - an enhanced clone of the Pico text editor. + +The nano project was started because of a few "problems" with the +wonderfully easy-to-use and friendly Pico text editor. + +First and foremost is its license: the Pine suite does not use the +GPL or a GPL-friendly license, and has unclear restrictions on +redistribution. Because of this, Pine and Pico are not included with +many GNU/Linux distributions. Also, other features (like goto line +number or search and replace) were unavailable until recently or +require a command line flag. Yuck. + +nano aims to solve these problems by emulating the functionality of +Pico as closely as possible while addressing the problems above and +perhaps providing other extra functionality. + + + Enable justify/unjustify functions for text formatting. + + Enable debug messages and assert warnings. Note that these will all be sent + straight to stderr rather than some logging facility. + + + Add magic file support (sys-apps/file) to automatically detect appropriate syntax highlighting + + + Disable all fancy features, including ones that otherwise have a dedicated + USE flag (such as spelling). + + + diff -uNr a/app-editors/nano/nano-2.8.7.ebuild b/app-editors/nano/nano-2.8.7.ebuild --- a/app-editors/nano/nano-2.8.7.ebuild false +++ b/app-editors/nano/nano-2.8.7.ebuild f16afbc8e1a4721a37517e10b2c7fa716d0fc5510627742e7f6e7a7f168898693bd87e52bd5dedb38d0717a65bc39b7eea77ce4b39643ead9aaa5ded4d3f33be @@ -0,0 +1,87 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit eutils flag-o-matic +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.sv.gnu.org/nano.git" + inherit git-r3 autotools +else + MY_P=${PN}-${PV/_} + SRC_URI="https://www.nano-editor.org/dist/v${PV:0:3}/${MY_P}.tar.gz" + KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +fi + +DESCRIPTION="GNU GPL'd Pico clone with more functionality" +HOMEPAGE="https://www.nano-editor.org/ https://wiki.gentoo.org/wiki/Nano/Basics_Guide" + +LICENSE="GPL-3" +SLOT="0" +IUSE="debug justify +magic minimal ncurses nls slang +spell static unicode" + +LIB_DEPEND=">=sys-libs/ncurses-5.9-r1:0=[unicode?] + sys-libs/ncurses:0=[static-libs(+)] + magic? ( sys-apps/file[static-libs(+)] ) + nls? ( virtual/libintl ) + !ncurses? ( slang? ( sys-libs/slang[static-libs(+)] ) )" +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + virtual/pkgconfig + static? ( ${LIB_DEPEND} )" + +PATCHES=( + "${FILESDIR}/${P}-minimal_compile_fix.patch" #629510 +) + +src_prepare() { + default + if [[ ${PV} == "9999" ]] ; then + eautoreconf + fi +} + +src_configure() { + use static && append-ldflags -static + local myconf=( + --bindir="${EPREFIX}"/bin + --htmldir=/trash + $(use_enable !minimal color) + $(use_enable !minimal multibuffer) + $(use_enable !minimal nanorc) + --disable-wrapping-as-root + $(use_enable magic libmagic) + $(use_enable spell speller) + $(use_enable justify) + $(use_enable debug) + $(use_enable nls) + $(use_enable unicode utf8) + $(use_enable minimal tiny) + $(usex ncurses --without-slang $(use_with slang)) + ) + case ${CHOST} in + *-gnu*|*-uclibc*) myconf+=( "--with-wordbounds" ) ;; #467848 + esac + econf "${myconf[@]}" +} + +src_install() { + default + rm -rf "${D}"/trash + + dodoc doc/sample.nanorc + docinto html + dodoc doc/faq.html + insinto /etc + newins doc/sample.nanorc nanorc + if ! use minimal ; then + # Enable colorization by default. + sed -i \ + -e '/^# include /s:# *::' \ + "${ED%/}"/etc/nanorc || die + fi + + dodir /usr/bin + dosym ../../bin/nano /usr/bin/nano +} diff -uNr a/app-eselect/eselect-python/Manifest b/app-eselect/eselect-python/Manifest --- a/app-eselect/eselect-python/Manifest false +++ b/app-eselect/eselect-python/Manifest 62470983033cecf0fa25da04177ef3f58e6c44617013526d194e91aabf08987bc46d24670196aebcfdb49de2e19e1b39b94c4d0515f10574621efe46f9d7503f @@ -0,0 +1,3 @@ +DIST eselect-python-20171204.tar.bz2 46655 BLAKE2B f0bc46c796a1b9e01f964994219b9c7831f99844a12e97429b40482e28a590a2d825f7b6fbca27b0ca1ce616e5cfb388272af686ea2de65fda69da0319fddeda SHA512 f89183ca992bc38f2308a3217602d5ce6ec4b3b5b614f2aec48fb5b3b7e50a2e44dd18af36a7cfbd4b45d05346f2be97605e35fd274558e9173c6974681c8fa9 +EBUILD eselect-python-20171204.ebuild 1097 BLAKE2B aba4e4bdf7a42648e0de794efb149cd1009d1eb04f3425ebfea426096e905f13fec3fcf58c2d4ae077db345caa359567fca4921f919aded50bae2e3a58192729 SHA512 bd0330ef77f0b1b6ccb76734fb58cc43a96ac490e08e4871b21e1425c67ec2c7ac5a06f08a21ad5c21f3970ddc91940766dedd3047d2e1f17583df25bcfcec6b +MISC metadata.xml 240 BLAKE2B 41e6a4d9da33dab2decc5ff419924f382a8f64d27a81fdb97576db8c6cf125be95911747946ec8be1b453f56617fef1084f5947f84b50a8db419d46df2ae8a0f SHA512 9c23321eaa853f851bf00195ea64ac2ba093e516f9b57855ee5aa58fbb1988130c9f0c17c2a9ce9fae4ee033e0a28a70c868e0f5acdfa1dd316ab533c5279d59 diff -uNr a/app-eselect/eselect-python/eselect-python-20171204.ebuild b/app-eselect/eselect-python/eselect-python-20171204.ebuild --- a/app-eselect/eselect-python/eselect-python-20171204.ebuild false +++ b/app-eselect/eselect-python/eselect-python-20171204.ebuild 8aafbe11d7a09c6c00ae5a4e5f0b5eb103e486197916274119d0bf67228d5844b745810f8a67c6c7be96b39401686401be3e02f4971bda42de4b2b11b3298355 @@ -0,0 +1,40 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +if [[ ${PV} == "99999999" ]] ; then + inherit autotools git-r3 + EGIT_REPO_URI="git://anongit.gentoo.org/proj/${PN}.git" +else + SRC_URI="https://dev.gentoo.org/~mgorny/dist/${P}.tar.bz2" + 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="Eselect module for management of multiple Python versions" +HOMEPAGE="https://www.gentoo.org/proj/en/Python/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="" + +# python-exec-2.4.2 for working -l option +RDEPEND=">=app-admin/eselect-1.2.3 + >=dev-lang/python-exec-2.4.2" + +src_prepare() { + default + [[ ${PV} == "99999999" ]] && eautoreconf +} + +pkg_postinst() { + local py + + if has_version 'dev-lang/python'; then + eselect python update --if-unset + fi + + if has_version "=dev-lang/python-3*"; then + eselect python update "--python3" --if-unset + fi +} diff -uNr a/app-eselect/eselect-python/metadata.xml b/app-eselect/eselect-python/metadata.xml --- a/app-eselect/eselect-python/metadata.xml false +++ b/app-eselect/eselect-python/metadata.xml f03580f742965fc8e9fea8d8a9dc053e123459906ce7ddad7212a08ce3e1937bfb30349ea5979674b6d68348956267644f2f4178df01c144c26025f6f73b5070 @@ -0,0 +1,8 @@ + + + + + python@gentoo.org + Python + + diff -uNr a/app-misc/c_rehash/Manifest b/app-misc/c_rehash/Manifest --- a/app-misc/c_rehash/Manifest false +++ b/app-misc/c_rehash/Manifest 9d9eb0a15173a0459ea47875ca8fd1f9c6176c9c9b2ce46078936c0e17bf4263fc1f883d415320c7ea1c5af5867b1bbe60eb17f82e9dba8528f24817b031e88a @@ -0,0 +1,3 @@ +DIST openssl-c_rehash.sh.1.7 4167 BLAKE2B fc501a74aec82f37c4c967434df208ac38fc9f7385db6e0bc90fa8d8aef2e5f71b40f0a40d59e2f8e57e9e8883251e4f977759fb484f4b4b6def14967789b55e SHA512 55e8c2e827750a4f375cb83c86bfe2d166c01ffa5d7e9b16657b72b38b747c8985dd2c98f854c911dfbbee2ff3e92aff39fdf089d979b2e3534b7685ee8b80da +EBUILD c_rehash-1.7-r1.ebuild 1028 BLAKE2B 62a51670325b44cab5bcdadfab89322f34f9014983eb94fb7e7cb4992a167bcb204b1d77c5ad64e2eb5bb64c64ea1218e322e1661c40f86f9719dff6248aaeae SHA512 bc6500a576495bbecb42f49292dff490d33758e27e256392540e23db8e011f6b6e82efaa28b87d832dc0cc47caacf969dd4676247759fc32b03c53243c33ecb8 +MISC metadata.xml 339 BLAKE2B d4fe9d24a3b12ddea1d503e6998c510bdbce33677cb45c3deab9c4de28a0c88d592d1357e9e7b029ad46d043095cdfe00e747dc63c1feccb5fab6c14d4459710 SHA512 611bcd575733b05ac99027ea49a79c29fa969eeccf75b12cfda6e77a42b2241e414951b25b089eeac7fd2255d42872b38c68fc5d004880b5dfe7a89c73e8f64c diff -uNr a/app-misc/c_rehash/c_rehash-1.7-r1.ebuild b/app-misc/c_rehash/c_rehash-1.7-r1.ebuild --- a/app-misc/c_rehash/c_rehash-1.7-r1.ebuild false +++ b/app-misc/c_rehash/c_rehash-1.7-r1.ebuild 66e5ed0b19e8cf943714debf11a721cfb34a92779d80b79d2f45f3e9d8175f71cb4a163fc44a5f1c86e8cf88afff5240f4d28b30c9900847f1f01ab0cc108482 @@ -0,0 +1,31 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="c_rehash script from OpenSSL" +HOMEPAGE="https://www.openssl.org/ https://github.com/pld-linux/openssl/" +SRC_URI="https://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/openssl/openssl-c_rehash.sh?rev=${PV} -> openssl-c_rehash.sh.${PV}" + +LICENSE="openssl" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="" + +RDEPEND="! "${WORKDIR}"/c_rehash || die #416717 +} + +src_install() { + dobin "${WORKDIR}"/c_rehash +} diff -uNr a/app-misc/c_rehash/metadata.xml b/app-misc/c_rehash/metadata.xml --- a/app-misc/c_rehash/metadata.xml false +++ b/app-misc/c_rehash/metadata.xml 5a5e40e89f7b0175769db38ac3ce0c44307133620eec8fb833f7ab3021e9fc721b2db50583a8df3cfe8b5095c1440818e1fd17a497b6779c1abc52c737cc43a4 @@ -0,0 +1,11 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + pld-linux/openssl + + diff -uNr a/app-misc/ca-certificates/Manifest b/app-misc/ca-certificates/Manifest --- a/app-misc/ca-certificates/Manifest false +++ b/app-misc/ca-certificates/Manifest 86d3a0f3e747777dd31caa609c6c0494c05bb8c1e61cc853b62161bdcdd9d589cb6c7fbb10a37fc29225139aea8af0bad59ec5c302aaf6b92371f785d210e9b2 @@ -0,0 +1,6 @@ +AUX ca-certificates-20150426-root.patch 1336 BLAKE2B f52a2ab1f84a18e447b37905f2d4fc6a8b59b9931db387e9045167973a0bb98ee11164ccbc13c7ea7fb545fab45a8112df5806a5a13d2b77abf682eec1390a15 SHA512 4e68e6068921e9ed54bda68af422a491cb530b60ffbb85fe1986a403cd9023522c179b5afcf65e22c223a665163d1c2d1993322d652053b72e3fe07efe692d59 +DIST ca-certificates_20170717.tar.xz 293028 BLAKE2B 85076cd980841f32e2544c7be020fca9bcd5ef7066ae3cef195cbf9755f8b8e800a8e4076662fa1b7da600c2235e49048eb6e1166b0618fc7685221ab790fed3 SHA512 dfeb5a19bb33bcb127a159b73fcc63b41c99827d77eb4a6069def0cffc7ae8dd10dab97c1ddfdd5b70d0c93e650a51ed5dcd03908516e7ca8b3022bf46eeb7e6 +DIST nss-3.36.1.tar.gz 23026430 BLAKE2B 76eaf5b24f8954a4e14cf556912250a3ddb7b333054a2ea4ee3d218493a8f12c77a37455aae354ef6ddd9bd55c33a269dad515806d70ef38727fa8a382d47fd4 SHA512 096fe4360b6d584a746ac6156830f8cff821fd173bd889d7a396238919328a227fa4ebb46f738970a4001773046f3dd4f4675b85ff6de8420a4a7657b3ba0c65 +DIST nss-cacert-class1-class3.patch 22950 BLAKE2B 9d5e60df5f161a3c27c41e5a9419440a54f888eda454e3cde5ebe626d4075b65cf9938b5144d0fb022377f4bd415bff5e5c67d104409860aa9391b3eb8872c68 SHA512 a5aa740bf110a3f0262e3f1ef2fc739ac2b44f042e220039d48aee8e97cd764d5c10718220364f4098aba955882bd02cadb5481512388971a8290312f88a7df0 +EBUILD ca-certificates-20170717.3.36.1.ebuild 6253 BLAKE2B 6bfae7c926cac36f7bb5358dd1113a6f8bb30bf0c12518ddbe9e0bd771dbf119bbb9e9592c026fde71910552cfd7864dc04b7e9e1686a316019d1bc7de1509b7 SHA512 d233304edde3acf2f0c9732debaa00641d1caa678e91c6fbd7b8ab40d9792fb8acba2468f54dcb34c9e5431aad969b57ce47afbe46bda1a7d5fa62041bfa8bf2 +MISC metadata.xml 538 BLAKE2B 20dd319e6f583b4b6b93fdfc7fb965c54c7b92426715cf287611ea58ed5040ffac4afa77df2e6464a387c120a8d80d508c6e997c820eae9395ba859b13c5702e SHA512 f2779da4ea4b24e196b64d6e4c94d47e426d431508db58355a08ca420498cbbe2f322c5f8dc6e132b612baf03ee6bb1561beade226bd2f71d6afa160064d7a7c diff -uNr a/app-misc/ca-certificates/ca-certificates-20170717.3.36.1.ebuild b/app-misc/ca-certificates/ca-certificates-20170717.3.36.1.ebuild --- a/app-misc/ca-certificates/ca-certificates-20170717.3.36.1.ebuild false +++ b/app-misc/ca-certificates/ca-certificates-20170717.3.36.1.ebuild 1adbbcb0e560a9ad06d55a63d4765377c11cf1f983c8fb5515f91c3e4f1d6b1c394dae29cb022ae5e6505cc70ae38b1c70a6f96de5bac366d0cbe553bcb4f52b @@ -0,0 +1,190 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# The Debian ca-certificates package merely takes the CA database as it exists +# in the nss package and repackages it for use by openssl. +# +# The issue with using the compiled debs directly is two fold: +# - they do not update frequently enough for us to rely on them +# - they pull the CA database from nss tip of tree rather than the release +# +# So we take the Debian source tools and combine them with the latest nss +# release to produce (largely) the same end result. The difference is that +# now we know our cert database is kept in sync with nss and, if need be, +# can be sync with nss tip of tree more frequently to respond to bugs. + +# When triaging bugs from users, here's some handy tips: +# - To see what cert is hitting errors, use openssl: +# openssl s_client -port 443 -CApath /etc/ssl/certs/ -host $HOSTNAME +# Focus on the errors written to stderr. +# +# - Look at the upstream log as to why certs were added/removed: +# https://hg.mozilla.org/projects/nss/log/tip/lib/ckfw/builtins/certdata.txt +# +# - If people want to add/remove certs, tell them to file w/mozilla: +# https://bugzilla.mozilla.org/enter_bug.cgi?product=NSS&component=CA%20Certificates&version=trunk + +EAPI=6 + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} ) + +inherit eutils python-any-r1 + +if [[ ${PV} == *.* ]] ; then + # Compile from source ourselves. + PRECOMPILED=false + inherit versionator + + DEB_VER=$(get_version_component_range 1) + NSS_VER=$(get_version_component_range 2-) + RTM_NAME="NSS_${NSS_VER//./_}_RTM" +else + # Debian precompiled version. + PRECOMPILED=true + inherit unpacker +fi + +DESCRIPTION="Common CA Certificates PEM files" +HOMEPAGE="https://packages.debian.org/sid/ca-certificates" +NMU_PR="" +if ${PRECOMPILED} ; then + SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb" +else + SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${DEB_VER}${NMU_PR:++nmu}${NMU_PR}.tar.xz + https://archive.mozilla.org/pub/security/nss/releases/${RTM_NAME}/src/nss-${NSS_VER}.tar.gz + cacert? ( + https://dev.gentoo.org/~axs/distfiles/nss-cacert-class1-class3.patch + )" +fi + +LICENSE="MPL-1.1" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="insecure_certs" +${PRECOMPILED} || IUSE+=" cacert" + +DEPEND="" +if ${PRECOMPILED} ; then + DEPEND+=" !/dev/null + epatch "${DISTDIR}"/nss-cacert-class1-class3.patch + popd >/dev/null + fi + fi + + default + eapply -p2 "${FILESDIR}"/${PN}-20150426-root.patch + local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g') + sed -i \ + -e '/="$ROOT/s:ROOT:ROOT'"${EPREFIX}"':' \ + -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \ + usr/sbin/update-ca-certificates || die +} + +src_compile() { + cd "image/${EPREFIX}" || die + if ! ${PRECOMPILED} ; then + python_setup + local d="${S}/${PN}/mozilla" c="usr/share/${PN}" + # Grab the database from the nss sources. + cp "${S}"/nss-${NSS_VER}/nss/lib/ckfw/builtins/{certdata.txt,nssckbi.h} "${d}" || die + emake -C "${d}" + + # Now move the files to the same places that the precompiled would. + mkdir -p etc/ssl/certs etc/ca-certificates/update.d "${c}"/mozilla + if use cacert ; then + mkdir -p "${c}"/cacert.org + mv "${d}"/CAcert_Inc..crt "${c}"/cacert.org/cacert.org_root.crt || die + fi + mv "${d}"/*.crt "${c}"/mozilla/ || die + else + mv usr/share/doc/{ca-certificates,${PF}} || die + fi + + if ! use insecure_certs ; then + elog "To prevent applications relying on system's trusted root certificate store" + elog "from using CAs where at least one major browser vendor Gentoo is following" + elog "has decided to apply trust level restrictions, the following" + elog "certificate(s) were removed:" + # Remove untrusted certs from StartCom and WoSign (bug #598072) + elog "$(find "${c}" -type f \( \ + -iname '*startcom*' \ + -o -iname '*wosign*' \ + \) -printf '%P removed; see https://bugs.gentoo.org/598072 for details\n' -delete)" + fi + + ( + echo "# Automatically generated by ${CATEGORY}/${PF}" + echo "# $(date -u)" + echo "# Do not edit." + cd "${c}" + find * -name '*.crt' | LC_ALL=C sort + ) > etc/ca-certificates.conf + + sh usr/sbin/update-ca-certificates --root "${S}/image" || die +} + +src_install() { + cp -pPR image/* "${D}"/ || die + if ! ${PRECOMPILED} ; then + cd ca-certificates + doman sbin/*.8 + dodoc debian/README.* examples/ca-certificates-local/README + fi + + echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates + doenvd 98ca-certificates +} + +pkg_postinst() { + if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then + # if the user has local certs, we need to rebuild again + # to include their stuff in the db. + # However it's too overzealous when the user has custom certs in place. + # --fresh is to clean up dangling symlinks + "${EROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}" + fi + + if [ -n "$(find -L "${EROOT}"etc/ssl/certs/ -type l)" ] ; then + ewarn "Removing the following broken symlinks:" + ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)" + fi +} diff -uNr a/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch b/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch --- a/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch false +++ b/app-misc/ca-certificates/files/ca-certificates-20150426-root.patch 9981c39bfe385d76fa838027ee3ff3bd5fd7ceccb8607dfaeb7984fcb64e26cecb34d5bd894d8d1b61f742fd7cc4e02033914acd5495b77fc14d0025b56115b2 @@ -0,0 +1,49 @@ +add a --root option so we can generate with DESTDIR installs + +--- a/image/usr/sbin/update-ca-certificates ++++ b/image/usr/sbin/update-ca-certificates +@@ -30,6 +30,8 @@ LOCALCERTSDIR=/usr/local/share/ca-certificates + CERTBUNDLE=ca-certificates.crt + ETCCERTSDIR=/etc/ssl/certs + HOOKSDIR=/etc/ca-certificates/update.d ++ROOT="" ++RELPATH="" + + while [ $# -gt 0 ]; + do +@@ -59,13 +61,25 @@ do + --hooksdir) + shift + HOOKSDIR="$1";; ++ --root|-r) ++ shift ++ # Needed as c_rehash wants to read the files directly. ++ # This gets us from $CERTSCONF to $CERTSDIR. ++ RELPATH="../../.." ++ ROOT=$(readlink -f "$1");; + --help|-h|*) +- echo "$0: [--verbose] [--fresh]" ++ echo "$0: [--verbose] [--fresh] [--root ]" + exit;; + esac + shift + done + ++CERTSCONF="$ROOT$CERTSCONF" ++CERTSDIR="$ROOT$CERTSDIR" ++LOCALCERTSDIR="$ROOT$LOCALCERTSDIR" ++ETCCERTSDIR="$ROOT$ETCCERTSDIR" ++HOOKSDIR="$ROOT$HOOKSDIR" ++ + if [ ! -s "$CERTSCONF" ] + then + fresh=1 +@@ -94,7 +107,7 @@ add() { + -e 's/,/_/g').pem" + if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ] + then +- ln -sf "$CERT" "$PEM" ++ ln -sf "${RELPATH}${CERT#$ROOT}" "$PEM" + echo "+$PEM" >> "$ADDED" + fi + # Add trailing newline to certificate, if it is missing (#635570) diff -uNr a/app-misc/ca-certificates/metadata.xml b/app-misc/ca-certificates/metadata.xml --- a/app-misc/ca-certificates/metadata.xml false +++ b/app-misc/ca-certificates/metadata.xml c87432a7cbe4ea3f2923708691cb5c6cdab52c094cc6045d333a5e2b530e08690f8cdd87b5439d0bbcd80374404b3f1d414deac6abe814c2872c28aae50e009d @@ -0,0 +1,17 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + + Include root certificates from CAcert (http://www.cacert.org/) and Software + in the Public Interest (http://www.spi-inc.org/) + + + Install certificates which are known to be untrustworthy. + + + diff -uNr a/app-misc/editor-wrapper/Manifest b/app-misc/editor-wrapper/Manifest --- a/app-misc/editor-wrapper/Manifest false +++ b/app-misc/editor-wrapper/Manifest cbeb35420fd7085ff7434209888b3e046337bdd538271774ae9ad5eaefba80150a9bd844fa6200df7074ca171dac81fd7892acca3fa1a27b8ba0dcf49d1a559c @@ -0,0 +1,3 @@ +AUX editor-wrapper-4.sh 405 BLAKE2B 0d1e023e9865f0278bd2fb5e0ceeb0bd8b92befe5544186d163946d7efe6f0a6749184052927b6d60adfec8b2b703168a85fb968bef50702ab42bbbec8bd73fc SHA512 b29f54c662494f9ed0d26c44a8a9a85e22d0d3d70c870fdb8eda3fe1a97ed188e5b8299ed524a5e00f7cb1a3603be340e544192e75b98daa6afda6b2c185faa8 +EBUILD editor-wrapper-4.ebuild 900 BLAKE2B 8bc6c390923b917de50aa6619f6dc87c6961984963784a09b26824965ea15b6427a854810e20dce80277d107e2aea66015e19589348280433a8cc8a35186b80e SHA512 9c181b10b0b88c470a0f868be425c97a48df84eff9f84d94b3e0fc8bcdaccf5ed74c37494dea7af4a2022b0347ba8be3a7f7d86f8a2ded81346db31d9a809f27 +MISC metadata.xml 367 BLAKE2B c144d95fdc55aafe6dfe786f325aea6756cb51e05b7b370392bf201e5daf827ddd5b0b755d5d37d6e2a06f7929af634223f2d33a1e0e0684677ca90464e5e4df SHA512 f566d335cb37d8d951e7b86e3f4a3bafa5ed2d1b270d5d730c6e9576230848e64849f7ebf0a133a7572847faf0c075f0158f125c3f29d941b598b46ca0c7f4c3 diff -uNr a/app-misc/editor-wrapper/editor-wrapper-4.ebuild b/app-misc/editor-wrapper/editor-wrapper-4.ebuild --- a/app-misc/editor-wrapper/editor-wrapper-4.ebuild false +++ b/app-misc/editor-wrapper/editor-wrapper-4.ebuild 217644170a7f0eb444cf8bde0c9bf5c92775a3d0bae900b708489891620a315d73e03056b89db17ba9ececdf05f08f77a265f26d2d700ba5c417f911dad93732 @@ -0,0 +1,31 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=4 + +DESCRIPTION="Wrapper scripts that will execute EDITOR or PAGER" +HOMEPAGE="https://www.gentoo.org/" +SRC_URI="" + +LICENSE="MIT" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +S="${WORKDIR}" + +src_prepare() { + sed -e 's/@VAR@/EDITOR/g' "${FILESDIR}/${P}.sh" >editor || die + sed -e 's/@VAR@/PAGER/g' "${FILESDIR}/${P}.sh" >pager || die + if use prefix ; then + sed -i \ + -e "s:#!/bin/sh:#!/usr/bin/env sh:" \ + -e "s: /etc/profile: \"${EPREFIX}/etc/profile\":" \ + editor pager || die + fi +} + +src_install() { + exeinto /usr/libexec + doexe editor pager +} diff -uNr a/app-misc/editor-wrapper/files/editor-wrapper-4.sh b/app-misc/editor-wrapper/files/editor-wrapper-4.sh --- a/app-misc/editor-wrapper/files/editor-wrapper-4.sh false +++ b/app-misc/editor-wrapper/files/editor-wrapper-4.sh 1a1d0a02d3640c8d0a83e31ba1a41b08d27d7662068e609bd3c07386647bf7a8ea8687dcdb29b9960f1c6fc1090be5f2ce5819f673dce56174e912614dd99513 @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright 2009-2011 Gentoo Foundation +# Distributed under the terms of the MIT/X11 license + +# Wrapper script, executes ${@VAR@} with arguments $@ + +if [ -z "${@VAR@}" ]; then + # Try to get @VAR@ from system profile + @VAR@=$(. /etc/profile >/dev/null 2>&1; echo "${@VAR@}") +fi + +if [ -z "${@VAR@}" ]; then + echo "$0: The @VAR@ variable must be set" >&2 + exit 1 +fi + +exec ${@VAR@} "$@" diff -uNr a/app-misc/editor-wrapper/metadata.xml b/app-misc/editor-wrapper/metadata.xml --- a/app-misc/editor-wrapper/metadata.xml false +++ b/app-misc/editor-wrapper/metadata.xml 73c055d4fef328c8937e802d46d08e3e12cdfcf61eff3e4ebab261f0318ebe8e62313451f33a5e6320c70cb6ac35e71f971ee764b880e62ced66bf939d55e911 @@ -0,0 +1,12 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + emacs@gentoo.org + Gentoo Emacs project + + diff -uNr a/app-misc/mime-types/Manifest b/app-misc/mime-types/Manifest --- a/app-misc/mime-types/Manifest false +++ b/app-misc/mime-types/Manifest 128d51ad4ba2aa720f25bb4ff73fa6f8c2757f4b5da3695b25ef690525a78f3a4c607405120c1572eb925731ca44229fb156f73ded4cde6cf1a52024eef19f76 @@ -0,0 +1,3 @@ +DIST mime-types-9.tar.bz2 15524 BLAKE2B 075f73f6d41a6b9100baf891378b12658c1370ac3aee8ba47cdb972cf30835eb2e9f6eb8a6314a7097dc5f90b091607519750860b065a2c4a822e26223925447 SHA512 066cea30c02a326e64680422b31aff0849c0a8c7486738f2edf339b88426c6ac5a365d4fa4c80c84df0fa4c39b5e13d45db314a1bf47ce369c132dd1c46130d6 +EBUILD mime-types-9.ebuild 603 BLAKE2B 258d7d0314407b15c6b631b08939a39ceba6044bd47dffba4d5442d2da022536bda2714ef753c195d6e49db87ae8f7c7c77ce6f4be1b167b0b07460fefdac50d SHA512 589a9d7908120387be3bfc042212e98ed09fa6a9c347f63b166afd40f0d31285689a6562ea229b79b34010f095eae8b78b6a68b208928fcbec5ffc2002ba9d90 +MISC metadata.xml 346 BLAKE2B 218632e5ffb174f52dea645949149ddd7af766a3f2906b366f95399a6268055ea3d83e89aab32e1b341e2cb7ffdf21344fddc2d2e0b083c4ed7a5df9cb634dc3 SHA512 65aa65edd1d47b4d6f87120e6685cccbc90c8daedabcac6f9ebfbab562682cc226d7a6f83886f61e38bb3fbfcd6b32ca17725291d6f95939cc1d40dc8bb0173a diff -uNr a/app-misc/mime-types/metadata.xml b/app-misc/mime-types/metadata.xml --- a/app-misc/mime-types/metadata.xml false +++ b/app-misc/mime-types/metadata.xml 39bea051347b6361da42ff129f9e09826239d03c37076ae611c1c80fb571f63f4db1279f3ec410f84fe846a5cf59272b42583d0263a7912e13e5cf38b62b643e @@ -0,0 +1,12 @@ + + + + + djc@gentoo.org + Dirkjan Ochtman + + + net-mail@gentoo.org + Net-Mail + + diff -uNr a/app-misc/mime-types/mime-types-9.ebuild b/app-misc/mime-types/mime-types-9.ebuild --- a/app-misc/mime-types/mime-types-9.ebuild false +++ b/app-misc/mime-types/mime-types-9.ebuild a948228b278d30c094be6942936daea6a80825860cbaa73161d228f07f7b71b5267008f93eae1d480d864ec164e33ad3014f2b5428bc5ae7731529d367e79730 @@ -0,0 +1,21 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Provides /etc/mime.types file" +HOMEPAGE="https://www.gentoo.org/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_install() { + insinto /etc + doins mime.types +} diff -uNr a/app-misc/pax-utils/Manifest b/app-misc/pax-utils/Manifest --- a/app-misc/pax-utils/Manifest false +++ b/app-misc/pax-utils/Manifest b692ee8695314c45cfe2758f4c2c5ee7e15a92e3e89cc2d85e7b60609d52fed3ba72bf878f46d591c636c79d311289aed2e615abe924b368d43866456d9541ce @@ -0,0 +1,3 @@ +DIST pax-utils-1.2.3.tar.xz 661828 BLAKE2B 4764c47b7a31e7470a454127b9db3b5b27c703a96a66973a6248529a2d858ea38adb246a270a1f343a499515f55b25613bb20c46978e2e0dddc03e5ddb9a2aa7 SHA512 efcbce49aa7e5cd433f9b3fbc8fa82f6d7b0eb80ec40aafde453d6fe96e3565e066e5020f04d71537d8d4e820147f4203c0df2dd330ebb1358a26def3dd5484c +EBUILD pax-utils-1.2.3.ebuild 1477 BLAKE2B e3e27277bcf7d95983713cb31a0a57b998d500d42d26ba75b364b42da9b3c9b82635b02148daba3e675a816b446b2d9ec09b851635b5800712d1bd61d594211f SHA512 a407d1613f4489687d3d86bae6fb9bf8f527fb123fbd59e56ac9f390e80de5063610e76ca2570b78fb35e05abed5c735939599e7604265aed68185f4cf49e731 +MISC metadata.xml 706 BLAKE2B 1660bd83c0164ecb4c187d6271cd1f27a8140906bef315bcfc4be37594f91a79cfa9da8fb9dfd1af66c6c7028ed4d40ef891b025fb12b9486b7ee366a3e5c354 SHA512 3691bf431cb24ad3498b137f0e264562451db583201e1cae327ed201f36d838f01dfe78e3569a2d24593c67f747dff17eec645bacf0855148c72354ebeaa26f1 diff -uNr a/app-misc/pax-utils/metadata.xml b/app-misc/pax-utils/metadata.xml --- a/app-misc/pax-utils/metadata.xml false +++ b/app-misc/pax-utils/metadata.xml 191397d4797cc295677ccf8d03c8ea41856f9ad001f1e16757812a4bc15cde8fae888bb4a3d066f34f2c7fa70463b6841ca6172767c9a381d649c2d7d3fdbd56 @@ -0,0 +1,16 @@ + + + + + slyfox@gentoo.org + Sergei Trofimovich + + + toolchain@gentoo.org + Gentoo Toolchain Project + + A suite of ELF tools to aid auditing systems. Contains various ELF related utils for ELF32, ELF64 binaries useful for displaying PaX and security info on a large groups of binary files. + + Install a more powerful/faster version of lddtree + + diff -uNr a/app-misc/pax-utils/pax-utils-1.2.3.ebuild b/app-misc/pax-utils/pax-utils-1.2.3.ebuild --- a/app-misc/pax-utils/pax-utils-1.2.3.ebuild false +++ b/app-misc/pax-utils/pax-utils-1.2.3.ebuild 95a7584d3992eadb4a00d49e6e89fc1942bc9f2e901b51e4ea5ff91d699237078c5e5ca073ae31de43f8a7e21e6c3711f96b367829bc52d96ae5dc92314ee8fc @@ -0,0 +1,56 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils toolchain-funcs unpacker + +DESCRIPTION="ELF utils that can check files for security relevant properties" +HOMEPAGE="https://wiki.gentoo.org/index.php?title=Project:Hardened/PaX_Utilities" +SRC_URI="mirror://gentoo/${P}.tar.xz + https://dev.gentoo.org/~slyfox/distfiles/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="caps debug python seccomp" + +RDEPEND="caps? ( >=sys-libs/libcap-2.24 ) + python? ( dev-python/pyelftools ) + seccomp? ( sys-libs/libseccomp )" +DEPEND="${RDEPEND} + caps? ( virtual/pkgconfig ) + seccomp? ( virtual/pkgconfig ) + app-arch/xz-utils" + +_emake() { + emake \ + USE_CAP=$(usex caps) \ + USE_DEBUG=$(usex debug) \ + USE_PYTHON=$(usex python) \ + USE_SECCOMP=$(usex seccomp) \ + "$@" +} + +src_configure() { + # Avoid slow configure+gnulib+make if on an up-to-date Linux system + if use prefix || ! use kernel_linux || \ + has_version ' + + + + base-system@gentoo.org + + diff -uNr a/app-portage/layman/Manifest b/app-portage/layman/Manifest --- a/app-portage/layman/Manifest false +++ b/app-portage/layman/Manifest a97266c064a4279f67e8ddb276a46d8c1e5e77486bfc19fed48a7c26055010243d442823fdf9d31ad4efb167b7d871534d0442e181a9fee01b9b25e3a0d3ce9e @@ -0,0 +1,9 @@ +AUX layman-2.0.0.doctest.patch 933 BLAKE2B d2e9c8f4b49fdd37530981d6f0cd621a676eba9688e0c45e68cd82e774b052085f556b437a13789f0554bdf18a6a1112ce3b1503abf6a0719cfbb4efde20bc5e SHA512 37a3bf04ba5185bf7f885321a4a925e24218d6e283b4c9d85e4935e0fb3dacf4fa543fa79e146c44bcbf833e7348dc49270cd0baa562a5e2539fc792b91abaf8 +AUX layman-2.0.0.svn_upgrade.patch 2447 BLAKE2B 0603c816eff3eef5824e04619c4b7634e253993028823b1c19713c76c1953d0df8160655e3a35d17a083736839628b75f77f8364e40a3e38d90035cc80c01561 SHA512 a3b9d0a0049aef011ddaadc627c38c9730e547aa4941fc1081ea7727f228e72080314a1cc376fa96ba23efe365529795a1b501c90b76561f6c4bff9aba72eb1f +AUX layman-2.2.0-adds-kwargs-debug.patch 1015 BLAKE2B b0f249a7e66606cd06f9107882d4a6edaed658b01a75c99f00ac03e8e8db8dc5fb1c2dc1e4738a8800c09645d44e7f39012d37dccf3c6c4ffc00f42833aff99e SHA512 cedf55524b2d11ae41a05192e8ba31fce677fb528560b168e4441bf2274c864c23a0d6463e79ea34c29e61ff1d4f514efba32bcee914fe6b915b6f039f8e106e +AUX layman-2.2.0-change-for-upstream-ssl-fetch.patch 1234 BLAKE2B 1592e974a34142b62a21fe58011d98d118060a9bbc4e1e5d7ae0fdae1791a7715d325a9e3a2374a223f764fa3f40990855ec5d205a63a96d6b61cb1c3e4167d9 SHA512 bd58b813e3b364f4116537c1a66b0109a6a08fb5a30a53a691c697739197d84fed4449bbd3b751396e81d4adbb0f72101bd04e949068534bb77ced929c5c4191 +AUX layman-2.2.0-removes-doctest-remnants.patch 6172 BLAKE2B 0f6e9b68ebfb85f08c06a26e52a13bc3412edcf58d052cc72d576efbaeb8bd7c9a04268465632de0c3d611ed9fc369ae0d1dc9d2d61955a934124a70c7e46958 SHA512 9c8f81269d7219a6a1d0ca6365be3e49c6c407810670a5acf71edf8d47255772e67631a018b1f1a1a4bc0f1981663882d30c2480af1e90fef09030bf2e12935e +AUX layman-2.4.1-sourcefileattributechanges.patch 1889 BLAKE2B b99001a1fbc19224111ab565343146230ac464add57bfb8ae3e202d339a6e7cb36dd3ba9050625cb1a9d3420ad892dc2417bbb5a5045a8bf6bf7e4e939f9a1a0 SHA512 ffb5015069c1b1725514d18abff9a7c152825335f05a7edf160d0e90a3d7cd9d0a6338fb24ed8a6ebcc24c2f23beefc4bc35d3d12fe887d86a3251bdb03fc4f2 +DIST layman-2.4.2.tar.gz 137893 BLAKE2B ad925b974e280c0c933cb7c7d5131946fbb40d15410a671be3d93fa895e2d92a4f3218bce99abc8f2c1e007e72bd51662a18665579bf2ded7f349eb9ed5c652c SHA512 9d32269f51f896c554e6cbf8a674c50009bce48dd83dfe773b08b75bafd567eb75c26c227ab3a60bc83c1ed511862a3979b8d851befe8ad16fd0847eb91337cf +EBUILD layman-2.4.2-r1.ebuild 2289 BLAKE2B 46d9b5292320f7d091822630cb69037f0745a9dd35f1b4b5b7da8c60571a7072a82635603e0403e9b4819b80d511429025a6d2909eef14e64dd3bb37d5af93e9 SHA512 d4d2e268bba46ff1c6c33963c4ff75239db5f28c8eb64109a86d3531c7f707c61a2011d4270d2a55c3365aeb59a6344a6ccbdcabc89c0bae3405b6278c91eca1 +MISC metadata.xml 1177 BLAKE2B 0024befce684e122216fecaecb3ccf2f2da44fa82a3f2c8811155861041009a0cded912e93a2d6e66884814afc8b1ccbe6f006b40b6e44cafa13fa0f53c90a4d SHA512 d41244afefdb11e5f68be2200a759e4209b2b59f5b9de083e79a522d5a10f12359f9fd6f30fd24f73d4e9b190a2f974f8e519cd22614dd2b023594952dba957e diff -uNr a/app-portage/layman/files/layman-2.0.0.doctest.patch b/app-portage/layman/files/layman-2.0.0.doctest.patch --- a/app-portage/layman/files/layman-2.0.0.doctest.patch false +++ b/app-portage/layman/files/layman-2.0.0.doctest.patch ff47a25ad5c49a66885bffdb1b85be005c82d50ec0a726ed9dcbada9872f5f5bc2f7e18e9084087c5a04ad19124fb80d0e2c0ee155a03b86e70fb4e0d00bb745 @@ -0,0 +1,20 @@ +diff --git a/layman/db.py b/layman/db.py +index e2d740c..55a846a 100644 +--- a/layman/db.py ++++ b/layman/db.py +@@ -93,6 +93,7 @@ class DB(DbBase): + >>> from layman.config import OptionConfig + >>> myoptions = {'installed' : + ... here + '/tests/testfiles/global-overlays.xml', ++ ... 'local_list': here + '/tests/testfiles/overlays.xml', + ... 'make_conf' : write2, + ... 'nocheck' : 'yes', + ... 'storage' : tmpdir} +@@ -173,6 +174,7 @@ class DB(DbBase): + >>> from layman.config import OptionConfig + >>> myoptions = {'installed' : + ... here + '/tests/testfiles/global-overlays.xml', ++ ... 'local_list': here + '/tests/testfiles/overlays.xml', + ... 'make_conf' : write2, + ... 'nocheck' : 'yes', + ... 'storage' : tmpdir} diff -uNr a/app-portage/layman/files/layman-2.0.0.svn_upgrade.patch b/app-portage/layman/files/layman-2.0.0.svn_upgrade.patch --- a/app-portage/layman/files/layman-2.0.0.svn_upgrade.patch false +++ b/app-portage/layman/files/layman-2.0.0.svn_upgrade.patch fccc354553c1f4f3baaba35c9c1d95b760ef6f07a2bc135469bf14f9df2bb76a53dc05c14c29e8c0ef1db1af5d00ed0c9f6a5d16cd8841b282abc829062ae675 @@ -0,0 +1,58 @@ +From 580097d4bc0cd3f07b4ce1b8da33e63f03ef0305 Mon Sep 17 00:00:00 2001 +From: Brian Dolbec +Date: Mon, 6 Jan 2014 22:01:12 -0800 +Subject: [PATCH] Update svn's check_upgrade() for newer svn versions. + +Thanks you, Arfrever, for your assistance. +--- + layman/overlays/svn.py | 32 ++++++++++++-------------------- + 1 file changed, 12 insertions(+), 20 deletions(-) + +diff --git a/layman/overlays/svn.py b/layman/overlays/svn.py +index 4804925..374a516 100644 +--- a/layman/overlays/svn.py ++++ b/layman/overlays/svn.py +@@ -131,27 +131,19 @@ class SvnOverlay(OverlaySource): + return + + def check_upgrade(self, target): +- '''Code to check the installed svn version and +- run "svn upgrade" if needed.''' ++ '''Code to run "svn upgrade" it only takes longer ++ than checking if it does need an upgrade if it is ++ actually needed. ++ ''' + file_to_run = _resolve_command(self.command(), self.output.error)[1] +- args = file_to_run + ' -q --version' ++ args = " ".join([file_to_run, " upgrade", target]) +- pipe = Popen(args, shell=True, stdout=PIPE) ++ pipe = Popen(args, shell=True, stdout=PIPE, stderr=PIPE) + if pipe: +- self.output.debug("SVN: check_upgrade()... have a valid pipe", 4) +- version = pipe.stdout.readline().strip('\n') +- self.output.debug("SVN: check_upgrade()... svn version found: %s" +- % version, 4) ++ self.output.debug("SVN: check_upgrade()... have a valid pipe, " ++ "running upgrade", 4) ++ upgrade_output = pipe.stdout.readline().strip('\n') ++ if upgrade_output: ++ self.output.debug(" output: %s" % upgrade_output, 4) ++ self.output.debug("SVN: check_upgrade()... svn upgrade done", 4) + pipe.terminate() +- if version >= '1.7.0': +- self.output.debug("SVN: check_upgrade()... svn upgrade maybe", +- 4) +- _path = path([target,'.svn/wc.db']) +- if not os.path.exists(_path): +- self.output.info("An svn upgrade needs to be run...", +- 2) +- args = ["upgrade"] +- return self.run_command(self.command(), args, +- cwd=target, cmd="svn upgrade") +- return +- else: +- return ++ return +-- +1.8.3.2 + diff -uNr a/app-portage/layman/files/layman-2.2.0-adds-kwargs-debug.patch b/app-portage/layman/files/layman-2.2.0-adds-kwargs-debug.patch --- a/app-portage/layman/files/layman-2.2.0-adds-kwargs-debug.patch false +++ b/app-portage/layman/files/layman-2.2.0-adds-kwargs-debug.patch 2c204cdbba25f3af2a3b4922da3cfe04bffa777f9ee1ace0447456067fa008aa8ed7dd7e9920cf58c32a843a550953e3181b3645643d425c56c4bbdfdaa22acf @@ -0,0 +1,28 @@ +From: Devan Franchini +Date: Sun, 7 Dec 2014 23:12:36 -0500 +Subject: [PATCH] Adds kwargs-debug and modifies kwargs-info level to 5 + +--- a/layman/overlays/archive.py ++++ b/layman/overlays/archive.py +@@ -50,7 +50,8 @@ class ArchiveOverlay(OverlaySource): + connector_output = { + 'info': self.output.debug, + 'error': self.output.error, +- 'kwargs-info': {'level': 2}, ++ 'kwargs-info': {'level': 5}, ++ 'kwargs-debug': {'level': 2}, + 'kwargs-error': {'level': None}, + } + +--- a/layman/remotedb.py ++++ b/layman/remotedb.py +@@ -120,6 +120,6 @@ class RemoteDB(DbBase): + 'info': self.output.info, + 'debug': self.output.debug, + 'error': self.output.error, +- 'kwargs-info': {'level': 2}, ++ 'kwargs-info': {'level': 5}, + 'kwargs-debug': {'level': 2}, + 'kwargs-error':{'level': None}, + } + diff -uNr a/app-portage/layman/files/layman-2.2.0-change-for-upstream-ssl-fetch.patch b/app-portage/layman/files/layman-2.2.0-change-for-upstream-ssl-fetch.patch --- a/app-portage/layman/files/layman-2.2.0-change-for-upstream-ssl-fetch.patch false +++ b/app-portage/layman/files/layman-2.2.0-change-for-upstream-ssl-fetch.patch 414f263766c70f14cea790923b3f324f71f27b22700fc6c173ed2f7a25e99c2159a836f98decd999c8cd76e02a8f034a515e0c8e3a6c8d375da5bcb15606dcef @@ -0,0 +1,38 @@ +From 81f1545f1371931d560492e8b323096d4befc775 Mon Sep 17 00:00:00 2001 +From: Brian Dolbec +Date: Fri, 17 Oct 2014 19:40:38 -0700 +Subject: [PATCH] remotedb.py: Change for upstream ssl-fetch change + +--- + layman/remotedb.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/layman/remotedb.py b/layman/remotedb.py +index f0f7ea9..b866bd7 100644 +--- a/layman/remotedb.py ++++ b/layman/remotedb.py +@@ -57,7 +57,7 @@ class RemoteDB(DbBase): + self.detached_urls = [] + self.signed_urls = [] + self.proxies = config.proxies +- ++ + self.urls = [i.strip() + for i in config['overlays'].split('\n') if len(i)] + +@@ -116,9 +116,11 @@ class RemoteDB(DbBase): + need_gpg = [False, True, True] + # setup the ssl-fetch output map + connector_output = { +- 'info': self.output.debug, ++ 'info': self.output.info, ++ 'debug': self.output.debug, + 'error': self.output.error, + 'kwargs-info': {'level': 2}, ++ 'kwargs-debug': {'level': 2}, + 'kwargs-error':{'level': None}, + } + fetcher = Connector(connector_output, self.proxies, USERAGENT) +-- +2.0.5 + diff -uNr a/app-portage/layman/files/layman-2.2.0-removes-doctest-remnants.patch b/app-portage/layman/files/layman-2.2.0-removes-doctest-remnants.patch --- a/app-portage/layman/files/layman-2.2.0-removes-doctest-remnants.patch false +++ b/app-portage/layman/files/layman-2.2.0-removes-doctest-remnants.patch 3fed7b3a24f6818293807f868e1d2df8bd62f64b19fe32f8959ed3f409208edd86fe4ec3d9ab3d532fc1fde95c9ed53fee17c07525a0b8d0c5e72244b0cdb712 @@ -0,0 +1,208 @@ +From: Devan Franchini +Date: Fri, 18 Oct 2014 15:21:24 -0400 +Subject: [PATCH] Removes doctest remnants + +--- a/layman/api.py 2014-10-18 14:27:13.233842116 -0400 ++++ b/layman/api.py 2014-10-18 14:29:51.184849673 -0400 +@@ -714,15 +714,3 @@ + write = os.fdopen(fd_w, 'w') + read = os.fdopen(fd_r, 'r') + return (read, write, fd_r, fd_w) +- +- +-if __name__ == '__main__': +- import doctest, sys +- +- # Ignore warnings here. We are just testing +- from warnings import filterwarnings, resetwarnings +- filterwarnings('ignore') +- +- doctest.testmod(sys.modules[__name__]) +- +- resetwarnings() +--- a/layman/argsparser.py 2014-10-18 14:27:13.233842116 -0400 ++++ b/layman/argsparser.py 2014-10-18 14:30:35.256851781 -0400 +@@ -404,14 +404,3 @@ + self.output.debug('ARGSPARSER: Returning keys', 9) + + return keys +- +- +-#=============================================================================== +-# +-# Testing +-# +-#------------------------------------------------------------------------------- +- +-if __name__ == '__main__': +- import doctest +- doctest.testmod(sys.modules[__name__]) +--- a/layman/cli.py 2014-10-18 14:27:13.233842116 -0400 ++++ b/layman/cli.py 2014-10-18 14:32:11.456856384 -0400 +@@ -397,15 +397,3 @@ + # blank newline -- no " *" + self.output.notice('') + return info != {} +- +- +-if __name__ == '__main__': +- import doctest +- +- # Ignore warnings here. We are just testing +- from warnings import filterwarnings, resetwarnings +- filterwarnings('ignore') +- +- doctest.testmod(sys.modules[__name__]) +- +- resetwarnings() +--- a/layman/config.py 2014-10-18 14:27:13.233842116 -0400 ++++ b/layman/config.py 2014-10-18 14:31:02.528853086 -0400 +@@ -348,13 +348,3 @@ + if new_defaults is not None: + self._defaults.update(new_defaults) + return +- +-#=============================================================================== +-# +-# Testing +-# +-#------------------------------------------------------------------------------- +- +-if __name__ == '__main__': +- import doctest +- doctest.testmod(sys.modules[__name__]) +--- a/layman/db.py 2014-10-18 14:27:13.234842116 -0400 ++++ b/layman/db.py 2014-10-18 14:32:32.160857374 -0400 +@@ -315,21 +315,3 @@ + raise Exception('Syncing overlay "' + overlay_name + + '" returned status ' + str(result) + '!' + + '\ndb.sync()') +- +- +-#=============================================================================== +-# +-# Testing +-# +-#------------------------------------------------------------------------------- +- +-if __name__ == '__main__': +- import doctest, sys +- +- # Ignore warnings here. We are just testing +- from warnings import filterwarnings, resetwarnings +- filterwarnings('ignore') +- +- doctest.testmod(sys.modules[__name__]) +- +- resetwarnings() +--- a/layman/dbbase.py 2014-10-18 14:27:13.234842116 -0400 ++++ b/layman/dbbase.py 2014-10-18 14:31:14.648853666 -0400 +@@ -252,21 +252,3 @@ + """returns a list of the overlay names + """ + return sorted(self.overlays) +- +- +-#=============================================================================== +-# +-# Testing +-# +-#------------------------------------------------------------------------------- +- +-if __name__ == '__main__': +- import doctest +- +- # Ignore warnings here. We are just testing +- from warnings import filterwarnings, resetwarnings +- filterwarnings('ignore') +- +- doctest.testmod(sys.modules[__name__]) +- +- resetwarnings() +--- a/layman/overlays/archive.py 2014-10-18 14:27:13.253842116 -0400 ++++ b/layman/overlays/archive.py 2014-10-18 14:31:54.640855579 -0400 +@@ -188,15 +188,3 @@ + ''' + + return self.is_supported() +- +- +-if __name__ == '__main__': +- import doctest +- +- # Ignore warnings here. We are just testing. +- from warnings import filterwarnings, resetwarnings +- filterwarnings('ignore') +- +- doctest.testmod(sys.modules[__name__]) +- +- resetwarnings() +--- a/layman/overlays/modules/tar/tar.py 2014-10-18 14:27:13.245842116 -0400 ++++ b/layman/overlays/modules/tar/tar.py 2014-10-18 15:10:13.303965557 -0400 +@@ -94,14 +94,3 @@ + return require_supported( + [(self.command(), 'tar', 'app-arch/tar'), ], + self.output.warn) +- +-if __name__ == '__main__': +- import doctest +- +- # Ignore warnings here. We are just testing +- from warnings import filterwarnings, resetwarnings +- filterwarnings('ignore') +- +- doctest.testmod(sys.modules[__name__]) +- +- resetwarnings() +--- a/layman/overlays/overlay.py 2014-10-18 14:27:13.253842116 -0400 ++++ b/layman/overlays/overlay.py 2014-10-18 14:31:38.624854813 -0400 +@@ -546,14 +546,3 @@ + def source_types(self): + for i in self.sources: + yield i.type +- +- +-#============================================================================== +-# +-# Testing +-# +-#------------------------------------------------------------------------------ +- +-if __name__ == '__main__': +- import doctest +- doctest.testmod(sys.modules[__name__]) +--- a/layman/remotedb.py 2014-10-18 14:27:13.253842116 -0400 ++++ b/layman/remotedb.py 2014-10-18 14:29:31.064848710 -0400 +@@ -384,14 +384,3 @@ + self.signed_urls = [i.strip() + for i in self.config['gpg_signed_lists'].split('\n') if len(i)] + ''' +- +-if __name__ == '__main__': +- import doctest +- +- # Ignore warnings here. We are just testing +- from warnings import filterwarnings, resetwarnings +- filterwarnings('ignore') +- +- doctest.testmod(sys.modules[__name__]) +- +- resetwarnings() +--- a/layman/utils.py 2014-10-18 14:27:13.254842117 -0400 ++++ b/layman/utils.py 2014-10-18 14:30:24.088851247 -0400 +@@ -347,14 +347,3 @@ + for key in kwargs: + result[key] = kwargs[key] + return result +- +- +-#=============================================================================== +-# +-# Testing +-# +-#------------------------------------------------------------------------------- +- +-if __name__ == '__main__': +- import doctest +- doctest.testmod(sys.modules[__name__]) + diff -uNr a/app-portage/layman/files/layman-2.4.1-sourcefileattributechanges.patch b/app-portage/layman/files/layman-2.4.1-sourcefileattributechanges.patch --- a/app-portage/layman/files/layman-2.4.1-sourcefileattributechanges.patch false +++ b/app-portage/layman/files/layman-2.4.1-sourcefileattributechanges.patch 98116fbdab3024e893141a902dfa5cd8cfe98c85b1abaf146c52b9a7c321b3a0b17662676f73387c60ea74cc45d72c82041608661944a6f7de096c6623d083da @@ -0,0 +1,42 @@ +From 90fe6724d0a8d1ebfe6443dee118432e20432b8b Mon Sep 17 00:00:00 2001 +From: Brian Dolbec +Date: Tue, 10 May 2016 15:12:02 -0700 +Subject: [PATCH] layman/module.py: Fix commit 63808ef00f94 mis-applied + 'sourcefile' attribute changes + +It was not looking for the 'sourcefile' attribute first, then falling back to the kidname for +backward compatibility. +It was incorrectly looking for an ImportError, instead of a 'sourcefile' KeyError. +The filepath of the affected file for the error message had an extra leading '_'. +Add the module name to the warning message. +--- + layman/module.py | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/layman/module.py b/layman/module.py +index 08bcbc2..092418f 100644 +--- a/layman/module.py ++++ b/layman/module.py +@@ -49,13 +49,14 @@ class Module(object): + kid = self.module_spec['provides'][submodule] + kidname = kid['name'] + try: ++ kid['module_name'] = '.'.join([mod_name, kid['sourcefile']]) ++ except KeyError: + kid['module_name'] = '.'.join([mod_name, kidname]) +- except ImportError: +- kid['module_name'] = '.'.join([mod_name, self.name]) +- f = self.__module.__file__ +- msg = 'Module.__initialize(); module spec is old, missing '\ ++ f = self._module.__file__ ++ msg = 'Module.__initialize(); %(module)s module spec is old, missing '\ + 'attribute: \'sourcefile\'.\nBackward compatibility '\ +- 'may be removed in the future.\nFile: %(f)s' % {'f': f} ++ 'may be removed in the future.\nFile: %(f)s' % { ++ 'module': self.name, 'f': f} + self.output.warn(msg) + kid['is_imported'] = False + self.kids[kidname] = kid +-- +2.8.3 + diff -uNr a/app-portage/layman/layman-2.4.2-r1.ebuild b/app-portage/layman/layman-2.4.2-r1.ebuild --- a/app-portage/layman/layman-2.4.2-r1.ebuild false +++ b/app-portage/layman/layman-2.4.2-r1.ebuild 167a9d99a048d6c921fdb5628a4255e695f6f9ca947a9f23f08befcbe53253ae33c70e40c960ceb80392429226641ed24defc83c69134ac57df22b6dd6ccc7e0 @@ -0,0 +1,98 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy ) +PYTHON_REQ_USE="xml(+),sqlite?" + +inherit eutils distutils-r1 linux-info prefix + +DESCRIPTION="Tool to manage Gentoo overlays" +HOMEPAGE="https://wiki.gentoo.org/wiki/Layman" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="bazaar cvs darcs +git gpg g-sorcery mercurial sqlite squashfs subversion sync-plugin-portage test" + +DEPEND="test? ( dev-vcs/subversion ) + " + +RDEPEND=" + bazaar? ( dev-vcs/bzr ) + cvs? ( dev-vcs/cvs ) + darcs? ( dev-vcs/darcs ) + git? ( dev-vcs/git ) + mercurial? ( dev-vcs/mercurial ) + g-sorcery? ( app-portage/g-sorcery ) + subversion? ( + || ( + >=dev-vcs/subversion-1.5.4[http] + >=dev-vcs/subversion-1.5.4[webdav-neon] + >=dev-vcs/subversion-1.5.4[webdav-serf] + ) + ) + gpg? ( >=dev-python/pyGPG-0.2 ) + sync-plugin-portage? ( + || ( + >=sys-apps/portage-2.2.16[${PYTHON_USEDEP}] + sys-apps/portage-mgorny[${PYTHON_USEDEP}] + ) + ) + !sync-plugin-portage? ( + || ( + sys-apps/portage[${PYTHON_USEDEP}] + sys-apps/portage-mgorny[${PYTHON_USEDEP}] + ) + ) + >=dev-python/ssl-fetch-0.4[${PYTHON_USEDEP}] + " + +layman_check_kernel_config() { + local CONFIG_CHECK + use squashfs && CONFIG_CHECK+=" ~BLK_DEV_LOOP ~SQUASHFS" + [[ -n ${CONFIG_CHECK} ]] && check_extra_config +} + +pkg_pretend() { + layman_check_kernel_config +} + +pkg_setup() { + layman_check_kernel_config +} + +python_prepare_all() { + python_setup + esetup.py setup_plugins + distutils-r1_python_prepare_all + eprefixify etc/layman.cfg layman/config.py +} + +python_test() { + suite=layman/tests/external.py + PYTHONPATH="." "${PYTHON}" ${suite} || die "test suite '${suite}' failed" + unset suite +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /etc/layman + doins etc/layman.cfg + + doman doc/layman.8 + dohtml doc/layman.8.html + + keepdir /var/lib/layman + keepdir /etc/layman/overlays +} + +pkg_postinst() { + # now run layman's update utility + einfo "Running layman-updater..." + "${EROOT}"/usr/bin/layman-updater + einfo +} diff -uNr a/app-portage/layman/metadata.xml b/app-portage/layman/metadata.xml --- a/app-portage/layman/metadata.xml false +++ b/app-portage/layman/metadata.xml dad01ff3a0f73b1c4d1c0db1807b1384f5480260c8515330347745911d65954793f9e5bf003ec2dea7cfa78013824dc335ced12e61ed625f965eb30a20270213 @@ -0,0 +1,23 @@ + + + + + layman@gentoo.org + Gentoo Layman team + + + Support dev-vcs/bzr based overlays + Support dev-vcs/cvs based overlays + Support dev-vcs/darcs based overlays + Support app-portage/g-sorcery based overlays + Support dev-vcs/git based overlays + Support app-crypt/gnupg signed overlays lists and manifests + Support dev-vcs/mercurial based overlays + Support mounting squashfs image overlays locally read-only + Support dev-vcs/subversion based overlays + Install the sys-apps/portage sync module + + + layman + + diff -uNr a/app-portage/portage-utils/Manifest b/app-portage/portage-utils/Manifest --- a/app-portage/portage-utils/Manifest false +++ b/app-portage/portage-utils/Manifest 48cc8faf624e62356565ec624934fd7f6ec5ed74b13980269f852db66476ace29adc7bd66f04f0e376759c872c4967643dacd153217221f6a707a6557defaac0 @@ -0,0 +1,5 @@ +AUX post_sync 190 BLAKE2B ad1a8705af98cc7d0122173e6edb821eb7be6f024fda5eb145d713fb0d43f475fb3f6c8582ecaca88f11852097aa1cd9b866e690ccdc760194a316b72d1ebb37 SHA512 0153d2931c2d2a0f03e74f75dadc14d115c0d0e50cbc43e17c1b05a6a406b4bf47435bd32d1b2f559ce6a576e24a30dcf47e8ea6d346371553560ceb055b4429 +AUX q-reinitialize 68 BLAKE2B f1c2cd5009f30018dfc2d508a627253c08fc6e74859d072b917a0518850b879ecd0318df7a86c8597d28cf4410312f757aaf5cf8780899180a5e2a9a906b1ac2 SHA512 d322fc0e3fd82583e9cfc6ffa95636134e4491e63fc1a1f34dcda58a1749c3ebcda97caee47bea4f44fb056c35c97e30819dd22e5c2ed8c936e0863466ebf6ae +DIST portage-utils-0.64.tar.xz 533124 BLAKE2B c3e0ecdc2d82af197dabb8434677d4c3bfbbee01c482c496d89d2f7be988ef894e0b3c7cb64337216144644a48ee3213fc1683ae6d75091e471189a4550b8c71 SHA512 e384b88454607aa9123ac3a71d55fb16de475ba59f4ba6efd236594f42140e75650696430138cdb6e1c4e1792db091bbc1db42b1c1102fd579af6514ecefffb7 +EBUILD portage-utils-0.64.ebuild 1308 BLAKE2B cd497cc22dbda169a006b1a14e5264eacd5594ae35d48511e8d605d48d96135f5a3dab037955bbc8b634ac68982d29b31398d7302d8989cab365150400d72fb2 SHA512 f99299e75aa903edcf4e556671ad2653f5d430b1b84e6d8404a4bcd889731c0c180ab8451295f4da62f51a36459e83b993072e54753fbb619be124955bce3cf5 +MISC metadata.xml 248 BLAKE2B 60e4295b22f6f36039547e98305ae072755044f6516df2e29e65768732900ffc93dac9cbcf1da9e6c731403a62cf272f2f378d0641bd466974f8a234235c862a SHA512 f6fee7363592cb9dcd666011806321b791fb84bf0719fb2454d1f3ceb738650184286c17a13684c077bacd1a93581a71accfe9cef74adcaf40dfda7d8a167d13 diff -uNr a/app-portage/portage-utils/files/post_sync b/app-portage/portage-utils/files/post_sync --- a/app-portage/portage-utils/files/post_sync false +++ b/app-portage/portage-utils/files/post_sync c40f9e9fd6a0fd68521fad9d151c4f20531daf7baeccf6577af3fff26c595e4e6ae30f8040e441b2660b3a44418b3c450ae48d6e696ce0a379808769e0d75e4f @@ -0,0 +1,8 @@ +#!/bin/sh +# Copyright 2006-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +for f in /etc/portage/postsync.d/* ; do + [ -x "${f}" ] && "${f}" +done +: diff -uNr a/app-portage/portage-utils/files/q-reinitialize b/app-portage/portage-utils/files/q-reinitialize --- a/app-portage/portage-utils/files/q-reinitialize false +++ b/app-portage/portage-utils/files/q-reinitialize 8db22c0d1218c904ab1f5b68034e427b29acca7784ad02d7908e6b7a4952e9a12fb7de09bfaef1de13e5871f5f973e47a929ee88fae45d2cc06cd8a7368cef81 @@ -0,0 +1,3 @@ +#!/bin/sh +[ -x /usr/bin/q ] && /usr/bin/q -r ${PORTAGE_QUIET:+-q} +: diff -uNr a/app-portage/portage-utils/metadata.xml b/app-portage/portage-utils/metadata.xml --- a/app-portage/portage-utils/metadata.xml false +++ b/app-portage/portage-utils/metadata.xml 0d72bfe01ac974203aea367661e6db52d5944d4520f77a44e53a4fba882541f12a2b87a6eff60361d0c0e76505f18b16738eed996903aaf3b4ac249d0e912d84 @@ -0,0 +1,8 @@ + + + + + grobian@gentoo.org + Fabian Groffen + + diff -uNr a/app-portage/portage-utils/portage-utils-0.64.ebuild b/app-portage/portage-utils/portage-utils-0.64.ebuild --- a/app-portage/portage-utils/portage-utils-0.64.ebuild false +++ b/app-portage/portage-utils/portage-utils-0.64.ebuild 67e2656279ebc15983095985e24e71bc743b28801cbac61e4ace537f72d85cea906f657a2c11097ed791fd867446683d4a2be0cc5dc05a7dc47fdfbf873137b3 @@ -0,0 +1,43 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit toolchain-funcs + +DESCRIPTION="small and fast portage helper tools written in C" +HOMEPAGE="https://wiki.gentoo.org/wiki/Portage-utils" +SRC_URI="mirror://gentoo/${P}.tar.xz + https://dev.gentoo.org/~vapier/dist/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="nls static" + +RDEPEND="dev-libs/iniparser:0" +DEPEND="${RDEPEND} + app-arch/xz-utils + static? ( dev-libs/iniparser:0[static-libs] )" + +src_prepare() { + # bug #638970, caused by gemato writing Manifest.gz files in + # metadata/md5-cache dir, unlike hashgen + sed -i -e '/find [.] -mindepth/s/-type f/-type f ! -name "Manifest.*"/' \ + tests/atom_explode/dotest || die +} + +src_configure() { + # Avoid slow configure+gnulib+make if on an up-to-date Linux system + if use prefix || ! use kernel_linux || \ + has_version ' + # include + #else +-# if HAVE_SYS_TIME_H ++# ifdef HAVE_SYS_TIME_H + # include + # else + # include + # endif + #endif + +-#if HAVE_UNISTD_H ++#include ++#include ++ ++#ifdef HAVE_UNISTD_H + # include + #endif + +-#if !HAVE_ALARM ++#ifndef HAVE_ALARM + # define alarm(X) /* empty */ + #endif + +@@ -12416,6 +12419,7 @@ else + #undef putenv + + static time_t time_t_max; ++static time_t time_t_min; + + /* Values we'll use to set the TZ environment variable. */ + static const char *const tz_strings[] = { +@@ -12424,9 +12428,9 @@ static const char *const tz_strings[] = { + }; + #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +-/* Fail if mktime fails to convert a date in the spring-forward gap. ++/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +-static void ++static int + spring_forward_gap () + { + /* glibc (up to about 1998-10-07) failed this test. */ +@@ -12445,23 +12449,27 @@ spring_forward_gap () + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; +- if (mktime (&tm) == (time_t)-1) +- exit (1); ++ return mktime (&tm) != (time_t) -1; + } + +-static void +-mktime_test (now) ++static int ++mktime_test1 (now) + time_t now; + { + struct tm *lt; +- if ((lt = localtime (&now)) && mktime (lt) != now) +- exit (1); +- now = time_t_max - now; +- if ((lt = localtime (&now)) && mktime (lt) != now) +- exit (1); ++ return ! (lt = localtime (&now)) || mktime (lt) == now; + } + +-static void ++static int ++mktime_test (now) ++ time_t now; ++{ ++ return (mktime_test1 (now) ++ && mktime_test1 ((time_t) (time_t_max - now)) ++ && mktime_test1 ((time_t) (time_t_min + now))); ++} ++ ++static int + irix_6_4_bug () + { + /* Based on code from Ariel Faigon. */ +@@ -12474,11 +12482,10 @@ irix_6_4_bug () + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); +- if (tm.tm_mon != 2 || tm.tm_mday != 31) +- exit (1); ++ return tm.tm_mon == 2 && tm.tm_mday == 31; + } + +-static void ++static int + bigtime_test (j) + int j; + { +@@ -12500,8 +12507,39 @@ bigtime_test (j) + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) +- exit (1); ++ return 0; + } ++ return 1; ++} ++ ++static int ++year_2050_test () ++{ ++ /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ++ ignoring leap seconds. */ ++ unsigned long int answer = 2527315200UL; ++ ++ struct tm tm; ++ time_t t; ++ tm.tm_year = 2050 - 1900; ++ tm.tm_mon = 2 - 1; ++ tm.tm_mday = 1; ++ tm.tm_hour = tm.tm_min = tm.tm_sec = 0; ++ tm.tm_isdst = -1; ++ ++ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" ++ instead of "TZ=America/Vancouver" in order to detect the bug even ++ on systems that don't support the Olson extension, or don't have the ++ full zoneinfo tables installed. */ ++ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); ++ ++ t = mktime (&tm); ++ ++ /* Check that the result is either a failure, or close enough ++ to the correct answer that we can assume the discrepancy is ++ due to leap seconds. */ ++ return (t == (time_t) -1 ++ || (0 < t && answer - 120 <= t && t <= answer + 120)); + } + + int +@@ -12515,9 +12553,15 @@ main () + isn't worth using anyway. */ + alarm (60); + +- for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) +- continue; +- time_t_max--; ++ for (;;) ++ { ++ t = (time_t_max << 1) + 1; ++ if (t <= time_t_max) ++ break; ++ time_t_max = t; ++ } ++ time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; ++ + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { +@@ -12525,17 +12569,22 @@ main () + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) +- mktime_test (t); +- mktime_test ((time_t) 60 * 60); +- mktime_test ((time_t) 60 * 60 * 24); +- +- for (j = 1; 0 < j; j *= 2) +- bigtime_test (j); +- bigtime_test (j - 1); ++ if (! mktime_test (t)) ++ return 1; ++ if (! (mktime_test ((time_t) 1) ++ && mktime_test ((time_t) (60 * 60)) ++ && mktime_test ((time_t) (60 * 60 * 24)))) ++ return 1; ++ ++ for (j = 1; ; j <<= 1) ++ if (! bigtime_test (j)) ++ return 1; ++ else if (INT_MAX / 2 < j) ++ break; ++ if (! bigtime_test (INT_MAX)) ++ return 1; + } +- irix_6_4_bug (); +- spring_forward_gap (); +- exit (0); ++ return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); + } + _ACEOF + rm -f conftest$ac_exeext diff -uNr a/app-shells/bash/files/autoconf-mktime-2.59.patch b/app-shells/bash/files/autoconf-mktime-2.59.patch --- a/app-shells/bash/files/autoconf-mktime-2.59.patch false +++ b/app-shells/bash/files/autoconf-mktime-2.59.patch ee5e94d82a4a1518d4a8d4454d0a29ad62431b22ffc46e1d7d4840df2895ec7d872b7a1fd0109ce68a1ef7cabf95533eed80c605bba4e0f7060cc557eb9aad8f @@ -0,0 +1,197 @@ +http://bugs.gentoo.org/220040 +--- configure ++++ configure +@@ -5299,26 +6059,25 @@ + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + /* Test program from Paul Eggert and Tony Leneis. */ +-#if TIME_WITH_SYS_TIME ++#ifdef TIME_WITH_SYS_TIME + # include + # include + #else +-# if HAVE_SYS_TIME_H ++# ifdef HAVE_SYS_TIME_H + # include + # else + # include + # endif + #endif + +-#if HAVE_STDLIB_H +-# include +-#endif ++#include ++#include + +-#if HAVE_UNISTD_H ++#ifdef HAVE_UNISTD_H + # include + #endif + +-#if !HAVE_ALARM ++#ifndef HAVE_ALARM + # define alarm(X) /* empty */ + #endif + +@@ -5335,9 +6094,9 @@ + }; + #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) + +-/* Fail if mktime fails to convert a date in the spring-forward gap. ++/* Return 0 if mktime fails to convert a date in the spring-forward gap. + Based on a problem report from Andreas Jaeger. */ +-static void ++static int + spring_forward_gap () + { + /* glibc (up to about 1998-10-07) failed this test. */ +@@ -5356,29 +6115,27 @@ + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_isdst = -1; +- if (mktime (&tm) == (time_t)-1) +- exit (1); ++ return mktime (&tm) != (time_t) -1; + } + +-static void ++static int + mktime_test1 (now) + time_t now; + { + struct tm *lt; +- if ((lt = localtime (&now)) && mktime (lt) != now) +- exit (1); ++ return ! (lt = localtime (&now)) || mktime (lt) == now; + } + +-static void ++static int + mktime_test (now) + time_t now; + { +- mktime_test1 (now); +- mktime_test1 ((time_t) (time_t_max - now)); +- mktime_test1 ((time_t) (time_t_min + now)); ++ return (mktime_test1 (now) ++ && mktime_test1 ((time_t) (time_t_max - now)) ++ && mktime_test1 ((time_t) (time_t_min + now))); + } + +-static void ++static int + irix_6_4_bug () + { + /* Based on code from Ariel Faigon. */ +@@ -5391,11 +6148,10 @@ + tm.tm_sec = 0; + tm.tm_isdst = -1; + mktime (&tm); +- if (tm.tm_mon != 2 || tm.tm_mday != 31) +- exit (1); ++ return tm.tm_mon == 2 && tm.tm_mday == 31; + } + +-static void ++static int + bigtime_test (j) + int j; + { +@@ -5417,8 +6173,39 @@ + && lt->tm_wday == tm.tm_wday + && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) + == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) +- exit (1); ++ return 0; + } ++ return 1; ++} ++ ++static int ++year_2050_test () ++{ ++ /* The correct answer for 2050-02-01 00:00:00 in Pacific time, ++ ignoring leap seconds. */ ++ unsigned long int answer = 2527315200UL; ++ ++ struct tm tm; ++ time_t t; ++ tm.tm_year = 2050 - 1900; ++ tm.tm_mon = 2 - 1; ++ tm.tm_mday = 1; ++ tm.tm_hour = tm.tm_min = tm.tm_sec = 0; ++ tm.tm_isdst = -1; ++ ++ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" ++ instead of "TZ=America/Vancouver" in order to detect the bug even ++ on systems that don't support the Olson extension, or don't have the ++ full zoneinfo tables installed. */ ++ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); ++ ++ t = mktime (&tm); ++ ++ /* Check that the result is either a failure, or close enough ++ to the correct answer that we can assume the discrepancy is ++ due to leap seconds. */ ++ return (t == (time_t) -1 ++ || (0 < t && answer - 120 <= t && t <= answer + 120)); + } + + int +@@ -5432,12 +6219,15 @@ + isn't worth using anyway. */ + alarm (60); + +- for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) +- continue; +- time_t_max--; +- if ((time_t) -1 < 0) +- for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) +- continue; ++ for (;;) ++ { ++ t = (time_t_max << 1) + 1; ++ if (t <= time_t_max) ++ break; ++ time_t_max = t; ++ } ++ time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; ++ + delta = time_t_max / 997; /* a suitable prime number */ + for (i = 0; i < N_STRINGS; i++) + { +@@ -5445,18 +6235,22 @@ + putenv (tz_strings[i]); + + for (t = 0; t <= time_t_max - delta; t += delta) +- mktime_test (t); +- mktime_test ((time_t) 1); +- mktime_test ((time_t) (60 * 60)); +- mktime_test ((time_t) (60 * 60 * 24)); +- +- for (j = 1; 0 < j; j *= 2) +- bigtime_test (j); +- bigtime_test (j - 1); ++ if (! mktime_test (t)) ++ return 1; ++ if (! (mktime_test ((time_t) 1) ++ && mktime_test ((time_t) (60 * 60)) ++ && mktime_test ((time_t) (60 * 60 * 24)))) ++ return 1; ++ ++ for (j = 1; ; j <<= 1) ++ if (! bigtime_test (j)) ++ return 1; ++ else if (INT_MAX / 2 < j) ++ break; ++ if (! bigtime_test (INT_MAX)) ++ return 1; + } +- irix_6_4_bug (); +- spring_forward_gap (); +- exit (0); ++ return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); + } + _ACEOF + rm -f conftest$ac_exeext diff -uNr a/app-shells/bash/files/bash-2.05b-destdir.patch b/app-shells/bash/files/bash-2.05b-destdir.patch --- a/app-shells/bash/files/bash-2.05b-destdir.patch false +++ b/app-shells/bash/files/bash-2.05b-destdir.patch 9099c3c86b956a525b86b542b7060652cba2b54461895764affcf51a84aa78aecd2db7860e256267d980cc495930179e0066a3257ab0bd598f98b4b1f513b6cf @@ -0,0 +1,28 @@ +support DESTDIR install + +--- bash-2.05b/Makefile.in ++++ bash-2.05b/Makefile.in +@@ -20,16 +20,16 @@ + all: .made + + # Include some boilerplate Gnu makefile definitions. +-prefix = @prefix@ ++prefix = $(DESTDIR)@prefix@ + +-exec_prefix = @exec_prefix@ +-bindir = @bindir@ +-libdir = @libdir@ +-infodir = @infodir@ +-includedir = @includedir@ ++exec_prefix = $(DESTDIR)@exec_prefix@ ++bindir = $(DESTDIR)@bindir@ ++libdir = $(DESTDIR)@libdir@ ++infodir = $(DESTDIR)@infodir@ ++includedir = $(DESTDIR)@includedir@ + datadir = @datadir@ + +-mandir = @mandir@ ++mandir = $(DESTDIR)@mandir@ + manpfx = man + + man1ext = .1 diff -uNr a/app-shells/bash/files/bash-2.05b-empty-herestring.patch b/app-shells/bash/files/bash-2.05b-empty-herestring.patch --- a/app-shells/bash/files/bash-2.05b-empty-herestring.patch false +++ b/app-shells/bash/files/bash-2.05b-empty-herestring.patch bcaf057edf13428fd790d3d8fc47a905025be5e6b007459bef6f2f507a6dd27dbf824a46da9f43f6c515a1beb96086331d0094cf1638a112d561b951914c5b1f @@ -0,0 +1,25 @@ +################################################################### +# Added by Tavis Ormandy 01/05/2003 +# Reproduce with +# +# $ xargs <<< ${EMTPY_VARIABLE} +# Segmentation fault. +# +# note: bash will still give you a "\n" with this patch, but this is +# standard behaviour, if you need proof: +# +# $ wc -l <<< "" +############################### + +--- bash-2.05b/redir.c ++++ bash-2.05b/redir.c +@@ -263,7 +263,7 @@ + int herelen, n, e; + + herestr = expand_string_to_string (redirectee->word, 0); +- herelen = strlen (herestr); ++ herelen = (herestr == NULL) ? 0 : strlen (herestr); + + n = write (fd, herestr, herelen); + if (n == herelen) + { diff -uNr a/app-shells/bash/files/bash-2.05b-fix-job-warning.patch b/app-shells/bash/files/bash-2.05b-fix-job-warning.patch --- a/app-shells/bash/files/bash-2.05b-fix-job-warning.patch false +++ b/app-shells/bash/files/bash-2.05b-fix-job-warning.patch dfa110fb5bf94138abf0e5ce325ee8878bdf7c0514dd83bcc147217f60e38da683436ef6a0ae12c934789299769bf361513694eb49b61f6138ce5bf7e47ea890 @@ -0,0 +1,14 @@ +fix obvious error: +common.c:247:5: warning: format '%s' expects a matching 'char *' argument [-Wformat=] + +--- a/builtins/common.c ++++ b/builtins/common.c +@@ -244,7 +244,7 @@ + char *s; + { + if (s) +- builtin_error ("%s: no job control"); ++ builtin_error ("%s: no job control", s); + else + builtin_error ("no job control"); + } diff -uNr a/app-shells/bash/files/bash-2.05b-jobs.patch b/app-shells/bash/files/bash-2.05b-jobs.patch --- a/app-shells/bash/files/bash-2.05b-jobs.patch false +++ b/app-shells/bash/files/bash-2.05b-jobs.patch 88265fbe63a24e0bc591f0185b530d19a393781144be5bed95d45ca81834f7f371ce1373e8e28474d4863488cc18d95dfa19bf4a7bc17ce98bbd52a4c53a7eef @@ -0,0 +1,28 @@ +Fix using bash with post-20040808 glibc ebuilds (from fedora) + +--- bash-2.05b/jobs.c ++++ bash-2.05b/jobs.c +@@ -2423,6 +2423,7 @@ + PROCESS *child; + pid_t pid; + int call_set_current, last_stopped_job, job, children_exited, waitpid_flags; ++ static int wcontinued_not_supported = 0; + + call_set_current = children_exited = 0; + last_stopped_job = NO_JOB; +@@ -2436,7 +2437,15 @@ + : 0; + if (sigchld || block == 0) + waitpid_flags |= WNOHANG; ++ retry: ++ if (wcontinued_not_supported) ++ waitpid_flags &= ~WCONTINUED; + pid = WAITPID (-1, &status, waitpid_flags); ++ if (pid == -1 && errno == EINVAL) ++ { ++ wcontinued_not_supported = 1; ++ goto retry; ++ } + + /* The check for WNOHANG is to make sure we decrement sigchld only + if it was non-zero before we called waitpid. */ diff -uNr a/app-shells/bash/files/bash-2.05b-parallel-build.patch b/app-shells/bash/files/bash-2.05b-parallel-build.patch --- a/app-shells/bash/files/bash-2.05b-parallel-build.patch false +++ b/app-shells/bash/files/bash-2.05b-parallel-build.patch 9bdfed73dbe3bad9b95e5cadd2f23beef3f308394a9bc7e8a9bcab6dead4cba91706da0c0a6b124e7e9cc2a0d296af5addcb176eaa50bbfc4f456f9e96a094d9 @@ -0,0 +1,15 @@ +Fix parallel make + +http://bugs.gentoo.org/41002 + +--- a/Makefile.in ++++ b/Makefile.in +@@ -604,7 +604,7 @@ + + config.h: stamp-h + +-stamp-h: config.status $(srcdir)/config.h.in $(srcdir)/config-top.h $(srcdir)/config-bot.h ++stamp-h: version.h config.status $(srcdir)/config.h.in $(srcdir)/config-top.h $(srcdir)/config-bot.h + CONFIG_FILES= CONFIG_HEADERS=config.h $(SHELL) ./config.status + + config.status: $(srcdir)/configure diff -uNr a/app-shells/bash/files/bash-2.05b-protos.patch b/app-shells/bash/files/bash-2.05b-protos.patch --- a/app-shells/bash/files/bash-2.05b-protos.patch false +++ b/app-shells/bash/files/bash-2.05b-protos.patch 816a5b860c88f21fd2985ffe9ba9dc2c7536a27f57696e2d5fffdef61de049246e6d673f4da263180e609ef9e37b7808c125b095a71cbfea40a8e81eda01e3ef @@ -0,0 +1,25 @@ +move prototypes around so they show up when needed + +--- a/externs.h ++++ b/externs.h +@@ -327,6 +327,9 @@ + #undef xstrchr + extern char *xstrchr __P((const char *, int)); + ++/* declarations for functions defined in lib/sh/zcatfd.c */ ++extern int zcatfd __P((int, int, char *)); ++ + /* declarations for functions defined in lib/sh/zread.c */ + extern ssize_t zread __P((int, char *, size_t)); + extern ssize_t zreadintr __P((int, char *, size_t)); +--- a/jobs.h ++++ b/jobs.h +@@ -175,6 +175,8 @@ + extern void ignore_tty_job_signals __P((void)); + extern void default_tty_job_signals __P((void)); + ++extern void close_pgrp_pipe __P((void)); ++ + #if defined (JOB_CONTROL) + extern int job_control; + #endif diff -uNr a/app-shells/bash/files/bash-2.05b-rbash.patch b/app-shells/bash/files/bash-2.05b-rbash.patch --- a/app-shells/bash/files/bash-2.05b-rbash.patch false +++ b/app-shells/bash/files/bash-2.05b-rbash.patch 6d40fb55a519119a9e79deca575114bfb04c46deb367f2d1fa78f09e0b2bc8e4c4252a4aad090a75ec9bdb3668efd45b7fbf526eecd64a055a3e1750b195552b @@ -0,0 +1,27 @@ +Fix broken rbash functionality when used as a login shell via /etc/passwd + +http://bugs.gentoo.org/26854 +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=170298 + +Backported from bash-3.1 + +--- bash-2.05b/shell.c ++++ bash-2.05b/shell.c +@@ -1065,6 +1099,8 @@ + if (restricted) + return 1; + temp = base_pathname (name); ++ if (*temp == '-') ++ temp++; + return (STREQ (temp, RESTRICTED_SHELL_NAME)); + } + +@@ -1082,6 +1118,8 @@ + char *temp; + + temp = base_pathname (name); ++ if (*temp == '-') ++ temp++; + if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME))) + { + set_var_read_only ("PATH"); diff -uNr a/app-shells/bash/files/bash-3.0-darwin-conn.patch b/app-shells/bash/files/bash-3.0-darwin-conn.patch --- a/app-shells/bash/files/bash-3.0-darwin-conn.patch false +++ b/app-shells/bash/files/bash-3.0-darwin-conn.patch eda8430703af36f4276eaa718c99308d5a94a5fdc8cd1235a04fbbffc4b38ad82b9f804a418c0502bb19cf60048501795a2d6335111ed3e553be655431594480 @@ -0,0 +1,20 @@ +Sune Foldager writes: +On Darwin (Mac OS X), bash incorrectly assumed that it has been called over a +network connection (such as ssh, rsh etc.), when stdin stems from the pipe() +system call. This is because bash's heuristic code for determining if it's +been started over a net connection is incorrect on Darwin kernels. + +http://bugs.gentoo.org/79124 + +--- a/lib/sh/netconn.c ++++ b/lib/sh/netconn.c +@@ -53,7 +53,8 @@ + l = sizeof(sa); + rv = getpeername(fd, &sa, &l); + /* Solaris 2.5 getpeername() returns EINVAL if the fd is not a socket. */ +- return ((rv < 0 && (errno == ENOTSOCK || errno == EINVAL)) ? 0 : 1); ++ /* Darwin 7.7.0 getpeername() returns ENOTCONN if the fd was created with pipe(). */ ++ return ((rv < 0 && (errno == ENOTSOCK || errno == ENOTCONN || errno == EINVAL)) ? 0 : 1); + #else /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */ + # if defined (SVR4) || defined (SVR4_2) + /* Sockets on SVR4 and SVR4.2 are character special (streams) devices. */ diff -uNr a/app-shells/bash/files/bash-3.0-pgrp-pipe-fix.patch b/app-shells/bash/files/bash-3.0-pgrp-pipe-fix.patch --- a/app-shells/bash/files/bash-3.0-pgrp-pipe-fix.patch false +++ b/app-shells/bash/files/bash-3.0-pgrp-pipe-fix.patch 925e228be6f7c6a4e9b2b373e0811e5ff36d0e6deb48311ffc369fe716c24f12d6e4822b4d24dc3fbf255e58df9b8278bf7a103584f5351f37334ec285952b27 @@ -0,0 +1,20 @@ +Fix an error when using pipes and PGRP_PIPE is enabled. +( exec 3>&1; : `echo >&3` ) +bash: 3: Bad file descriptor + +http://bugs.gentoo.org/92349 + +Patch from upstream + +*** jobs.c Wed Sep 8 11:08:16 2004 +--- jobs.c Thu Jun 30 17:21:26 2005 +*************** +*** 3456,3459 **** +--- 3901,3907 ---- + stop_making_children (); + start_pipeline (); ++ #if defined (PGRP_PIPE) ++ pipe_close (pgrp_pipe); ++ #endif + delete_all_jobs (0); + set_job_control (0); diff -uNr a/app-shells/bash/files/bash-3.0-protos.patch b/app-shells/bash/files/bash-3.0-protos.patch --- a/app-shells/bash/files/bash-3.0-protos.patch false +++ b/app-shells/bash/files/bash-3.0-protos.patch 726734c5b74de202fd72fa87167a1088ff70ba611a7684f6c8f69d8d66eb4be2e93fe0e60cec7ee97963cf5c44f83271522d398ea90349260d19be92f98d46b3 @@ -0,0 +1,68 @@ +move prototypes around so they show up when needed + +--- a/externs.h ++++ b/externs.h +@@ -327,6 +327,9 @@ + #undef xstrchr + extern char *xstrchr __P((const char *, int)); + ++/* declarations for functions defined in lib/sh/zcatfd.c */ ++extern int zcatfd __P((int, int, char *)); ++ + /* declarations for functions defined in lib/sh/zread.c */ + extern ssize_t zread __P((int, char *, size_t)); + extern ssize_t zreadintr __P((int, char *, size_t)); +--- a/jobs.h ++++ b/jobs.h +@@ -175,6 +175,8 @@ + extern void ignore_tty_job_signals __P((void)); + extern void default_tty_job_signals __P((void)); + ++extern void close_pgrp_pipe __P((void)); ++ + #if defined (JOB_CONTROL) + extern int job_control; + #endif +--- a/general.c ++++ b/general.c +@@ -39,6 +39,8 @@ + #include "bashintl.h" + + #include "shell.h" ++#include "test.h" ++ + #include + + #if !defined (errno) +--- a/builtins/evalfile.c ++++ b/builtins/evalfile.c +@@ -39,6 +39,7 @@ + #include "../flags.h" + #include "../input.h" + #include "../execute_cmd.h" ++#include "../trap.h" + + #if defined (HISTORY) + # include "../bashhist.h" +--- a/lib/glob/strmatch.c ++++ b/lib/glob/strmatch.c +@@ -25,9 +25,6 @@ + #include "strmatch.h" + + extern int xstrmatch __P((char *, char *, int)); +-#if defined (HAVE_MULTIBYTE) +-extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); +-#endif + + int + strmatch (pattern, string, flags) +--- a/lib/glob/strmatch.h ++++ b/lib/glob/strmatch.h +@@ -57,6 +57,7 @@ + + #if HANDLE_MULTIBYTE + extern int wcsmatch __P((wchar_t *, wchar_t *, int)); ++extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); + #endif + + #endif /* _STRMATCH_H */ diff -uNr a/app-shells/bash/files/bash-3.0-rbash.patch b/app-shells/bash/files/bash-3.0-rbash.patch --- a/app-shells/bash/files/bash-3.0-rbash.patch false +++ b/app-shells/bash/files/bash-3.0-rbash.patch 78400a0caeafe0a63edc6e3aaba15c6282db158f46ae0b84c34d28c228a19d851f70fe6c16cfc00697f32bd2b8810af2bb7d8fa574a78209b92417329e041eb4 @@ -0,0 +1,18 @@ +Fix broken rbash functionality when used as a login shell via /etc/passwd + +http://bugs.gentoo.org/26854 +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=170298 + +Backported from bash-3.1 + +--- bash-3.0/shell.c ++++ bash-3.0/shell.c +@@ -1089,6 +1099,8 @@ + if (restricted) + return 1; + temp = base_pathname (name); ++ if (*temp == '-') ++ temp++; + return (STREQ (temp, RESTRICTED_SHELL_NAME)); + } + diff -uNr a/app-shells/bash/files/bash-3.0-read-builtin-pipe.patch b/app-shells/bash/files/bash-3.0-read-builtin-pipe.patch --- a/app-shells/bash/files/bash-3.0-read-builtin-pipe.patch false +++ b/app-shells/bash/files/bash-3.0-read-builtin-pipe.patch 40f97d31ac94946d7ee6f8f6041a37c44c3fd2472a0bce77360246712ede726f461e2bba68bf5024501686ed40d37a116f9563d0280abfa2d9c445e9484cb739 @@ -0,0 +1,20 @@ +Description: +When using 'read -u 3' or the like, and the pipe-buf already contains +more than one line, the first line is returned, and bytes up to the next +multiple of 128 are skipped. + +http://lists.gnu.org/archive/html/bug-bash/2005-03/msg00168.html +http://lists.gnu.org/archive/html/bug-bash/2005-03/msg00173.html +http://bugs.gentoo.org/show_bug.cgi?id=87093 + +--- builtins/read.def ++++ builtins/read.def +@@ -276,7 +276,7 @@ + input_is_tty = isatty (fd); + if (input_is_tty == 0) + #ifndef __CYGWIN__ +- input_is_pipe = (lseek (0, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); ++ input_is_pipe = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE); + #else + input_is_pipe = 1; + #endif diff -uNr a/app-shells/bash/files/bash-3.0-read-memleak.patch b/app-shells/bash/files/bash-3.0-read-memleak.patch --- a/app-shells/bash/files/bash-3.0-read-memleak.patch false +++ b/app-shells/bash/files/bash-3.0-read-memleak.patch ec374942032869999c0d0fe2c1d7d4fcfdcd87ff382b5f1cd03311d79d380857f633151746f6d6da85758481bde9f31a17b9c9aa945706bfa628786024f32e59 @@ -0,0 +1,15 @@ +Ripped from Fedora + +http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00013.html +https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=173283 + +--- bash-3.0/builtins/read.def ++++ bash-3.0/builtins/read.def +@@ -461,6 +461,7 @@ + if (retval < 0) + { + builtin_error (_("read error: %d: %s"), fd, strerror (errno)); ++ run_unwind_frame ("read_builtin"); + return (EXECUTION_FAILURE); + } + #endif diff -uNr a/app-shells/bash/files/bash-3.0-strnlen.patch b/app-shells/bash/files/bash-3.0-strnlen.patch --- a/app-shells/bash/files/bash-3.0-strnlen.patch false +++ b/app-shells/bash/files/bash-3.0-strnlen.patch 0da0fb3eab464ef163085d98ed47c0d0842f9bd057e8ce80338f99cddc2695fbe44546997ce4516f73c4d0df6da5af5ad4ce8db6180bfbe5737e030caf149c54 @@ -0,0 +1,175 @@ +Add strnlen function for non-glibc systems, as one of Fedora's patches requires it. + +--- bash-3.0/configure.in ++++ bash-3.0/configure.in +@@ -613,6 +613,9 @@ + AC_LIBOBJ(vprint) + fi + ++AC_CHECK_FUNCS([strnlen]) ++AC_LIBOBJ(strnlen) ++ + dnl signal stuff + AC_TYPE_SIGNAL + +--- /dev/null ++++ bash-3.0/lib/sh/strnlen.c +@@ -0,0 +1,27 @@ ++/* ++ Copyright (C) 2005 Gentoo Foundation ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License ++ as published by the Free Software Foundation; either version 2 ++ of the License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, write to the Free Software ++ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US ++*/ ++ ++#include ++ ++size_t strnlen(const char *s, size_t n) ++{ ++ int i; ++ for (i=0; s[i] && i&5 ++echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ++if eval "test \"\${$as_ac_var+set}\" = set"; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++/* Define $ac_func to an innocuous variant, in case declares $ac_func. ++ For example, HP-UX 11i declares gettimeofday. */ ++#define $ac_func innocuous_$ac_func ++ ++/* System header to define __stub macros and hopefully few prototypes, ++ which can conflict with char $ac_func (); below. ++ Prefer to if __STDC__ is defined, since ++ exists even on freestanding compilers. */ ++ ++#ifdef __STDC__ ++# include ++#else ++# include ++#endif ++ ++#undef $ac_func ++ ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char $ac_func (); ++/* The GNU C library defines this for functions which it implements ++ to always fail with ENOSYS. Some functions are actually named ++ something starting with __ and the normal name is an alias. */ ++#if defined (__stub_$ac_func) || defined (__stub___$ac_func) ++choke me ++#else ++char (*f) () = $ac_func; ++#endif ++#ifdef __cplusplus ++} ++#endif ++ ++int ++main () ++{ ++return f != $ac_func; ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ eval "$as_ac_var=yes" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++eval "$as_ac_var=no" ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++fi ++echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 ++echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ++if test `eval echo '${'$as_ac_var'}'` = yes; then ++ cat >>confdefs.h <<_ACEOF ++#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 ++_ACEOF ++ ++fi ++done ++ ++case $LIBOBJS in ++ "strnlen.$ac_objext" | \ ++ *" strnlen.$ac_objext" | \ ++ "strnlen.$ac_objext "* | \ ++ *" strnlen.$ac_objext "* ) ;; ++ *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" ;; ++esac ++ ++ + echo "$as_me:$LINENO: checking return type of signal handlers" >&5 + echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 + if test "${ac_cv_type_signal+set}" = set; then diff -uNr a/app-shells/bash/files/bash-3.0-trap-fg-signals.patch b/app-shells/bash/files/bash-3.0-trap-fg-signals.patch --- a/app-shells/bash/files/bash-3.0-trap-fg-signals.patch false +++ b/app-shells/bash/files/bash-3.0-trap-fg-signals.patch 396970f4a6471c1461a69b2d13978145a25d8a1379d39015d6bcaa280b41db76453c49b988dbb4fda764fb1840f74f160ec252245efd291dbe1baeb518ed1653 @@ -0,0 +1,23 @@ +Don't barf on handled signals inside of scripts. Makes for nicer output. + +patch by Martin Schlemmer + +--- jobs.c ++++ jobs.c +@@ -2893,11 +2893,11 @@ + } + else if (IS_FOREGROUND (job)) + { +-#if !defined (DONT_REPORT_SIGPIPE) +- if (termsig && WIFSIGNALED (s) && termsig != SIGINT) +-#else +- if (termsig && WIFSIGNALED (s) && termsig != SIGINT && termsig != SIGPIPE) +-#endif ++ if (termsig && WIFSIGNALED (s) && termsig != SIGINT && ++#if defined (DONT_REPORT_SIGPIPE) ++ termsig != SIGPIPE && ++#endif ++ signal_is_trapped (termsig) == 0) + { + fprintf (stderr, "%s", j_strsignal (termsig)); + diff -uNr a/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch b/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch --- a/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch false +++ b/app-shells/bash/files/bash-3.1-dev-fd-buffer-overflow.patch c8cf502067dc79b51eb5289352cafb5d0e18efc2a3ba5dd303f338dee0370a0d5299fb049e89548f5676137c0481e05bb599ab53ea88fbc79748a0723d0d16a2 @@ -0,0 +1,16 @@ +https://bugs.gentoo.org/431850 + +this is a backport of the upstream bash42-033 patch for bash 3.1/3.0/2.05 + +--- a/test.c ++++ b/test.c +@@ -194,7 +194,8 @@ + trailing slash. Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx. + On most systems, with the notable exception of linux, this is + effectively a no-op. */ +- char pbuf[32]; ++ static char *pbuf = 0; ++ pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8)); + strcpy (pbuf, DEV_FD_PREFIX); + strcat (pbuf, path + 8); + return (stat (pbuf, finfo)); diff -uNr a/app-shells/bash/files/bash-3.1-dev-fd-test-as-user.patch b/app-shells/bash/files/bash-3.1-dev-fd-test-as-user.patch --- a/app-shells/bash/files/bash-3.1-dev-fd-test-as-user.patch false +++ b/app-shells/bash/files/bash-3.1-dev-fd-test-as-user.patch 01f9cb3ae036ffd3660580e8737c68872aa8768685b40f28b851cfad50b3138e0905738a22c80ef38cc571d7341595ebc892a8013be11e25ba7de96bc273228a @@ -0,0 +1,14 @@ +Fix the /dev/fd test when running as a non root user +after logging in as a root user #131875 + +--- bash-3.1/configure ++++ bash-3.1/configure +@@ -23098,7 +23098,7 @@ + if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then + # check for systems like FreeBSD 5 that only provide /dev/fd/[012] + exec 3<&0 +- if test -r /dev/fd/3; then ++ if test -e /dev/fd/3; then + bash_cv_dev_fd=standard + else + bash_cv_dev_fd=absent diff -uNr a/app-shells/bash/files/bash-3.1-fix-dash-login-shell.patch b/app-shells/bash/files/bash-3.1-fix-dash-login-shell.patch --- a/app-shells/bash/files/bash-3.1-fix-dash-login-shell.patch false +++ b/app-shells/bash/files/bash-3.1-fix-dash-login-shell.patch f10deed71b537f13641862be515e34ebe8743f4d9b686fa9acf180acd079d6199930a18c59bd336ed58c65d90c4c04d516bf01495a1db68263e03319883a905c @@ -0,0 +1,52 @@ +http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00054.html +http://bugs.gentoo.org/118257 + +Date: Fri, 13 Jan 2006 17:11:10 +0000 +From: Tim Waugh +To: bug-bash@gnu.org +Subject: [patch] fix 'exec -l /bin/bash' + +Configuration Information [Automatically generated, do not change]: +Machine: i386 +OS: linux-gnu +Compiler: i386-redhat-linux-gcc +Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables +uname output: Linux gene.surrey.redhat.com 2.6.13-1.1597_FC5 #1 Thu Oct 6 02:13:06 EDT 2005 i686 i686 i386 GNU/Linux +Machine Type: i386-redhat-linux-gnu + +Bash Version: 3.1 +Patch Level: 1 +Release Status: release + +Description: + If bash has argv[0] as '-/bin/bash' it does not become a login + shell. + +Repeat-By: + exec -l /bin/bash + shopt + +Fix: + +--- bash-3.1/shell.c.login 2006-01-13 16:52:14.000000000 +0000 ++++ bash-3.1/shell.c 2006-01-13 16:52:15.000000000 +0000 +@@ -1543,9 +1543,10 @@ + any startup files; just try to be more like /bin/sh. */ + shell_name = argv0 ? base_pathname (argv0) : PROGRAM; + +- if (*shell_name == '-') ++ if (argv0 && *argv0 == '-') + { +- shell_name++; ++ if (*shell_name == '-') ++ shell_name++; + login_shell++; + } + + + +_______________________________________________ +Bug-bash mailing list +Bug-bash@gnu.org +http://lists.gnu.org/mailman/listinfo/bug-bash + diff -uNr a/app-shells/bash/files/bash-3.1-protos.patch b/app-shells/bash/files/bash-3.1-protos.patch --- a/app-shells/bash/files/bash-3.1-protos.patch false +++ b/app-shells/bash/files/bash-3.1-protos.patch c472f42bf726210aaba9378606c47f89f8307163a17ce0f21514243c47ee74f310a28864c09f8a15ccf8cb86fed9737811416742979bae5465dca9ef318e85ee @@ -0,0 +1,67 @@ +move prototypes around so they show up when needed + +--- a/jobs.h ++++ b/jobs.h +@@ -182,6 +182,7 @@ + + extern int count_all_jobs __P((void)); + ++extern void close_pgrp_pipe __P((void)); + extern void terminate_current_pipeline __P((void)); + extern void terminate_stopped_jobs __P((void)); + extern void hangup_all_jobs __P((void)); +--- a/lib/glob/strmatch.c ++++ b/lib/glob/strmatch.c +@@ -25,9 +25,6 @@ + #include "strmatch.h" + + extern int xstrmatch __P((char *, char *, int)); +-#if defined (HAVE_MULTIBYTE) +-extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); +-#endif + + int + strmatch (pattern, string, flags) +--- a/lib/glob/strmatch.h ++++ b/lib/glob/strmatch.h +@@ -57,6 +57,7 @@ + + #if HANDLE_MULTIBYTE + extern int wcsmatch __P((wchar_t *, wchar_t *, int)); ++extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); + #endif + + #endif /* _STRMATCH_H */ +--- a/builtins/echo.def ++++ b/builtins/echo.def +@@ -31,6 +31,8 @@ + #include + #include "../shell.h" + ++#include "common.h" ++ + $BUILTIN echo + $FUNCTION echo_builtin + $DEPENDS_ON V9_ECHO +--- a/lib/sh/winsize.c ++++ b/lib/sh/winsize.c +@@ -55,6 +55,7 @@ + #if defined (READLINE) + extern void rl_set_screen_size __P((int, int)); + #endif ++extern void sh_set_lines_and_columns __P((int, int)); + + void + get_new_window_size (from_sig, rp, cp) +--- a/support/bashversion.c ++++ b/support/bashversion.c +@@ -47,6 +47,9 @@ + extern char *dist_version; + extern int patch_level; + ++extern char *shell_version_string __P((void)); ++extern void show_shell_version __P((int)); ++ + char *shell_name = "bash"; + char *progname; + diff -uNr a/app-shells/bash/files/bash-3.1-ulimit.patch b/app-shells/bash/files/bash-3.1-ulimit.patch --- a/app-shells/bash/files/bash-3.1-ulimit.patch false +++ b/app-shells/bash/files/bash-3.1-ulimit.patch 7ce6de218df56faeb085692a7a72bdf010a1a160609d705a37314d8f490d7f6a7e06015e520a49cb3613d28a0b175ca0e70a472a10a29143e9d31a0b6e84f5d7 @@ -0,0 +1,122 @@ +Ripped from Fedora + +Add support for RLIMIT_NICE/RLIMIT_RTPRIO and add missing documentation +for many other options + +--- builtins/ulimit.def ++++ builtins/ulimit.def +@@ -24,7 +24,7 @@ + $BUILTIN ulimit + $FUNCTION ulimit_builtin + $DEPENDS_ON !_MINIX +-$SHORT_DOC ulimit [-SHacdfilmnpqstuvx] [limit] ++$SHORT_DOC ulimit [-SHacdefilmnpqrstuvx] [limit] + Ulimit provides control over the resources available to processes + started by the shell, on systems that allow such control. If an + option is given, it is interpreted as follows: +@@ -34,18 +34,20 @@ + -a all current limits are reported + -c the maximum size of core files created + -d the maximum size of a process's data segment ++ -e the maximum scheduling priority (`nice') + -f the maximum size of files created by the shell +- -i the maximum number of pending signals ++ -i the maximum number of pending signals + -l the maximum size a process may lock into memory + -m the maximum resident set size + -n the maximum number of open file descriptors + -p the pipe buffer size +- -q the maximum number of bytes in POSIX message queues ++ -q the maximum number of bytes in POSIX message queues ++ -r the maximum rt priority + -s the maximum stack size + -t the maximum amount of cpu time in seconds + -u the maximum number of user processes + -v the size of virtual memory +- -x the maximum number of file locks ++ -x the maximum number of file locks + + If LIMIT is given, it is the new value of the specified resource; + the special LIMIT values `soft', `hard', and `unlimited' stand for +@@ -202,6 +204,9 @@ + #ifdef RLIMIT_DATA + { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" }, + #endif ++#ifdef RLIMIT_NICE ++ { 'e', RLIMIT_NICE, 1, "max nice", (char *)NULL}, ++#endif + { 'f', RLIMIT_FILESIZE, 1024, "file size", "blocks" }, + #ifdef RLIMIT_SIGPENDING + { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL }, +@@ -217,6 +222,9 @@ + #ifdef RLIMIT_MSGQUEUE + { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" }, + #endif ++#ifdef RLIMIT_RTPRIO ++ { 'r', RLIMIT_RTPRIO, 1, "max rt priority", (char *)NULL}, ++#endif + #ifdef RLIMIT_STACK + { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" }, + #endif +--- doc/bashref.texi ++++ doc/bashref.texi +@@ -3833,7 +3833,7 @@ + @item ulimit + @btindex ulimit + @example +-ulimit [-acdfilmnpqstuvxSH] [@var{limit}] ++ulimit [-acdefilmnpqrstuvxSH] [@var{limit}] + @end example + @code{ulimit} provides control over the resources available to processes + started by the shell, on systems that allow such control. If an +@@ -3854,6 +3854,9 @@ + @item -d + The maximum size of a process's data segment. + ++@item -e ++The maximum scheduling priority. ++ + @item -f + The maximum size of files created by the shell. + +@@ -3875,6 +3878,9 @@ + @item -q + The maximum number of bytes in POSIX message queues. + ++@item -r ++The maximum RT priority. ++ + @item -s + The maximum stack size. + +--- doc/bash.1 ++++ doc/bash.1 +@@ -8490,7 +8490,7 @@ + returns true if any of the arguments are found, false if + none are found. + .TP +-\fBulimit\fP [\fB\-SHacdfilmnpqstuvx\fP [\fIlimit\fP]] ++\fBulimit\fP [\fB\-SHacdefilmnpqrstuvx\fP [\fIlimit\fP]] + Provides control over the resources available to the shell and to + processes started by it, on systems that allow such control. + The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is +@@ -8526,6 +8526,9 @@ + .B \-d + The maximum size of a process's data segment + .TP ++.B \-e ++The maximum scheduling priority (`nice') ++.TP + .B \-f + The maximum size of files created by the shell + .TP +@@ -8548,6 +8551,9 @@ + .B \-q + The maximum number of bytes in POSIX message queues + .TP ++.B \-r ++The maximum rt priority ++.TP + .B \-s + The maximum stack size + .TP diff -uNr a/app-shells/bash/files/bash-3.2-dev-fd-test-as-user.patch b/app-shells/bash/files/bash-3.2-dev-fd-test-as-user.patch --- a/app-shells/bash/files/bash-3.2-dev-fd-test-as-user.patch false +++ b/app-shells/bash/files/bash-3.2-dev-fd-test-as-user.patch 643a7af3f5367f611e751a71326f89980b6950023e2ed8db4673082de2a366ec648bbbbaa6667dd1eda545c0a94dd5dd505fd1aabd1a3641172ee99fadad24c8 @@ -0,0 +1,26 @@ +diff -ur bash-3.2.orig/aclocal.m4 bash-3.2/aclocal.m4 +--- bash-3.2.orig/aclocal.m4 2006-12-30 20:00:31 +0000 ++++ bash-3.2/aclocal.m4 2006-12-30 20:02:02 +0000 +@@ -1544,7 +1544,8 @@ + if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then + # check for systems like FreeBSD 5 that only provide /dev/fd/[012] + exec 3 + #include "builtins.h" + #include "shell.h" ++#include "common.h" + + basename_builtin (list) + WORD_LIST *list; +--- bash-3.2/examples/loadables/cut.c ++++ bash-3.2/examples/loadables/cut.c +@@ -63,6 +63,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/dirname.c ++++ bash-3.2/examples/loadables/dirname.c +@@ -11,6 +11,7 @@ + #include + #include "builtins.h" + #include "shell.h" ++#include "common.h" + + dirname_builtin (list) + WORD_LIST *list; +--- bash-3.2/examples/loadables/finfo.c ++++ bash-3.2/examples/loadables/finfo.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #include "bashansi.h" + #include "shell.h" +--- bash-3.2/examples/loadables/head.c ++++ bash-3.2/examples/loadables/head.c +@@ -21,6 +21,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/ln.c ++++ bash-3.2/examples/loadables/ln.c +@@ -18,6 +18,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/logname.c ++++ bash-3.2/examples/loadables/logname.c +@@ -11,6 +11,7 @@ + + #include "builtins.h" + #include "shell.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/mkdir.c ++++ bash-3.2/examples/loadables/mkdir.c +@@ -16,6 +16,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/pathchk.c ++++ bash-3.2/examples/loadables/pathchk.c +@@ -45,6 +45,7 @@ + #include "stdc.h" + #include "bashgetopt.h" + #include "maxpath.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/print.c ++++ bash-3.2/examples/loadables/print.c +@@ -17,6 +17,8 @@ + #include "builtins.h" + #include "stdc.h" + #include "bashgetopt.h" ++#include "builtext.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/printenv.c ++++ bash-3.2/examples/loadables/printenv.c +@@ -11,6 +11,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + extern char **export_env; + +--- bash-3.2/examples/loadables/push.c ++++ bash-3.2/examples/loadables/push.c +@@ -11,6 +11,7 @@ + #include "shell.h" + #include "jobs.h" + #include "bashgetopt.h" ++#include "common.h" + + #ifndef errno + extern int errno; +--- bash-3.2/examples/loadables/realpath.c ++++ bash-3.2/examples/loadables/realpath.c +@@ -34,6 +34,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + #ifndef errno + extern int errno; +@@ -67,14 +68,14 @@ + vflag = 1; + break; + default: +- usage(); ++ builtin_usage(); + } + } + + list = loptend; + + if (list == 0) +- usage(); ++ builtin_usage(); + + for (es = EXECUTION_SUCCESS; list; list = list->next) { + p = list->word->word; +--- bash-3.2/examples/loadables/rmdir.c ++++ bash-3.2/examples/loadables/rmdir.c +@@ -8,6 +8,7 @@ + #include + #include "builtins.h" + #include "shell.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/sleep.c ++++ bash-3.2/examples/loadables/sleep.c +@@ -27,6 +27,7 @@ + + #include "shell.h" + #include "builtins.h" ++#include "common.h" + + #define RETURN(x) \ + do { \ +--- bash-3.2/examples/loadables/tee.c ++++ bash-3.2/examples/loadables/tee.c +@@ -22,6 +22,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + #if !defined (errno) + extern int errno; +--- bash-3.2/examples/loadables/truefalse.c ++++ bash-3.2/examples/loadables/truefalse.c +@@ -1,5 +1,7 @@ + /* true and false builtins */ + ++#include ++ + #include "bashtypes.h" + #include "shell.h" + #include "builtins.h" +--- bash-3.2/examples/loadables/tty.c ++++ bash-3.2/examples/loadables/tty.c +@@ -8,6 +8,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + extern char *ttyname (); + +--- bash-3.2/examples/loadables/uname.c ++++ bash-3.2/examples/loadables/uname.c +@@ -27,6 +27,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + #define FLAG_SYSNAME 0x01 /* -s */ + #define FLAG_NODENAME 0x02 /* -n */ +--- bash-3.2/examples/loadables/unlink.c ++++ bash-3.2/examples/loadables/unlink.c +@@ -14,6 +14,7 @@ + + #include "builtins.h" + #include "shell.h" ++#include "common.h" + + #ifndef errno + extern int errno; +--- bash-3.2/examples/loadables/whoami.c ++++ bash-3.2/examples/loadables/whoami.c +@@ -8,6 +8,7 @@ + #include "builtins.h" + #include "shell.h" + #include "bashgetopt.h" ++#include "common.h" + + whoami_builtin (list) + WORD_LIST *list; +--- bash-3.2/examples/loadables/Makefile.in ++++ bash-3.2/examples/loadables/Makefile.in +@@ -68,7 +68,7 @@ + SHOBJ_CC = @SHOBJ_CC@ + SHOBJ_CFLAGS = @SHOBJ_CFLAGS@ + SHOBJ_LD = @SHOBJ_LD@ +-SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ ++SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ @LDFLAGS@ + SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@ + SHOBJ_LIBS = @SHOBJ_LIBS@ + SHOBJ_STATUS = @SHOBJ_STATUS@ diff -uNr a/app-shells/bash/files/bash-3.2-process-subst.patch b/app-shells/bash/files/bash-3.2-process-subst.patch --- a/app-shells/bash/files/bash-3.2-process-subst.patch false +++ b/app-shells/bash/files/bash-3.2-process-subst.patch 843673500fbdcd8d855ead0a79041f474fb701b64e8d9f1f8970f6d56ab66903f4784a0a3665682cc158e4f062fde253a60b17196c2bd56e6e92db1f3f10a734 @@ -0,0 +1,12 @@ +Fix process substitution on BSD + +--- execute_cmd.c ++++ execute_cmd.c +@@ -2672,6 +2672,7 @@ + + do_piping (pipe_in, pipe_out); + ++ subshell_environment = 0; + if (async) + subshell_environment |= SUBSHELL_ASYNC; + if (pipe_in != NO_PIPE || pipe_out != NO_PIPE) diff -uNr a/app-shells/bash/files/bash-3.2-protos.patch b/app-shells/bash/files/bash-3.2-protos.patch --- a/app-shells/bash/files/bash-3.2-protos.patch false +++ b/app-shells/bash/files/bash-3.2-protos.patch 35fcabd745787e6220d949fb353ff33c89923f030218d9f9e6fd836bb66f40cf8819a731eb77dde59207300d596e4e431d7b0b7c37ad2ed7d2e5272f312a9f3d @@ -0,0 +1,57 @@ +move prototypes around so they show up when needed + +--- a/jobs.h ++++ b/jobs.h +@@ -182,6 +182,7 @@ + + extern int count_all_jobs __P((void)); + ++extern void close_pgrp_pipe __P((void)); + extern void terminate_current_pipeline __P((void)); + extern void terminate_stopped_jobs __P((void)); + extern void hangup_all_jobs __P((void)); +--- a/lib/glob/strmatch.c ++++ b/lib/glob/strmatch.c +@@ -25,9 +25,6 @@ + #include "strmatch.h" + + extern int xstrmatch __P((char *, char *, int)); +-#if defined (HAVE_MULTIBYTE) +-extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); +-#endif + + int + strmatch (pattern, string, flags) +--- a/lib/glob/strmatch.h ++++ b/lib/glob/strmatch.h +@@ -57,6 +57,7 @@ + + #if HANDLE_MULTIBYTE + extern int wcsmatch __P((wchar_t *, wchar_t *, int)); ++extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); + #endif + + #endif /* _STRMATCH_H */ +--- a/quit.h ++++ b/quit.h +@@ -21,6 +21,8 @@ + #if !defined (_QUIT_H_) + #define _QUIT_H_ + ++#include "sig.h" ++ + /* Non-zero means SIGINT has already ocurred. */ + extern volatile int interrupt_state; + extern volatile int terminating_signal; +--- a/support/bashversion.c ++++ b/support/bashversion.c +@@ -47,6 +47,9 @@ + extern char *dist_version; + extern int patch_level; + ++extern char *shell_version_string __P((void)); ++extern void show_shell_version __P((int)); ++ + char *shell_name = "bash"; + char *progname; + diff -uNr a/app-shells/bash/files/bash-3.2-session-leader.patch b/app-shells/bash/files/bash-3.2-session-leader.patch --- a/app-shells/bash/files/bash-3.2-session-leader.patch false +++ b/app-shells/bash/files/bash-3.2-session-leader.patch d2a19c0ebacf63f16ff5acbcb6b1201fa8c37f72621e0f9ce81dfb1a62b5210f525a28de5fd1f8e220d57b37cb588924f4182818f16111e604c3e9513efa7b8c @@ -0,0 +1,65 @@ +http://bugs.gentoo.org/231775 +http://lists.gnu.org/archive/html/bug-bash/2008-07/msg00010.html + +A parent bash shell sometimes will set the session leader tty (using tcsetpgrp) +back to itself, taking control away from a child bash shell, due to a race +condition. A result is that the child can then not then execute some commands +(like stty) from its init script (e.g. .bashrc). The result I (and others) +have seen is that the bash shell will hang while reading the init script. + +*** jobs.c.20080704 2008-07-10 15:14:13.000000000 -0400 +--- jobs.c 2008-07-10 15:17:59.000000000 -0400 +*************** +*** 266,269 **** +--- 266,270 ---- + static void set_job_running __P((int)); + static void setjstatus __P((int)); ++ static int maybe_give_terminal_to __P((pid_t, pid_t, int)); + static void mark_all_jobs_as_dead __P((void)); + static void mark_dead_jobs_as_notified __P((int)); +*************** +*** 637,641 **** + */ + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) +! give_terminal_to (newjob->pgrp, 0); + } + } +--- 638,642 ---- + */ + if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0) +! maybe_give_terminal_to (shell_pgrp, newjob->pgrp, 0); + } + } +*************** +*** 3833,3836 **** +--- 3834,3863 ---- + } + ++ /* Give terminal to NPGRP iff it's currently owned by OPGRP. FLAGS are the ++ flags to pass to give_terminal_to(). */ ++ static int ++ maybe_give_terminal_to (opgrp, npgrp, flags) ++ pid_t opgrp, npgrp; ++ int flags; ++ { ++ int tpgrp; ++ ++ tpgrp = tcgetpgrp (shell_tty); ++ if (tpgrp == npgrp) ++ { ++ terminal_pgrp = npgrp; ++ return 0; ++ } ++ else if (tpgrp != opgrp) ++ { ++ #if defined (DEBUG) ++ internal_warning ("maybe_give_terminal_to: terminal pgrp == %d shell pgrp = %d", tpgrp, opgrp); ++ #endif ++ return -1; ++ } ++ else ++ return (give_terminal_to (npgrp, flags)); ++ } ++ + /* Clear out any jobs in the job array. This is intended to be used by + children of the shell, who should not have any job structures as baggage diff -uNr a/app-shells/bash/files/bash-3.2-ulimit.patch b/app-shells/bash/files/bash-3.2-ulimit.patch --- a/app-shells/bash/files/bash-3.2-ulimit.patch false +++ b/app-shells/bash/files/bash-3.2-ulimit.patch bf1e9a69f0e8243caa4785f8ffb46364a1bbec61d4d45faee77ec0127ce485fced24dceeecc4d761c02ce167e6dcde263e2b7608d850ddc3c0405b3cc36862ba @@ -0,0 +1,13 @@ +add missing docs for -e and -r options + +--- builtins/ulimit.def ++++ builtins/ulimit.def +@@ -24,7 +24,7 @@ + $BUILTIN ulimit + $FUNCTION ulimit_builtin + $DEPENDS_ON !_MINIX +-$SHORT_DOC ulimit [-SHacdfilmnpqstuvx] [limit] ++$SHORT_DOC ulimit [-SHacdefilmnpqrstuvx] [limit] + Ulimit provides control over the resources available to processes + started by the shell, on systems that allow such control. If an + option is given, it is interpreted as follows: diff -uNr a/app-shells/bash/files/bash-4.0-configure.patch b/app-shells/bash/files/bash-4.0-configure.patch --- a/app-shells/bash/files/bash-4.0-configure.patch false +++ b/app-shells/bash/files/bash-4.0-configure.patch 4c87a85072a200ad71d2d6e81312e7fb813d87e424bd8b7c3e31bd4e55012e87f25f90f617bc3852d10a4fb217a07c3a65e8e498a980f21f5f938f86cccd3ef6 @@ -0,0 +1,25 @@ +http://bugs.gentoo.org/304901 + +newer patches touch configure ... we don't want autotool deps, so update +the files ourselves + +--- bash-4.0/configure ++++ bash-4.0/configure +@@ -5806,7 +5806,7 @@ + # static version specified as -llibname to override the + # dynamic version + case "${host_os}" in +- darwin[89]*) READLINE_LIB='${READLINE_LIBRARY}' ;; ++ darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;; + *) READLINE_LIB=-lreadline ;; + esac + fi +@@ -5847,7 +5847,7 @@ + # static version specified as -llibname to override the + # dynamic version + case "${host_os}" in +- darwin[89]*) HISTORY_LIB='${HISTORY_LIBRARY}' ;; ++ darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;; + *) HISTORY_LIB=-lhistory ;; + esac + fi diff -uNr a/app-shells/bash/files/bash-4.0-ldflags-for-build.patch b/app-shells/bash/files/bash-4.0-ldflags-for-build.patch --- a/app-shells/bash/files/bash-4.0-ldflags-for-build.patch false +++ b/app-shells/bash/files/bash-4.0-ldflags-for-build.patch ab181aabeb01fa43d1053e5c81f8e7a87ce5044a2b3240c5d1c79505372422861d39a10a44bfd7845e8bc0b25073a580bb018ad634ae9d80e7a812b8bfe7d95b @@ -0,0 +1,15 @@ +http://bugs.gentoo.org/211947 + +fix from Takashi YOSHII: dont use target ldflags for build apps + +--- bash/Makefile.in ++++ bash/Makefile.in +@@ -143,7 +143,7 @@ + CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) + + LDFLAGS = @LDFLAGS@ $(STATIC_LD) $(LOCAL_LDFLAGS) $(PROFILE_FLAGS) $(CFLAGS) +-LDFLAGS_FOR_BUILD = $(LDFLAGS) ++LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) + + INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC) + diff -uNr a/app-shells/bash/files/bash-4.0-negative-return.patch b/app-shells/bash/files/bash-4.0-negative-return.patch --- a/app-shells/bash/files/bash-4.0-negative-return.patch false +++ b/app-shells/bash/files/bash-4.0-negative-return.patch 6890dc93ebb809dca22d8fc1f878088c76ed53d6020b92a7a4173a32017fbff05b5dda4201f33d45b4ac9a41dc1f49481702e3b4692dd713cd1fd38301250fc7 @@ -0,0 +1,33 @@ +http://lists.gnu.org/archive/html/bug-bash/2009-02/msg00158.html + +make `return` accept negative values again + +hack by me (vapier@gentoo.org) ... i'm not familiar with bash source code, so +i imagine this isn't the best way to do it ... + +--- bash/builtins/return.def ++++ bash/builtins/return.def +@@ -60,9 +60,23 @@ + return_builtin (list) + WORD_LIST *list; + { ++ int neg = 0; ++ if (list && list->word && list->word->word) { ++ char *word = list->word->word; ++ if (*word == '-') { ++ while (*word++) ++ if (!isdigit(*word)) ++ break; ++ if (!*word) ++ neg = 1; ++ } ++ } ++ ++ if (!neg) { + if (no_options (list)) + return (EX_USAGE); + list = loptend; /* skip over possible `--' */ ++ } + + return_catch_value = get_exitstat (list); + diff -uNr a/app-shells/bash/files/bash-4.0-parallel-build.patch b/app-shells/bash/files/bash-4.0-parallel-build.patch --- a/app-shells/bash/files/bash-4.0-parallel-build.patch false +++ b/app-shells/bash/files/bash-4.0-parallel-build.patch 2ef7893edd08833080c8b662f10e4ac41fd4c8488663ad0bba55354745c3e9e4e2ca8341e53512ab47498fe94076f8bd5e1c337975096e1c2741c1f42d8efdfa @@ -0,0 +1,65 @@ +http://bugs.gentoo.org/267613 + +add missing dep + +patch by Peter Alfredsen + +--- bash-4.0/Makefile.in ++++ bash-4.0/Makefile.in +@@ -1022,10 +1022,11 @@ + subst.o: flags.h jobs.h siglist.h execute_cmd.h ${BASHINCDIR}/filecntl.h trap.h pathexp.h + subst.o: mailcheck.h input.h $(DEFSRC)/getopt.h $(DEFSRC)/common.h + subst.o: bashline.h bashhist.h ${GLOB_LIBSRC}/strmatch.h + subst.o: ${BASHINCDIR}/chartypes.h + subst.o: ${BASHINCDIR}/shmbutil.h ++subst.o: ${DEFDIR}/builtext.h + test.o: bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h + test.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h + test.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h + test.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h + test.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h + +http://bugs.gentoo.org/284633 + +and another ... + +--- bash-4.0/lib/sh/Makefile.in ++++ bash-4.0/lib/sh/Makefile.in +@@ -136,6 +136,9 @@ + ${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile + -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h ) + ++${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile ++ -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h ) ++ + # rules for losing makes, like SunOS + casemod.o: casemod.c + clktck.o: clktck.c + +http://bugs.gentoo.org/300143 + +and another ... + +--- bash-4.0/lib/glob/Makefile.in ++++ bash-4.0/lib/glob/Makefile.in +@@ -119,6 +119,11 @@ + mostlyclean: clean + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + ++# Dependencies ++ ++${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile ++ -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h ) ++ + ###################################################################### + # # + # Dependencies for the object files which make up this library. # +@@ -136,7 +141,7 @@ + strmatch.o: $(BUILD_DIR)/config.h + strmatch.o: $(BASHINCDIR)/stdc.h + +-glob.o: $(BUILD_DIR)/config.h ++glob.o: $(BUILD_DIR)/config.h $(topdir)/shell.h $(BUILD_DIR)/pathnames.h + glob.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h + glob.o: $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/memalloc.h + glob.o: strmatch.h glob.h diff -uNr a/app-shells/bash/files/bash-4.1-fbsd-eaccess.patch b/app-shells/bash/files/bash-4.1-fbsd-eaccess.patch --- a/app-shells/bash/files/bash-4.1-fbsd-eaccess.patch false +++ b/app-shells/bash/files/bash-4.1-fbsd-eaccess.patch 40d3e48cfdbf839febfc4a48a13abfe314265de312a9feba8cf905c27d28b51f0b3ee043e91deed36d1b0265732a1c9a71da4eb7a05d4a9a3682b943e8b8ab36 @@ -0,0 +1,29 @@ +Bash built-in test fails to correctly report exeuctable status for non- +executable files when run by root on FreeBSD. + +See http://bugs.gentoo.org/303411 + +Patch from Johan Hattne +--- lib/sh/eaccess.c.orig ++++ lib/sh/eaccess.c +@@ -198,11 +198,19 @@ + char *path; + int mode; + { ++ struct stat s; ++ int ret; ++ + if (path_is_devfd (path)) + return (sh_stataccess (path, mode)); + + #if defined (HAVE_EACCESS) /* FreeBSD */ +- return (eaccess (path, mode)); ++ if (stat (path, &s) != 0) ++ return (-1); ++ ret = eaccess (path, mode); ++ if (mode == X_OK && ret == 0 && !S_ISDIR(s.st_mode) && geteuid() == 0) ++ return ((s.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) == 0 ? -1 : 0); ++ return (ret); + #elif defined (EFF_ONLY_OK) /* SVR4(?), SVR4.2 */ + return access (path, mode|EFF_ONLY_OK); + #else diff -uNr a/app-shells/bash/files/bash-4.1-parallel-build.patch b/app-shells/bash/files/bash-4.1-parallel-build.patch --- a/app-shells/bash/files/bash-4.1-parallel-build.patch false +++ b/app-shells/bash/files/bash-4.1-parallel-build.patch 2dc94e4b19a2370a291050d68fd49934cd18502f74bc49f14cfa0d39c9e34709f7499a88f60082d69f292447d53cbe419d7cdbba0253091eb1b973ef633e61b0 @@ -0,0 +1,23 @@ +--- bash-4.1/lib/glob/Makefile.in ++++ bash-4.1/lib/glob/Makefile.in +@@ -119,6 +119,11 @@ + mostlyclean: clean + -( cd doc && $(MAKE) $(MFLAGS) $@ ) + ++# Dependencies ++ ++${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile ++ -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h ) ++ + ###################################################################### + # # + # Dependencies for the object files which make up this library. # +@@ -136,7 +141,7 @@ + strmatch.o: $(BUILD_DIR)/config.h + strmatch.o: $(BASHINCDIR)/stdc.h + +-glob.o: $(BUILD_DIR)/config.h ++glob.o: $(BUILD_DIR)/config.h $(topdir)/shell.h $(BUILD_DIR)/pathnames.h + glob.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h + glob.o: $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/memalloc.h + glob.o: strmatch.h glob.h diff -uNr a/app-shells/bash/files/bash-4.2-dev-fd-buffer-overflow.patch b/app-shells/bash/files/bash-4.2-dev-fd-buffer-overflow.patch --- a/app-shells/bash/files/bash-4.2-dev-fd-buffer-overflow.patch false +++ b/app-shells/bash/files/bash-4.2-dev-fd-buffer-overflow.patch 32895365d58b62d4a503625fc5131c6a234a373b88024cac5e6461b7fed9a60146c7328a189db9c45afbc4807b135f1ed330ddc5bf6cb506612d6e712f4b49f9 @@ -0,0 +1,46 @@ +https://bugs.gentoo.org/431850 + +this is a minor tweak to the upstream patch to also apply to bash 4.1/4.0/3.2 + + BASH PATCH REPORT + ================= + +Bash-Release: 4.2 +Patch-ID: bash42-033 + +Bug-Reported-by: David Leverton +Bug-Reference-ID: <4FCCE737.1060603@googlemail.com> +Bug-Reference-URL: + +Bug-Description: + +Bash uses a static buffer when expanding the /dev/fd prefix for the test +and conditional commands, among other uses, when it should use a dynamic +buffer to avoid buffer overflow. + +Patch (apply with `patch -p0'): + +*** ../bash-4.2-patched/lib/sh/eaccess.c 2011-01-08 20:50:10.000000000 -0500 +--- lib/sh/eaccess.c 2012-06-04 21:06:43.000000000 -0400 +*************** +*** 83,86 **** +--- 83,88 ---- + struct stat *finfo; + { ++ static char *pbuf = 0; ++ + if (*path == '\0') + { +*************** +*** 107,111 **** + On most systems, with the notable exception of linux, this is + effectively a no-op. */ +! char pbuf[32]; + strcpy (pbuf, DEV_FD_PREFIX); + strcat (pbuf, path + 8); +--- 109,113 ---- + On most systems, with the notable exception of linux, this is + effectively a no-op. */ +! pbuf = xrealloc (pbuf, sizeof (DEV_FD_PREFIX) + strlen (path + 8)); + strcpy (pbuf, DEV_FD_PREFIX); + strcat (pbuf, path + 8); diff -uNr a/app-shells/bash/files/bash-4.2-execute-job-control.patch b/app-shells/bash/files/bash-4.2-execute-job-control.patch --- a/app-shells/bash/files/bash-4.2-execute-job-control.patch false +++ b/app-shells/bash/files/bash-4.2-execute-job-control.patch ec123688fe0f272d37b8bb3a59c9675f245a4c8b300ca54c5493d80561adf1c8ce3c151df595900d13b007f46e8897d8619e13f735eaf5119777314efef23df4 @@ -0,0 +1,24 @@ +fix build when job control is disabled + +http://lists.gnu.org/archive/html/bug-bash/2011-06/msg00110.html +http://lists.gnu.org/archive/html/bug-bash/2011-07/msg00057.html +http://lists.gnu.org/archive/html/bug-bash/2011-09/msg00039.html +https://bugs.gentoo.org/383237 + +should be fixed in next release of bash ... + +--- a/execute_cmd.c ++++ b/execute_cmd.c +@@ -2202,7 +2202,11 @@ + /* If the `lastpipe' option is set with shopt, and job control is not + enabled, execute the last element of non-async pipelines in the + current shell environment. */ +- if (lastpipe_opt && job_control == 0 && asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) ++ if (lastpipe_opt && ++#if defined(JOB_CONTROL) ++ job_control == 0 && ++#endif ++ asynchronous == 0 && pipe_out == NO_PIPE && prev > 0) + { + lstdin = move_to_high_fd (0, 0, 255); + if (lstdin > 0) diff -uNr a/app-shells/bash/files/bash-4.2-no-readline.patch b/app-shells/bash/files/bash-4.2-no-readline.patch --- a/app-shells/bash/files/bash-4.2-no-readline.patch false +++ b/app-shells/bash/files/bash-4.2-no-readline.patch 5ef27f05b40f76fb40f48e2fc5d40184944171451eb065262fb252f591e7d483c20f0aba6740d053c64e3b1fc3089ff6f9a5d32a7739ccbadb5bcbef80a9c93b @@ -0,0 +1,19 @@ +fix building when readline is disabled + +--- a/builtins/complete.def ++++ b/builtins/complete.def +@@ -49,6 +49,8 @@ $END + + #include + ++#ifdef READLINE ++ + #include + + #include "../bashtypes.h" +@@ -867,3 +869,5 @@ compopt_builtin (list) + + return (ret); + } ++ ++#endif diff -uNr a/app-shells/bash/files/bash-4.2-parallel-build.patch b/app-shells/bash/files/bash-4.2-parallel-build.patch --- a/app-shells/bash/files/bash-4.2-parallel-build.patch false +++ b/app-shells/bash/files/bash-4.2-parallel-build.patch ebf301b7e32c7240e4cf41ef7d127ce2900a6b6e5fbbb19a721f9dc6ae27129562fbd178bd9ddd7409318dce959051d4336aec94fb38bbb4b1ad52ef799d816e @@ -0,0 +1,106 @@ +https://lists.gnu.org/archive/html/bug-bash/2011-10/msg00036.html + +the current yacc rules allow multiple runs to generate the same files. usually +this doesn't come up as the generated files are shipped in the tarball, but +when you modify parse.y (applying a patch or developing or whatever), you can +hit this problem. + +simple way of showing this: + make -j y.tab.{c,h} +a correct system would not show the yacc parser running twice :) + +simple patch is to have the .h file depend on the .c file, and have the .h file +itself issue a dummy rule (to avoid make thinking things changed). + +--- a/Makefile.in ++++ b/Makefile.in +@@ -579,16 +579,17 @@ + + # old rules + GRAM_H = parser-built +-y.tab.o: y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h ++y.tab.o: y.tab.h y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h + ${GRAM_H}: y.tab.h + @-if test -f y.tab.h ; then \ + cmp -s $@ y.tab.h 2>/dev/null || cp -p y.tab.h $@; \ + fi +-y.tab.c y.tab.h: parse.y ++y.tab.c: parse.y + # -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi + $(YACC) -d $(srcdir)/parse.y + touch parser-built + # -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; else cp -p y.tab.h ${GRAM_H}; fi ++y.tab.h: y.tab.c ; @true + + # experimental new rules - work with GNU make but not BSD (or OSF) make + #y.tab.o: y.tab.c y.tab.h + +https://lists.gnu.org/archive/html/bug-bash/2011-10/msg00037.html + +the current code generates a bunch of local libraries in subdirs and then +links bash against that. those subdirs sometimes need version.h. so they +have a rule to change back up to the parent dir and build version.h (which is +fine). the trouble is that the top level objects and the subdirs are allowed +to build in parallel, so it's possible for multiple children to see that +version.h is not available and that it needs to be created, so they all do. + +there is even more trouble is that version.h depends on all the top level +sources, some of which are compiled (like syntax.c). so these parallel +children all kick off a job to generate syntax.c which in turn requires the +mksyntax helper executable. obviously multiple processes rm-ing, compiling, +and linking the same files quickly falls apart. + +so tweak the subdirs to all depend on the .build target which in turn depends +on all of these top level files being generated. now the subdirs won't try and +recursively enter the top level. + +(noticed by David James) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -597,6 +598,11 @@ + # $(YACC) -d $(srcdir)/parse.y + # -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; fi + ++# Subdirs will often times want version.h, so they'll change back up to ++# the top level and try to create it. This causes parallel build issues ++# so just force top level sanity before we descend. ++$(LIBDEP): .build ++ + $(READLINE_LIBRARY): config.h $(READLINE_SOURCE) + @echo making $@ in ${RL_LIBDIR} + @( { test "${RL_LIBDIR}" = "${libdir}" && exit 0; } || \ + +http://lists.gnu.org/archive/html/bug-bash/2011-10/msg00107.html + +the top level Makefile will recurse into the defdir for multiple targets +(libbuiltins.a, common.o, bashgetopt.o, builtext.h), and since these do +not have any declared interdependencies, parallel makes will recurse into +the subdir and build the respective targets. + +nothing depends on common.o or bashgetopt.o, so those targets don't get +used normally. this leaves libbuiltins.a and builtext.h. at a glance, +this shouldn't be a big deal, but when we look closer, there's a subtle +failure lurking. + +most of the objects in the defdir need to be generated which means they +need to build+link the local mkbuiltins helper. the builtext.h header +also needs to be generated by the mkbuiltins helper. so when the top +level launches a child for libbuiltins.a and a child for builtext.h, we +can hit a race condition where the two try to generate mkbuiltins, and +the build randomly fails. + +so update libbuiltins.a to depend on builtext.h. this should be fairly +simple since it's only a single target. + +--- a/Makefile.in ++++ b/Makefile.in +@@ -674,7 +674,7 @@ + $(RM) $@ + ./mksyntax$(EXEEXT) -o $@ + +-$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h ++$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h ${DEFDIR}/builtext.h version.h + @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1 + + # these require special rules to circumvent make builtin rules diff -uNr a/app-shells/bash/files/bash-4.2-read-retry.patch b/app-shells/bash/files/bash-4.2-read-retry.patch --- a/app-shells/bash/files/bash-4.2-read-retry.patch false +++ b/app-shells/bash/files/bash-4.2-read-retry.patch 6b6751ede67d18b201c46dcd43a8e06b4e8e50045e7e420ea1addf1b0459812986c1218f22e79122040cb7cd4523493a90702c40bb34ecc4abbab6df149e2adc @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/447810 + +fix from upstream to workaround broken BSD kernels + +commit 208fdb509e072977ae7a621e916dfcd32c76047d +Author: Chet Ramey +Date: Mon Mar 4 08:09:29 2013 -0500 + + commit bash-20130201 snapshot + +diff --git a/redir.c b/redir.c +index d7da2f3..aa3d16d 100644 +--- a/redir.c ++++ b/redir.c +@@ -650,7 +650,7 @@ redir_open (filename, flags, mode, ri) + int flags, mode; + enum r_instruction ri; + { +- int fd, r; ++ int fd, r, e; + + r = find_string_in_alist (filename, _redir_special_filenames, 1); + if (r >= 0) +@@ -666,7 +666,16 @@ redir_open (filename, flags, mode, ri) + } + else + { +- fd = open (filename, flags, mode); ++ do ++ { ++ fd = open (filename, flags, mode); ++ e = errno; ++ if (fd < 0 && e == EINTR) ++ QUIT; ++ errno = e; ++ } ++ while (fd < 0 && errno == EINTR); ++ + #if defined (AFS) + if ((fd < 0) && (errno == EACCES)) + { diff -uNr a/app-shells/bash/files/bash-4.2-speed-up-read-N.patch b/app-shells/bash/files/bash-4.2-speed-up-read-N.patch --- a/app-shells/bash/files/bash-4.2-speed-up-read-N.patch false +++ b/app-shells/bash/files/bash-4.2-speed-up-read-N.patch 74613bb5aed7baa1266f7c8a4cc35e04397ac28d704867a00c1c560c5be02cc94d444a5b514e5bc83410910d2a8f333796e3b7d6e75ae92c201e3a34b4a61595 @@ -0,0 +1,112 @@ +http://lists.gnu.org/archive/html/bug-bash/2012-11/msg00034.html + +From 530d4988afd68ea9d2cf1b0267d4dc821d0d204f Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 19 Nov 2012 17:58:51 -0500 +Subject: [PATCH] bash: speed up `read -N` + +Rather than using 1 byte reads, use the existing cache read logic. +This could be sped up more, but this change is not as invasive and +should (hopefully) be fairly safe. + +Signed-off-by: Mike Frysinger +--- + builtins/read.def | 21 ++++++++++++++++----- + externs.h | 1 + + lib/sh/zread.c | 15 +++++++++++++-- + 3 files changed, 30 insertions(+), 7 deletions(-) + +diff --git a/builtins/read.def b/builtins/read.def +index e32dec7..81a1b3f 100644 +--- a/builtins/read.def ++++ b/builtins/read.def +@@ -457,7 +457,10 @@ read_builtin (list) + interrupt_immediately++; + terminate_immediately++; + +- unbuffered_read = (nchars > 0) || (delim != '\n') || input_is_pipe; ++ if ((nchars > 0) && !input_is_tty && ignore_delim) ++ unbuffered_read = 2; ++ else if ((nchars > 0) || (delim != '\n') || input_is_pipe) ++ unbuffered_read = 1; + + if (prompt && edit == 0) + { +@@ -505,10 +508,18 @@ read_builtin (list) + print_ps2 = 0; + } + +- if (unbuffered_read) +- retval = zread (fd, &c, 1); +- else +- retval = zreadc (fd, &c); ++ switch (unbuffered_read) ++ { ++ case 2: ++ retval = zreadcn (fd, &c, nchars - nr); ++ break; ++ case 1: ++ retval = zread (fd, &c, 1); ++ break; ++ default: ++ retval = zreadc (fd, &c); ++ break; ++ } + + if (retval <= 0) + { +diff --git a/externs.h b/externs.h +index 09244fa..a5ad645 100644 +--- a/externs.h ++++ b/externs.h +@@ -479,6 +479,7 @@ extern ssize_t zread __P((int, char *, size_t)); + extern ssize_t zreadretry __P((int, char *, size_t)); + extern ssize_t zreadintr __P((int, char *, size_t)); + extern ssize_t zreadc __P((int, char *)); ++extern ssize_t zreadcn __P((int, char *, int)); + extern ssize_t zreadcintr __P((int, char *)); + extern void zreset __P((void)); + extern void zsyncfd __P((int)); +diff --git a/lib/sh/zread.c b/lib/sh/zread.c +index 5db21a9..af7d02b 100644 +--- a/lib/sh/zread.c ++++ b/lib/sh/zread.c +@@ -101,15 +101,18 @@ static char lbuf[128]; + static size_t lind, lused; + + ssize_t +-zreadc (fd, cp) ++zreadcn (fd, cp, len) + int fd; + char *cp; ++ int len; + { + ssize_t nr; + + if (lind == lused || lused == 0) + { +- nr = zread (fd, lbuf, sizeof (lbuf)); ++ if (len > sizeof (lbuf)) ++ len = sizeof (lbuf); ++ nr = zread (fd, lbuf, len); + lind = 0; + if (nr <= 0) + { +@@ -123,6 +126,14 @@ zreadc (fd, cp) + return 1; + } + ++ssize_t ++zreadc (fd, cp) ++ int fd; ++ char *cp; ++{ ++ return zreadcn (fd, cp, sizeof (lbuf)); ++} ++ + /* Don't mix calls to zreadc and zreadcintr in the same function, since they + use the same local buffer. */ + ssize_t +-- +1.7.12.4 + diff -uNr a/app-shells/bash/files/bash-4.3-append-process-segfault.patch b/app-shells/bash/files/bash-4.3-append-process-segfault.patch --- a/app-shells/bash/files/bash-4.3-append-process-segfault.patch false +++ b/app-shells/bash/files/bash-4.3-append-process-segfault.patch 8cbeb8770c79503fe79b28ea867b497528c833eab547632591f8d43c004f1fae8221078b133254bc77890283162a081548a6cdc7a50bd917c36d058ddab47b5f @@ -0,0 +1,18 @@ +https://lists.gnu.org/archive/html/bug-bash/2014-08/msg00048.html + +*** ../bash-4.3-patched/execute_cmd.c 2014-07-30 10:26:52.000000000 -0400 +--- execute_cmd.c 2014-08-11 16:55:57.000000000 -0400 +*************** +*** 2406,2410 **** + { + #if defined (JOB_CONTROL) +! append_process (savestring (the_printed_command), dollar_dollar_pid, exec_result, lastpipe_jid); + #endif + lstdin = wait_for (lastpid); +--- 2433,2438 ---- + { + #if defined (JOB_CONTROL) +! if (INVALID_JOB (lastpipe_jid) == 0) +! append_process (savestring (the_printed_command_except_trap), dollar_dollar_pid, exec_result, lastpipe_jid); + #endif + lstdin = wait_for (lastpid); diff -uNr a/app-shells/bash/files/bash-4.3-arrayfunc.patch b/app-shells/bash/files/bash-4.3-arrayfunc.patch --- a/app-shells/bash/files/bash-4.3-arrayfunc.patch false +++ b/app-shells/bash/files/bash-4.3-arrayfunc.patch 94b2383778d282c898a98a4fe4cbac690a88152a2484e3da47aa33d81e5fb4a03d8465fc2f1c0c9a5cf364e68e710d4d02ac18b9e26f5d0492d828672c66fa02 @@ -0,0 +1,15 @@ +http://lists.gnu.org/archive/html/bug-bash/2014-11/msg00178.html + +diff --git a/arrayfunc.c b/arrayfunc.c +index 804e6da..0f900aa 100644 +--- a/arrayfunc.c ++++ b/arrayfunc.c +@@ -498,7 +498,7 @@ assign_compound_array_list (var, nlist, flags) + + for (list = nlist; list; list = list->next) + { +- iflags = flags; ++ iflags = (flags & ~ASS_APPEND); + w = list->word->word; + + /* We have a word of the form [ind]=value */ diff -uNr a/app-shells/bash/files/bash-4.3-compat-lvl.patch b/app-shells/bash/files/bash-4.3-compat-lvl.patch --- a/app-shells/bash/files/bash-4.3-compat-lvl.patch false +++ b/app-shells/bash/files/bash-4.3-compat-lvl.patch 46d97d0428566479a5a6beaba5653dfe1d52152ad503e290aeda754d083c1cf40a850379be38315d585a8b00d611ca67aac628f1e1603c7cde506f4f59afa1b1 @@ -0,0 +1,13 @@ +https://lists.gnu.org/archive/html/bug-bash/2014-06/msg00046.html + +--- a/builtins/shopt.def ++++ b/builtins/shopt.def +@@ -160,7 +160,7 @@ static struct { + { "compat32", &shopt_compat32, set_compatibility_level }, + { "compat40", &shopt_compat40, set_compatibility_level }, + { "compat41", &shopt_compat41, set_compatibility_level }, +- { "compat42", &shopt_compat41, set_compatibility_level }, ++ { "compat42", &shopt_compat42, set_compatibility_level }, + #if defined (READLINE) + { "complete_fullquote", &complete_fullquote, (shopt_set_func_t *)NULL}, + { "direxpand", &dircomplete_expand, shopt_set_complete_direxpand }, diff -uNr a/app-shells/bash/files/bash-4.3-mapfile-improper-array-name-validation.patch b/app-shells/bash/files/bash-4.3-mapfile-improper-array-name-validation.patch --- a/app-shells/bash/files/bash-4.3-mapfile-improper-array-name-validation.patch false +++ b/app-shells/bash/files/bash-4.3-mapfile-improper-array-name-validation.patch e9696de37969c9aeed7be66ba75e11ecb0bef3e6f0f8e7cf8ed29b4ba4a7c8f05e48029d6bc70610f9f1e1eed40a041893012f38f2e6a10e95581cde58121433 @@ -0,0 +1,13 @@ +http://lists.gnu.org/archive/html/bug-bash/2014-11/msg00097.html + +--- bash-4.3/builtins/mapfile.def ++++ bash-4.3/builtins/mapfile.def +@@ -339,7 +339,7 @@ + else + array_name = list->word->word; + +- if (legal_identifier (array_name) == 0 && valid_array_reference (array_name) == 0) ++ if (legal_identifier (array_name) == 0) + { + sh_invalidid (array_name); + return (EXECUTION_FAILURE); diff -uNr a/app-shells/bash/files/bash-4.3-protos.patch b/app-shells/bash/files/bash-4.3-protos.patch --- a/app-shells/bash/files/bash-4.3-protos.patch false +++ b/app-shells/bash/files/bash-4.3-protos.patch 381523eb86a9f134daeb6b2380c395b0154222b0e9d1ba387cd930bf4d95e56ecba64be9787f1fafda782e9f392848118140e381ef331c19f9b19fde9e7264ad @@ -0,0 +1,10 @@ +--- a/redir.c ++++ b/redir.c +@@ -31,6 +31,7 @@ + #endif + #include "filecntl.h" + #include "posixstat.h" ++#include "trap.h" + + #if defined (HAVE_UNISTD_H) + # include diff -uNr a/app-shells/bash/files/bash-4.4-jobs_overflow.patch b/app-shells/bash/files/bash-4.4-jobs_overflow.patch --- a/app-shells/bash/files/bash-4.4-jobs_overflow.patch false +++ b/app-shells/bash/files/bash-4.4-jobs_overflow.patch 668053a7425393d0d88588329e12640ba829a83c05b30e00aaba433204b2509efed3e6fd32888e77e7bc1556038b6a89a3651e14e0119757a45c03f9c8eeab0a @@ -0,0 +1,14 @@ +https://lists.gnu.org/archive/html/bug-bash/2017-12/msg00025.html +https://bugs.gentoo.org/644720 + +--- bash-4.4/jobs.c ++++ bash-4.4/jobs.c +@@ -750,7 +750,7 @@ + else + nsize = bgpids.nalloc; + +- while (nsize < js.c_childmax) ++ while (nsize < (ps_index_t)js.c_childmax) + nsize *= 2; + + if (bgpids.nalloc < js.c_childmax) diff -uNr a/app-shells/bash/files/bash-4.4-popd-offset-overflow.patch b/app-shells/bash/files/bash-4.4-popd-offset-overflow.patch --- a/app-shells/bash/files/bash-4.4-popd-offset-overflow.patch false +++ b/app-shells/bash/files/bash-4.4-popd-offset-overflow.patch 9e31a3b551a50d29f30b095a126475e727f7990183ec25ffea85463af630cad93a1f3e15ba6da2592f86b78f596a030b9458b67f938ac2a1f63e5f537cc0dc31 @@ -0,0 +1,30 @@ +https://bugs.gentoo.org/600174 +https://lists.gnu.org/archive/html/bug-bash/2016-11/msg00099.html + +*** ../bash-4.4-patched/builtins/pushd.def 2016-01-25 13:31:49.000000000 -0500 +--- builtins/pushd.def 2016-10-28 10:46:49.000000000 -0400 +*************** +*** 366,370 **** + } + +! if (which > directory_list_offset || (directory_list_offset == 0 && which == 0)) + { + pushd_error (directory_list_offset, which_word ? which_word : ""); +--- 366,370 ---- + } + +! if (which > directory_list_offset || (which < -directory_list_offset) || (directory_list_offset == 0 && which == 0)) + { + pushd_error (directory_list_offset, which_word ? which_word : ""); +*************** +*** 388,391 **** +--- 388,396 ---- + of the list into place. */ + i = (direction == '+') ? directory_list_offset - which : which; ++ if (i < 0 || i > directory_list_offset) ++ { ++ pushd_error (directory_list_offset, which_word ? which_word : ""); ++ return (EXECUTION_FAILURE); ++ } + free (pushd_directory_list[i]); + directory_list_offset--; diff -uNr a/app-shells/bash/files/bash-4.x-deferred-heredocs.patch b/app-shells/bash/files/bash-4.x-deferred-heredocs.patch --- a/app-shells/bash/files/bash-4.x-deferred-heredocs.patch false +++ b/app-shells/bash/files/bash-4.x-deferred-heredocs.patch 5bf8a572bb1c6df21c87ae7e7a343340e28f8fe76c4fed5a98bb53a06d741a2cb8b1320b011f35d9bbcbbed9a33d231c03e680fdc2629af7359556941a9bf8c6 @@ -0,0 +1,47 @@ +http://bugs.gentoo.org/310197 +http://lists.gnu.org/archive/html/bug-bash/2010-03/msg00063.html + +fix heredocs handling in `set` output + +*** ../bash-4.1-patched/print_cmd.c 2009-09-16 15:32:26.000000000 -0400 +--- print_cmd.c 2010-03-22 21:15:30.000000000 -0400 +*************** +*** 114,117 **** +--- 114,123 ---- + #define CHECK_XTRACE_FP xtrace_fp = (xtrace_fp ? xtrace_fp : stderr) + ++ #define PRINT_DEFERRED_HEREDOCS(x) \ ++ do { \ ++ if (deferred_heredocs) \ ++ print_deferred_heredocs (x); \ ++ } while (0) ++ + /* Non-zero means the stuff being printed is inside of a function def. */ + static int inside_function_def; +*************** +*** 561,571 **** + { + print_for_command_head (for_command); +- + cprintf (";"); + newline ("do\n"); + indentation += indentation_amount; + make_command_string_internal (for_command->action); + semicolon (); + indentation -= indentation_amount; + newline ("done"); + } +--- 566,578 ---- + { + print_for_command_head (for_command); + cprintf (";"); + newline ("do\n"); ++ + indentation += indentation_amount; + make_command_string_internal (for_command->action); ++ PRINT_DEFERRED_HEREDOCS (""); + semicolon (); + indentation -= indentation_amount; ++ + newline ("done"); + } diff -uNr a/app-shells/bash/files/bash_logout b/app-shells/bash/files/bash_logout --- a/app-shells/bash/files/bash_logout false +++ b/app-shells/bash/files/bash_logout 153a696e73c379050566ab037a67125aaea870c45fd3ab1dbd173d77376d8bc349d5ed6ac37886e4d7ddd2dfe66ae675112d2f57f5d0b9bf957d77ac1067582a @@ -0,0 +1,9 @@ +# /etc/bash/bash_logout + +# This file is sourced when a login shell terminates. + +# You may wish to clear everyone's screen when they logout. +#clear + +# Or maybe you want to leave a thoughtful note. +#fortune diff -uNr a/app-shells/bash/files/bashrc b/app-shells/bash/files/bashrc --- a/app-shells/bash/files/bashrc false +++ b/app-shells/bash/files/bashrc c65945c9d91930f77920fbb1c9de64462715bd7a76d93d618c79be9a2d28b85ca7f36661115fdeef5e9fa6eab750a887ed9357bc94c6c9b58df190d65d225dc8 @@ -0,0 +1,109 @@ +# /etc/bash/bashrc +# +# This file is sourced by all *interactive* bash shells on startup, +# including some apparently interactive shells such as scp and rcp +# that can't tolerate any output. So make sure this doesn't display +# anything or bad things will happen ! + + +# Test for an interactive shell. There is no need to set anything +# past this point for scp and rcp, and it's important to refrain from +# outputting anything in those cases. +if [[ $- != *i* ]] ; then + # Shell is non-interactive. Be done now! + return +fi + +# Bash won't get SIGWINCH if another process is in the foreground. +# Enable checkwinsize so that bash will check the terminal size when +# it regains control. #65623 +# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) +shopt -s checkwinsize + +# Disable completion when the input buffer is empty. i.e. Hitting tab +# and waiting a long time for bash to expand all of $PATH. +shopt -s no_empty_cmd_completion + +# Enable history appending instead of overwriting when exiting. #139609 +shopt -s histappend + +# Save each command to the history file as it's executed. #517342 +# This does mean sessions get interleaved when reading later on, but this +# way the history is always up to date. History is not synced across live +# sessions though; that is what `history -n` does. +# Disabled by default due to concerns related to system recovery when $HOME +# is under duress, or lives somewhere flaky (like NFS). Constantly syncing +# the history will halt the shell prompt until it's finished. +#PROMPT_COMMAND='history -a' + +# Change the window title of X terminals +case ${TERM} in + [aEkx]term*|rxvt*|gnome*|konsole*|interix) + PS1='\[\033]0;\u@\h:\w\007\]' + ;; + screen*) + PS1='\[\033k\u@\h:\w\033\\\]' + ;; + *) + unset PS1 + ;; +esac + +# Set colorful PS1 only on colorful terminals. +# dircolors --print-database uses its own built-in database +# instead of using /etc/DIR_COLORS. Try to use the external file +# first to take advantage of user additions. +# We run dircolors directly due to its changes in file syntax and +# terminal name patching. +use_color=false +if type -P dircolors >/dev/null ; then + # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 + LS_COLORS= + if [[ -f ~/.dir_colors ]] ; then + eval "$(dircolors -b ~/.dir_colors)" + elif [[ -f /etc/DIR_COLORS ]] ; then + eval "$(dircolors -b /etc/DIR_COLORS)" + else + eval "$(dircolors -b)" + fi + # Note: We always evaluate the LS_COLORS setting even when it's the + # default. If it isn't set, then `ls` will only colorize by default + # based on file attributes and ignore extensions (even the compiled + # in defaults of dircolors). #583814 + if [[ -n ${LS_COLORS:+set} ]] ; then + use_color=true + else + # Delete it if it's empty as it's useless in that case. + unset LS_COLORS + fi +else + # Some systems (e.g. BSD & embedded) don't typically come with + # dircolors so we need to hardcode some terminals in here. + case ${TERM} in + [aEkx]term*|rxvt*|gnome*|konsole*|screen|cons25|*color) use_color=true;; + esac +fi + +if ${use_color} ; then + if [[ ${EUID} == 0 ]] ; then + PS1+='\[\033[01;31m\]\h\[\033[01;34m\] \w \$\[\033[00m\] ' + else + PS1+='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' + fi + + #BSD#@export CLICOLOR=1 + #GNU#@alias ls='ls --color=auto' + alias grep='grep --colour=auto' + alias egrep='egrep --colour=auto' + alias fgrep='fgrep --colour=auto' +else + # show root@ when we don't have colors + PS1+='\u@\h \w \$ ' +fi + +for sh in /etc/bash/bashrc.d/* ; do + [[ -r ${sh} ]] && source "${sh}" +done + +# Try to keep environment pollution down, EPA loves us. +unset use_color sh diff -uNr a/app-shells/bash/files/dot-bash_logout b/app-shells/bash/files/dot-bash_logout --- a/app-shells/bash/files/dot-bash_logout false +++ b/app-shells/bash/files/dot-bash_logout 1379104d600cdcda4546d48fec597ec9275d24745d48202b8a116340f2eab866b0b31e5ed03fbc3bc3ba58ae9955b80b73adc7ff45704300dc13f0b53ba1d76f @@ -0,0 +1,6 @@ +# /etc/skel/.bash_logout + +# This file is sourced when a login shell terminates. + +# Clear the screen for security's sake. +clear diff -uNr a/app-shells/bash/files/dot-bash_profile b/app-shells/bash/files/dot-bash_profile --- a/app-shells/bash/files/dot-bash_profile false +++ b/app-shells/bash/files/dot-bash_profile 513656c1ebd322b87860d6a24a441b557561e47f5fee9f41d5849cee799fa77f2bf68a880a57ea9b03d3a34743ae5a10bafea234fd0235ec6ce7a19e83fb43fd @@ -0,0 +1,7 @@ +# /etc/skel/.bash_profile + +# This file is sourced by bash for login shells. The following line +# runs your .bashrc and is recommended by the bash info pages. +if [[ -f ~/.bashrc ]] ; then + . ~/.bashrc +fi diff -uNr a/app-shells/bash/files/dot-bashrc b/app-shells/bash/files/dot-bashrc --- a/app-shells/bash/files/dot-bashrc false +++ b/app-shells/bash/files/dot-bashrc bde5d5348ba7cc9f320ede1a9c8c932688b85f7e497ae52843ba8cd971d583a4cd6bdc70850b789506ddc3d467b71dd63a6a46efa2413f00f1c28c0dc99a8964 @@ -0,0 +1,18 @@ +# /etc/skel/.bashrc +# +# This file is sourced by all *interactive* bash shells on startup, +# including some apparently interactive shells such as scp and rcp +# that can't tolerate any output. So make sure this doesn't display +# anything or bad things will happen ! + + +# Test for an interactive shell. There is no need to set anything +# past this point for scp and rcp, and it's important to refrain from +# outputting anything in those cases. +if [[ $- != *i* ]] ; then + # Shell is non-interactive. Be done now! + return +fi + + +# Put your fun stuff here. diff -uNr a/app-shells/bash/metadata.xml b/app-shells/bash/metadata.xml --- a/app-shells/bash/metadata.xml false +++ b/app-shells/bash/metadata.xml 8316dbd8d05c648f30ffff9bf811a91e7c4e30f7f16cc5261702e8fad0090d3b918e1077786843afc9c66d0c824f0f9a4e1e7aab481dd37ad28cad9c9f8da2a9 @@ -0,0 +1,19 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + + Log ALL commands typed into bash; should ONLY be + used in restricted environments such as honeypots + Build with custom malloc/free overwriting allocated/freed memory + Enable /dev/tcp/host/port redirection + Add support for loading builtins at runtime via + 'enable' + + + cpe:/a:gnu:bash + + diff -uNr a/app-text/build-docbook-catalog/Manifest b/app-text/build-docbook-catalog/Manifest --- a/app-text/build-docbook-catalog/Manifest false +++ b/app-text/build-docbook-catalog/Manifest 771bc69c48dfdc564dd514e50102173dee474bfd9f8c2420b90d1bc97d426578fe64d096003db2c785d406cd87f8b22a58be5d225a2663f3665565a55942b5bc @@ -0,0 +1,3 @@ +DIST build-docbook-catalog-1.21.tar.xz 4620 BLAKE2B ed4aa645a5bb8e168c291c05891a2359114c9148a81588d93542528a0c74828a1824dc98a14468e8ba65525edf5aae8c936f29190d54063064cd54e2af8dbc3c SHA512 0becc1bae100101b072c62bee844157151336aebc39a046030c8b7b501e13f1b3552097b244ac51339abd2e724304f4fe728861b7d5f070c26973998936861bc +EBUILD build-docbook-catalog-1.21.ebuild 1090 BLAKE2B 353dde30a03468cae9cda862842a51a2a6033f49af44ae071676a218cf95ed3f9fdd805c782ee39225c858ea989d91b2de939ae95a6bf2986ee27a6635e2a22e SHA512 a0e597a8b6cb90257d2820ffa21c42df559fb40270d82be3c1f7b0653692c5cebb9a54bdebd47ddc8e7aa8c2b743812a53f9f8a3d837166e0561af76c13783ed +MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 diff -uNr a/app-text/build-docbook-catalog/build-docbook-catalog-1.21.ebuild b/app-text/build-docbook-catalog/build-docbook-catalog-1.21.ebuild --- a/app-text/build-docbook-catalog/build-docbook-catalog-1.21.ebuild false +++ b/app-text/build-docbook-catalog/build-docbook-catalog-1.21.ebuild f4bcf76db961dea97320e6dabe973247343aa94d8c54816543de7d279a0d93ee1cd1939f4e04fa6deda4825e29a0df8a282e4763f2ec4bd7bf1a2fdb7094b823 @@ -0,0 +1,34 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +DESCRIPTION="DocBook XML catalog auto-updater" +HOMEPAGE="https://sources.gentoo.org/gentoo-src/build-docbook-catalog/" +SRC_URI="mirror://gentoo/${P}.tar.xz + https://dev.gentoo.org/~haubi/distfiles/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +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" +IUSE="" + +RDEPEND="|| ( sys-apps/util-linux app-misc/getopt ) + ! regen files + build-docbook-catalog +} diff -uNr a/app-text/build-docbook-catalog/metadata.xml b/app-text/build-docbook-catalog/metadata.xml --- a/app-text/build-docbook-catalog/metadata.xml false +++ b/app-text/build-docbook-catalog/metadata.xml 4f2d8e38345ca132e77f691fc6f683b5b29db669d75c372598d70ffcb4bb0074dd266f6b53765cf6b8f471c77be5b88e2881446e7f53c6113723ba7eb1b4e25a @@ -0,0 +1,5 @@ + + + + + diff -uNr a/app-text/docbook-xml-dtd/Manifest b/app-text/docbook-xml-dtd/Manifest --- a/app-text/docbook-xml-dtd/Manifest false +++ b/app-text/docbook-xml-dtd/Manifest bdc972ed6570001da99ce1480aba9970edccdc0f000d65cda1f007a5f22e16d0f57460754dcd8b069c0054f8623e6e5137c7b5a82a501db7c9a19982dbb1d1b0 @@ -0,0 +1,3 @@ +DIST docbkx412.zip 75683 BLAKE2B 1304162d4f432e2f08990d0d3f58d873f7a8782fe5b4e3d6838ffed4ac85fd614a4dd64dca5d2b69f118dea91117d0da288f6db7c89180f730032ba140280d2e SHA512 f700591a671694ca0ac51f5b5b7e825df5c0b3604b20baa6afd3aaafa7ce99470ca1c261781b105b42bfa5485c23217cf3db821b3fcf2ebdae9df07bb8ae4063 +EBUILD docbook-xml-dtd-4.1.2-r6.ebuild 1360 BLAKE2B 1a788f3d9a0bbb2828dcdd8661d29845ca885bcc82b4de3715de6ef515e5861747e9aaf2a6942afc7182b1c8fba6c46ed36097ce583823babcac1a886a5ae1cf SHA512 292e22ee2c56ca3a19437774cee409ae6b1e4153a7d17902e9c12242768984dce1514ac3caa657298d49591a4bc88fd988463c01fed43ebf6ba7d7f19cac65c4 +MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 diff -uNr a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r6.ebuild b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r6.ebuild --- a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r6.ebuild false +++ b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.1.2-r6.ebuild c71271b3ac097bfe2a61196c98eeb862e3f7aed86e61a40e8dd89a35e85925756d8881cfc068901767115351fe3c9dc53de2557667d41f8b83b1db1ff5e1e899 @@ -0,0 +1,55 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=0 + +inherit sgml-catalog + +MY_P="docbkx412" +DESCRIPTION="Docbook DTD for XML" +HOMEPAGE="http://www.docbook.org/" +SRC_URI="http://www.docbook.org/xml/${PV}/${MY_P}.zip" + +LICENSE="docbook" +SLOT="${PV}" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND=">=app-text/docbook-xsl-stylesheets-1.65 + >=app-text/build-docbook-catalog-1.2" +DEPEND=">=app-arch/unzip-5.41" + +sgml-catalog_cat_include "/etc/sgml/xml-docbook-${PV}.cat" \ + "/etc/sgml/sgml-docbook.cat" +sgml-catalog_cat_include "/etc/sgml/xml-docbook-${PV}.cat" \ + "/usr/share/sgml/docbook/xml-dtd-${PV}/docbook.cat" + +S=${WORKDIR} + +src_unpack() { + unpack ${A} + + # Prepend OVERRIDE directive + sed -i -e '1i\\OVERRIDE YES' docbook.cat +} + +src_install() { + keepdir /etc/xml + + insinto /usr/share/sgml/docbook/xml-dtd-${PV} + doins *.cat *.dtd *.mod || die + insinto /usr/share/sgml/docbook/xml-dtd-${PV}/ent + doins ent/*.ent || die + + dodoc ChangeLog *.txt +} + +pkg_postinst() { + build-docbook-catalog + sgml-catalog_pkg_postinst +} + +pkg_postrm() { + build-docbook-catalog + sgml-catalog_pkg_postrm +} diff -uNr a/app-text/docbook-xml-dtd/metadata.xml b/app-text/docbook-xml-dtd/metadata.xml --- a/app-text/docbook-xml-dtd/metadata.xml false +++ b/app-text/docbook-xml-dtd/metadata.xml 4f2d8e38345ca132e77f691fc6f683b5b29db669d75c372598d70ffcb4bb0074dd266f6b53765cf6b8f471c77be5b88e2881446e7f53c6113723ba7eb1b4e25a @@ -0,0 +1,5 @@ + + + + + diff -uNr a/app-text/docbook-xsl-stylesheets/Manifest b/app-text/docbook-xsl-stylesheets/Manifest --- a/app-text/docbook-xsl-stylesheets/Manifest false +++ b/app-text/docbook-xsl-stylesheets/Manifest f79b0598f4cd16e402519049ed59be8fdf70d0794eeadbd929189088836542b4749a9c2d1b807fdd677f32ee41e3613132f088f7d964dc3ee1865a0ece5080b0 @@ -0,0 +1,4 @@ +AUX nonrecursive-string-subst.patch 1205 BLAKE2B 0c7bb8e3ba646a137bc0b50722448c65437881672a4bbb3f3dc7a181e5074f667fca0fbcb4475b83f04ac63bdddbf3dae800b7a7094b5d9aea270faeb81d9e50 SHA512 6a26838078a3ce28273dddfa1af6a378cffc28b6d1ba48a4cfc839addd7bf58ce217d6584b735f9c75381954744ab2386c75fa3c593858b6e27882be55c00d04 +DIST docbook-xsl-1.79.1.tar.bz2 21967928 BLAKE2B 42b7e989616d16fa100c2dad713830ecedf6c7e26f56f99a9bf9330385c753f282cea1033e689196352bd41f9dca59a06ff09fc4638051cb478a630df9bfeb0b SHA512 83325cbaf1545da6b9b8b77f5f0e6fdece26e3c455164b300a1aa3d19e3bd29ae71fd563553a714a5394968d1a65684c6c7987c77524469358d18b8c227025c7 +EBUILD docbook-xsl-stylesheets-1.79.1-r2.ebuild 2171 BLAKE2B c7720c9f35b56c9302e364dbcd9b9e1d571aecdcf363e2260035bd202bf561b800e2ef7c5f6347c2c6de448ec8cb703b468e3c3b8e2207761156e4e0e2079617 SHA512 0e7a04f68a10a037c2784336c64edae12c6102d44bff00b2eaca64ac76ca4c7ce6a23c0fdcab31a7b65d5c3b3be2a6ded06301685aeac9f161ee7a695b1eff1c +MISC metadata.xml 413 BLAKE2B c4ba1418a2d7499d953111afac5907a4dd53c183f8a2613218aa0f0f510f1b75d04c6839c5407f20703ebab963d505dc09e081cfb053970147b07001caea6920 SHA512 7c32b5261d0bfe9f552efd08854233b47958d04cab7b932ddb67cfe163319f8f8ea82d1b169203b9e2158d3a436862d7050dcc762d3b525ba806690640ad3892 diff -uNr a/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild b/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild --- a/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild false +++ b/app-text/docbook-xsl-stylesheets/docbook-xsl-stylesheets-1.79.1-r2.ebuild 6ea76e5f837f30c5750619ad05fad5ec43feff9a4f8382f8f7cbec99541e30275cf035376ca80a276f6f70af0316c82481bbd9e838d21f98ca1cf88ce686588a @@ -0,0 +1,101 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +USE_RUBY="ruby22 ruby23 ruby24 ruby25" + +inherit ruby-single + +DOCBOOKDIR="/usr/share/sgml/${PN/-//}" +MY_PN="${PN%-stylesheets}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="XSL Stylesheets for Docbook" +HOMEPAGE="https://github.com/docbook/wiki/wiki" +SRC_URI="mirror://sourceforge/docbook/${MY_P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +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 ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="ruby" + +RDEPEND=">=app-text/build-docbook-catalog-1.1 + ruby? ( ${RUBY_DEPS} )" + +S="${WORKDIR}/${MY_P}" + +# Makefile is broken since 1.76.0 +RESTRICT=test + +PATCHES=( + "${FILESDIR}"/nonrecursive-string-subst.patch +) + +src_prepare() { + default + + # Delete the unnecessary Java-related stuff and other tools as they + # bloat the stage3 tarballs massively. See bug #575818. + rm -rv extensions/ tools/ || die + find \( -name build.xml -o -name build.properties \) \ + -printf "removed %p\n" -delete || die + + if ! use ruby; then + rm -rv epub/ || die + fi +} + +# The makefile runs tests, not builds. +src_compile() { :; } + +src_test() { + emake check +} + +src_install() { + # The changelog is now zipped, and copied as the RELEASE-NOTES, so we + # don't need to install it + dodoc AUTHORS BUGS NEWS README RELEASE-NOTES.txt TODO + + insinto ${DOCBOOKDIR} + doins VERSION VERSION.xsl + + local i + for i in */; do + i=${i%/} + + cd "${S}"/${i} + for doc in ChangeLog README; do + if [ -e "$doc" ]; then + mv ${doc} ${doc}.${i} + dodoc ${doc}.${i} + rm ${doc}.${i} + fi + done + + doins -r "${S}"/${i} + done + + if use ruby; then + local cmd="dbtoepub${MY_PN#docbook-xsl}" + + # we can't use a symlink or it'll look for the library in the + # wrong path. + dodir /usr/bin + cat - > "${D}"/usr/bin/${cmd} < +Bug-Debian: https://bugs.debian.org/750593 + +--- a/lib/lib.xsl ++++ b/lib/lib.xsl +@@ -10,7 +10,10 @@ + This module implements DTD-independent functions + + ******************************************************************** --> +- ++ + + + +@@ -56,6 +59,9 @@ + + + ++ ++ ++ + + + diff -uNr a/app-text/docbook-xsl-stylesheets/metadata.xml b/app-text/docbook-xsl-stylesheets/metadata.xml --- a/app-text/docbook-xsl-stylesheets/metadata.xml false +++ b/app-text/docbook-xsl-stylesheets/metadata.xml 172658c8fa835b8cf5b06c4379b232ce8fd73f2840b44ce3f520a630f2d2bf95f83e1b6b995c51a4f2424af555d46801a274805b8ea2c33258dcab3204af92e6 @@ -0,0 +1,14 @@ + + + + + + + Install the Ruby-based dbtoepub script; requires an interpreter + compatible with app-eselect/eselect-ruby. + + + + docbook + + diff -uNr a/app-text/manpager/Manifest b/app-text/manpager/Manifest --- a/app-text/manpager/Manifest false +++ b/app-text/manpager/Manifest 3f9ae7f6e951a01aeab4b982bae636d6945fba7664335861b9d31cbbee2965183667faddfc5f334463ad1015150037efdeb9f93eae10494d745890e59afa4a50 @@ -0,0 +1,3 @@ +AUX manpager.c 1809 BLAKE2B 3f17501b90ca4af07e2bdebdc02b0dfd9aafe4dafe878852deeba30219593b1dc4310bd4a152ebf8bc4a58df61cf40fd3fe341cf0fd69e9cccfa43568a7ec67e SHA512 4f827429dc46993010d0096cb352920dfdcaf2cc97bf10e2155dfea3fda601c011467be65ca3f2e3f5c44cb26de0fd9eb58f7d875f75fd5f1db4b2c6cdabdca2 +EBUILD manpager-1.ebuild 646 BLAKE2B bfb4bd847f6a94f6db1cf5b7536ce4984ac82c8feb12cecdec09a01196a93fd95512717a262532721e2095bff5d043889dcffbb7c47f75495b3920386a4e9e6e SHA512 7e4582eefc9acfc019b6bf4e9601d3efce10c70bc512af5e806b899bc1d7c9d08b5af4e0ae06d791e110b0a1803b53d1248890ede0f625578b7c2139ab3ad74c +MISC metadata.xml 253 BLAKE2B 295e9d6d93aaa12af413972e1590c67087801cc09c9aa6b59d4606c0f4106d1dacf2baa9858559083b4c6d91beeef218d0729e8593a33788958da6d2897e8ce2 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 diff -uNr a/app-text/manpager/files/manpager.c b/app-text/manpager/files/manpager.c --- a/app-text/manpager/files/manpager.c false +++ b/app-text/manpager/files/manpager.c f0103655711c91b6fcf94e720322e70aae89d58b5c4cfce94780fc068689d3476997c046c8f053229d4db906a05a1d76509b187524dcb8f40645486391985b18 @@ -0,0 +1,74 @@ +/* + * Wrapper to help enable colorized man page output. + * Only works with PAGER=less + * + * https://bugs.gentoo.org/184604 + * https://unix.stackexchange.com/questions/108699/documentation-on-less-termcap-variables + * + * Copyright 2003-2015 Gentoo Foundation + * Distributed under the terms of the GNU General Public License v2 + */ + +#include +#include +#include +#include + +#define COLOR(c, b) "\e[" #c ";" #b "m" + +#define _SE(termcap, col) setenv("LESS_TERMCAP_" #termcap, col, 0) +#define SE(termcap, c, b) _SE(termcap, COLOR(c, b)) + +static int usage(void) +{ + puts( + "manpager: display man pages with color!\n" + "\n" + "Usage:\n" + "\texport MANPAGER=manpager\n" + "\tman man\n" + "\n" + "To control the colorization, set these env vars:\n" + "\tLESS_TERMCAP_mb - start blinking\n" + "\tLESS_TERMCAP_md - start bolding\n" + "\tLESS_TERMCAP_me - stop bolding\n" + "\tLESS_TERMCAP_us - start underlining\n" + "\tLESS_TERMCAP_ue - stop underlining\n" + "\tLESS_TERMCAP_so - start standout (reverse video)\n" + "\tLESS_TERMCAP_se - stop standout (reverse video)\n" + "\n" + "You can do so by doing:\n" + "\texport LESS_TERMCAP_md=\"$(printf '\\e[1;36m')\"\n" + "\n" + "Run 'less --help' or 'man less' for more info" + ); + return 0; +} + +int main(int argc, char *argv[]) +{ + if (argc == 2 && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help"))) + return usage(); + + /* Blinking. */ + SE(mb, 5, 31); /* Start. */ + + /* Bolding. */ + SE(md, 1, 34); /* Start. */ + SE(me, 0, 0); /* Stop. */ + + /* Underlining. */ + SE(us, 4, 36); /* Start. */ + SE(ue, 0, 0); /* Stop. */ + +#if 0 + /* Standout (reverse video). */ + SE(so, 1, 32); /* Start. */ + SE(se, 0, 0); /* Stop. */ +#endif + + argv[0] = getenv("PAGER") ? : "less"; + execvp(argv[0], argv); + perror("could not launch PAGER"); + return 1; +} diff -uNr a/app-text/manpager/manpager-1.ebuild b/app-text/manpager/manpager-1.ebuild --- a/app-text/manpager/manpager-1.ebuild false +++ b/app-text/manpager/manpager-1.ebuild fce880d6d4ce05edb0d3d7b6232f7a1bb00755d90f447869ef9c77cf246ca22d1755d252eee091896b1e33fc5b41afbb85fabe3e4fcc585e6d62ef8b00c0bc27 @@ -0,0 +1,31 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit toolchain-funcs + +DESCRIPTION="Enable colorization of man pages" +HOMEPAGE="https://www.gentoo.org/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux" +IUSE="" + +S=${WORKDIR} + +src_compile() { + local cmd=( + $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} + "${FILESDIR}"/manpager.c -o ${PN} + ) + echo "${cmd[@]}" + "${cmd[@]}" || die +} + +src_install() { + dobin ${PN} + insinto /etc/env.d + echo "MANPAGER=manpager" | newins - 00manpager +} diff -uNr a/app-text/manpager/metadata.xml b/app-text/manpager/metadata.xml --- a/app-text/manpager/metadata.xml false +++ b/app-text/manpager/metadata.xml c1cc15704207fae53d995d26fa94ebc8fb592f14ab069aeb21afb5a2fefec7fe7eb8cf99f39d287c2ae9c8966132f703727c1964c17a22228765b0c3efc677b0 @@ -0,0 +1,8 @@ + + + + + base-system@gentoo.org + Gentoo Base System + + diff -uNr a/app-text/sgml-common/Manifest b/app-text/sgml-common/Manifest --- a/app-text/sgml-common/Manifest false +++ b/app-text/sgml-common/Manifest 5be7a6ad10b5b73689f19d49d1cb6c54914f6799aa7fb1dde17801771675de70bbe5a169f037374bdae1d172992f05e183a428fd869d959f14b247fb7aa1f523 @@ -0,0 +1,5 @@ +AUX sgml-common-0.6.3-install-catalog.in 5064 BLAKE2B 2400dd32a80a64c89ded54d898a2331b649a35269bd3389e6c71c9f161b5b02b857230a6c7f4807cb975ff4c7d6a99a5576d2bb79190e5914c9faf9488e1d11a SHA512 85fbcdd7aceb28256e08ca1a5b6472247d81499e604d6a45edabf662bc32b72a22326db907e2a408b1a6da02deccd89606749e3fc8e42594ad6402ab29d501b9 +AUX sgml-common-0.6.3-prefix.patch 664 BLAKE2B 5b82b66824547c0cbae10f12c94eaccaa0789c1ff68a20c3ace00cc1620dc0e2d7c81cf906db8fac82104b9d1c5ea29af42746b200f1c1a5a9e9728052f5859c SHA512 62758c7ccb4e86e91292757546e6a1f932cf8282abfc2d9ccfe2e68008bbcc995d0a4eeac3f0c8584c4dfae552a42000b438defe38dc911b770a9e8e72b310ef +DIST sgml-common-0.6.3-gentoo.tar.gz 128903 BLAKE2B 3b374179fe85cf6f098649d2014f9d34349ddccd17ae0ac4c5502414507601c545eaf27f7c76fafd63c36041068205d3b82309a204989f3b106c04c7adf14875 SHA512 c8de573d707ccf524407c9be9a6e7740341eb88ecb6bee69d6d11a2658ef74e6acfb7495afa33c9983ab015c3c925aac98278a4e01ee217892a9fb99e60798ce +EBUILD sgml-common-0.6.3-r6.ebuild 2481 BLAKE2B b4b4945c34f62854ef6db9c1bdaee90ad0814f44e705875a6da1b80956aeff8829d087dfc34939f5dc8edd60d184d8d6d9247a1d4754aec30ad82c7661962b98 SHA512 15d48f36f85740b8fd4c5a056b6483ced6fbe8919b43942928b32fae2c9367a5f07f29eb507918c7d50afb9e403f339e969de16fda5c447e19181a50c461809d +MISC metadata.xml 166 BLAKE2B c254f1fb642881aba57637be14fb0a89b10384f91a128feaec3a8c870d76efc2cbacb92caccc0dee2dd19a5ac5eaf8643080dafa05c4e2ac96a68568927e5afd SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 diff -uNr a/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in b/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in --- a/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in false +++ b/app-text/sgml-common/files/sgml-common-0.6.3-install-catalog.in 46dfa090ec70c9b928739a44f4486ba48f508c713a14dee2bcebada0bedd058c0cc3e2be1ef9a13781b2be0e3ad019b87003f74379e04e630d0d1f944c81eff2 @@ -0,0 +1,182 @@ +#!@GENTOO_PORTAGE_EPREFIX@/bin/bash +# Script to install a catalog in the centralized SGML catalog +# Send any comments to Eric Bischoff +# This program is under GPL license. See LICENSE file for details. + +# Modified by Gentoo developers to better integrate it to portage. +# + +# Set help message +SGML_HELP_MESSAGE="Usage: `basename $0` [