Skip to contentSkip to conversation

sudo: set with-rundir to /run/sudo

PATCH New Ricardo Salveti 1 participant 1 message Jul 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sudo: set with-rundir to /run/sudo

Set with-rundir to a known path instead of letting configure decide which is the best folder to store the timestamp files. This is required otherwise it might end up at /sudo, which will cause errors on a ro filesystem.

---
 meta/recipes-extended/sudo/sudo_1.9.1.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-extended/sudo/sudo_1.9.1.bb +2 -1
index aac505af60..d6bc1a9c3a 100644
@@ -22,6 +22,7 @@ CACHED_CONFIGUREVARS = " \
 EXTRA_OECONF += " \
              ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
              ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${nonarch_libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
+             --with-rundir=/run/sudo \
              --with-vardir=/var/lib/sudo \
              "
 
@@ -38,7 +39,7 @@ do_install_append () {
 	chmod 0440 ${D}${sysconfdir}/sudoers
 
 	# Explicitly remove the /sudo directory to avoid QA error
-	rmdir -p --ignore-fail-on-non-empty ${D}/sudo
+	rmdir -p --ignore-fail-on-non-empty ${D}/run/sudo
 }
 
 FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
Signature · 1 line
2.27.0