* installs files in /var/volatile
@ 2025-02-01 20:46 Daniel Kampert
2025-02-02 12:21 ` [yocto] " Gyorgy Sarvari
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Kampert @ 2025-02-01 20:46 UTC (permalink / raw)
To: yocto@lists.yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1700 bytes --]
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
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 mailto:kontakt@daniel-kampert.de
Web: www.daniel-kampert.de https://www.daniel-kampert.de
[-- Attachment #2: Type: text/html, Size: 3473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [yocto] installs files in /var/volatile 2025-02-01 20:46 installs files in /var/volatile Daniel Kampert @ 2025-02-02 12:21 ` Gyorgy Sarvari 2025-02-02 19:10 ` Daniel Kampert 0 siblings, 1 reply; 3+ messages in thread From: Gyorgy Sarvari @ 2025-02-02 12:21 UTC (permalink / raw) To: yocto, kontakt 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 (#64694): https://lists.yoctoproject.org/g/yocto/message/64694 > Mute This Topic: https://lists.yoctoproject.org/mt/110941591/6084445 > Group Owner: yocto+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yocto] installs files in /var/volatile 2025-02-02 12:21 ` [yocto] " Gyorgy Sarvari @ 2025-02-02 19:10 ` Daniel Kampert 0 siblings, 0 replies; 3+ messages in thread From: Daniel Kampert @ 2025-02-02 19:10 UTC (permalink / raw) To: yocto, skandigraun, Gyorgy Sarvari via lists.yoctoproject.org 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) ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-02 19:11 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 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 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.