All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-networking][PATCH] vsftpd: install volatiles file based on init system
@ 2013-12-12 19:00 Joe MacDonald
  2013-12-13 10:33 ` Paul Eggleton
  2014-03-11 16:17 ` Javier Viguera
  0 siblings, 2 replies; 8+ messages in thread
From: Joe MacDonald @ 2013-12-12 19:00 UTC (permalink / raw)
  To: openembedded-devel

The sysvinit populate-volatile.sh scans for volatiles in
/etc/default/volatiles.  systemd expects the same format files to live in
/etc/tmpfiles.d.  Depedning on the DISTRO_FEATURE list, install vsftpd's
volatiles file to the expected location.  While we're here, drop the
creation of the empty ${localstatedir}/run/ hierarchy since they should be
created by the volatiles processing.

Signed-off-by: Joe MacDonald <joe@deserted.net>
---
 meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
index 0698a63..9d82fd7 100644
--- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
+++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
@@ -59,8 +59,13 @@ do_install() {
     install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf
     install -d ${D}${sysconfdir}/init.d/
     install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd
-    install -d ${D}/${sysconfdir}/default/volatiles
-    install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd
+    if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}/${sysconfdir}/tmpfiles.d
+        install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/tmpfiles.d/99_vsftpd
+    else
+        install -d ${D}/${sysconfdir}/default/volatiles
+        install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd
+    fi
 
     install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/
     install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/
@@ -70,7 +75,6 @@ do_install() {
         sed -i "s:/lib/security:${base_libdir}/security:" ${D}${sysconfdir}/pam.d/vsftpd
         sed -i "s:ftpusers:vsftpd.ftpusers:" ${D}${sysconfdir}/pam.d/vsftpd
     fi
-    install -d ${D}${localstatedir}/run/vsftpd/empty
 }
 
 INITSCRIPT_PACKAGES = "${PN}"
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [meta-networking][PATCH] vsftpd: install volatiles file based on init system
  2013-12-12 19:00 [meta-networking][PATCH] vsftpd: install volatiles file based on init system Joe MacDonald
@ 2013-12-13 10:33 ` Paul Eggleton
  2013-12-13 14:34   ` Joe MacDonald
  2014-03-11 16:17 ` Javier Viguera
  1 sibling, 1 reply; 8+ messages in thread
From: Paul Eggleton @ 2013-12-13 10:33 UTC (permalink / raw)
  To: Joe MacDonald; +Cc: openembedded-devel

Hi Joe,

On Thursday 12 December 2013 14:00:57 Joe MacDonald wrote:
> The sysvinit populate-volatile.sh scans for volatiles in
> /etc/default/volatiles.  systemd expects the same format files to live in
> /etc/tmpfiles.d.  Depedning on the DISTRO_FEATURE list, install vsftpd's
> volatiles file to the expected location.  While we're here, drop the
> creation of the empty ${localstatedir}/run/ hierarchy since they should be
> created by the volatiles processing.
> 
> Signed-off-by: Joe MacDonald <joe@deserted.net>
> ---
>  meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb |   10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb index
> 0698a63..9d82fd7 100644
> --- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> @@ -59,8 +59,13 @@ do_install() {
>      install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf
>      install -d ${D}${sysconfdir}/init.d/
>      install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd
> -    install -d ${D}/${sysconfdir}/default/volatiles
> -    install -m 644 ${WORKDIR}/volatiles.99_vsftpd
> ${D}/${sysconfdir}/default/volatiles/99_vsftpd +    if
> ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then +
>        install -d ${D}/${sysconfdir}/tmpfiles.d
> +        install -m 644 ${WORKDIR}/volatiles.99_vsftpd
> ${D}/${sysconfdir}/tmpfiles.d/99_vsftpd +    else
> +        install -d ${D}/${sysconfdir}/default/volatiles
> +        install -m 644 ${WORKDIR}/volatiles.99_vsftpd
> ${D}/${sysconfdir}/default/volatiles/99_vsftpd +    fi
> 
>      install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/
>      install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/
> @@ -70,7 +75,6 @@ do_install() {
>          sed -i "s:/lib/security:${base_libdir}/security:"
> ${D}${sysconfdir}/pam.d/vsftpd sed -i "s:ftpusers:vsftpd.ftpusers:"
> ${D}${sysconfdir}/pam.d/vsftpd fi
> -    install -d ${D}${localstatedir}/run/vsftpd/empty
>  }
> 
>  INITSCRIPT_PACKAGES = "${PN}"

I think there might be a problem with this: the DISTRO_FEATURES options aren't 
mutually exclusive - both can be enabled at the same time (usually where you 
want sysvinit for some rescue/initramfs image and systemd for the main image).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-networking][PATCH] vsftpd: install volatiles file based on init system
  2013-12-13 10:33 ` Paul Eggleton
