Re: [OE-core] [PATCH v2] classes: Add a new bbclass that abstracts the generation of FIT blobs

2020-03-27 Thread Alex Kiernan
On Fri, Mar 27, 2020 at 7:16 AM Nandor Han  wrote:
>
> FIT format is very versatile allowing various combination of booting
> sequences. In the same time different U-Boot boot stages can use FIT
> blobs to pack various binaries (e.g. SPL supports reading U-Boot from a
> FIT blob). Because of the allowed level of customization, the generation
> of a FIT blob using a fixed image tree source, becomes challenging and
> increase the level of complexity where different configurations and
> combinations are needed.
>
> This bbclass will know how to generate a FIT blob, leaving the mechanics
> of the process (dependencies, task order...) to be handled by the users
> of the bbclass. In the same time will allow to separate the knowledge of
> the FIT format leaving the user code cleaner and more readable.
>
> Signed-off-by: Nandor Han 
> ---
>
> Notes:
> Testing
> ---
>
> 1. linux-yocto_5.4.bbappend was modified to have the following 
> configuration:
>
> ```
> inherit fit-image
>
> KERNEL_IMAGE_NODE[name] = "kernel"
> KERNEL_IMAGE_NODE[description] = "${PF}"
> KERNEL_IMAGE_NODE[data] = '/incbin/("./arch/${ARCH}/boot/zImage")'
> KERNEL_IMAGE_NODE[type] = "kernel"
> KERNEL_IMAGE_NODE[arch] = "${ARCH}"
> KERNEL_IMAGE_NODE[os] = "linux"
> KERNEL_IMAGE_NODE[compression] = "none"
> KERNEL_IMAGE_NODE[load] = "${UBOOT_LOADADDRESS}"
> KERNEL_IMAGE_NODE[entry] = "${UBOOT_ENTRYPOINT}"
> KERNEL_IMAGE_NODE[hash] = "sha256"
>
> FDT_IMAGE_NODE[name] = "fdt"
> FDT_IMAGE_NODE[description] = "FDT blob"
> FDT_IMAGE_NODE[data] = 
> '/incbin/("./arch/${ARCH}/boot/dts/am335x-bone.dtb")'
> FDT_IMAGE_NODE[type] = "flat_dt"
> FDT_IMAGE_NODE[arch] = "${ARCH}"
> FDT_IMAGE_NODE[compression] = "none"
> FDT_IMAGE_NODE[hash] = "sha256"
>
> CONF1_CONF_NODE[name] = "conf"
> CONF1_CONF_NODE[description] = "Linux kernel and FDT blob"
> CONF1_CONF_NODE[kernel] = "kernel"
> CONF1_CONF_NODE[fdt] = "fdt"
>
> FIT_IMAGES_NODE = "KERNEL_IMAGE_NODE FDT_IMAGE_NODE"
> FIT_CONFIGURATIONS_NODE = "CONF1_CONF_NODE"
> FIT_CONFIGURATIONS_NODE[default] = "${@d.getVarFlag('CONF1_CONF_NODE', 
> 'name') or ""}"
> ```
> 2. Build the kernel: `bitbake virtual/kernel`
> 3. Verify that `image-fit.itb` is present in the build directory: PASS
> 4. Disassemble the image using the command: `dtc -I dtb -O dts 
> image-fit.itb`
> 5. Verify that the FIT source contains the expected configuration: PASS
>

Whilst I'm definitely interested in this, building the its file
through dozens of variables is fragile and ugly...

What I had in a class that I'd started, but hadn't got anything like
this far was something like a .its.in file which got passed through
bitbake's expand.

-- 
Alex Kiernan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136803): 
https://lists.openembedded.org/g/openembedded-core/message/136803
Mute This Topic: https://lists.openembedded.org/mt/72582452/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-Core][RFC PATCH 06/13] systemd: Add PACKAGECONFIG for sysvinit

2020-03-26 Thread Alex Kiernan
On Thu, Mar 26, 2020 at 5:33 PM Adrian Bunk  wrote:
>
> On Thu, Mar 26, 2020 at 03:54:55PM +, Alex Kiernan wrote:
> > On Thu, Mar 26, 2020 at 2:56 PM Adrian Bunk  wrote:
> > > On Thu, Mar 26, 2020 at 08:54:19AM +, Alex Kiernan wrote:
> > > > Add sysvinit PACKAGECONFIG which is bound to DISTRO_FEATURES, this
> > > > then disables all sysvinit handling in systemd if it isn't present.
> > > >
> > > > Consolidate sysvinit handling so that when it's disabled we exclude all
> > > > sysvinit features.
> > > >...
> > >
> > > What exactly are "sysvinit handling" and "sysvinit features"?
> > >
> > > It seems to disable systemd-sysv-generator, and this is wrong.
> >
> > Like this it sets HAVE_SYSV_COMPAT which does disable
> > systemd-sysv-generator, but if sysvinit is disabled completely in the
> > distro, I'm missing why that's a bad thing?
> >
> > Or have I misunderstood what sysvinit in DISTRO_FEATURES is meant to
> > mean?
>
> sysvinit in DISTRO_FEATURES means that sysvinit is supported as init system.
>
> > I'd taken in that sysvinit not present in DISTRO_FEATURES meant
> > that packages should install systemd units, not rely on init scripts.
>
> Packages that do provide both are not the relevant ones.
>
> For packages that can provide both, if the init script gets installed
> it is ignored by systemd when there is also a systemd unit.
>
> systemd-sysv-generator provides support for packages that do not
> (yet) provide a systemd unit, only an init script.
>
> Disabling this could save a few bytes on a small system when no
> installed package needs it, but this is not in any way related
> to sysvinit in DISTRO_FEATURES.
>

That's the piece of context I'm missing then... so whilst adding
sysvinit as a PACKAGECONFIG is valid, it shouldn't be linked to
DISTRO_FEATURES?

-- 
Alex Kiernan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136766): 
https://lists.openembedded.org/g/openembedded-core/message/136766
Mute This Topic: https://lists.openembedded.org/mt/72560006/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-Core][RFC PATCH 06/13] systemd: Add PACKAGECONFIG for sysvinit

2020-03-26 Thread Alex Kiernan
On Thu, Mar 26, 2020 at 2:56 PM Adrian Bunk  wrote:
>
> On Thu, Mar 26, 2020 at 08:54:19AM +, Alex Kiernan wrote:
> > Add sysvinit PACKAGECONFIG which is bound to DISTRO_FEATURES, this
> > then disables all sysvinit handling in systemd if it isn't present.
> >
> > Consolidate sysvinit handling so that when it's disabled we exclude all
> > sysvinit features.
> >...
>
> What exactly are "sysvinit handling" and "sysvinit features"?
>
> It seems to disable systemd-sysv-generator, and this is wrong.
>

Like this it sets HAVE_SYSV_COMPAT which does disable
systemd-sysv-generator, but if sysvinit is disabled completely in the
distro, I'm missing why that's a bad thing?

Or have I misunderstood what sysvinit in DISTRO_FEATURES is meant to
mean? I'd taken in that sysvinit not present in DISTRO_FEATURES meant
that packages should install systemd units, not rely on init scripts.

-- 
Alex Kiernan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136759): 
https://lists.openembedded.org/g/openembedded-core/message/136759
Mute This Topic: https://lists.openembedded.org/mt/72560006/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 10/13] systemd: Enable acl based on DISTRO_FEATURES

2020-03-26 Thread Alex Kiernan
Signed-off-by: Alex Kiernan 
Acked-by: Otavio Salvador 
---

Changes in v2: None

 meta/recipes-core/systemd/systemd_244.3.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index 2031f5d592df..ad148628715a 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -56,10 +56,9 @@ PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-${@bb.utils.filter('DISTRO_FEATURES', 'audit efi ldconfig pam selinux 
smack sysvinit usrmerge polkit', d)} \
+${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux 
smack sysvinit usrmerge polkit', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
-acl \
 backlight \
 binfmt \
 gshadow \
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136739): 
https://lists.openembedded.org/g/openembedded-core/message/136739
Mute This Topic: https://lists.openembedded.org/mt/72560010/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 01/13] systemd: Use PACKAGE_BEFORE_PN, not =+

2020-03-26 Thread Alex Kiernan
By using PACKAGE_BEFORE_PN rather than =+ it's clearer how we expect the
package ordering to work. It also avoids the possibilty that dev/dbg/etc.
artefacts attempt to package as part of these packages.

Signed-off-by: Alex Kiernan 
---

Changes in v2:
- new (use PACKAGE_BEFORE_PN)

 meta/recipes-core/systemd/systemd_244.3.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index c5c0ce4bad05..f0cf102dc250 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -305,7 +305,7 @@ python populate_packages_prepend (){
 }
 PACKAGES_DYNAMIC += "^lib(udev|systemd|nss).*"
 
-PACKAGES =+ "\
+PACKAGE_BEFORE_PN = "\
 ${PN}-gui \
 ${PN}-vconsole-setup \
 ${PN}-initramfs \
@@ -319,6 +319,8 @@ PACKAGES =+ "\
 ${PN}-journal-upload \
 ${PN}-journal-remote \
 ${PN}-extra-utils \
+udev \
+udev-hwdb \
 "
 
 SUMMARY_${PN}-container = "Tools for containers and VMs"
@@ -578,8 +580,6 @@ INSANE_SKIP_${PN} += "dev-so libdir"
 INSANE_SKIP_${PN}-dbg += "libdir"
 INSANE_SKIP_${PN}-doc += " libdir"
 
-PACKAGES =+ "udev udev-hwdb"
-
 RPROVIDES_udev = "hotplug"
 
 RDEPENDS_udev-hwdb += "udev"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136730): 
https://lists.openembedded.org/g/openembedded-core/message/136730
Mute This Topic: https://lists.openembedded.org/mt/7256/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 13/13] systemd: upgrade v244.3 -> v245.2

2020-03-26 Thread Alex Kiernan
Refresh patches for v245, enable userdb by default. Update musl patches
for additional missing stdlib headers. Add musl patch to avoid gshadow.

Commits:

  d1d3f2aa1561 docs: Add syntax for templated units to systemd.preset man page
  3c69813c69af man: add a tiny bit of markup
  bf595e788c56 home: fix segfault when parsing arguments in PAM module
  e110f4dacb6d test: wait a bit after starting the test service
  e8df08cfdb20 fix journalctl regression (#15099)
  eb3a38cc23b2 NEWS: add late note about job trimming issue
  405f0fcfddb2 systemctl: hide the 'glyph' column when --no-legend is requested
  1c7de81f89ef format-table: allow hiding a specific column
  b7f2308bda49 core: transition to FINAL_SIGTERM state after ExecStopPost=
  2867dfbf70a5 journalctl: show duplicate entries if they are from the same 
file (#14898)
  af339a3122be namespace: ignore prefix chars when comparing paths
  d58988be7fab udev: fix SECLABEL{selinux} issue (#15064)
  98f8a718c161 dissect-image: avoid scanning partitions
  35c4d42040ec test: ignore IAB capabilities in `test-execute`
  40737329d960 test: add a test case for migrating DynamicUser=yes to no
  705938529062 execute: Fix migration from DynamicUser=yes to no
  ec458d20b268 homed: replace "home directory" with "home area" in a few places
  20a7592edf5f shared/ask-password-api: do not show hint on echo
  084df9c616fd analyze: fix table time output
  9251cac7b296 Support compiling with clang and gnu11 standard
  ffccc15f725f Typo fix
  1777c7f70d4d Update Croatian translation (#15042)
  73678d230704 boot: Ensure ARM UEFI binary does not contain FP/SIMD 
instructions
  b7cf4b4ef5d0 core: Fix resolution of nested DM devices for cgroups
  57680ddd4035 Fix typo on initrd-root-device.target
  03985d069b52 NEWS: final contributor update for v245
  0d5aef3eb513 hwdb: update for v245
  9cbf1e58f962 units: skip modprobe@.service if the unit appears to be already 
loaded
  ff12a7954c19 treewide: more portable bash shebangs
  eda0cbf07186 Use Finished instead of Started for Type=oneshot services 
(#14851)
  d48eea583fd8 units: make systemd-network-generator.service stay around
  94c3a838da69 systemctl: make list-dependencies take multiple arguments
  82c8bdff122d man: mention networkctl in the networkd man page
  4a29c185b7fe man: add systemd-network-generator.service(8)
  9fd32ff7d363 units: restore RemainAfterExit=yes in 
systemd-vconsole-setup.service
  44e5d00603a8 pid1: remove unnecessary terminator
  5403e153372e man: update list of supported controllers
  a3558e795203 units: do not ignore return value from systemd --user
  df883de98a88 pid1, nspawn: voidify loopback_setup()
  fd74a13e85ac timesync, meson: allow statically linked build
  dbf2801f5ac4 systemctl: do not print items twice in list-dependencies
  dd0395b5654c make namespace_flags_to_string() not return empty string
  e31b6bd02050 lgtm: drop the TMPDIR/meson workaround
  d4de2b2afff6 man: document that .link/.network/.netdev files have the usual 
ini syntax
  870d38dca90b docs: add .link/.network/.netdev files to interface stability 
chart
  c7fe06fb0a00 man: document the default value for IPv6AcceptRA=
  cd517eb7310d man: specify that Domains= is a space-separated list
  1699f5378896 hwdb: add corrections for Olimex Teres-I to keyboard hwdb
  105a1a36cd6e tree-wide: fix spelling of lookup and setup verbs
  33eb1f24978c tree-wide: drop printk.devkmsg=on setting in various places
  a345d5c1c9b2 man,mkosi: use glibc-minimal-langpack for Fedora
  95d311faea78 man: bump fedora versions
  1c5b427f5d36 hwdb: 60-sensor.hwdb: Add proximity sensor udev property (#14845)
  fdb0405edd90 selinux: check return value of string_to_security_class()
  81d4a026a61c drop unused translations
  d015652944b5 update Russian translation
  1fb5a5edc7c1 sysusers: do not require /proc to be mounted
  a100fe3c279b NEWS: Use correct tense in v245 entry
  6cb356ca9fe0 basic/fs-util: add a version of chmod_and_chown that doesn not 
use  /proc
  08c7c3216bd5 sysusers: many different errnos to express one condition
  d54bb638750c NEWS: two minor entries
  9c4d3d796825 NEWS: update contributors list
  8193040362e8 hwdb: update for v245-rc2
  a75b21175078 network: Move config_parse_ip_service_type to networkd-dhcp4.c 
and rename
  2b43402c8477 ask-password-api: drop unneeded parentheses
  86fca584c38f core/execute: use return value from sockaddr_un_set_path(), 
remove duplicate check
  425d925f24a6 homed,userdb: don't use sockaddr_un_set_path() on fixed addresses
  f36a9d590901 tree-wide: use the return value from sockaddr_un_set_path()
  0f1886872362 test-sizeof: print size socklen_t
  64177e9e4e8b journald: fix forwarding to syslog
  3b355677b8cc RequireMountsFor in systemd-nspawn should wait for machine mount
  27f31daf3e22 shared/logs-show: Remove unused OUTPUT_FOLLOW
  ef62949a23a2 network: make Type=ether match based on iftype
  834ea1a4665f test-network: remove unnecessary dummy interface
  2cd651066133 man: fix typo
  f4665664c4ff units: 

[OE-Core][RFC PATCH 08/13] systemd: Enable smack based on DISTRO_FEATURES

2020-03-26 Thread Alex Kiernan
Signed-off-by: Alex Kiernan 
Acked-by: Otavio Salvador 
---

Changes in v2: None

 meta/recipes-core/systemd/systemd_244.3.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index db41791cdf24..d398cdef18a4 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -56,7 +56,7 @@ PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux sysvinit 
usrmerge polkit', d)} \
+${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux smack 
sysvinit usrmerge polkit', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
 acl \
@@ -80,7 +80,6 @@ PACKAGECONFIG ??= " \
 randomseed \
 resolved \
 set-time-epoch \
-smack \
 sysusers \
 timedated \
 timesyncd \
@@ -97,7 +96,6 @@ PACKAGECONFIG_remove_libc-musl = " \
 nss \
 nss-mymachines \
 nss-resolve \
-smack \
 sysusers \
 utmp \
 "
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136737): 
https://lists.openembedded.org/g/openembedded-core/message/136737
Mute This Topic: https://lists.openembedded.org/mt/72560008/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 09/13] systemd: Enable audit based on DISTRO_FEATURES

2020-03-26 Thread Alex Kiernan
Signed-off-by: Alex Kiernan 
Acked-by: Otavio Salvador 
---

Changes in v2: None

 meta/recipes-core/systemd/systemd_244.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index d398cdef18a4..2031f5d592df 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -56,7 +56,7 @@ PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux smack 
sysvinit usrmerge polkit', d)} \
+${@bb.utils.filter('DISTRO_FEATURES', 'audit efi ldconfig pam selinux 
smack sysvinit usrmerge polkit', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
 acl \
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136738): 
https://lists.openembedded.org/g/openembedded-core/message/136738
Mute This Topic: https://lists.openembedded.org/mt/72560009/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 07/13] systemd: Remove X11 related files when disabled

2020-03-26 Thread Alex Kiernan
When X11 isn't in DISTRO_FEATURES, remove X11 related files.

Signed-off-by: Alex Kiernan 
Acked-by: Otavio Salvador 
---

Changes in v2: None

 meta/recipes-core/systemd/systemd_244.3.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index 79794322ba08..db41791cdf24 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -274,6 +274,10 @@ do_install() {
sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - 
- ../run/systemd/resolve/resolv.conf%g" 
${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
ln -s ../run/systemd/resolve/resolv.conf 
${D}${sysconfdir}/resolv-conf.systemd
fi
+   if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; 
then
+   rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf
+   rm -r ${D}${sysconfdir}/X11
+   fi
 
# If polkit is setup fixup permissions and ownership
if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', 
d)}; then
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136736): 
https://lists.openembedded.org/g/openembedded-core/message/136736
Mute This Topic: https://lists.openembedded.org/mt/72560007/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 11/13] psplash: Set RemainAfterExit on systemd units

2020-03-26 Thread Alex Kiernan
psplash is only expected to run during startup, but if any dependency is
pulled into a transaction and the unit is inactive, then it can be
restarted.

Set RemainAfterExit to ensure that the unit remains active and is not
gratuitously restarted.

Drop the nonexistent systemd-start.service from the unit.

Signed-off-by: Alex Kiernan 
Acked-by: Otavio Salvador 
---

Changes in v2: None

 meta/recipes-core/psplash/files/psplash-start.service   | 1 +
 meta/recipes-core/psplash/files/psplash-systemd.service | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/psplash/files/psplash-start.service 
b/meta/recipes-core/psplash/files/psplash-start.service
index a8c97c7a7576..36c2bb38e072 100644
--- a/meta/recipes-core/psplash/files/psplash-start.service
+++ b/meta/recipes-core/psplash/files/psplash-start.service
@@ -6,6 +6,7 @@ RequiresMountsFor=/run
 [Service]
 Type=notify
 ExecStart=/usr/bin/psplash
+RemainAfterExit=yes
 
 [Install]
 WantedBy=sysinit.target
diff --git a/meta/recipes-core/psplash/files/psplash-systemd.service 
b/meta/recipes-core/psplash/files/psplash-systemd.service
index 4e18980bb271..082207f2324a 100644
--- a/meta/recipes-core/psplash/files/psplash-systemd.service
+++ b/meta/recipes-core/psplash/files/psplash-systemd.service
@@ -1,13 +1,13 @@
 [Unit]
 Description=Start psplash-systemd progress communication helper
 DefaultDependencies=no
-After=systemd-start.service
 After=psplash-start.service
 Requires=psplash-start.service
 RequiresMountsFor=/run
 
 [Service]
 ExecStart=/usr/bin/psplash-systemd
+RemainAfterExit=yes
 
 [Install]
 WantedBy=sysinit.target
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136740): 
https://lists.openembedded.org/g/openembedded-core/message/136740
Mute This Topic: https://lists.openembedded.org/mt/72560011/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 00/13] Systemd 245 and related updates

2020-03-26 Thread Alex Kiernan
Throwing these out there, so that anyone else who's looking at systemd
245 doesn't have to repeat the work, equally now is clearly not the time
to be applying these to master!

Not all of these are stricly related to systemd 245.

Changes in v2:
- new (use PACKAGE_BEFORE_PN)
- new (s/nonarch_base_libdir/rootlibexecdir/)
- sysvinit: moved update-rc.d RDEPENDS to PACKAGECONFIG
- move systemd 245 upgrade to last in series
- update to systemd 245.2

Alex Kiernan (13):
  systemd: Use PACKAGE_BEFORE_PN, not =+
  systemd: Package udev rules explicitly
  systemd: Replace nonarch_base_libdir with rootlibexecdir
  systemd: Reinstate systemd-hwdb-update.service
  systemd: Add sch-fq-codel to RRECOMMENDS
  systemd: Add PACKAGECONFIG for sysvinit
  systemd: Remove X11 related files when disabled
  systemd: Enable smack based on DISTRO_FEATURES
  systemd: Enable audit based on DISTRO_FEATURES
  systemd: Enable acl based on DISTRO_FEATURES
  psplash: Set RemainAfterExit on systemd units
  oeqa/runtime/cases: Disable and stop systemd-timesyncd
  systemd: upgrade v244.3 -> v245.2

 meta/lib/oeqa/runtime/cases/date.py   |   4 +-
 .../psplash/files/psplash-start.service   |   1 +
 .../psplash/files/psplash-systemd.service |   2 +-
 ...md-boot_244.3.bb => systemd-boot_245.2.bb} |   0
 ...md-conf_244.3.bb => systemd-conf_245.2.bb} |   0
 meta/recipes-core/systemd/systemd.inc |   4 +-
 .../systemd/0001-Handle-missing-gshadow.patch | 171 ++
 ...tall-dependency-links-at-install-tim.patch |  14 +-
 ...-not-disable-buffer-in-writing-files.patch |  46 ++---
 ...002-don-t-use-glibc-specific-qsort_r.patch |  12 +-
 ...k-parse_printf_format-implementation.patch |  10 +-
 ...set-util.h-add-__cpu_mask-definition.patch |   8 +-
 ...missing.h-check-for-missing-strndupa.patch |  93 ++
 .../0006-Include-netinet-if_ether.h.patch |  41 +++--
 ..._register_atfork-for-non-glibc-build.patch |   6 +-
 ...11-Use-uintmax_t-for-handling-rlim_t.patch |  10 +-
 ...sable-tests-for-missing-typedefs-in-.patch |   8 +-
 ...uffering-when-writing-to-oom_score_a.patch |   8 +-
 .../{systemd_244.3.bb => systemd_245.2.bb}|  82 ++---
 scripts/postinst-intercepts/update_udev_hwdb  |  16 +-
 20 files changed, 383 insertions(+), 153 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.3.bb => 
systemd-boot_245.2.bb} (100%)
 rename meta/recipes-core/systemd/{systemd-conf_244.3.bb => 
systemd-conf_245.2.bb} (100%)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
 rename meta/recipes-core/systemd/{systemd_244.3.bb => systemd_245.2.bb} (90%)

-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136729): 
https://lists.openembedded.org/g/openembedded-core/message/136729
Mute This Topic: https://lists.openembedded.org/mt/7255/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 05/13] systemd: Add sch-fq-codel to RRECOMMENDS

2020-03-26 Thread Alex Kiernan
systemd sets net.core.default_qdisc = fq_codel, include
kernel-module-sch-fq-codel in RRECOMMENDS to satify this

Signed-off-by: Alex Kiernan 
Acked-by: Otavio Salvador 
---

Changes in v2: None

 meta/recipes-core/systemd/systemd_244.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index 4ee20f85c21f..bb75aa0b9b2b 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -567,7 +567,7 @@ RDEPENDS_${PN} += "volatile-binds update-rc.d"
 RRECOMMENDS_${PN} += "systemd-extra-utils \
   systemd-compat-units udev-hwdb \
   e2fsprogs-e2fsck \
-  kernel-module-autofs4 kernel-module-unix 
kernel-module-ipv6 \
+  kernel-module-autofs4 kernel-module-unix 
kernel-module-ipv6 kernel-module-sch-fq-codel \
   os-release \
   systemd-conf \
 "
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136734): 
https://lists.openembedded.org/g/openembedded-core/message/136734
Mute This Topic: https://lists.openembedded.org/mt/72560005/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 04/13] systemd: Reinstate systemd-hwdb-update.service

2020-03-26 Thread Alex Kiernan
systemd supports a distribution hwdb.bin in /usr/lib/udev/hwdb.bin,
which is used if /etc/udev/hwdb.bin is not present. When generating the
install time hwdb, for systemd, ensure that we put it in /usr/lib/udev,
which then ensures that at boot time we do not regenerate it, unless the
system is marked for update.

This allows fragments dropped into /etc/udev/hwdb.d to be processed
correctly, but without requiring a first boot time build:

