Skip to contentSkip to conversation

systemd.bbclass: add RMINITDIR for nativesdk builds

PATCH In review Trevor Gamblin 1 participant 3 messages Sep 27, 2019 – Oct 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd.bbclass: add RMINITDIR for nativesdk builds

From: Trevor Gamblin <[email protected]>

nativesdk builds such as nativesdk-dnf are installing systemd service files, leading bitbake to throw installed-vs-shipped warnings, but these are not needed in nativesdk:

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]

Rather than have each recipe remove the files, an RMINITDIR case for nativesdk builds should be added to systemd.bbclass.

---
 meta/classes/systemd.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/systemd.bbclass +1 -0
index 747055b8fa..1dca09964b 100644
@@ -231,5 +231,6 @@ python rm_sysvinit_initddir (){
 
 do_install[postfuncs] += "${RMINITDIR} "
 RMINITDIR_class-target = " rm_sysvinit_initddir rm_systemd_unitdir "
+RMINITDIR_class-nativesdk = " rm_sysvinit_initddir rm_systemd_unitdir "
 RMINITDIR = ""
 
Signature · 1 line
2.21.0
#1 lore raw
Quoted 36 lines · Trevor Gamblin

From: Trevor Gamblin <[email protected]>

nativesdk builds such as nativesdk-dnf are installing systemd service files, leading bitbake to throw installed-vs-shipped warnings, but these are not needed in nativesdk:

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]

Rather than have each recipe remove the files, an RMINITDIR case for nativesdk builds should be added to systemd.bbclass.

---
  meta/classes/systemd.bbclass | 1 +
  1 file changed, 1 insertion(+)
meta/classes/systemd.bbclass +0 -0
index 747055b8fa..1dca09964b 100644

meta/classes/systemd.bbclass python rm_sysvinit_initddir (){ · line 236

Quoted 6 lines
meta/classes/systemd.bbclass +1 -0
@@ -231,5 +231,6 @@ python rm_sysvinit_initddir (){
 
  do_install[postfuncs] += "${RMINITDIR} "
  RMINITDIR_class-target = " rm_sysvinit_initddir rm_systemd_unitdir "
+RMINITDIR_class-nativesdk = " rm_sysvinit_initddir rm_systemd_unitdir "
  RMINITDIR = ""
 

Forgot to put you guys on the original cc list. I tested this out with systemd and sysvinit in DISTRO_FEATURES with nativesdk-dnf because I was having issues with nativesdk-clang building. Switching between the two I did not see a rebuild of anything, so I think we're good to go.

#2 lore raw
In reply to Trevor Gamblin
Quoted 36 lines · Trevor Gamblin

From: Trevor Gamblin <[email protected]>

nativesdk builds such as nativesdk-dnf are installing systemd service files, leading bitbake to throw installed-vs-shipped warnings, but these are not needed in nativesdk:

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]

Rather than have each recipe remove the files, an RMINITDIR case for nativesdk builds should be added to systemd.bbclass.

---
  meta/classes/systemd.bbclass | 1 +
  1 file changed, 1 insertion(+)
meta/classes/systemd.bbclass +0 -0
index 747055b8fa..1dca09964b 100644

meta/classes/systemd.bbclass python rm_sysvinit_initddir (){ · line 236

Quoted 6 lines
meta/classes/systemd.bbclass +1 -0
@@ -231,5 +231,6 @@ python rm_sysvinit_initddir (){
 
  do_install[postfuncs] += "${RMINITDIR} "
  RMINITDIR_class-target = " rm_sysvinit_initddir rm_systemd_unitdir "
+RMINITDIR_class-nativesdk = " rm_sysvinit_initddir rm_systemd_unitdir "
  RMINITDIR = ""
 

Anything holding this one back?