@ 2013-12-13 14:34   ` Joe MacDonald
  2013-12-13 14:45     ` Paul Eggleton
  0 siblings, 1 reply; 8+ messages in thread
From: Joe MacDonald @ 2013-12-13 14:34 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 3841 bytes --]

[Re: [oe] [meta-networking][PATCH] vsftpd: install volatiles file based on init system] On 13.12.13 (Fri 10:33) Paul Eggleton wrote:

> Hi Joe,
> 
> On Thursday 12 December 2013 14:00:57 Joe MacDonald wrote:
> > The sysvinit populate-volatile.sh scans for volatiles in
> > /etc/default/volatiles.  systemd expects the same format files to live in
> > /etc/tmpfiles.d.  Depedning on the DISTRO_FEATURE list, install vsftpd's
> > volatiles file to the expected location.  While we're here, drop the
> > creation of the empty ${localstatedir}/run/ hierarchy since they should be
> > created by the volatiles processing.
> > 
> > Signed-off-by: Joe MacDonald <joe@deserted.net>
> > ---
> >  meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb |   10 +++++++---
> >  1 file changed, 7 insertions(+), 3 deletions(-)
> > 
> > diff --git a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> > b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb index
> > 0698a63..9d82fd7 100644
> > --- a/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> > +++ b/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.0.bb
> > @@ -59,8 +59,13 @@ do_install() {
> >      install -m 600 ${WORKDIR}/vsftpd.conf ${D}${sysconfdir}/vsftpd.conf
> >      install -d ${D}${sysconfdir}/init.d/
> >      install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/vsftpd
> > -    install -d ${D}/${sysconfdir}/default/volatiles
> > -    install -m 644 ${WORKDIR}/volatiles.99_vsftpd
> > ${D}/${sysconfdir}/default/volatiles/99_vsftpd +    if
> > ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then +
> >        install -d ${D}/${sysconfdir}/tmpfiles.d
> > +        install -m 644 ${WORKDIR}/volatiles.99_vsftpd
> > ${D}/${sysconfdir}/tmpfiles.d/99_vsftpd +    else
> > +        install -d ${D}/${sysconfdir}/default/volatiles
> > +        install -m 644 ${WORKDIR}/volatiles.99_vsftpd
> > ${D}/${sysconfdir}/default/volatiles/99_vsftpd +    fi
> > 
> >      install -m 600 ${WORKDIR}/vsftpd.ftpusers ${D}${sysconfdir}/
> >      install -m 600 ${WORKDIR}/vsftpd.user_list ${D}${sysconfdir}/
> > @@ -70,7 +75,6 @@ do_install() {
> >          sed -i "s:/lib/security:${base_libdir}/security:"
> > ${D}${sysconfdir}/pam.d/vsftpd sed -i "s:ftpusers:vsftpd.ftpusers:"
> > ${D}${sysconfdir}/pam.d/vsftpd fi
> > -    install -d ${D}${localstatedir}/run/vsftpd/empty
> >  }
> > 
> >  INITSCRIPT_PACKAGES = "${PN}"
> 
> I think there might be a problem with this: the DISTRO_FEATURES options aren't 
> mutually exclusive - both can be enabled at the same time (usually where you 
> want sysvinit for some rescue/initramfs image and systemd for the main image).

Hey Paul,

That's a good point and I probably should've at least made mention of it
in my email.  I'd thought about it (thought I try to only have either
sysvinit or systemd enabled in a configuration at a time, multiple init
systems running concurrently make my teeth itch) but I had thought that
in this case vsftpd would only be relying on one of them (preferring
systemd if available) to create the volatiles.  Since I try very hard
not to be in the scenario where I include both, though, I could be
overlooking a case here.  Do you think I should be doing something more
like this:

 62    if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
 63        install -d ${D}/${sysconfdir}/tmpfiles.d
 64        install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/tmpfiles.d/99_vsftpd
 65    fi
 66    if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
 67        install -d ${D}/${sysconfdir}/default/volatiles
 68        install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd
 69    fi