root@qemumips:~# systemctl status systemd-hwdb-update.service
* systemd-hwdb-update.service - Rebuild Hardware Database
 Loaded: loaded (/usr/lib/systemd/system/systemd-hwdb-update.service; 
static; vendor preset: disabled)
 Active: inactive (dead)
  Condition: start condition failed at Wed 2020-03-04 15:18:11 UTC; 44s ago
 |- ConditionPathExists=|!/usr/lib/udev/hwdb.bin was not met
 |- ConditionPathExists=|/etc/udev/hwdb.bin was not met
 `- ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d was not met
   Docs: man:hwdb(7)
 man:systemd-hwdb(8)

Signed-off-by: Alex Kiernan 
Acked-by: Otavio Salvador 
---

Changes in v2: None

 meta/recipes-core/systemd/systemd_244.3.bb   | 10 --
 scripts/postinst-intercepts/update_udev_hwdb | 16 ++--
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index 214eee316b63..4ee20f85c21f 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -293,10 +293,6 @@ do_install() {
# install default policy for presets
# https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
install -Dm 0644 ${WORKDIR}/99-default.preset 
${D}${systemd_unitdir}/system-preset/99-default.preset
-
-# We use package postinsts for the hwdb update, as the update service is
-# easily triggered for no reason and will slow down boots.
-find ${D} -name systemd-hwdb-update.service -delete
 }
 
 python populate_packages_prepend (){
@@ -636,7 +632,9 @@ FILES_udev += "${base_sbindir}/udevd \
${datadir}/bash-completion/completions/udevadm \
   "
 
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
+   ${systemd_unitdir}/system/systemd-hwdb-update.service \
+   "
 
 RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 
'resolved', 'resolvconf', '', d)}"
 
@@ -696,7 +694,7 @@ pkg_prerm_${PN}_libc-glibc () {
 PACKAGE_WRITE_DEPS += "qemu-native"
 pkg_postinst_udev-hwdb () {
if test -n "$D"; then
-   $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} 
mlprefix=${MLPREFIX} binprefix=${MLPREFIX}
+   $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} 
mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" 
PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}"
else
udevadm hwdb --update
fi
diff --git a/scripts/postinst-intercepts/update_udev_hwdb 
b/scripts/postinst-intercepts/update_udev_hwdb
index c4fb2bffcbf0..102e99b94725 100644
--- a/scripts/postinst-intercepts/update_udev_hwdb
+++ b/scripts/postinst-intercepts/update_udev_hwdb
@@ -5,5 +5,17 @@
 
 set -e
 
-PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D 
$D${libexecdir}/${binprefix}udevadm hwdb --update --root $D
-chown root:root $D${sysconfdir}/udev/hwdb.bin
+case "${PREFERRED_PROVIDER_udev}" in
+   systemd)
+   UDEV_EXTRA_ARGS="--usr"
+   UDEVLIBDIR="${rootlibexecdir}"
+   ;;
+
+   *)
+   UDEV_EXTRA_ARGS=""
+   UDEVLIBDIR="${sysconfdir}"
+   ;;
+esac
+
+PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D 
$D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS}
+chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136733): 
https://lists.openembedded.org/g/openembedded-core/message/136733
Mute This Topic: https://lists.openembedded.org/mt/72560004/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 02/13] systemd: Package udev rules explicitly

2020-03-26 Thread Alex Kiernan
udev is packaged before systemd so any wildcard inclusions in FILES will
override later specifics. List all udev rules explicitly so that the
systemd specific rules, packaged alongside systemd, appear in the
correct package.

Signed-off-by: Alex Kiernan 
---

Changes in v2: None

 meta/recipes-core/systemd/systemd_244.3.bb | 28 +-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index f0cf102dc250..809dbcb9a69b 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -599,7 +599,33 @@ FILES_udev += "${base_sbindir}/udevd \
${rootlibexecdir}/udev/scsi_id \
${rootlibexecdir}/udev/v4l_id \
${rootlibexecdir}/udev/keymaps \
-   ${rootlibexecdir}/udev/rules.d/*.rules \
+   ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
+   ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \
+   ${rootlibexecdir}/udev/rules.d/60-block.rules \
+   ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
+   ${rootlibexecdir}/udev/rules.d/60-drm.rules \
+   ${rootlibexecdir}/udev/rules.d/60-evdev.rules \
+   ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \
+   ${rootlibexecdir}/udev/rules.d/60-input-id.rules \
+   ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
+   ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
+   ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
+   ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules 
\
+   ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \
+   ${rootlibexecdir}/udev/rules.d/60-sensor.rules \
+   ${rootlibexecdir}/udev/rules.d/60-serial.rules \
+   ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \
+   ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
+   ${rootlibexecdir}/udev/rules.d/70-joystick.rules \
+   ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
+   ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
+   ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
+   ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
+   ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
+   ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
+   ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
+   ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
+   ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
${sysconfdir}/udev \
${sysconfdir}/init.d/systemd-udevd \
${systemd_unitdir}/system/*udev* \
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136731): 
https://lists.openembedded.org/g/openembedded-core/message/136731
Mute This Topic: https://lists.openembedded.org/mt/72560001/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 06/13] systemd: Add PACKAGECONFIG for sysvinit

2020-03-26 Thread Alex Kiernan
Add sysvinit PACKAGECONFIG which is bound to DISTRO_FEATURES, this
then disables all sysvinit handling in systemd if it isn't present.

Consolidate sysvinit handling so that when it's disabled we exclude all
sysvinit features.

Signed-off-by: Alex Kiernan 
---

Changes in v2:
- sysvinit: moved update-rc.d RDEPENDS to PACKAGECONFIG

 meta/recipes-core/systemd/systemd_244.3.bb | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index bb75aa0b9b2b..79794322ba08 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -56,7 +56,7 @@ PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge 
polkit', d)} \
+${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux sysvinit 
usrmerge polkit', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
 acl \
@@ -165,6 +165,7 @@ PACKAGECONFIG[seccomp] = 
"-Dseccomp=true,-Dseccomp=false,libseccomp"
 PACKAGECONFIG[selinux] = 
"-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
 PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
 PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
+PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d 
-Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path=,,update-rc.d"
 # When enabled use reproducble build timestamp if set as time epoch,
 # or build time if not. When disabled, time epoch is unset.
 def build_epoch(d):
@@ -198,7 +199,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
   -Dnobody-group=nobody \
   -Drootlibdir=${rootlibdir} \
   -Drootprefix=${rootprefix} \
-  -Dsysvrcnd-path=${sysconfdir} \
   -Ddefault-locale=C \
   "
 
@@ -234,6 +234,7 @@ do_install() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init 
${D}${sysconfdir}/init.d/systemd-udevd
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% 
${D}${sysconfdir}/init.d/systemd-udevd
+   install -Dm 0755 
${S}/src/systemctl/systemd-sysv-install.SKELETON 
${D}${systemd_unitdir}/systemd-sysv-install
fi
 
chown root:systemd-journal ${D}/${localstatedir}/log/journal
@@ -273,7 +274,6 @@ do_install() {
sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - 
- ../run/systemd/resolve/resolv.conf%g" 
${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
ln -s ../run/systemd/resolve/resolv.conf 
${D}${sysconfdir}/resolv-conf.systemd
fi
-   install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON 
${D}${systemd_unitdir}/systemd-sysv-install
 
# If polkit is setup fixup permissions and ownership
if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', 
d)}; then
@@ -562,7 +562,7 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la 
${datadir}/dbus-1/interfaces/ $
 
 RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= 
${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
 RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 
'serial-getty-generator', '', 'systemd-serialgetty', d)}"
-RDEPENDS_${PN} += "volatile-binds update-rc.d"
+RDEPENDS_${PN} += "volatile-binds"
 
 RRECOMMENDS_${PN} += "systemd-extra-utils \
   systemd-compat-units udev-hwdb \
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136735): 
https://lists.openembedded.org/g/openembedded-core/message/136735
Mute This Topic: https://lists.openembedded.org/mt/72560006/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 03/13] systemd: Replace nonarch_base_libdir with rootlibexecdir

2020-03-26 Thread Alex Kiernan
Use rootlibexecdir consistently rather than nonarch_base_libdir for udev
rules.

Signed-off-by: Alex Kiernan 
---

Changes in v2:
- new (s/nonarch_base_libdir/rootlibexecdir/)

 meta/recipes-core/systemd/systemd_244.3.bb | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index 809dbcb9a69b..214eee316b63 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -546,11 +546,11 @@ FILES_${PN} = " ${base_bindir}/* \
 ${exec_prefix}/lib/sysusers.d \
 ${exec_prefix}/lib/environment.d \
 ${localstatedir} \
-${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
-${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
-${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
-${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
-${nonarch_base_libdir}/modprobe.d/systemd.conf \
+${rootlibexecdir}/udev/rules.d/70-uaccess.rules \
+${rootlibexecdir}/udev/rules.d/71-seat.rules \
+${rootlibexecdir}/udev/rules.d/73-seat-late.rules \
+${rootlibexecdir}/udev/rules.d/99-systemd.rules \
+${rootlibexecdir}/modprobe.d/systemd.conf \
 ${datadir}/dbus-1/system.d/org.freedesktop.timedate1.conf \
 ${datadir}/dbus-1/system.d/org.freedesktop.locale1.conf \
 ${datadir}/dbus-1/system.d/org.freedesktop.network1.conf \
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136732): 
https://lists.openembedded.org/g/openembedded-core/message/136732
Mute This Topic: https://lists.openembedded.org/mt/72560002/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


[OE-Core][RFC PATCH 12/13] oeqa/runtime/cases: Disable and stop systemd-timesyncd

2020-03-26 Thread Alex Kiernan
Stopping systemd-timesyncd doesn't prevent it being restarted by a
different transaction within systemd. Disable the service instead during
the date test to ensure it can't be restarted.

Signed-off-by: Alex Kiernan 
Acked-by: Otavio Salvador 
---

Changes in v2: None

 meta/lib/oeqa/runtime/cases/date.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/date.py 
b/meta/lib/oeqa/runtime/cases/date.py
index 7750a7293f8e..fdd2a6ae587e 100644
--- a/meta/lib/oeqa/runtime/cases/date.py
+++ b/meta/lib/oeqa/runtime/cases/date.py
@@ -13,12 +13,12 @@ class DateTest(OERuntimeTestCase):
 def setUp(self):
 if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
 self.logger.debug('Stopping systemd-timesyncd daemon')
-self.target.run('systemctl stop systemd-timesyncd')
+self.target.run('systemctl disable --now systemd-timesyncd')
 
 def tearDown(self):
 if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
 self.logger.debug('Starting systemd-timesyncd daemon')
-self.target.run('systemctl start systemd-timesyncd')
+self.target.run('systemctl enable --now systemd-timesyncd')
 
 @OETestDepends(['ssh.SSHTest.test_ssh'])
 @OEHasPackage(['coreutils', 'busybox'])
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#136741): 
https://lists.openembedded.org/g/openembedded-core/message/136741
Mute This Topic: https://lists.openembedded.org/mt/72560012/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [OE-core] [OE-Core][RFC PATCH 01/11] systemd: Package udev rules explicitly

2020-03-18 Thread Alex Kiernan
On Wed, Mar 18, 2020 at 3:02 AM Otavio Salvador
 wrote:
>
> On Tue, Mar 17, 2020 at 12:29 PM Alex Kiernan  wrote:
> > udev is packaged before systemd so any wildcard inclusions in FILES will
> > override later specifics. List all udev rules explicitly so that the
> > systemd specific rules, packaged alongside systemd, appear in the
> > correct package.
> >
> > Signed-off-by: Alex Kiernan 
>
> I believe udev ought to be on PACKAGE_BEFORE_PN so it is still handled
> with the wildcard and allow for easier maintenance in future.
>

It's done with an =+ at the moment, replacing it with
PACKAGE_BEFORE_PN would certainly make it clearer (and avoid holes
where dev/dbg stuff could leak through). But I don't think that helps
with the greedy wildcard problem - we have:

FILES_udev += "...
   ${rootlibexecdir}/udev/rules.d/*.rules \

and

FILES_${PN} = " ...
${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \

Where the FILES_udev consumes all the rules before ${PN} gets a look
in, unless there's some magic I'm overlooking?

The inconsistent path usage wants fixing too... I'd not noticed that before!

--
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 11/11] systemd: Enable acl based on DISTRO_FEATURES

2020-03-17 Thread Alex Kiernan
Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/systemd/systemd_245.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_245.bb 
b/meta/recipes-core/systemd/systemd_245.bb
index 72021a0991ae..09ea07833d71 100644
--- a/meta/recipes-core/systemd/systemd_245.bb
+++ b/meta/recipes-core/systemd/systemd_245.bb
@@ -57,10 +57,9 @@ PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-${@bb.utils.filter('DISTRO_FEATURES', 'audit efi ldconfig pam selinux 
smack sysvinit usrmerge polkit', d)} \
+${@bb.utils.filter('DISTRO_FEATURES', 'acl audit efi ldconfig pam selinux 
smack sysvinit usrmerge polkit', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
-acl \
 backlight \
 binfmt \
 gshadow \
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 09/11] systemd: Enable smack based on DISTRO_FEATURES

2020-03-17 Thread Alex Kiernan
Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/systemd/systemd_245.bb | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_245.bb 
b/meta/recipes-core/systemd/systemd_245.bb
index 19a8f0cb18af..a7fae930f770 100644
--- a/meta/recipes-core/systemd/systemd_245.bb
+++ b/meta/recipes-core/systemd/systemd_245.bb
@@ -57,7 +57,7 @@ PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux sysvinit 
usrmerge polkit', d)} \
+${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux smack 
sysvinit usrmerge polkit', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
 acl \
@@ -81,7 +81,6 @@ PACKAGECONFIG ??= " \
 randomseed \
 resolved \
 set-time-epoch \
-smack \
 sysusers \
 timedated \
 timesyncd \
@@ -99,7 +98,6 @@ PACKAGECONFIG_remove_libc-musl = " \
 nss \
 nss-mymachines \
 nss-resolve \
-smack \
 sysusers \
 userdb \
 utmp \
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 06/11] psplash: Set RemainAfterExit on systemd units

2020-03-17 Thread Alex Kiernan
psplash is only expected to run during startup, but if any dependency is
pulled into a transaction and the unit is inactive, then it can be
restarted.

Set RemainAfterExit to ensure that the unit remains active and is not
gratuitously restarted.

Drop the nonexistent systemd-start.service from the unit.

Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/psplash/files/psplash-start.service   | 1 +
 meta/recipes-core/psplash/files/psplash-systemd.service | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/psplash/files/psplash-start.service 
b/meta/recipes-core/psplash/files/psplash-start.service
index a8c97c7a7576..36c2bb38e072 100644
--- a/meta/recipes-core/psplash/files/psplash-start.service
+++ b/meta/recipes-core/psplash/files/psplash-start.service
@@ -6,6 +6,7 @@ RequiresMountsFor=/run
 [Service]
 Type=notify
 ExecStart=/usr/bin/psplash
+RemainAfterExit=yes
 
 [Install]
 WantedBy=sysinit.target
diff --git a/meta/recipes-core/psplash/files/psplash-systemd.service 
b/meta/recipes-core/psplash/files/psplash-systemd.service
index 4e18980bb271..082207f2324a 100644
--- a/meta/recipes-core/psplash/files/psplash-systemd.service
+++ b/meta/recipes-core/psplash/files/psplash-systemd.service
@@ -1,13 +1,13 @@
 [Unit]
 Description=Start psplash-systemd progress communication helper
 DefaultDependencies=no
-After=systemd-start.service
 After=psplash-start.service
 Requires=psplash-start.service
 RequiresMountsFor=/run
 
 [Service]
 ExecStart=/usr/bin/psplash-systemd
+RemainAfterExit=yes
 
 [Install]
 WantedBy=sysinit.target
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 07/11] oeqa/runtime/cases: Disable and stop systemd-timesyncd

2020-03-17 Thread Alex Kiernan
Stopping systemd-timesyncd doesn't prevent it being restarted by a
different transaction within systemd. Disable the service instead during
the date test to ensure it can't be restarted.

Signed-off-by: Alex Kiernan 
---

 meta/lib/oeqa/runtime/cases/date.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/date.py 
b/meta/lib/oeqa/runtime/cases/date.py
index 7750a7293f8e..fdd2a6ae587e 100644
--- a/meta/lib/oeqa/runtime/cases/date.py
+++ b/meta/lib/oeqa/runtime/cases/date.py
@@ -13,12 +13,12 @@ class DateTest(OERuntimeTestCase):
 def setUp(self):
 if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
 self.logger.debug('Stopping systemd-timesyncd daemon')
-self.target.run('systemctl stop systemd-timesyncd')
+self.target.run('systemctl disable --now systemd-timesyncd')
 
 def tearDown(self):
 if self.tc.td.get('VIRTUAL-RUNTIME_init_manager') == 'systemd':
 self.logger.debug('Starting systemd-timesyncd daemon')
-self.target.run('systemctl start systemd-timesyncd')
+self.target.run('systemctl enable --now systemd-timesyncd')
 
 @OETestDepends(['ssh.SSHTest.test_ssh'])
 @OEHasPackage(['coreutils', 'busybox'])
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 04/11] systemd: Add PACKAGECONFIG for sysvinit

2020-03-17 Thread Alex Kiernan
Add sysvinit PACKAGECONFIG which is bound to DISTRO_FEATURES, this
then disables all sysvinit handling in systemd if it isn't present.

Consolidate sysvinit handling so that when it's disabled we exclude all
sysvinit features.

Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/systemd/systemd_244.3.bb | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index b26f3cb72d2b..7c33bde21a39 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -56,7 +56,7 @@ PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux usrmerge 
polkit', d)} \
+${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux sysvinit 
usrmerge polkit', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
 acl \
@@ -165,6 +165,7 @@ PACKAGECONFIG[seccomp] = 
"-Dseccomp=true,-Dseccomp=false,libseccomp"
 PACKAGECONFIG[selinux] = 
"-Dselinux=true,-Dselinux=false,libselinux,initscripts-sushell"
 PACKAGECONFIG[smack] = "-Dsmack=true,-Dsmack=false"
 PACKAGECONFIG[sysusers] = "-Dsysusers=true,-Dsysusers=false"
+PACKAGECONFIG[sysvinit] = "-Dsysvinit-path=${sysconfdir}/init.d 
-Dsysvrcnd-path=${sysconfdir},-Dsysvinit-path= -Dsysvrcnd-path="
 # When enabled use reproducble build timestamp if set as time epoch,
 # or build time if not. When disabled, time epoch is unset.
 def build_epoch(d):
@@ -198,7 +199,6 @@ EXTRA_OEMESON += "-Dnobody-user=nobody \
   -Dnobody-group=nobody \
   -Drootlibdir=${rootlibdir} \
   -Drootprefix=${rootprefix} \
-  -Dsysvrcnd-path=${sysconfdir} \
   -Ddefault-locale=C \
   "
 
@@ -234,6 +234,7 @@ do_install() {
install -d ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/init 
${D}${sysconfdir}/init.d/systemd-udevd
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% 
${D}${sysconfdir}/init.d/systemd-udevd
+   install -Dm 0755 
${S}/src/systemctl/systemd-sysv-install.SKELETON 
${D}${systemd_unitdir}/systemd-sysv-install
fi
 
chown root:systemd-journal ${D}/${localstatedir}/log/journal
@@ -273,7 +274,6 @@ do_install() {
sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - 
- ../run/systemd/resolve/resolv.conf%g" 
${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
ln -s ../run/systemd/resolve/resolv.conf 
${D}${sysconfdir}/resolv-conf.systemd
fi
-   install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON 
${D}${systemd_unitdir}/systemd-sysv-install
 
# If polkit is setup fixup permissions and ownership
if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', 
d)}; then
@@ -560,7 +560,8 @@ FILES_${PN}-dev += "${base_libdir}/security/*.la 
${datadir}/dbus-1/interfaces/ $
 
 RDEPENDS_${PN} += "kmod dbus util-linux-mount util-linux-umount udev (= 
${EXTENDPKGV}) util-linux-agetty util-linux-fsck"
 RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 
'serial-getty-generator', '', 'systemd-serialgetty', d)}"
-RDEPENDS_${PN} += "volatile-binds update-rc.d"
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 
'update-rc.d', '', d)}"
+RDEPENDS_${PN} += "volatile-binds"
 
 RRECOMMENDS_${PN} += "systemd-extra-utils \
   systemd-compat-units udev-hwdb \
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 10/11] systemd: Enable audit based on DISTRO_FEATURES

2020-03-17 Thread Alex Kiernan
Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/systemd/systemd_245.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_245.bb 
b/meta/recipes-core/systemd/systemd_245.bb
index a7fae930f770..72021a0991ae 100644
--- a/meta/recipes-core/systemd/systemd_245.bb
+++ b/meta/recipes-core/systemd/systemd_245.bb
@@ -57,7 +57,7 @@ PAM_PLUGINS = " \
 "
 
 PACKAGECONFIG ??= " \
-${@bb.utils.filter('DISTRO_FEATURES', 'efi ldconfig pam selinux smack 
sysvinit usrmerge polkit', d)} \
+${@bb.utils.filter('DISTRO_FEATURES', 'audit efi ldconfig pam selinux 
smack sysvinit usrmerge polkit', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
 acl \
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 05/11] systemd: Remove X11 related files when disabled

2020-03-17 Thread Alex Kiernan
When X11 isn't in DISTRO_FEATURES, remove X11 related files.

Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/systemd/systemd_244.3.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index 7c33bde21a39..279e0857244a 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -274,6 +274,10 @@ do_install() {
sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - 
- ../run/systemd/resolve/resolv.conf%g" 
${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
ln -s ../run/systemd/resolve/resolv.conf 
${D}${sysconfdir}/resolv-conf.systemd
fi
+   if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; 
then
+   rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf
+   rm -r ${D}${sysconfdir}/X11
+   fi
 
# If polkit is setup fixup permissions and ownership
if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', 
d)}; then
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 00/11] Systemd 245 and related updates

2020-03-17 Thread Alex Kiernan
Throwing these out there, so that anyone else who's looking at systemd
245 doesn't have to repeat the work, equally now is clearly not the time
to be applying these to master!

Not all of these are stricly related to systemd 245.


Alex Kiernan (11):
  systemd: Package udev rules explicitly
  systemd: Reinstate systemd-hwdb-update.service
  systemd: Add sch-fq-codel to RRECOMMENDS
  systemd: Add PACKAGECONFIG for sysvinit
  systemd: Remove X11 related files when disabled
  psplash: Set RemainAfterExit on systemd units
  oeqa/runtime/cases: Disable and stop systemd-timesyncd
  systemd: upgrade v244.3 -> v245
  systemd: Enable smack based on DISTRO_FEATURES
  systemd: Enable audit based on DISTRO_FEATURES
  systemd: Enable acl based on DISTRO_FEATURES

 meta/lib/oeqa/runtime/cases/date.py   |   4 +-
 .../psplash/files/psplash-start.service   |   1 +
 .../psplash/files/psplash-systemd.service |   2 +-
 ...temd-boot_244.3.bb => systemd-boot_245.bb} |   0
 ...temd-conf_244.3.bb => systemd-conf_245.bb} |   0
 meta/recipes-core/systemd/systemd.inc |   4 +-
 .../systemd/0001-Handle-missing-gshadow.patch | 171 ++
 ...tall-dependency-links-at-install-tim.patch |  14 +-
 ...-not-disable-buffer-in-writing-files.patch |  46 ++---
 ...002-don-t-use-glibc-specific-qsort_r.patch |  12 +-
 ...k-parse_printf_format-implementation.patch |  10 +-
 ...set-util.h-add-__cpu_mask-definition.patch |   8 +-
 ...missing.h-check-for-missing-strndupa.patch |  93 ++
 .../0006-Include-netinet-if_ether.h.patch |  41 +++--
 ..._register_atfork-for-non-glibc-build.patch |   6 +-
 ...11-Use-uintmax_t-for-handling-rlim_t.patch |  10 +-
 ...sable-tests-for-missing-typedefs-in-.patch |   8 +-
 ...uffering-when-writing-to-oom_score_a.patch |   8 +-
 .../{systemd_244.3.bb => systemd_245.bb}  |  67 +--
 scripts/postinst-intercepts/update_udev_hwdb  |  16 +-
 20 files changed, 376 insertions(+), 145 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.3.bb => 
systemd-boot_245.bb} (100%)
 rename meta/recipes-core/systemd/{systemd-conf_244.3.bb => 
systemd-conf_245.bb} (100%)
 create mode 100644 
meta/recipes-core/systemd/systemd/0001-Handle-missing-gshadow.patch
 rename meta/recipes-core/systemd/{systemd_244.3.bb => systemd_245.bb} (91%)

-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 01/11] systemd: Package udev rules explicitly

2020-03-17 Thread Alex Kiernan
udev is packaged before systemd so any wildcard inclusions in FILES will
override later specifics. List all udev rules explicitly so that the
systemd specific rules, packaged alongside systemd, appear in the
correct package.

Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/systemd/systemd_244.3.bb | 28 +-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index c5c0ce4bad05..bb799831996c 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -599,7 +599,33 @@ FILES_udev += "${base_sbindir}/udevd \
${rootlibexecdir}/udev/scsi_id \
${rootlibexecdir}/udev/v4l_id \
${rootlibexecdir}/udev/keymaps \
-   ${rootlibexecdir}/udev/rules.d/*.rules \
+   ${rootlibexecdir}/udev/rules.d/50-udev-default.rules \
+   ${rootlibexecdir}/udev/rules.d/60-autosuspend-chromiumos.rules \
+   ${rootlibexecdir}/udev/rules.d/60-block.rules \
+   ${rootlibexecdir}/udev/rules.d/60-cdrom_id.rules \
+   ${rootlibexecdir}/udev/rules.d/60-drm.rules \
+   ${rootlibexecdir}/udev/rules.d/60-evdev.rules \
+   ${rootlibexecdir}/udev/rules.d/60-fido-id.rules \
+   ${rootlibexecdir}/udev/rules.d/60-input-id.rules \
+   ${rootlibexecdir}/udev/rules.d/60-persistent-alsa.rules \
+   ${rootlibexecdir}/udev/rules.d/60-persistent-input.rules \
+   ${rootlibexecdir}/udev/rules.d/60-persistent-storage.rules \
+   ${rootlibexecdir}/udev/rules.d/60-persistent-storage-tape.rules 
\
+   ${rootlibexecdir}/udev/rules.d/60-persistent-v4l.rules \
+   ${rootlibexecdir}/udev/rules.d/60-sensor.rules \
+   ${rootlibexecdir}/udev/rules.d/60-serial.rules \
+   ${rootlibexecdir}/udev/rules.d/61-autosuspend-manual.rules \
+   ${rootlibexecdir}/udev/rules.d/64-btrfs.rules \
+   ${rootlibexecdir}/udev/rules.d/70-joystick.rules \
+   ${rootlibexecdir}/udev/rules.d/70-mouse.rules \
+   ${rootlibexecdir}/udev/rules.d/70-power-switch.rules \
+   ${rootlibexecdir}/udev/rules.d/70-touchpad.rules \
+   ${rootlibexecdir}/udev/rules.d/75-net-description.rules \
+   ${rootlibexecdir}/udev/rules.d/75-probe_mtd.rules \
+   ${rootlibexecdir}/udev/rules.d/78-sound-card.rules \
+   ${rootlibexecdir}/udev/rules.d/80-drivers.rules \
+   ${rootlibexecdir}/udev/rules.d/80-net-setup-link.rules \
+   ${rootlibexecdir}/udev/rules.d/90-vconsole.rules \
${sysconfdir}/udev \
${sysconfdir}/init.d/systemd-udevd \
${systemd_unitdir}/system/*udev* \
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 02/11] systemd: Reinstate systemd-hwdb-update.service

2020-03-17 Thread Alex Kiernan
systemd supports a distribution hwdb.bin in /usr/lib/udev/hwdb.bin,
which is used if /etc/udev/hwdb.bin is not present. When generating the
install time hwdb, for systemd, ensure that we put it in /usr/lib/udev,
which then ensures that at boot time we do not regenerate it, unless the
system is marked for update.

This allows fragments dropped into /etc/udev/hwdb.d to be processed
correctly, but without requiring a first boot time build:

root@qemumips:~# systemctl status systemd-hwdb-update.service
* systemd-hwdb-update.service - Rebuild Hardware Database
 Loaded: loaded (/usr/lib/systemd/system/systemd-hwdb-update.service; 
static; vendor preset: disabled)
 Active: inactive (dead)
  Condition: start condition failed at Wed 2020-03-04 15:18:11 UTC; 44s ago
 |- ConditionPathExists=|!/usr/lib/udev/hwdb.bin was not met
 |- ConditionPathExists=|/etc/udev/hwdb.bin was not met
 `- ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d was not met
   Docs: man:hwdb(7)
 man:systemd-hwdb(8)

Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/systemd/systemd_244.3.bb   | 10 --
 scripts/postinst-intercepts/update_udev_hwdb | 16 ++--
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index bb799831996c..048021000448 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -293,10 +293,6 @@ do_install() {
# install default policy for presets
# https://www.freedesktop.org/wiki/Software/systemd/Preset/#howto
install -Dm 0644 ${WORKDIR}/99-default.preset 
${D}${systemd_unitdir}/system-preset/99-default.preset
-
-# We use package postinsts for the hwdb update, as the update service is
-# easily triggered for no reason and will slow down boots.
-find ${D} -name systemd-hwdb-update.service -delete
 }
 
 python populate_packages_prepend (){
@@ -636,7 +632,9 @@ FILES_udev += "${base_sbindir}/udevd \
${datadir}/bash-completion/completions/udevadm \
   "
 
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d \
+   ${systemd_unitdir}/system/systemd-hwdb-update.service \
+   "
 
 RCONFLICTS_${PN} = "tiny-init ${@bb.utils.contains('PACKAGECONFIG', 
'resolved', 'resolvconf', '', d)}"
 
@@ -696,7 +694,7 @@ pkg_prerm_${PN}_libc-glibc () {
 PACKAGE_WRITE_DEPS += "qemu-native"
 pkg_postinst_udev-hwdb () {
if test -n "$D"; then
-   $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} 
mlprefix=${MLPREFIX} binprefix=${MLPREFIX}
+   $INTERCEPT_DIR/postinst_intercept update_udev_hwdb ${PKG} 
mlprefix=${MLPREFIX} binprefix=${MLPREFIX} rootlibexecdir="${rootlibexecdir}" 
PREFERRED_PROVIDER_udev="${PREFERRED_PROVIDER_udev}"
else
udevadm hwdb --update
fi
diff --git a/scripts/postinst-intercepts/update_udev_hwdb 
b/scripts/postinst-intercepts/update_udev_hwdb
index c4fb2bffcbf0..102e99b94725 100644
--- a/scripts/postinst-intercepts/update_udev_hwdb
+++ b/scripts/postinst-intercepts/update_udev_hwdb
@@ -5,5 +5,17 @@
 
 set -e
 
-PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D 
$D${libexecdir}/${binprefix}udevadm hwdb --update --root $D
-chown root:root $D${sysconfdir}/udev/hwdb.bin
+case "${PREFERRED_PROVIDER_udev}" in
+   systemd)
+   UDEV_EXTRA_ARGS="--usr"
+   UDEVLIBDIR="${rootlibexecdir}"
+   ;;
+
+   *)
+   UDEV_EXTRA_ARGS=""
+   UDEVLIBDIR="${sysconfdir}"
+   ;;
+esac
+
+PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D 
$D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS}
+chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RFC PATCH 03/11] systemd: Add sch-fq-codel to RRECOMMENDS

2020-03-17 Thread Alex Kiernan
systemd sets net.core.default_qdisc = fq_codel, include
kernel-module-sch-fq-codel in RRECOMMENDS to satify this

Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/systemd/systemd_244.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_244.3.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
index 048021000448..b26f3cb72d2b 100644
--- a/meta/recipes-core/systemd/systemd_244.3.bb
+++ b/meta/recipes-core/systemd/systemd_244.3.bb
@@ -565,7 +565,7 @@ RDEPENDS_${PN} += "volatile-binds update-rc.d"
 RRECOMMENDS_${PN} += "systemd-extra-utils \
   systemd-compat-units udev-hwdb \
   e2fsprogs-e2fsck \
-  kernel-module-autofs4 kernel-module-unix 
kernel-module-ipv6 \
+  kernel-module-autofs4 kernel-module-unix 
kernel-module-ipv6 kernel-module-sch-fq-codel \
   os-release \
   systemd-conf \
 "
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] psplash activation state w/ systemd

2020-03-12 Thread Alex Kiernan
On Wed, Mar 11, 2020 at 5:27 PM Alex Kiernan  wrote:
>
> On Wed, Mar 11, 2020 at 5:20 PM Richard Purdie
>  wrote:
> >
> > On Mon, 2020-03-09 at 15:18 +, Alex Kiernan wrote:
> > > I've a branch with systemd 245 on it which fails testing because
> > > psplash gets restarted all the time.
> > >
> > > But ignoring the systemd 245 piece, it looks to me like psplash could
> > > be restarted under systemd 244 too as the main process exits and our
> > > units aren't marked RemainAfterExit. I haven't figured out what's
> > > triggering it in 245 and not 244, but I suspect it's something
> > > similar
> > > to this:
> > >
> > > https://github.com/systemd/systemd/commit/9fd32ff7d363945fbf8fdae0128702b995127558
> > >
> > > Given where we are in the release cycle and how painful psplash has
> > > obviously been, I'm inclined to leave it until after dunfell ships
> > > and then do it as part of the whole 245 upgrade?
> > >
> > > Equally if you see psplash flapping during tests, it's almost
> > > certainly this problem.
> >
> > Thanks for the report. The weird thing is that master is working with
> > this as far as I can see, certainly no test failures since the last fix
> > I pushed a few days ago.
> >
> > Is there some specific change to the unit files we should make? I'm a
> > little reluctant to pull this out now given we feel like we're close to
> > it working.
> >
>
> It's basically trivial (add RemainAfterExit=yes to both units), but as
> you say, given where we are and it appears to work, I don't think
> now's the time to do it.
>
> I suspect something's changed in 245 which makes it far more likely
> that you see units retriggered, but I can't for the life of me work
> out which commit it is (I should stop trying to do it by inspection
> and bisect it out...).
>

Looks like it's:

https://github.com/systemd/systemd/commit/097537f07a2fab3cb73aef7bc59f2a66aa93f533

which I found via:

https://github.com/systemd/systemd/issues/15091

Definitely ignore this issue for now... I suspect we do actually want
the RemainAfterExit, but for now wait and watch where upstream systemd
ends up on this seems like the sensible approach.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] psplash activation state w/ systemd

2020-03-11 Thread Alex Kiernan
On Wed, Mar 11, 2020 at 5:20 PM Richard Purdie
 wrote:
>
> On Mon, 2020-03-09 at 15:18 +, Alex Kiernan wrote:
> > I've a branch with systemd 245 on it which fails testing because
> > psplash gets restarted all the time.
> >
> > But ignoring the systemd 245 piece, it looks to me like psplash could
> > be restarted under systemd 244 too as the main process exits and our
> > units aren't marked RemainAfterExit. I haven't figured out what's
> > triggering it in 245 and not 244, but I suspect it's something
> > similar
> > to this:
> >
> > https://github.com/systemd/systemd/commit/9fd32ff7d363945fbf8fdae0128702b995127558
> >
> > Given where we are in the release cycle and how painful psplash has
> > obviously been, I'm inclined to leave it until after dunfell ships
> > and then do it as part of the whole 245 upgrade?
> >
> > Equally if you see psplash flapping during tests, it's almost
> > certainly this problem.
>
> Thanks for the report. The weird thing is that master is working with
> this as far as I can see, certainly no test failures since the last fix
> I pushed a few days ago.
>
> Is there some specific change to the unit files we should make? I'm a
> little reluctant to pull this out now given we feel like we're close to
> it working.
>

