[OE-core] runqemu: ahci option

2024-01-10 Thread Sean Nyekjaer
Hi,

We have an x86_64 machine that we create an wic image for.
For bootloader we are using UEFI boot with u-boot as a EFI payload.

U-boot doesn’t have support for virtio-scsi-pci, so it’s can’t detect a disk.
U-boot however does some tests with the ahci driver:
https://source.denx.de/u-boot/u-boot/-/blob/master/scripts/build-efi.sh#L116
It also works for our case.

But since the runqemu script checks for drivetype by “/dev/sd” I can’t easily 
add something like what u-boot uses.

Any idea’s?

For now I use in machine conf:
QB_DEFAULT_FSTYPE = "wic"
QB_ROOTFS = "none"
QB_OPT_APPEND = "-drive 
id=disk,file=@DEPLOY_DIR_IMAGE@/image-qemux86-64.rootfs.wic,if=none,format=raw 
-device ahci,id=ahci -device ide-hd,drive=disk,bus=ahci.0”

But it would be nice to have the ROOTFS env var expanded instead of declaring 
it explicitly here.

Best regards
Sean Nyekjær
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#193534): 
https://lists.openembedded.org/g/openembedded-core/message/193534
Mute This Topic: https://lists.openembedded.org/mt/103658327/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][mickledore][PATCH] weston: default to launcher-seatd

2023-10-20 Thread Sean Nyekjaer

Quoting Steve Sakoman :


On Thu, Oct 19, 2023 at 3:28 AM Sean Nyekjaer  wrote:


Lets use the launcher-seatd as default, launcher-logind is "sometimes"
failing to provide input events. Further more is the launcher-logind
depricated in newer versions of weston.


Changing behaviour is typically not allowed in stable branches.

In any event, this change would need to go into the master branch
before it could be backported to stable branches. So please submit
this for the master branch!

Steve


Hi Steve,

It is part of the master branch be7da75 “weston: update 11.0.1 - 12.0.1”

/Sean





Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-graphics/wayland/weston_11.0.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston_11.0.1.bb  
b/meta/recipes-graphics/wayland/weston_11.0.1.bb

index 0838791a6b..09753e7c51 100644
--- a/meta/recipes-graphics/wayland/weston_11.0.1.bb
+++ b/meta/recipes-graphics/wayland/weston_11.0.1.bb
@@ -37,7 +37,7 @@ PACKAGECONFIG ??=  
"${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayla
${@bb.utils.contains('DISTRO_FEATURES', 'x11  
wayland', 'xwayland', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd  
x11', d)} \
${@bb.utils.contains_any('DISTRO_FEATURES',  
'wayland x11', '', 'headless', d)} \
-
${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit',  
'launcher-libseat', '', d)} \

+   launcher-libseat \
image-jpeg \
screenshare \
shell-desktop \
@@ -71,7 +71,7 @@ PACKAGECONFIG[lcms] =  
"-Dcolor-management-lcms=true,-Dcolor-management-lcms=fals

 # Weston with webp support
 PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
 # Weston with systemd-login support
-PACKAGECONFIG[systemd] = "-Dsystemd=true  
-Dlauncher-logind=true,-Dsystemd=false  
-Dlauncher-logind=false,systemd dbus"

+PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus"
 # Weston with Xwayland support (requires X11 and Wayland)
 PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb  
libxcursor xwayland"

 # colord CMS support
--
2.42.0






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189577): 
https://lists.openembedded.org/g/openembedded-core/message/189577
Mute This Topic: https://lists.openembedded.org/mt/102059907/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][mickledore][PATCH] weston: default to launcher-seatd

2023-10-19 Thread Sean Nyekjaer
Lets use the launcher-seatd as default, launcher-logind is "sometimes"
failing to provide input events. Further more is the launcher-logind
depricated in newer versions of weston.

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-graphics/wayland/weston_11.0.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston_11.0.1.bb 
b/meta/recipes-graphics/wayland/weston_11.0.1.bb
index 0838791a6b..09753e7c51 100644
--- a/meta/recipes-graphics/wayland/weston_11.0.1.bb
+++ b/meta/recipes-graphics/wayland/weston_11.0.1.bb
@@ -37,7 +37,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 
'wayland', 'kms wayla
${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 
'xwayland', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', 
'', 'headless', d)} \
-   ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 
'sysvinit', 'launcher-libseat', '', d)} \
+   launcher-libseat \
image-jpeg \
screenshare \
shell-desktop \
@@ -71,7 +71,7 @@ PACKAGECONFIG[lcms] = 
"-Dcolor-management-lcms=true,-Dcolor-management-lcms=fals
 # Weston with webp support
 PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp"
 # Weston with systemd-login support
-PACKAGECONFIG[systemd] = "-Dsystemd=true 
-Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus"
+PACKAGECONFIG[systemd] = "-Dsystemd=true,-Dsystemd=false,systemd dbus"
 # Weston with Xwayland support (requires X11 and Wayland)
 PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcb libxcursor 
xwayland"
 # colord CMS support
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189458): 
https://lists.openembedded.org/g/openembedded-core/message/189458
Mute This Topic: https://lists.openembedded.org/mt/102059907/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] weston-init: how to debug with systemd

2023-10-18 Thread Sean Nyekjaer


> On 17 Oct 2023, at 20.29, Khem Raj  wrote:
> 
> I have systemd based system and I can see it in journal e.g. see
> 
> https://snips.sh/f/jleAzcqMVd

Fortunately it’s very easy to reproduce the no log scenario. :)

Build a default core-image-minimal with the following added to local.conf:
INIT_MANAGER = "systemd"
DISTRO_FEATURES += "pam wayland opengl"
CORE_IMAGE_EXTRA_INSTALL += "wayland weston"

Run the image with qemu:
root@qemux86-64:~# journalctl -fu weston
Oct 18 13:43:21 qemux86-64 systemd[1]: Starting Weston, a Wayland compositor, 
as a system service...
Oct 18 13:43:21 qemux86-64 systemd[1]: weston.service: Main process exited, 
code=exited, status=1/FAILURE
Oct 18 13:43:21 qemux86-64 systemd[1]: weston.service: Failed with result 
'exit-code'.
Oct 18 13:43:21 qemux86-64 systemd[1]: Failed to start Weston, a Wayland 
compositor, as a system service.

/Sean

> 
> On Tue, Oct 17, 2023 at 6:05 AM Sean Nyekjaer  wrote:
>> 
>> Hi,
>> 
>> To my understanding the weston.service doesn’t log to journal. If I'm is 
>> running the weston binary there is fine output on stdout.
>> 
>> Looks like TTYPath is eating the logs, but I could be wrong.
>> 
>> Adding:
>> ExecStart=/usr/bin/weston --modules=systemd-notify.so --log=/tmp/weston.log
>> 
>> Will of course give logs in that file
>> 
>> /Sean



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189392): 
https://lists.openembedded.org/g/openembedded-core/message/189392
Mute This Topic: https://lists.openembedded.org/mt/102016986/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] weston-init: how to debug with systemd

2023-10-17 Thread Sean Nyekjaer
Hi,

To my understanding the weston.service doesn’t log to journal. If I'm is 
running the weston binary there is fine output on stdout.

Looks like TTYPath is eating the logs, but I could be wrong.

Adding:
ExecStart=/usr/bin/weston --modules=systemd-notify.so --log=/tmp/weston.log

Will of course give logs in that file

/Sean
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#189323): 
https://lists.openembedded.org/g/openembedded-core/message/189323
Mute This Topic: https://lists.openembedded.org/mt/102016986/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][mickledore][PATCH] dmidecode: fixup for CVE-2023-30630

2023-10-16 Thread Sean Nyekjaer
The previous CVE-2023-30630_1.patch picked only the patch
"dmidecode: Write the whole dump file at once" d8cfbc808f.
But there was a refactoring which does not allow to cherry-pick it fast
forward. Resolving this conflict was not correctly done. The patch was:

+u32 len;
+u8 *table;
...
-if (!(opt.flags & FLAG_QUIET))
-pr_comment("Writing %d bytes to %s.", crafted[0x05],
-   opt.dumpfile);
-write_dump(0, crafted[0x05], crafted, opt.dumpfile, 1);
+dmi_table_dump(crafted, crafted[0x05], table, len);

It looks like the variables len and table have been added without
initialization.
Now this problem is solved by applying the previous refactoring as
well. Patch 1 gets replaced by Patch 1a and Patch 1b. Patch 2..4 are
rebased without changes.

This is basically the same patch as in kirkstone:
ea069a94a2 dmidecode: fixup for CVE-2023-30630

Signed-off-by: Sean Nyekjaer 
---
 .../dmidecode/CVE-2023-30630_1a.patch | 236 ++
 .../dmidecode/CVE-2023-30630_1b.patch | 197 +++
 .../dmidecode/CVE-2023-30630_2.patch  |   8 +-
 .../dmidecode/CVE-2023-30630_3.patch  |  55 ++--
 .../dmidecode/CVE-2023-30630_4.patch  | 143 +--
 .../dmidecode/dmidecode_3.4.bb|   3 +-
 6 files changed, 539 insertions(+), 103 deletions(-)
 create mode 100644 
meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_1a.patch
 create mode 100644 
meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_1b.patch

