* [PATCH 0/1] Fix multilib conflict of sudo
@ 2020-11-17 3:13 kai
2020-11-17 3:13 ` [PATCH 1/1] sudo: fix multilib conflict kai
0 siblings, 1 reply; 2+ messages in thread
From: kai @ 2020-11-17 3:13 UTC (permalink / raw)
To: openembedded-core; +Cc: ross
From: Kai Kang <kai.kang@windriver.com>
Install plugin libraries to ${libdir} rather than ${libexecdir} to fix
multilib conflict.
Test with user foo. Run sudo successfully after add foo to sudoers.
Kai Kang (1):
sudo: fix multilib conflict
...o.conf.in-fix-conflict-with-multilib.patch | 50 +++++++++++++++++++
meta/recipes-extended/sudo/sudo_1.9.3p1.bb | 6 ++-
2 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] sudo: fix multilib conflict
2020-11-17 3:13 [PATCH 0/1] Fix multilib conflict of sudo kai
@ 2020-11-17 3:13 ` kai
0 siblings, 0 replies; 2+ messages in thread
From: kai @ 2020-11-17 3:13 UTC (permalink / raw)
To: openembedded-core; +Cc: ross
From: Kai Kang <kai.kang@windriver.com>
It fails to install sudo and lib32-sudo at same time:
| Error: Transaction test error:
| file /usr/libexec/sudo/audit_json.so conflicts between attempted
installs of lib32-sudo-1.9.3p1-r0.core2_32 and sudo-1.9.3p1-r0.core2_64
| file /usr/libexec/sudo/group_file.so conflicts between attempted
installs of lib32-sudo-1.9.3p1-r0.core2_32 and sudo-1.9.3p1-r0.core2_64
Pass ${libdir} to configure option --libexecdir of sudo that it installs
plugin libraries to /usr/lib{,64} rather than /usr/libexec/. Then add a
patch to fix multilib conflict of sudo.conf.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
...o.conf.in-fix-conflict-with-multilib.patch | 50 +++++++++++++++++++
meta/recipes-extended/sudo/sudo_1.9.3p1.bb | 6 ++-
2 files changed, 54 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
diff --git a/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch b/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
new file mode 100644
index 0000000000..cfac926731
--- /dev/null
+++ b/meta/recipes-extended/sudo/files/0001-sudo.conf.in-fix-conflict-with-multilib.patch
@@ -0,0 +1,50 @@
+sudo.conf.in: fix conflict with multilib
+
+When pass ${libdir} to --libexecdir of sudo, it fails to install sudo
+and lib32-sudo at same time:
+
+| Error: Transaction test error:
+| file /etc/sudo.conf conflicts between attempted installs of
+ sudo-1.9.3p1-r0.core2_64 and lib32-sudo-1.9.3p1-r0.core2_32
+
+Update the comments in sudo.conf.in to avoid the conflict.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ examples/sudo.conf.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/examples/sudo.conf.in b/examples/sudo.conf.in
+index 19e33ff..af78235 100644
+--- a/examples/sudo.conf.in
++++ b/examples/sudo.conf.in
+@@ -4,7 +4,7 @@
+ # Sudo plugins:
+ # Plugin plugin_name plugin_path plugin_options ...
+ #
+-# The plugin_path is relative to @plugindir@ unless
++# The plugin_path is relative to $plugindir such as /usr/lib/sudo unless
+ # fully qualified.
+ # The plugin_name corresponds to a global symbol in the plugin
+ # that contains the plugin interface structure.
+@@ -50,7 +50,7 @@ Plugin sudoers_audit sudoers.so
+ # The compiled-in value is usually sufficient and should only be changed
+ # if you rename or move the sudo_noexec.so file.
+ #
+-#Path noexec @plugindir@/sudo_noexec.so
++#Path noexec $plugindir/sudo_noexec.so
+
+ #
+ # Sudo plugin directory:
+@@ -59,7 +59,7 @@ Plugin sudoers_audit sudoers.so
+ # The default directory to use when searching for plugins that are
+ # specified without a fully qualified path name.
+ #
+-#Path plugin_dir @plugindir@
++#Path plugin_dir $plugindir
+
+ #
+ # Sudo developer mode:
+--
+2.17.1
+
diff --git a/meta/recipes-extended/sudo/sudo_1.9.3p1.bb b/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
index 08a0fa03a3..ba61a7f247 100644
--- a/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
+++ b/meta/recipes-extended/sudo/sudo_1.9.3p1.bb
@@ -2,6 +2,7 @@ require sudo.inc
SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+ file://0001-sudo.conf.in-fix-conflict-with-multilib.patch \
"
PAM_SRC_URI = "file://sudo.pam"
@@ -24,6 +25,7 @@ EXTRA_OECONF += " \
${@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 \
+ --libexecdir=${libdir} \
"
do_install_append () {
@@ -43,5 +45,5 @@ do_install_append () {
}
FILES_${PN} += "${nonarch_libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
- ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
+FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la \
+ ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la"
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-17 3:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-17 3:13 [PATCH 0/1] Fix multilib conflict of sudo kai
2020-11-17 3:13 ` [PATCH 1/1] sudo: fix multilib conflict kai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox