diff options
author | Fabian Groffen <grobian@gentoo.org> | 2018-08-19 10:13:39 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2018-08-19 10:13:39 +0200 |
commit | 2be1e30cc098e6eefc548a9f0cc1a83c23e2abd4 (patch) | |
tree | c3c4bf86fa35aa1bc286aaafcc25f7591867f69a | |
parent | eclass/python-utils-r1: sync for PYTHON_TARGETS=python3_7 (diff) | |
download | prefix-2be1e30c.tar.gz prefix-2be1e30c.tar.bz2 prefix-2be1e30c.zip |
sys-apps/sed: sync
Package-Manager: Portage-2.3.40.3-prefix, Repoman-2.3.9
-rw-r--r-- | sys-apps/sed/Manifest | 3 | ||||
-rw-r--r-- | sys-apps/sed/metadata.xml | 7 | ||||
-rw-r--r-- | sys-apps/sed/sed-4.2.1-r1.ebuild | 70 | ||||
-rw-r--r-- | sys-apps/sed/sed-4.2.1.ebuild | 69 | ||||
-rw-r--r-- | sys-apps/sed/sed-4.2.ebuild | 67 | ||||
-rw-r--r-- | sys-apps/sed/sed-4.5.ebuild | 71 |
6 files changed, 79 insertions, 208 deletions
diff --git a/sys-apps/sed/Manifest b/sys-apps/sed/Manifest index 1b425b1f68..ec23d184ad 100644 --- a/sys-apps/sed/Manifest +++ b/sys-apps/sed/Manifest @@ -1,3 +1,2 @@ -DIST sed-4.2.1.tar.bz2 899091 BLAKE2B 9aefcc576fdf5b342f056540ffe510a8aae160a203960eb55066fcf6965835b9a3f1bcfa0d023104ee5be61dfcdf5946f05560cdc5a43c10eca131c2ec5ec42b SHA512 273d4d0b3dd41a3966260fbe261a20110a2a4c0749e11a080f4fc8694e47b605cb977f2535b20b92d57b1b74129df092ba47f4184951dbc3f0f14fd9b91b7bfd DIST sed-4.2.2.tar.bz2 1059414 BLAKE2B aebe0bf90e9f9c7907e0baa8a4d1a16e59a5893198382fb9fe08ed66cab670921c0db1e07f668bf3db8dfe9bb4f0e68b9c34fd7228c70df24be043d3e7ea8d92 SHA512 dbbb0bb348fac54612d29182c09c88bda7096dea03bd94f03c580c24146e65a06db12808c6a1a9adc94548fa3843511e3e80b251cb07142110cf149eab23f573 -DIST sed-4.2.tar.bz2 882586 BLAKE2B 40cdeb0a3fb2b5f1e29146f18f262e09ab3fcd86bdfaed0de765ce9c62ee2e948d7383abbc972e02ca6ec1a88da7c0176d4305576d08e77ecef1df73c189c65e SHA512 81bccd2664572dee0c9129fd5fda0761341dfb03e5252506b0369d8e91c242029693ccb67858943b9b469d399bceb4833f53ac7cca1b610a42f164d84f2339f9 +DIST sed-4.5.tar.xz 1274252 BLAKE2B 08525659e0e01ec50e736c1665634f3816f57c48aeefa7f6bc7a152cd6c171bb4e96e5c215429fc5edbe6e1de6cc3efe4f2f3bf6865933a30dd1700e921d5b3f SHA512 f95fb27e03b2301dae63878413b4c48e40341cc676945a612e1d0bd911da3192858ae142791292a99fbdaacbc7dab2d6fccb50787c06846f99b0b3740b40c196 diff --git a/sys-apps/sed/metadata.xml b/sys-apps/sed/metadata.xml index b738f8c54a..504b6a5e46 100644 --- a/sys-apps/sed/metadata.xml +++ b/sys-apps/sed/metadata.xml @@ -8,4 +8,11 @@ <upstream> <remote-id type="sourceforge">sed</remote-id> </upstream> +<use> + <flag name="forced-sandbox"> + Always enable --sandbox mode for simpler/secure runtime (disables e/r/w commands). + Note: This may break many configure scripts, so it should be avoided on dev systems + (and generally used on binpkg/final systems only). + </flag> +</use> </pkgmetadata> diff --git a/sys-apps/sed/sed-4.2.1-r1.ebuild b/sys-apps/sed/sed-4.2.1-r1.ebuild deleted file mode 100644 index 50721f6227..0000000000 --- a/sys-apps/sed/sed-4.2.1-r1.ebuild +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sed/sed-4.2.1-r1.ebuild,v 1.14 2014/02/08 13:24:00 vapier Exp $ - -inherit eutils flag-o-matic toolchain-funcs - -DESCRIPTION="Super-useful stream editor" -HOMEPAGE="http://sed.sourceforge.net/" -SRC_URI="mirror://gnu/sed/${P}.tar.bz2" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="acl nls selinux static" - -RDEPEND="acl? ( virtual/acl ) - nls? ( virtual/libintl )" -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" - -src_bootstrap_sed() { - # make sure system-sed works #40786 - export NO_SYS_SED="" - if ! type -p sed > /dev/null ; then - NO_SYS_SED="!!!" - ./bootstrap.sh || die "couldnt bootstrap" - cp sed/sed "${T}"/ || die "couldnt copy" - export PATH="${PATH}:${T}" - make clean || die "couldnt clean" - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${PN}-4.1.5-alloca.patch - epatch "${FILESDIR}"/${P}-handle-incomplete-sequences-as-if-they-were-invalid.patch #284403 - epatch "${FILESDIR}"/${PN}-4.1.4-aix-malloc.patch - epatch "${FILESDIR}"/${P}-espipe.patch - # don't use sed here if we have to recover a broken host sed -} - -src_compile() { - src_bootstrap_sed - # this has to be after the bootstrap portion - sed -i \ - -e '/docdir =/s:=.*/doc:= $(datadir)/doc/'${PF}'/html:' \ - doc/Makefile.in || die "sed html doc" - - local myconf= bindir="${EPREFIX}"/bin - if ! use userland_GNU ; then - myconf="--program-prefix=g" - bindir="${EPREFIX}"/usr/bin - fi - - export ac_cv_search_setfilecon=$(usex selinux -lselinux) - export ac_cv_header_selinux_{context,selinux}_h=$(usex selinux) - use static && append-ldflags -static - econf \ - --bindir="${bindir}" \ - $(use_enable acl) \ - $(use_enable nls) \ - ${myconf} - emake || die "build failed" -} - -src_install() { - emake install DESTDIR="${D}" || die "Install failed" - dodoc NEWS README* THANKS AUTHORS BUGS ChangeLog -} diff --git a/sys-apps/sed/sed-4.2.1.ebuild b/sys-apps/sed/sed-4.2.1.ebuild deleted file mode 100644 index 50425efcf6..0000000000 --- a/sys-apps/sed/sed-4.2.1.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sed/sed-4.2.1.ebuild,v 1.12 2014/02/08 13:24:00 vapier Exp $ - -inherit eutils flag-o-matic toolchain-funcs - -DESCRIPTION="Super-useful stream editor" -HOMEPAGE="http://sed.sourceforge.net/" -SRC_URI="mirror://gnu/sed/${P}.tar.bz2" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="acl nls selinux static" - -RDEPEND="nls? ( virtual/libintl ) - acl? ( virtual/acl )" -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" - -src_bootstrap_sed() { - # make sure system-sed works #40786 - export NO_SYS_SED="" - if ! type -p sed > /dev/null ; then - NO_SYS_SED="!!!" - ./bootstrap.sh || die "couldnt bootstrap" - cp sed/sed "${T}"/ || die "couldnt copy" - export PATH="${PATH}:${T}" - make clean || die "couldnt clean" - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${PN}-4.1.5-alloca.patch - epatch "${FILESDIR}"/${PN}-4.1.4-aix-malloc.patch - epatch "${FILESDIR}"/${PN}-4.1.5-regex-nobool.patch - # don't use sed here if we have to recover a broken host sed -} - -src_compile() { - src_bootstrap_sed - # this has to be after the bootstrap portion - sed -i \ - -e '/docdir =/s:=.*/doc:= $(datadir)/doc/'${PF}'/html:' \ - doc/Makefile.in || die "sed html doc" - - local myconf= bindir="${EPREFIX}"/bin - if ! use userland_GNU ; then - myconf="--program-prefix=g" - bindir="${EPREFIX}"/usr/bin - fi - - export ac_cv_search_setfilecon=$(usex selinux -lselinux) - export ac_cv_header_selinux_{context,selinux}_h=$(usex selinux) - use static && append-ldflags -static - econf \ - --bindir="${bindir}" \ - $(use_enable acl) \ - $(use_enable nls) \ - ${myconf} - emake || die "build failed" -} - -src_install() { - emake install DESTDIR="${D}" || die "Install failed" - dodoc NEWS README* THANKS AUTHORS BUGS ChangeLog -} diff --git a/sys-apps/sed/sed-4.2.ebuild b/sys-apps/sed/sed-4.2.ebuild deleted file mode 100644 index 483cb979bd..0000000000 --- a/sys-apps/sed/sed-4.2.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/sed/sed-4.2.ebuild,v 1.13 2014/02/08 13:24:00 vapier Exp $ - -inherit eutils flag-o-matic toolchain-funcs - -DESCRIPTION="Super-useful stream editor" -HOMEPAGE="http://sed.sourceforge.net/" -SRC_URI="mirror://gnu/sed/${P}.tar.bz2" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="acl nls static" - -RDEPEND="nls? ( virtual/libintl ) - acl? ( virtual/acl )" -DEPEND="${RDEPEND} - nls? ( sys-devel/gettext )" - -src_bootstrap_sed() { - # make sure system-sed works #40786 - export NO_SYS_SED="" - if ! type -p sed > /dev/null ; then - NO_SYS_SED="!!!" - ./bootstrap.sh || die "couldnt bootstrap" - cp sed/sed "${T}"/ || die "couldnt copy" - export PATH="${PATH}:${T}" - make clean || die "couldnt clean" - fi -} - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}"/${PN}-4.1.5-alloca.patch - epatch "${FILESDIR}"/${PN}-4.1.4-aix-malloc.patch - epatch "${FILESDIR}"/${PN}-4.1.5-regex-nobool.patch - # don't use sed here if we have to recover a broken host sed -} - -src_compile() { - src_bootstrap_sed - # this has to be after the bootstrap portion - sed -i \ - -e '/docdir =/s:=.*/doc:= $(datadir)/doc/'${PF}'/html:' \ - doc/Makefile.in || die "sed html doc" - - local myconf= bindir="${EPREFIX}"/bin - if ! use userland_GNU ; then - myconf="--program-prefix=g" - bindir="${EPREFIX}"/usr/bin - fi - - use static && append-ldflags -static - econf \ - --bindir="${bindir}" \ - $(use_enable acl) \ - $(use_enable nls) \ - ${myconf} - emake || die "build failed" -} - -src_install() { - emake install DESTDIR="${D}" || die "Install failed" - dodoc NEWS README* THANKS AUTHORS BUGS ChangeLog -} diff --git a/sys-apps/sed/sed-4.5.ebuild b/sys-apps/sed/sed-4.5.ebuild new file mode 100644 index 0000000000..a1cd293024 --- /dev/null +++ b/sys-apps/sed/sed-4.5.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs + +DESCRIPTION="Super-useful stream editor" +HOMEPAGE="http://sed.sourceforge.net/" +SRC_URI="mirror://gnu/sed/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="acl forced-sandbox nls selinux static" + +RDEPEND="acl? ( virtual/acl ) + nls? ( virtual/libintl ) + selinux? ( sys-libs/libselinux )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +PATCHES=( + "${FILESDIR}"/${PN}-4.1.4-aix-malloc.patch + "${FILESDIR}"/${PN}-4.2.1-espipe.patch +) + +src_bootstrap_sed() { + # make sure system-sed works #40786 #650052 + if ! type -p sed > /dev/null || has_version 'sys-apps/sed[forced-sandbox]' ; then + mkdir -p "${T}/bootstrap" + printf '#!/bin/sh\nexec busybox sed "$@"\n' > "${T}/bootstrap/sed" || die + chmod a+rx "${T}/bootstrap/sed" + PATH="${T}/bootstrap:${PATH}" + fi +} + +src_prepare() { + # Don't use sed before bootstrap if we have to recover a broken host sed. + src_bootstrap_sed + + default + + if use forced-sandbox ; then + # Upstream doesn't want to add a configure flag for this. + # https://lists.gnu.org/archive/html/bug-sed/2018-03/msg00001.html + sed -i \ + -e '/^bool sandbox = false;/s:false:true:' \ + sed/sed.c || die + # Make sure the sed took. + grep -q '^bool sandbox = true;' sed/sed.c || die "forcing sandbox failed" + fi +} + +src_configure() { + local myconf=() + if use userland_GNU; then + myconf+=( --exec-prefix="${EPREFIX}" ) + else + myconf+=( --program-prefix=g ) + fi + + export ac_cv_search_setfilecon=$(usex selinux -lselinux) + export ac_cv_header_selinux_{context,selinux}_h=$(usex selinux) + use static && append-ldflags -static + myconf+=( + $(use_enable acl) + $(use_enable nls) + ) + econf "${myconf[@]}" +} |