Patchwork Automatic update of FILES_${PN} by sysvinit?

login
register
mail settings
Submitter Mikael Jansson
Date July 2, 2014, 8:07 a.m.
Message ID <CAKtGAmWcQs-cyukQJ8PS_q7+hrKmxBK1GDVyZf_Ynj2HqF3Xmw@mail.gmail.com>
Download mbox | patch
Permalink /patch/366285/
State New
Headers show

Comments

Mikael Jansson - July 2, 2014, 8:07 a.m.
>
> Adding openssh to my rootfs, /etc/rcS.d/25sshd wasn't rstaged in my
> rootfs. After reading sysvinit.oeclass, I found this line was missing:
>
>   SYSVINIT_SCRIPT_sshd = "sshd"
>
> Added, but the file still wasn't rstaged. Apparently, you need to
> explicitly list the symlink(s) created by sysvinit's do_install postfunc in
> your FILES_${PN}.
>
>
My bad - it was indeed created, but since I didn't have S25sshd in my
FILES_${PN}, I didn't see it. I expected it to be automatically added to
FILES_${PN} by sysvinit.oeclass.

There is still a bug in openssh.inc though:



Isn't the entire point of convenience classes like sysvinit.oeclass to not
> have to think about the details?  Because otherwise, in practice,
> sysvinit.oeclass is just a very verbose and convoluted way of wriing:
>
>   install -m 0755 ${SRCDIR}/sshd ${D}${sysconfdir}/init.d/sshd
>   ln -sf ../init.d/sshd ${D}${sysconfdir}/init.d/S25sshd
>
> ...since I still need to know exactly what sysvinit.oeclass does in order
> to add the results to my FILES_${PN}. I fail to see the point of using a
> semi-automatic helper that just complicates things.
>
> Something I have misunderstood? Comments?
>

This point (from my point of view) is still valid.

- Micke

Patch

--- a/recipes/openssh/openssh.inc
+++ b/recipes/openssh/openssh.inc
@@ -75,6 +75,7 @@  ALLOW_EMPTY_${PN} = "1"
 FILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config ${bindir}/slogin"
 FILES_${PN}-ssh-doc = "${mandir}/*/ssh_config.* ${mandir}/*/slogin.*"
 FILES_${PN}-sshd = "${sysconfdir}/init.d/sshd \
+       ${sysconfdir}/rc?.d/???sshd \
        ${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config \
        ${localstatedir}/run/sshd"
 FILES_${PN}-sshd-doc = "${mandir}/*/moduli.* ${mandir}/*/sshd_config.*"