[oe] Directories in CONFFILES Was: [meta-webserver][PATCHv4] monkey: new v1.5.1 release.

Martin Jansa martin.jansa at gmail.com
Wed Jul 30 20:12:14 UTC 2014


On Sat, Jul 26, 2014 at 09:03:21AM -0600, Eduardo Silva wrote:
> hi Martin,
> 
> 
> > > My builds are using "distroless" setup, if you're using poky then it's
> > > possible that there is still sysvinit added in your DISTRO_FEATURES
> > > somewhere (check bitbake -e monkay) so the sysv init script isn't
> > > removed in the end for you.
> >
> > I've just noticed that CONFFILES is set to
> > ${sysconfdir}/monkey/
> >
> > so it's not caused by missing init.d script but whole
> > ${sysconfdir}/monkey/ is empty in PN, can you check what's installed
> > there in your builds?
> >
> > It's either not installed when some dependency is missing or it's
> > included in different package in my build (knowing which file to look
> > for would help).
> >
> >
> thanks for tracking this. In my build using Poky i get installed the
> following files:

I think I've finally found the root cause of this

The problem is that ${sysconfdir}/monkey/ is directory and ipk backend doesn't
support directories in conffiles.

This is snipped from opkg-utils/opkg-build:

        if [ -f $CONTROL/conffiles ]; then
                for cf in `cat $CONTROL/conffiles`; do
                        if [ ! -f ./$cf ]; then
                                echo "*** Error: $CONTROL/conffiles mentions conffile $cf which does not exist" >&2
                                PKG_ERROR=1
                        fi
                done
        fi

+ Ross because of following commit in oe-core

Ross, I assume you didn't use os.path.isfile, because
RPM supports directories in conffiles, but maybe you had
plans for opkg-utils?

Do you have patch somewhere to extend opkg-utils to allow
directories in CONFFILES? Fix for this opkg-build check seems
trivial, but I haven't check how opkg will handle this on target.

commit fb87edc881009cf4d582cd95c248884551fe07fe
Author: Ross Burton <ross.burton at intel.com>
Date:   Tue Feb 5 21:12:50 2013 +0000

    package_ipk: check CONFFILES exist before adding them to metadata
    
    opkg-build verifies that conffiles exist, so verify that the specified files
    actually exist before writing them to conffiles.
    
    This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Saul Wold <sgw at linux.intel.com>

diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index d735051..e5e76ef 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -440,7 +440,8 @@ python do_package_ipk () {
                 bb.utils.unlockfile(lf)
                 raise bb.build.FuncFailed("unable to open conffiles for writing.")
             for f in conffiles_str.split():
-                conffiles.write('%s\n' % f)
+                if os.path.exists(oe.path.join(root, f)):
+                    conffiles.write('%s\n' % f)
             conffiles.close()
 
         os.chdir(basedir)

Eduardo, temporary work around is either list all CONFFILEs separately or drop
CONFFILES (like I did for world builds)

> root at qemux86:~# find /etc/monkey/
> /etc/monkey/
> /etc/monkey/sites
> /etc/monkey/sites/default
> /etc/monkey/plugins.load
> /etc/monkey/monkey.conf
> /etc/monkey/monkey.mime
> /etc/monkey/plugins
> /etc/monkey/plugins/fastcgi
> /etc/monkey/plugins/fastcgi/fastcgi.conf
> /etc/monkey/plugins/logger
> /etc/monkey/plugins/logger/logger.conf
> /etc/monkey/plugins/mandril
> /etc/monkey/plugins/mandril/mandril.conf
> /etc/monkey/plugins/dirlisting
> /etc/monkey/plugins/dirlisting/dirhtml.conf
> /etc/monkey/plugins/dirlisting/themes
> /etc/monkey/plugins/dirlisting/themes/guineo
> /etc/monkey/plugins/dirlisting/themes/guineo/entry.theme
> /etc/monkey/plugins/dirlisting/themes/guineo/footer.theme
> /etc/monkey/plugins/dirlisting/themes/guineo/header.theme
> /etc/monkey/plugins/cgi
> /etc/monkey/plugins/cgi/cgi.conf
> /etc/monkey/plugins/auth
> /etc/monkey/plugins/auth/monkey.users
> /etc/monkey/plugins/auth/README
> /etc/monkey/plugins/proxy_reverse
> /etc/monkey/plugins/proxy_reverse/proxy_reverse.conf
> /etc/monkey/plugins/cheetah
> /etc/monkey/plugins/cheetah/cheetah.conf
> 
> if you need any extra info let me know,
> 
> best
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20140730/987038e6/attachment-0002.sig>


More information about the Openembedded-devel mailing list