Message ID | 20211216083115.417282-2-jk@codeconstruct.com.au |
---|---|
State | New |
Headers | show |
Series | [meta-networking,1/2] mctp: upgrade to 18e45b42 | expand |
On Thu, Dec 16, 2021 at 12:32 AM Jeremy Kerr <jk@codeconstruct.com.au> wrote: > > mctpd ships with an example dbus service configuration, so install in > the dbus system configuration dir. > > Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> > --- > meta-networking/recipes-support/mctp/mctp_git.bb | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/meta-networking/recipes-support/mctp/mctp_git.bb b/meta-networking/recipes-support/mctp/mctp_git.bb > index 6cc5b1480..9c440b6d4 100644 > --- a/meta-networking/recipes-support/mctp/mctp_git.bb > +++ b/meta-networking/recipes-support/mctp/mctp_git.bb > @@ -24,10 +24,18 @@ PACKAGECONFIG ??= " \ > PACKAGECONFIG[systemd] = ",,systemd,libsystemd" > SYSTEMD_SERVICE:${PN} = "mctpd.service" > > +FILES:${PN} += " \ > + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \ > + '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \ > +" > + this should go below do_install and other functions. You can run ./contrib/oe-stylize.py also to get some help on formatting > do_install:append () { > if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then > install -d ${D}${systemd_system_unitdir} > install -m 0644 ${S}/conf/mctpd.service \ > ${D}${systemd_system_unitdir}/mctpd.service > + install -d ${D}${datadir}/dbus-1/system.d > + install -m 0644 ${S}/conf/mctpd-dbus.conf \ > + ${D}${datadir}/dbus-1/system.d/mctpd.conf > fi > } > -- > 2.33.0 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#94382): https://lists.openembedded.org/g/openembedded-devel/message/94382 > Mute This Topic: https://lists.openembedded.org/mt/87763264/1997914 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Hi Khem, > > +FILES:${PN} += " \ > > + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \ > > + '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \ > > +" > > + > > this should go below do_install and other functions. OK, can do! I'll send a v2 shortly. > You can run ./contrib/oe-stylize.py also to get some help on > formatting Hm, that seems to make a bit of a mess of the recipe - it moves a bunch of variable declarations to within the do_install:append() block. I'm no expert on the full syntax, but something like this might fix it: diff --git a/contrib/oe-stylize.py b/contrib/oe-stylize.py index e1ba1b321..eac096a80 100755 --- a/contrib/oe-stylize.py +++ b/contrib/oe-stylize.py @@ -211,7 +211,7 @@ OE_vars = [ ] varRegexp = r'^([a-zA-Z_0-9${}-]*)([ \t]*)([+.:]?=[+.]?)([ \t]*)([^\t]+)' -routineRegexp = r'^([a-zA-Z0-9_ ${}-]+?)\(' +routineRegexp = r'^([a-zA-Z0-9_ ${}:-]+?)\(' # Variables seen in the processed .bb seen_vars = {} - I can send that as a proper patch if that's the correct approach. Cheers, Jeremy
On Thu, Dec 16, 2021 at 5:57 PM Jeremy Kerr <jk@codeconstruct.com.au> wrote: > Hi Khem, > > > > +FILES:${PN} += " \ > > > + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \ > > > + '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \ > > > +" > > > + > > > > this should go below do_install and other functions. > > OK, can do! I'll send a v2 shortly. > > > You can run ./contrib/oe-stylize.py also to get some help on > > formatting > > Hm, that seems to make a bit of a mess of the recipe - it moves a bunch > of variable declarations to within the do_install:append() block. > > I'm no expert on the full syntax, but something like this might fix it: > > diff --git a/contrib/oe-stylize.py b/contrib/oe-stylize.py > index e1ba1b321..eac096a80 100755 > --- a/contrib/oe-stylize.py > +++ b/contrib/oe-stylize.py > @@ -211,7 +211,7 @@ OE_vars = [ > ] > > varRegexp = r'^([a-zA-Z_0-9${}-]*)([ \t]*)([+.:]?=[+.]?)([ \t]*)([^\t]+)' > -routineRegexp = r'^([a-zA-Z0-9_ ${}-]+?)\(' > +routineRegexp = r'^([a-zA-Z0-9_ ${}:-]+?)\(' > > # Variables seen in the processed .bb > seen_vars = {} > > > - I can send that as a proper patch if that's the correct approach. > This seems fine we have new override operator and stylize script needs adjusting > Cheers, > > > Jeremy >
diff --git a/meta-networking/recipes-support/mctp/mctp_git.bb b/meta-networking/recipes-support/mctp/mctp_git.bb index 6cc5b1480..9c440b6d4 100644 --- a/meta-networking/recipes-support/mctp/mctp_git.bb +++ b/meta-networking/recipes-support/mctp/mctp_git.bb @@ -24,10 +24,18 @@ PACKAGECONFIG ??= " \ PACKAGECONFIG[systemd] = ",,systemd,libsystemd" SYSTEMD_SERVICE:${PN} = "mctpd.service" +FILES:${PN} += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', \ + '${datadir}/dbus-1/system.d/mctpd.conf', '', d)} \ +" + do_install:append () { if ${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'true', 'false', d)}; then install -d ${D}${systemd_system_unitdir} install -m 0644 ${S}/conf/mctpd.service \ ${D}${systemd_system_unitdir}/mctpd.service + install -d ${D}${datadir}/dbus-1/system.d + install -m 0644 ${S}/conf/mctpd-dbus.conf \ + ${D}${datadir}/dbus-1/system.d/mctpd.conf fi }
mctpd ships with an example dbus service configuration, so install in the dbus system configuration dir. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> --- meta-networking/recipes-support/mctp/mctp_git.bb | 8 ++++++++ 1 file changed, 8 insertions(+)