Skip to contentSkip to conversation

webmin: remove nfsd check from exports-lib.pl

PATCH Applied Kevin Strasser 2 participants 2 messages Aug 2, 2012 – Aug 6, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 webmin: remove nfsd check from exports-lib.pl

Webmin expects the userspace version of nsfd and attempts to find its pid when applying a new set of nfs exports. This check fails because baryon is configured to install the kernelspace version. In result the command that is assigned to apply_cmd will never be executed, and the contents of /exports are not successfully exported.

Fixes [YOCTO #1719]

---
 recipes-extended/webmin/files/exports-lib.pl.patch |   32 ++++++++++++++++++++
 recipes-extended/webmin/webmin_1.570.bb            |    3 +-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 recipes-extended/webmin/files/exports-lib.pl.patch
recipes-extended/webmin/files/exports-lib.pl.patch new file +32 -0
new file mode 100644
index 0000000..140ae7e
@@ -0,0 +1,32 @@
+From 7eba4c98c6953fa6ea76c1620d19524bcfa3a576 Mon Sep 17 00:00:00 2001
+From: Kevin Strasser <[email protected]>
+Date: Wed, 1 Aug 2012 11:51:26 -0700
+Subject: [PATCH] nfs export: remove nfsd check
+
+nfsd runs as a kernel process and does not have a pid. This means
+that the command assigned to apply_cmd will never be executed when
+the user tries to apply changes to nfs exports.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Kevin Strasser <[email protected]>
+---
+ exports/exports-lib.pl |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/exports/exports-lib.pl b/exports/exports-lib.pl
+index 22891c0..1c67494 100755
+--- a/exports/exports-lib.pl
++++ b/exports/exports-lib.pl
+@@ -273,7 +273,7 @@ return !&has_command("rpc.nfsd") && !&has_command("nfsd") &&
+ sub restart_mountd
+ {
+ # Try exportfs -r first
+-if ($config{'apply_cmd'} && &find_byname("nfsd") && &find_byname("mountd")) {
++if ($config{'apply_cmd'} && &find_byname("mountd")) {
+ 	local $out = &backquote_logged("$config{'apply_cmd'} 2>&1 </dev/null");
+ 	if (!$? && $out !~ /invalid|error|failed/i) {
+ 		# Looks like it worked!
+-- 
+1.7.9.5
+
recipes-extended/webmin/webmin_1.570.bb +2 -1
index b6c4965..8cda8f0 100644
@@ -9,7 +9,7 @@ RDEPENDS_${PN} += "perl-module-warnings perl-module-warnings-register perl-modul
 RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant"
 RDEPENDS_${PN} += "perl-module-file perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-timelocal perl-module-feature"
 
-PR = "r11"
+PR = "r12"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
           file://setup.sh \
@@ -19,6 +19,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
           file://remove-startup-option.patch \
           file://disable-version-check.patch \
           file://nfs-export.patch \
+          file://exports-lib.pl.patch \
           file://mount-excludefs.patch \
           file://samba-config-fix.patch \
           file://proftpd-config-fix.patch \
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 81 lines · On Thursday 02 August 2012 10:20:13 Kevin Strasser wrote:

Webmin expects the userspace version of nsfd and attempts to find its pid when applying a new set of nfs exports. This check fails because baryon is configured to install the kernelspace version. In result the command that is assigned to apply_cmd will never be executed, and the contents of /exports are not successfully exported.

Fixes [YOCTO #1719]

---
 recipes-extended/webmin/files/exports-lib.pl.patch |   32
++++++++++++++++++++ recipes-extended/webmin/webmin_1.570.bb            |  
 3 +-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 recipes-extended/webmin/files/exports-lib.pl.patch
(quoted diff) +0 -0

b/recipes-extended/webmin/files/exports-lib.pl.patch new file mode 100644 index 0000000..140ae7e

recipes-extended/webmin/files/exports-lib.pl.patch new file +21 -0
@@ -0,0 +1,32 @@
+From 7eba4c98c6953fa6ea76c1620d19524bcfa3a576 Mon Sep 17 00:00:00 2001
+From: Kevin Strasser <[email protected]>
+Date: Wed, 1 Aug 2012 11:51:26 -0700
+Subject: [PATCH] nfs export: remove nfsd check
+
+nfsd runs as a kernel process and does not have a pid. This means
+that the command assigned to apply_cmd will never be executed when
+the user tries to apply changes to nfs exports.
+
+Upstream-Status: Inappropriate [config]
+
+Signed-off-by: Kevin Strasser <[email protected]>
+---
+ exports/exports-lib.pl |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/exports/exports-lib.pl b/exports/exports-lib.pl
+index 22891c0..1c67494 100755
+--- a/exports/exports-lib.pl
++++ b/exports/exports-lib.pl
+@@ -273,7 +273,7 @@ return !&has_command("rpc.nfsd") &&

!&has_command("nfsd") && + sub restart_mountd
+ {
+ # Try exportfs -r first
+-if ($config{'apply_cmd'} && &find_byname("nfsd") && &find_byname("mountd")) { ++if ($config{'apply_cmd'} && &find_byname("mountd")) {

recipes-extended/webmin/files/exports-lib.pl.patch new file +6 -0
+ 	local $out = &backquote_logged("$config{'apply_cmd'} 2>&1 </dev/null");
+ 	if (!$? && $out !~ /invalid|error|failed/i) {
+ 		# Looks like it worked!
+--
+1.7.9.5
+
(quoted diff) +0 -0

b/recipes-extended/webmin/webmin_1.570.bb index b6c4965..8cda8f0 100644

recipes-extended/webmin/webmin_1.570.bb +0 -0
@@ -9,7 +9,7 @@ RDEPENDS_${PN} += "perl-module-warnings

perl-module-warnings-register perl-modul RDEPENDS_${PN} += "perl-module-fcntl perl-module-tie-hash perl-module-vars perl-module-time-local perl-module-config perl-module-constant" RDEPENDS_${PN} += "perl-module-file perl-module-file-glob perl-module-file-copy perl-module-sdbm perl-module-sdbm-file perl-module-timelocal perl-module-feature"

recipes-extended/webmin/webmin_1.570.bb +2 -1
-PR = "r11"
+PR = "r12"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
           file://setup.sh \
@@ -19,6 +19,7 @@ SRC_URI =
 "${SOURCEFORGE_MIRROR}/webadmin/webmin-${PV}.tar.gz \
 file://remove-startup-option.patch \
           file://disable-version-check.patch \
           file://nfs-export.patch \
+          file://exports-lib.pl.patch \
           file://mount-excludefs.patch \
           file://samba-config-fix.patch \
Quoted 1 line
           file://proftpd-config-fix.patch \

Merged to meta-baryon (with a typo fix nsfd -> nfsd in the commit message), thanks.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre