From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 652F6139694 for ; Wed, 26 Apr 2017 21:12:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 62F6BE0CBD; Wed, 26 Apr 2017 21:12:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 21228E0CBD for ; Wed, 26 Apr 2017 21:12:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B3D85341694 for ; Wed, 26 Apr 2017 21:12:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 240A97440 for ; Wed, 26 Apr 2017 21:12:33 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1493241146.5c7ecf36f0bbbe18b513d7afb82b0f7bf342889c.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/busybox/files/, sys-apps/busybox/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/busybox/busybox-1.26.2-r1.ebuild sys-apps/busybox/busybox-1.26.2.ebuild sys-apps/busybox/files/busybox-1.26.2-bb.patch X-VCS-Directories: sys-apps/busybox/ sys-apps/busybox/files/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 5c7ecf36f0bbbe18b513d7afb82b0f7bf342889c X-VCS-Branch: master Date: Wed, 26 Apr 2017 21:12:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d755c22b-10fe-4d25-9081-04abea5aa452 X-Archives-Hash: 0337476cd47c61b71e373a7674368e14 commit: 5c7ecf36f0bbbe18b513d7afb82b0f7bf342889c Author: Mike Frysinger chromium org> AuthorDate: Wed Apr 26 21:09:04 2017 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Wed Apr 26 21:12:26 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c7ecf36 sys-apps/busybox: fix default shell handling Make sure we explicitly select sh->ash by default as newer versions are defaulting to sh->hush. Also fix up the hush patch to include the /bin/busybox fallbacks. ...ybox-1.26.2.ebuild => busybox-1.26.2-r1.ebuild} | 1 + sys-apps/busybox/files/busybox-1.26.2-bb.patch | 29 ++++++++++++++++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/sys-apps/busybox/busybox-1.26.2.ebuild b/sys-apps/busybox/busybox-1.26.2-r1.ebuild similarity index 99% rename from sys-apps/busybox/busybox-1.26.2.ebuild rename to sys-apps/busybox/busybox-1.26.2-r1.ebuild index 1feb3a5ac22..6c42e41a452 100644 --- a/sys-apps/busybox/busybox-1.26.2.ebuild +++ b/sys-apps/busybox/busybox-1.26.2-r1.ebuild @@ -126,6 +126,7 @@ src_configure() { # If these are not set and we are using a uclibc/busybox setup # all calls to system() will fail. busybox_config_option y ASH + busybox_config_option y SH_IS_ASH busybox_config_option n HUSH busybox_config_option '"/run"' PID_FILE_PATH diff --git a/sys-apps/busybox/files/busybox-1.26.2-bb.patch b/sys-apps/busybox/files/busybox-1.26.2-bb.patch index f120340162b..5e2405c3a67 100644 --- a/sys-apps/busybox/files/busybox-1.26.2-bb.patch +++ b/sys-apps/busybox/files/busybox-1.26.2-bb.patch @@ -1,6 +1,11 @@ -diff -Naur busybox-1.26.2.orig/shell/ash.c busybox-1.26.2/shell/ash.c ---- busybox-1.26.2.orig/shell/ash.c 2017-01-10 10:55:51.000000000 -0500 -+++ busybox-1.26.2/shell/ash.c 2017-01-28 17:02:08.961584737 -0500 +add `bb` and `bbsh` shortcuts as aliases to the main shell so we can install +symlinks in Gentoo at /bin/bb as our recovery shell. + +we also add fallbacks to /bin/busybox and /bin/busybox.static in case /proc +is not yet mounted during early boot. + +--- a/shell/ash.c ++++ b/shell/ash.c @@ -144,6 +144,8 @@ //applet:IF_ASH(APPLET(ash, BB_DIR_BIN, BB_SUID_DROP)) //applet:IF_SH_IS_ASH(APPLET_ODDNAME(sh, ash, BB_DIR_BIN, BB_SUID_DROP, ash)) @@ -19,9 +24,8 @@ diff -Naur busybox-1.26.2.orig/shell/ash.c busybox-1.26.2/shell/ash.c /* If they called chroot or otherwise made the binary no longer * executable, fall through */ } -diff -Naur busybox-1.26.2.orig/shell/hush.c busybox-1.26.2/shell/hush.c ---- busybox-1.26.2.orig/shell/hush.c 2017-01-10 10:55:51.000000000 -0500 -+++ busybox-1.26.2/shell/hush.c 2017-01-28 17:05:13.235936850 -0500 +--- a/shell/hush.c ++++ b/shell/hush.c @@ -221,6 +221,8 @@ //applet:IF_MSH(APPLET_ODDNAME(msh, hush, BB_DIR_BIN, BB_SUID_DROP, hush)) //applet:IF_SH_IS_HUSH(APPLET_ODDNAME(sh, hush, BB_DIR_BIN, BB_SUID_DROP, hush)) @@ -35,8 +39,17 @@ diff -Naur busybox-1.26.2.orig/shell/hush.c busybox-1.26.2/shell/hush.c if (SPECIAL_JOBSTOP_SIGS != 0) switch_off_special_sigs(G.special_sig_mask & SPECIAL_JOBSTOP_SIGS); execve(bb_busybox_exec_path, argv, pp); -+ execve("/bin/busybox.static", argv, envp); -+ execve("/bin/busybox", argv, envp); ++ execve("/bin/busybox.static", argv, pp); ++ execve("/bin/busybox", argv, pp); /* Fallback. Useful for init=/bin/hush usage etc */ if (argv[0][0] == '/') execve(argv[0], argv, pp); +@@ -6931,6 +6931,8 @@ + if (SPECIAL_JOBSTOP_SIGS != 0) + switch_off_special_sigs(G.special_sig_mask & SPECIAL_JOBSTOP_SIGS); + execv(bb_busybox_exec_path, argv); ++ execv("/bin/busybox.static", argv); ++ execv("/bin/busybox", argv); + /* If they called chroot or otherwise made the binary no longer + * executable, fall through */ + }