Skip to contentSkip to conversation

volatile-binds: add /srv to mount and install

PATCH Superseded Sinan Kaya 2 participants 4 messages Nov 18, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Sinan Kaya

author
#0 lore raw

PATCH 1/1 volatile-binds: add /srv to mount and install

We are installing a service to volatile mount /srv directory but we are not creating it on the target.

---
 meta/recipes-core/volatile-binds/volatile-binds.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-core/volatile-binds/volatile-binds.bb +2 -0
index b273293e9a8..08bda6d14bc 100644
@@ -36,6 +36,7 @@ def volatile_systemd_services(d):
 SYSTEMD_SERVICE_${PN} = "${@volatile_systemd_services(d)}"
 
 FILES_${PN} += "${systemd_unitdir}/system/*.service"
+FILES_${PN}_append = " ${servicedir}"
 
 do_compile () {
     while read spec mountpoint; do
@@ -64,6 +65,7 @@ do_compile[dirs] = "${WORKDIR}"
 
 do_install () {
     install -d ${D}${base_sbindir}
+    install -d ${D}${servicedir}
     install -m 0755 mount-copybind ${D}${base_sbindir}/
 
     install -d ${D}${systemd_unitdir}/system
Signature · 1 line
2.17.1
#1 lore raw
Quoted 10 lines · Sinan Kaya
---
  meta/recipes-core/volatile-binds/volatile-binds.bb | 2 ++
  1 file changed, 2 insertions(+)
meta/recipes-core/volatile-binds/volatile-binds.bb +0 -0
index b273293e9a8..08bda6d14bc 100644

meta/recipes-core/volatile-binds/volatile-binds.bb def volatile_systemd_services(d): · line 39

Quoted 4 lines
meta/recipes-core/volatile-binds/volatile-binds.bb +1 -0
@@ -36,6 +36,7 @@ def volatile_systemd_services(d):
  SYSTEMD_SERVICE_${PN} = "${@volatile_systemd_services(d)}"
 
  FILES_${PN} += "${systemd_unitdir}/system/*.service"
+FILES_${PN}_append = " ${servicedir}"

Just out of interest, why does that need to be an append? Why can't that be part of the line above?

Quoted 16 lines
meta/recipes-core/volatile-binds/volatile-binds.bb +1 -0
  do_compile () {
      while read spec mountpoint; do
@@ -64,6 +65,7 @@ do_compile[dirs] = "${WORKDIR}"
 
  do_install () {
      install -d ${D}${base_sbindir}
+    install -d ${D}${servicedir}
      install -m 0755 mount-copybind ${D}${base_sbindir}/
 
      install -d ${D}${systemd_unitdir}/system
author
#2 lore raw
Quoted 5 lines · Konrad Weihmann
Quoted 2 lines

    FILES_${PN} += "${systemd_unitdir}/system/*.service" +FILES_${PN}_append = " ${servicedir}"

Just out of interest, why does that need to be an append? Why can't that be part of the line above?

I can fix that. I copied from a bbappend file.

#3 lore raw
Quoted 9 lines · Sinan Kaya
Quoted 5 lines · Konrad Weihmann
Quoted 2 lines

    FILES_${PN} += "${systemd_unitdir}/system/*.service"
+FILES_${PN}_append = " ${servicedir}"

Just out of interest, why does that need to be an append? Why can't that be part of the line above?

I can fix that. I copied from a bbappend file.

Yeah please do so, appends are pretty invasive, better leave them out if there is no real need for them