Skip to contentSkip to conversation

zchunk: upgrade to 1.2.3

PATCH Superseded Ross Burton 2 participants 9 messages Feb 20, 2023 – Feb 22, 2023

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 zchunk: upgrade to 1.2.3

---
 .../{zchunk_1.2.0.bb => zchunk_1.2.3.bb}       | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
 rename meta-oe/recipes-support/zchunk/{zchunk_1.2.0.bb => zchunk_1.2.3.bb} (52%)
meta-oe/recipes-support/zchunk/zchunk_1.2.3.bb renamed from meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb +10 -8
similarity index 52%
rename from meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb
rename to meta-oe/recipes-support/zchunk/zchunk_1.2.3.bb
index 0baea5032a..760d650de6 100644
@@ -6,17 +6,19 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=daf6e68539f564601a5a5869c31e5242"
 
 SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https;branch=main"
 
-SRCREV = "dd6a30a1e4e8b738b0cafc682f3c00e7706134e5"
+SRCREV = "f16dbeb0831eb37a9397356570327abb97860875"
 S = "${WORKDIR}/git"
 
-DEPENDS = "\
-    curl \
-    zstd \
-    "
-
+DEPENDS = "zstd"
 DEPENDS:append:libc-musl = " argp-standalone"
-LDFLAGS:append:libc-musl = " -largp"
 
-inherit meson pkgconfig
+inherit meson pkgconfig lib_package
+
+PACKAGECONFIG ??= "openssl zckdl"
+
+# zckdl gets packaged into zchunk-bin
+PACKAGECONFIG[zckdl] = "-Dwith-curl=enabled,-Dwith-curl=disabled,curl"
+# Use OpenSSL primitives for SHA
+PACKAGECONFIG[openssl] = "-Dwith-openssl=enabled,-Dwith-openssl=disabled,openssl"
 
 BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/8 python3-simpleeval: update patch status

---
 .../recipes-devtools/python/python3-simpleeval/no-build.patch   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-python/recipes-devtools/python/python3-simpleeval/no-build.patch +1 -1
