[OE-core] [PATCH] nfs-utils: add runtime depends for nfs-export-root

2018-08-10 Thread Dengke Du
When DISTRO_FEATURE enable "systemd", the nfs-server.service in nfs-utils
depends on /etc/exports, but the file "/etc/exports" installed by package
nfs-export-root. Otherwise the service would failed.

So we should add the runtime depends for nfs-export-root.

Signed-off-by: Dengke Du 
---
 meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb 
b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb
index 6d450c7..581f334 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
 # util-linux for libblkid
 DEPENDS = "libcap libevent util-linux sqlite3 libtirpc"
 RDEPENDS_${PN} = "${PN}-client bash"
+RDEPENDS_${PN}_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 
'nfs-export-root', '' ,d)}"
 RRECOMMENDS_${PN} = "kernel-module-nfsd"
 
 inherit useradd
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] nfs-utils: add runtime depends for nfs-export-root

2018-08-11 Thread Richard Purdie
On Fri, 2018-08-10 at 17:38 +0800, Dengke Du wrote:
> When DISTRO_FEATURE enable "systemd", the nfs-server.service in nfs-
> utils
> depends on /etc/exports, but the file "/etc/exports" installed by
> package
> nfs-export-root. Otherwise the service would failed.
> 
> So we should add the runtime depends for nfs-export-root.
> 
> Signed-off-by: Dengke Du 
> ---
>  meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb | 1 +
>  1 file changed, 1 insertion(+)

I suspect that this may in fact be a feature, you enable the nfs server
by adding nfs-export-root to the image. The behaviour may therefore be
intended as not everyone installing nfs-utils wants a server. We should
perhaps better document that.

Also, when using sysvinit does this recipe generate an init script
which starts an nfs-server?

Cheers,

Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] nfs-utils: add runtime depends for nfs-export-root

2018-08-12 Thread Dengke Du



On 2018年08月11日 17:33, Richard Purdie wrote:

On Fri, 2018-08-10 at 17:38 +0800, Dengke Du wrote:

When DISTRO_FEATURE enable "systemd", the nfs-server.service in nfs-
utils
depends on /etc/exports, but the file "/etc/exports" installed by
package
nfs-export-root. Otherwise the service would failed.

So we should add the runtime depends for nfs-export-root.

Signed-off-by: Dengke Du 
---
  meta/recipes-connectivity/nfs-utils/nfs-utils_2.3.1.bb | 1 +
  1 file changed, 1 insertion(+)

I suspect that this may in fact be a feature, you enable the nfs server
by adding nfs-export-root to the image. The behaviour may therefore be
intended as not everyone installing nfs-utils wants a server. We should
perhaps better document that.


Yes, when enable IMAGE_FEATURE nfs-server, we install the 
nfs-server.service,
when not enable nfs-server, we don't install the nfs-server.service, 
otherwise

we install the nfs-utils, install the nfs-server.



Also, when using sysvinit does this recipe generate an init script
which starts an nfs-server?


Yes, this bb would generate an init script for sysvinit, I should let 
the nfs-export-root

working for sysvinit else.



Cheers,

Richard



--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core