Skip to contentSkip to conversation

arago.conf: make things more readable and fix the virtuals

PATCH In review [email protected] 4 participants 14 messages Jun 6, 2023 – Jun 12, 2023 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arago.conf: make things more readable and fix the virtuals

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor of a more direct if else statememnt.

Also fix the virtual provider for login manager. There should only be 1 login provider and it should be shadow-base for systemd *or* busybox for sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

---
 meta-arago-distro/conf/distro/arago.conf | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
meta-arago-distro/conf/distro/arago.conf +8 -7
index 9164657c..6390a916 100644
@@ -59,13 +59,14 @@ DISTRO_FEATURES_FILTER_NATIVESDK:append = " opencl opencv openmp"
 
 # Set global runtime providers for major components
 ARAGO_SYSVINIT ?= "0"
-VIRTUAL-RUNTIME_dev_manager = "${@["udev", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_init_manager = "${@["sysvinit", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_initscripts = "${@["initscripts", "systemd-compat-units"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_initramfs = "${@["sysvinit-initramfs", "systemd-initramfs"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_login_manager = "busybox shadow"
-
-DISTRO_FEATURES:append = "${@[""," systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
+VIRTUAL-RUNTIME_dev_manager = "${@ 'udev' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}"
+VIRTUAL-RUNTIME_init_manager = "${@ 'sysvinit' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}"
+VIRTUAL-RUNTIME_initscripts = "${@ 'initscripts' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-compat-units'}"
+VIRTUAL-RUNTIME_initramfs = "${@ 'sysvinit-initramfs' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-initramfs'}"
+VIRTUAL-RUNTIME_login_manager = "${@ 'busybox' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'shadow-base'}"
+
+DISTRO_FEATURES:append = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}"
+DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' sysvinit'}"
 
 # Distro-specific package configuration
 PACKAGECONFIG:append:pn-systemd = " coredump"
Signature · 1 line
2.40.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On 6/6/23 2:10 PM, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor of a more direct if else statememnt.

Quoted 9 lines

Also fix the virtual provider for login manager. There should only be 1 login provider and it should be shadow-base for systemd *or* busybox for sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

Probably could have been two patches.. both look like good fixes though,

Quoted 31 lines
---
  meta-arago-distro/conf/distro/arago.conf | 15 ++++++++-------
  1 file changed, 8 insertions(+), 7 deletions(-)
meta-arago-distro/conf/distro/arago.conf +8 -7
index 9164657c..6390a916 100644
@@ -59,13 +59,14 @@ DISTRO_FEATURES_FILTER_NATIVESDK:append = " opencl opencv openmp"
 
  # Set global runtime providers for major components
  ARAGO_SYSVINIT ?= "0"
-VIRTUAL-RUNTIME_dev_manager = "${@["udev", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_init_manager = "${@["sysvinit", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_initscripts = "${@["initscripts", "systemd-compat-units"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_initramfs = "${@["sysvinit-initramfs", "systemd-initramfs"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_login_manager = "busybox shadow"
-
-DISTRO_FEATURES:append = "${@[""," systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
+VIRTUAL-RUNTIME_dev_manager = "${@ 'udev' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}"
+VIRTUAL-RUNTIME_init_manager = "${@ 'sysvinit' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}"
+VIRTUAL-RUNTIME_initscripts = "${@ 'initscripts' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-compat-units'}"
+VIRTUAL-RUNTIME_initramfs = "${@ 'sysvinit-initramfs' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-initramfs'}"
+VIRTUAL-RUNTIME_login_manager = "${@ 'busybox' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'shadow-base'}"
+
+DISTRO_FEATURES:append = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}"
+DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' sysvinit'}"
 
  # Distro-specific package configuration
  PACKAGECONFIG:append:pn-systemd = " coredump"
#2 lore raw
In reply to [email protected]
Quoted 5 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals is how OE used to do things from the early days and I'm well used to that. But these days using Python if/else directly gained lots of traction, so why not?

Quoted 8 lines

Also fix the virtual provider for login manager. There should only be 1 login provider and it should be shadow-base for systemd *or* busybox for sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit" PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications when both sysvinit rc script and systemd unit file are provided by a package and install only one of them. It was better than not having any startup script for a package at all.

Quoted 33 lines
---
 meta-arago-distro/conf/distro/arago.conf | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
meta-arago-distro/conf/distro/arago.conf +8 -7
index 9164657c..6390a916 100644
@@ -59,13 +59,14 @@ DISTRO_FEATURES_FILTER_NATIVESDK:append = " opencl opencv openmp"
 
 # Set global runtime providers for major components
 ARAGO_SYSVINIT ?= "0"
-VIRTUAL-RUNTIME_dev_manager = "${@["udev", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_init_manager = "${@["sysvinit", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_initscripts = "${@["initscripts", "systemd-compat-units"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_initramfs = "${@["sysvinit-initramfs", "systemd-initramfs"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_login_manager = "busybox shadow"
-
-DISTRO_FEATURES:append = "${@[""," systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
+VIRTUAL-RUNTIME_dev_manager = "${@ 'udev' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}"
+VIRTUAL-RUNTIME_init_manager = "${@ 'sysvinit' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}"
+VIRTUAL-RUNTIME_initscripts = "${@ 'initscripts' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-compat-units'}"
+VIRTUAL-RUNTIME_initramfs = "${@ 'sysvinit-initramfs' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-initramfs'}"
+VIRTUAL-RUNTIME_login_manager = "${@ 'busybox' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'shadow-base'}"
+
+DISTRO_FEATURES:append = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}"
+DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' sysvinit'}"
 
 # Distro-specific package configuration
 PACKAGECONFIG:append:pn-systemd = " coredump"
Signature · 1 line
2.40.1
#3 lore raw
Quoted 23 lines · Denys Dmytriyenko
Quoted 5 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals is how OE used to do things from the early days and I'm well used to that. But these days using Python if/else directly gained lots of traction, so why not?

Quoted 8 lines

Also fix the virtual provider for login manager. There should only be 1 login provider and it should be shadow-base for systemd *or* busybox for sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 8 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit" PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications when both sysvinit rc script and systemd unit file are provided by a package and install only one of them. It was better than not having any startup script for a package at all.

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

Quoted 34 lines
Quoted 34 lines
---
  meta-arago-distro/conf/distro/arago.conf | 15 ++++++++-------
  1 file changed, 8 insertions(+), 7 deletions(-)
meta-arago-distro/conf/distro/arago.conf +8 -7
index 9164657c..6390a916 100644
@@ -59,13 +59,14 @@ DISTRO_FEATURES_FILTER_NATIVESDK:append = " opencl opencv openmp"
 
  # Set global runtime providers for major components
  ARAGO_SYSVINIT ?= "0"
-VIRTUAL-RUNTIME_dev_manager = "${@["udev", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_init_manager = "${@["sysvinit", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_initscripts = "${@["initscripts", "systemd-compat-units"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_initramfs = "${@["sysvinit-initramfs", "systemd-initramfs"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
-VIRTUAL-RUNTIME_login_manager = "busybox shadow"
-
-DISTRO_FEATURES:append = "${@[""," systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}"
+VIRTUAL-RUNTIME_dev_manager = "${@ 'udev' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}"
+VIRTUAL-RUNTIME_init_manager = "${@ 'sysvinit' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}"
+VIRTUAL-RUNTIME_initscripts = "${@ 'initscripts' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-compat-units'}"
+VIRTUAL-RUNTIME_initramfs = "${@ 'sysvinit-initramfs' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-initramfs'}"
+VIRTUAL-RUNTIME_login_manager = "${@ 'busybox' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'shadow-base'}"
+
+DISTRO_FEATURES:append = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}"
+DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' sysvinit'}"
 
  # Distro-specific package configuration
  PACKAGECONFIG:append:pn-systemd = " coredump"
Signature · 1 line
2.40.1

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 33 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 23 lines · Denys Dmytriyenko
Quoted 5 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals is how OE used to do things from the early days and I'm well used to that. But these days using Python if/else directly gained lots of traction, so why not?

Quoted 8 lines

Also fix the virtual provider for login manager. There should only be 1 login provider and it should be shadow-base for systemd *or* busybox for sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 8 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit" PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications when both sysvinit rc script and systemd unit file are provided by a package and install only one of them. It was better than not having any startup script for a package at all.

Quoted 4 lines

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Quoted 57 lines
Quoted 37 lines
Quoted 37 lines

---
  meta-arago-distro/conf/distro/arago.conf | 15 ++++++++-------

  1 file changed, 8 insertions(+), 7 deletions(-)
meta-arago-distro/conf/distro/arago.conf +0 -0
index 9164657c..6390a916 100644
@@ -59,13 +59,14 @@ DISTRO_FEATURES_FILTER_NATIVESDK:append = " 

opencl opencv openmp"
  # Set global runtime providers for major components ARAGO_SYSVINIT ?= "0" -VIRTUAL-RUNTIME_dev_manager = "${@["udev", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_init_manager = "${@["sysvinit", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_initscripts = "${@["initscripts", "systemd-compat-units"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_initramfs = "${@["sysvinit-initramfs", "systemd-initramfs"][bool(d.getVar("ARAGO_SYSVINIT"))]}"

meta-arago-distro/conf/distro/arago.conf +0 -3
-VIRTUAL-RUNTIME_login_manager = "busybox shadow"
-
-DISTRO_FEATURES:append = "${@[""," 

systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" +VIRTUAL-RUNTIME_dev_manager = "${@ 'udev' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}" +VIRTUAL-RUNTIME_init_manager = "${@ 'sysvinit' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}" +VIRTUAL-RUNTIME_initscripts = "${@ 'initscripts' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-compat-units'}" +VIRTUAL-RUNTIME_initramfs = "${@ 'sysvinit-initramfs' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-initramfs'}" +VIRTUAL-RUNTIME_login_manager = "${@ 'busybox' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'shadow-base'}" +

Quoted 8 lines
Quoted 8 lines

+DISTRO_FEATURES:append = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}" +DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' sysvinit'}" # Distro-specific package configuration PACKAGECONFIG:append:pn-systemd = " coredump"

Signature · 1 line
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14510): https://lists.yoctoproject.org/g/meta-arago/message/14510
Mute This Topic: https://lists.yoctoproject.org/mt/99370291/7094281
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#6 lore raw
Quoted 34 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 33 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 31 lines · Denys Dmytriyenko
Quoted 5 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals is how OE used to do things from the early days and I'm well used to that. But these days using Python if/else directly gained lots of traction, so why not?

Quoted 8 lines

Also fix the virtual provider for login manager. There should only be 1 login provider and it should be shadow-base for systemd *or* busybox for sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit" PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications when both sysvinit rc script and systemd unit file are provided by a package and install only one of them. It was better than not having any startup script for a package at all.

Quoted 6 lines
Quoted 4 lines

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Uh oh... This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image. systemd made the rootfs too big to fit within the constraints.

Nishanth might have more details if you want to debate it. But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

Quoted 63 lines
Quoted 37 lines
Quoted 37 lines
Quoted 37 lines

---
  meta-arago-distro/conf/distro/arago.conf | 15 ++++++++-------

  1 file changed, 8 insertions(+), 7 deletions(-)
meta-arago-distro/conf/distro/arago.conf +0 -0
index 9164657c..6390a916 100644
@@ -59,13 +59,14 @@ DISTRO_FEATURES_FILTER_NATIVESDK:append = " 

opencl opencv openmp"
  # Set global runtime providers for major components ARAGO_SYSVINIT ?= "0" -VIRTUAL-RUNTIME_dev_manager = "${@["udev", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_init_manager = "${@["sysvinit", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_initscripts = "${@["initscripts", "systemd-compat-units"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_initramfs = "${@["sysvinit-initramfs", "systemd-initramfs"][bool(d.getVar("ARAGO_SYSVINIT"))]}"

meta-arago-distro/conf/distro/arago.conf +0 -3
-VIRTUAL-RUNTIME_login_manager = "busybox shadow"
-
-DISTRO_FEATURES:append = "${@[""," 

systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" +VIRTUAL-RUNTIME_dev_manager = "${@ 'udev' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}" +VIRTUAL-RUNTIME_init_manager = "${@ 'sysvinit' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}" +VIRTUAL-RUNTIME_initscripts = "${@ 'initscripts' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-compat-units'}" +VIRTUAL-RUNTIME_initramfs = "${@ 'sysvinit-initramfs' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-initramfs'}" +VIRTUAL-RUNTIME_login_manager = "${@ 'busybox' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'shadow-base'}" +

Quoted 14 lines
Quoted 8 lines
Quoted 8 lines

+DISTRO_FEATURES:append = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}" +DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' sysvinit'}" # Distro-specific package configuration PACKAGECONFIG:append:pn-systemd = " coredump"

Signature · 1 line
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14511): https://lists.yoctoproject.org/g/meta-arago/message/14511
Mute This Topic: https://lists.yoctoproject.org/mt/99370291/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#7 lore raw
Quoted 46 lines · Ryan Eatmon
Quoted 34 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 33 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 31 lines · Denys Dmytriyenko
Quoted 5 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals is how OE used to do things from the early days and I'm well used to that. But these days using Python if/else directly gained lots of traction, so why not?

Quoted 8 lines

Also fix the virtual provider for login manager. There should only be 1 login provider and it should be shadow-base for systemd *or* busybox for sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit" PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications when both sysvinit rc script and systemd unit file are provided by a package and install only one of them. It was better than not having any startup script for a package at all.

Quoted 6 lines
Quoted 4 lines

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Uh oh...  This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

Quoted 8 lines

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image.  systemd made the rootfs too big to fit within the constraints.

Nishanth might have more details if you want to debate it.  But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

That's fair. I assumed our sysvinit build images were setting the ARAGO_SYSVINIT variable as part of their base config (or at least something similar). Got a proposal I need to submit about this anyway.

Quoted 65 lines
Quoted 64 lines
Quoted 38 lines
Quoted 38 lines
Quoted 38 lines

---
  meta-arago-distro/conf/distro/arago.conf | 15 ++++++++-------

  1 file changed, 8 insertions(+), 7 deletions(-)
meta-arago-distro/conf/distro/arago.conf +0 -0
index 9164657c..6390a916 100644
@@ -59,13 +59,14 @@ DISTRO_FEATURES_FILTER_NATIVESDK:append = " 

opencl opencv openmp"
  # Set global runtime providers for major components ARAGO_SYSVINIT ?= "0" -VIRTUAL-RUNTIME_dev_manager = "${@["udev", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_init_manager = "${@["sysvinit", "systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_initscripts = "${@["initscripts", "systemd-compat-units"][bool(d.getVar("ARAGO_SYSVINIT"))]}" -VIRTUAL-RUNTIME_initramfs = "${@["sysvinit-initramfs", "systemd-initramfs"][bool(d.getVar("ARAGO_SYSVINIT"))]}"

meta-arago-distro/conf/distro/arago.conf +0 -3
-VIRTUAL-RUNTIME_login_manager = "busybox shadow"
-
-DISTRO_FEATURES:append = "${@[""," 

systemd"][bool(d.getVar("ARAGO_SYSVINIT"))]}" +VIRTUAL-RUNTIME_dev_manager = "${@ 'udev' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}" +VIRTUAL-RUNTIME_init_manager = "${@ 'sysvinit' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd'}" +VIRTUAL-RUNTIME_initscripts = "${@ 'initscripts' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-compat-units'}" +VIRTUAL-RUNTIME_initramfs = "${@ 'sysvinit-initramfs' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'systemd-initramfs'}" +VIRTUAL-RUNTIME_login_manager = "${@ 'busybox' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else 'shadow-base'}" +

Quoted 14 lines
Quoted 8 lines
Quoted 8 lines

+DISTRO_FEATURES:append = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' systemd'}" +DISTRO_FEATURES:remove = "${@ '' if oe.types.boolean(d.getVar('ARAGO_SYSVINIT')) else ' sysvinit'}" # Distro-specific package configuration PACKAGECONFIG:append:pn-systemd = " coredump"

Signature · 1 line
2.40.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#14511): https://lists.yoctoproject.org/g/meta-arago/message/14511
Mute This Topic: https://lists.yoctoproject.org/mt/99370291/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#8 lore raw
Quoted 66 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 65 lines · Ryan Eatmon
Quoted 61 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 48 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 29 lines · Denys Dmytriyenko
Quoted 6 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor
of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals
is how OE used to do things from the early days and I'm well used to that. But
these days using Python if/else directly gained lots of traction, so why not?

Quoted 10 lines

Also fix the virtual provider for login manager. There should only be 1
login provider and it should be shadow-base for systemd *or* busybox for
sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 12 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit"
PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications
when both sysvinit rc script and systemd unit file are provided by a package
and install only one of them. It was better than not having any startup script
for a package at all.

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

Quoted 7 lines

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Quoted 8 lines
Quoted 8 lines

Uh oh...  This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image.  systemd made the rootfs too big to fit within the constraints.

Ah, indeed, that was another reason systemd and sysvinit had to be both enabled in the DISTRO_FEATURES...

Quoted 11 lines
Quoted 7 lines

Nishanth might have more details if you want to debate it.  But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

That's fair. I assumed our sysvinit build images were setting the ARAGO_SYSVINIT variable as part of their base config (or at least something similar).

ARAGO_SYSVINIT flag controls init selection for the main images (default, base, thinlinux...), but tiny and bootstrap images ignore it and directly pull in SysVinit regardless of the selection.

Quoted 1 line

Got a proposal I need to submit about this anyway.

#9 lore raw
Quoted 88 lines · Denys Dmytriyenko
Quoted 66 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 65 lines · Ryan Eatmon
Quoted 61 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 48 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 29 lines · Denys Dmytriyenko
Quoted 6 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor
of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals
is how OE used to do things from the early days and I'm well used to that. But
these days using Python if/else directly gained lots of traction, so why not?

Quoted 10 lines

Also fix the virtual provider for login manager. There should only be 1
login provider and it should be shadow-base for systemd *or* busybox for
sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 12 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit"
PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications
when both sysvinit rc script and systemd unit file are provided by a package
and install only one of them. It was better than not having any startup script
for a package at all.

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

Quoted 7 lines

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Quoted 8 lines
Quoted 8 lines

Uh oh...  This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image.  systemd made the rootfs too big to fit within the constraints.

Ah, indeed, that was another reason systemd and sysvinit had to be both enabled in the DISTRO_FEATURES...

Quoted 8 lines
Quoted 7 lines

Nishanth might have more details if you want to debate it.  But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

Quoted 8 lines
Quoted 3 lines

That's fair. I assumed our sysvinit build images were setting the ARAGO_SYSVINIT variable as part of their base config (or at least something similar).

ARAGO_SYSVINIT flag controls init selection for the main images (default, base, thinlinux...), but tiny and bootstrap images ignore it and directly pull in SysVinit regardless of the selection.

Default, base, thinlinux, etc.. are rather large images, not sure what is gained from SysVinit. And for the super small bring-up images like bootstrap, we use very little from meta-arago. Would it make more sense to move those bring-up images out of Arago? Maybe have a small bring-up- distro layer. Having a distro be both systemd and sysvinit is odd..

Andrew

#10 lore raw
Quoted 93 lines · Andrew Davis via lists.yoctoproject.org
Quoted 92 lines · Denys Dmytriyenko
Quoted 66 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 65 lines · Ryan Eatmon
Quoted 61 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 48 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 29 lines · Denys Dmytriyenko
Quoted 6 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor
of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals
is how OE used to do things from the early days and I'm well used to that. But
these days using Python if/else directly gained lots of traction, so why not?

Quoted 10 lines

Also fix the virtual provider for login manager. There should only be 1
login provider and it should be shadow-base for systemd *or* busybox for
sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 12 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit"
PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications
when both sysvinit rc script and systemd unit file are provided by a package
and install only one of them. It was better than not having any startup script
for a package at all.

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

Quoted 7 lines

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Quoted 8 lines
Quoted 8 lines

Uh oh...  This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image.  systemd made the rootfs too big to fit within the constraints.

Ah, indeed, that was another reason systemd and sysvinit had to be both enabled in the DISTRO_FEATURES...

Quoted 11 lines
Quoted 7 lines

Nishanth might have more details if you want to debate it.  But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

That's fair. I assumed our sysvinit build images were setting the ARAGO_SYSVINIT variable as part of their base config (or at least something similar).

Quoted 7 lines
Quoted 4 lines

ARAGO_SYSVINIT flag controls init selection for the main images (default, base, thinlinux...), but tiny and bootstrap images ignore it and directly pull in SysVinit regardless of the selection.

Default, base, thinlinux, etc.. are rather large images, not sure what is gained from SysVinit.

What is gained is flexibility. When switching to systemd, some customers still wanted to be able to use SysVinit. Not sure if that's still the case though.

Quoted 4 lines

And for the super small bring-up images like
bootstrap, we use very little from meta-arago. Would it make more sense to move those bring-up images out of Arago? Maybe have a small bring-up- distro layer. Having a distro be both systemd and sysvinit is odd..

That would require to build those images separately from the rest of the images and from bundling everything into a single TI SDK tarball. I.e. a multi-step process - build one set of images with one distro, then the rest with a different distro, plus package a bundle tarball. And that will result in a very poor package re-use between the images and 2 flows, since distro-level config changes pretty much invalidate most of shared state...

Signature · 1 line
Denys
#11 lore raw
Quoted 99 lines · Denys Dmytriyenko
Quoted 98 lines · Andrew Davis via lists.yoctoproject.org
Quoted 96 lines · Denys Dmytriyenko
Quoted 66 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 65 lines · Ryan Eatmon
Quoted 61 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 48 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 29 lines · Denys Dmytriyenko
Quoted 6 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor
of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals
is how OE used to do things from the early days and I'm well used to that. But
these days using Python if/else directly gained lots of traction, so why not?

Quoted 10 lines

Also fix the virtual provider for login manager. There should only be 1
login provider and it should be shadow-base for systemd *or* busybox for
sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 12 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit"
PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications
when both sysvinit rc script and systemd unit file are provided by a package
and install only one of them. It was better than not having any startup script
for a package at all.

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

Quoted 7 lines

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Quoted 8 lines
Quoted 8 lines

Uh oh...  This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image.  systemd made the rootfs too big to fit within the constraints.

Ah, indeed, that was another reason systemd and sysvinit had to be both enabled in the DISTRO_FEATURES...

Quoted 11 lines
Quoted 7 lines

Nishanth might have more details if you want to debate it.  But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

That's fair. I assumed our sysvinit build images were setting the ARAGO_SYSVINIT variable as part of their base config (or at least something similar).

ARAGO_SYSVINIT flag controls init selection for the main images (default, base, thinlinux...), but tiny and bootstrap images ignore it and directly pull in SysVinit regardless of the selection.

Quoted 6 lines
Quoted 2 lines

Default, base, thinlinux, etc.. are rather large images, not sure what is gained from SysVinit.

What is gained is flexibility. When switching to systemd, some customers still wanted to be able to use SysVinit. Not sure if that's still the case though.

If they want to use sysvinit, then they can modify the distro configs.

Quoted 6 lines
Quoted 5 lines

And for the super small bring-up images like
bootstrap, we use very little from meta-arago. Would it make more sense to move those bring-up images out of Arago? Maybe have a small bring-up- distro layer. Having a distro be both systemd and sysvinit is odd..

Quoted 7 lines

That would require to build those images separately from the rest of the images and from bundling everything into a single TI SDK tarball. I.e. a multi-step process - build one set of images with one distro, then the rest with a different distro, plus package a bundle tarball. And that will result in a very poor package re-use between the images and 2 flows, since distro-level config changes pretty much invalidate most of shared state...

Then lets not ship those bring-up images with the SDK tarball then. Those are development images, so we should assume folks using them know how to build OE.

I feel like I've suggested this before, I cant figure out what half our images are for as is, maybe we try to cut down the number. We could also name them to match Ubuntu as the 3 we need have similar uses:

* tisdk-default -> Desktop
* tisdk-base -> Server
* tisdk-thinlinux -> IoT

Andrew

#12 lore raw
Quoted 123 lines · Andrew Davis
Quoted 99 lines · Denys Dmytriyenko
Quoted 98 lines · Andrew Davis via lists.yoctoproject.org
Quoted 96 lines · Denys Dmytriyenko
Quoted 66 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 65 lines · Ryan Eatmon
Quoted 61 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 48 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 29 lines · Denys Dmytriyenko
Quoted 6 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor
of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals
is how OE used to do things from the early days and I'm well used to that. But
these days using Python if/else directly gained lots of traction, so why not?

Quoted 10 lines

Also fix the virtual provider for login manager. There should only be 1
login provider and it should be shadow-base for systemd *or* busybox for
sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 12 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit"
PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications
when both sysvinit rc script and systemd unit file are provided by a package
and install only one of them. It was better than not having any startup script
for a package at all.

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

Quoted 7 lines

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Quoted 8 lines
Quoted 8 lines

Uh oh...  This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image.  systemd made the rootfs too big to fit within the constraints.

Ah, indeed, that was another reason systemd and sysvinit had to be both enabled in the DISTRO_FEATURES...

Quoted 11 lines
Quoted 7 lines

Nishanth might have more details if you want to debate it.  But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

That's fair. I assumed our sysvinit build images were setting the ARAGO_SYSVINIT variable as part of their base config (or at least something similar).

ARAGO_SYSVINIT flag controls init selection for the main images (default, base, thinlinux...), but tiny and bootstrap images ignore it and directly pull in SysVinit regardless of the selection.

Quoted 6 lines
Quoted 2 lines

Default, base, thinlinux, etc.. are rather large images, not sure what is gained from SysVinit.

What is gained is flexibility. When switching to systemd, some customers still wanted to be able to use SysVinit. Not sure if that's still the case though.

If they want to use sysvinit, then they can modify the distro configs.

Quoted 6 lines
Quoted 5 lines

And for the super small bring-up images like
bootstrap, we use very little from meta-arago. Would it make more sense to move those bring-up images out of Arago? Maybe have a small bring-up- distro layer. Having a distro be both systemd and sysvinit is odd..

Quoted 7 lines

That would require to build those images separately from the rest of the images and from bundling everything into a single TI SDK tarball. I.e. a multi-step process - build one set of images with one distro, then the rest with a different distro, plus package a bundle tarball. And that will result in a very poor package re-use between the images and 2 flows, since distro-level config changes pretty much invalidate most of shared state...

Quoted 3 lines

Then lets not ship those bring-up images with the SDK tarball then. Those are development images, so we should assume folks using them know how to build OE.

These were requirements from the Ease of Use initiative. You can talk to Nishanth if you do not like the requirements from that project.

Quoted 9 lines

I feel like I've suggested this before, I cant figure out what half our images are for as is, maybe we try to cut down the number. We could also name them to match Ubuntu as the 3 we need have similar uses:

 * tisdk-default   -> Desktop
 * tisdk-base      -> Server
 * tisdk-thinlinux -> IoT

Andrew

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#13 lore raw
In reply to Andrew Davis
Quoted 127 lines · Andrew Davis
Quoted 99 lines · Denys Dmytriyenko
Quoted 98 lines · Andrew Davis via lists.yoctoproject.org
Quoted 96 lines · Denys Dmytriyenko
Quoted 66 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 65 lines · Ryan Eatmon
Quoted 61 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 48 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 29 lines · Denys Dmytriyenko
Quoted 6 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor
of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals
is how OE used to do things from the early days and I'm well used to that. But
these days using Python if/else directly gained lots of traction, so why not?

Quoted 10 lines

Also fix the virtual provider for login manager. There should only be 1
login provider and it should be shadow-base for systemd *or* busybox for
sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 12 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit"
PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications
when both sysvinit rc script and systemd unit file are provided by a package
and install only one of them. It was better than not having any startup script
for a package at all.

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

Quoted 7 lines

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Quoted 8 lines
Quoted 8 lines

Uh oh...  This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image.  systemd made the rootfs too big to fit within the constraints.

Ah, indeed, that was another reason systemd and sysvinit had to be both enabled in the DISTRO_FEATURES...

Quoted 11 lines
Quoted 7 lines

Nishanth might have more details if you want to debate it.  But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

That's fair. I assumed our sysvinit build images were setting the ARAGO_SYSVINIT variable as part of their base config (or at least something similar).

ARAGO_SYSVINIT flag controls init selection for the main images (default, base, thinlinux...), but tiny and bootstrap images ignore it and directly pull in SysVinit regardless of the selection.

Quoted 6 lines
Quoted 2 lines

Default, base, thinlinux, etc.. are rather large images, not sure what is gained from SysVinit.

What is gained is flexibility. When switching to systemd, some customers still wanted to be able to use SysVinit. Not sure if that's still the case though.

If they want to use sysvinit, then they can modify the distro configs.

Quoted 6 lines
Quoted 5 lines

And for the super small bring-up images like
bootstrap, we use very little from meta-arago. Would it make more sense to move those bring-up images out of Arago? Maybe have a small bring-up- distro layer. Having a distro be both systemd and sysvinit is odd..

Quoted 7 lines

That would require to build those images separately from the rest of the images and from bundling everything into a single TI SDK tarball. I.e. a multi-step process - build one set of images with one distro, then the rest with a different distro, plus package a bundle tarball. And that will result in a very poor package re-use between the images and 2 flows, since distro-level config changes pretty much invalidate most of shared state...

Then lets not ship those bring-up images with the SDK tarball then. Those are development images, so we should assume folks using them know how to build OE.

Quoted 7 lines

I feel like I've suggested this before, I cant figure out what half our images are for as is, maybe we try to cut down the number. We could also name them to match Ubuntu as the 3 we need have similar uses:

* tisdk-default -> Desktop
* tisdk-base -> Server
* tisdk-thinlinux -> IoT

We've been back and forth on this - the number of images grew over time, so several years ago we simplified and renamed them and got down to 3 (and there should still be internal Confluence pages with that effort, justification and reasoning):

tisdk-default
tisdk-base
tisdk-tiny

Then later few more were added - thinlinux, bootstrap and bootstrap-base, and there's jailhouse one in the works. I agree there should be better re-use...

Signature · 1 line
Denys
#14 lore raw
In reply to Andrew Davis
Quoted 131 lines · Andrew Davis
Quoted 99 lines · Denys Dmytriyenko
Quoted 98 lines · Andrew Davis via lists.yoctoproject.org
Quoted 96 lines · Denys Dmytriyenko
Quoted 66 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 65 lines · Ryan Eatmon
Quoted 61 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 48 lines · Randolph Sapp via lists.yoctoproject.org
Quoted 29 lines · Denys Dmytriyenko
Quoted 6 lines · On Tue, Jun 06, 2023 at 02:10:19PM -0500, [email protected] wrote:

From: Randolph Sapp <[email protected]>

Make things more readable and reliable by useing the built in boolean check instead of python's type casting. Drop the array indexing in favor
of a more direct if else statememnt.

Heh, it's just a matter of personal preference :) Array indexing conditionals
is how OE used to do things from the early days and I'm well used to that. But
these days using Python if/else directly gained lots of traction, so why not?

Quoted 10 lines

Also fix the virtual provider for login manager. There should only be 1
login provider and it should be shadow-base for systemd *or* busybox for
sysVinit systemd.

Also explicitly remove the sysvinit distro feature if ARAGO_SYSVINIT isn't set, because whatever arago inherits expects sysvinit for some reason. This should fix the duplicate init.d and systemd service files we've been seeing.

How much testing have you done with this change?

Quoted 12 lines

The reason it was done this way is because many packages only provided sysvinit rc scripts and not systemd unit files and we were relying on systemd-sysv-generator to handle those, which has dependency on "sysvinit"
PACKAGECONFIG and DISTRO_FEATURES. There were fixes to handle duplications
when both sysvinit rc script and systemd unit file are provided by a package
and install only one of them. It was better than not having any startup script
for a package at all.

Everything in the layers below us provides both from everything I've seen. The only incompliant layers are meta-arago and maybe something in meta-ti still expecting sysVinit scripts.

Quoted 7 lines

If you set both sysVinit and systemd as a distro feature it actually *confuses* core packages and they end up shipping both, which clash. Systemd typically just resolves this by forcing everything with a sysvinit script into the sysvinit compatibility stage leading to increased boot time because that's all still serialized.

If there are any packages still not compliant that you can find, tell me and I will fix them myself. Seeing mix-matched sysVinit and systemd scripts in the same target makes me irrationally angry.

Quoted 8 lines
Quoted 8 lines

Uh oh...  This patch causes tisdk-tiny-image.bb and tisdk-bootstrap-image.bb to fail:

ERROR: Nothing RPROVIDES 'packagegroup-arago-sysvinit-boot'

I think, if I remember correctly, sysvinit was chosen because of a requirement on the size of the image.  systemd made the rootfs too big to fit within the constraints.

Ah, indeed, that was another reason systemd and sysvinit had to be both enabled in the DISTRO_FEATURES...

Quoted 11 lines
Quoted 7 lines

Nishanth might have more details if you want to debate it.  But there is an internal Confluence page that lists all of the Ease of Use requirement JIRAs.

No one is opposed to moving away from sysvinit, but we need to make sure that we are meeting that requirement.

That's fair. I assumed our sysvinit build images were setting the ARAGO_SYSVINIT variable as part of their base config (or at least something similar).

ARAGO_SYSVINIT flag controls init selection for the main images (default, base, thinlinux...), but tiny and bootstrap images ignore it and directly pull in SysVinit regardless of the selection.

Quoted 6 lines
Quoted 2 lines

Default, base, thinlinux, etc.. are rather large images, not sure what is gained from SysVinit.

What is gained is flexibility. When switching to systemd, some customers still wanted to be able to use SysVinit. Not sure if that's still the case though.

If they want to use sysvinit, then they can modify the distro configs.

Quoted 6 lines
Quoted 5 lines

And for the super small bring-up images like
bootstrap, we use very little from meta-arago. Would it make more sense to move those bring-up images out of Arago? Maybe have a small bring-up- distro layer. Having a distro be both systemd and sysvinit is odd..

Quoted 7 lines

That would require to build those images separately from the rest of the images and from bundling everything into a single TI SDK tarball. I.e. a multi-step process - build one set of images with one distro, then the rest with a different distro, plus package a bundle tarball. And that will result in a very poor package re-use between the images and 2 flows, since distro-level config changes pretty much invalidate most of shared state...

Then lets not ship those bring-up images with the SDK tarball then. Those are development images, so we should assume folks using them know how to build OE.

I feel like I've suggested this before, I cant figure out what half our images are for as is, maybe we try to cut down the number. We could also name them to match Ubuntu as the 3 we need have similar uses:

Quoted 5 lines

 * tisdk-default   -> Desktop
 * tisdk-base      -> Server
 * tisdk-thinlinux -> IoT

Andrew

I agree with Andrew here. For example: having opengl as a distro feature for an image that's not using graphics because they have been conditionally switched off based on the machine or the use case kinda kills the compile time optimizations we're supposed to be getting with yocto and the distro features in general. Those should be conditionally set based on the image being built, and the image should be crafted to cater to that particular use case.

I'm in support of the 3 main targets above, with the additional argument that the rt-kernel should only be available as an option on the iot image as otherwise system processes will be competing with useless userspace tools and demos, racking up latency. Not a good look for our out-of-box rt performance.

Nishanth, any input here?