It's basically trivial (add RemainAfterExit=yes to both units), but as
you say, given where we are and it appears to work, I don't think
now's the time to do it.

I suspect something's changed in 245 which makes it far more likely
that you see units retriggered, but I can't for the life of me work
out which commit it is (I should stop trying to do it by inspection
and bisect it out...).

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] psplash activation state w/ systemd

2020-03-09 Thread Alex Kiernan
I've a branch with systemd 245 on it which fails testing because
psplash gets restarted all the time.

But ignoring the systemd 245 piece, it looks to me like psplash could
be restarted under systemd 244 too as the main process exits and our
units aren't marked RemainAfterExit. I haven't figured out what's
triggering it in 245 and not 244, but I suspect it's something similar
to this:

https://github.com/systemd/systemd/commit/9fd32ff7d363945fbf8fdae0128702b995127558

Given where we are in the release cycle and how painful psplash has
obviously been, I'm inclined to leave it until after dunfell ships and
then do it as part of the whole 245 upgrade?

Equally if you see psplash flapping during tests, it's almost
certainly this problem.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] kernel.bbclass: fix SOURCE_DATE_EPOCH for non-git kernel builds

2020-03-07 Thread Alex Kiernan
On Sat, Mar 7, 2020 at 8:04 PM  wrote:
>
> From: Christopher Clark 
>
> Only use git to set SOURCE_DATE_EPOCH if ${S} is the top level of a git
> repository.
>
> Fixes the following errors with the prior logic when building a kernel
> that is not obtained from a git repository:
>
> 1. With TMPDIR set to a directory outside any git repository on a
> mounted filesystem, reproducible builds fail in do_compile with this git
> error:
>
>   fatal: not a git repository (or any parent up to mount point )
>   Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
>
> aborting before the error handling logic.
>
> 2. With TMPDIR located within a subdirectory of a git repository, the
> SOURCE_DATE_EPOCH timestamp would be that of said repository rather than
> that of the kernel.
>
> Signed-off-by: Christopher Clark 
> ---
>  meta/classes/kernel.bbclass | 12 
>  1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 0eadd3efb8..2603f24709 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -296,10 +296,14 @@ kernel_do_compile() {
> if [ "${SOURCE_DATE_EPOCH}" = "" -o "${SOURCE_DATE_EPOCH}" = 
> "0" ]; then
> olddir=`pwd`
> cd ${S}
> -   SOURCE_DATE_EPOCH=`git log  -1 --pretty=%ct`
> -   # git repo not guaranteed, so fall back to 
> REPRODUCIBLE_TIMESTAMP_ROOTFS
> -   if [ $? -ne 0 ]; then
> -   
> SOURCE_DATE_EPOCH=${REPRODUCIBLE_TIMESTAMP_ROOTFS}
> +   # This kernel dir is not necessarily a git repo and we
> +   # must ensure that git does not incorrectly query a
> +   # repository in a parent directory.
> +   GIT_TOP=`git rev-parse --show-toplevel 2>/dev/null || 
> echo ""`
> +   if [ "${S}" = "${GIT_TOP}" ]; then

Will that work if ${S} isn't a canonical path?

> +   SOURCE_DATE_EPOCH=`git log  -1 --pretty=%ct`
> +   else
> +   
> SOURCE_DATE_EPOCH="${REPRODUCIBLE_TIMESTAMP_ROOTFS}"
> fi
> cd $olddir
> fi

Would something like this resolve the problem (untested):

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 0eadd3efb8d9..a17ca7adccca 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -294,14 +294,11 @@ kernel_do_compile() {
# kernel sources do not use do_unpack, so
SOURCE_DATE_EPOCH may not
# be set
if [ "${SOURCE_DATE_EPOCH}" = "" -o
"${SOURCE_DATE_EPOCH}" = "0" ]; then
-   olddir=`pwd`
-   cd ${S}
-   SOURCE_DATE_EPOCH=`git log  -1 --pretty=%ct`
+   SOURCE_DATE_EPOCH=`git --git-dir="${S}/.git}"
log  -1 --pretty=%ct`
# git repo not guaranteed, so fall back to
REPRODUCIBLE_TIMESTAMP_ROOTFS
if [ $? -ne 0 ]; then

SOURCE_DATE_EPOCH=${REPRODUCIBLE_TIMESTAMP_ROOTFS}
fi
-   cd $olddir
fi

ts=`LC_ALL=C date -d @$SOURCE_DATE_EPOCH`

--
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] linux-firmware: Fix usrmerge builds

2020-03-06 Thread Alex Kiernan
FIRMWAREDIR defaults to /lib, failing when usrmerge is enabled:

  ERROR: linux-firmware-1_20200122-r0 do_install: Execution of 
'/home/akiernan/poky/build/tmp/work/core2-64-poky-linux/linux-firmware/1_20200122-r0/temp/run.do_install.31218'
 failed with exit code 1:
  mkdir -p 
/home/akiernan/poky/build/tmp/work/core2-64-poky-linux/linux-firmware/1_20200122-r0/image/lib/firmware
  ./copy-firmware.sh 
/home/akiernan/poky/build/tmp/work/core2-64-poky-linux/linux-firmware/1_20200122-r0/image/lib/firmware
  cp: target 
'/home/akiernan/poky/build/tmp/work/core2-64-poky-linux/linux-firmware/1_20200122-r0/image/usr/lib/firmware/'
 is not a directory

Signed-off-by: Alex Kiernan 
---

 meta/recipes-kernel/linux-firmware/linux-firmware_20200122.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20200122.bb 
b/meta/recipes-kernel/linux-firmware/linux-firmware_20200122.bb
index 6039dc9d711f..8f963f4f4224 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20200122.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20200122.bb
@@ -208,7 +208,7 @@ do_compile() {
 }
 
 do_install() {
-oe_runmake 'DESTDIR=${D}' install
+oe_runmake 'DESTDIR=${D}' 
'FIRMWAREDIR=${nonarch_base_libdir}/firmware' install
 cp GPL-2 LICEN[CS]E.* WHENCE ${D}${nonarch_base_libdir}/firmware/
 }
 
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] why would systemd-systemctl-native need underlying sysvinit?

2020-02-24 Thread Alex Kiernan
On Mon, Feb 24, 2020 at 7:06 PM Robert P. J. Day  wrote:
>
>
>   in midst of migrating old YP layer to newer one and running across
> all sorts of oddities. in this case, in current master branch of
> oe-core, we have:
>
> recipes-bsp/keymaps/keymaps_1.0.bb:PACKAGE_WRITE_DEPS_append = "
> ${@bb.utils.contains('DISTRO_FEATURES','systemd 
> sysvinit','systemd-systemctl-native','',d)}"
>

commit ee3ac7c64ed4c96062e7d21eed1355d4b60b78c4
Author: Jonas Bonn 
Date:   Tue Jan 29 08:24:42 2019 +0100

keymaps: tighten package write dependency

The dependency on systemd-systemctl-native is only needed if _both_
systemd and sysvinit are in play.

(From OE-Core rev: 3ea08f4b24f8a49c3d5039b62b39d6419cfe234c)

Signed-off-by: Jonas Bonn 
Signed-off-by: Richard Purdie 

which is then obvious once you read the source:

pkg_postinst_${PN} () {
if ${@bb.utils.contains('DISTRO_FEATURES','systemd
sysvinit','true','false',d)}; then
if [ -n "$D" ]; then
OPTS="--root=$D"
fi
systemctl $OPTS mask keymap.service
fi
}

And then the commit which added that makes it even clearer:

commit c57427b4a7991e33b806d4fd0956b6010ed52f62
Author: Chen Qi 
Date:   Wed Sep 3 15:09:17 2014 +0800

keymaps: mask keymap when necessary

When 'sysvinit' and 'systemd' are both in DISTRO_FEATURES, we need
to prevent the init script from running via systemd.
This is because that the functionality of the init script has implemented
in systemd internally.

(From OE-Core rev: 8cfba07e24dae3d1837ccb5cb04e11f362519b0a)

Signed-off-by: Chen Qi 
Signed-off-by: Richard Purdie 


I'd guess the others are similar.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] libxcrypt: Enable static builds

2020-02-21 Thread Alex Kiernan
On Tue, Jan 28, 2020 at 8:07 PM Andre McCurdy  wrote:
>
> On Tue, Jan 28, 2020 at 4:48 AM Alex Kiernan  wrote:
> >
> > Let me have a look at that - what got me here was trying to get a
> > static busybox so I could OSTree's tests to pass, which all turned out
> > to be way harder than I expected; this was just one of the things I
> > tripped over.
>
> Busybox shouldn't need to link with libxcrypt if USE_BB_CRYPT is
> enabled (which it is in OE's default Busybox defconfig).
>
> There's a long standing bug in Busybox whereby crypt.h gets included
> unconditionally (instead of being guarded by #if ENABLE_USE_BB_CRYPT
> etc) so the Busybox recipe still needs to depend on virtual/crypt but
> it's only a compile time dependency.

It looks like that might've been fixed:

4767a5375e66 libbb: include  only if necessary

If I drop virtual/crypt, I still get the same link time failure to
find crypt, which I think we're getting because this test
https://git.busybox.net/busybox/tree/Makefile.flags#n149 passes:

CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}'
>crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c
>/dev/null 2>&1 && echo "y"; rm crypttest.c)

Not quite sure how that can pass tbh...

This ugly hack avoids needing a static crypt:

diff --git a/meta/recipes-core/busybox/busybox.inc
b/meta/recipes-core/busybox/busybox.inc
index 1a82f23b0f3a..7335a846038f 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -18,7 +18,7 @@ BUSYBOX_SPLIT_SUID ?= "1"
 export EXTRA_CFLAGS = "${CFLAGS}"
 export EXTRA_LDFLAGS = "${LDFLAGS}"

-EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH}
CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}'
HOSTCPP='${BUILD_CPP}'"
+EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH}
CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}'
HOSTCPP='${BUILD_CPP}' CRYPT_AVAILABLE=n"

 PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog
${PN}-mdev ${PN}-hwclock"

Not sure how to get that integrated nicely...

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [zeus][PATCH] openssh: backport patch to fix "cert not yet valid" test

2020-02-21 Thread Alex Kiernan
On Fri, Feb 21, 2020 at 11:28 AM Richard Purdie
 wrote:
>
> On Fri, 2020-02-21 at 11:29 +0800, Anuj Mittal wrote:
> > Fixes [YOCTO #13796]
> >
> > Signed-off-by: Anuj Mittal 
>
> Is this issue already addressed in master (maybe through upgrade)?
>

We already had that patch in master which I dropped that patch as part
of the move to 8.2p1 (was
0001-Manually-applied-upstream-fix-for-openssh-test.patch)

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] task i was asked about: "Fix java build to not use host java"

2020-02-16 Thread Alex Kiernan
On Sun, Feb 16, 2020 at 9:37 AM Robert P. J. Day  wrote:
>
>
>   (NOTE: while this was asked in the context of the latest wind river
> linux, i'm guessing it applies to stock OE/YP.)
>
>   regarding a WRL project that i haven't actually seen yet, one of the
> items on a TO DO list reads, "Fix java build to not use host java",
> and i'm trying to clarify what that might mean without yet seeing the
> project.
>
>   as i read that brief item, i'm assuming that this is a java-based
> project wherein some java recipes must be compiled and added to the
> image and, currently, it's the host java compiler that is being used,
> whereas they want a java compiler to be compiled, added to the native
> sysroot, and used for all java compilation.
>
>   i'm aware of bitbake.conf's ASSUME_PROVIDED variable which says
> nothing about java, and i've never worked on a java-flavoured OE
> project before, so i'm curious as to whether the host java would be
> used by default, and how to override that.
>
>   does this make sense? a pointer to some reasonable example of a
> java-infused YP project would probably suffice, and i'm aware of the
> meta-java layer, which i assume will be dragged in. i have no details
> beyond this at the moment, just trying to figure out what that task
> might mean.
>

We run java in our builds, but we're pulling in embedded Zulu rather
than building from scratch, but I doubt that's anything more than a
detail.

We just have a recipe that can build java for both target and native
and have a native bbclassextend in there, with symlinks across to the
java components from /usr/bin. At that point it pretty much just
works. Relevant bits from a recipe consuming it then look like:

inherit java

DEPENDS = "virtual/javac-native"

export JAVA_HOME = "${STAGING_LIBDIR_JVM_NATIVE}/java"

RDEPENDS_${PN} = " \
java2-runtime \
"

We've certainly tripped over a number of places where the host java
leaks in, which is annoying. The only thing we're really using out of
the inherit java is the paths it defines.

One problem we've found is that building both JNI and java components
at the same time is tricky because most things don't distinguish
between native and target JAVA_HOME.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH v6] systemd: upgrade v244.1 -> v244.3

2020-02-16 Thread Alex Kiernan
e which UID ranges will get user journals
  588a23ef2684 [man] fix URL
  0130a03179f6 analyze: badness if neither of RootImage and RootDirectory exists
  93074c962e3a network: introduce AddPrefixRoute= and deprecate PrefixRoute=
  a8ad020ea0ba shared/dropin: fix assert for invalid drop-in
  946cdba156dd initrd: make udev cleanup service confict trigger and settle too
  c0a8a92e6027 man: we support growing xfs too these days
  608d88273494 time-util: deal with systems where userspace has 64bit time_t 
but kernel does not
  cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
  73435b219553 systemctl: show what verbs support --dry-run in the help page
  dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
  0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
  d2471109d999 shared/install: provide a nicer error message for invalid 
WantedBy=/Required= values

Signed-off-by: Alex Kiernan 
---

Changes in v6:
- fix commit message

Changes in v5:
- use multiple cross-file support to inject the necessary binaries into
  meson

Changes in v4:
- add missed commit to join EFI ldflags after stripping command

Changes in v3:
- use MESON_CROSS_... for systemd-boot

Changes in v2:
- fix SRC_URI now v244.3 tag exists on v244-stable

 ...md-boot_244.1.bb => systemd-boot_244.3.bb} | 26 +++
 ...md-conf_244.1.bb => systemd-conf_244.3.bb} |  0
 meta/recipes-core/systemd/systemd.inc |  2 +-
 ...c-and-efi_ld-correctly-when-cross-co.patch | 62 ---
 ...on-print-EFI-CC-configuration-nicely.patch | 33 
 ...meson-use-an-array-option-for-efi-cc.patch | 77 ---
 ...fi-objcopy-option-to-specify-objcopy.patch | 48 
 .../{systemd_244.1.bb => systemd_244.3.bb}|  0
 8 files changed, 14 insertions(+), 234 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.1.bb => 
