All of lore.kernel.org
 help / color / mirror / Atom feed
From: "hongxu" <hongxu.jia@windriver.com>
To: <openembedded-core@lists.openembedded.org>,
	<richard.purdie@linuxfoundation.org>
Subject: [oe-core][PATCH 2/4] util-linux: fix calling uuidd failed with /run/uuidd not found
Date: Fri, 25 Sep 2020 00:05:33 -0700	[thread overview]
Message-ID: <20200925070535.59518-3-hongxu.jia@windriver.com> (raw)
In-Reply-To: <20200925070535.59518-1-hongxu.jia@windriver.com>

It failed to call uuidd
...
root@qemux86-64:~# uuidd
uuidd: cannot open /run/uuidd/uuidd.pid: No such file or directory
...

Create volatile dir /run/uuidd for both of systemd and sysvinit system

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../util-linux/util-linux_2.36.bb             | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/meta/recipes-core/util-linux/util-linux_2.36.bb b/meta/recipes-core/util-linux/util-linux_2.36.bb
index 2ad00ff0a5..3762308c38 100644
--- a/meta/recipes-core/util-linux/util-linux_2.36.bb
+++ b/meta/recipes-core/util-linux/util-linux_2.36.bb
@@ -151,6 +151,11 @@ FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
 FILES_${PN}-mount = "${sysconfdir}/default/mountall"
 FILES_${PN}-runuser = "${sysconfdir}/pam.d/runuser*"
 FILES_${PN}-su = "${sysconfdir}/pam.d/su-l"
+FILES_${PN}-uuidd = " \
+    /etc/tmpfiles.d/uuidd.conf \
+    /etc/default/volatiles/99_uuidd \
+"
+
 CONFFILES_${PN}-su = "${sysconfdir}/pam.d/su-l"
 FILES_${PN}-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
                           ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
@@ -179,6 +184,12 @@ SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable"
 SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service"
 SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable"
 
+pkg_postinst_${PN}-uuidd() {
+	if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ] ; then
+		${sysconfdir}/init.d/populate-volatile.sh update
+	fi
+}
+
 do_install () {
 	# with ccache the timestamps on compiled files may
 	# end up earlier than on their inputs, this allows
@@ -226,6 +237,16 @@ do_install_append_class-target () {
 		# and thus prevents the operation.
 		ln -s su ${D}${sysconfdir}/pam.d/su-l
 	fi
+
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+		install -d ${D}${sysconfdir}/tmpfiles.d
+		echo "d /run/uuidd 0755 root root - -" > ${D}${sysconfdir}/tmpfiles.d/uuidd.conf
+	fi
+
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+		install -d ${D}${sysconfdir}/default/volatiles
+		echo "d root root 0755 /run/uuidd none" > ${D}${sysconfdir}/default/volatiles/99_uuidd
+	fi
 }
 # nologin causes a conflict with shadow-native
 # kill causes a conflict with coreutils-native (if ${bindir}==${base_bindir})
-- 
2.21.0


  parent reply	other threads:[~2020-09-25  7:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25  7:05 Review request 0/4: multiple fixes for oe-core hongxu
2020-09-25  7:05 ` [oe-core][PATCH 1/4] initramfs-framework/udev: umount /run/media/XXX hongxu
2021-06-11  7:36   ` Yu, Mingli
2021-06-11 16:46     ` Alexander Kanavin
2020-09-25  7:05 ` hongxu [this message]
2021-06-11  7:35   ` [oe-core][PATCH 2/4] util-linux: fix calling uuidd failed with /run/uuidd not found Yu, Mingli
2020-09-25  7:05 ` [oe-core][PATCH 3/4] archive: fix racing between do_ar_patched and do_kernel_configme hongxu
2021-06-11  7:38   ` Yu, Mingli
2020-09-25  7:05 ` [oe-core][PATCH 4/4] alsa-state: run alsactl store in pkg_postinst hongxu
2021-06-11  7:39   ` Yu, Mingli

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=20200925070535.59518-3-hongxu.jia@windriver.com \
    --to=hongxu.jia@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.