[oe] [meta-oe][PATCH V2] pmdk: fix install error

Liu, Yongxin Yongxin.Liu at windriver.com
Tue Jan 15 03:22:30 UTC 2019


> -----Original Message-----
> From: Khem Raj [mailto:raj.khem at gmail.com]
> Sent: Tuesday, January 15, 2019 06:47
> To: Liu, Yongxin
> Cc: Andreas Müller; openembeded-devel
> Subject: Re: [oe] [meta-oe][PATCH V2] pmdk: fix install error
> 
> On Wed, Jan 9, 2019 at 11:43 PM Liu, Yongxin <Yongxin.Liu at windriver.com>
> wrote:
> >
> > > -----Original Message-----
> > > From: Andreas Müller [mailto:schnitzeltony at gmail.com]
> > > Sent: Thursday, January 10, 2019 14:46
> > > To: Liu, Yongxin
> > > Cc: openembeded-devel
> > > Subject: Re: [oe] [meta-oe][PATCH V2] pmdk: fix install error
> > >
> > > On Thu, Jan 10, 2019 at 6:40 AM Yongxin Liu
> <yongxin.liu at windriver.com>
> > > wrote:
> > > >
> > > > Install files to /usr instead of /usr/local by replacing
> > > > PREFIX=${prefix} with prefix=${prefix}.
> > > > Remove unnecessary files which are only for debugging.
> > > > Set FILES to package /usr/etc/bash_completion.d/pmempool.
> > > >
> > > > Signed-off-by: Yongxin Liu <yongxin.liu at windriver.com>
> > > > ---
> > > >  meta-oe/recipes-extended/pmdk/pmdk_1.4.2.bb | 20 ++++-------------
> ---
> > > >  1 file changed, 4 insertions(+), 16 deletions(-)
> > > >
> > > > diff --git a/meta-oe/recipes-extended/pmdk/pmdk_1.4.2.bb b/meta-
> > > oe/recipes-extended/pmdk/pmdk_1.4.2.bb
> > > > index 3da22a970..8c3ead2ef 100644
> > > > --- a/meta-oe/recipes-extended/pmdk/pmdk_1.4.2.bb
> > > > +++ b/meta-oe/recipes-extended/pmdk/pmdk_1.4.2.bb
> > > > @@ -34,25 +34,13 @@ EXTRA_OEMAKE = "HOST_SYS='${HOST_SYS}'
> > > EXTRA_CFLAGS='${SELECTED_OPTIMIZATION}'"
> > > >  # Fix the missing fts libs when using musl
> > > >  EXTRA_OEMAKE_append_libc-musl = " EXTRA_LIBS='-lfts'"
> > > >
> > > > -do_install() {
> > > > -       oe_runmake PREFIX=${prefix} DESTDIR=${D} install
> > > > -
> > > > -       # Copy these into the standard directories
> > > > -       install -d ${D}${bindir}/
> > > > -       mv ${D}/usr/local/bin/pmempool ${D}${bindir}/
> > > > -       mv ${D}/usr/local/bin/daxio ${D}${bindir}/
> > > > -
> > > > -       install -d ${D}${libdir}
> > > > -       mv ${D}/usr/local/lib/*so* ${D}${libdir}/
> > > > +FILES_${PN} = "/usr/etc"
> > > ^ This looks wrong: Seems config path is prefixed too
> >
> > Without this I got the following warning.
> >
> >     WARNING: pmdk-1.4.2-r0 do_package: QA Issue: pmdk:
> Files/directories were installed but not shipped in any package:
> >       /usr/etc
> >       /usr/etc/bash_completion.d
> >       /usr/etc/bash_completion.d/pmempool
> >     Please set FILES such that these items are packaged. Alternatively
> if they are unneeded, avoid installing them or delete them within
> do_install.
> >     pmdk: 3 installed and not shipped files. [installed-vs-shipped]
> >
> > With it, the issue is gone. And those files can be shipped in RPM
> packages.
> >
> >     $ rpm -qpl pmdk-1.4.2-r0.skylake_avx512_64.rpm
> >     /usr
> >     /usr/bin
> >     /usr/bin/daxio
> >     /usr/bin/pmempool
> >     /usr/etc
> >     /usr/etc/bash_completion.d
> >     /usr/etc/bash_completion.d/pmempool
> >
> 
> Its better to move bash_completion files under usr/share in
> do_install
>

How about install bash_completion files directly to /etc?
It seems /etc/bash_completion.d is the more common place to hold such files. 

All I need to do is to specify sysconfdir in install command,
such as " oe_runmake prefix=${prefix} DESTDIR=${D} sysconfdir=/etc install".
And add FILES_${PN} += "${sysconfdir}" to avoid QA issue.

What do you think?


--Yongxin

> > I see similar usage, such as "meta-openembedded/meta-oe/recipes-
> support/lio-utils/lio-utils_4.1.bb:FILES_${PN} += "${sbindir}/*
> /etc/init.d/* /etc/target/*""
> >
> >
> > Thanks,
> > Yongxin
> >
> > > >
> > > > -       install -d ${D}${libdir}/pkgconfig
> > > > -       mv ${D}/usr/local/lib/pkgconfig/*.pc
> ${D}${libdir}/pkgconfig/
> > > > -
> > > > -       install -d ${D}${includedir}
> > > > -       mv ${D}/usr/local/include/* ${D}${includedir}/
> > > > +do_install() {
> > > > +       oe_runmake prefix=${prefix} DESTDIR=${D} install
> > > >
> > > >         # Remove uneeded files
> > > > -       rm -rf ${D}/usr/local/
> > > > +       rm -rf ${D}/usr/lib64/pmdk_debug
> > > >  }
> > > >
> > > >  # Include these by default otherwise the SDK is not very useful
> > > > --
> > > > 2.14.4
> > > Andreas
> > --
> > _______________________________________________
> > Openembedded-devel mailing list
> > Openembedded-devel at lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel


More information about the Openembedded-devel mailing list