systemd-boot_244.3.bb} (71%)
 rename meta/recipes-core/systemd/{systemd-conf_244.1.bb => 
systemd-conf_244.3.bb} (100%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
 rename meta/recipes-core/systemd/{systemd_244.1.bb => systemd_244.3.bb} (100%)

diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb 
b/meta/recipes-core/systemd/systemd-boot_244.3.bb
similarity index 71%
rename from meta/recipes-core/systemd/systemd-boot_244.1.bb
rename to meta/recipes-core/systemd/systemd-boot_244.3.bb
index 515abc289bef..f92c63981043 100644
--- a/meta/recipes-core/systemd/systemd-boot_244.1.bb
+++ b/meta/recipes-core/systemd/systemd-boot_244.3.bb
@@ -5,27 +5,27 @@ require conf/image-uefi.conf
 
 DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
 
-# NOTE: These three patches are in theory not needed, but we haven't
-#   figured out how to correctly pass efi-cc parameter if it's an array.
-SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \
-file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \
-
file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
-file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch 
\
-"
-
 inherit meson pkgconfig gettext
 inherit deploy
 
-EFI_CC ?= "${CC}"
+LDFLAGS_prepend = "${@ " ".join(d.getVar('LD').split()[1:])} "
+
+do_write_config[vardeps] += "CC OBJCOPY"
+do_write_config_append() {
+cat >${WORKDIR}/meson-${PN}.cross <
-Date: Tue, 27 Feb 2018 21:42:23 -0800
-Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling
-
-When cross-compiling, efi_cc and efi_ld may take the form of
-'xxx-gcc --sysroot=xxx', and this would cause run_command and
-the alike fail.
-
-Fix to split them to make commands run correctly.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi 

- src/boot/efi/meson.build | 16 +---
- 1 file changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index 992a3ba4c..9f9ec4911 100644
 a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -157,7 +157,7 @@ if have_gnu_efi
- o_file = custom_target(file + '.o',
-input : file,
-output : file + '.o',
--   command : [efi_cc, '-c', '@INPUT@', 
'-o', '@OUTPUT@']
-+   command : efi_cc.split() + ['-c', 
'@INPUT@', '-o', '@OUTPUT@']
-

Re: [OE-core] [OE-Core][PATCH v5] systemd: upgrade v244.1 -> v244.3

2020-02-16 Thread Alex Kiernan
Please ignore. I need to fix the commit message

On Sun, 16 Feb 2020, 09:07 Alex Kiernan,  wrote:

> Drop all systemd-boot patches and use MESON_CROSS_... configuration
> instead to pick up EFI cc and objcopy. For EFI ld, we can use the
> command line efi-ld option, but have to ensure it's something which can
> be exec'd directly.
>
> Commits from v244-stable:
>
>   c4280c342bbf Revert "Support Plugable UD-PRO8 dock"
>   bb598b56eb3c hibernate-resume-generator: wait "infinitely" for the
> resume device
>   77c04ce5c270 hwdb: update to v245-rc1
>   b4eb8848240c Fix typo in function name
>   e2d4cb9843c5 polkit: when authorizing via PK let's re-resolve
> callback/userdata instead of caching it
>   83bfc0d8dd02 sd-bus: introduce API for re-enqueuing incoming messages
>   5926f9f1723f polkit: use structured initialization
>   0697d0d972c8 polkit: on async pk requests, re-validate action/details
>   2589995acdb2 polkit: reuse some common bus message appending code
>   5b2442d5c3ec bus-polkit: rename return error parameter to ret_error
>   0a19ff7004e4 shared: split out polkit stuff from bus-util.c →
> bus-polkit.c
>   1325dfb5778d test: adapt to the new capsh format
>   3538fafb4714 meson: update efi path detection to gnu-efi-3.0.11
>   3034855a5b62 presets: "disable" all passive targets by default
>   c2e304681929 shared/sysctl-util: normalize repeated slashes or dots to a
> single value
>   6f4364046f90 dhcp6: do not use T1 and T2 longer than one provided by the
> lease
>   0ed6cda28dff network: fix implicit type conversion warning by GCC-10
>   f6a5c02d26b1 bootspec: parse random-seed-mode line in loader.conf
>   ddc5dca8a73b sd-boot: fix typo
>   2bbbe9ae41ab test: Synchronize journal before reading from it
>   072485d661d7 sd-bus: fix introspection bug in signal parameter names
>   80af3cf5e36b efi: fix build.
>   d7ede1ade564 generator: order growfs for the root fs after
> systemd-remount-fs
>   e9904998213d loginctl: use /org/freedesktop/login1/session/auto when
> "lock-session" is called without argument
>   82dd4caf014c Documentation update for x-systemd.{before,after}
>   a60459764d9d man: fix typo in systemd.netdev Xfrm example
>   fc053e2dfb3f timesyncd: log louder when we refuse a server due to root
> distance
>   af0e630693fa resolved: drop DNSSEC root key that is not valid anymore
>   ae59f1666ca6 journal: don't use startswith() on something that is not a
> NUL-terminated string
>   536ef6d72bc6 test: add test for
> https://github.com/systemd/systemd/issues/14560
>   b78fe3c1b1a8 core: make sure StandardInput=file: doesn't get dup'ed to
> stdout/stderr by default
>   a1561a08f2d5 pkgconf: add full generator paths
>   e5f2d11489ec tree-wide: we forgot to destroy some bus errors
>   ea67fd42067b mount: make checks on perpetual mount units more lax
>   2f23c648bce4 core: never allow perpetual units to be masked
>   9ba11dffb09a typo: "May modify to" -> "May modify"
>   84c048799a78 Disable reading SystemdOptions EFI Var when in SecureBoot
> mode
>   4c2d72b53091 sysctl: downgrade message when we have no permission
>   c001a285a3a2 Clarify journald.conf MaxLevelStore documentation
>   45d52c7615fd logind: refuse overriding idle hint on tty sessions
>   b1a0be45b4ee cgroup: update only siblings that got realized once
>   e6d694254fe1 mount: mark an existing "mounting" unit from
> /proc/self/mountinfo as "just_mounted"
>   d8fd38769c36 journalctl: Correctly handle combination of --reverse and
> --lines (fixes #1596)
>   cd19bd31d808 journalctl: Correctly handle --show-cursor in combination
> with --until or --since and --reverse
>   1320aa92dc0a core: fix re-realization of cgroup siblings
>   14164ec6bc77 core: propagate service state to socket in more load states
>   c22bf6b31a45 man: describe "symlink" and "systemctl link" explicitly in
> UNIT FILE LOAD PATH
>   26f3a534f1ab core: be more restrictive on the dependency types we allow
> to be created transiently
>   377cc5d91ea5 udev: don't import parent ID_FS_ data on partitions
>   7d5060d53994 man: fix option name
>   98c03090274a Support Plugable UD-PRO8 dock
>   e9687d09dccf gpt-auto: don't assume XBOOTLDR is vfat
>   7057fe863007 man: fix documentation of IBM VIO device naming
>   f8d1df1045be man: slightly extend documentation on difference between
> ID_NET_NAME_ONBOARD and ID_NET_LABEL_ONBOARD
>   1faf5dde4d4a boot: fix osrel parser
>   65d247af1786 udev: do not use exact match of file permission
>   6da978f89b48 network: lower the log-level of harmless message
>   5d8a614f926c hwdb: ignore keys added in kernel 5.5
>   8b1bd1746989 systemctl: skip non-existent units in the 'cat' verb
>  

[OE-core] [OE-Core][PATCH v5] systemd: upgrade v244.1 -> v244.3

2020-02-16 Thread Alex Kiernan
3 [man] note which UID ranges will get user journals
  588a23ef2684 [man] fix URL
  0130a03179f6 analyze: badness if neither of RootImage and RootDirectory exists
  93074c962e3a network: introduce AddPrefixRoute= and deprecate PrefixRoute=
  a8ad020ea0ba shared/dropin: fix assert for invalid drop-in
  946cdba156dd initrd: make udev cleanup service confict trigger and settle too
  c0a8a92e6027 man: we support growing xfs too these days
  608d88273494 time-util: deal with systems where userspace has 64bit time_t 
but kernel does not
  cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
  73435b219553 systemctl: show what verbs support --dry-run in the help page
  dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
  0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
  d2471109d999 shared/install: provide a nicer error message for invalid 
WantedBy=/Required= values

Signed-off-by: Alex Kiernan 
---

Changes in v5:
- use multiple cross-file support to inject the necessary binaries into
  meson

Changes in v4:
- add missed commit to join EFI ldflags after stripping command

Changes in v3:
- use MESON_CROSS_... for systemd-boot

Changes in v2:
- fix SRC_URI now v244.3 tag exists on v244-stable

 ...md-boot_244.1.bb => systemd-boot_244.3.bb} | 26 +++
 ...md-conf_244.1.bb => systemd-conf_244.3.bb} |  0
 meta/recipes-core/systemd/systemd.inc |  2 +-
 ...c-and-efi_ld-correctly-when-cross-co.patch | 62 ---
 ...on-print-EFI-CC-configuration-nicely.patch | 33 
 ...meson-use-an-array-option-for-efi-cc.patch | 77 ---
 ...fi-objcopy-option-to-specify-objcopy.patch | 48 
 .../{systemd_244.1.bb => systemd_244.3.bb}|  0
 8 files changed, 14 insertions(+), 234 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.1.bb => 
systemd-boot_244.3.bb} (71%)
 rename meta/recipes-core/systemd/{systemd-conf_244.1.bb => 
systemd-conf_244.3.bb} (100%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
 rename meta/recipes-core/systemd/{systemd_244.1.bb => systemd_244.3.bb} (100%)

diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb 
b/meta/recipes-core/systemd/systemd-boot_244.3.bb
similarity index 71%
rename from meta/recipes-core/systemd/systemd-boot_244.1.bb
rename to meta/recipes-core/systemd/systemd-boot_244.3.bb
index 515abc289bef..f92c63981043 100644
--- a/meta/recipes-core/systemd/systemd-boot_244.1.bb
+++ b/meta/recipes-core/systemd/systemd-boot_244.3.bb
@@ -5,27 +5,27 @@ require conf/image-uefi.conf
 
 DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
 
-# NOTE: These three patches are in theory not needed, but we haven't
-#   figured out how to correctly pass efi-cc parameter if it's an array.
-SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \
-file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \
-
file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
-file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch 
\
-"
-
 inherit meson pkgconfig gettext
 inherit deploy
 
-EFI_CC ?= "${CC}"
+LDFLAGS_prepend = "${@ " ".join(d.getVar('LD').split()[1:])} "
+
+do_write_config[vardeps] += "CC OBJCOPY"
+do_write_config_append() {
+cat >${WORKDIR}/meson-${PN}.cross <
-Date: Tue, 27 Feb 2018 21:42:23 -0800
-Subject: [PATCH] Fix to run efi_cc and efi_ld correctly when cross-compiling
-
-When cross-compiling, efi_cc and efi_ld may take the form of
-'xxx-gcc --sysroot=xxx', and this would cause run_command and
-the alike fail.
-
-Fix to split them to make commands run correctly.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi 

- src/boot/efi/meson.build | 16 +---
- 1 file changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
-index 992a3ba4c..9f9ec4911 100644
 a/src/boot/efi/meson.build
-+++ b/src/boot/efi/meson.build
-@@ -157,7 +157,7 @@ if have_gnu_efi
- o_file = custom_target(file + '.o',
-input : file,
-output : file + '.o',
--   command : [efi_cc, '-c', '@INPUT@', 
'-o', '@OUTPUT@']
-+   command : efi_cc.split() + ['-c', 
'@INPUT@', '-o', '@OUTPUT@']
-  +

Re: [OE-core] [OE-Core][PATCH v4 1/2] meson.bbclass: Parameterise meson.cross

2020-02-15 Thread Alex Kiernan
On Sat, Feb 15, 2020 at 9:18 PM Khem Raj  wrote:
>
> On 2/15/20 1:44 AM, Alex Kiernan wrote:
> > Add MESON_CROSS_BINARIES, MESON_CROSS_PROPERTIES as a colon separated
> > list of meson properties which are exported into meson.cross.
> >
>
> I am seeing errors
>
> 13:14:54   File
> "/mnt/jenkins/workspace/yocto-world-glibc/sources/openembedded-core/meta/classes/meson.bbclass",
> line 130
> 13:14:54 echo "[properties]" > ${WORKDIR}/meson-tracker.cross
> 13:14:54   ^
> 13:14:54 SyntaxError: invalid syntax
>

Is that tracker from meta-gnome?


-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] openssh: Upgrade 8.1p1 -> 8.2p1

2020-02-15 Thread Alex Kiernan
Drop backports from upstream:

  0001-Manually-applied-upstream-fix-for-openssh-test.patch
  0001-seccomp-Allow-clock_gettime64-in-sandbox.patch
  openssh-8.1p1-seccomp-nanosleep.patch

Signed-off-by: Alex Kiernan 
---

 ...pplied-upstream-fix-for-openssh-test.patch | 60 ---
 ...omp-Allow-clock_gettime64-in-sandbox.patch | 31 --
 .../openssh-8.1p1-seccomp-nanosleep.patch | 27 -
 .../{openssh_8.1p1.bb => openssh_8.2p1.bb}|  7 +--
 4 files changed, 2 insertions(+), 123 deletions(-)
 delete mode 100644 
meta/recipes-connectivity/openssh/openssh/0001-Manually-applied-upstream-fix-for-openssh-test.patch
 delete mode 100644 
meta/recipes-connectivity/openssh/openssh/0001-seccomp-Allow-clock_gettime64-in-sandbox.patch
 delete mode 100644 
meta/recipes-connectivity/openssh/openssh/openssh-8.1p1-seccomp-nanosleep.patch
 rename meta/recipes-connectivity/openssh/{openssh_8.1p1.bb => 
openssh_8.2p1.bb} (95%)

diff --git 
a/meta/recipes-connectivity/openssh/openssh/0001-Manually-applied-upstream-fix-for-openssh-test.patch
 
b/meta/recipes-connectivity/openssh/openssh/0001-Manually-applied-upstream-fix-for-openssh-test.patch
deleted file mode 100644
index 7171ec0834e8..
--- 
a/meta/recipes-connectivity/openssh/openssh/0001-Manually-applied-upstream-fix-for-openssh-test.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 0a68d6cfe255f8bcdd5f9db0d008a8f0a60b237a Mon Sep 17 00:00:00 2001
-From: "Mingde (Matthew) Zeng" 
-Date: Wed, 15 Jan 2020 15:51:42 -0500
-Subject: [PATCH] Manually applied upstream fix for openssh test
-
-Upstream Status: Backport:
-
https://github.com/openssh/openssh-portable/commit/ff31f15773ee173502eec4d7861ec56f26bba381
-
-Signed-off-by: Mingde (Matthew) Zeng

- regress/cert-hostkey.sh | 4 ++--
- regress/cert-userkey.sh | 5 ++---
- 2 files changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh
-index 86ea6250..60e3ec02 100644
 a/regress/cert-hostkey.sh
-+++ b/regress/cert-hostkey.sh
-@@ -1,4 +1,4 @@
--# $OpenBSD: cert-hostkey.sh,v 1.18 2019/07/25 08:28:15 dtucker Exp $
-+# $OpenBSD: cert-hostkey.sh,v 1.23 2020/01/03 03:02:26 djm Exp $
- # Placed in the Public Domain.
-
- tid="certified host keys"
-@@ -252,7 +252,7 @@ test_one() {
- test_one "user-certificate"   failure "-n $HOSTS"
- test_one "empty principals"   success "-h"
- test_one "wrong principals"   failure "-h -n foo"
--test_one "cert not yet valid" failure "-h -V20200101:20300101"
-+test_one "cert not yet valid" failure "-h -V20300101:20320101"
- test_one "cert expired"   failure "-h -V19800101:19900101"
- test_one "cert valid interval"success "-h -V-1w:+2w"
- test_one "cert has constraints"   failure "-h -Oforce-command=false"
-diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh
-index 38c14a69..f0e30945 100644
 a/regress/cert-userkey.sh
-+++ b/regress/cert-userkey.sh
-@@ -1,4 +1,4 @@
--# $OpenBSD: cert-userkey.sh,v 1.21 2019/07/25 08:28:15 dtucker Exp $
-+# $OpenBSD: cert-userkey.sh,v 1.25 2020/01/03 03:02:26 djm Exp $
- # Placed in the Public Domain.
-
- tid="certified user keys"
-@@ -338,7 +338,7 @@ test_one() {
- test_one "correct principal"  success "-n ${USER}"
- test_one "host-certificate"   failure "-n ${USER} -h"
- test_one "wrong principals"   failure "-n foo"
--test_one "cert not yet valid" failure "-n ${USER} -V20200101:20300101"
-+test_one "cert not yet valid" failure "-n ${USER} -V20300101:20320101"
- test_one "cert expired"   failure "-n ${USER} -V19800101:19900101"
- test_one "cert valid interval"success "-n ${USER} -V-1w:+2w"
- test_one "wrong source-address"   failure "-n ${USER} 
-Osource-address=10.0.0.0/8"
-@@ -399,4 +399,3 @@ done
-
- rm -f $OBJ/authorized_keys_$USER $OBJ/user_ca_key* $OBJ/cert_user_key*
- rm -f $OBJ/authorized_principals_$USER
--
---
-2.24.1
-
diff --git 
a/meta/recipes-connectivity/openssh/openssh/0001-seccomp-Allow-clock_gettime64-in-sandbox.patch
 
b/meta/recipes-connectivity/openssh/openssh/0001-seccomp-Allow-clock_gettime64-in-sandbox.patch
deleted file mode 100644
index 78c493de8663..
--- 
a/meta/recipes-connectivity/openssh/openssh/0001-seccomp-Allow-clock_gettime64-in-sandbox.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From eae3e85322fa7c869f5822db4eda6348f2beb09e Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Tue, 7 Jan 2020 16:26:45 -0800
-Subject: [PATCH] seccomp: Allow clock_gettime64() in sandbox.
-
-This helps sshd accept connections on mips platforms with
-upcoming glibc ( 2.31 )
-
-Upstream-Status: Accepted 
[https://github.com/openssh/

[OE-core] [OE-Core][PATCH v4 2/2] systemd: upgrade v244.1 -> v244.3

2020-02-15 Thread Alex Kiernan
3 [man] note which UID ranges will get user journals
  588a23ef2684 [man] fix URL
  0130a03179f6 analyze: badness if neither of RootImage and RootDirectory exists
  93074c962e3a network: introduce AddPrefixRoute= and deprecate PrefixRoute=
  a8ad020ea0ba shared/dropin: fix assert for invalid drop-in
  946cdba156dd initrd: make udev cleanup service confict trigger and settle too
  c0a8a92e6027 man: we support growing xfs too these days
  608d88273494 time-util: deal with systems where userspace has 64bit time_t 
but kernel does not
  cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
  73435b219553 systemctl: show what verbs support --dry-run in the help page
  dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
  0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
  d2471109d999 shared/install: provide a nicer error message for invalid 
WantedBy=/Required= values

Signed-off-by: Alex Kiernan 
---

Changes in v4:
- add missed commit to join EFI ldflags after stripping command

Changes in v3:
- use MESON_CROSS_... for systemd-boot

Changes in v2:
- fix SRC_URI now v244.3 tag exists on v244-stable

 ...md-boot_244.1.bb => systemd-boot_244.3.bb} | 19 ++---
 ...md-conf_244.1.bb => systemd-conf_244.3.bb} |  0
 meta/recipes-core/systemd/systemd.inc |  2 +-
 ...c-and-efi_ld-correctly-when-cross-co.patch | 62 ---
 ...on-print-EFI-CC-configuration-nicely.patch | 33 
 ...meson-use-an-array-option-for-efi-cc.patch | 77 ---
 ...fi-objcopy-option-to-specify-objcopy.patch | 48 
 .../{systemd_244.1.bb => systemd_244.3.bb}|  0
 8 files changed, 7 insertions(+), 234 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.1.bb => 
systemd-boot_244.3.bb} (71%)
 rename meta/recipes-core/systemd/{systemd-conf_244.1.bb => 
systemd-conf_244.3.bb} (100%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
 rename meta/recipes-core/systemd/{systemd_244.1.bb => systemd_244.3.bb} (100%)

diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb 
b/meta/recipes-core/systemd/systemd-boot_244.3.bb
similarity index 71%
rename from meta/recipes-core/systemd/systemd-boot_244.1.bb
rename to meta/recipes-core/systemd/systemd-boot_244.3.bb
index 515abc289bef..a77f6fb73d23 100644
--- a/meta/recipes-core/systemd/systemd-boot_244.1.bb
+++ b/meta/recipes-core/systemd/systemd-boot_244.3.bb
@@ -5,27 +5,20 @@ require conf/image-uefi.conf
 
 DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
 
-# NOTE: These three patches are in theory not needed, but we haven't
-#   figured out how to correctly pass efi-cc parameter if it's an array.
-SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \
-file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \
-
file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
-file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch 
\
-"
-
 inherit meson pkgconfig gettext
 inherit deploy
 
-EFI_CC ?= "${CC}"
+EFI_LDFLAGS = "${@ " ".join(d.getVar('LD').split()[1:])} ${LDFLAGS}"
+MESON_CROSS_BINARIES_append = " efi_cc:CC objcopy:OBJCOPY"
+MESON_CROSS_PROPERTIES_remove = "c_link_args:LDFLAGS"
+MESON_CROSS_PROPERTIES_append = " c_link_args:EFI_LDFLAGS"
+
 EXTRA_OEMESON += "-Defi=true \
   -Dgnu-efi=true \
   -Defi-includedir=${STAGING_INCDIR}/efi \
-  -Defi-ldsdir=${STAGING_LIBDIR} \
   -Defi-libdir=${STAGING_LIBDIR} \
+  -Defi-ld=${@ d.getVar('LD').split()[0]} \
   -Dman=false \
-  -Defi-cc='${EFI_CC}' \
-  -Defi-ld='${LD}' \
-  -Defi-objcopy='${OBJCOPY}' \
   "
 
 # install to the image as boot*.efi if its the EFI_PROVIDER,
diff --git a/meta/recipes-core/systemd/systemd-conf_244.1.bb 
b/meta/recipes-core/systemd/systemd-conf_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-conf_244.1.bb
rename to meta/recipes-core/systemd/systemd-conf_244.3.bb
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 8c05a96ecc4f..e73b397b5d64 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=7514

[OE-core] [OE-Core][PATCH v4 1/2] meson.bbclass: Parameterise meson.cross

2020-02-15 Thread Alex Kiernan
Add MESON_CROSS_BINARIES, MESON_CROSS_PROPERTIES as a colon separated
list of meson properties which are exported into meson.cross.

Signed-off-by: Alex Kiernan 
---

Changes in v4: None
Changes in v3:
- new

Changes in v2: None

 meta/classes/meson.bbclass | 161 -
 1 file changed, 86 insertions(+), 75 deletions(-)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 06034e8b4731..e778e37d7f69 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -34,88 +34,99 @@ MESON_CROSS_FILE = ""
 MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
 MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
 
-def meson_array(var, d):
-items = d.getVar(var).split()
-return repr(items[0] if len(items) == 1 else items)
-
-# Map our ARCH values to what Meson expects:
-# http://mesonbuild.com/Reference-tables.html#cpu-families
-def meson_cpu_family(var, d):
-import re
-arch = d.getVar(var)
-if arch == 'powerpc':
-return 'ppc'
-elif arch == 'powerpc64' or arch == 'powerpc64le':
-return 'ppc64'
-elif arch == 'armeb':
-return 'arm'
-elif arch == 'aarch64_be':
-return 'aarch64'
-elif arch == 'mipsel':
-return 'mips'
-elif arch == 'mips64el':
-return 'mips64'
-elif re.match(r"i[3-6]86", arch):
-return "x86"
-elif arch == "microblazeel":
-return "microblaze"
-else:
-return arch
-
-# Map our OS values to what Meson expects:
-# https://mesonbuild.com/Reference-tables.html#operating-system-names
-def meson_operating_system(var, d):
-os = d.getVar(var)
-if "mingw" in os:
-return "windows"
-else:
-return os
-
-def meson_endian(prefix, d):
-arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
-sitedata = siteinfo_data_for_machine(arch, os, d)
-if "endian-little" in sitedata:
-return "little"
-elif "endian-big" in sitedata:
-return "big"
-else:
-bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
+MESON_CROSS_BINARIES ??= "c:CC \
+  cpp:CXX \
+  ar:AR \
+  nm:NM \
+  strip:STRIP \
+  readelf:READELF"
+
+MESON_CROSS_PROPERTIES ??= "c_args:CFLAGS \
+c_link_args:LDFLAGS \
+cpp_args:CXXFLAGS \
+cpp_link_args:LDFLAGS"
 
 addtask write_config before do_configure
-do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS 
LDFLAGS"
-do_write_config() {
-# This needs to be Py to split the args into single-element lists
-cat >${WORKDIR}/meson.cross <http://mesonbuild.com/Reference-tables.html#cpu-families
+def meson_cpu_family(var):
+import re
+arch = d.getVar(var)
+if arch == 'powerpc':
+return 'ppc'
+elif arch == 'powerpc64' or arch == 'powerpc64le':
+return 'ppc64'
+elif arch == 'armeb':
+return 'arm'
+elif arch == 'aarch64_be':
+return 'aarch64'
+elif arch == 'mipsel':
+return 'mips'
+elif arch == 'mips64el':
+return 'mips64'
+elif re.match(r"i[3-6]86", arch):
+return "x86"
+elif arch == "microblazeel":
+return "microblaze"
+else:
+return arch
+
+# Map our OS values to what Meson expects:
+# https://mesonbuild.com/Reference-tables.html#operating-system-names
+def meson_operating_system(var):
+os = d.getVar(var)
+if "mingw" in os:
+return "windows"
+else:
+return os
+
+def meson_endian(prefix):
+arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
+sitedata = siteinfo_data_for_machine(arch, os, d)
+if "endian-little" in sitedata:
+return "little"
+elif "endian-big" in sitedata:
+return "big"
+else:
+bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
+
+def meson_write_props(var, f):
+for property in d.getVar(var).split():
+ (k, v) = property.split(':')
+ print("{} = {}".format(k, meson_array(v)), file=f)
+ d.appendVarFlag("do_write_config", "vardeps", v)
+
+with open(oe.path.join(d.getVar('WORKDIR'), "meson.cross"), "w") as f:
+print("""\
 [binaries]
-c = ${@meson_array('CC', d)

[OE-core] [OE-Core][PATCH v3 2/2] systemd: upgrade v244.1 -> v244.3

2020-02-14 Thread Alex Kiernan
3 [man] note which UID ranges will get user journals
  588a23ef2684 [man] fix URL
  0130a03179f6 analyze: badness if neither of RootImage and RootDirectory exists
  93074c962e3a network: introduce AddPrefixRoute= and deprecate PrefixRoute=
  a8ad020ea0ba shared/dropin: fix assert for invalid drop-in
  946cdba156dd initrd: make udev cleanup service confict trigger and settle too
  c0a8a92e6027 man: we support growing xfs too these days
  608d88273494 time-util: deal with systems where userspace has 64bit time_t 
but kernel does not
  cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
  73435b219553 systemctl: show what verbs support --dry-run in the help page
  dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
  0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
  d2471109d999 shared/install: provide a nicer error message for invalid 
WantedBy=/Required= values

Signed-off-by: Alex Kiernan 
---

Changes in v3:
- use MESON_CROSS_... for systemd-boot

Changes in v2:
- fix SRC_URI now v244.3 tag exists on v244-stable

 ...md-boot_244.1.bb => systemd-boot_244.3.bb} | 19 ++---
 ...md-conf_244.1.bb => systemd-conf_244.3.bb} |  0
 meta/recipes-core/systemd/systemd.inc |  2 +-
 ...c-and-efi_ld-correctly-when-cross-co.patch | 62 ---
 ...on-print-EFI-CC-configuration-nicely.patch | 33 
 ...meson-use-an-array-option-for-efi-cc.patch | 77 ---
 ...fi-objcopy-option-to-specify-objcopy.patch | 48 
 .../{systemd_244.1.bb => systemd_244.3.bb}|  0
 8 files changed, 7 insertions(+), 234 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.1.bb => 
systemd-boot_244.3.bb} (71%)
 rename meta/recipes-core/systemd/{systemd-conf_244.1.bb => 
systemd-conf_244.3.bb} (100%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Revert-meson-print-EFI-CC-configuration-nicely.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-Revert-meson-use-an-array-option-for-efi-cc.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch
 rename meta/recipes-core/systemd/{systemd_244.1.bb => systemd_244.3.bb} (100%)

diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb 
b/meta/recipes-core/systemd/systemd-boot_244.3.bb
similarity index 71%
rename from meta/recipes-core/systemd/systemd-boot_244.1.bb
rename to meta/recipes-core/systemd/systemd-boot_244.3.bb
index 515abc289bef..815d5b87b1b8 100644
--- a/meta/recipes-core/systemd/systemd-boot_244.1.bb
+++ b/meta/recipes-core/systemd/systemd-boot_244.3.bb
@@ -5,27 +5,20 @@ require conf/image-uefi.conf
 
 DEPENDS = "intltool-native libcap util-linux gnu-efi gperf-native"
 
-# NOTE: These three patches are in theory not needed, but we haven't
-#   figured out how to correctly pass efi-cc parameter if it's an array.
-SRC_URI += "file://0001-Revert-meson-use-an-array-option-for-efi-cc.patch \
-file://0001-Revert-meson-print-EFI-CC-configuration-nicely.patch \
-
file://0001-Fix-to-run-efi_cc-and-efi_ld-correctly-when-cross-co.patch \
-file://0001-meson-Add-Defi-objcopy-option-to-specify-objcopy.patch 
\
-"
-
 inherit meson pkgconfig gettext
 inherit deploy
 
-EFI_CC ?= "${CC}"
+EFI_LDFLAGS = "${@ d.getVar('LD').split(" ")[1:]} ${LDFLAGS}"
+MESON_CROSS_BINARIES_append = " efi_cc:CC objcopy:OBJCOPY"
+MESON_CROSS_PROPERTIES_remove = "c_link_args:LDFLAGS"
+MESON_CROSS_PROPERTIES_append = " c_link_args:EFI_LDFLAGS"
+
 EXTRA_OEMESON += "-Defi=true \
   -Dgnu-efi=true \
   -Defi-includedir=${STAGING_INCDIR}/efi \
-  -Defi-ldsdir=${STAGING_LIBDIR} \
   -Defi-libdir=${STAGING_LIBDIR} \
+  -Defi-ld=${@ d.getVar('LD').split(" ")[0]} \
   -Dman=false \
-  -Defi-cc='${EFI_CC}' \
-  -Defi-ld='${LD}' \
-  -Defi-objcopy='${OBJCOPY}' \
   "
 
 # install to the image as boot*.efi if its the EFI_PROVIDER,
diff --git a/meta/recipes-core/systemd/systemd-conf_244.1.bb 
b/meta/recipes-core/systemd/systemd-conf_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-conf_244.1.bb
rename to meta/recipes-core/systemd/systemd-conf_244.3.bb
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 8c05a96ecc4f..e73b397b5d64 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
file://LICENSE.LGPL2.1

[OE-core] [OE-Core][PATCH v3 1/2] meson.bbclass: Parameterise meson.cross

2020-02-14 Thread Alex Kiernan
Add MESON_CROSS_BINARIES, MESON_CROSS_PROPERTIES as a colon separated
list of meson properties which are exported into meson.cross.

Signed-off-by: Alex Kiernan 
---

Changes in v3: None
Changes in v2: None

 meta/classes/meson.bbclass | 161 -
 1 file changed, 86 insertions(+), 75 deletions(-)

diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 06034e8b4731..e778e37d7f69 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -34,88 +34,99 @@ MESON_CROSS_FILE = ""
 MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
 MESON_CROSS_FILE_class-nativesdk = "--cross-file ${WORKDIR}/meson.cross"
 
-def meson_array(var, d):
-items = d.getVar(var).split()
-return repr(items[0] if len(items) == 1 else items)
-
-# Map our ARCH values to what Meson expects:
-# http://mesonbuild.com/Reference-tables.html#cpu-families
-def meson_cpu_family(var, d):
-import re
-arch = d.getVar(var)
-if arch == 'powerpc':
-return 'ppc'
-elif arch == 'powerpc64' or arch == 'powerpc64le':
-return 'ppc64'
-elif arch == 'armeb':
-return 'arm'
-elif arch == 'aarch64_be':
-return 'aarch64'
-elif arch == 'mipsel':
-return 'mips'
-elif arch == 'mips64el':
-return 'mips64'
-elif re.match(r"i[3-6]86", arch):
-return "x86"
-elif arch == "microblazeel":
-return "microblaze"
-else:
-return arch
-
-# Map our OS values to what Meson expects:
-# https://mesonbuild.com/Reference-tables.html#operating-system-names
-def meson_operating_system(var, d):
-os = d.getVar(var)
-if "mingw" in os:
-return "windows"
-else:
-return os
-
-def meson_endian(prefix, d):
-arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
-sitedata = siteinfo_data_for_machine(arch, os, d)
-if "endian-little" in sitedata:
-return "little"
-elif "endian-big" in sitedata:
-return "big"
-else:
-bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
+MESON_CROSS_BINARIES ??= "c:CC \
+  cpp:CXX \
+  ar:AR \
+  nm:NM \
+  strip:STRIP \
+  readelf:READELF"
+
+MESON_CROSS_PROPERTIES ??= "c_args:CFLAGS \
+c_link_args:LDFLAGS \
+cpp_args:CXXFLAGS \
+cpp_link_args:LDFLAGS"
 
 addtask write_config before do_configure
-do_write_config[vardeps] += "CC CXX LD AR NM STRIP READELF CFLAGS CXXFLAGS 
LDFLAGS"
-do_write_config() {
-# This needs to be Py to split the args into single-element lists
-cat >${WORKDIR}/meson.cross <http://mesonbuild.com/Reference-tables.html#cpu-families
+def meson_cpu_family(var):
+import re
+arch = d.getVar(var)
+if arch == 'powerpc':
+return 'ppc'
+elif arch == 'powerpc64' or arch == 'powerpc64le':
+return 'ppc64'
+elif arch == 'armeb':
+return 'arm'
+elif arch == 'aarch64_be':
+return 'aarch64'
+elif arch == 'mipsel':
+return 'mips'
+elif arch == 'mips64el':
+return 'mips64'
+elif re.match(r"i[3-6]86", arch):
+return "x86"
+elif arch == "microblazeel":
+return "microblaze"
+else:
+return arch
+
+# Map our OS values to what Meson expects:
+# https://mesonbuild.com/Reference-tables.html#operating-system-names
+def meson_operating_system(var):
+os = d.getVar(var)
+if "mingw" in os:
+return "windows"
+else:
+return os
+
+def meson_endian(prefix):
+arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS")
+sitedata = siteinfo_data_for_machine(arch, os, d)
+if "endian-little" in sitedata:
+return "little"
+elif "endian-big" in sitedata:
+return "big"
+else:
+bb.fatal("Cannot determine endianism for %s-%s" % (arch, os))
+
+def meson_write_props(var, f):
+for property in d.getVar(var).split():
+ (k, v) = property.split(':')
+ print("{} = {}".format(k, meson_array(v)), file=f)
+ d.appendVarFlag("do_write_config", "vardeps", v)
+
+with open(oe.path.join(d.getVar('WORKDIR'), "meson.cross"), "w") as f:
+print("""\
 [binaries]
-c = ${@meson_array('CC', d)}
-cpp = ${@meson_array('CXX', d)}
-ar

Re: [OE-core] [OE-Core][PATCH v2] systemd: upgrade v244.1 -> v244.3

2020-02-14 Thread Alex Kiernan
On Fri, Feb 14, 2020 at 7:25 AM Alex Kiernan  wrote:
>
> On Fri, Feb 14, 2020 at 7:17 AM Khem Raj  wrote:
> >
> > On Thu, Feb 13, 2020 at 3:40 PM Richard Purdie
> >  wrote:
> > >
> > > On Thu, 2020-02-13 at 06:16 +, Alex Kiernan wrote:
> > > > Commits from v244-stable:
> > >
> > > I think this causes:
> > >
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/48/builds/1557
> > >
> > > (systemd-boot patch failures)
> >
> > right
> > http://errors.yoctoproject.org/Errors/Details/390912/
> >
>
> Yeah... just trying to work out if there's a better way to handle the
> efi-cc stuff w/o having an even larger set of reverts against
> meson.build :|
>

It looks like by making meson.cross configurable I can drop all the
reverts, which should get us to a better place for future upgrades.
I've run the obvious pieces of oe-selftest, but I'll clean up the
hacky mess I've got and send up a full patchset if we can push it
through the autobuilders.

Or reverting the latest commit on meson.build does fix it, but that
feels like we're just digging an even deeper hole!

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH v2] systemd: upgrade v244.1 -> v244.3

2020-02-13 Thread Alex Kiernan
On Fri, Feb 14, 2020 at 7:17 AM Khem Raj  wrote:
>
> On Thu, Feb 13, 2020 at 3:40 PM Richard Purdie
>  wrote:
> >
> > On Thu, 2020-02-13 at 06:16 +, Alex Kiernan wrote:
> > > Commits from v244-stable:
> >
> > I think this causes:
> >
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/48/builds/1557
> >
> > (systemd-boot patch failures)
>
> right
> http://errors.yoctoproject.org/Errors/Details/390912/
>

Yeah... just trying to work out if there's a better way to handle the
efi-cc stuff w/o having an even larger set of reverts against
meson.build :|

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH v3] iputils: Fix systemd and ipv6 detection

2020-02-13 Thread Alex Kiernan
When systemd is enabled, ensure iputils detects it correctly. Split out
IPv6 only features based on ipv6 enabled in DISTRO_FEATURES.

Signed-off-by: Alex Kiernan 
---

Changes in v3:
- fix typo in SoB

Changes in v2:
- ninfod: fix systemd Documentation url error
- rarpd: rdisc: Drop PrivateUsers

 ...-fix-systemd-Documentation-url-error.patch | 28 +++
 .../0001-rarpd-rdisc-Drop-PrivateUsers.patch  | 46 +++
 .../iputils/iputils_s20190709.bb  | 23 +++---
 3 files changed, 91 insertions(+), 6 deletions(-)
 create mode 100644 
meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
 create mode 100644 
meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch

diff --git 
a/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
 
b/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
new file mode 100644
index ..03a3f5602dc6
--- /dev/null
+++ 
b/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
@@ -0,0 +1,28 @@
+From c1f1527eb30d4a5feebf9a0757582bbf7fe3eae9 Mon Sep 17 00:00:00 2001
+From: Andrea Stevanato 
+Date: Tue, 5 Nov 2019 19:08:30 +
+Subject: [PATCH] ninfod: fix systemd Documentation url error
+
+systemd[1]: /usr/lib/systemd/system/ninfod.service:3: Invalid URL, ignoring: 
ninfod(8)
+
+Upstream-Status: Backport 
[https://github.com/iputils/iputils/commit/c1f1527eb30d4a5feebf9a0757582bbf7fe3eae9]
+Signed-off-by: Alex Kiernan 
+---
+ systemd/ninfod.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/systemd/ninfod.service.in b/systemd/ninfod.service.in
+index 5ab69ca00e96..8e79fcd9238e 100644
+--- a/systemd/ninfod.service.in
 b/systemd/ninfod.service.in
+@@ -1,6 +1,6 @@
+ [Unit]
+ Description=Respond to IPv6 Node Information Queries
+-Documentation=ninfod(8)
++Documentation=man:ninfod(8)
+ Requires=network.target
+ After=network.target
+ 
+-- 
+2.17.1
+
diff --git 
a/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch
 
b/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch
new file mode 100644
index ..d7367caf7877
--- /dev/null
+++ 
b/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch
@@ -0,0 +1,46 @@
+From 6e51d529988cfc0bb357751fd767e9f1478e2b81 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan 
+Date: Thu, 13 Feb 2020 06:08:45 +
+Subject: [PATCH] rarpd: rdisc: Drop PrivateUsers
+
+Neither rarpd nor rdisc can gain the necessary capabilities with
+PrivateUsers enabled.
+
+Upstream-Status: Pending
+Signed-off-by: Alex Kiernan 
+---
+ systemd/rarpd.service.in | 1 -
+ systemd/rdisc.service.in | 3 ++-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/systemd/rarpd.service.in b/systemd/rarpd.service.in
+index e600c10c93e6..f5d7621a7ce8 100644
+--- a/systemd/rarpd.service.in
 b/systemd/rarpd.service.in
+@@ -12,7 +12,6 @@ AmbientCapabilities=CAP_NET_RAW
+ DynamicUser=yes
+ PrivateTmp=yes
+ PrivateDevices=yes
+-PrivateUsers=yes
+ ProtectSystem=strict
+ ProtectHome=yes
+ ProtectControlGroups=yes
+diff --git a/systemd/rdisc.service.in b/systemd/rdisc.service.in
+index 4e2a1ec9d0e5..a71b87d36b37 100644
+--- a/systemd/rdisc.service.in
 b/systemd/rdisc.service.in
+@@ -8,9 +8,10 @@ After=network.target
+ EnvironmentFile=-/etc/sysconfig/rdisc
+ ExecStart=@sbindir@/rdisc -f -t $OPTIONS $SEND_ADDRESS $RECEIVE_ADDRESS
+ 
++CapabilityBoundingSet=CAP_NET_RAW
+ AmbientCapabilities=CAP_NET_RAW
+ PrivateTmp=yes
+-PrivateUsers=yes
++DynamicUser=yes
+ ProtectSystem=strict
+ ProtectHome=yes
+ ProtectControlGroups=yes
+-- 
+2.17.1
+
diff --git a/meta/recipes-extended/iputils/iputils_s20190709.bb 
b/meta/recipes-extended/iputils/iputils_s20190709.bb
index e0d2ae160ee0..2aed6b56ca99 100644
--- a/meta/recipes-extended/iputils/iputils_s20190709.bb
+++ b/meta/recipes-extended/iputils/iputils_s20190709.bb
@@ -12,6 +12,8 @@ DEPENDS = "gnutls"
 
 SRC_URI = "git://github.com/iputils/iputils \

file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \
+   file://0001-ninfod-fix-systemd-Documentation-url-error.patch \
+   file://0001-rarpd-rdisc-Drop-PrivateUsers.patch \
"
 SRCREV = "13e00847176aa23683d68fce1d17ffb523510946"
 
@@ -23,16 +25,20 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?Ps\d+)"
 # breaks the version order.
 CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214"
 
-PACKAGECONFIG ??= "libcap libgcrypt rarpd traceroute6"
+PACKAGECONFIG ??= "libcap libgcrypt rarpd \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ninfod 
traceroute6', '', d)} \
+   ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap"
 PACKAGECONFIG[libgcr

[OE-core] [OE-Core][PATCH v2] iputils: Fix systemd and ipv6 detection

2020-02-12 Thread Alex Kiernan
When systemd is enabled, ensure iputils detects it correctly. Split out
IPv6 only features based on ipv6 enabled in DISTRO_FEATURES.

Signed-off-by: Alex Kiernan 
---

Changes in v2:
- ninfod: fix systemd Documentation url error
- rarpd: rdisc: Drop PrivateUsers

 ...-fix-systemd-Documentation-url-error.patch | 28 +++
 .../0001-rarpd-rdisc-Drop-PrivateUsers.patch  | 46 +++
 .../iputils/iputils_s20190709.bb  | 23 +++---
 3 files changed, 91 insertions(+), 6 deletions(-)
 create mode 100644 
meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
 create mode 100644 
meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch

diff --git 
a/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
 
b/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
new file mode 100644
index ..58bbb3122b48
--- /dev/null
+++ 
b/meta/recipes-extended/iputils/iputils/0001-ninfod-fix-systemd-Documentation-url-error.patch
@@ -0,0 +1,28 @@
+From c1f1527eb30d4a5feebf9a0757582bbf7fe3eae9 Mon Sep 17 00:00:00 2001
+From: Andrea Stevanato 
+Date: Tue, 5 Nov 2019 19:08:30 +
+Subject: [PATCH] ninfod: fix systemd Documentation url error
+
+systemd[1]: /usr/lib/systemd/system/ninfod.service:3: Invalid URL, ignoring: 
ninfod(8)
+
+Upstream-Status: Backport 
[https://github.com/iputils/iputils/commit/c1f1527eb30d4a5feebf9a0757582bbf7fe3eae9]
+Signed-of-by: Alex Kiernan 
+---
+ systemd/ninfod.service.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/systemd/ninfod.service.in b/systemd/ninfod.service.in
+index 5ab69ca00e96..8e79fcd9238e 100644
+--- a/systemd/ninfod.service.in
 b/systemd/ninfod.service.in
+@@ -1,6 +1,6 @@
+ [Unit]
+ Description=Respond to IPv6 Node Information Queries
+-Documentation=ninfod(8)
++Documentation=man:ninfod(8)
+ Requires=network.target
+ After=network.target
+ 
+-- 
+2.17.1
+
diff --git 
a/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch
 
b/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch
new file mode 100644
index ..d7367caf7877
--- /dev/null
+++ 
b/meta/recipes-extended/iputils/iputils/0001-rarpd-rdisc-Drop-PrivateUsers.patch
@@ -0,0 +1,46 @@
+From 6e51d529988cfc0bb357751fd767e9f1478e2b81 Mon Sep 17 00:00:00 2001
+From: Alex Kiernan 
+Date: Thu, 13 Feb 2020 06:08:45 +
+Subject: [PATCH] rarpd: rdisc: Drop PrivateUsers
+
+Neither rarpd nor rdisc can gain the necessary capabilities with
+PrivateUsers enabled.
+
+Upstream-Status: Pending
+Signed-off-by: Alex Kiernan 
+---
+ systemd/rarpd.service.in | 1 -
+ systemd/rdisc.service.in | 3 ++-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/systemd/rarpd.service.in b/systemd/rarpd.service.in
+index e600c10c93e6..f5d7621a7ce8 100644
+--- a/systemd/rarpd.service.in
 b/systemd/rarpd.service.in
+@@ -12,7 +12,6 @@ AmbientCapabilities=CAP_NET_RAW
+ DynamicUser=yes
+ PrivateTmp=yes
+ PrivateDevices=yes
+-PrivateUsers=yes
+ ProtectSystem=strict
+ ProtectHome=yes
+ ProtectControlGroups=yes
+diff --git a/systemd/rdisc.service.in b/systemd/rdisc.service.in
+index 4e2a1ec9d0e5..a71b87d36b37 100644
+--- a/systemd/rdisc.service.in
 b/systemd/rdisc.service.in
+@@ -8,9 +8,10 @@ After=network.target
+ EnvironmentFile=-/etc/sysconfig/rdisc
+ ExecStart=@sbindir@/rdisc -f -t $OPTIONS $SEND_ADDRESS $RECEIVE_ADDRESS
+ 
++CapabilityBoundingSet=CAP_NET_RAW
+ AmbientCapabilities=CAP_NET_RAW
+ PrivateTmp=yes
+-PrivateUsers=yes
++DynamicUser=yes
+ ProtectSystem=strict
+ ProtectHome=yes
+ ProtectControlGroups=yes
+-- 
+2.17.1
+
diff --git a/meta/recipes-extended/iputils/iputils_s20190709.bb 
b/meta/recipes-extended/iputils/iputils_s20190709.bb
index e0d2ae160ee0..2aed6b56ca99 100644
--- a/meta/recipes-extended/iputils/iputils_s20190709.bb
+++ b/meta/recipes-extended/iputils/iputils_s20190709.bb
@@ -12,6 +12,8 @@ DEPENDS = "gnutls"
 
 SRC_URI = "git://github.com/iputils/iputils \

file://0001-ninfod-change-variable-name-to-avoid-colliding-with-.patch \
+   file://0001-ninfod-fix-systemd-Documentation-url-error.patch \
+   file://0001-rarpd-rdisc-Drop-PrivateUsers.patch \
"
 SRCREV = "13e00847176aa23683d68fce1d17ffb523510946"
 
@@ -23,16 +25,20 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?Ps\d+)"
 # breaks the version order.
 CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214"
 
-PACKAGECONFIG ??= "libcap libgcrypt rarpd traceroute6"
+PACKAGECONFIG ??= "libcap libgcrypt rarpd \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ninfod 
traceroute6', '', d)} \
+   ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap"
 PACKAGECONFIG[libgcrypt] = "-DUSE_CRYPTO=gcrypt, -D

[OE-core] [OE-Core][PATCH v2] systemd: upgrade v244.1 -> v244.3

2020-02-12 Thread Alex Kiernan
refixRoute=
  a8ad020ea0ba shared/dropin: fix assert for invalid drop-in
  946cdba156dd initrd: make udev cleanup service confict trigger and settle too
  c0a8a92e6027 man: we support growing xfs too these days
  608d88273494 time-util: deal with systems where userspace has 64bit time_t 
but kernel does not
  cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
  73435b219553 systemctl: show what verbs support --dry-run in the help page
  dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
  0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
  d2471109d999 shared/install: provide a nicer error message for invalid 
WantedBy=/Required= values

Signed-off-by: Alex Kiernan 
---

Changes in v2:
- fix SRC_URI now v244.3 tag exists on v244-stable

 .../systemd/{systemd-boot_244.1.bb => systemd-boot_244.3.bb}| 0
 .../systemd/{systemd-conf_244.1.bb => systemd-conf_244.3.bb}| 0
 meta/recipes-core/systemd/systemd.inc   | 2 +-
 .../recipes-core/systemd/{systemd_244.1.bb => systemd_244.3.bb} | 0
 4 files changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.1.bb => 
systemd-boot_244.3.bb} (100%)
 rename meta/recipes-core/systemd/{systemd-conf_244.1.bb => 
systemd-conf_244.3.bb} (100%)
 rename meta/recipes-core/systemd/{systemd_244.1.bb => systemd_244.3.bb} (100%)

diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb 
b/meta/recipes-core/systemd/systemd-boot_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_244.1.bb
rename to meta/recipes-core/systemd/systemd-boot_244.3.bb
diff --git a/meta/recipes-core/systemd/systemd-conf_244.1.bb 
b/meta/recipes-core/systemd/systemd-conf_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-conf_244.1.bb
rename to meta/recipes-core/systemd/systemd-conf_244.3.bb
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 8c05a96ecc4f..e73b397b5d64 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "639dc9f4bfd2c09535bee079ae9bc7006b520a66"
+SRCREV = "b7ed902b2394f94e7f1fbe6c3194b5cd9a9429e6"
 SRCBRANCH = "v244-stable"
 SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
 
diff --git a/meta/recipes-core/systemd/systemd_244.1.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd_244.1.bb
rename to meta/recipes-core/systemd/systemd_244.3.bb
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH v2] kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE

2020-02-12 Thread Alex Kiernan
When using EXTERNAL_KERNEL_DEVICETREE, collect DTB overlays too (*.dtbo)
as well as iterating down into sub-directories so using the behaviour
for naming which matches KERNEL_DEVICETREE.

Signed-off-by: Alex Kiernan 
---

Changes in v2:
- ensure that the order of dtb/dtbo files in the generated fitimage is
  reproducible.

 meta/classes/kernel-fitimage.bbclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index ec18a3d69921..72b05ff8d1dd 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -391,11 +391,10 @@ fitimage_assemble() {
 
if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
dtbcount=1
-   for DTBFILE in ${EXTERNAL_KERNEL_DEVICETREE}/*.dtb; do
-   DTB=`basename ${DTBFILE}`
+   for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
DTB=$(echo "${DTB}" | tr '/' '_')
DTBS="${DTBS} ${DTB}"
-   fitimage_emit_section_dtb ${1} ${DTB} ${DTBFILE}
+   fitimage_emit_section_dtb ${1} ${DTB} 
"${EXTERNAL_KERNEL_DEVICETREE}/${DTB}"
done
fi
 
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] kernel-fitimage: fix devicetree reproducibility

2020-02-12 Thread Alex Kiernan
On Wed, Feb 12, 2020 at 11:33 AM Alex Kiernan  wrote:
>
> Ensure that the order of dtb/dtbo files in the generated fitimage is
> reproducible.
>
> Fixes: 71bfa9838cbf ("kernel-fitimage: Handle overlays in 
> EXTERNAL_KERNEL_DEVICETREE")
> Signed-off-by: Alex Kiernan 
> ---
>

I'd not realised the previous change was still in master-next. I'll
squash this one into that.


-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] kernel-fitimage: fix devicetree reproducibility

2020-02-12 Thread Alex Kiernan
Ensure that the order of dtb/dtbo files in the generated fitimage is
reproducible.

Fixes: 71bfa9838cbf ("kernel-fitimage: Handle overlays in 
EXTERNAL_KERNEL_DEVICETREE")
Signed-off-by: Alex Kiernan 
---

 meta/classes/kernel-fitimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index d1b8cdc1f049..72b05ff8d1dd 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -391,7 +391,7 @@ fitimage_assemble() {
 
if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
dtbcount=1
-   for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n'); do
+   for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
DTB=$(echo "${DTB}" | tr '/' '_')
DTBS="${DTBS} ${DTB}"
fitimage_emit_section_dtb ${1} ${DTB} 
"${EXTERNAL_KERNEL_DEVICETREE}/${DTB}"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] devicetree.bbclass: include symbols in base DT

2020-02-12 Thread Alex Kiernan
When processing overlays, the base device tree must be compiled with
symbols, otherwise attempting to apply overlays in U-Boot will fail
with:

  failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
  base fdt does did not have a /__symbols__ node
  make sure you've compiled with -@

Signed-off-by: Alex Kiernan 
---

 meta/classes/devicetree.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/devicetree.bbclass b/meta/classes/devicetree.bbclass
index d8779c794378..c772ab2ab93e 100644
--- a/meta/classes/devicetree.bbclass
+++ b/meta/classes/devicetree.bbclass
@@ -59,7 +59,7 @@ DT_BOOT_CPU ??= "0"
 
 DTC_FLAGS ?= "-R ${DT_RESERVED_MAP} -b ${DT_BOOT_CPU}"
 DTC_PPFLAGS ?= "-nostdinc -undef -D__DTS__ -x assembler-with-cpp"
-DTC_BFLAGS ?= "-p ${DT_PADDING_SIZE}"
+DTC_BFLAGS ?= "-p ${DT_PADDING_SIZE} -@"
 DTC_OFLAGS ?= "-p 0 -@ -H epapr"
 
 python () {
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] systemd: upgrade v244.1 -> v244.3

2020-02-12 Thread Alex Kiernan
refixRoute=
  a8ad020ea0ba shared/dropin: fix assert for invalid drop-in
  946cdba156dd initrd: make udev cleanup service confict trigger and settle too
  c0a8a92e6027 man: we support growing xfs too these days
  608d88273494 time-util: deal with systems where userspace has 64bit time_t 
but kernel does not
  cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
  73435b219553 systemctl: show what verbs support --dry-run in the help page
  dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
  0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
  d2471109d999 shared/install: provide a nicer error message for invalid 
WantedBy=/Required= values

Signed-off-by: Alex Kiernan 
---

 .../systemd/{systemd-boot_244.1.bb => systemd-boot_244.3.bb} | 0
 .../systemd/{systemd-conf_244.1.bb => systemd-conf_244.3.bb} | 0
 meta/recipes-core/systemd/systemd.inc| 5 +++--
 .../systemd/{systemd_244.1.bb => systemd_244.3.bb}   | 0
 4 files changed, 3 insertions(+), 2 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.1.bb => 
systemd-boot_244.3.bb} (100%)
 rename meta/recipes-core/systemd/{systemd-conf_244.1.bb => 
systemd-conf_244.3.bb} (100%)
 rename meta/recipes-core/systemd/{systemd_244.1.bb => systemd_244.3.bb} (100%)

diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb 
b/meta/recipes-core/systemd/systemd-boot_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_244.1.bb
rename to meta/recipes-core/systemd/systemd-boot_244.3.bb
diff --git a/meta/recipes-core/systemd/systemd-conf_244.1.bb 
b/meta/recipes-core/systemd/systemd-conf_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-conf_244.1.bb
rename to meta/recipes-core/systemd/systemd-conf_244.3.bb
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 8c05a96ecc4f..6861767f82fa 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,8 +14,9 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "639dc9f4bfd2c09535bee079ae9bc7006b520a66"
+SRCREV = "b7ed902b2394f94e7f1fbe6c3194b5cd9a9429e6"
 SRCBRANCH = "v244-stable"
-SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
+# v244.3 failed to push the branch, undo nobranch=1 when next updating
+SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=git;nobranch=1"
 
 S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/systemd/systemd_244.1.bb 
b/meta/recipes-core/systemd/systemd_244.3.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd_244.1.bb
rename to meta/recipes-core/systemd/systemd_244.3.bb
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] systemd: upgrade v244.1 -> v244.2

2020-02-12 Thread Alex Kiernan
On Wed, Feb 12, 2020 at 7:20 AM Alexander Kanavin
 wrote:
>
> I think 244.3 is latest?
>

Looks like upstream's done something funky... the tag's been pushed,
but not the branch :|

I'll pull it in later.

> Alex
>
> On Wed 12. Feb 2020 at 8.15, Alex Kiernan  wrote:
>>
>> Commits from v244-stable:
>>
>>   77c04ce5c270 hwdb: update to v245-rc1
>>   b4eb8848240c Fix typo in function name
>>   e2d4cb9843c5 polkit: when authorizing via PK let's re-resolve 
>> callback/userdata instead of caching it
>>   83bfc0d8dd02 sd-bus: introduce API for re-enqueuing incoming messages
>>   5926f9f1723f polkit: use structured initialization
>>   0697d0d972c8 polkit: on async pk requests, re-validate action/details
>>   2589995acdb2 polkit: reuse some common bus message appending code
>>   5b2442d5c3ec bus-polkit: rename return error parameter to ret_error
>>   0a19ff7004e4 shared: split out polkit stuff from bus-util.c → bus-polkit.c
>>   1325dfb5778d test: adapt to the new capsh format
>>   3538fafb4714 meson: update efi path detection to gnu-efi-3.0.11
>>   3034855a5b62 presets: "disable" all passive targets by default
>>   c2e304681929 shared/sysctl-util: normalize repeated slashes or dots to a 
>> single value
>>   6f4364046f90 dhcp6: do not use T1 and T2 longer than one provided by the 
>> lease
>>   0ed6cda28dff network: fix implicit type conversion warning by GCC-10
>>   f6a5c02d26b1 bootspec: parse random-seed-mode line in loader.conf
>>   ddc5dca8a73b sd-boot: fix typo
>>   2bbbe9ae41ab test: Synchronize journal before reading from it
>>   072485d661d7 sd-bus: fix introspection bug in signal parameter names
>>   80af3cf5e36b efi: fix build.
>>   d7ede1ade564 generator: order growfs for the root fs after 
>> systemd-remount-fs
>>   e9904998213d loginctl: use /org/freedesktop/login1/session/auto when 
>> "lock-session" is called without argument
>>   82dd4caf014c Documentation update for x-systemd.{before,after}
>>   a60459764d9d man: fix typo in systemd.netdev Xfrm example
>>   fc053e2dfb3f timesyncd: log louder when we refuse a server due to root 
>> distance
>>   af0e630693fa resolved: drop DNSSEC root key that is not valid anymore
>>   ae59f1666ca6 journal: don't use startswith() on something that is not a 
>> NUL-terminated string
>>   536ef6d72bc6 test: add test for 
>> https://github.com/systemd/systemd/issues/14560
>>   b78fe3c1b1a8 core: make sure StandardInput=file: doesn't get dup'ed to 
>> stdout/stderr by default
>>   a1561a08f2d5 pkgconf: add full generator paths
>>   e5f2d11489ec tree-wide: we forgot to destroy some bus errors
>>   ea67fd42067b mount: make checks on perpetual mount units more lax
>>   2f23c648bce4 core: never allow perpetual units to be masked
>>   9ba11dffb09a typo: "May modify to" -> "May modify"
>>   84c048799a78 Disable reading SystemdOptions EFI Var when in SecureBoot mode
>>   4c2d72b53091 sysctl: downgrade message when we have no permission
>>   c001a285a3a2 Clarify journald.conf MaxLevelStore documentation
>>   45d52c7615fd logind: refuse overriding idle hint on tty sessions
>>   b1a0be45b4ee cgroup: update only siblings that got realized once
>>   e6d694254fe1 mount: mark an existing "mounting" unit from 
>> /proc/self/mountinfo as "just_mounted"
>>   d8fd38769c36 journalctl: Correctly handle combination of --reverse and 
>> --lines (fixes #1596)
>>   cd19bd31d808 journalctl: Correctly handle --show-cursor in combination 
>> with --until or --since and --reverse
>>   1320aa92dc0a core: fix re-realization of cgroup siblings
>>   14164ec6bc77 core: propagate service state to socket in more load states
>>   c22bf6b31a45 man: describe "symlink" and "systemctl link" explicitly in 
>> UNIT FILE LOAD PATH
>>   26f3a534f1ab core: be more restrictive on the dependency types we allow to 
>> be created transiently
>>   377cc5d91ea5 udev: don't import parent ID_FS_ data on partitions
>>   7d5060d53994 man: fix option name
>>   98c03090274a Support Plugable UD-PRO8 dock
>>   e9687d09dccf gpt-auto: don't assume XBOOTLDR is vfat
>>   7057fe863007 man: fix documentation of IBM VIO device naming
>>   f8d1df1045be man: slightly extend documentation on difference between 
>> ID_NET_NAME_ONBOARD and ID_NET_LABEL_ONBOARD
>>   1faf5dde4d4a boot: fix osrel parser
>>   65d247af1786 udev: do not use exact match of file permission
>>   6da978f89b48 network: lower the log-level of harmless message
>>   5d8a614f926c hwdb: ignore keys added in kernel 5.5
>>   8b1

[OE-core] [OE-Core][PATCH] systemd: upgrade v244.1 -> v244.2

2020-02-11 Thread Alex Kiernan
2e6027 man: we support growing xfs too these days
  608d88273494 time-util: deal with systems where userspace has 64bit time_t 
but kernel does not
  cfced59a4bd8 [import] fix stdin/stdout pipe behavior in import/export tar/raw
  73435b219553 systemctl: show what verbs support --dry-run in the help page
  dc56b94e1308 cryptsetup-generator: unconfuse writing of the device timeout
  0757ad565573 shared/install: log syntax error for invalid DefaultInstance=
  d2471109d999 shared/install: provide a nicer error message for invalid 
WantedBy=/Required= values

Signed-off-by: Alex Kiernan 
---

 .../systemd/{systemd-boot_244.1.bb => systemd-boot_244.2.bb}| 0
 .../systemd/{systemd-conf_244.1.bb => systemd-conf_244.2.bb}| 0
 meta/recipes-core/systemd/systemd.inc   | 2 +-
 .../recipes-core/systemd/{systemd_244.1.bb => systemd_244.2.bb} | 0
 4 files changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-core/systemd/{systemd-boot_244.1.bb => 
systemd-boot_244.2.bb} (100%)
 rename meta/recipes-core/systemd/{systemd-conf_244.1.bb => 
systemd-conf_244.2.bb} (100%)
 rename meta/recipes-core/systemd/{systemd_244.1.bb => systemd_244.2.bb} (100%)

diff --git a/meta/recipes-core/systemd/systemd-boot_244.1.bb 
b/meta/recipes-core/systemd/systemd-boot_244.2.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_244.1.bb
rename to meta/recipes-core/systemd/systemd-boot_244.2.bb
diff --git a/meta/recipes-core/systemd/systemd-conf_244.1.bb 
b/meta/recipes-core/systemd/systemd-conf_244.2.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-conf_244.1.bb
rename to meta/recipes-core/systemd/systemd-conf_244.2.bb
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 8c05a96ecc4f..549147c1874d 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "639dc9f4bfd2c09535bee079ae9bc7006b520a66"
+SRCREV = "3ca4db9469dce2c0914933db4948456a367c5dc7"
 SRCBRANCH = "v244-stable"
 SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
 
diff --git a/meta/recipes-core/systemd/systemd_244.1.bb 
b/meta/recipes-core/systemd/systemd_244.2.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd_244.1.bb
rename to meta/recipes-core/systemd/systemd_244.2.bb
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] iputils: Fix systemd and ipv6 detection

2020-02-10 Thread Alex Kiernan
When systemd is enabled, ensure iputils detects it correctly. Split out
IPv6 only features based on ipv6 enabled in DISTRO_FEATURES.

Signed-off-by: Alex Kiernan 
---

 .../iputils/iputils_s20190709.bb  | 21 +--
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-extended/iputils/iputils_s20190709.bb 
b/meta/recipes-extended/iputils/iputils_s20190709.bb
index e0d2ae160ee0..e671130e4933 100644
--- a/meta/recipes-extended/iputils/iputils_s20190709.bb
+++ b/meta/recipes-extended/iputils/iputils_s20190709.bb
@@ -23,16 +23,20 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?Ps\d+)"
 # breaks the version order.
 CVE_CHECK_WHITELIST += "CVE-2000-1213 CVE-2000-1214"
 
-PACKAGECONFIG ??= "libcap libgcrypt rarpd traceroute6"
+PACKAGECONFIG ??= "libcap libgcrypt rarpd \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ninfod 
traceroute6', '', d)} \
+   ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 PACKAGECONFIG[libcap] = "-DUSE_CAP=true, -DUSE_CAP=false, libcap"
 PACKAGECONFIG[libgcrypt] = "-DUSE_CRYPTO=gcrypt, -DUSE_CRYPTO=none, libgcrypt"
 PACKAGECONFIG[libidn] = "-DUSE_IDN=true, -DUSE_IDN=false, libidn2"
 PACKAGECONFIG[gettext] = "-DUSE_GETTEXT=true, -DUSE_GETTEXT=false, gettext"
+PACKAGECONFIG[ninfod] = "-DBUILD_NINFOD=true,-DBUILD_NINFOD=false,"
 PACKAGECONFIG[rarpd] = "-DBUILD_RARPD=true,-DBUILD_RARPD=false,"
+PACKAGECONFIG[systemd] = "-Dsystemdunitdir=${systemd_unitdir}/system,,systemd"
 PACKAGECONFIG[traceroute6] = 
"-DBUILD_TRACEROUTE6=true,-DBUILD_TRACEROUTE6=false,"
 PACKAGECONFIG[docs] = "-DBUILD_HTML_MANS=true 
-DBUILD_MANS=true,-DBUILD_HTML_MANS=false -DBUILD_MANS=false, libxslt"
 
-inherit meson update-alternatives
+inherit meson systemd update-alternatives
 
 # Have to disable setcap/suid as its not deterministic
 EXTRA_OEMESON += "--prefix=${root_prefix}/ -DNO_SETCAP_OR_SUID=true"
@@ -42,12 +46,12 @@ ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN}-ping = "ping"
 ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
 
-SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-traceroute6 
${PN}-clockdiff ${PN}-tftpd ${PN}-rarpd ${PN}-rdisc ${PN}-ninfod"
+SPLITPKGS = "${PN}-ping ${PN}-arping ${PN}-tracepath ${PN}-clockdiff 
${PN}-tftpd ${PN}-rdisc \
+ ${@bb.utils.contains('PACKAGECONFIG', 'rarpd', '${PN}-rarpd', '', 
d)} \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 
'${PN}-traceroute6 ${PN}-ninfod', '', d)}"
 PACKAGES += "${SPLITPKGS}"
 
 ALLOW_EMPTY_${PN} = "1"
-ALLOW_EMPTY_${PN}-rarpd = "1"
-ALLOW_EMPTY_${PN}-traceroute6 = "1"
 RDEPENDS_${PN} += "${SPLITPKGS}"
 
 FILES_${PN} = ""
@@ -57,6 +61,11 @@ FILES_${PN}-tracepath = "${base_bindir}/tracepath"
 FILES_${PN}-traceroute6= "${base_bindir}/traceroute6"
 FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
 FILES_${PN}-tftpd = "${base_bindir}/tftpd"
-FILES_${PN}-rarpd = "${base_sbindir}/rarpd"
+FILES_${PN}-rarpd = "${base_sbindir}/rarpd  
${systemd_unitdir}/system/rarpd@.service"
 FILES_${PN}-rdisc = "${base_sbindir}/rdisc"
 FILES_${PN}-ninfod = "${base_sbindir}/ninfod ${sysconfdir}/init.d/ninfod.sh"
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 
'${PN}-ninfod', '', d)} \
+${PN}-rdisc"
+SYSTEMD_SERVICE_${PN}-ninfod = "ninfod.service"
+SYSTEMD_SERVICE_${PN}-rdisc = "rdisc.service"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] Cache unihash ... doesn't match BB_UNIHASH ...

2020-02-10 Thread Alex Kiernan
On Sun, Feb 9, 2020 at 4:25 PM Alex Kiernan  wrote:
>
> On Sun, Feb 9, 2020 at 7:27 AM Alex Kiernan  wrote:
> >
> > On Sun, Feb 9, 2020 at 12:23 AM chris.lapla...@agilent.com
> >  wrote:
> > >
> > > Hi Richard,
> > >
> > > > > > Anecdotally, we are running Zeus for nightly builds with three
> > > > > > multiconfigs. I cherry-picked your "bitbake: fix2" and "bitbake:
> > > > > > fixup" patches and haven't seen any of the BB_UNIHASH errors since.
> > > > > > Granted it's only been a week. But before that, hash equiv +
> > > > > > multiconfig was unusable due to the BB_UNIHASH errors.
> > > > >
> > > > > That is a really helpful data point, thanks. I should probably clean 
> > > > > up
> > > > > those bitbake patches and get them merged then, I couldn't decide if
> > > > > they were right or not...
> > > > >
> > > >
> > > > I just picked all your pending changes out of master-next into our
> > > > local patch queue - will let you know how it looks when it's finished
> > > > cooking!
> > >
> > > There are two small issues I have observed.
> > >
> > > One is occasionally I get a lot of undeterministic metadata errors when 
> > > BB_CACHE_POLICY = "cache", multiconfig, and hash equiv are enabled. The 
> > > errors are all on recipes for which SRCREV = "${AUTOREV}". It doesn't 
> > > always happen. But it did just now when I rebased our "zeus-modified" 
> > > branch onto the upstream "zeus" branch, to get the changes starting with 
> > > 7dc72fde6edeb5d6ac6b3832530998afeea67cbc.
> > >
> > > Two is that, sometimes "Initializing tasks" stage appears stuck at 44% 
> > > for a couple minutes. I traced it down to this code in runqueue.py (line 
> > > 1168 on zeus):
> > >
> > > # Iterate over the task list and call into the siggen code
> > > dealtwith = set()
> > > todeal = set(self.runtaskentries)
> > > while len(todeal) > 0:
> > > for tid in todeal.copy():
> > > if len(self.runtaskentries[tid].depends - dealtwith) == 0:
> > > dealtwith.add(tid)
> > > todeal.remove(tid)
> > > self.prepare_task_hash(tid)
> > >
> > > When I instrument the loop to print out the size of "todeal", I see it 
> > > decrease very slowly, sometimes only a couple at a time. I'm guessing 
> > > this is because prepare_task_hash is contacting the hash equiv server, in 
> > > a serial manner here. I'm over my work VPN which makes things extra slow. 
> > > Is there an opportunity for batching here?
> > >
> >
> > I've a new failure:
> >
> > 00:20:59.829  Traceback (most recent call last):
> > 00:20:59.829File
> > "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/server/process.py",
> > line 278, in ProcessServer.idle_commands(delay=0.1,
> > fds=[ > type=SocketKind.SOCK_STREAM, proto=0, laddr=bitbake.sock>,
> >  > type=SocketKind.SOCK_STREAM, proto=0, laddr=bitbake.sock>,
> > ]):
> > 00:20:59.829   try:
> > 00:20:59.829  >retval = function(self, data, False)
> > 00:20:59.829   if retval is False:
> > 00:20:59.829File
> > "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/cooker.py",
> > line 1434, in buildTargetsIdle(server= > started)>, rq=,
> > abort=False):
> > 00:20:59.829   try:
> > 00:20:59.829  >retval = rq.execute_runqueue()
> > 00:20:59.829   except runqueue.TaskFailure as exc:
> > 00:20:59.829File
> > "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/runqueue.py",
> > line 1522, in RunQueue.execute_runqueue():
> > 00:20:59.829   try:
> > 00:20:59.829  >return self._execute_runqueue()
> > 00:20:59.829   except bb.runqueue.TaskFailure:
> > 00:20:59.829File
> > "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/runqueue.py",
> > line 1488, in RunQueue._execute_runqueue():
> > 00:20:59.829   if self.state is runQueueRunning:
> > 00:20:59.829  >retval = self.rqexe.exe

Re: [OE-core] Cache unihash ... doesn't match BB_UNIHASH ...

2020-02-09 Thread Alex Kiernan
On Sun, Feb 9, 2020 at 7:27 AM Alex Kiernan  wrote:
>
> On Sun, Feb 9, 2020 at 12:23 AM chris.lapla...@agilent.com
>  wrote:
> >
> > Hi Richard,
> >
> > > > > Anecdotally, we are running Zeus for nightly builds with three
> > > > > multiconfigs. I cherry-picked your "bitbake: fix2" and "bitbake:
> > > > > fixup" patches and haven't seen any of the BB_UNIHASH errors since.
> > > > > Granted it's only been a week. But before that, hash equiv +
> > > > > multiconfig was unusable due to the BB_UNIHASH errors.
> > > >
> > > > That is a really helpful data point, thanks. I should probably clean up
> > > > those bitbake patches and get them merged then, I couldn't decide if
> > > > they were right or not...
> > > >
> > >
> > > I just picked all your pending changes out of master-next into our
> > > local patch queue - will let you know how it looks when it's finished
> > > cooking!
> >
> > There are two small issues I have observed.
> >
> > One is occasionally I get a lot of undeterministic metadata errors when 
> > BB_CACHE_POLICY = "cache", multiconfig, and hash equiv are enabled. The 
> > errors are all on recipes for which SRCREV = "${AUTOREV}". It doesn't 
> > always happen. But it did just now when I rebased our "zeus-modified" 
> > branch onto the upstream "zeus" branch, to get the changes starting with 
> > 7dc72fde6edeb5d6ac6b3832530998afeea67cbc.
> >
> > Two is that, sometimes "Initializing tasks" stage appears stuck at 44% for 
> > a couple minutes. I traced it down to this code in runqueue.py (line 1168 
> > on zeus):
> >
> > # Iterate over the task list and call into the siggen code
> > dealtwith = set()
> > todeal = set(self.runtaskentries)
> > while len(todeal) > 0:
> > for tid in todeal.copy():
> > if len(self.runtaskentries[tid].depends - dealtwith) == 0:
> > dealtwith.add(tid)
> > todeal.remove(tid)
> > self.prepare_task_hash(tid)
> >
> > When I instrument the loop to print out the size of "todeal", I see it 
> > decrease very slowly, sometimes only a couple at a time. I'm guessing this 
> > is because prepare_task_hash is contacting the hash equiv server, in a 
> > serial manner here. I'm over my work VPN which makes things extra slow. Is 
> > there an opportunity for batching here?
> >
>
> I've a new failure:
>
> 00:20:59.829  Traceback (most recent call last):
> 00:20:59.829File
> "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/server/process.py",
> line 278, in ProcessServer.idle_commands(delay=0.1,
> fds=[ type=SocketKind.SOCK_STREAM, proto=0, laddr=bitbake.sock>,
>  type=SocketKind.SOCK_STREAM, proto=0, laddr=bitbake.sock>,
> ]):
> 00:20:59.829   try:
> 00:20:59.829  >retval = function(self, data, False)
> 00:20:59.829   if retval is False:
> 00:20:59.829File
> "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/cooker.py",
> line 1434, in buildTargetsIdle(server= started)>, rq=,
> abort=False):
> 00:20:59.829   try:
> 00:20:59.829  >retval = rq.execute_runqueue()
> 00:20:59.829   except runqueue.TaskFailure as exc:
> 00:20:59.829File
> "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/runqueue.py",
> line 1522, in RunQueue.execute_runqueue():
> 00:20:59.829   try:
> 00:20:59.829  >return self._execute_runqueue()
> 00:20:59.829   except bb.runqueue.TaskFailure:
> 00:20:59.829File
> "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/runqueue.py",
> line 1488, in RunQueue._execute_runqueue():
> 00:20:59.829   if self.state is runQueueRunning:
> 00:20:59.829  >retval = self.rqexe.execute()
> 00:20:59.829
> 00:20:59.829File
> "/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/runqueue.py",
> line 1997, in RunQueueExecute.execute():
> 00:20:59.829   else:
> 00:20:59.829  >
> self.sqdata.outrightfail.remove(nexttask)
> 00:20:59.829   if nexttask in 
> self.sqdata.outrightfail:
>
> Just testing locally with:
>
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index 71108eeed752..a94a9bb

Re: [OE-core] Cache unihash ... doesn't match BB_UNIHASH ...

2020-02-08 Thread Alex Kiernan
On Sun, Feb 9, 2020 at 12:23 AM chris.lapla...@agilent.com
 wrote:
>
> Hi Richard,
>
> > > > Anecdotally, we are running Zeus for nightly builds with three
> > > > multiconfigs. I cherry-picked your "bitbake: fix2" and "bitbake:
> > > > fixup" patches and haven't seen any of the BB_UNIHASH errors since.
> > > > Granted it's only been a week. But before that, hash equiv +
> > > > multiconfig was unusable due to the BB_UNIHASH errors.
> > >
> > > That is a really helpful data point, thanks. I should probably clean up
> > > those bitbake patches and get them merged then, I couldn't decide if
> > > they were right or not...
> > >
> >
> > I just picked all your pending changes out of master-next into our
> > local patch queue - will let you know how it looks when it's finished
> > cooking!
>
> There are two small issues I have observed.
>
> One is occasionally I get a lot of undeterministic metadata errors when 
> BB_CACHE_POLICY = "cache", multiconfig, and hash equiv are enabled. The 
> errors are all on recipes for which SRCREV = "${AUTOREV}". It doesn't always 
> happen. But it did just now when I rebased our "zeus-modified" branch onto 
> the upstream "zeus" branch, to get the changes starting with 
> 7dc72fde6edeb5d6ac6b3832530998afeea67cbc.
>
> Two is that, sometimes "Initializing tasks" stage appears stuck at 44% for a 
> couple minutes. I traced it down to this code in runqueue.py (line 1168 on 
> zeus):
>
> # Iterate over the task list and call into the siggen code
> dealtwith = set()
> todeal = set(self.runtaskentries)
> while len(todeal) > 0:
> for tid in todeal.copy():
> if len(self.runtaskentries[tid].depends - dealtwith) == 0:
> dealtwith.add(tid)
> todeal.remove(tid)
> self.prepare_task_hash(tid)
>
> When I instrument the loop to print out the size of "todeal", I see it 
> decrease very slowly, sometimes only a couple at a time. I'm guessing this is 
> because prepare_task_hash is contacting the hash equiv server, in a serial 
> manner here. I'm over my work VPN which makes things extra slow. Is there an 
> opportunity for batching here?
>

I've a new failure:

00:20:59.829  Traceback (most recent call last):
00:20:59.829File
"/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/server/process.py",
line 278, in ProcessServer.idle_commands(delay=0.1,
fds=[,
,
]):
00:20:59.829   try:
00:20:59.829  >retval = function(self, data, False)
00:20:59.829   if retval is False:
00:20:59.829File
"/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/cooker.py",
line 1434, in buildTargetsIdle(server=, rq=,
abort=False):
00:20:59.829   try:
00:20:59.829  >retval = rq.execute_runqueue()
00:20:59.829   except runqueue.TaskFailure as exc:
00:20:59.829File
"/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/runqueue.py",
line 1522, in RunQueue.execute_runqueue():
00:20:59.829   try:
00:20:59.829  >return self._execute_runqueue()
00:20:59.829   except bb.runqueue.TaskFailure:
00:20:59.829File
"/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/runqueue.py",
line 1488, in RunQueue._execute_runqueue():
00:20:59.829   if self.state is runQueueRunning:
00:20:59.829  >retval = self.rqexe.execute()
00:20:59.829
00:20:59.829File
"/var/lib/jenkins/workspace/nanohub_master/poky/bitbake/lib/bb/runqueue.py",
line 1997, in RunQueueExecute.execute():
00:20:59.829   else:
00:20:59.829  >
self.sqdata.outrightfail.remove(nexttask)
00:20:59.829   if nexttask in self.sqdata.outrightfail:

Just testing locally with:

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 71108eeed752..a94a9bb27ae2 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1994,7 +1994,7 @@ class RunQueueExecute:
 self.sq_task_failoutright(nexttask)
 return True
 else:
-        self.sqdata.outrightfail.remove(nexttask)
+self.sqdata.outrightfail.discard(nexttask)
 if nexttask in self.sqdata.outrightfail:
 logger.debug(2, 'No package found, so
skipping setscene task %s', nexttask)
 self.sq_task_failoutright(nexttask)



-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][RESEND PATCH] rootfs-postcommands: Remove spaces before ; in -ROOTFS_..._COMMAND

2020-02-08 Thread Alex Kiernan
On Sat, Feb 8, 2020 at 1:25 PM Richard Purdie
 wrote:
>
> On Thu, 2020-01-30 at 04:54 +, Alex Kiernan wrote:
> > With spaces in ROOTFS_POSTPROCESS_COMMAND attempts to remove elements
> > using ROOTFS_POSTPROCESS_COMMAND_remove causes parse failures of the
> > form:
> >
> >   bb.pysh.sherrors.ShellSyntaxError: LexToken(COMMA,';',0,0)
> >   followed by:
> > LexToken(TOKEN,'write_image_test_data',0,0)
> > LexToken(COMMA,';',0,0)
> > LexToken(TOKEN,'set_systemd_default_target',0,0)
> > LexToken(COMMA,';',0,0)
> > LexToken(TOKEN,'systemd_create_users',0,0)
> >
> > Removing the spaces between the function name and semicolon allows
> > the list to parse correctly.
> >
> > Signed-off-by: Alex Kiernan 
> > ---
> >
> >  meta/classes/rootfs-postcommands.bbclass | 8 
> >  1 file changed, 4 insertions(+), 4 deletions(-)
>
> This does sound like you're working around a bug in shlex :/
>

Yeah, sorry...

I'll see if I can go and have a proper look at the underlying problem!

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][RESEND PATCH] rootfs-postcommands: Remove spaces before ; in -ROOTFS_..._COMMAND

2020-02-08 Thread Alex Kiernan
On Thu, Jan 30, 2020 at 4:54 AM Alex Kiernan  wrote:
>
> With spaces in ROOTFS_POSTPROCESS_COMMAND attempts to remove elements
> using ROOTFS_POSTPROCESS_COMMAND_remove causes parse failures of the
> form:
>
>   bb.pysh.sherrors.ShellSyntaxError: LexToken(COMMA,';',0,0)
>   followed by:
> LexToken(TOKEN,'write_image_test_data',0,0)
> LexToken(COMMA,';',0,0)
> LexToken(TOKEN,'set_systemd_default_target',0,0)
> LexToken(COMMA,';',0,0)
> LexToken(TOKEN,'systemd_create_users',0,0)
>
> Removing the spaces between the function name and semicolon allows the
> list to parse correctly.
>
> Signed-off-by: Alex Kiernan 
> ---
>
>  meta/classes/rootfs-postcommands.bbclass | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/rootfs-postcommands.bbclass 
> b/meta/classes/rootfs-postcommands.bbclass
> index a7f33fbf9e77..ebf96be7e85f 100644
> --- a/meta/classes/rootfs-postcommands.bbclass
> +++ b/meta/classes/rootfs-postcommands.bbclass
> @@ -1,6 +1,6 @@
>
>  # Zap the root password if debug-tweaks feature is not enabled
> -ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
> 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
> +ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
> 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}'
>
>  # Allow dropbear/openssh to accept logins from accounts with an empty 
> password string if debug-tweaks or allow-empty-password is enabled
>  ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
> 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", 
> "",d)}'
> @@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += 
> '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
>  ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
> 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
>
>  # Create /etc/timestamp during image construction to give a reasonably sane 
> default time setting
> -ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
> +ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; "
>
>  # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is 
> enabled
>  ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", 
> "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
> @@ -26,11 +26,11 @@ ROOTFS_POSTPROCESS_COMMAND += 
> '${@bb.utils.contains("IMAGE_FEATURES", "read-only
>  APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", 
> " ro", "", d)}'
>
>  # Generates test data file with data store variables expanded in json format
> -ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
> +ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; "
>
>  # Write manifest
>  IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
> -ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
> +ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest; "
>  # Set default postinst log file
>  POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
>  # Set default target for systemd images

Ping?

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE

2020-02-08 Thread Alex Kiernan
On Fri, Jan 31, 2020 at 4:24 PM Alex Kiernan  wrote:
>
> When using EXTERNAL_KERNEL_DEVICETREE, collect DTB overlays too (*.dtbo)
> as well as iterating down into sub-directories so using the behaviour
> for naming which matches KERNEL_DEVICETREE.
>
> Signed-off-by: Alex Kiernan 
> ---
>
>  meta/classes/kernel-fitimage.bbclass | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/kernel-fitimage.bbclass 
> b/meta/classes/kernel-fitimage.bbclass
> index ec18a3d69921..d1b8cdc1f049 100644
> --- a/meta/classes/kernel-fitimage.bbclass
> +++ b/meta/classes/kernel-fitimage.bbclass
> @@ -391,11 +391,10 @@ fitimage_assemble() {
>
> if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
> dtbcount=1
> -   for DTBFILE in ${EXTERNAL_KERNEL_DEVICETREE}/*.dtb; do
> -   DTB=`basename ${DTBFILE}`
> +   for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
> '*.dtb' -o -name '*.dtbo' \) -printf '%P\n'); do
> DTB=$(echo "${DTB}" | tr '/' '_')
> DTBS="${DTBS} ${DTB}"
> -   fitimage_emit_section_dtb ${1} ${DTB} ${DTBFILE}
> +   fitimage_emit_section_dtb ${1} ${DTB} 
> "${EXTERNAL_KERNEL_DEVICETREE}/${DTB}"
> done
> fi
>

Ping?

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] rootfs: Make BUILDNAME a weak default in reproducible_build_simple

2020-02-07 Thread Alex Kiernan
On Fri, Feb 7, 2020 at 4:27 PM Peter Kjellerstedt
 wrote:
>
> > -Original Message-
> > From: openembedded-core-boun...@lists.openembedded.org  > boun...@lists.openembedded.org> On Behalf Of Alex Kiernan
> > Sent: den 18 januari 2020 06:41
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [OE-Core][PATCH] rootfs: Make BUILDNAME a weak default
> > in reproducible_build_simple
> >
> > 11e45082ad00 ("rootfs-postcommands.bbclass: improve binary
> > reproducibility") fixed binary reproducibility of /etc/version, but with
> > the move to reproducibilty in all builds, setting /etc/version to
> > anything other than the default fixed timestamp is tricky because
> > rootfs_reproducible() runs very late.
> >
> > rootfs.py uses BUILDNAME if set for /etc/version, so introduce a weak
> > default for BUILDNAME of "REPRODUCIBLE_TIMESTAMP_ROOTFS", when enabling
> > reproducible builds hence allowing BUILDNAME to be overridden elsewhere.
> >
> > Signed-off-by: Alex Kiernan 
> > ---
> >
> >  meta/classes/reproducible_build_simple.bbclass | 1 +
> >  meta/classes/rootfs-postcommands.bbclass   | 5 -
> >  2 files changed, 1 insertion(+), 5 deletions(-)
> >
> > diff --git a/meta/classes/reproducible_build_simple.bbclass 
> > b/meta/classes/reproducible_build_simple.bbclass
> > index d0842f0f902a..153a07607219 100644
> > --- a/meta/classes/reproducible_build_simple.bbclass
> > +++ b/meta/classes/reproducible_build_simple.bbclass
> > @@ -7,5 +7,6 @@ export PERL_HASH_SEED = "0"
> >  export SOURCE_DATE_EPOCH ??= "1520598896"
> >
> >  REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
> > +BUILDNAME ??= "${REPRODUCIBLE_TIMESTAMP_ROOTFS}"
>
> Can we please revert this change?  This breaks (all?) other usages
> of ${BUILDNAME}. E.g., the information in tmp/buildstats is totally
> useless now since all builds end up in the same directory
> "tmp/buildstats/1520598896", overwriting each other...
>

+1; I'd agree that seems rather more broken than the problem I was
trying to fix here.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] Cache unihash ... doesn't match BB_UNIHASH ...

2020-02-07 Thread Alex Kiernan
On Fri, Feb 7, 2020 at 3:06 PM Richard Purdie
 wrote:
>
> On Fri, 2020-02-07 at 14:43 +, chris.lapla...@agilent.com wrote:
> > Hi Richard,
> >
> > > On Fri, 2020-02-07 at 08:16 +, Alex Kiernan wrote:
> > > > Hi
> > > >
> > > > We've got a couple of multiconfig builds with different
> > > > configurations in one bitbake run (whether it needs to be like
> > > > this a
> > > > different question - I suspect we had something that worked and
> > > > stopped there!)
> > > >
> > > > However, for sometime we've been seeing errors like this on
> > > > master
> > > > (the recipes vary):
> > > >
> > > > ERROR: mc:forensic:ca-certificates-20190110-r0
> > > > do_deploy_source_date_epoch: Cache unihash
> > > > 37d2546973a2b7c16fbcb1a8dd4939e4a1bba8c3d6d2dfb6e7204ca08d437ace
> > > > doesn't match BB_UNIHASH
> > > > 09baf78bd9316acdd308980c42ea4ed1eacea61bcc0d840c36293d1a5a22db69
> > >
> > > This is an internal sanity test. It means the hash that it had in
> > > the
> > > task/worker context didn't match what the server thought the
> > > unihash
> > > should be. There have been changes in this area to try and fix
> > > various
> > > things, I'm wondering if we introduced a bug with multiconfig
> > > handling.
> > >
> > > There are some patches in master-next related to this area so it
> > > would
> > > be interesting to know if that made things better/worse.
> >
> > Anecdotally, we are running Zeus for nightly builds with three
> > multiconfigs. I cherry-picked your "bitbake: fix2" and "bitbake:
> > fixup" patches and haven't seen any of the BB_UNIHASH errors since.
> > Granted it's only been a week. But before that, hash equiv +
> > multiconfig was unusable due to the BB_UNIHASH errors.
>
> That is a really helpful data point, thanks. I should probably clean up
> those bitbake patches and get them merged then, I couldn't decide if
> they were right or not...
>

I just picked all your pending changes out of master-next into our
local patch queue - will let you know how it looks when it's finished
cooking!

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] Cache unihash ... doesn't match BB_UNIHASH ...

2020-02-07 Thread Alex Kiernan
On Fri, Feb 7, 2020 at 8:31 AM Richard Purdie
 wrote:
>
> On Fri, 2020-02-07 at 08:16 +, Alex Kiernan wrote:
> > Hi
> >
> > We've got a couple of multiconfig builds with different
> > configurations in one bitbake run (whether it needs to be like this a
> > different question - I suspect we had something that worked and
> > stopped there!)
> >
> > However, for sometime we've been seeing errors like this on master
> > (the recipes vary):
> >
> > ERROR: mc:forensic:ca-certificates-20190110-r0
> > do_deploy_source_date_epoch: Cache unihash
> > 37d2546973a2b7c16fbcb1a8dd4939e4a1bba8c3d6d2dfb6e7204ca08d437ace
> > doesn't match BB_UNIHASH
> > 09baf78bd9316acdd308980c42ea4ed1eacea61bcc0d840c36293d1a5a22db69
>
> This is an internal sanity test. It means the hash that it had in the
> task/worker context didn't match what the server thought the unihash
> should be. There have been changes in this area to try and fix various
> things, I'm wondering if we introduced a bug with multiconfig handling.
>
> There are some patches in master-next related to this area so it would
> be interesting to know if that made things better/worse.
>

I can pull those in, if it'd be useful to test?

> > Coupled with deadlock messages:
> >
> > WARNING: Runqeueue deadlocked on deferred tasks, forcing task
> > mc:factory:virtual:native:/var/lib/jenkins/workspace/nanohub_master/b
> > uild/../poky/meta/recipes-
> > support/sqlite/sqlite3_3.31.1.bb:do_populate_sysroot
>
> This happens if a build has multiple different components with matching
> hashes. It builds the "first" one and defers the others since they
> could become available in sstate after the first one builds.
>
> You should see messages from runqueue.py:
>
> bb.note("Deferring %s after %s" % (tid, sqdata.hashes[h]))
>
> The behaviour should be to therefore prioritise one multiconfig. I
> worry that the sorting isn't quite right and its building bits of
> several multiconfigs and deadlocking?
>
> Do you have the logs with the Deferring XXX after YYY messages in you
> could share? I suspect its a sorting problem.
>

Sure - I'll mail it over separately.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] Cache unihash ... doesn't match BB_UNIHASH ...

2020-02-07 Thread Alex Kiernan
Hi

We've got a couple of multiconfig builds with different configurations
in one bitbake run (whether it needs to be like this a different
question - I suspect we had something that worked and stopped there!)

However, for sometime we've been seeing errors like this on master
(the recipes vary):

ERROR: mc:forensic:ca-certificates-20190110-r0
do_deploy_source_date_epoch: Cache unihash
37d2546973a2b7c16fbcb1a8dd4939e4a1bba8c3d6d2dfb6e7204ca08d437ace
doesn't match BB_UNIHASH
09baf78bd9316acdd308980c42ea4ed1eacea61bcc0d840c36293d1a5a22db69

Coupled with deadlock messages:

WARNING: Runqeueue deadlocked on deferred tasks, forcing task
mc:factory:virtual:native:/var/lib/jenkins/workspace/nanohub_master/build/../poky/meta/recipes-support/sqlite/sqlite3_3.31.1.bb:do_populate_sysroot

Any pointers to whereabouts I should be looking for what we've got wrong?

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] systemd: upgrade 243.4 -> 244.1

2020-02-06 Thread Alex Kiernan
Drop 0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch a
variant on which was introduced in 2c1047310970 ("Upgrade to systemd
211+") in 2014. The oldest supported build machine is now CentOS 7 which
has --relative support in ln, so there no longer appears to be any need
for this change.

Rebase/refresh musl patches:

- replace missing.h with specific missing_... header
- fix additional WRITE_STRING_FILE_DISABLE_BUFFER
- fix more places that need netinet/if_ether.h

Signed-off-by: Alex Kiernan 
---

 ...md-boot_243.4.bb => systemd-boot_244.1.bb} |   0
 ...md-conf_243.2.bb => systemd-conf_244.1.bb} |   0
 meta/recipes-core/systemd/systemd.inc |   6 +-
 ...tall-dependency-links-at-install-tim.patch |  33 +-
 ...-not-disable-buffer-in-writing-files.patch | 168 
 ...002-don-t-use-glibc-specific-qsort_r.patch |  26 +-
 ...ogin-brightness.c-include-sys-wait.h.patch |   8 +-
 ...instead-of-looking-for-relative-opti.patch |  63 ---
 ...implment-systemd-sysv-install-for-OE.patch |  10 +-
 ...dd-__compare_fn_t-and-comparison_fn_.patch |  37 +-
 ...03-src-basic-copy.c-include-signal.h.patch |  12 +-
 ...k-parse_printf_format-implementation.patch |  29 +-
 ...set-util.h-add-__cpu_mask-definition.patch |  10 +-
 ...missing.h-check-for-missing-strndupa.patch | 381 ++
 .../0006-Include-netinet-if_ether.h.patch | 101 +++--
 ...LOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch |  30 +-
 ...008-add-missing-FTW_-macros-for-musl.patch |  10 +-
 ..._register_atfork-for-non-glibc-build.patch |  14 +-
 ...11-Use-uintmax_t-for-handling-rlim_t.patch |  22 +-
 ...sable-tests-for-missing-typedefs-in-.patch |  15 +-
 ...T_SYMLINK_NOFOLLOW-flag-to-faccessat.patch |  20 +-
 ...patible-basename-for-non-glibc-syste.patch |  18 +-
 ...uffering-when-writing-to-oom_score_a.patch |   9 +-
 ...compliant-strerror_r-from-GNU-specif.patch |  14 +-
 ...S_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch |  10 +-
 ...ype.h-add-__compar_d_fn_t-definition.patch |  10 +-
 ...definition-of-prctl_mm_map-structure.patch |  10 +-
 ...ead-of-TIME_T_MAX-for-timerfd_settim.patch |  10 +-
 .../0024-test-json.c-define-M_PIl.patch   |  12 +-
 .../{systemd_243.4.bb => systemd_244.1.bb}|   2 +-
 30 files changed, 659 insertions(+), 431 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_243.4.bb => 
systemd-boot_244.1.bb} (100%)
 rename meta/recipes-core/systemd/{systemd-conf_243.2.bb => 
systemd-conf_244.1.bb} (100%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0002-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
 rename meta/recipes-core/systemd/{systemd_243.4.bb => systemd_244.1.bb} (99%)

diff --git a/meta/recipes-core/systemd/systemd-boot_243.4.bb 
b/meta/recipes-core/systemd/systemd-boot_244.1.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_243.4.bb
rename to meta/recipes-core/systemd/systemd-boot_244.1.bb
diff --git a/meta/recipes-core/systemd/systemd-conf_243.2.bb 
b/meta/recipes-core/systemd/systemd-conf_244.1.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-conf_243.2.bb
rename to meta/recipes-core/systemd/systemd-conf_244.1.bb
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 2fca6dca64b7..8c05a96ecc4f 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,10 +14,8 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "70e8c1978a9a688662eb1b3983370dd1cc415083"
-SRCBRANCH = "v243-stable"
+SRCREV = "639dc9f4bfd2c09535bee079ae9bc7006b520a66"
+SRCBRANCH = "v244-stable"
 SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
 
-PV = "243.4+git${SRCPV}"
-
 S = "${WORKDIR}/git"
diff --git 
a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
 
b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index ea37680221f2..6eaaec71c533 100644
--- 
a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ 
b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -1,8 +1,8 @@
-From 98254e4798e79d52ac6b562616cd244120f6e239 Mon Sep 17 00:00:00 2001
+From c73a87871df31b4f8d96c9d443759c6f702935f6 Mon Sep 17 00:00:00 2001
 From: Chen Qi 
 Date: Thu, 21 Feb 2019 16:23:24 +0800
-Subject: [PATCH 1/5] binfmt: Don't install dependency links at install time 
- for the binfmt services
+Subject: [PATCH] binfmt: Don't install dependency links at install time for
+ the binfmt services
 
 use [Install] blocks so that they get created when the service is enabled
 like a traditi

[OE-core] [OE-Core][PATCH v2] systemd: Upgrade 243.2 -> 243.4-latest

2020-02-03 Thread Alex Kiernan
eck ancestor memory min for unified memory config
  de1d25a506db cgroup: docs: memory.high doc fixups
  2ab45f38d8c4 cgroup: docs: Mention unbounded protection for memory.{low,min}
  19a43dc38a13 Consider smb3 as remote filesystem
  5c0224c7bf3c Handle d_type == DT_UNKNOWN correctly
  8282bc61df10 util-lib: Don't propagate EACCES from find_binary PATH lookup to 
caller
  9d0ae987a634 network: drop noisy log message
  f67f0e4ec45a Updated log message when the timesync happens for the first time 
(#13624)
  e151bf467494 units: make systemd-binfmt.service easier to work with no autofs
  2b8e574d8242 Corect man page reference in systemd-nologin.conf comments
  a0577353f191 man: Add a missing space in machinectl(1)
  693e98398869 log: Add missing "%" in "%m" log format strings
  ea7151b8c435 pid1: do not warn if /run/systemd/relabel-extra.d/ doesn't exist
  b90549290e33 man: fix typo

Signed-off-by: Alex Kiernan 
---

Changes in v2:
- drop 0004-rules-whitelist-hd-devices.patch and
  0005-rules-watch-metadata-changes-in-ide-devices.patch which cause
  ide-cd to flap with tray open messages (and don't appear to be
  required any more)
- refresh 0001-do-not-disable-buffer-in-writing-files.patch (Khem Raj
  )

 ...md-boot_243.2.bb => systemd-boot_243.4.bb} |   0
 meta/recipes-core/systemd/systemd.inc |   4 +-
 ...tall-dependency-links-at-install-tim.patch |  30 ++--
 ...-not-disable-buffer-in-writing-files.patch |  88 --
 ...prehensive-protection-against-libsec.patch | 152 --
 ...ider-symlink-on-filesystems-like-NFS.patch |  42 -
 .../0004-rules-whitelist-hd-devices.patch |  34 
 ...atch-metadata-changes-in-ide-devices.patch |  45 --
 .../{systemd_243.2.bb => systemd_243.4.bb}|   4 -
 9 files changed, 45 insertions(+), 354 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_243.2.bb => 
systemd-boot_243.4.bb} (100%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-seccomp-more-comprehensive-protection-against-libsec.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0004-rules-whitelist-hd-devices.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0005-rules-watch-metadata-changes-in-ide-devices.patch
 rename meta/recipes-core/systemd/{systemd_243.2.bb => systemd_243.4.bb} (99%)

diff --git a/meta/recipes-core/systemd/systemd-boot_243.2.bb 
b/meta/recipes-core/systemd/systemd-boot_243.4.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_243.2.bb
rename to meta/recipes-core/systemd/systemd-boot_243.4.bb
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 18f17d28ac53..2fca6dca64b7 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,8 +14,10 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "fab6f010ac6c3bc93a10868de722d7c8c3622eb9"
+SRCREV = "70e8c1978a9a688662eb1b3983370dd1cc415083"
 SRCBRANCH = "v243-stable"
 SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
 
+PV = "243.4+git${SRCPV}"
+
 S = "${WORKDIR}/git"
diff --git 
a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
 
b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 73e65ff79859..ea37680221f2 100644
--- 
a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ 
b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -24,10 +24,10 @@ Signed-off-by: Scott Murray 
  units/systemd-binfmt.service.in | 4 
  3 files changed, 9 insertions(+), 4 deletions(-)
 
-diff --git a/units/meson.build b/units/meson.build
-index e1ee9f86c3..6bb7771b36 100644
 a/units/meson.build
-+++ b/units/meson.build
+Index: systemd-stable/units/meson.build
+===
+--- systemd-stable.orig/units/meson.build
 systemd-stable/units/meson.build
 @@ -46,8 +46,7 @@ units = [
  ['poweroff.target', '',
   'runlevel0.target'],
@@ -48,10 +48,10 @@ index e1ee9f86c3..6bb7771b36 100644
  ['systemd-bless-boot.service',   'ENABLE_EFI HAVE_BLKID'],
  ['systemd-boot-check-no-failures.service', ''],
  ['systemd-boot-system-token.service','ENABLE_EFI',
-diff --git a/units/proc-sys-fs-binfmt_misc.automount 
b/units/proc-sys-fs-binfmt_misc.automount
-index 30a6bc9918..4231f3b70f 100644
 a/units/proc-sys-fs-binfmt_misc.automount
-++

Re: [OE-core] [OE-Core][PATCH] systemd: Upgrade 243.2 -> 243.4-latest

2020-02-03 Thread Alex Kiernan
On Mon, Feb 3, 2020 at 8:51 PM Alexander Kanavin  wrote:
>
> Since move to 243 latest needs further work, how about moving straight to 244?
>
> Alex
>

Having realised it was local to OE-Core, it was easy to find the problem.

The upstream change that I guessed at before is what's caused the
behaviour change:

commit 53d8feeb2334c396dcfa7106c78ce1791fb5d0c4
Author: Michal Suchanek 
Date:   Mon Nov 4 21:23:15 2019 +0100

libblkid: open device in nonblock mode.

When autoclose is set (kernel default but many distributions reverse the
setting) opening a CD-rom device causes the tray to close.

The function of blkid is to report the current state of the device and
not to change it. Hence it should use O_NONBLOCK when opening the
device to avoid closing a CD-rom tray.

blkid is used liberally in scripts so it can potentially interfere with
the user operating the CD-rom hardware.

Which causes a blizzard of "ide-cd: hdc: tray open" when you have our
local changes:

commit 90dcf2574daca8e7bf35074c46a2729a82acfe8b (HEAD -> devtool, tag:
devtool-patched, devtool-no-overrides)
Author: Chen Qi 
Date:   Thu Feb 21 16:38:38 2019 +0800

rules: watch metadata changes in ide devices

Formatting IDE storage does not trigger "change" uevents. As a result
clients using udev API don't get any updates afterwards and get outdated
information about the device.
...
root@qemux86-64:~# mkfs.ext4 -F /dev/hda1
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 98791eb2-2bf3-47ad-b4d8-4cf7e914eee2

root@qemux86-64:~# ls /dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2
ls: cannot access
'/dev/disk/by-uuid/98791eb2-2bf3-47ad-b4d8-4cf7e914eee2': No such file
or directory
...
Include hd* in a match for watch option assignment.

Upstream-Status: Denied

qemu by default emulates IDE and the linux-yocto kernel(s) use
CONFIG_IDE instead of the more modern libsata, so disks appear as
/dev/hd*. A similar patch rejected by upstream because CONFIG_IDE
is deprecated.

Signed-off-by: Hongxu Jia 
[rebased for systemd 241]
Signed-off-by: Chen Qi 
[rebased for systemd 243]
Signed-off-by: Scott Murray 

%% original patch: 0005-rules-watch-metadata-changes-in-ide-devices.patch

commit 2c49075af99308c25fbfd17ce4f28243cba3e4ec
Author: Chen Qi 
Date:   Thu Feb 21 16:28:21 2019 +0800

rules: whitelist hd* devices

qemu by default emulates IDE and the linux-yocto kernel(s) use
CONFIG_IDE instead of the more modern libsata, so disks appear as
/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.

Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]

Signed-off-by: Patrick Ohly 
Signed-off-by: Khem Raj 
[rebased for systemd 241]
Signed-off-by: Chen Qi 
[rebased for systemd 243]
Signed-off-by: Scott Murray 

%% original patch: 0004-rules-whitelist-hd-devices.patch

Short of dropping the the local changes, which (from reading the
commit messages) seem to be mostly there to fix up issues with qemu,
I'm not sure what else to do. I can't see upstream wanting to change
the commit they merged as they already rejected these ones.

Reading backwards we seem to have been carrying these two local changes since:

commit 5702a19f1c91f9d091a15ad30e73f946c5f9fd31
Author: Patrick Ohly 
Date:   Mon Sep 21 16:30:10 2015 +0200

systemd: apply persistent storage udev rules also for /dev/hd*

This fixes booting with initramfs and root=UUID on machines with IDE
disks, like "runqemu hdddirect", and kernels which still use the
deprecated CONFIG_IDE.

v2: Rebased against current master-next.

(From OE-Core rev: 3d27dfb7e78b8e17b76fcc1d8f8e2b29ca26b0df)

> > On 3 Feb 2020, at 21.26, Alex Kiernan  wrote:
> >
> >> On Mon, Feb 3, 2020 at 7:55 PM Alex Kiernan  wrote:
> >>
> >> Hi Richard
> >>
> >>> On Mon, Feb 3, 2020 at 2:13 PM Alex Kiernan  
> >>> wrote:
> >>>
> >>> On Mon, Feb 3, 2020 at 10:26 AM Richard Purdie
> >>>  wrote:
> >>>>
> >>>>> On Mon, 2020-01-27 at 23:13 +, Alex Kiernan wrote:
> >>>>> Update to latest on the 243 stable branch. This includes (amongst other
> >>>>> fixes) seccomp filter changes which fix failures with glibc 2.31, e.g.
> >>>>>
> >>>>>  systemd-journald[543]: Assertion 
> >>>>> 'clock_gettime(map_clock_id(clock_id), ) == 0' failed at 
> >>>>> src/basic/time-util.c:55, function now(). Aborting.
> >>>>>
> >>>>> Rebase 0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> >>>>>
> >>>>> Drop 0001-unit-file.c-consider-symlink-on-file

Re: [OE-core] [OE-Core][PATCH] systemd: Upgrade 243.2 -> 243.4-latest

2020-02-03 Thread Alex Kiernan
On Mon, Feb 3, 2020 at 7:55 PM Alex Kiernan  wrote:
>
> Hi Richard
>
> On Mon, Feb 3, 2020 at 2:13 PM Alex Kiernan  wrote:
> >
> > On Mon, Feb 3, 2020 at 10:26 AM Richard Purdie
> >  wrote:
> > >
> > > On Mon, 2020-01-27 at 23:13 +, Alex Kiernan wrote:
> > > > Update to latest on the 243 stable branch. This includes (amongst other
> > > > fixes) seccomp filter changes which fix failures with glibc 2.31, e.g.
> > > >
> > > >   systemd-journald[543]: Assertion 
> > > > 'clock_gettime(map_clock_id(clock_id), ) == 0' failed at 
> > > > src/basic/time-util.c:55, function now(). Aborting.
> > > >
> > > > Rebase 0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> > > >
> > > > Drop 0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch,
> > > > fixed in 5c0224c7bf3c ("Handle d_type == DT_UNKNOWN correctly").
> > > >
> > > > Drop 0001-seccomp-more-comprehensive-protection-against-libsec.patch,
> > > > fixed in 70e8c1978a9a ("seccomp: real syscall numbers are >= 0").
> > >
> > > Unfortunately something in this causes:
> > >
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/109/builds/412
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/101/builds/413
> > > https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/1545
> > >
> >
> > That's disappointing...
> >
>
> I'm failing to reproduce this - am I right in thinking the error I
> should be looking for is this one:
>
> [ 3.997360] ide-cd: hdc: tray open
> [ 3.999321] print_req_error: I/O error, dev hdc, sector 8388592 flags 80700
>
> or some variation on it?
>
> I've got testimage running across a number of the images I think are
> the ones that are being run and I can't get any of them to fail.
>

Scratch that... it looks like one of the local changes is necessary to
cause this - I'd foolishly reused an external source tree rather than
just letting devtool deal with it.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] systemd: Upgrade 243.2 -> 243.4-latest

2020-02-03 Thread Alex Kiernan
Hi Richard

On Mon, Feb 3, 2020 at 2:13 PM Alex Kiernan  wrote:
>
> On Mon, Feb 3, 2020 at 10:26 AM Richard Purdie
>  wrote:
> >
> > On Mon, 2020-01-27 at 23:13 +, Alex Kiernan wrote:
> > > Update to latest on the 243 stable branch. This includes (amongst other
> > > fixes) seccomp filter changes which fix failures with glibc 2.31, e.g.
> > >
> > >   systemd-journald[543]: Assertion 'clock_gettime(map_clock_id(clock_id), 
> > > ) == 0' failed at src/basic/time-util.c:55, function now(). Aborting.
> > >
> > > Rebase 0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> > >
> > > Drop 0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch,
> > > fixed in 5c0224c7bf3c ("Handle d_type == DT_UNKNOWN correctly").
> > >
> > > Drop 0001-seccomp-more-comprehensive-protection-against-libsec.patch,
> > > fixed in 70e8c1978a9a ("seccomp: real syscall numbers are >= 0").
> >
> > Unfortunately something in this causes:
> >
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/109/builds/412
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/101/builds/413
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/1545
> >
>
> That's disappointing...
>

I'm failing to reproduce this - am I right in thinking the error I
should be looking for is this one:

[ 3.997360] ide-cd: hdc: tray open
[ 3.999321] print_req_error: I/O error, dev hdc, sector 8388592 flags 80700

or some variation on it?

I've got testimage running across a number of the images I think are
the ones that are being run and I can't get any of them to fail.

I did notice that a couple of the failures were on CentOS, I'm running
on an Ubuntu box - I'm assuming that shouldn't make any difference?

--
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] systemd: Upgrade 243.2 -> 243.4-latest

2020-02-03 Thread Alex Kiernan
On Mon, Feb 3, 2020 at 10:26 AM Richard Purdie
 wrote:
>
> On Mon, 2020-01-27 at 23:13 +, Alex Kiernan wrote:
> > Update to latest on the 243 stable branch. This includes (amongst other
> > fixes) seccomp filter changes which fix failures with glibc 2.31, e.g.
> >
> >   systemd-journald[543]: Assertion 'clock_gettime(map_clock_id(clock_id), 
> > ) == 0' failed at src/basic/time-util.c:55, function now(). Aborting.
> >
> > Rebase 0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
> >
> > Drop 0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch,
> > fixed in 5c0224c7bf3c ("Handle d_type == DT_UNKNOWN correctly").
> >
> > Drop 0001-seccomp-more-comprehensive-protection-against-libsec.patch,
> > fixed in 70e8c1978a9a ("seccomp: real syscall numbers are >= 0").
>
> Unfortunately something in this causes:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/109/builds/412
> https://autobuilder.yoctoproject.org/typhoon/#/builders/101/builds/413
> https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/1545
>

That's disappointing...

> I've been blaming Trevor's patches until now but its this one (sorry
> Trevor!).
>

I'll start bisecting it out, though this looks like a likely candidate:

commit 53d8feeb2334c396dcfa7106c78ce1791fb5d0c4
Author: Michal Suchanek 
Date:   Mon Nov 4 21:23:15 2019 +0100

libblkid: open device in nonblock mode.

When autoclose is set (kernel default but many distributions reverse the
setting) opening a CD-rom device causes the tray to close.

The function of blkid is to report the current state of the device and
not to change it. Hence it should use O_NONBLOCK when opening the
device to avoid closing a CD-rom tray.

blkid is used liberally in scripts so it can potentially interfere with
the user operating the CD-rom hardware.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] kernel-fitimage: Handle overlays in EXTERNAL_KERNEL_DEVICETREE

2020-01-31 Thread Alex Kiernan
When using EXTERNAL_KERNEL_DEVICETREE, collect DTB overlays too (*.dtbo)
as well as iterating down into sub-directories so using the behaviour
for naming which matches KERNEL_DEVICETREE.

Signed-off-by: Alex Kiernan 
---

 meta/classes/kernel-fitimage.bbclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/meta/classes/kernel-fitimage.bbclass 
b/meta/classes/kernel-fitimage.bbclass
index ec18a3d69921..d1b8cdc1f049 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -391,11 +391,10 @@ fitimage_assemble() {
 
if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
dtbcount=1
-   for DTBFILE in ${EXTERNAL_KERNEL_DEVICETREE}/*.dtb; do
-   DTB=`basename ${DTBFILE}`
+   for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name 
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n'); do
DTB=$(echo "${DTB}" | tr '/' '_')
DTBS="${DTBS} ${DTB}"
-   fitimage_emit_section_dtb ${1} ${DTB} ${DTBFILE}
+   fitimage_emit_section_dtb ${1} ${DTB} 
"${EXTERNAL_KERNEL_DEVICETREE}/${DTB}"
done
fi
 
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RESEND PATCH] rootfs-postcommands: Remove spaces before ; in -ROOTFS_..._COMMAND

2020-01-31 Thread Alex Kiernan
With spaces in ROOTFS_POSTPROCESS_COMMAND attempts to remove elements
using ROOTFS_POSTPROCESS_COMMAND_remove causes parse failures of the
form:

  bb.pysh.sherrors.ShellSyntaxError: LexToken(COMMA,';',0,0)
  followed by:
LexToken(TOKEN,'write_image_test_data',0,0)
LexToken(COMMA,';',0,0)
LexToken(TOKEN,'set_systemd_default_target',0,0)
LexToken(COMMA,';',0,0)
LexToken(TOKEN,'systemd_create_users',0,0)

Removing the spaces between the function name and semicolon allows the
list to parse correctly.

Signed-off-by: Alex Kiernan 
---

 meta/classes/rootfs-postcommands.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index a7f33fbf9e77..ebf96be7e85f 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -1,6 +1,6 @@
 
 # Zap the root password if debug-tweaks feature is not enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}'
 
 # Allow dropbear/openssh to accept logins from accounts with an empty password 
string if debug-tweaks or allow-empty-password is enabled
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
@@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += 
'${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
 
 # Create /etc/timestamp during image construction to give a reasonably sane 
default time setting
-ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; "
 
 # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is 
enabled
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", 
"read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
@@ -26,11 +26,11 @@ ROOTFS_POSTPROCESS_COMMAND += 
'${@bb.utils.contains("IMAGE_FEATURES", "read-only
 APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " 
ro", "", d)}'
 
 # Generates test data file with data store variables expanded in json format
-ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
+ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; "
 
 # Write manifest
 IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
-ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
+ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest; "
 # Set default postinst log file
 POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
 # Set default target for systemd images
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH] libxcrypt: Enable static builds

2020-01-28 Thread Alex Kiernan
On Tue, Jan 28, 2020 at 12:02 PM Richard Purdie
 wrote:
>
> On Wed, 2020-01-22 at 07:19 +, Alex Kiernan wrote:
> > Whilst glibc builds static binaries libxcrypt doesn't, without which
> > we
> > can't build, for example, a static busybox. Enable static libraries
> > here
> > so that anyone who needs a static binary using just basic libraries
> > has
> > one fewer dependencies to track down post libxcrypt being split out
> > of
> > glibc.
> >
> > Signed-off-by: Alex Kiernan 
> > ---
> >
> >  meta/recipes-core/libxcrypt/libxcrypt.inc | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc
> > b/meta/recipes-core/libxcrypt/libxcrypt.inc
> > index accbdd636152..e98d8084470c 100644
> > --- a/meta/recipes-core/libxcrypt/libxcrypt.inc
> > +++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
> > @@ -32,4 +32,6 @@ CFLAGS += "-fcommon"
> >  API = "--disable-obsolete-api"
> >  EXTRA_OECONF += "${API}"
> >
> > +DISABLE_STATIC = ""
> > +
>
> My worry with this is where the line is drawn.

I ummed and ahhed before sending it for precisely that reason...

> We let glibc generate
> its static libs since turning them off turned out to be a nightmare, we
> disabled everything else we could, assuming the user would turn on what
> they need if they need it.
>
> In some ways I'd much prefer this was in some example config rather
> than building things piecemeal that most people don't use?
>

Let me have a look at that - what got me here was trying to get a
static busybox so I could OSTree's tests to pass, which all turned out
to be way harder than I expected; this was just one of the things I
tripped over.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] systemd: Upgrade 243.2 -> 243.4-latest

2020-01-27 Thread Alex Kiernan
Handle d_type == DT_UNKNOWN correctly
  8282bc61df10 util-lib: Don't propagate EACCES from find_binary PATH lookup to 
caller
  9d0ae987a634 network: drop noisy log message
  f67f0e4ec45a Updated log message when the timesync happens for the first time 
(#13624)
  e151bf467494 units: make systemd-binfmt.service easier to work with no autofs
  2b8e574d8242 Corect man page reference in systemd-nologin.conf comments
  a0577353f191 man: Add a missing space in machinectl(1)
  693e98398869 log: Add missing "%" in "%m" log format strings
  ea7151b8c435 pid1: do not warn if /run/systemd/relabel-extra.d/ doesn't exist
  b90549290e33 man: fix typo

Signed-off-by: Alex Kiernan 
---

 ...md-boot_243.2.bb => systemd-boot_243.4.bb} |   0
 meta/recipes-core/systemd/systemd.inc |   4 +-
 ...tall-dependency-links-at-install-tim.patch |  30 ++--
 ...prehensive-protection-against-libsec.patch | 152 --
 ...ider-symlink-on-filesystems-like-NFS.patch |  42 -
 .../{systemd_243.2.bb => systemd_243.4.bb}|   2 -
 6 files changed, 18 insertions(+), 212 deletions(-)
 rename meta/recipes-core/systemd/{systemd-boot_243.2.bb => 
systemd-boot_243.4.bb} (100%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-seccomp-more-comprehensive-protection-against-libsec.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/0001-unit-file.c-consider-symlink-on-filesystems-like-NFS.patch
 rename meta/recipes-core/systemd/{systemd_243.2.bb => systemd_243.4.bb} (99%)

diff --git a/meta/recipes-core/systemd/systemd-boot_243.2.bb 
b/meta/recipes-core/systemd/systemd-boot_243.4.bb
similarity index 100%
rename from meta/recipes-core/systemd/systemd-boot_243.2.bb
rename to meta/recipes-core/systemd/systemd-boot_243.4.bb
diff --git a/meta/recipes-core/systemd/systemd.inc 
b/meta/recipes-core/systemd/systemd.inc
index 18f17d28ac53..2fca6dca64b7 100644
--- a/meta/recipes-core/systemd/systemd.inc
+++ b/meta/recipes-core/systemd/systemd.inc
@@ -14,8 +14,10 @@ LICENSE = "GPLv2 & LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
 
file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
 
-SRCREV = "fab6f010ac6c3bc93a10868de722d7c8c3622eb9"
+SRCREV = "70e8c1978a9a688662eb1b3983370dd1cc415083"
 SRCBRANCH = "v243-stable"
 SRC_URI = 
"git://github.com/systemd/systemd-stable.git;protocol=git;branch=${SRCBRANCH}"
 
+PV = "243.4+git${SRCPV}"
+
 S = "${WORKDIR}/git"
diff --git 
a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
 
b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
index 73e65ff79859..ea37680221f2 100644
--- 
a/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ 
b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -24,10 +24,10 @@ Signed-off-by: Scott Murray 
  units/systemd-binfmt.service.in | 4 
  3 files changed, 9 insertions(+), 4 deletions(-)
 
-diff --git a/units/meson.build b/units/meson.build
-index e1ee9f86c3..6bb7771b36 100644
 a/units/meson.build
-+++ b/units/meson.build
+Index: systemd-stable/units/meson.build
+===
+--- systemd-stable.orig/units/meson.build
 systemd-stable/units/meson.build
 @@ -46,8 +46,7 @@ units = [
  ['poweroff.target', '',
   'runlevel0.target'],
@@ -48,10 +48,10 @@ index e1ee9f86c3..6bb7771b36 100644
  ['systemd-bless-boot.service',   'ENABLE_EFI HAVE_BLKID'],
  ['systemd-boot-check-no-failures.service', ''],
  ['systemd-boot-system-token.service','ENABLE_EFI',
-diff --git a/units/proc-sys-fs-binfmt_misc.automount 
b/units/proc-sys-fs-binfmt_misc.automount
-index 30a6bc9918..4231f3b70f 100644
 a/units/proc-sys-fs-binfmt_misc.automount
-+++ b/units/proc-sys-fs-binfmt_misc.automount
+Index: systemd-stable/units/proc-sys-fs-binfmt_misc.automount
+===
+--- systemd-stable.orig/units/proc-sys-fs-binfmt_misc.automount
 systemd-stable/units/proc-sys-fs-binfmt_misc.automount
 @@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/
  
  [Automount]
@@ -59,19 +59,19 @@ index 30a6bc9918..4231f3b70f 100644
 +
 +[Install]
 +WantedBy=sysinit.target
-diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
-index e940c7c9ad..6be7f5cc9b 100644
 a/units/systemd-binfmt.service.in
-+++ b/units/systemd-binfmt.service.in
-@@ -14,6 +14,7 @@ 
Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm
+Index: systemd-stable/units/systemd-binfmt.service.in
+===
+--- systemd-stable.orig/units/systemd-binf

[OE-core] [OE-Core][PATCH] libxcrypt: Enable static builds

2020-01-21 Thread Alex Kiernan
Whilst glibc builds static binaries libxcrypt doesn't, without which we
can't build, for example, a static busybox. Enable static libraries here
so that anyone who needs a static binary using just basic libraries has
one fewer dependencies to track down post libxcrypt being split out of
glibc.

Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/libxcrypt/libxcrypt.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/libxcrypt/libxcrypt.inc 
b/meta/recipes-core/libxcrypt/libxcrypt.inc
index accbdd636152..e98d8084470c 100644
--- a/meta/recipes-core/libxcrypt/libxcrypt.inc
+++ b/meta/recipes-core/libxcrypt/libxcrypt.inc
@@ -32,4 +32,6 @@ CFLAGS += "-fcommon"
 API = "--disable-obsolete-api"
 EXTRA_OECONF += "${API}"
 
+DISABLE_STATIC = ""
+
 BBCLASSEXTEND = "nativesdk"
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] lib/oe/package_manager: Improve locale-archive reproducibility

2020-01-19 Thread Alex Kiernan
The generation of locale-archive depends on the order of the input
files. Fix the order by sorting the file list.

Signed-off-by: Alex Kiernan 
---

 meta/lib/oe/package_manager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py
index e15e3c4a315d..d3444c99bc07 100644
--- a/meta/lib/oe/package_manager.py
+++ b/meta/lib/oe/package_manager.py
@@ -131,7 +131,7 @@ def generate_locale_archive(d, rootfs, target_arch, 
localedir):
 env = dict(os.environ)
 env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-archive")
 
-for name in os.listdir(localedir):
+for name in sorted(os.listdir(localedir)):
 path = os.path.join(localedir, name)
 if os.path.isdir(path):
 cmd = ["cross-localedef", "--verbose"]
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] rootfs: Make BUILDNAME a weak default in reproducible_build_simple

2020-01-17 Thread Alex Kiernan
11e45082ad00 ("rootfs-postcommands.bbclass: improve binary
reproducibility") fixed binary reproducibility of /etc/version, but with
the move to reproducibilty in all builds, setting /etc/version to
anything other than the default fixed timestamp is tricky because
rootfs_reproducible() runs very late.

rootfs.py uses BUILDNAME if set for /etc/version, so introduce a weak
default for BUILDNAME of "REPRODUCIBLE_TIMESTAMP_ROOTFS", when enabling
reproducible builds hence allowing BUILDNAME to be overridden elsewhere.

Signed-off-by: Alex Kiernan 
---

 meta/classes/reproducible_build_simple.bbclass | 1 +
 meta/classes/rootfs-postcommands.bbclass   | 5 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/classes/reproducible_build_simple.bbclass 
b/meta/classes/reproducible_build_simple.bbclass
index d0842f0f902a..153a07607219 100644
--- a/meta/classes/reproducible_build_simple.bbclass
+++ b/meta/classes/reproducible_build_simple.bbclass
@@ -7,5 +7,6 @@ export PERL_HASH_SEED = "0"
 export SOURCE_DATE_EPOCH ??= "1520598896"
 
 REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
+BUILDNAME ??= "${REPRODUCIBLE_TIMESTAMP_ROOTFS}"
 
 inherit podfix
diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index fdc63bb64d55..ebf96be7e85f 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -356,11 +356,6 @@ python rootfs_log_check_recommends() {
 # Perform any additional adjustments needed to make rootf binary reproducible
 rootfs_reproducible () {
if [ "${REPRODUCIBLE_TIMESTAMP_ROOTFS}" != "" ]; then
-   # Convert UTC into %4Y%2m%2d%2H%2M%2S
-   sformatted=`date -u -d @${REPRODUCIBLE_TIMESTAMP_ROOTFS} 
+%4Y%2m%2d%2H%2M%2S`
-   echo $sformatted > ${IMAGE_ROOTFS}/etc/version
-   bbnote "rootfs_reproducible: set /etc/version to $sformatted"
-
if [ -d ${IMAGE_ROOTFS}${sysconfdir}/gconf ]; then
find ${IMAGE_ROOTFS}${sysconfdir}/gconf -name 
'%gconf.xml' -print0 | xargs -0r \
sed -i -e 
's@\bmtime="[0-9][0-9]*"@mtime="'${REPRODUCIBLE_TIMESTAMP_ROOTFS}'"@g'
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] rootfs-postcommands: Remove spaces before ; in -ROOTFS_..._COMMAND

2020-01-14 Thread Alex Kiernan
With spaces in ROOTFS_POSTPROCESS_COMMAND attempts to remove elements
using ROOTFS_POSTPROCESS_COMMAND_remove causes parse failures of the
form:

  bb.pysh.sherrors.ShellSyntaxError: LexToken(COMMA,';',0,0)
  followed by:
LexToken(TOKEN,'write_image_test_data',0,0)
LexToken(COMMA,';',0,0)
LexToken(TOKEN,'set_systemd_default_target',0,0)
LexToken(COMMA,';',0,0)
LexToken(TOKEN,'systemd_create_users',0,0)

Removing the spaces between the function name and semicolon allows the
list to parse correctly.

Signed-off-by: Alex Kiernan 
---

 meta/classes/rootfs-postcommands.bbclass | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index 2c0f16cebd4c..fdc63bb64d55 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -1,6 +1,6 @@
 
 # Zap the root password if debug-tweaks feature is not enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}'
 
 # Allow dropbear/openssh to accept logins from accounts with an empty password 
string if debug-tweaks or allow-empty-password is enabled
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
@@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += 
'${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 
'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
 
 # Create /etc/timestamp during image construction to give a reasonably sane 
default time setting
-ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; "
 
 # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is 
enabled
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", 
"read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
@@ -26,11 +26,11 @@ ROOTFS_POSTPROCESS_COMMAND += 
'${@bb.utils.contains("IMAGE_FEATURES", "read-only
 APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " 
ro", "", d)}'
 
 # Generates test data file with data store variables expanded in json format
-ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
+ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; "
 
 # Write manifest
 IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest"
-ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
+ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest; "
 # Set default postinst log file
 POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
 # Set default target for systemd images
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] u-boot: Upgrade 2020.01-rc5 -> 2020.01

2020-01-12 Thread Alex Kiernan
Also drop unreferenced (already merged) patches.

Signed-off-by: Alex Kiernan 
---

 ...nclude-env.h-Ensure-ulong-is-defined.patch | 31 ---
 ...fix-ulong-definition-on-musl-targets.patch | 83 ---
 meta/recipes-bsp/u-boot/u-boot-common.inc |  5 +-
 3 files changed, 1 insertion(+), 118 deletions(-)
 delete mode 100644 
meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch
 delete mode 100644 
meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch

diff --git 
a/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch
 
b/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch
deleted file mode 100644
index 4d623c1f3469..
--- 
a/meta/recipes-bsp/u-boot/files/0001-include-env.h-Ensure-ulong-is-defined.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 718170ff3a5e677db7212a86b129dacb28b1cac2 Mon Sep 17 00:00:00 2001
-From: Alistair Francis 
-Date: Mon, 14 Oct 2019 17:37:30 -0700
-Subject: [PATCH] include/env.h: Ensure ulong is defined
-
-To fix these failures when building with musl:
-   include/env.h:166:1: error: unknown type name 'ulong'; did you mean 'long'?
-ensure that ulong is defined.
-
-Upstream-Status: Pending
-Signed-off-by: Alistair Francis 

- include/env.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/include/env.h b/include/env.h
-index d6c2d751d6..6cf5053431 100644
 a/include/env.h
-+++ b/include/env.h
-@@ -13,6 +13,8 @@
- #include 
- #include 
- 
-+typedef unsigned long   ulong;
-+
- struct environment_s;
- 
- /* Value for environment validity */
--- 
-2.24.1
-
diff --git 
a/meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch
 
b/meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch
deleted file mode 100644
index 0d965813b04e..
--- 
a/meta/recipes-bsp/u-boot/files/0002-include-fix-ulong-definition-on-musl-targets.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From dccfea2e95cd3f26d1295e02d41012d014827dd9 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich 
-Date: Mon, 16 Dec 2019 23:36:40 +
-Subject: [PATCH 2/2] include: fix 'ulong' definition on musl targets
-
-The build failure was originally reported on arm64-musl
-target at https://bugs.gentoo.org/703132. Here is the amd64-musl
-variant:
-
-```
-$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-only_defconfig 
-j$(nproc)
-$ LANG=C make CROSS_COMPILE=x86_64-gentoo-linux-musl- tools-all
-j$(nproc)
-...
-In file included from tools/env/../../env/flags.c:7,
- from tools/env/env_flags.c:1:
-include/env.h:159:1: error: unknown type name 'ulong'; did you mean 'long'?
-  159 | ulong env_get_ulong(const char *name, int base, ulong default_val);
-  | ^
-  | long
-```
-
-Note: 'ulong' is not defined there.
-
-On glibc 'ulong' comes from :
-
-```c
-/* Old compatibility names for C types.  */
-typedef unsigned long int ulong;
-```
-
-On musl it comes from  as well but from under different guards:
-
-```c
-typedef unsigned long u_long, ulong;
-```
-
-The change inlines 'ulong' define similar to 'uint' define.
-
-Upstream-Status: Pending
-Bug: https://bugs.gentoo.org/703132
-Signed-off-by: Sergei Trofimovich 
-Message-Id: <20191216233640.518168-1-sly...@gentoo.org>

- include/compiler.h   | 2 +-
- include/u-boot/crc.h | 2 ++
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/include/compiler.h b/include/compiler.h
-index 29507f9840..90372f239c 100644
 a/include/compiler.h
-+++ b/include/compiler.h
-@@ -46,7 +46,6 @@
- # include 
- #elif defined(__MACH__) || defined(__FreeBSD__)
- # include 
--typedef unsigned long ulong;
- #endif
- #ifdef __FreeBSD__
- # include  /* htole32 and friends */
-@@ -66,6 +65,7 @@ typedef uint8_t __u8;
- typedef uint16_t __u16;
- typedef uint32_t __u32;
- typedef unsigned int uint;
-+typedef unsigned long ulong;
- 
- #define uswap_16(x) \
-   x) & 0xff00) >> 8) | \
-diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h
-index 1086d2168c..b96b50d98b 100644
 a/include/u-boot/crc.h
-+++ b/include/u-boot/crc.h
-@@ -8,6 +8,8 @@
- #ifndef _UBOOT_CRC_H
- #define _UBOOT_CRC_H
- 
-+#include  /* unit definition */
-+
- /**
-  * crc8() - Calculate and return CRC-8 of the data
-  *
--- 
-2.24.1
-
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc 
b/meta/recipes-bsp/u-boot/u-boot-common.inc
index 4799948bb17a..ce07055f878c 100644
--- a/meta/recipes-bsp/u-boot/u-boot-common.inc
+++ b/meta/recipes-bsp/u-boot/u-boot-common.inc
@@ -10,12 +10,9 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = 
"file://Licenses/README;md5=30503fd321432fc713238f582193b78e"
 PE = "1"
 
-# Drop this line when updating to 2020.01 final
-PV = "2020.01~rc5"
-
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
-SRCREV = "ef7c2af65966a57c98d3c47e6c2fe1ce

[OE-core] [OE-Core][PATCH] glib-2.0: Fix hardcoded paths with dots in names

2020-01-12 Thread Alex Kiernan
b4087338be09 ("glib-2.0: Fix hardcoded paths in checksums") fixed
embedded paths in task hashes, but if these paths included dots then
these were flattened when COREBASE was computed. Fix this by resolving
our filenames before replacing the path segments with COREBASE.

Signed-off-by: Alex Kiernan 
---

 meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb 
b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
index 5e71c81cca19..e4cf50d22f6c 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.62.4.bb
@@ -36,7 +36,7 @@ def find_meson_cross_files(d):
 files = collections.OrderedDict()
 for path in d.getVar("FILESPATH").split(":"):
 for element in sitedata:
-filename = os.path.join(path, "meson.cross.d", element)
+filename = os.path.normpath(os.path.join(path, "meson.cross.d", 
element))
 files[filename.replace(corebase, "${COREBASE}")] = 
os.path.exists(filename)
 
 items = ["--cross-file=" + k for k,v in files.items() if v]
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][RESEND PATCH] manpages.bbclass: Fix rootfs host corruption

2020-01-09 Thread Alex Kiernan
When running mandb we end up with files owned by the build user, correct
this. Also pick up non-default locales and relocate their index.db files
to /var/cache.

Signed-off-by: Alex Kiernan 
---

 meta/classes/manpages.bbclass | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/classes/manpages.bbclass b/meta/classes/manpages.bbclass
index 50c254763e89..1e66780646ea 100644
--- a/meta/classes/manpages.bbclass
+++ b/meta/classes/manpages.bbclass
@@ -18,8 +18,15 @@ pkg_postinst_append_${MAN_PKG} () {
if test -n "$D"; then
if ${@bb.utils.contains('MACHINE_FEATURES', 
'qemu-usermode', 'true','false', d)}; then
sed "s:\(\s\)/:\1$D/:g" 
$D${sysconfdir}/man_db.conf | ${@qemu_run_binary(d, '$D', '${bindir}/mandb')} 
-C - -u -q $D${mandir}
+   chown -R root:root $D${mandir}
mkdir -p $D${localstatedir}/cache/man
-   mv $D${mandir}/index.db 
$D${localstatedir}/cache/man
+   cd $D${mandir}
+   find . -name index.db | while read index; do
+   mkdir -p 
$D${localstatedir}/cache/man/$(dirname ${index})
+   mv ${index} 
$D${localstatedir}/cache/man/${index}
+   chown man:man 
$D${localstatedir}/cache/man/${index}
+   done
+   cd -
else
$INTERCEPT_DIR/postinst_intercept 
delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
fi
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH 1/2] manpages.bbclass: Fix rootfs host corruption

2020-01-09 Thread Alex Kiernan
On Thu, Jan 9, 2020 at 1:36 PM Ross Burton  wrote:
>
> On 09/01/2020 02:30, Alex Kiernan wrote:
> > On Thu, Dec 19, 2019 at 10:17 PM Alex Kiernan  
> > wrote:
> >>
> >> When running mandb we end up with files owned by the build user, correct
> >> this. Also pick up non-default locales and relocate their index.db files
> >> to /var/cache.
> >>
> >> Signed-off-by: Alex Kiernan 
> >> ---
> >
> > Ping?
>
> I never saw this on the list can you repost please?
>

Sure - it's the companion to the one I think you'd started to look at
("Enable rootfs_check_host_user_contaminated"); I was fixing up
manpages leakage, but you found some of the font stuff leaking host
users into the image.

--
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH 1/2] manpages.bbclass: Fix rootfs host corruption

2020-01-08 Thread Alex Kiernan
On Thu, Dec 19, 2019 at 10:17 PM Alex Kiernan  wrote:
>
> When running mandb we end up with files owned by the build user, correct
> this. Also pick up non-default locales and relocate their index.db files
> to /var/cache.
>
> Signed-off-by: Alex Kiernan 
> ---

Ping?

>
>  meta/classes/manpages.bbclass | 9 -
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/manpages.bbclass b/meta/classes/manpages.bbclass
> index 50c254763e89..1e66780646ea 100644
> --- a/meta/classes/manpages.bbclass
> +++ b/meta/classes/manpages.bbclass
> @@ -18,8 +18,15 @@ pkg_postinst_append_${MAN_PKG} () {
> if test -n "$D"; then
> if ${@bb.utils.contains('MACHINE_FEATURES', 
> 'qemu-usermode', 'true','false', d)}; then
> sed "s:\(\s\)/:\1$D/:g" 
> $D${sysconfdir}/man_db.conf | ${@qemu_run_binary(d, '$D', '${bindir}/mandb')} 
> -C - -u -q $D${mandir}
> +   chown -R root:root $D${mandir}
> mkdir -p $D${localstatedir}/cache/man
> -   mv $D${mandir}/index.db 
> $D${localstatedir}/cache/man
> +   cd $D${mandir}
> +   find . -name index.db | while read index; do
> +   mkdir -p 
> $D${localstatedir}/cache/man/$(dirname ${index})
> +   mv ${index} 
> $D${localstatedir}/cache/man/${index}
> +   chown man:man 
> $D${localstatedir}/cache/man/${index}
> +   done
> +   cd -
> else
> $INTERCEPT_DIR/postinst_intercept 
> delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
> fi
> --
> 2.17.1
>


-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] linuxloader: Correct loader for glibc on armhf

2019-12-29 Thread Alex Kiernan
Fix the naming of the loader on armhf to match what glibc expects:

  #define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
  #define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"

Signed-off-by: Alex Kiernan 
---

 meta/classes/linuxloader.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/linuxloader.bbclass b/meta/classes/linuxloader.bbclass
index c0fbf2683634..e2876cec7aad 100644
--- a/meta/classes/linuxloader.bbclass
+++ b/meta/classes/linuxloader.bbclass
@@ -41,7 +41,7 @@ def get_glibc_loader(d):
 elif re.search("i.86", targetarch):
 dynamic_loader = "${base_libdir}/ld-linux.so.2"
 elif targetarch == "arm":
-dynamic_loader = "${base_libdir}/ld-linux.so.3"
+dynamic_loader = "${base_libdir}/ld-linux${@['-armhf', 
''][d.getVar('TARGET_FPU') == 'soft']}.so.3"
 elif targetarch.startswith("aarch64"):
 dynamic_loader = 
"${base_libdir}/ld-linux-aarch64${ARMPKGSFX_ENDIAN_64}.so.1"
 elif targetarch.startswith("riscv64"):
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] lib/oe/qa: handle missing data attribute in __exit__

2019-12-29 Thread Alex Kiernan
If mmap fails in open, we don't have a data attribute so when we execute
as a context manager the call to self.data.close needs to handle the
missing attribute:

  File: '/home/akiernan/nanohub/build/../poky/meta/classes/chrpath.bbclass', 
lineno: 11, function: process_file_linux
   0007:with oe.qa.ELFFile(fpath) as elf:
   0008:try:
   0009:elf.open()
   0010:except oe.qa.NotELFFileError:
   *** 0011:return
   0012:
   0013:p = sub.Popen([cmd, '-l', 
fpath],stdout=sub.PIPE,stderr=sub.PIPE)
   0014:out, err = p.communicate()
   0015:# If returned successfully, process stdout for results
  File: '/home/akiernan/nanohub/build/../poky/meta/lib/oe/qa.py', lineno: 50, 
function: __exit__
   0046:def __enter__(self):
   0047:return self
   0048:
   0049:def __exit__(self, exc_type, exc_value, traceback):
   *** 0050:self.data.close()
   0051:
   0052:def open(self):
   0053:with open(self.name, "rb") as f:
   0054:try:
  Exception: AttributeError: 'ELFFile' object has no attribute 'data'

Fixes: 7785c41d0b95 ("chrpath: do less work")
Signed-off-by: Alex Kiernan 
---

 meta/lib/oe/qa.py | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/qa.py b/meta/lib/oe/qa.py
index 21066c4dc3b3..d85206f155f0 100644
--- a/meta/lib/oe/qa.py
+++ b/meta/lib/oe/qa.py
@@ -47,7 +47,11 @@ class ELFFile:
 return self
 
 def __exit__(self, exc_type, exc_value, traceback):
-self.data.close()
+try:
+self.data.close()
+except AttributeError:
+# If we failed to mmap in open then the data attribute won't exist
+pass
 
 def open(self):
 with open(self.name, "rb") as f:
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH 2/2] rootfs-postcommands: Enable rootfs_check_host_user_contaminated

2019-12-19 Thread Alex Kiernan
Enable rootfs_check_host_user_contaminated by default

Signed-off-by: Alex Kiernan 
---

 meta/classes/rootfs-postcommands.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass 
b/meta/classes/rootfs-postcommands.bbclass
index 2f171836fa0c..2c0f16cebd4c 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -37,7 +37,7 @@ POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
 SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", 
"graphical.target", "multi-user.target", d)}'
 ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", 
"systemd", "set_systemd_default_target; systemd_create_users;", "", d)}'
 
-ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
+ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile; 
rootfs_check_host_user_contaminated;'
 
 # Sort the user and group entries in /etc by ID in order to make the content
 # deterministic. Package installs are not deterministic, causing the ordering
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH 1/2] manpages.bbclass: Fix rootfs host corruption

2019-12-19 Thread Alex Kiernan
When running mandb we end up with files owned by the build user, correct
this. Also pick up non-default locales and relocate their index.db files
to /var/cache.

Signed-off-by: Alex Kiernan 
---

 meta/classes/manpages.bbclass | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta/classes/manpages.bbclass b/meta/classes/manpages.bbclass
index 50c254763e89..1e66780646ea 100644
--- a/meta/classes/manpages.bbclass
+++ b/meta/classes/manpages.bbclass
@@ -18,8 +18,15 @@ pkg_postinst_append_${MAN_PKG} () {
if test -n "$D"; then
if ${@bb.utils.contains('MACHINE_FEATURES', 
'qemu-usermode', 'true','false', d)}; then
sed "s:\(\s\)/:\1$D/:g" 
$D${sysconfdir}/man_db.conf | ${@qemu_run_binary(d, '$D', '${bindir}/mandb')} 
-C - -u -q $D${mandir}
+   chown -R root:root $D${mandir}
mkdir -p $D${localstatedir}/cache/man
-   mv $D${mandir}/index.db 
$D${localstatedir}/cache/man
+   cd $D${mandir}
+   find . -name index.db | while read index; do
+   mkdir -p 
$D${localstatedir}/cache/man/$(dirname ${index})
+   mv ${index} 
$D${localstatedir}/cache/man/${index}
+   chown man:man 
$D${localstatedir}/cache/man/${index}
+   done
+   cd -
else
$INTERCEPT_DIR/postinst_intercept 
delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
fi
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 1/3] u-boot-fw-utils: Backport a patch for out-of-tree builds

2019-12-18 Thread Alex Kiernan
On Wed, Dec 18, 2019 at 8:43 AM Daisuke Yamane  wrote:
>
> This patch fixs the following error when ${S} != ${B}:
> | cp: cannot create regular file 'tools/version.h': No such file or directory
>
> Signed-off-by: Daisuke Yamane 

I don't think backporting this makes sense as we'll only be dropping
it in January when 2020.01 gets released. I'd just move to the -rc5
tag which includes this upstream change and then apply your other out
of tree fixes on top of it.


--
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [OE-Core][PATCH] gnutls: upgrade 3.6.8 -> 3.6.11.1

2019-12-16 Thread Alex Kiernan
Drop patch from 81485be19b18 ("gnutls: don't use HOSTTOOLS_DIR/bash as a
shell on target") as upstream now honours POSIX_SHELL when set as the
primary target shell.

Signed-off-by: Alex Kiernan 
---

 .../gnutls/gnutls/posix-shell.patch   | 39 ---
 .../{gnutls_3.6.8.bb => gnutls_3.6.11.1.bb}   |  5 +--
 2 files changed, 2 insertions(+), 42 deletions(-)
 delete mode 100644 meta/recipes-support/gnutls/gnutls/posix-shell.patch
 rename meta/recipes-support/gnutls/{gnutls_3.6.8.bb => gnutls_3.6.11.1.bb} 
(92%)

diff --git a/meta/recipes-support/gnutls/gnutls/posix-shell.patch 
b/meta/recipes-support/gnutls/gnutls/posix-shell.patch
deleted file mode 100644
index 938e2d1e18f6..
--- a/meta/recipes-support/gnutls/gnutls/posix-shell.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Don't embed the path to the build-time POSIX shell as this will be
-$TMPDIR/hosttools/bash, which is no good on the target.
-
-Instead default to /bin/sh but allow it to be set in the environment.
-
-This isn't really upstreamable but I filed a bug at
-https://gitlab.com/gnutls/gnutls/issues/807 and hope a proper fix will be
-integrated.
-
-Upstream-Status: Inappropriate
-Signed-off-by: Ross Burton 
-
-diff --git a/src/libopts/m4/libopts.m4 b/src/libopts/m4/libopts.m4
-index c6ad738..a62faca 100644
 a/src/libopts/m4/libopts.m4
-+++ b/src/libopts/m4/libopts.m4
-@@ -112,21 +112,7 @@ AC_DEFUN([INVOKE_LIBOPTS_MACROS_FIRST],[
-   AC_CHECK_FUNCS([mmap canonicalize_file_name snprintf strdup strchr \
-  strrchr strsignal fchmod fstat chmod])
-   AC_PROG_SED
--  [while :
--  do
--  POSIX_SHELL=`which bash`
--  test -x "$POSIX_SHELL" && break
--  POSIX_SHELL=`which dash`
--  test -x "$POSIX_SHELL" && break
--  POSIX_SHELL=/usr/xpg4/bin/sh
--  test -x "$POSIX_SHELL" && break
--  POSIX_SHELL=`/bin/sh -c '
--  exec 2>/dev/null
--  if ! true ; then exit 1 ; fi
--  echo /bin/sh'`
--  test -x "$POSIX_SHELL" && break
--  ]AC_MSG_ERROR([cannot locate a working POSIX shell])[
--  done]
-+  POSIX_SHELL="${POSIX_SHELL:-/bin/sh}"
-   AC_DEFINE_UNQUOTED([POSIX_SHELL], ["${POSIX_SHELL}"],
-[define to a working POSIX compliant shell])
-   AC_SUBST([POSIX_SHELL])
diff --git a/meta/recipes-support/gnutls/gnutls_3.6.8.bb 
b/meta/recipes-support/gnutls/gnutls_3.6.11.1.bb
similarity index 92%
rename from meta/recipes-support/gnutls/gnutls_3.6.8.bb
rename to meta/recipes-support/gnutls/gnutls_3.6.11.1.bb
index c927063f0a34..5b05364c258d 100644
--- a/meta/recipes-support/gnutls/gnutls_3.6.8.bb
+++ b/meta/recipes-support/gnutls/gnutls_3.6.11.1.bb
@@ -19,11 +19,10 @@ SHRT_VER = 
"${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
 
 SRC_URI = 
"https://www.gnupg.org/ftp/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz \
file://arm_eabi.patch \
-   file://posix-shell.patch \
 "
 
-SRC_URI[md5sum] = "9dcf0aa45d1a42e1b3ca5d39ec7c61a8"
-SRC_URI[sha256sum] = 
"aa81944e5635de981171772857e72be231a7e0f559ae0292d2737de475383e83"
+SRC_URI[md5sum] = "3670ee0b0d95b3dee185eff2dc910ee7"
+SRC_URI[sha256sum] = 
"fbba12f3db9a55dbf027e14111755817ec44b57eabec3e8089aac8ac6f533cf8"
 
 inherit autotools texinfo pkgconfig gettext lib_package gtk-doc
 
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 14/24] shadow: update 4.6 -> 4.8

2019-12-09 Thread Alex Kiernan
c
>  @@ -34,6 +34,9 @@
> @@ -120,6 +121,3 @@ index ccfbb99..24fb60d 100644
>   #include 
>   #include 
>   #include 
> ---
> -2.11.0
> -
> diff --git 
> a/meta/recipes-extended/shadow/files/0001-Do-not-check-for-validity-of-shell-executable.patch
>  
> b/meta/recipes-extended/shadow/files/0001-Do-not-check-for-validity-of-shell-executable.patch
> new file mode 100644
> index 000..2d15ff0673a
> --- /dev/null
> +++ 
> b/meta/recipes-extended/shadow/files/0001-Do-not-check-for-validity-of-shell-executable.patch
> @@ -0,0 +1,29 @@
> +From 0d0aded7307a9f4ee0d299951512acd18b3e029e Mon Sep 17 00:00:00 2001
> +From: Alexander Kanavin 
> +Date: Wed, 4 Dec 2019 19:28:48 +0100
> +Subject: [PATCH] Do not check for validity of shell executable.
> +
> +This kind of check fails when building a rootfs.
> +
> +Upstream-Status: Inappropriate [oe-core specific]
> +Signed-off-by: Alexander Kanavin 
> +---
> + src/useradd.c | 5 +
> + 1 file changed, 1 insertion(+), 4 deletions(-)
> +
> +diff --git a/src/useradd.c b/src/useradd.c
> +index 4af0f7c..898fe02 100644
> +--- a/src/useradd.c
>  b/src/useradd.c
> +@@ -1328,10 +1328,7 @@ static void process_flags (int argc, char **argv)
> +   if (   ( !VALID (optarg) )
> +   || (   ('\0' != optarg[0])
> +   && ('/'  != optarg[0])
> +-  && ('*'  != optarg[0]) )
> +-  || (stat(optarg, ) != 0)
> +-  || (S_ISDIR(st.st_mode))
> +-  || (access(optarg, X_OK) != 0)) {
> ++  && ('*'  != optarg[0]) )) {
> +   fprintf (stderr,
> +_("%s: invalid shell 
> '%s'\n"),
> +Prog, optarg);
> diff --git 
> a/meta/recipes-extended/shadow/files/0001-Make-the-sp_lstchg-shadow-field-reproducible-re.-71.patch
>  
> b/meta/recipes-extended/shadow/files/0001-Make-the-sp_lstchg-shadow-field-reproducible-re.-71.patch
> deleted file mode 100644
> index de0ba3ebb42..000
> --- 
> a/meta/recipes-extended/shadow/files/0001-Make-the-sp_lstchg-shadow-field-reproducible-re.-71.patch
> +++ /dev/null
> @@ -1,89 +0,0 @@
> -From fe34a2a0e44bc80ff213bfd185046a5f10c94997 Mon Sep 17 00:00:00 2001
> -From: Chris Lamb 
> -Date: Wed, 2 Jan 2019 18:06:16 +
> -Subject: [PATCH 1/2] Make the sp_lstchg shadow field reproducible (re. #71)
> -
> -From <https://github.com/shadow-maint/shadow/pull/71>:
> -
> -```
> -The third field in the /etc/shadow file (sp_lstchg) contains the date of
> -the last password change expressed as the number of days since Jan 1, 1970.
> -As this is a relative time, creating a user today will result in:
> -
> -username:17238:0:9:7:::
> -whilst creating the same user tomorrow will result in:
> -
> -username:17239:0:9:7:::
> -This has an impact for the Reproducible Builds[0] project where we aim to
> -be independent of as many elements the build environment as possible,
> -including the current date.
> -
> -This patch changes the behaviour to use the SOURCE_DATE_EPOCH[1]
> -environment variable (instead of Jan 1, 1970) if valid.
> -```
> -
> -This updated PR adds some missing calls to gettime (). This was originally
> -filed by Johannes Schauer in Debian as #917773 [2].
> -
> -[0] https://reproducible-builds.org/
> -[1] https://reproducible-builds.org/specs/source-date-epoch/
> -[2] https://bugs.debian.org/917773
> -
> -Upstream-Status: Backport
> -Signed-off-by: Alex Kiernan 
> 
> - libmisc/pwd2spwd.c | 3 +--
> - src/pwck.c | 2 +-
> - src/pwconv.c   | 2 +-
> - 3 files changed, 3 insertions(+), 4 deletions(-)
> -
> -diff --git a/libmisc/pwd2spwd.c b/libmisc/pwd2spwd.c
> -index c1b9b29ac873..6799dd50d490 100644
>  a/libmisc/pwd2spwd.c
> -+++ b/libmisc/pwd2spwd.c
> -@@ -40,7 +40,6 @@
> - #include "prototypes.h"
> - #include "defines.h"
> - #include 
> --extern time_t time (time_t *);
> -
> - /*
> -  * pwd_to_spwd - create entries for new spwd structure
> -@@ -66,7 +65,7 @@ struct spwd *pwd_to_spwd (const struct passwd *pw)
> -*/
> -   sp.sp_min = 0;
> -   sp.sp_max = (1L * DAY) / SCALE;
> --  sp.sp_lstchg = (long) time ((time_t *) 0) / SCALE;
> -+  sp.sp_lstchg = (long) gettime () / SCALE;
> -   if (0 == sp.sp_lstchg) {
> -   /* Better disable aging than requiring a password
&

[OE-core] [OE-Core][PATCH] openssh: Upgrade 8.0p1 -> 8.1p1

2019-12-01 Thread Alex Kiernan
Drop upstream backport of integer overflow in XMSS private key parsing.
Add PACKAGECONFIG for kerberos, libedit and ldns. If api-documentation
is enabled then install man(7) manpages rather than catman pages.

License-Update: convert to UTF-8
Signed-off-by: Alex Kiernan 
---

 ...eger-overflow-in-XMSS-private-key-pa.patch | 40 ---
 .../{openssh_8.0p1.bb => openssh_8.1p1.bb}| 15 ---
 2 files changed, 10 insertions(+), 45 deletions(-)
 delete mode 100644 
meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch
 rename meta/recipes-connectivity/openssh/{openssh_8.0p1.bb => 
openssh_8.1p1.bb} (92%)

diff --git 
a/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch
 
b/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch
deleted file mode 100644
index 3265be348519..
--- 
a/meta/recipes-connectivity/openssh/openssh/0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 2014fad3d28090b59d2f8a0971166c06e5fa6da6 Mon Sep 17 00:00:00 2001
-From: Hongxu Jia 
-Date: Fri, 18 Oct 2019 14:56:58 +0800
-Subject: [PATCH] upstream: fix integer overflow in XMSS private key parsing.
-
-Reported by Adam Zabrocki via SecuriTeam's SSH program.
-
-Note that this code is experimental and not compiled by default.
-
-ok markus@
-
-OpenBSD-Commit-ID: cd0361896d15e8a1bac495ac583ff065ffca2be1
-
-Signed-off-by: "d...@openbsd.org" 
-
-Upstream-Status: Backport 
[https://github.com/openssh/openssh-portable/commit/a546b17bbaeb12beac4c9aeed56f74a42b18a93a]
-CVE: CVE-2019-16905
-
-Signed-off-by: Hongxu Jia 

- sshkey-xmss.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/sshkey-xmss.c b/sshkey-xmss.c
-index aaae702..c57681a 100644
 a/sshkey-xmss.c
-+++ b/sshkey-xmss.c
-@@ -977,7 +977,8 @@ sshkey_xmss_decrypt_state(const struct sshkey *k, struct 
sshbuf *encoded,
-   goto out;
-   }
-   /* check that an appropriate amount of auth data is present */
--  if (sshbuf_len(encoded) < encrypted_len + authlen) {
-+  if (sshbuf_len(encoded) < authlen ||
-+  sshbuf_len(encoded) - authlen < encrypted_len) {
-   r = SSH_ERR_INVALID_FORMAT;
-   goto out;
-   }
--- 
-2.7.4
-
diff --git a/meta/recipes-connectivity/openssh/openssh_8.0p1.bb 
b/meta/recipes-connectivity/openssh/openssh_8.1p1.bb
similarity index 92%
rename from meta/recipes-connectivity/openssh/openssh_8.0p1.bb
rename to meta/recipes-connectivity/openssh/openssh_8.1p1.bb
index 2ffbc9a95f59..024ebca40228 100644
--- a/meta/recipes-connectivity/openssh/openssh_8.0p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_8.1p1.bb
@@ -6,7 +6,7 @@ and for executing commands on a remote machine."
 HOMEPAGE = "http://www.openssh.com/;
 SECTION = "console/network"
 LICENSE = "BSD & ISC & MIT"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=429658c6612f3a9b1293782366ab29d8"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=18d9e5a8b3dd1790d73502f50426d4d3"
 
 DEPENDS = "zlib openssl virtual/crypt"
 DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
@@ -24,14 +24,13 @@ SRC_URI = 
"http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar
file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \
file://sshd_check_keys \
file://add-test-support-for-busybox.patch \
-   
file://0001-upstream-fix-integer-overflow-in-XMSS-private-key-pa.patch \
"
-SRC_URI[md5sum] = "bf050f002fe510e1daecd39044e1122d"
-SRC_URI[sha256sum] = 
"bd943879e69498e8031eb6b7f44d08cdc37d59a7ab689aa0b437320c3481fd68"
+SRC_URI[md5sum] = "513694343631a99841e815306806edf0"
+SRC_URI[sha256sum] = 
"02f5dbef3835d0753556f973cd57b4c19b6b1f6cd24c03445e23ac77ca1b93ff"
 
 PAM_SRC_URI = "file://sshd"
 
-inherit useradd update-rc.d update-alternatives systemd
+inherit manpages useradd update-rc.d update-alternatives systemd
 
 USERADD_PACKAGES = "${PN}-sshd"
 USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd 
--shell /bin/false --user-group sshd"
@@ -44,6 +43,12 @@ SYSTEMD_SERVICE_${PN}-sshd = "sshd.socket"
 
 inherit autotools-brokensep ptest
 
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5"
+PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns"
+PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit"
+PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat"
+
 EXTRA_AUTORECONF += "--exclude=aclocal"
 
 # login path is hardcoded in sshd
-- 
2.17.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v4 2/2] image_types: add Zstandard conversion support

2019-11-20 Thread Alex Kiernan
On Wed, Nov 20, 2019 at 9:13 AM Stefan Agner  wrote:
>
> From: Stefan Agner 
>
> Add Zstandard (or just Zstd) compression support. This allows to
> create Zstd compressed tarballs by using tar.zst as IMAGE_FSTYPES.
>
> Signed-off-by: Stefan Agner 
> ---
>  meta/classes/image_types.bbclass | 8 ++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/image_types.bbclass 
> b/meta/classes/image_types.bbclass
> index 2eeffbb366..d29b9c5787 100644
> --- a/meta/classes/image_types.bbclass
> +++ b/meta/classes/image_types.bbclass
> @@ -59,6 +59,8 @@ XZ_INTEGRITY_CHECK ?= "crc32"
>
>  ZIP_COMPRESSION_LEVEL ?= "-9"
>
> +ZSTD_COMPRESSION_LEVEL ?= "-3"
> +
>  JFFS2_SUM_EXTRA_ARGS ?= ""
>  IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime 
> --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 
> ${EXTRA_IMAGECMD}"
>
> @@ -269,7 +271,7 @@ IMAGE_TYPES = " \
>  hddimg \
>  squashfs squashfs-xz squashfs-lzo squashfs-lz4 \
>  ubi ubifs multiubi \
> -tar tar.gz tar.bz2 tar.xz tar.lz4 \
> +tar tar.gz tar.bz2 tar.xz tar.lz4 tar.zst \
>  cpio cpio.gz cpio.xz cpio.lzma cpio.lz4 \
>  wic wic.gz wic.bz2 wic.lzma \
>  container \
> @@ -282,7 +284,7 @@ IMAGE_TYPES = " \
>  # CONVERSION_CMD/DEPENDS.
>  COMPRESSIONTYPES ?= ""
>
> -CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip sum md5sum sha1sum sha224sum 
> sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 
> ${COMPRESSIONTYPES}"
> +CONVERSIONTYPES = "gz bz2 lzma xz lz4 lzo zip zst sum md5sum sha1sum 
> sha224sum sha256sum sha384sum sha512sum bmap u-boot vmdk vdi qcow2 base64 
> ${COMPRESSIONTYPES}"
>  CONVERSION_CMD_lzma = "lzma -k -f -7 
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
>  CONVERSION_CMD_gz = "gzip -f -9 -n -c --rsyncable 
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
>  CONVERSION_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
> @@ -290,6 +292,7 @@ CONVERSION_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} 
> ${XZ_DEFAULTS} --check=
>  CONVERSION_CMD_lz4 = "lz4 -9 -z -l ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} 
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
>  CONVERSION_CMD_lzo = "lzop -9 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
>  CONVERSION_CMD_zip = "zip ${ZIP_COMPRESSION_LEVEL} 
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zip 
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
> +CONVERSION_CMD_zst = "zstd -f -k -c ${ZSTD_COMPRESSION_LEVEL} 
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > 
> ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.zst"

Add -T0 so we default to parallel?

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v4 2/2] image_types: add Zstandard conversion support

