[OE-core] [PATCH] openssh: Wait for local-fs before generating host keys
Currently, the sshdgenkeys.service wait for the host keys default paths /var and /run. The service runs a script which picks up the host key paths from the sshd_config which means that the paths are configurable and can potentially be placed outside /var and /run. This patch makes sshdgenkeys.service wait for /etc/fstab to be mounted and which should include alternative host keys paths. The requirement for /var and /run is left for backwards compatibility. Signed-off-by: Mattias Hansson --- meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service index fd81793d51..44831c9955 100644 --- a/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service +++ b/meta/recipes-connectivity/openssh/openssh/sshdgenkeys.service @@ -1,6 +1,8 @@ [Unit] Description=OpenSSH Key Generation +Requires=local-fs.target RequiresMountsFor=/var /run +After=local-fs.target [Service] ExecStart=@LIBEXECDIR@/sshd_check_keys -- 2.31.0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#149923): https://lists.openembedded.org/g/openembedded-core/message/149923 Mute This Topic: https://lists.openembedded.org/mt/81598424/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH] base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot
On Tue, Oct 15, 2019 at 10:27:27AM +0200, Richard Purdie wrote: > On Tue, 2019-10-15 at 10:00 +0200, Mattias Hansson wrote: > > do_prepare_recipe_sysroot may perform groupadd, which requires pseudo. > > However, do_prepare_recipe_sysroot does not depend on pseudo explicitly, > > which sometimes causes a build error when building a recipe that adds > > groups. > > > > This issue only occurs when executing do_prepare_recipe_sysroot for a > > recipe that adds groups before finishing a task that depends on pseudo > > for a recipe that doesn't add groups. > > > > Signed-off-by: Mattias Hansson > > --- > > meta/classes/base.bbclass | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass > > index d3184ecf7b..1cea3a2213 100644 > > --- a/meta/classes/base.bbclass > > +++ b/meta/classes/base.bbclass > > @@ -482,6 +482,7 @@ python () { > > # If we're building a target package we need to use fakeroot (pseudo) > > # in order to capture permissions, owners, groups and special files > > if not bb.data.inherits_class('native', d) and not > > bb.data.inherits_class('cross', d): > > +d.appendVarFlag('do_prepare_recipe_sysroot', 'depends', ' > > virtual/fakeroot-native:do_populate_sysroot') > > d.setVarFlag('do_unpack', 'umask', '022') > > d.setVarFlag('do_configure', 'umask', '022') > > d.setVarFlag('do_compile', 'umask', '022') > > This was posted once already and the answer is still no, we do not want > to add pseudo as a dependency for all sysroot construction. IO under > pseudo is much slower and this is a very IO intensive task so it would > hurt performance and isn't necessary in most cases. > > I appreciate its harder but we need to find a better more targeted way > to solve this and some of the other related pseudo issues for inter > dependent user/groups. > > Cheers, > > RIchard > Sorry for the confusion, but this is a different patch. The previous forced do_prepare_recipe_sysroot to run in a fakerooted environment. This caused a performance degrade and was therefore rejected, if I understood you correctly. This patch will only declare fakeroot-native as a dependency and only cause pseudo to be available during do_prepare_recipe_sysroot. This should not cause the task to run in a fakerooted environment, is this a valid assumption? /Mattias -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot
do_prepare_recipe_sysroot may perform groupadd, which requires pseudo. However, do_prepare_recipe_sysroot does not depend on pseudo explicitly, which sometimes causes a build error when building a recipe that adds groups. This issue only occurs when executing do_prepare_recipe_sysroot for a recipe that adds groups before finishing a task that depends on pseudo for a recipe that doesn't add groups. Signed-off-by: Mattias Hansson --- meta/classes/base.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index d3184ecf7b..1cea3a2213 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -482,6 +482,7 @@ python () { # If we're building a target package we need to use fakeroot (pseudo) # in order to capture permissions, owners, groups and special files if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): +d.appendVarFlag('do_prepare_recipe_sysroot', 'depends', ' virtual/fakeroot-native:do_populate_sysroot') d.setVarFlag('do_unpack', 'umask', '022') d.setVarFlag('do_configure', 'umask', '022') d.setVarFlag('do_compile', 'umask', '022') -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot
On Fri, Aug 16, 2019 at 11:13:29AM +0200, Mattias Hansson wrote: > do_prepare_recipe_sysroot may perform groupadd, which requires pseudo. > However, do_prepare_recipe_sysroot does not depend on pseudo explicitly, > which sometimes causes a build error when building a recipe that adds > groups. > > This issue only occurs when executing do_prepare_recipe_sysroot for a > recipe that adds groups before finishing a task that depends on pseudo > for a recipe that doesn't add groups. > > Signed-off-by: Mattias Hansson > --- > meta/classes/base.bbclass | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass > index 0c8a4b2862..0576b110c9 100644 > --- a/meta/classes/base.bbclass > +++ b/meta/classes/base.bbclass > @@ -480,6 +480,7 @@ python () { > # If we're building a target package we need to use fakeroot (pseudo) > # in order to capture permissions, owners, groups and special files > if not bb.data.inherits_class('native', d) and not > bb.data.inherits_class('cross', d): > +d.setVarFlag('do_prepare_recipe_sysroot', 'fakeroot', '1') > d.setVarFlag('do_unpack', 'umask', '022') > d.setVarFlag('do_configure', 'umask', '022') > d.setVarFlag('do_compile', 'umask', '022') > -- > 2.11.0 > Ping. Just a friendly reminder for someone to take a look at this. /Mattias -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] base.bbclass: add dependency on pseudo from do_prepare_recipe_sysroot
do_prepare_recipe_sysroot may perform groupadd, which requires pseudo. However, do_prepare_recipe_sysroot does not depend on pseudo explicitly, which sometimes causes a build error when building a recipe that adds groups. This issue only occurs when executing do_prepare_recipe_sysroot for a recipe that adds groups before finishing a task that depends on pseudo for a recipe that doesn't add groups. Signed-off-by: Mattias Hansson --- meta/classes/base.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 0c8a4b2862..0576b110c9 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -480,6 +480,7 @@ python () { # If we're building a target package we need to use fakeroot (pseudo) # in order to capture permissions, owners, groups and special files if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d): +d.setVarFlag('do_prepare_recipe_sysroot', 'fakeroot', '1') d.setVarFlag('do_unpack', 'umask', '022') d.setVarFlag('do_configure', 'umask', '022') d.setVarFlag('do_compile', 'umask', '022') -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core