summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2025-02-10 23:15:03 +0100
committerSteve Sakoman <steve@sakoman.com>2025-02-14 06:38:54 -0800
commitce9f4eaaae324ef4182a39293f3a6b2aa7207680 (patch)
treea9defe807d57b937d185e76fa845e45029766c41
parentd59b8312e9de5b04dc823a463d7b0d4dfb70951a (diff)
downloadpoky-ce9f4eaaae324ef4182a39293f3a6b2aa7207680.tar.gz
base-files: Drop /bin/sh dependency
Remove /bin/sh from bash RPROVIDES as this has a side-effect which confuses rpm package manager when also busybox provides /bin/sh and base-files depend on /bin/sh . The problem is broken down below. First, bash depends on base-files and bash pkg_postinst must run after base-files was installed, because it requires /etc/shells provided by base-files to be in place. Second, base-files depends on /bin/sh, which is provided by either bash or busybox in this case. This is the actual problem here, if bash is selected as /bin/sh provider, then there is cyclic dependency between bash and base-files, and that confuses dnf which may install the packages in the wrong order, bash first and base-files second . To make this worse, if busybox is also /bin/sh provider, it can and does happen that some systems pick busybox as the /bin/sh provider, while others pick bash as the /bin/sh provider, and that cyclic dependency does not always appear. Attempt to break this dependency, remove pre-inst script from the base-files recipe, which removes its dependency on /bin/sh and allows it to be installed very early, and always before bash. (From OE-Core rev: e71b64a9b22c7db316e92e78a4bce8b9f994a4ae) (From OE-Core rev: 61880aac34ff408a8bc5060c6140bfd086b27524) Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb23
1 files changed, 0 insertions, 23 deletions
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 9fab53ce63..5d13b6249d 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -70,29 +70,6 @@ hostname = "${MACHINE}"
70 70
71BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" 71BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
72 72
73# In previous versions of base-files, /run was a softlink to /var/run and the
74# directory was located in /var/volatlie/run. Also, /var/lock was a softlink
75# to /var/volatile/lock which is where the real directory was located. Now,
76# /run and /run/lock are the real directories. If we are upgrading, we may
77# need to remove the symbolic links first before we create the directories.
78# Otherwise the directory creation will fail and we will have circular symbolic
79# links.
80#
81pkg_preinst:${PN} () {
82 #!/bin/sh -e
83 if [ x"$D" = "x" ]; then
84 if [ -h "/var/lock" ]; then
85 # Remove the symbolic link
86 rm -f /var/lock
87 fi
88
89 if [ -h "/run" ]; then
90 # Remove the symbolic link
91 rm -f /run
92 fi
93 fi
94}
95
96do_install () { 73do_install () {
97 for d in ${dirs555}; do 74 for d in ${dirs555}; do
98 install -m 0555 -d ${D}$d 75 install -m 0555 -d ${D}$d