On Wed, Jan 07, 2015 at 06:02:48AM +0000, Lei, Maohui wrote:
> Hi Martin
> 
> > > +DEPENDS = "corosync systemd"
> > 
> > Does it need explicit systemd dependency?
> > https://git.fedorahosted.org/cgit/dlm.git/tree/dlm_controld/Makefile
> > looks like yes with default USE_SD_NOTIFY
> 
> Yes.
> 
> > 
> > If yes, then it should be together with
> > REQUIRED_DISTRO_FEATURES = "systemd"
> > to prevent world error when systemd isn't in DISTRO_FEATURES
> > ERROR: Nothing PROVIDES 'systemd' (but
> > meta-oe/meta-oe/recipes-extended/dlm/dlm_4.0.2.bb DEPENDS on or otherwise
> > requires it)
> > ERROR: systemd was skipped: 'systemd' not in DISTRO_FEATURES
> 
> But I think add REQUIRED_DISTRO_FEATURES can't prevent the world error.
> Even if I add the REQUIRED_DISTRO_FEATURES = "systemd",the error still 
> appears.
> Unless add "system" into DISTRO_FEATURES.

It doesn't, because dlm will be skipped just like other recipes incompatible 
with distro-less configuration.

> The following comes from 
> http://www.yoctoproject.org/docs/1.7/ref-manual/ref-manual.html .
> ********************************************************
> REQUIRED_DISTRO_FEATURES
> When inheriting the distro_features_check class, this variable identifies 
> distribution features that must exist in the current configuration in order 
> for the OpenEmbedded build system to build the recipe. In other words, if the 
> REQUIRED_DISTRO_FEATURES variable lists a feature that does not appear in 
> DISTRO_FEATURES within the current configuration, an error occurs and the 
> build stops.
> ********************************************************
> 
> 
> Cheers
> Lei
> 
> 
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of
> > Martin Jansa
> > Sent: Tuesday, January 06, 2015 10:35 PM
> > To: [email protected]
> > Subject: Re: [oe] [meta-oe][V2 PATCH 3/3] dlm: add a new recipe
> > 
> > On Tue, Jan 06, 2015 at 12:12:36PM +0800, leimaohui wrote:
> > > From: leimh <[email protected]>
> > >
> > > The kernel dlm requires a user daemon to control membership.
> > >
> > > Signed-off-by: leimh <[email protected]>
> > > ---
> > >  meta-oe/recipes-extended/dlm/dlm_4.0.2.bb | 47
> > > +++++++++++++++++++++++++++++++
> > >  1 file changed, 47 insertions(+)
> > >  create mode 100644 meta-oe/recipes-extended/dlm/dlm_4.0.2.bb
> > >
> > > diff --git a/meta-oe/recipes-extended/dlm/dlm_4.0.2.bb
> > > b/meta-oe/recipes-extended/dlm/dlm_4.0.2.bb
> > > new file mode 100644
> > > index 0000000..774f136
> > > --- /dev/null
> > > +++ b/meta-oe/recipes-extended/dlm/dlm_4.0.2.bb
> > > @@ -0,0 +1,47 @@
> > > +DESCRIPTION = "dlm control daemon and tool"
> > > +
> > > +SECTION = "utils"
> > > +HOMEPAGE = "https://fedorahosted.org/cluster/wiki/HomePage";
> > > +
> > > +SRC_URI =
> > "https://git.fedorahosted.org/cgit/dlm.git/snapshot/${BP}.tar.xz";
> > > +
> > > +SRC_URI[md5sum] = "efc2ee6093aa6aa0a88aaad83e998a3f"
> > > +SRC_URI[sha256sum] =
> > "b89bc557aaffbab0ac005398025f247718a5589cff6574d902eaffe2b20e683e"
> > > +
> > > +LICENSE = "LGPLv2+ & GPLv2 & GPLv2+"
> > > +LIC_FILES_CHKSUM =
> > "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
> > > +
> > > +DEPENDS = "corosync systemd"
> > 
> > Does it need explicit systemd dependency?
> > https://git.fedorahosted.org/cgit/dlm.git/tree/dlm_controld/Makefile
> > looks like yes with default USE_SD_NOTIFY
> > 
> > If yes, then it should be together with
> > REQUIRED_DISTRO_FEATURES = "systemd"
> > to prevent world error when systemd isn't in DISTRO_FEATURES
> > ERROR: Nothing PROVIDES 'systemd' (but
> > meta-oe/meta-oe/recipes-extended/dlm/dlm_4.0.2.bb DEPENDS on or otherwise
> > requires it)
> > ERROR: systemd was skipped: 'systemd' not in DISTRO_FEATURES
> > 
> > > +
> > > +inherit pkgconfig systemd
> > > +
> > > +SYSTEMD_SERVICE_${PN} = "dlm.service"
> > > +SYSTEMD_AUTO_ENABLE = "enable"
> > > +
> > > +export EXTRA_OEMAKE = ""
> > > +
> > > +do_compile_prepend() {
> > > +    sed -i "s/libsystemd-daemon/libsystemd/g"
> > > +${S}/dlm_controld/Makefile }
> > > +
> > > +do_compile () {
> > > +    oe_runmake 'CC=${CC}'
> > > +}
> > > +
> > > +do_install_append (){
> > > +    install -d ${D}${sysconfdir}/sysconfig/
> > > +    install -d ${D}${sysconfdir}/init.d/
> > > +    install -m 0644 ${S}/init/dlm.sysconfig
> > ${D}${sysconfdir}/sysconfig/dlm
> > > +    install -m 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm
> > > +
> > > +    # install systemd unit files
> > > +    if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)};
> > then
> > > +        install -d ${D}${systemd_unitdir}/system
> > > +        install -m 0644 ${S}/init/dlm.service
> > ${D}${systemd_unitdir}/system
> > > +    fi
> > > +}
> > > +
> > > +do_install() {
> > > +    oe_runmake install DESTDIR=${D} LIBDIR=${libdir} }
> > > +
> > > --
> > > 1.8.4.2
> > >
> > > --
> > > _______________________________________________
> > > Openembedded-devel mailing list
> > > [email protected]
> > > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> > 
> > --
> > Martin 'JaMa' Jansa     jabber: [email protected]
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> [email protected]
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: [email protected]

Attachment: signature.asc
Description: Digital signature

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to