* [PATCH 1/2] bash: use update-alternatives for the bash binary
@ 2016-11-30 18:50 Andreas Oberritter
2016-11-30 18:50 ` [PATCH 2/2] util-linux: create own package for lsblk Andreas Oberritter
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Andreas Oberritter @ 2016-11-30 18:50 UTC (permalink / raw)
To: openembedded-core
Busybox may offer a bash applet. If enabled, the alternatives mechanism
avoids breaking logins if bash gets deinstalled while /bin/bash is configured
as a login shell.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
meta/recipes-extended/bash/bash.inc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 1d08526..a05b987 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -14,9 +14,11 @@ EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
# This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137.
CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
-ALTERNATIVE_${PN} = "sh"
+ALTERNATIVE_${PN} = "bash sh"
+ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
+ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
-ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
+ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}"
ALTERNATIVE_PRIORITY = "100"
RDEPENDS_${PN} += "base-files"
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/2] util-linux: create own package for lsblk 2016-11-30 18:50 [PATCH 1/2] bash: use update-alternatives for the bash binary Andreas Oberritter @ 2016-11-30 18:50 ` Andreas Oberritter 2017-01-30 22:22 ` Andreas Oberritter 2016-12-01 17:41 ` [PATCH 1/2] bash: use update-alternatives for the bash binary Burton, Ross 2017-01-30 22:21 ` Andreas Oberritter 2 siblings, 1 reply; 6+ messages in thread From: Andreas Oberritter @ 2016-11-30 18:50 UTC (permalink / raw) To: openembedded-core Let util-linux-bash-completion depend on it, because it uses it. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> --- meta/recipes-core/util-linux/util-linux.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 70cba6b..ae85fd1 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -30,7 +30,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd util-linux-swaponoff util-linux-losetup util-linux-umount \ util-linux-mount util-linux-readprofile util-linux-uuidd \ util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \ - util-linux-mkfs util-linux-mcookie util-linux-reset \ + util-linux-mkfs util-linux-mcookie util-linux-reset util-linux-lsblk \ util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \ util-linux-partx util-linux-hwclock util-linux-mountpoint \ util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit" @@ -95,6 +95,7 @@ FILES_util-linux-prlimit = "${bindir}/prlimit" FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" +FILES_util-linux-lsblk = "${bindir}/lsblk" FILES_util-linux-lscpu = "${bindir}/lscpu" FILES_util-linux-fsck = "${base_sbindir}/fsck*" @@ -116,7 +117,7 @@ RDEPENDS_util-linux-reset += "ncurses" RDEPENDS_util-linux-runuser += "libpam" -RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin" +RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}" RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit" @@ -285,6 +286,7 @@ python populate_packages_prepend() { extra_depends='', prepend=True, allow_links=True) } +RDEPENDS_${PN}-bash-completion += "util-linux-lsblk" RDEPENDS_${PN}-ptest = "bash grep coreutils" do_compile_ptest() { -- 2.7.4 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] util-linux: create own package for lsblk 2016-11-30 18:50 ` [PATCH 2/2] util-linux: create own package for lsblk Andreas Oberritter @ 2017-01-30 22:22 ` Andreas Oberritter 0 siblings, 0 replies; 6+ messages in thread From: Andreas Oberritter @ 2017-01-30 22:22 UTC (permalink / raw) To: openembedded-core Ping. On Wed, 30 Nov 2016 19:50:27 +0100 Andreas Oberritter <obi@opendreambox.org> wrote: > Let util-linux-bash-completion depend on it, because it uses it. > > Signed-off-by: Andreas Oberritter <obi@opendreambox.org> > --- > meta/recipes-core/util-linux/util-linux.inc | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc > index 70cba6b..ae85fd1 100644 > --- a/meta/recipes-core/util-linux/util-linux.inc > +++ b/meta/recipes-core/util-linux/util-linux.inc > @@ -30,7 +30,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfd > util-linux-swaponoff util-linux-losetup util-linux-umount \ > util-linux-mount util-linux-readprofile util-linux-uuidd \ > util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \ > - util-linux-mkfs util-linux-mcookie util-linux-reset \ > + util-linux-mkfs util-linux-mcookie util-linux-reset util-linux-lsblk \ > util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \ > util-linux-partx util-linux-hwclock util-linux-mountpoint \ > util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit" > @@ -95,6 +95,7 @@ FILES_util-linux-prlimit = "${bindir}/prlimit" > FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \ > ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \ > ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*" > +FILES_util-linux-lsblk = "${bindir}/lsblk" > FILES_util-linux-lscpu = "${bindir}/lscpu" > > FILES_util-linux-fsck = "${base_sbindir}/fsck*" > @@ -116,7 +117,7 @@ RDEPENDS_util-linux-reset += "ncurses" > > RDEPENDS_util-linux-runuser += "libpam" > > -RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin" > +RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk" > RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}" > > RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit" > @@ -285,6 +286,7 @@ python populate_packages_prepend() { > extra_depends='', prepend=True, allow_links=True) > } > > +RDEPENDS_${PN}-bash-completion += "util-linux-lsblk" > RDEPENDS_${PN}-ptest = "bash grep coreutils" > > do_compile_ptest() { ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bash: use update-alternatives for the bash binary 2016-11-30 18:50 [PATCH 1/2] bash: use update-alternatives for the bash binary Andreas Oberritter 2016-11-30 18:50 ` [PATCH 2/2] util-linux: create own package for lsblk Andreas Oberritter @ 2016-12-01 17:41 ` Burton, Ross 2016-12-01 19:42 ` Andreas Oberritter 2017-01-30 22:21 ` Andreas Oberritter 2 siblings, 1 reply; 6+ messages in thread From: Burton, Ross @ 2016-12-01 17:41 UTC (permalink / raw) To: Andreas Oberritter; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 251 bytes --] On 30 November 2016 at 18:50, Andreas Oberritter <obi@opendreambox.org> wrote: > Busybox may offer a bash applet. If enabled, the alternatives mechanism > Wait, what? busybox can ship a /bin/bash that isn't bash? That's *hideous*! Ross [-- Attachment #2: Type: text/html, Size: 666 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bash: use update-alternatives for the bash binary 2016-12-01 17:41 ` [PATCH 1/2] bash: use update-alternatives for the bash binary Burton, Ross @ 2016-12-01 19:42 ` Andreas Oberritter 0 siblings, 0 replies; 6+ messages in thread From: Andreas Oberritter @ 2016-12-01 19:42 UTC (permalink / raw) To: Burton, Ross; +Cc: OE-core On 01.12.2016 18:41, Burton, Ross wrote: > > On 30 November 2016 at 18:50, Andreas Oberritter <obi@opendreambox.org > <mailto:obi@opendreambox.org>> wrote: > > Busybox may offer a bash applet. If enabled, the alternatives mechanism > > > Wait, what? busybox can ship a /bin/bash that isn't bash? That's > *hideous*! That's what busybox is all about, isn't it? Shipping things that aren't the real thing with varying levels of compatibility (think sed, awk, grep for other tools in busybox that use some kind of interpreted language). Busybox' ash even supports some bash extensions. FWIW, using /bin/bash as a login shell with busybox was the easiest way to get bash-completions working with bash installed in a normal rootfs (it doesn't work fully in POSIX mode) and get working logins in an initramfs image at the same time, where bash isn't installed. /etc/passwd is shared between both images. Regards, Andreas ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] bash: use update-alternatives for the bash binary 2016-11-30 18:50 [PATCH 1/2] bash: use update-alternatives for the bash binary Andreas Oberritter 2016-11-30 18:50 ` [PATCH 2/2] util-linux: create own package for lsblk Andreas Oberritter 2016-12-01 17:41 ` [PATCH 1/2] bash: use update-alternatives for the bash binary Burton, Ross @ 2017-01-30 22:21 ` Andreas Oberritter 2 siblings, 0 replies; 6+ messages in thread From: Andreas Oberritter @ 2017-01-30 22:21 UTC (permalink / raw) To: openembedded-core Ping. On Wed, 30 Nov 2016 19:50:26 +0100 Andreas Oberritter <obi@opendreambox.org> wrote: > Busybox may offer a bash applet. If enabled, the alternatives mechanism > avoids breaking logins if bash gets deinstalled while /bin/bash is configured > as a login shell. > > Signed-off-by: Andreas Oberritter <obi@opendreambox.org> > --- > meta/recipes-extended/bash/bash.inc | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc > index 1d08526..a05b987 100644 > --- a/meta/recipes-extended/bash/bash.inc > +++ b/meta/recipes-extended/bash/bash.inc > @@ -14,9 +14,11 @@ EXTRA_OECONF = "--enable-job-control --without-bash-malloc" > # This is what other major distros do. And this is what we wanted. See bug#5359 and bug#7137. > CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS" > > -ALTERNATIVE_${PN} = "sh" > +ALTERNATIVE_${PN} = "bash sh" > +ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash" > +ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash" > ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh" > -ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash" > +ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}" > ALTERNATIVE_PRIORITY = "100" > > RDEPENDS_${PN} += "base-files" ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-01-30 22:30 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-11-30 18:50 [PATCH 1/2] bash: use update-alternatives for the bash binary Andreas Oberritter 2016-11-30 18:50 ` [PATCH 2/2] util-linux: create own package for lsblk Andreas Oberritter 2017-01-30 22:22 ` Andreas Oberritter 2016-12-01 17:41 ` [PATCH 1/2] bash: use update-alternatives for the bash binary Burton, Ross 2016-12-01 19:42 ` Andreas Oberritter 2017-01-30 22:21 ` Andreas Oberritter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox