public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabian Groffen" <grobian@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/prefix:master commit in: sys-apps/sed/
Date: Sun, 19 Aug 2018 08:14:01 +0000 (UTC)	[thread overview]
Message-ID: <1534666419.2be1e30cc098e6eefc548a9f0cc1a83c23e2abd4.grobian@gentoo> (raw)

commit:     2be1e30cc098e6eefc548a9f0cc1a83c23e2abd4
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 19 08:13:39 2018 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Aug 19 08:13:39 2018 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=2be1e30c

sys-apps/sed: sync

Package-Manager: Portage-2.3.40.3-prefix, Repoman-2.3.9

 sys-apps/sed/Manifest            |  3 +-
 sys-apps/sed/metadata.xml        |  7 ++++
 sys-apps/sed/sed-4.2.1-r1.ebuild | 70 ---------------------------------------
 sys-apps/sed/sed-4.2.1.ebuild    | 69 --------------------------------------
 sys-apps/sed/sed-4.2.ebuild      | 67 -------------------------------------
 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[@]}"
+}


             reply	other threads:[~2018-08-19  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-19  8:14 Fabian Groffen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-11-20  9:17 [gentoo-commits] repo/proj/prefix:master commit in: sys-apps/sed/ Fabian Groffen
2020-12-07 23:04 Sam James
2020-12-27 11:07 Fabian Groffen
2021-01-24 12:18 Fabian Groffen
2023-05-24  7:48 Fabian Groffen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1534666419.2be1e30cc098e6eefc548a9f0cc1a83c23e2abd4.grobian@gentoo \
    --to=grobian@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox