Hi,

thanks for the explanation. I fixed it by removing the directory.

> Gyorgy Sarvari via lists.yoctoproject.org 
> <skandigraun=gmail....@lists.yoctoproject.org> hat am 02.02.2025 13:21 CET 
> geschrieben:
> 
>  
> On 01.02.25 21:46, Daniel Kampert via lists.yoctoproject.org wrote:
> > Hi,
> > I´m building a layer to install wmbusmeters for Kirkstone and I run 
> > into this issue:
> > ERROR: wmbusmeters-1.18.0-r0 do_package_qa: QA Issue: wmbusmeters 
> > installs files in /var/volatile, but it is expected to be empty 
> > [empty-dirs]
> > What does it mean and where does it come from / how can I solve it? My 
> > recipe looks like this
> 
> What does it mean - There are a number of folders that are not expected 
> to contain
> files installed by application due to various reasons. One QA check[1] 
> ensures that
> this is respected by the packages.
> 
> Where it come from - The Makefile installs some directories in the 
> /var/volatile folder.
> Frequently this folder is tmpfs, but even when it is not, its content is 
> considered ephemeral, so
> installing anything here is frequently a bug. It can be used as a 
> temporary folder during runtime, but
> if an application needs to store anything that will be needed after a 
> reboot, this folder
> is not a good place.
> 
> How can I solve it - There are a couple of ways. A couple of 
> non-exhaustive options:
> - Delete this folder in a do_install:append() function ("rm -rf 
> ${D}${localstatedir}/log" or something
> along the lines), and simply try to start the application. Maybe it 
> re-creates the folder upon startup,
> and it will just work.
> - Do the same as in the previous suggestion, but add "--logfile=syslog" 
> as a starting argument
> in your systemd unit file. Based on the readme this should make your 
> application to use
> the syslog for its logs instead of a dedicated file.
> - If none if this is working for you, delete the folder still, but look 
> into tmpfiles.d [2]
> and its configuration, how to recreate this folder during boot. This 
> service creates folders and
> files early during startup, it is usable exactly in such cases. You can 
> find a couple examples of its
> usage in Yocto also[3].
> 
> [1]: https://docs.yoctoproject.org/4.0.24/ref-manual/qa-checks.html
> [2]: https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html
> [3]: e.g. 
> https://git.yoctoproject.org/poky/tree/meta/recipes-extended/pam/libpam_1.5.2.bb?h=kirkstone#n137
> > /inherit autotools-brokensep pkgconfig/
> > /DESCRIPTION = "The program acquires utility meter readings from wired 
> > m-bus or wireless wm-bus meters."/
> > /HOMEPAGE = "https://github.com/wmbusmeters/wmbusmeters"/
> > /LICENSE = "GPL-3.0-only"/
> > /LIC_FILES_CHKSUM = 
> > "file://${COMMON_LICENSE_DIR}/GPL-3.0-only;md5=c79ff39f19dfec6d293b95dea7b07891"/
> >  
> >
> > /# The Makefile is stripping. Overwrite the "STRIP" variable in the 
> > Makefile and use the stripping from Yocto/
> > /EXTRA_OEMAKE += "STRIP=true"/
> > /CXXFLAGS += "-DLIBXML_DOCB_ENABLED"/
> > /SRC_URI = " \/
> > /file://0001-set-libxml2-cxxflags-by-pkg-config.patch \/
> > /git://github.com/wmbusmeters/wmbusmeters;protocol=https;branch=master \/
> > /"/
> > /# Use version 1.18.0/
> > /SRCREV = "2f2720d9d8e043304a366d11d933be9d535e17a5"/
> > /DEPENDS = "rtlsdr icu libxml2"/
> > /RDEPENDS:${PN} = "rtlsdr icu"/
> > /S = "${WORKDIR}/git"/
> > /FILES:${PN} = " etc \/
> > /var \/
> > /lib \/
> > /usr/bin \/
> > /usr/sbin \/
> > /${systemd_system_unitdir}/system/wmbusmeters.service \/
> > /"/
> > /SYSTEMD_SERVICE:${PN} = "wmbusmeters.service"/
> > /SYSTEMD_AUTO_ENABLE:${PN} = "enable"/
> > Thanks for help!
> > Mit freundlichen Grüßen / With kind regards
> > Ing. Daniel Kampert, M. Sc.
> > Embedded Systems Solutions
> > Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland
> > Phone: +49 (0)174 6932561
> > E-Mail: kont...@daniel-kampert.de
> > Web: www.daniel-kampert.de <https://www.daniel-kampert.de>
> >
> > 
> >
> 
> 

Mit freundlichen Grüßen / With kind regards

Ing. Daniel Kampert, M. Sc. 
Embedded Systems Solutions
Address: Hauptstr. 36 | 91469 Hagenbüchach | Deutschland 
Phone: +49 (0)174 6932561 
E-Mail: kont...@daniel-kampert.de 
Web: www.daniel-kampert.de (https://www.daniel-kampert.de)
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64696): https://lists.yoctoproject.org/g/yocto/message/64696
Mute This Topic: https://lists.yoctoproject.org/mt/110941591/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to