From: Daniel Kampert <kontakt@daniel-kampert.de>
To: yocto@lists.yoctoproject.org, skandigraun@gmail.com,
"Gyorgy Sarvari via lists.yoctoproject.org"
<skandigraun=gmail.com@lists.yoctoproject.org>
Subject: Re: [yocto] installs files in /var/volatile
Date: Sun, 2 Feb 2025 20:10:58 +0100 (CET) [thread overview]
Message-ID: <372448140.3833563.1738523458718@webmail.strato.de> (raw)
In-Reply-To: <17aaec9a-64ac-494e-a66a-abd69e9e0197@gmail.com>
Hi,
thanks for the explanation. I fixed it by removing the directory.
> Gyorgy Sarvari via lists.yoctoproject.org <skandigraun=gmail.com@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: kontakt@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 (#64695): https://lists.yoctoproject.org/g/yocto/message/64695
> Mute This Topic: https://lists.yoctoproject.org/mt/110941591/9229641
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [kontakt@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: kontakt@daniel-kampert.de
Web: www.daniel-kampert.de (https://www.daniel-kampert.de)
prev parent reply other threads:[~2025-02-02 19:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-01 20:46 installs files in /var/volatile Daniel Kampert
2025-02-02 12:21 ` [yocto] " Gyorgy Sarvari
2025-02-02 19:10 ` Daniel Kampert [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=372448140.3833563.1738523458718@webmail.strato.de \
--to=kontakt@daniel-kampert.de \
--cc=skandigraun=gmail.com@lists.yoctoproject.org \
--cc=skandigraun@gmail.com \
--cc=yocto@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.