2019-11-20 Thread Alex Kiernan
On Wed, Nov 20, 2019 at 10:32 AM Adrian Bunk  wrote:
>
> On Wed, Nov 20, 2019 at 09:12:58AM +, Stefan Agner wrote:
> >...
> > --- a/meta/classes/image_types.bbclass
> > +++ b/meta/classes/image_types.bbclass
> > @@ -59,6 +59,8 @@ XZ_INTEGRITY_CHECK ?= "crc32"
> >
> >  ZIP_COMPRESSION_LEVEL ?= "-9"
> >
> > +ZSTD_COMPRESSION_LEVEL ?= "-3"
> > +
> >...
>
> Why -3 and not -19 ?
>
> Compression speed is not a real issue, and AFAIR decompression
> tends to be slightly faster with smaller compressed size.
> Plus the benefit that smaller images are faster to load
> from network/storage.
>

I've been carrying similar functionality locally and at some point
pushed to `--ultra -22` and with a large image (~2GiB) the compression
stage then took literally hours. Not sure I tested with `-19` though

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3 1/2] zstd: move recipe to oe-core from meta-oe

2019-11-19 Thread Alex Kiernan
On Mon, Nov 18, 2019 at 6:39 PM Stefan Agner  wrote:
>
> [adding Alex, he maintained the recipe in meta-oe so far]
>
> On 2019-11-18 13:19, Richard Purdie wrote:
> > On Thu, 2019-11-14 at 15:47 +0100, Stefan Agner wrote:
> >> On 2019-11-08 10:14, Stefan Agner wrote:
> >> > From: Stefan Agner 
> >> >
> >> > Zstd is a very fast compression algorithm and has gained quite some
> >> > popularity recently. An upcoming patch allows to compress rootfs
> >> > using Zstd. Moving Zstd to oe-core allows this new conversion
> >> > formats
> >> > to be automatically tested by the oe-selftest
> >> > imagefeatures.ImageFeatures.test_image_fstypes test.
> >> >
> >> > Furthermore there are three packages in oe-core which allow to
> >> > enable
> >> > Zstd support through packageconfig currently.
> >>
> >> Any update/thoughts on this?
> >
> > I've not made a final decision on whether to merge it fails selftests
> > due to a lack of a maintainer:
>
> Alex, would you be OK with you listed as maintainer?
>

I'm fine with that - it's very low overhead.

-- 
Alex Kiernan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


<    1   2   3   4   5   6   7   >