-- 
-Joe MacDonald.
:wq

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-networking][PATCH] vsftpd: install volatiles file based on init system
  2013-12-13 14:34   ` Joe MacDonald
@ 2013-12-13 14:45     ` Paul Eggleton
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2013-12-13 14:45 UTC (permalink / raw)
  To: Joe MacDonald; +Cc: openembedded-devel

On Friday 13 December 2013 09:34:36 Joe MacDonald wrote:
> [Re: [oe] [meta-networking][PATCH] vsftpd: install volatiles file based on init system] On 13.12.13 (Fri 10:33) Paul Eggleton wrote:
> > I think there might be a problem with this: the DISTRO_FEATURES options
> > aren't mutually exclusive - both can be enabled at the same time (usually
> > where you want sysvinit for some rescue/initramfs image and systemd for
> > the main image).
> 
> That's a good point and I probably should've at least made mention of it
> in my email.  I'd thought about it (thought I try to only have either
> sysvinit or systemd enabled in a configuration at a time, multiple init
> systems running concurrently make my teeth itch) but I had thought that
> in this case vsftpd would only be relying on one of them (preferring
> systemd if available) to create the volatiles.  Since I try very hard
> not to be in the scenario where I include both, though, I could be
> overlooking a case here.  Do you think I should be doing something more
> like this:
> 
> 62    if ${@base_contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
> 63        install -d ${D}/${sysconfdir}/tmpfiles.d
> 64        install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/tmpfiles.d/99_vsftpd
> 65    fi
> 66    if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
> 67        install -d ${D}/${sysconfdir}/default/volatiles
> 68        install -m 644 ${WORKDIR}/volatiles.99_vsftpd ${D}/${sysconfdir}/default/volatiles/99_vsftpd
> 69    fi

Assuming it's OK to have both of these when both options are on (I haven't
tried it myself), that would seem to be the right thing to do.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-networking][PATCH] vsftpd: install volatiles file based on init system
  2013-12-12 19:00 [meta-networking][PATCH] vsftpd: install volatiles file based on init system Joe MacDonald
  2013-12-13 10:33 ` Paul Eggleton
@ 2014-03-11 16:17 ` Javier Viguera
  2014-03-11 17:05   ` Joe MacDonald
  1 sibling, 1 reply; 8+ messages in thread
From: Javier Viguera @ 2014-03-11 16:17 UTC (permalink / raw)
  To: openembedded-devel

Hi all,

Was this patch finally merged?

At the moment building *vsftpd* in a sysvinit-based system is *broken*. 
The failure is:

ERROR: QA Issue: vsftpd: Files/directories were installed but not shipped
   /run
   /run/vsftpd
   /run/vsftpd/empty
ERROR: QA run found fatal errors. Please consider fixing them.

In such sysvinit systems, '/run' usually is a TMPFS and 
'/run/vsftpd/empty' is created at *runtime* via volatiles bootscript.

Creating the directory in the recipe at build time leads to the above 
mentioned error.

-
Javier Viguera
Software Engineer
Digi International® Spain S.A.U.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-networking][PATCH] vsftpd: install volatiles file based on init system
  2014-03-11 16:17 ` Javier Viguera
@ 2014-03-11 17:05   ` Joe MacDonald
  2014-03-11 17:40     ` Javier Viguera
  0 siblings, 1 reply; 8+ messages in thread
From: Joe MacDonald @ 2014-03-11 17:05 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]

[Re: [oe] [meta-networking][PATCH] vsftpd: install volatiles file based on init system] On 14.03.11 (Tue 17:17) Javier Viguera wrote:

