public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2022-12-05 19:13 Michał Górny
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Górny @ 2022-12-05 19:13 UTC (permalink / raw
  To: gentoo-commits

commit:     1234f6505bc72480d59854fdf4f42fd9f55a3081
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  2 19:11:01 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Dec  5 19:13:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1234f650

app-alternatives/sh: Use app-alternatives.eclass

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 37 +++++++++++--------------------------
 1 file changed, 11 insertions(+), 26 deletions(-)

diff --git a/app-alternatives/sh/sh-0.ebuild b/app-alternatives/sh/sh-0.ebuild
index 5da158c80cab..882b960924a4 100644
--- a/app-alternatives/sh/sh-0.ebuild
+++ b/app-alternatives/sh/sh-0.ebuild
@@ -3,40 +3,25 @@
 
 EAPI=8
 
-DESCRIPTION="/bin/sh (POSIX shell) symlink"
-HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Base/Alternatives"
-SRC_URI=""
-S=${WORKDIR}
+ALTERNATIVES=(
+	bash:app-shells/bash
+	dash:app-shells/dash
+	ksh:app-shells/ksh
+	"lksh:app-shells/mksh[lksh]"
+	mksh:app-shells/mksh
+)
+
+inherit app-alternatives
 
-LICENSE="CC0-1.0"
-SLOT="0"
+DESCRIPTION="/bin/sh (POSIX shell) symlink"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="+bash dash ksh lksh mksh"
-REQUIRED_USE="^^ ( bash dash ksh lksh mksh )"
 
 RDEPEND="
-	bash? ( app-shells/bash )
-	dash? ( app-shells/dash )
-	ksh? ( app-shells/ksh )
-	lksh? ( app-shells/mksh[lksh] )
-	mksh? ( app-shells/mksh )
 	!!app-eselect/eselect-sh
 "
 
 src_install() {
-	if use bash; then
-		dosym bash /bin/sh
-	elif use dash; then
-		dosym dash /bin/sh
-	elif use ksh; then
-		dosym ksh /bin/sh
-	elif use lksh; then
-		dosym lksh /bin/sh
-	elif use mksh; then
-		dosym mksh /bin/sh
-	else
-		die "Invalid USE flag combination (broken REQUIRED_USE?)"
-	fi
+	dosym "$(get_alternative)" /bin/sh || die
 }
 
 pkg_postrm() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2022-12-27 11:31 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-12-27 11:31 UTC (permalink / raw
  To: gentoo-commits

commit:     3bb0d2182824eeb4b54784b964e4da81c6738233
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 11:31:11 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 11:31:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3bb0d218

app-alternatives/sh: Stabilize 0 amd64, #886017

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-alternatives/sh/sh-0.ebuild b/app-alternatives/sh/sh-0.ebuild
index 882b960924a4..d75939a6fb05 100644
--- a/app-alternatives/sh/sh-0.ebuild
+++ b/app-alternatives/sh/sh-0.ebuild
@@ -14,7 +14,7 @@ ALTERNATIVES=(
 inherit app-alternatives
 
 DESCRIPTION="/bin/sh (POSIX shell) symlink"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 
 RDEPEND="
 	!!app-eselect/eselect-sh


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2022-12-27 13:40 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-12-27 13:40 UTC (permalink / raw
  To: gentoo-commits

commit:     79460ba708a203a56f265bb00dec3e076ff4a8d4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 13:39:39 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 13:39:39 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=79460ba7

app-alternatives/sh: Stabilize 0 arm64, #886017

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-alternatives/sh/sh-0.ebuild b/app-alternatives/sh/sh-0.ebuild
index 9689300127b5..42d3ba34092b 100644
--- a/app-alternatives/sh/sh-0.ebuild
+++ b/app-alternatives/sh/sh-0.ebuild
@@ -14,7 +14,7 @@ ALTERNATIVES=(
 inherit app-alternatives
 
 DESCRIPTION="/bin/sh (POSIX shell) symlink"
-KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 
 RDEPEND="
 	!!app-eselect/eselect-sh


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2022-12-27 19:45 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-12-27 19:45 UTC (permalink / raw
  To: gentoo-commits

commit:     5df6c153a405e8305b009e9f939cfd4f90a56bb9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 19:37:05 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 19:45:30 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5df6c153

app-alternatives/sh: Stabilize 0 hppa, #886017

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-alternatives/sh/sh-0.ebuild b/app-alternatives/sh/sh-0.ebuild
index 5c81f6a4cfa1..b85eeb7070e6 100644
--- a/app-alternatives/sh/sh-0.ebuild
+++ b/app-alternatives/sh/sh-0.ebuild
@@ -14,7 +14,7 @@ ALTERNATIVES=(
 inherit app-alternatives
 
 DESCRIPTION="/bin/sh (POSIX shell) symlink"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 
 RDEPEND="
 	!!app-eselect/eselect-sh


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2022-12-27 19:53 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-12-27 19:53 UTC (permalink / raw
  To: gentoo-commits

commit:     f924b60ca713aa6545bc47cea398c005e6e729bf
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 27 19:47:12 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 27 19:53:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f924b60c

app-alternatives/sh: Stabilize 0 ppc64, #886017

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-alternatives/sh/sh-0.ebuild b/app-alternatives/sh/sh-0.ebuild
index 92e5a0c716b9..4cd530a89d9c 100644
--- a/app-alternatives/sh/sh-0.ebuild
+++ b/app-alternatives/sh/sh-0.ebuild
@@ -14,7 +14,7 @@ ALTERNATIVES=(
 inherit app-alternatives
 
 DESCRIPTION="/bin/sh (POSIX shell) symlink"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ~ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 
 RDEPEND="
 	!!app-eselect/eselect-sh


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2022-12-28 20:25 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-12-28 20:25 UTC (permalink / raw
  To: gentoo-commits

commit:     689f36370d85a43fba6d7329290b5d2086b61fb4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 20:04:57 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 20:07:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=689f3637

app-alternatives/sh: support sys-apps/busybox

Note that we have to check for CONFIG_FEATURE_SH_STANDALONE=y to avoid
busybox preferring internal applets over commands in PATH.

See https://web.archive.org/web/20221206223848/https://busybox.net/FAQ.html#standalone_shell.

Closes: https://bugs.gentoo.org/888781
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/app-alternatives/sh/sh-0.ebuild b/app-alternatives/sh/sh-0.ebuild
index 4cd530a89d9c..682533efb3bf 100644
--- a/app-alternatives/sh/sh-0.ebuild
+++ b/app-alternatives/sh/sh-0.ebuild
@@ -5,6 +5,7 @@ EAPI=8
 
 ALTERNATIVES=(
 	bash:app-shells/bash
+	busybox:sys-apps/busybox
 	dash:app-shells/dash
 	ksh:app-shells/ksh
 	"lksh:app-shells/mksh[lksh]"
@@ -20,6 +21,19 @@ RDEPEND="
 	!!app-eselect/eselect-sh
 "
 
+pkg_setup() {
+	if [[ -z ${ROOT} ]] && use busybox ; then
+		# Needed to avoid busybox preferring internal applets over PATH lookups.
+		# https://web.archive.org/web/20221206223848/https://busybox.net/FAQ.html#standalone_shell.
+		if busybox bbconfig | grep -q "CONFIG_FEATURE_SH_STANDALONE=y" ; then
+			ewarn "busybox is configured with CONFIG_FEATURE_SH_STANDALONE=y!"
+			ewarn "This is not a safe configuration for busybox as /bin/sh."
+			ewarn "Please use savedconfig to disable CONFIG_FEATURE_SH_STANDALONE on busybox."
+			die "Aborting due to unsafe Busybox configuration (CONFIG_FEATURE_SH_STANDALONE=y)!"
+		fi
+	fi
+}
+
 src_install() {
 	dosym "$(get_alternative)" /bin/sh || die
 }


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2022-12-28 20:26 Sam James
  0 siblings, 0 replies; 9+ messages in thread
From: Sam James @ 2022-12-28 20:26 UTC (permalink / raw
  To: gentoo-commits

commit:     42bbd9ef45231f9bd1c296608351d57bf6e8b673
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 28 20:26:26 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 28 20:26:26 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42bbd9ef

app-alternatives/sh: describe USE=busybox

I've got the patch ready just to post to the bug so missed the pkgcheck
warning earlier :(

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-alternatives/sh/metadata.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app-alternatives/sh/metadata.xml b/app-alternatives/sh/metadata.xml
index b91b8f41c94c..ab59369a30d1 100644
--- a/app-alternatives/sh/metadata.xml
+++ b/app-alternatives/sh/metadata.xml
@@ -13,6 +13,9 @@
 		<flag name="bash">
 			Symlink to <pkg>app-shells/bash</pkg>
 		</flag>
+		<flag name="busybox">
+			Symlink to <pkg>sys-apps/busybox</pkg>
+		</flag>
 		<flag name="dash">
 			Symlink to <pkg>app-shells/dash</pkg>
 		</flag>


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2022-12-29  4:19 Mike Gilbert
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Gilbert @ 2022-12-29  4:19 UTC (permalink / raw
  To: gentoo-commits

commit:     bdfbc6b12be8b6a186f27adc63308b93edac9c7b
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 29 04:15:43 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Dec 29 04:16:55 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bdfbc6b1

app-alternatives/sh: change eselect-sh blocker from hard to soft

Since app-alternatives/sh was added to @system, this will allow for an
automatic replacement.

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-alternatives/sh/sh-0.ebuild b/app-alternatives/sh/sh-0.ebuild
index 682533efb3bf..f51bc5622d0c 100644
--- a/app-alternatives/sh/sh-0.ebuild
+++ b/app-alternatives/sh/sh-0.ebuild
@@ -18,7 +18,7 @@ DESCRIPTION="/bin/sh (POSIX shell) symlink"
 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 
 RDEPEND="
-	!!app-eselect/eselect-sh
+	!app-eselect/eselect-sh
 "
 
 pkg_setup() {


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/
@ 2024-08-25 12:04 Andreas K. Hüttel
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas K. Hüttel @ 2024-08-25 12:04 UTC (permalink / raw
  To: gentoo-commits

commit:     cff4627d3a789d5cdea50698c8ba9b1f24148b10
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 25 09:56:53 2024 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Aug 25 12:03:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cff4627d

app-alternatives/sh: remove ~mips

Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 app-alternatives/sh/sh-0.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app-alternatives/sh/sh-0.ebuild b/app-alternatives/sh/sh-0.ebuild
index c62843c07c16..0c27f5c1566a 100644
--- a/app-alternatives/sh/sh-0.ebuild
+++ b/app-alternatives/sh/sh-0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2022-2023 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -15,7 +15,7 @@ ALTERNATIVES=(
 inherit app-alternatives
 
 DESCRIPTION="/bin/sh (POSIX shell) symlink"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
 
 RDEPEND="
 	!app-eselect/eselect-sh


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-08-25 12:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-27 19:53 [gentoo-commits] repo/gentoo:master commit in: app-alternatives/sh/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2024-08-25 12:04 Andreas K. Hüttel
2022-12-29  4:19 Mike Gilbert
2022-12-28 20:26 Sam James
2022-12-28 20:25 Sam James
2022-12-27 19:45 Sam James
2022-12-27 13:40 Sam James
2022-12-27 11:31 Sam James
2022-12-05 19:13 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox