Skip to contentSkip to conversation

nativesdk-dnf: ensure installed systemd files are shipped

PATCH In review Trevor Gamblin 2 participants 4 messages Sep 24, 2019 – Sep 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nativesdk-dnf: ensure installed systemd files are shipped

From: Trevor Gamblin <[email protected]>

"bitbake nativesdk-dnf" throws a QA warning if the contents of ${base_libdir}/systemd/system/ are not shipped, so add them.

Warning log:

    WARNING: nativesdk-dnf-4.2.2-r0 do_package: QA Issue: nativesdk-dnf: Files/directories were installed but not shipped in any package:
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic.timer
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-makecache.timer
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic.service
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-makecache.service
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-notifyonly.timer
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-download.service
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-download.timer
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-notifyonly.service
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-install.timer
      /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/lib/systemd/system/dnf-automatic-install.service
    Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
    nativesdk-dnf: 13 installed and not shipped files. [installed-vs-shipped]
---
 meta/recipes-devtools/dnf/dnf_4.2.2.bb | 3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/dnf/dnf_4.2.2.bb +3 -0
index c77773332c..7ea454a8f6 100644
@@ -74,6 +74,9 @@ do_install_append_class-nativesdk() {
                 RPM_NO_CHROOT_FOR_SCRIPTS=1 
 }
 
+# Ensure installed systemd files are shipped when building nativesdk-dnf
+FILES_${PN} += "${base_libdir}/systemd/system/*"
+
 SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
                          dnf-automatic.service dnf-automatic.timer \
                          dnf-automatic-download.service dnf-automatic-download.timer \
Signature · 1 line
2.21.0
#1 lore raw
Quoted 4 lines · Trevor Gamblin

From: Trevor Gamblin <[email protected]>

"bitbake nativesdk-dnf" throws a QA warning if the contents of ${base_libdir}/systemd/system/ are not shipped, so add them.

Looks like a bug in systemd.bbclass, not this recipe. For example if I enable nativesdk for acpid:

ERROR: nativesdk-acpid-2.0.32-r0 do_package: QA Issue: nativesdk-acpid: Files/directories were installed but not shipped in any package:
/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/lib /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/lib/systemd /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/lib/systemd/system

/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/lib/systemd/system/acpid.service

Ross

#2 lore raw
Quoted 7 lines · Ross Burton
Quoted 4 lines · Trevor Gamblin

From: Trevor Gamblin <[email protected]>

"bitbake nativesdk-dnf" throws a QA warning if the contents of ${base_libdir}/systemd/system/ are not shipped, so add them.

Looks like a bug in systemd.bbclass, not this recipe.  For example if I enable nativesdk for acpid:

Can you clarify what you meant? Did you mean that the class should be doing the cleanup of the systemd service files?

Quoted 10 lines

ERROR: nativesdk-acpid-2.0.32-r0 do_package: QA Issue: nativesdk-acpid: Files/directories were installed but not shipped in any package:
  /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/lib /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/lib/systemd /opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/lib/systemd/system

/opt/poky/2.7+snapshot/sysroots/x86_64-pokysdk-linux/lib/systemd/system/acpid.service

Ross

#3 lore raw
Quoted 11 lines · Trevor Gamblin
Quoted 7 lines · Ross Burton
Quoted 4 lines · Trevor Gamblin

From: Trevor Gamblin <[email protected]>

"bitbake nativesdk-dnf" throws a QA warning if the contents of ${base_libdir}/systemd/system/ are not shipped, so add them.

Looks like a bug in systemd.bbclass, not this recipe.  For example if I enable nativesdk for acpid:

Can you clarify what you meant? Did you mean that the class should be doing the cleanup of the systemd service files?

If the intention is that unit files don't get installed/managed/etc in nativesdk, then yes the class should be removing them.

Ross