> Hi all,
> 
> Was this patch finally merged?

Sorry, no, not yet.  At the end of the thread I think I had a workable
solution but I've not merged the result.  If you have an updated patch
that addresses all of the systemd/sysvinit/systemd+sysvinit
combinations, I'll be happy to merge it instead of my work.

-J.

> 
> At the moment building *vsftpd* in a sysvinit-based system is *broken*. The
> failure is:
> 
> ERROR: QA Issue: vsftpd: Files/directories were installed but not shipped
>   /run
>   /run/vsftpd
>   /run/vsftpd/empty
> ERROR: QA run found fatal errors. Please consider fixing them.
> 
> In such sysvinit systems, '/run' usually is a TMPFS and '/run/vsftpd/empty'
> is created at *runtime* via volatiles bootscript.
> 
> Creating the directory in the recipe at build time leads to the above
> mentioned error.
> 
> -
> Javier Viguera
> Software Engineer
> Digi International® Spain S.A.U.
-- 
-Joe MacDonald.
:wq

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-networking][PATCH] vsftpd: install volatiles file based on init system
  2014-03-11 17:05   ` Joe MacDonald
@ 2014-03-11 17:40     ` Javier Viguera
  2014-03-14 12:47       ` Joe MacDonald
  0 siblings, 1 reply; 8+ messages in thread
From: Javier Viguera @ 2014-03-11 17:40 UTC (permalink / raw)
  To: openembedded-devel

Hi Joe,

On 11/03/14 18:05, Joe MacDonald wrote:
> Sorry, no, not yet.  At the end of the thread I think I had a workable
> solution but I've not merged the result.  If you have an updated patch
> that addresses all of the systemd/sysvinit/systemd+sysvinit
> combinations, I'll be happy to merge it instead of my work.

Unfortunately I have never played with *systemd*, so i don't have a 
patch handy.

At the moment in my custom BSP layer i have workarounded it creating a 
bbappend with just:

INSANE_SKIP_${PN} = "installed-vs-shipped"

I know this is not the proper fix but at least it allows me to complete 
the build. Otherwise it fails.

-
Javier Viguera
Software Engineer
Digi International® Spain S.A.U.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [meta-networking][PATCH] vsftpd: install volatiles file based on init system
  2014-03-11 17:40     ` Javier Viguera
@ 2014-03-14 12:47       ` Joe MacDonald
  0 siblings, 0 replies; 8+ messages in thread
From: Joe MacDonald @ 2014-03-14 12:47 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

[Re: [oe] [meta-networking][PATCH] vsftpd: install volatiles file based on init system] On 14.03.11 (Tue 18:40) Javier Viguera wrote:

> Hi Joe,
> 
> On 11/03/14 18:05, Joe MacDonald wrote:
> >Sorry, no, not yet.  At the end of the thread I think I had a workable
> >solution but I've not merged the result.  If you have an updated patch
> >that addresses all of the systemd/sysvinit/systemd+sysvinit
> >combinations, I'll be happy to merge it instead of my work.
> 
> Unfortunately I have never played with *systemd*, so i don't have a patch
> handy.
> 
> At the moment in my custom BSP layer i have workarounded it creating a
> bbappend with just:
> 
> INSANE_SKIP_${PN} = "installed-vs-shipped"
> 
> I know this is not the proper fix but at least it allows me to complete the
> build. Otherwise it fails.

Understood.  I'll finish up my version that is intended to address the
other combinations as soon as I can and I'll follow up so you know the
status.

-- 
-Joe MacDonald.
:wq

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-14 12:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-12 19:00 [meta-networking][PATCH] vsftpd: install volatiles file based on init system Joe MacDonald
2013-12-13 10:33 ` Paul Eggleton
2013-12-13 14:34   ` Joe MacDonald
2013-12-13 14:45     ` Paul Eggleton
2014-03-11 16:17 ` Javier Viguera
2014-03-11 17:05   ` Joe MacDonald
2014-03-11 17:40     ` Javier Viguera
2014-03-14 12:47       ` Joe MacDonald

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.