index b090755f8a..8302c3b298 100644
@@ -1,4 +1,4 @@
-Upstream-Status: Submitted [https://github.com/danthedeckie/simpleeval/pull/119]
+Upstream-Status: Backport [https://github.com/danthedeckie/simpleeval/pull/119]
 Signed-off-by: Ross Burton <[email protected]>
 
 From 08bc99211aec32882d5f1c83896eb5d72b9fb125 Mon Sep 17 00:00:00 2001
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/8 nodejs: remove redundant expand=True to getVar()

In reply to Ross Burton

The expand argument defaults to True, so there's no need to specify it.

---
 meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb +6 -6
index 02f1ac5d4a..6431069e9c 100644
@@ -93,17 +93,17 @@ python do_unpack() {
     import shutil
 
     bb.build.exec_func('base_do_unpack', d)
-    shutil.rmtree(d.getVar('S') + '/deps/openssl', True)
+    shutil.rmtree(d.getVar('S') + '/deps/openssl')
     if 'ares' in d.getVar('PACKAGECONFIG'):
-        shutil.rmtree(d.getVar('S') + '/deps/cares', True)
+        shutil.rmtree(d.getVar('S') + '/deps/cares')
     if 'brotli' in d.getVar('PACKAGECONFIG'):
-        shutil.rmtree(d.getVar('S') + '/deps/brotli', True)
+        shutil.rmtree(d.getVar('S') + '/deps/brotli')
     if 'libuv' in d.getVar('PACKAGECONFIG'):
-        shutil.rmtree(d.getVar('S') + '/deps/uv', True)
+        shutil.rmtree(d.getVar('S') + '/deps/uv')
     if 'nghttp2' in d.getVar('PACKAGECONFIG'):
-        shutil.rmtree(d.getVar('S') + '/deps/nghttp2', True)
+        shutil.rmtree(d.getVar('S') + '/deps/nghttp2')
     if 'zlib' in d.getVar('PACKAGECONFIG'):
-        shutil.rmtree(d.getVar('S') + '/deps/zlib', True)
+        shutil.rmtree(d.getVar('S') + '/deps/zlib')
 }
 
 # V8's JIT infrastructure requires binaries such as mksnapshot and
Signature · 1 line
2.34.1
#3 lore raw

PATCH 4/8 nodejs: run configure.py in verbose mode

In reply to Ross Burton

It's useful to know what configure is detecting, so pass --verbose.

---
 meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb +1 -1
index 6431069e9c..e14f1a4d7f 100644
@@ -142,7 +142,7 @@ do_configure () {
     export LD="${CXX}"
     GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
     # $TARGET_ARCH settings don't match --dest-cpu settings
-    python3 configure.py --prefix=${prefix} --cross-compiling \
+    python3 configure.py --verbose --prefix=${prefix} --cross-compiling \
                --shared-openssl \
                --without-dtrace \
                --without-etw \
Signature · 1 line
2.34.1
#4 lore raw

PATCH 5/8 nodejs: use a postfunc to prune source tree

In reply to Ross Burton

Instead of overriding do_unpack entirely and calling into base_do_unpack, use a postfunc. This keeps the prune logic separated neatly.

---
 meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb +2 -2
index e14f1a4d7f..180e170a35 100644
@@ -89,10 +89,9 @@ EXTRA_OEMAKE = "\
     builddir_name=./ \
 "
 
-python do_unpack() {
+python prune_sources() {
     import shutil
 
-    bb.build.exec_func('base_do_unpack', d)
     shutil.rmtree(d.getVar('S') + '/deps/openssl')
     if 'ares' in d.getVar('PACKAGECONFIG'):
         shutil.rmtree(d.getVar('S') + '/deps/cares')
@@ -105,6 +104,7 @@ python do_unpack() {
     if 'zlib' in d.getVar('PACKAGECONFIG'):
         shutil.rmtree(d.getVar('S') + '/deps/zlib')
 }
+do_unpack[postfuncs] += "prune_sources"
 
 # V8's JIT infrastructure requires binaries such as mksnapshot and
 # mkpeephole to be run in the host during the build. However, these
Signature · 1 line
2.34.1
#5 lore raw

PATCH 6/8 nodejs: don't force cross-compilation in native builds

In reply to Ross Burton

By not forcing the cross-compile build logic in native builds the build is a _lot_ faster. Walltime in buildstats-diff on my machine:

nodejs-native do_compile -475.6s -41.2% 1153.4s -> 677.7s

---
 meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb +5 -1
index 180e170a35..2c6db481c6 100644
@@ -137,18 +137,22 @@ addtask create_v8_qemu_wrapper after do_configure before do_compile
 
 LDFLAGS:append:x86 = " -latomic"
 
+CROSS_FLAGS = "--cross-compiling"
+CROSS_FLAGS:class-native = "--no-cross-compiling"
+
 # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
 do_configure () {
     export LD="${CXX}"
     GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
     # $TARGET_ARCH settings don't match --dest-cpu settings
-    python3 configure.py --verbose --prefix=${prefix} --cross-compiling \
+    python3 configure.py --verbose --prefix=${prefix} \
                --shared-openssl \
                --without-dtrace \
                --without-etw \
                --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \
                --dest-os=linux \
                --libdir=${libdir} \
+               ${CROSS_FLAGS} \
                ${ARCHFLAGS} \
                ${PACKAGECONFIG_CONFARGS}
 }
Signature · 1 line
2.34.1
#6 lore raw

PATCH 7/8 nodejs: remove LD assignment

In reply to Ross Burton

The purpose of this appears to have been lost, and the build succeeds without it.

If it is needed, then it should be added to EXTRA_OEMAKE alongside the CC and CXX assignments.

---
 meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb +2 -2
index 2c6db481c6..c95a72fa94 100644
@@ -140,9 +140,10 @@ LDFLAGS:append:x86 = " -latomic"
 CROSS_FLAGS = "--cross-compiling"
 CROSS_FLAGS:class-native = "--no-cross-compiling"
 
+#export LD="${CXX}"
+
 # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi
 do_configure () {
-    export LD="${CXX}"
     GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES
     # $TARGET_ARCH settings don't match --dest-cpu settings
     python3 configure.py --verbose --prefix=${prefix} \
@@ -158,7 +159,6 @@ do_configure () {
 }
 
 do_compile () {
-    export LD="${CXX}"
     install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf
     install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh
     oe_runmake BUILDTYPE=Release
Signature · 1 line
2.34.1
#7 lore raw

PATCH 8/8 nodejs: no need to stage binaries for target

In reply to Ross Burton

Target nodejs doesn't depend on nodejs-native to build anymore, so there is no need to stage these binaries.

---
 meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb | 13 -------------
 1 file changed, 13 deletions(-)
meta-oe/recipes-devtools/nodejs/nodejs_18.12.1.bb +0 -13
index c95a72fa94..0346f54e6f 100644
@@ -174,19 +174,6 @@ do_install_ptest () {
     chown -R root:root ${D}${PTEST_PATH}
 }
 
-BINARIES = " \
-    bytecode_builtins_list_generator \
-    ${@bb.utils.contains('PACKAGECONFIG', 'icu', 'gen-regexp-special-case', '', d)} \
-    node_mksnapshot \
-    torque \
-"
-
-do_install:append:class-native() {
-    # Install the native binaries to provide it within sysroot for the target compilation
-    install -d ${D}${bindir}
-    (cd ${S}/out/Release && install ${BINARIES} ${D}${bindir})
-}
-
 PACKAGES =+ "${PN}-npm"
 FILES:${PN}-npm = "${nonarch_libdir}/node_modules ${bindir}/npm ${bindir}/npx"
 RDEPENDS:${PN}-npm = "bash python3-core python3-shell python3-datetime \
Signature · 1 line
2.34.1
#8 lore raw
In reply to Ross Burton

fails to build on musl/aarch64 see
https://errors.yoctoproject.org/Errors/Details/695672/

Quoted 53 lines · Ross Burton
---
 .../{zchunk_1.2.0.bb => zchunk_1.2.3.bb}       | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
 rename meta-oe/recipes-support/zchunk/{zchunk_1.2.0.bb => zchunk_1.2.3.bb} (52%)
meta-oe/recipes-support/zchunk/zchunk_1.2.3.bb renamed from meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb +10 -9
similarity index 52%
rename from meta-oe/recipes-support/zchunk/zchunk_1.2.0.bb
rename to meta-oe/recipes-support/zchunk/zchunk_1.2.3.bb
index 0baea5032a..760d650de6 100644
@@ -6,17 +6,19 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=daf6e68539f564601a5a5869c31e5242"
 
 SRC_URI = "git://github.com/zchunk/zchunk.git;protocol=https;branch=main"
 
-SRCREV = "dd6a30a1e4e8b738b0cafc682f3c00e7706134e5"
+SRCREV = "f16dbeb0831eb37a9397356570327abb97860875"
 S = "${WORKDIR}/git"
 
-DEPENDS = "\
-    curl \
-    zstd \
-    "
-
+DEPENDS = "zstd"
 DEPENDS:append:libc-musl = " argp-standalone"
-LDFLAGS:append:libc-musl = " -largp"
 
-inherit meson pkgconfig
+inherit meson pkgconfig lib_package
+
+PACKAGECONFIG ??= "openssl zckdl"
+
+# zckdl gets packaged into zchunk-bin
+PACKAGECONFIG[zckdl] = "-Dwith-curl=enabled,-Dwith-curl=disabled,curl"
+# Use OpenSSL primitives for SHA
+PACKAGECONFIG[openssl] = "-Dwith-openssl=enabled,-Dwith-openssl=disabled,openssl"
 
 BBCLASSEXTEND = "native nativesdk"
--

2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#101168): https://lists.openembedded.org/g/openembedded-devel/message/101168
Mute This Topic: https://lists.openembedded.org/mt/97088330/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-