diff --git a/meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_1a.patch 
b/meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_1a.patch
new file mode 100644
index 00..bf93fbc13c
--- /dev/null
+++ b/meta/recipes-devtools/dmidecode/dmidecode/CVE-2023-30630_1a.patch
@@ -0,0 +1,236 @@
+From ee6db10dd70b8fdc7a93cffd7cf5bc7a28f9d3d7 Mon Sep 17 00:00:00 2001
+From: Jean Delvare 
+Date: Mon, 20 Feb 2023 14:53:21 +0100
+Subject: [PATCH 1/5] dmidecode: Split table fetching from decoding
+
+Clean up function dmi_table so that it does only one thing:
+* dmi_table() is renamed to dmi_table_get(). It now retrieves the
+  DMI table, but does not process it any longer.
+* Decoding or dumping the table is now done in smbios3_decode(),
+  smbios_decode() and legacy_decode().
+No functional change.
+
+A side effect of this change is that writing the header and body of
+dump files is now done in a single location. This is required to
+further consolidate the writing of dump files.
+
+Signed-off-by: Jean Delvare 
+Reviewed-by: Jerry Hoemann 
+
+CVE: CVE-2023-30630
+
+Upstream-Status: Backport 
[https://git.savannah.nongnu.org/cgit/dmidecode.git/commit/?id=39b2dd7b6ab719b920e96ed832cfb4bdd664e808]
+
+Signed-off-by: Adrian Freihofer 
+---
+ dmidecode.c | 86 ++---
+ 1 file changed, 62 insertions(+), 24 deletions(-)
+
+diff --git a/dmidecode.c b/dmidecode.c
+index cd2b5c9..b082c03 100644
+--- a/dmidecode.c
 b/dmidecode.c
+@@ -5247,8 +5247,9 @@ static void dmi_table_decode(u8 *buf, u32 len, u16 num, 
u16 ver, u32 flags)
+   }
+ }
+ 
+-static void dmi_table(off_t base, u32 len, u16 num, u32 ver, const char 
*devmem,
+-u32 flags)
++/* Allocates a buffer for the table, must be freed by the caller */
++static u8 *dmi_table_get(off_t base, u32 *len, u16 num, u32 ver,
++   const char *devmem, u32 flags)
+ {
+   u8 *buf;
+ 
+@@ -5267,7 +5268,7 @@ static void dmi_table(off_t base, u32 len, u16 num, u32 
ver, const char *devmem,
+   {
+   if (num)
+   pr_info("%u structures occupying %u bytes.",
+-  num, len);
++  num, *len);
+   if (!(opt.flags & FLAG_FROM_DUMP))
+   pr_info("Table at 0x%08llX.",
+   (unsigned long long)base);
+@@ -5285,19 +5286,19 @@ static void dmi_table(off_t base, u32 len, u16 num, 
u32 ver, const char *devmem,
+* would be the result of the kernel truncating the table on
+* parse error.
+*/
+-  size_t size = len;
++  size_t size = *len;
+   buf = read_file(flags & FLAG_NO_FILE_OFFSET ? 0 : base,
+   &size, devmem);
+-  if (!(opt.flags & FLAG_QUIET) && num && size != (size_t)len)
++  if (!(opt.flags & FLAG_QUIET) && num && size != (size_t)*len)
+   {
+   fprintf(stderr, "Wrong DMI structures length: %u bytes "
+   "announced, only %lu bytes available.\n",
+-  len, (unsigned long)size);
++  *len, (unsigned long)size);
+   }

[OE-core][PATCH v3 3/3] oeqa/sdk/rust: Add build and run test of rust binary with SDK host

2023-10-09 Thread Sean Nyekjaer
Add a QA test to the SDK to test that a basic cargo build works for the
SDK host.

Signed-off-by: Sean Nyekjaer 
---

Changes since v1:
- use SDK_SYS for compiling for SDK Host

 meta/lib/oeqa/sdk/cases/rust.py | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/meta/lib/oeqa/sdk/cases/rust.py b/meta/lib/oeqa/sdk/cases/rust.py
index 31036f0f14..f5d437bb19 100644
--- a/meta/lib/oeqa/sdk/cases/rust.py
+++ b/meta/lib/oeqa/sdk/cases/rust.py
@@ -33,3 +33,25 @@ class RustCompileTest(OESDKTestCase):
 
 def test_cargo_build(self):
 self._run('cd %s/hello; cargo build' % self.tc.sdk_dir)
+
+class RustHostCompileTest(OESDKTestCase):
+td_vars = ['MACHINE', 'SDK_SYS']
+
+@classmethod
+def setUpClass(self):
+targetdir = os.path.join(self.tc.sdk_dir, "hello")
+try:
+shutil.rmtree(targetdir)
+except FileNotFoundError:
+pass
+shutil.copytree(os.path.join(self.tc.sdk_files_dir, "rust/hello"), 
targetdir)
+
+def setUp(self):
+machine = self.td.get("MACHINE")
+if not self.tc.hasHostPackage("packagegroup-rust-cross-canadian-%s" % 
machine):
+raise unittest.SkipTest("RustCompileTest class: SDK doesn't 
contain a Rust cross-canadian toolchain")
+
+def test_cargo_build(self):
+sdksys = self.td.get("SDK_SYS")
+self._run('cd %s/hello; cargo build --target %s-gnu' % 
(self.tc.sdk_dir, sdksys))
+self._run('cd %s/hello; cargo run --target %s-gnu' % (self.tc.sdk_dir, 
sdksys))
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188834): 
https://lists.openembedded.org/g/openembedded-core/message/188834
Mute This Topic: https://lists.openembedded.org/mt/101849640/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v3 2/3] rust-cross-canadian: set CARGO_TARGET__RUNNER for nativesdk

2023-10-09 Thread Sean Nyekjaer
This will enable us to build and run rust programs on the sdk host.

% cargo run --target x86_64-oesdk-linux-gnu -vv
   Fresh hello v0.1.0 (~/development/hello)
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
 Running 
`/usr/local/sdk/sysroots/x86_64-oesdk-linux/lib/ld-linux-x86-64.so.2 
target/x86_64-oesdk-linux-gnu/debug/hello`
Hello, world

Signed-off-by: Sean Nyekjaer 
---

Changes since v2:
- Find correct loader. Made with inspiration from 
meta/classes-global/uninative.bbclass

 meta/recipes-devtools/rust/rust-cross-canadian.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
index d25646237c..baa58e9838 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
@@ -55,9 +55,12 @@ do_install () {
 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
 RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 
's/-/_/g'`
+SDKLOADER=${@bb.utils.contains('SDK_ARCH', 'x86_64', 
'ld-linux-x86-64.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'i686', 
'ld-linux.so.2', '', d)}${@bb.utils.contains('SDK_ARCH', 'aarch64', 
'ld-linux-aarch64.so.1', '', d)}${@bb.utils.contains('SDK_ARCH', 'ppc64le', 
'ld64.so.2', '', d)}
 
 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+   export 
CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/${SDKLOADER}"
export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
EOF
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188833): 
https://lists.openembedded.org/g/openembedded-core/message/188833
Mute This Topic: https://lists.openembedded.org/mt/101849639/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v3 1/3] rust-cross-canadian: set CARGO_TARGET__RUSTFLAGS

2023-10-09 Thread Sean Nyekjaer
Avoid setting sdk-wide RUSTFLAGS as these flags only are valid when
building for target.
This will enable building for different targets with different
RUSTFLAGS.

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
index d569ac59f5..d25646237c 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
@@ -54,8 +54,10 @@ do_install () {
 mkdir "${ENV_SETUP_DIR}"
 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
+RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+
 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
-   export RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C 
link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+   export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
EOF
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188832): 
https://lists.openembedded.org/g/openembedded-core/message/188832
Mute This Topic: https://lists.openembedded.org/mt/101849638/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2 1/3] rust-cross-canadian: set CARGO_TARGET__RUSTFLAGS

2023-10-03 Thread Sean Nyekjaer
Avoid setting sdk-wide RUSTFLAGS as these flags only are valid when
building for target.
This will enable building for different targets with different
RUSTFLAGS.

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
index d569ac59f5..d25646237c 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
@@ -54,8 +54,10 @@ do_install () {
 mkdir "${ENV_SETUP_DIR}"
 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
+RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+
 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
-   export RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C 
link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+   export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
EOF
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188625): 
https://lists.openembedded.org/g/openembedded-core/message/188625
Mute This Topic: https://lists.openembedded.org/mt/101729592/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2 3/3] oeqa/sdk/rust: Add build and run test of rust binary with SDK host

2023-10-03 Thread Sean Nyekjaer
Add a QA test to the SDK to test that a basic cargo build works for the
SDK host.

Signed-off-by: Sean Nyekjaer 
---

Changes since v1:
 - use SDK_SYS for compiling for SDK Host

 meta/lib/oeqa/sdk/cases/rust.py | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/meta/lib/oeqa/sdk/cases/rust.py b/meta/lib/oeqa/sdk/cases/rust.py
index 31036f0f14..f5d437bb19 100644
--- a/meta/lib/oeqa/sdk/cases/rust.py
+++ b/meta/lib/oeqa/sdk/cases/rust.py
@@ -33,3 +33,25 @@ class RustCompileTest(OESDKTestCase):
 
 def test_cargo_build(self):
 self._run('cd %s/hello; cargo build' % self.tc.sdk_dir)
+
+class RustHostCompileTest(OESDKTestCase):
+td_vars = ['MACHINE', 'SDK_SYS']
+
+@classmethod
+def setUpClass(self):
+targetdir = os.path.join(self.tc.sdk_dir, "hello")
+try:
+shutil.rmtree(targetdir)
+except FileNotFoundError:
+pass
+shutil.copytree(os.path.join(self.tc.sdk_files_dir, "rust/hello"), 
targetdir)
+
+def setUp(self):
+machine = self.td.get("MACHINE")
+if not self.tc.hasHostPackage("packagegroup-rust-cross-canadian-%s" % 
machine):
+raise unittest.SkipTest("RustCompileTest class: SDK doesn't 
contain a Rust cross-canadian toolchain")
+
+def test_cargo_build(self):
+sdksys = self.td.get("SDK_SYS")
+self._run('cd %s/hello; cargo build --target %s-gnu' % 
(self.tc.sdk_dir, sdksys))
+self._run('cd %s/hello; cargo run --target %s-gnu' % (self.tc.sdk_dir, 
sdksys))
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188627): 
https://lists.openembedded.org/g/openembedded-core/message/188627
Mute This Topic: https://lists.openembedded.org/mt/101729594/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2 2/3] rust-cross-canadian: set CARGO_TARGET__RUNNER for nativesdk

2023-10-03 Thread Sean Nyekjaer
This will enable us to build and run rust programs on the sdk host.

% cargo run --target x86_64-oesdk-linux-gnu -vv
   Fresh hello v0.1.0 (~/development/hello)
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
 Running 
`/usr/local/sdk/sysroots/x86_64-oesdk-linux/lib/ld-linux-x86-64.so.2 
target/x86_64-oesdk-linux-gnu/debug/hello`
Hello, world

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
index d25646237c..5b89216658 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
@@ -55,9 +55,12 @@ do_install () {
 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
 RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 
's/-/_/g'`
+SDKARCH=`echo ${SDK_ARCH} | sed 's/_/-/g'`
 
 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+   export 
CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/ld-linux-${SDKARCH}.so.2"
export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
EOF
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188626): 
https://lists.openembedded.org/g/openembedded-core/message/188626
Mute This Topic: https://lists.openembedded.org/mt/101729593/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][mickledore][PATCH] gcc: depend on zstd

2023-10-02 Thread Sean Nyekjaer
Add zstd LTO support for target and nativesdk compiler.

This also brings gcc into sync with gcc-cross.

% x86_64-oe-linux-gcc -v
[...]
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (GCC)
% x86_64-oesdk-linux-gcc -v
[...]
Supported LTO compression algorithms: zlib
gcc version 12.2.0 (GCC)

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/gcc/gcc-12.2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-12.2.inc 
b/meta/recipes-devtools/gcc/gcc-12.2.inc
index 0dbbecad4a..5ff40a3b7f 100644
--- a/meta/recipes-devtools/gcc/gcc-12.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-12.2.inc
@@ -10,7 +10,7 @@ BINV = "12.2.0"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
 
-DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+DEPENDS =+ "mpfr gmp libmpc zlib zstd flex-native"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native 
zstd-native"
 
 LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188602): 
https://lists.openembedded.org/g/openembedded-core/message/188602
Mute This Topic: https://lists.openembedded.org/mt/101709588/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 2/3] rust-cross-canadian: set CARGO_TARGET__RUNNER for nativesdk

2023-09-29 Thread Sean Nyekjaer
This will enable us to build and run rust programs on the sdk host.

% cargo run --target x86_64-oesdk-linux-gnu -vv
   Fresh hello v0.1.0 (~/development/hello)
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
 Running 
`/usr/local/sdk/sysroots/x86_64-oesdk-linux/lib/ld-linux-x86-64.so.2 
target/x86_64-oesdk-linux-gnu/debug/hello`
Hello, world

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
index d25646237c..5b89216658 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
@@ -55,9 +55,12 @@ do_install () {
 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
 RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 
's/-/_/g'`
+SDKARCH=`echo ${SDK_ARCH} | sed 's/_/-/g'`
 
 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+   export 
CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/ld-linux-${SDKARCH}.so.2"
export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
EOF
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188397): 
https://lists.openembedded.org/g/openembedded-core/message/188397
Mute This Topic: https://lists.openembedded.org/mt/101654699/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 1/3] rust-cross-canadian: set CARGO_TARGET__RUSTFLAGS

2023-09-29 Thread Sean Nyekjaer
Avoid setting sdk-wide RUSTFLAGS as these flags only are valid when
building for target.
This will enable building for different targets with different
RUSTFLAGS.

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
index d569ac59f5..d25646237c 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
@@ -54,8 +54,10 @@ do_install () {
 mkdir "${ENV_SETUP_DIR}"
 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
+RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+
 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
-   export RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C 
link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+   export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
EOF
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188399): 
https://lists.openembedded.org/g/openembedded-core/message/188399
Mute This Topic: https://lists.openembedded.org/mt/101654701/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH 3/3] oeqa/sdk/rust: Add build and run test of rust binary with SDK host

2023-09-29 Thread Sean Nyekjaer
Add a QA test to the SDK to test that a basic cargo build works for the
SDK host.

Signed-off-by: Sean Nyekjaer 
---
I know that `cargo build` and `cargo run` is kinda redundant for the `cargo
run` command. But I guess it's easier to see whats happening here...

 meta/lib/oeqa/sdk/cases/rust.py | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/meta/lib/oeqa/sdk/cases/rust.py b/meta/lib/oeqa/sdk/cases/rust.py
index 31036f0f14..9404078b1d 100644
--- a/meta/lib/oeqa/sdk/cases/rust.py
+++ b/meta/lib/oeqa/sdk/cases/rust.py
@@ -33,3 +33,25 @@ class RustCompileTest(OESDKTestCase):
 
 def test_cargo_build(self):
 self._run('cd %s/hello; cargo build' % self.tc.sdk_dir)
+
+class RustHostCompileTest(OESDKTestCase):
+td_vars = ['MACHINE', 'SDKMACHINE']
+
+@classmethod
+def setUpClass(self):
+targetdir = os.path.join(self.tc.sdk_dir, "hello")
+try:
+shutil.rmtree(targetdir)
+except FileNotFoundError:
+pass
+shutil.copytree(os.path.join(self.tc.sdk_files_dir, "rust/hello"), 
targetdir)
+
+def setUp(self):
+machine = self.td.get("MACHINE")
+if not self.tc.hasHostPackage("packagegroup-rust-cross-canadian-%s" % 
machine):
+raise unittest.SkipTest("RustCompileTest class: SDK doesn't 
contain a Rust cross-canadian toolchain")
+
+def test_cargo_build(self):
+machine = self.td.get("SDKMACHINE")
+self._run('cd %s/hello; cargo build --target %s-oesdk-linux-gnu' % 
(self.tc.sdk_dir, machine))
+self._run('cd %s/hello; cargo run --target %s-oesdk-linux-gnu' % 
(self.tc.sdk_dir, machine))
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188398): 
https://lists.openembedded.org/g/openembedded-core/message/188398
Mute This Topic: https://lists.openembedded.org/mt/101654700/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 1/2] rust-cross-canadian: set CARGO_TARGET__RUSTFLAGS

2023-09-28 Thread Sean Nyekjaer
Avoid setting sdk-wide RUSTFLAGS as these flags only are valid when
building for target.
This will enable building for different targets with different
RUSTFLAGS.

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
index d569ac59f5..d25646237c 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
@@ -54,8 +54,10 @@ do_install () {
 mkdir "${ENV_SETUP_DIR}"
 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
+RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+
 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
-   export RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr -C 
link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+   export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
EOF
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188369): 
https://lists.openembedded.org/g/openembedded-core/message/188369
Mute This Topic: https://lists.openembedded.org/mt/101633982/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 2/2] rust-cross-canadian: set CARGO_TARGET__RUNNER for nativesdk

2023-09-28 Thread Sean Nyekjaer
This will enable us to build and run rust programs on the sdk host.

% cargo run --target x86_64-oesdk-linux-gnu -vv
   Fresh hello v0.1.0 (~/development/hello)
Finished dev [unoptimized + debuginfo] target(s) in 0.02s
 Running 
`/usr/local/sdk/sysroots/x86_64-oesdk-linux/lib/ld-linux-x86-64.so.2 
target/x86_64-oesdk-linux-gnu/debug/hello`
Hello, world

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/rust/rust-cross-canadian.inc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
index d25646237c..5b89216658 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ b/meta/recipes-devtools/rust/rust-cross-canadian.inc
@@ -55,9 +55,12 @@ do_install () {
 RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/rust.sh"
 
 RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+RUST_HOST_TRIPLE=`echo ${RUST_HOST_SYS} | tr '[:lower:]' '[:upper:]' | sed 
's/-/_/g'`
+SDKARCH=`echo ${SDK_ARCH} | sed 's/_/-/g'`
 
 cat <<- EOF > "${RUST_ENV_SETUP_SH}"
export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+   export 
CARGO_TARGET_${RUST_HOST_TRIPLE}_RUNNER="\$OECORE_NATIVE_SYSROOT/lib/ld-linux-${SDKARCH}.so.2"
export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
EOF
 
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188370): 
https://lists.openembedded.org/g/openembedded-core/message/188370
Mute This Topic: https://lists.openembedded.org/mt/101633983/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v3] gcc: depend on zstd

2023-09-27 Thread Sean Nyekjaer
Add zstd LTO support for target and nativesdk compiler.
This also brings gcc into sync with gcc-cross.

% x86_64-oe-linux-gcc -v
[...]
 Supported LTO compression algorithms: zlib zstd
 gcc version 12.2.0 (GCC)
% x86_64-oesdk-linux-gcc -v
[...]
 Supported LTO compression algorithms: zlib
 gcc version 12.2.0 (GCC)

Signed-off-by: Sean Nyekjaer 
---
Changes since v2:
 - removed git syntax from commit msg

 meta/recipes-devtools/gcc/gcc-13.2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc 
b/meta/recipes-devtools/gcc/gcc-13.2.inc
index d96f3171e4..359db1e278 100644
--- a/meta/recipes-devtools/gcc/gcc-13.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
@@ -10,7 +10,7 @@ BINV = "13.2.0"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
 
-DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+DEPENDS =+ "mpfr gmp libmpc zlib zstd flex-native"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native 
zstd-native"
 
 LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188368): 
https://lists.openembedded.org/g/openembedded-core/message/188368
Mute This Topic: https://lists.openembedded.org/mt/101632816/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH v2] gcc: depend on zstd

2023-09-27 Thread Sean Nyekjaer
Add zstd LTO support for target and nativesdk compiler.
This also brings gcc into sync with gcc-cross.

---
% x86_64-oe-linux-gcc -v
[...]
 Supported LTO compression algorithms: zlib zstd
 gcc version 12.2.0 (GCC)
% x86_64-oesdk-linux-gcc -v
[...]
 Supported LTO compression algorithms: zlib
 gcc version 12.2.0 (GCC)
---

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/gcc/gcc-13.2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc 
b/meta/recipes-devtools/gcc/gcc-13.2.inc
index d96f3171e4..359db1e278 100644
--- a/meta/recipes-devtools/gcc/gcc-13.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
@@ -10,7 +10,7 @@ BINV = "13.2.0"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
 
-DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+DEPENDS =+ "mpfr gmp libmpc zlib zstd flex-native"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native 
zstd-native"
 
 LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188314): 
https://lists.openembedded.org/g/openembedded-core/message/188314
Mute This Topic: https://lists.openembedded.org/mt/101616424/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][PATCH] gcc: depend on zstd

2023-09-27 Thread Sean Nyekjaer


> On 27 Sep 2023, at 13.17, Richard Purdie  
> wrote:
> 
> On Wed, 2023-09-27 at 12:49 +0200, Sean Nyekjaer wrote:
>> Add zstd LTO support for the nativesdk compiler.
> 
> This is changing it for the target compiler as well? 
> 
> Perhaps also mention it brings it into sync with gcc-cross (assuming it
> does?).
> 
> Cheers,
> 
> Richard
> 

Hi Richard,

It looks like the target compiler(x86_64-oe-linux) already had zstd support.

---
% x86_64-oe-linux-gcc -v
[...]
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (GCC)
% x86_64-oesdk-linux-gcc -v
[...]
Supported LTO compression algorithms: zlib
gcc version 12.2.0 (GCC)
—

Or I’m wrong?

Br,
/Sean
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188308): 
https://lists.openembedded.org/g/openembedded-core/message/188308
Mute This Topic: https://lists.openembedded.org/mt/101614708/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] gcc: depend on zstd

2023-09-27 Thread Sean Nyekjaer
Add zstd LTO support for the nativesdk compiler.

---
% x86_64-oe-linux-gcc -v
[...]
 Supported LTO compression algorithms: zlib zstd
 gcc version 12.2.0 (GCC)
% x86_64-oesdk-linux-gcc -v
[...]
 Supported LTO compression algorithms: zlib
 gcc version 12.2.0 (GCC)
---

Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-devtools/gcc/gcc-13.2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gcc/gcc-13.2.inc 
b/meta/recipes-devtools/gcc/gcc-13.2.inc
index d96f3171e4..359db1e278 100644
--- a/meta/recipes-devtools/gcc/gcc-13.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-13.2.inc
@@ -10,7 +10,7 @@ BINV = "13.2.0"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
 
-DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
+DEPENDS =+ "mpfr gmp libmpc zlib zstd flex-native"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native 
zstd-native"
 
 LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
-- 
2.42.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#188302): 
https://lists.openembedded.org/g/openembedded-core/message/188302
Mute This Topic: https://lists.openembedded.org/mt/101614708/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] [PATCH v2 1/2] zlib: split SRC_URI into inc file

2022-08-25 Thread Sean Nyekjaer



On 08/08/2022 12.20, Sean Nyekjaer wrote:

On Mon, Jul 18, 2022 at 04:12:25PM +, Ross Burton wrote:

This still seems overkill.  You can build minizip from inside the zlib recipe 
by fixing the minizip Makefile (fix posted to 
https://github.com/madler/zlib/pull/681) and then adding one line to do_compile:

 oe_runmake -C contrib/minizip CC="${CC}" CFLAGS="${CFLAGS}" 
LDFLAGS="${LDFLAGS}"

A corresponding manual do_install too, obviously.

Ross



Hi Ross,

Thanks for the patch :)

However this will create a minizip that is statically linked with zlib :(

Guess we need to add some more to the Makefile (or just use the
autotools generated one)

Something along this:

diff --git a/contrib/minizip/Makefile b/contrib/minizip/Makefile
index 4a0465f..cf9e79a 100644
--- a/contrib/minizip/Makefile
+++ b/contrib/minizip/Makefile
@@ -1,13 +1,26 @@
  CPPFLAGS = -I../..
  
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a

-ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a
+libminizip_so_SOURCES = \
+   ioapi.c \
+   mztools.c \
+   unzip.c \
+   zip.c
  
-all: miniunz minizip

+miniunzip_SOURCES = miniunz.c
+miniunzip_LDADD = libminizip.so
+minizip_SOURCES = minizip.c
+minizip_LDADD = libminizip.so -lz
  
-miniunz:  $(UNZ_OBJS)

+all: libminizip.so miniunz minizip
  
-minizip:  $(ZIP_OBJS)

+libminizip.so:
+   $(CC) -fPIC -shared $(libminizip_so_SOURCES) -o libminizip.so
+
+miniunz: libminizip.so
+   $(CC) $(miniunzip_SOURCES) $(miniounzip_LDADD) -o miniunz
+
+minizip: libminizip.so
+   $(CC) $(minizip_SOURCES) $(minizip_LDADD) -o minizip
  
  test:	miniunz minizip

@rm -f test.*

Or?


Hi Ross, Richard

Back from vacation? :)

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169836): 
https://lists.openembedded.org/g/openembedded-core/message/169836
Mute This Topic: https://lists.openembedded.org/mt/92398812/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] [PATCH v2 1/2] zlib: split SRC_URI into inc file

2022-08-08 Thread Sean Nyekjaer
On Mon, Jul 18, 2022 at 04:12:25PM +, Ross Burton wrote:
> This still seems overkill.  You can build minizip from inside the zlib recipe 
> by fixing the minizip Makefile (fix posted to 
> https://github.com/madler/zlib/pull/681) and then adding one line to 
> do_compile:
> 
> oe_runmake -C contrib/minizip CC="${CC}" CFLAGS="${CFLAGS}" 
> LDFLAGS="${LDFLAGS}"
> 
> A corresponding manual do_install too, obviously.
> 
> Ross
>

Hi Ross,

Thanks for the patch :)

However this will create a minizip that is statically linked with zlib :(

Guess we need to add some more to the Makefile (or just use the
autotools generated one)

Something along this:

diff --git a/contrib/minizip/Makefile b/contrib/minizip/Makefile
index 4a0465f..cf9e79a 100644
--- a/contrib/minizip/Makefile
+++ b/contrib/minizip/Makefile
@@ -1,13 +1,26 @@
 CPPFLAGS = -I../..
 
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
-ZIP_OBJS = minizip.o zip.o   ioapi.o ../../libz.a
+libminizip_so_SOURCES = \
+   ioapi.c \
+   mztools.c \
+   unzip.c \
+   zip.c
 
-all: miniunz minizip
+miniunzip_SOURCES = miniunz.c
+miniunzip_LDADD = libminizip.so
+minizip_SOURCES = minizip.c
+minizip_LDADD = libminizip.so -lz
 
-miniunz:  $(UNZ_OBJS)
+all: libminizip.so miniunz minizip
 
-minizip:  $(ZIP_OBJS)
+libminizip.so:
+   $(CC) -fPIC -shared $(libminizip_so_SOURCES) -o libminizip.so
+
+miniunz: libminizip.so
+   $(CC) $(miniunzip_SOURCES) $(miniounzip_LDADD) -o miniunz
+
+minizip: libminizip.so
+   $(CC) $(minizip_SOURCES) $(minizip_LDADD) -o minizip
 
 test:  miniunz minizip
@rm -f test.*

Or?

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169079): 
https://lists.openembedded.org/g/openembedded-core/message/169079
Mute This Topic: https://lists.openembedded.org/mt/92398812/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 2/2] zlib: minizip: add recipe

2022-07-15 Thread Sean Nyekjaer
Add the minizip library for use as a dependency.
zlib doesn't support vanilla autotools, but atleast this minizip does.
minizip does depend on zlib, so combining these recipes turns out to be
a quite hacky approach.

Signed-off-by: Sean Nyekjaer 
---
Should we keep Denys Dmytriyenko  as maintainer here?
It's after all the same artifact that is used for both recipes?

 meta/conf/distro/include/maintainers.inc |  1 +
 meta/recipes-core/zlib/minizip_1.2.12.bb | 15 +++
 2 files changed, 16 insertions(+)
 create mode 100644 meta/recipes-core/zlib/minizip_1.2.12.bb

diff --git a/meta/conf/distro/include/maintainers.inc 
b/meta/conf/distro/include/maintainers.inc
index a69af3d780..1db5cadbcf 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -506,6 +506,7 @@ RECIPE_MAINTAINER:pn-meta-world-pkgdata = "Richard Purdie 
http://zlib.net/";
+SECTION = "libs"
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = 
"file://MiniZip64_info.txt;beginline=53;endline=73;md5=02090b3a3511ed8a910b77dae6906cea"
+
+include zlib.inc
+
+inherit autotools
+
+DEPENDS = "zlib"
+
+S = "${WORKDIR}/zlib-${PV}/contrib/minizip"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.37.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168060): 
https://lists.openembedded.org/g/openembedded-core/message/168060
Mute This Topic: https://lists.openembedded.org/mt/92398813/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH v2 1/2] zlib: split SRC_URI into inc file

2022-07-15 Thread Sean Nyekjaer
This is done in preparation for adding packages from the zlib contrib
directory.
Unfortunatly it's not possible to add these via pkgconfig.

Signed-off-by: Sean Nyekjaer 
---
With this we are maintaining the same verison number for both zlib and
minizip in the recipe name. Would it be better to have it in the inc
file?

PV = "1.2.12" ?

 meta/recipes-core/zlib/zlib.inc   |  4 
 meta/recipes-core/zlib/zlib_1.2.12.bb | 18 +-
 2 files changed, 13 insertions(+), 9 deletions(-)
 create mode 100644 meta/recipes-core/zlib/zlib.inc

diff --git a/meta/recipes-core/zlib/zlib.inc b/meta/recipes-core/zlib/zlib.inc
new file mode 100644
index 00..b607a82312
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib.inc
@@ -0,0 +1,4 @@
+SRC_URI = "https://zlib.net/zlib-${PV}.tar.xz";
+UPSTREAM_CHECK_URI = "http://zlib.net/";
+
+SRC_URI[sha256sum] = 
"7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18"
diff --git a/meta/recipes-core/zlib/zlib_1.2.12.bb 
b/meta/recipes-core/zlib/zlib_1.2.12.bb
index e921703137..ba986d8cf2 100644
--- a/meta/recipes-core/zlib/zlib_1.2.12.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.12.bb
@@ -6,16 +6,16 @@ SECTION = "libs"
 LICENSE = "Zlib"
 LIC_FILES_CHKSUM = 
"file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef63bc555f7aa6c0"
 
-SRC_URI = "https://zlib.net/${BP}.tar.xz \
-   file://cc.patch \
-   file://ldflags-tests.patch \
-   file://0001-configure-Pass-LDFLAGS-to-link-tests.patch \
-   file://run-ptest \
-   
file://0001-Correct-incorrect-inputs-provided-to-the-CRC-functio.patch \
-   "
-UPSTREAM_CHECK_URI = "http://zlib.net/";
+include zlib.inc
+
+SRC_URI += "file://cc.patch \
+file://ldflags-tests.patch \
+file://0001-configure-Pass-LDFLAGS-to-link-tests.patch \
+file://run-ptest \
+
file://0001-Correct-incorrect-inputs-provided-to-the-CRC-functio.patch \
+"
 
-SRC_URI[sha256sum] = 
"7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18"
+UPSTREAM_CHECK_URI = "http://zlib.net/";
 
 CFLAGS += "-D_REENTRANT"
 
-- 
2.37.0


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168059): 
https://lists.openembedded.org/g/openembedded-core/message/168059
Mute This Topic: https://lists.openembedded.org/mt/92398812/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] [PATCH 1/2] zlib: split src_uri into inc file

2022-07-11 Thread Sean Nyekjaer
On Mon, Jul 11, 2022 at 08:29:24PM +0100, Khem Raj wrote:
> On Mon, Jul 11, 2022 at 8:27 PM Sean Nyekjaer  wrote:
> 
> > On Mon, Jul 11, 2022 at 07:07:38PM +0100, Khem Raj wrote:
> > > We are in process of merging the inc files can you cite reasons why we
> > want
> > > to split it
> > >
> >
> > @Khem:
> > Inside the zlib artifact resides a contrib directory that contains more
> > libs, one of them minizip are we using in our project.
> >
> 
> Is it possible to use packageconfig for enabling this
> 
> 

No it doesn't look like it :(

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167882): 
https://lists.openembedded.org/g/openembedded-core/message/167882
Mute This Topic: https://lists.openembedded.org/mt/92305639/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] [PATCH 2/2] zlib: minizip: add recipe

2022-07-11 Thread Sean Nyekjaer
On Mon, Jul 11, 2022 at 09:58:38AM +0100, Richard Purdie wrote:
> On Mon, 2022-07-11 at 10:53 +0200, Sean Nyekjaer wrote:
> > On Mon, Jul 11, 2022 at 09:46:58AM +0100, Richard Purdie wrote:
> > > On Mon, 2022-07-11 at 10:33 +0200, Sean Nyekjaer wrote:
> > > > Signed-off-by: Sean Nyekjaer 
> > > > ---
> > > >  meta/recipes-core/zlib/minizip_1.2.12.bb | 15 +++
> > > >  1 file changed, 15 insertions(+)
> > > >  create mode 100644 meta/recipes-core/zlib/minizip_1.2.12.bb
> > > 
> > > I can see what this does, but why? Who would want this and why? There
> > > is no detail in the commit messages. Also no maintainers entry which
> > > will break QA checks.
> > > 
> > > Cheers,
> > > 
> > > Richard
> > > 
> > > 
> > 
> > Hi Richard,
> > 
> > We have some software that depends on minizip.
> > I don't know if an extra package zlib-minizip or this was the prefered
> > way to add it?
> 
> I think an extra package on the existing recipe may be simpler and
> easier maintenance.
> 
> Commit messages do need a bit more information in them too, it isn't
> enough to say what something does, it needs to say why.
> 
> Cheers,
> 
> Richard

I think it will be quite hacky to do it as one recipe, as zlib and
minizip is to seperate autotools projects and zlib isn't even compatible
with the autotools class.
I could something with addtask but I don't think it will be very
readable.

Any ideas?

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167881): 
https://lists.openembedded.org/g/openembedded-core/message/167881
Mute This Topic: https://lists.openembedded.org/mt/92305640/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] [PATCH 1/2] zlib: split src_uri into inc file

2022-07-11 Thread Sean Nyekjaer
On Mon, Jul 11, 2022 at 07:07:38PM +0100, Khem Raj wrote:
> We are in process of merging the inc files can you cite reasons why we want
> to split it
> 

@Khem:
Inside the zlib artifact resides a contrib directory that contains more
libs, one of them minizip are we using in our project.

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167879): 
https://lists.openembedded.org/g/openembedded-core/message/167879
Mute This Topic: https://lists.openembedded.org/mt/92305639/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] [PATCH 2/2] zlib: minizip: add recipe

2022-07-11 Thread Sean Nyekjaer
On Mon, Jul 11, 2022 at 09:46:58AM +0100, Richard Purdie wrote:
> On Mon, 2022-07-11 at 10:33 +0200, Sean Nyekjaer wrote:
> > Signed-off-by: Sean Nyekjaer 
> > ---
> >  meta/recipes-core/zlib/minizip_1.2.12.bb | 15 +++
> >  1 file changed, 15 insertions(+)
> >  create mode 100644 meta/recipes-core/zlib/minizip_1.2.12.bb
> 
> I can see what this does, but why? Who would want this and why? There
> is no detail in the commit messages. Also no maintainers entry which
> will break QA checks.
> 
> Cheers,
> 
> Richard
> 
> 

Hi Richard,

We have some software that depends on minizip.
I don't know if an extra package zlib-minizip or this was the prefered
way to add it?

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167864): 
https://lists.openembedded.org/g/openembedded-core/message/167864
Mute This Topic: https://lists.openembedded.org/mt/92305640/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 1/2] zlib: split src_uri into inc file

2022-07-11 Thread Sean Nyekjaer
Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-core/zlib/zlib.inc   |  4 
 meta/recipes-core/zlib/zlib_1.2.12.bb | 18 +-
 2 files changed, 13 insertions(+), 9 deletions(-)
 create mode 100644 meta/recipes-core/zlib/zlib.inc

diff --git a/meta/recipes-core/zlib/zlib.inc b/meta/recipes-core/zlib/zlib.inc
new file mode 100644
index 00..2bcc32071a
--- /dev/null
+++ b/meta/recipes-core/zlib/zlib.inc
@@ -0,0 +1,4 @@
+SRC_URI = "https://zlib.net/${BP}.tar.xz";
+UPSTREAM_CHECK_URI = "http://zlib.net/";
+
+SRC_URI[sha256sum] = 
"7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18"
diff --git a/meta/recipes-core/zlib/zlib_1.2.12.bb 
b/meta/recipes-core/zlib/zlib_1.2.12.bb
index e921703137..ba986d8cf2 100644
--- a/meta/recipes-core/zlib/zlib_1.2.12.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.12.bb
@@ -6,16 +6,16 @@ SECTION = "libs"
 LICENSE = "Zlib"
 LIC_FILES_CHKSUM = 
"file://zlib.h;beginline=6;endline=23;md5=5377232268e952e9ef63bc555f7aa6c0"
 
-SRC_URI = "https://zlib.net/${BP}.tar.xz \
-   file://cc.patch \
-   file://ldflags-tests.patch \
-   file://0001-configure-Pass-LDFLAGS-to-link-tests.patch \
-   file://run-ptest \
-   
file://0001-Correct-incorrect-inputs-provided-to-the-CRC-functio.patch \
-   "
-UPSTREAM_CHECK_URI = "http://zlib.net/";
+include zlib.inc
+
+SRC_URI += "file://cc.patch \
+file://ldflags-tests.patch \
+file://0001-configure-Pass-LDFLAGS-to-link-tests.patch \
+file://run-ptest \
+
file://0001-Correct-incorrect-inputs-provided-to-the-CRC-functio.patch \
+"
 
-SRC_URI[sha256sum] = 
"7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18"
+UPSTREAM_CHECK_URI = "http://zlib.net/";
 
 CFLAGS += "-D_REENTRANT"
 
-- 
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167861): 
https://lists.openembedded.org/g/openembedded-core/message/167861
Mute This Topic: https://lists.openembedded.org/mt/92305639/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core] [PATCH 2/2] zlib: minizip: add recipe

2022-07-11 Thread Sean Nyekjaer
Signed-off-by: Sean Nyekjaer 
---
 meta/recipes-core/zlib/minizip_1.2.12.bb | 15 +++
 1 file changed, 15 insertions(+)
 create mode 100644 meta/recipes-core/zlib/minizip_1.2.12.bb

diff --git a/meta/recipes-core/zlib/minizip_1.2.12.bb 
b/meta/recipes-core/zlib/minizip_1.2.12.bb
new file mode 100644
index 00..548bb8c62b
--- /dev/null
+++ b/meta/recipes-core/zlib/minizip_1.2.12.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Minimal zip library using deflate from zlib"
+HOMEPAGE = "http://zlib.net/";
+SECTION = "libs"
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = 
"file://MiniZip64_info.txt;beginline=53;endline=73;md5=02090b3a3511ed8a910b77dae6906cea"
+
+include zlib.inc
+
+inherit autotools
+
+DEPENDS = "zlib"
+
+S = "${WORKDIR}/zlib-${PV}/contrib/minizip"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.36.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167862): 
https://lists.openembedded.org/g/openembedded-core/message/167862
Mute This Topic: https://lists.openembedded.org/mt/92305640/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][PATCH v3 1/2] cve-check: add json format

2022-06-27 Thread Sean Nyekjaer



On 21/06/2022 15.06, Marta Rybczynska wrote:



On Tue, Jun 21, 2022 at 12:45 PM Sean Nyekjaer <mailto:s...@geanix.com>> wrote:




On 29/03/2022 14.54, Marta Rybczynska wrote:
 > Add an option to output the CVE check in a JSON-based format.
 > This format is easier to parse in software than the original
 > text-based one and allows post-processing by other tools.
 >
 > Output formats are now handed by CVE_CHECK_FORMAT_TEXT and
 > CVE_CHECK_FORMAT_JSON. Both of them are enabled by default.
 >
 > The JSON output format gets generated in a similar way to the
 > text format with the exception of the manifest: appending to
 > JSON arrays requires parsing the file. Because of that we
 > first write JSON fragments and then assemble them in one pass
 > at the end.
 >
 > Signed-off-by: Marta Rybczynska mailto:marta.rybczyn...@huawei.com>>
 >
 > ---

Hi Marta,

When upgrading from honister to kirkstone, this patch was included.

We have INHERIT += "cve" in our distro conf.
When doing a build from scratch it works fine with the cve json output,
but when doing an incremental build it will throw:
         bb.error("Error adding the same package twice")

I have tried modifying that line to:
         bb.error("Error adding the same package twice. Offending
package: %s" %
product["name"])

It looks like it tries to add all packages again...

I have just disabled json output for now.
CVE_CHECK_FORMAT_JSON = "0"


Dear Sean,
Thank you for the report. Could you please describe your configuration a 
little bit, especially, which layers do you use? Do you do an image 
build or a world build, or maybe a multiple image build?


I'm trying to imagine what is happening in your case, will try to reproduce.

Kind regards,
Marta


Hi Marta,

We are using:
meta-clang
meta-intel
meta-openembedded
meta-rauc
meta-security
meta-virtualization
poky

We are building an image :)

I can try to see if I can reproduce with a core-minimal-image, but it 
will have to wait until after summer...


/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167313): 
https://lists.openembedded.org/g/openembedded-core/message/167313
Mute This Topic: https://lists.openembedded.org/mt/90107274/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][PATCH v3 1/2] cve-check: add json format

2022-06-21 Thread Sean Nyekjaer



On 29/03/2022 14.54, Marta Rybczynska wrote:

Add an option to output the CVE check in a JSON-based format.
This format is easier to parse in software than the original
text-based one and allows post-processing by other tools.

Output formats are now handed by CVE_CHECK_FORMAT_TEXT and
CVE_CHECK_FORMAT_JSON. Both of them are enabled by default.

The JSON output format gets generated in a similar way to the
text format with the exception of the manifest: appending to
JSON arrays requires parsing the file. Because of that we
first write JSON fragments and then assemble them in one pass
at the end.

Signed-off-by: Marta Rybczynska 

---


Hi Marta,

When upgrading from honister to kirkstone, this patch was included.

We have INHERIT += "cve" in our distro conf.
When doing a build from scratch it works fine with the cve json output, 
but when doing an incremental build it will throw:

bb.error("Error adding the same package twice")

I have tried modifying that line to:
	bb.error("Error adding the same package twice. Offending package: %s" % 
product["name"])


It looks like it tries to add all packages again...

I have just disabled json output for now.
CVE_CHECK_FORMAT_JSON = "0"

Br,
/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#167144): 
https://lists.openembedded.org/g/openembedded-core/message/167144
Mute This Topic: https://lists.openembedded.org/mt/90107274/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] [PATCH 3/3] lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for intercepts

2021-08-24 Thread Sean Nyekjaer
On Tue, Aug 24, 2021 at 08:14:58AM +, Mittal, Anuj wrote:
> Hello,
> 
> On Mon, 2021-08-23 at 14:31 +0200, Sean Nyekjaer wrote:
> > On Thu, May 06, 2021 at 08:51:00AM +0100, Richard Purdie wrote:
> > > If the scripts/postinst-intercepts is owned by root/root then the
> > > copyfile() calls
> > > will fail due to chown issues. We don't care about ownership of these
> > > files so
> > > use shutil.copy() instead which won't perform any chown.
> > > 
> > > Signed-off-by: Richard Purdie 
> > 
> > Anuj will you backport this to gatesgarth?
> 
> gatesgarth isn't being maintained any more.
> 
> https://wiki.yoctoproject.org/wiki/Releases
> 

Hi Anuj,

I know, but gatesgarth is left in a broken state because of
edc8051bc0 image: Add directories to PSEUDO_IGNORE_PATHS
was merged ;)

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155213): 
https://lists.openembedded.org/g/openembedded-core/message/155213
Mute This Topic: https://lists.openembedded.org/mt/82625316/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] [PATCH 3/3] lib/package_manager: Use shutil.copy instead of bb.utils.copyfile for intercepts

2021-08-23 Thread Sean Nyekjaer
On Thu, May 06, 2021 at 08:51:00AM +0100, Richard Purdie wrote:
> If the scripts/postinst-intercepts is owned by root/root then the copyfile() 
> calls
> will fail due to chown issues. We don't care about ownership of these files so
> use shutil.copy() instead which won't perform any chown.
> 
> Signed-off-by: Richard Purdie 

Anuj will you backport this to gatesgarth?

/Sean

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155150): 
https://lists.openembedded.org/g/openembedded-core/message/155150
Mute This Topic: https://lists.openembedded.org/mt/82625316/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] [thud][PATCH] Revert "OpkgPM: use --add-ignore-recommends to process BAD_RECOMMENDATIONS"

2019-10-20 Thread Sean Nyekjaer




On 18/10/2019 23.18, akuster808 wrote:

I am not aware of any for thud. IIRC, this commit was a backport request
from the community.

It would be interesting if those who have issues with thud check against
master.

- armin


Hi,

Sorry I was slow to report :)
Was this also an issue on warrior and master?

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


Re: [OE-core] [thud][PATCH v2] libgpg-error: Fix build with gawk 5.x

2019-09-19 Thread Sean Nyekjaer




On 09/09/2019 20.29, Sean Nyekjaer wrote:

Based on poky master, but for version 1.32

Signed-off-by: Sean Nyekjaer 
---
  .../libgpg-error-1.32-gawk5-support.patch | 161 ++
  .../libgpg-error/libgpg-error_1.32.bb |   1 +
  2 files changed, 162 insertions(+)
  create mode 100644 
meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch



Hi Armin

Could we merge this and the one for warrior?

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


[OE-core] [thud][PATCH v2] libgpg-error: Fix build with gawk 5.x

2019-09-09 Thread Sean Nyekjaer
Based on poky master, but for version 1.32

Signed-off-by: Sean Nyekjaer 
---
 .../libgpg-error-1.32-gawk5-support.patch | 161 ++
 .../libgpg-error/libgpg-error_1.32.bb |   1 +
 2 files changed, 162 insertions(+)
 create mode 100644 
meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch

diff --git 
a/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch
 
b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch
new file mode 100644
index 00..dc3d558e24
--- /dev/null
+++ 
b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch
@@ -0,0 +1,161 @@
+Upstream-Status: Backport [https://dev.gnupg.org/T4459]
+Signed-off-by: Sean Nyekjaer 
+
+From 37069826e497d6af01e3e48fe5d2220ae7f85449 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka 
+Date: Mon, 15 Apr 2019 15:10:44 +0900
+Subject: [PATCH] awk: Prepare for Gawk 5.0.
+
+* src/Makefile.am: Use pkg_namespace (instead of namespace).
+* src/mkerrnos.awk: Likewise.
+* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
+* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
+
+--
+
+In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
+which only allows escaping specific characters.
+
+GnuPG-bug-id: 4459
+Reported-by: Marius Schamschula
+Signed-off-by: NIIBE Yutaka 
+---
+ lang/cl/mkerrcodes.awk |  2 +-
+ src/Makefile.am|  2 +-
+ src/mkerrcodes.awk |  2 +-
+ src/mkerrcodes1.awk|  2 +-
+ src/mkerrcodes2.awk|  2 +-
+ src/mkerrnos.awk   |  2 +-
+ src/mkstrtable.awk | 10 +-
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
+index ae29043..9a1fc18 100644
+--- a/lang/cl/mkerrcodes.awk
 b/lang/cl/mkerrcodes.awk
+@@ -122,7 +122,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 42998e4..0ceac9f 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -281,7 +281,7 @@ code-from-errno.h: mkerrcodes Makefile
+ 
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+   $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+-  -v prefix=GPG_ERR_ -v namespace=errnos_ \
++  -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+   $(srcdir)/errnos.in >$@
+ 
+ 
+diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
+index 46d436c..e9c857c 100644
+--- a/src/mkerrcodes.awk
 b/src/mkerrcodes.awk
+@@ -85,7 +85,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
+index a771a73..4578e29 100644
+--- a/src/mkerrcodes1.awk
 b/src/mkerrcodes1.awk
+@@ -81,7 +81,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
+index ea58503..188f7a4 100644
+--- a/src/mkerrcodes2.awk
 b/src/mkerrcodes2.awk
+@@ -91,7 +91,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
+index f79df66..15b1aad 100644
+--- a/src/mkerrnos.awk
 b/src/mkerrnos.awk
+@@ -83,7 +83,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
+index c9de9c1..285e45f 100644
+--- a/src/mkstrtable.awk
 b/src/mkstrtable.awk
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+ 
+ BEGIN {
+@@ -102,7 +102,7 @@ header {
+   print "/* The purpose of this complex string table is to produce";
+   print "   optimal code with a minimum of relocations.  */";
+   print "";
+-  print "static const char " namespace "msgstr[] = ";
++  print "static const char " pkg_namespace "msgstr[] = ";
+   header = 0;
+ }
+   else
+@@ -110,7 +110,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+@@ -15

[OE-core] [warrior][PATCH v2] libgpg-error: Fix build with gawk 5.x

2019-09-09 Thread Sean Nyekjaer
Based on poky master, but for version 1.35

Signed-off-by: Sean Nyekjaer 
---
 .../libgpg-error-1.35-gawk5-support.patch | 161 ++
 .../libgpg-error/libgpg-error_1.35.bb |   1 +
 2 files changed, 162 insertions(+)
 create mode 100644 
meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch

diff --git 
a/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch
 
b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch
new file mode 100644
index 00..dc3d558e24
--- /dev/null
+++ 
b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch
@@ -0,0 +1,161 @@
+Upstream-Status: Backport [https://dev.gnupg.org/T4459]
+Signed-off-by: Sean Nyekjaer 
+
+From 37069826e497d6af01e3e48fe5d2220ae7f85449 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka 
+Date: Mon, 15 Apr 2019 15:10:44 +0900
+Subject: [PATCH] awk: Prepare for Gawk 5.0.
+
+* src/Makefile.am: Use pkg_namespace (instead of namespace).
+* src/mkerrnos.awk: Likewise.
+* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
+* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
+
+--
+
+In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
+which only allows escaping specific characters.
+
+GnuPG-bug-id: 4459
+Reported-by: Marius Schamschula
+Signed-off-by: NIIBE Yutaka 
+---
+ lang/cl/mkerrcodes.awk |  2 +-
+ src/Makefile.am|  2 +-
+ src/mkerrcodes.awk |  2 +-
+ src/mkerrcodes1.awk|  2 +-
+ src/mkerrcodes2.awk|  2 +-
+ src/mkerrnos.awk   |  2 +-
+ src/mkstrtable.awk | 10 +-
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
+index ae29043..9a1fc18 100644
+--- a/lang/cl/mkerrcodes.awk
 b/lang/cl/mkerrcodes.awk
+@@ -122,7 +122,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 42998e4..0ceac9f 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -281,7 +281,7 @@ code-from-errno.h: mkerrcodes Makefile
+ 
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+   $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+-  -v prefix=GPG_ERR_ -v namespace=errnos_ \
++  -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+   $(srcdir)/errnos.in >$@
+ 
+ 
+diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
+index 46d436c..e9c857c 100644
+--- a/src/mkerrcodes.awk
 b/src/mkerrcodes.awk
+@@ -85,7 +85,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
+index a771a73..4578e29 100644
+--- a/src/mkerrcodes1.awk
 b/src/mkerrcodes1.awk
+@@ -81,7 +81,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
+index ea58503..188f7a4 100644
+--- a/src/mkerrcodes2.awk
 b/src/mkerrcodes2.awk
+@@ -91,7 +91,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
+index f79df66..15b1aad 100644
+--- a/src/mkerrnos.awk
 b/src/mkerrnos.awk
+@@ -83,7 +83,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
+index c9de9c1..285e45f 100644
+--- a/src/mkstrtable.awk
 b/src/mkstrtable.awk
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+ 
+ BEGIN {
+@@ -102,7 +102,7 @@ header {
+   print "/* The purpose of this complex string table is to produce";
+   print "   optimal code with a minimum of relocations.  */";
+   print "";
+-  print "static const char " namespace "msgstr[] = ";
++  print "static const char " pkg_namespace "msgstr[] = ";
+   header = 0;
+ }
+   else
+@@ -110,7 +110,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+@@ -15

[OE-core] [thud][PATCH] libgpg-error: Fix build with gawk 5.x

2019-09-08 Thread Sean Nyekjaer
Based on poky master, but for version 1.32

Signed-off-by: Sean Nyekjaer 
---
 .../libgpg-error-1.32-gawk5-support.patch | 160 ++
 .../libgpg-error/libgpg-error_1.32.bb |   1 +
 2 files changed, 161 insertions(+)
 create mode 100644 
meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch

diff --git 
a/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch
 
b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch
new file mode 100644
index 00..bbb38a60ca
--- /dev/null
+++ 
b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.32-gawk5-support.patch
@@ -0,0 +1,160 @@
+From 37069826e497d6af01e3e48fe5d2220ae7f85449 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka 
+Date: Mon, 15 Apr 2019 15:10:44 +0900
+Subject: [PATCH] awk: Prepare for Gawk 5.0.
+
+* src/Makefile.am: Use pkg_namespace (instead of namespace).
+* src/mkerrnos.awk: Likewise.
+* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
+* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
+
+--
+
+In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
+which only allows escaping specific characters.
+
+GnuPG-bug-id: 4459
+Reported-by: Marius Schamschula
+Signed-off-by: NIIBE Yutaka 
+Upstream-Status: Backport [https://dev.gnupg.org/T4459]
+(cherry picked from commit 7865041c77f4f7005282f10f9bb19072fbdf)
+---
+ lang/cl/mkerrcodes.awk |  2 +-
+ src/Makefile.am|  2 +-
+ src/mkerrcodes.awk |  2 +-
+ src/mkerrcodes1.awk|  2 +-
+ src/mkerrcodes2.awk|  2 +-
+ src/mkerrnos.awk   |  2 +-
+ src/mkstrtable.awk | 10 +-
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
+index ae29043..9a1fc18 100644
+--- a/lang/cl/mkerrcodes.awk
 b/lang/cl/mkerrcodes.awk
+@@ -122,7 +122,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 42998e4..0ceac9f 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -281,7 +281,7 @@ code-from-errno.h: mkerrcodes Makefile
+ 
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+   $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+-  -v prefix=GPG_ERR_ -v namespace=errnos_ \
++  -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+   $(srcdir)/errnos.in >$@
+ 
+ 
+diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
+index 46d436c..e9c857c 100644
+--- a/src/mkerrcodes.awk
 b/src/mkerrcodes.awk
+@@ -85,7 +85,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
+index a771a73..4578e29 100644
+--- a/src/mkerrcodes1.awk
 b/src/mkerrcodes1.awk
+@@ -81,7 +81,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
+index ea58503..188f7a4 100644
+--- a/src/mkerrcodes2.awk
 b/src/mkerrcodes2.awk
+@@ -91,7 +91,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
+index f79df66..15b1aad 100644
+--- a/src/mkerrnos.awk
 b/src/mkerrnos.awk
+@@ -83,7 +83,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
+index c9de9c1..285e45f 100644
+--- a/src/mkstrtable.awk
 b/src/mkstrtable.awk
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+ 
+ BEGIN {
+@@ -102,7 +102,7 @@ header {
+   print "/* The purpose of this complex string table is to produce";
+   print "   optimal code with a minimum of relocations.  */";
+   print "";
+-  print "static const char " namespace "msgstr[] = ";
++  print "static const char " pkg_namespace "msgstr[] = ";
+   header = 0;
+ }
+   else
+@@ -110,7 +110,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters

[OE-core] [warrior][PATCH] libgpg-error: Fix build with gawk 5.x

2019-09-08 Thread Sean Nyekjaer
Based on poky master, but for version 1.35

Signed-off-by: Sean Nyekjaer 
---
 .../libgpg-error-1.35-gawk5-support.patch | 160 ++
 .../libgpg-error/libgpg-error_1.35.bb |   1 +
 2 files changed, 161 insertions(+)
 create mode 100644 
meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch

diff --git 
a/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch
 
b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch
new file mode 100644
index 00..bbb38a60ca
--- /dev/null
+++ 
b/meta/recipes-support/libgpg-error/libgpg-error/libgpg-error-1.35-gawk5-support.patch
@@ -0,0 +1,160 @@
+From 37069826e497d6af01e3e48fe5d2220ae7f85449 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka 
+Date: Mon, 15 Apr 2019 15:10:44 +0900
+Subject: [PATCH] awk: Prepare for Gawk 5.0.
+
+* src/Makefile.am: Use pkg_namespace (instead of namespace).
+* src/mkerrnos.awk: Likewise.
+* lang/cl/mkerrcodes.awk: Don't escape # in regexp.
+* src/mkerrcodes.awk, src/mkerrcodes1.awk, src/mkerrcodes2.awk: Ditto.
+
+--
+
+In Gawk 5.0, regexp routines are replaced by Gnulib implementation,
+which only allows escaping specific characters.
+
+GnuPG-bug-id: 4459
+Reported-by: Marius Schamschula
+Signed-off-by: NIIBE Yutaka 
+Upstream-Status: Backport [https://dev.gnupg.org/T4459]
+(cherry picked from commit 7865041c77f4f7005282f10f9bb19072fbdf)
+---
+ lang/cl/mkerrcodes.awk |  2 +-
+ src/Makefile.am|  2 +-
+ src/mkerrcodes.awk |  2 +-
+ src/mkerrcodes1.awk|  2 +-
+ src/mkerrcodes2.awk|  2 +-
+ src/mkerrnos.awk   |  2 +-
+ src/mkstrtable.awk | 10 +-
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/lang/cl/mkerrcodes.awk b/lang/cl/mkerrcodes.awk
+index ae29043..9a1fc18 100644
+--- a/lang/cl/mkerrcodes.awk
 b/lang/cl/mkerrcodes.awk
+@@ -122,7 +122,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 42998e4..0ceac9f 100644
+--- a/src/Makefile.am
 b/src/Makefile.am
+@@ -281,7 +281,7 @@ code-from-errno.h: mkerrcodes Makefile
+ 
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+   $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+-  -v prefix=GPG_ERR_ -v namespace=errnos_ \
++  -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+   $(srcdir)/errnos.in >$@
+ 
+ 
+diff --git a/src/mkerrcodes.awk b/src/mkerrcodes.awk
+index 46d436c..e9c857c 100644
+--- a/src/mkerrcodes.awk
 b/src/mkerrcodes.awk
+@@ -85,7 +85,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrcodes1.awk b/src/mkerrcodes1.awk
+index a771a73..4578e29 100644
+--- a/src/mkerrcodes1.awk
 b/src/mkerrcodes1.awk
+@@ -81,7 +81,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrcodes2.awk b/src/mkerrcodes2.awk
+index ea58503..188f7a4 100644
+--- a/src/mkerrcodes2.awk
 b/src/mkerrcodes2.awk
+@@ -91,7 +91,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkerrnos.awk b/src/mkerrnos.awk
+index f79df66..15b1aad 100644
+--- a/src/mkerrnos.awk
 b/src/mkerrnos.awk
+@@ -83,7 +83,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+ 
+   if (/^$/)
+diff --git a/src/mkstrtable.awk b/src/mkstrtable.awk
+index c9de9c1..285e45f 100644
+--- a/src/mkstrtable.awk
 b/src/mkstrtable.awk
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+ 
+ BEGIN {
+@@ -102,7 +102,7 @@ header {
+   print "/* The purpose of this complex string table is to produce";
+   print "   optimal code with a minimum of relocations.  */";
+   print "";
+-  print "static const char " namespace "msgstr[] = ";
++  print "static const char " pkg_namespace "msgstr[] = ";
+   header = 0;
+ }
+   else
+@@ -110,7 +110,7 @@ header {
+ }
+ 
+ !header {
+-  sub (/\#.+/, "");
++  sub (/#.+/, "");
+   sub (/[ ]+$/, ""); # Strip trailing space and tab characters

Re: [OE-core] [PATCH] libgpg-error: Fix build with gawk 5.x

2019-09-05 Thread Sean Nyekjaer




On 04/09/2019 01.50, Khem Raj wrote:

Can we cherry-pick this patch to warrior and thud, please ?


Hi

For thud that uses a older version af libgpg-error, and the patch 
doesn't apply :-)

Should I update the patch for thud and resend?

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


Re: [OE-core] [thud][PATCH] target-sdk-provides-dummy: Extend to -dev and -src packages

2019-03-19 Thread Sean Nyekjaer

kind ping

BR
/Sean

On 09/03/2019 19.50, Max Krummenacher wrote:

From: Richard Purdie 

This avoids errors when running populate_sdk under opkg:

  * Problem 1/1:
  *   - package busybox-dev-1.30.1-r0.core2-64 requires busybox = 1.30.1-r0, 
but none of the providers can be installed
  *
  * Solution 1:
  *   - allow deinstallation of 
target-sdk-provides-dummy-1.0-r0.sdk-provides-dummy-target

  * Solution 2:
  *   - do not ask to install a package providing busybox-dev

Signed-off-by: Richard Purdie 
(cherry picked from commit 33d2cde3be4d25389cbea07064ffbc7b2f74273e)
---
  meta/recipes-core/meta/target-sdk-provides-dummy.bb | 10 ++
  1 file changed, 10 insertions(+)

diff --git a/meta/recipes-core/meta/target-sdk-provides-dummy.bb 
b/meta/recipes-core/meta/target-sdk-provides-dummy.bb
index edf07c4a23..e7bf2ac632 100644
--- a/meta/recipes-core/meta/target-sdk-provides-dummy.bb
+++ b/meta/recipes-core/meta/target-sdk-provides-dummy.bb
@@ -2,9 +2,17 @@ DUMMYARCH = "sdk-provides-dummy-target"
  
  DUMMYPROVIDES = "\

  busybox \
+busybox-dev \
+busybox-src \
  coreutils \
+coreutils-dev \
+coreutils-src \
  bash \
+bash-dev \
+bash-src \
  perl \
+perl-dev \
+perl-src \
  perl-module-re \
  perl-module-strict \
  perl-module-vars \
@@ -33,6 +41,8 @@ DUMMYPROVIDES = "\
  /usr/bin/env \
  /usr/bin/perl \
  pkgconfig \
+pkgconfig-dev \
+pkgconfig-src \
  "
  
  require dummy-sdk-package.inc




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


[OE-core] [PATCH] site/common-linux: coreutils: get the uptime program to work

2018-02-12 Thread Sean Nyekjaer
coreutils configure script needs to know whether /proc/uptime is
available, but this is not possible in a cross-compilation
context. This leads to an uptime program that fails to work on the
target, as it has been compiled without /proc/uptime reading support.

This commit fixes that by telling coreutils at configure time that
/proc/uptime will be available on the target (which seems to be a
reasonable assumption on Linux systems).

This commit is made with great inspiration from Thomas Petazzoni's
patch to buildroot to fix the same issue.

Signed-off-by: Sean Nyekjaer 
---
 meta/site/common-linux | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/site/common-linux b/meta/site/common-linux
index 2958716..71ec961 100644
--- a/meta/site/common-linux
+++ b/meta/site/common-linux
@@ -48,6 +48,7 @@ hw_cv_func_vsnprintf_c99=${hw_cv_func_vsnprintf_c99=yes}
 
 # coreutils
 gl_cv_func_fstatat_zero_flag=${gl_cv_func_fstatat_zero_flag=yes}
+gl_cv_have_proc_uptime=${gl_cv_have_proc_uptime=yes}
 
 # mysql
 ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=yes}
-- 
2.7.4

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