python3: drop unneeded multiprocessing module patch
PATCH 1/3 python3: drop unneeded multiprocessing module patch
pthread has been merged into the main libc library (and was never separate in musl), so separate linking for it is no longer needed.
I ran the reproducing sequence on qemux86, qemux86_64 and same targets with musl, and it went fine:
root@qemux86:~# python3 Python 3.10.0 (default, Oct 4 2021, 17:55:55) [GCC 11.2.0] on linux Type "help", "copyright", "credits" or "license" for more information.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
import multiprocessing
pool_sema=multiprocessing.BoundedSemaphore(value=1)pool_sema.acquire()
True
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
pool_sema.release()
--- ...ssing-libraries-to-Extension-for-mul.patch | 70 ------------------- .../recipes-devtools/python/python3_3.10.1.bb | 1 - 2 files changed, 71 deletions(-) delete mode 100644 meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch
meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch deleted +0 -70
@@ -1,70 +0,0 @@ -From bad7e6a625436402a01d03021fb9ccd58bc9930f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <[email protected]> -Date: Thu, 9 Jan 2020 17:44:05 +0100 -Subject: [PATCH] setup.py: pass missing libraries to Extension for - multiprocessing module - -In the following commit: -... -commit e711cafab13efc9c1fe6c5cd75826401445eb585 -Author: Benjamin Peterson <[email protected]> -Date: Wed Jun 11 16:44:04 2008 +0000 - - Merged revisions 64104,64117 via svnmerge from - svn+ssh://[email protected]/python/trunk -... -(see diff in setup.py) -It assigned libraries for multiprocessing module according -the host_platform, but not pass it to Extension. - -In glibc, the following commit caused two definition of -sem_getvalue are different. -https://sourceware.org/git/?p=glibc.git;a=commit;h=042e1521c794a945edc43b5bfa7e69ad70420524 -(see diff in nptl/sem_getvalue.c for detail) -`__new_sem_getvalue' is the latest sem_getvalue@@GLIBC_2.1 -and `__old_sem_getvalue' is to compat the old version -sem_getvalue@GLIBC_2.0. - -To build python for embedded Linux systems: -http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html -If not explicitly link to library pthread (-lpthread), it will -load glibc's sem_getvalue randomly at runtime. - -Such as build python on linux x86_64 host and run the python -on linux x86_32 target. If not link library pthread, it caused -multiprocessing bounded semaphore could not work correctly. -... ->>> import multiprocessing ->>> pool_sema = multiprocessing.BoundedSemaphore(value=1) ->>> pool_sema.acquire() -True ->>> pool_sema.release() -Traceback (most recent call last): - File "<stdin>", line 1, in <module> -ValueError: semaphore or lock released too many times -... - -And the semaphore issue also caused multiprocessing.Queue().put() hung. - -Upstream-Status: Pending - -Signed-off-by: Hongxu Jia <[email protected]> -Signed-off-by: Alexander Kanavin <[email protected]> - ---- - setup.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/setup.py b/setup.py -index d92face..f42bcbb 100644 ---- a/setup.py -+++ b/setup.py -@@ -1836,7 +1836,7 @@ class PyBuildExt(build_ext): - if (sysconfig.get_config_var('HAVE_SEM_OPEN') and not - sysconfig.get_config_var('POSIX_SEMAPHORES_NOT_ENABLED')): - multiprocessing_srcs.append('_multiprocessing/semaphore.c') -- self.add(Extension('_multiprocessing', multiprocessing_srcs, -+ self.add(Extension('_multiprocessing', multiprocessing_srcs, libraries=['pthread'], - include_dirs=["Modules/_multiprocessing"])) - - if (not MS_WINDOWS and
meta/recipes-devtools/python/python3_3.10.1.bb +0 -1
@@ -25,7 +25,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ file://0001-Use-FLAG_REF-always-for-interned-strings.patch \ file://0001-test_locale.py-correct-the-test-output-format.patch \ file://0017-setup.py-do-not-report-missing-dependencies-for-disa.patch \ - file://0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch \ file://0001-Makefile-do-not-compile-.pyc-in-parallel.patch \ file://0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch \ file://0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch \
Signature · 1 line
2.20.1
PATCH 2/3 connman-conf: do nothing in qemu, do not touch eth0
qemu kernel itself is nowdays perfectly capable of setting up what was passed in via ip=:
[ 1.676847] IP-Config: Complete:
[ 1.677768] device=eth0, hwaddr=52:54:00:12:34:02, ipaddr=192.168.7.2, mask=255.255.255.0, gw=192.168.7.1
[ 1.679933] host=192.168.7.2, domain=, nis-domain=(none)
[ 1.681201] bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
[ 1.681203] nameserver0=8.8.8.8connman-conf only does the same thing again by (badly and incompletely) parsing those parameters with sed.
--- .../connman/connman-conf.bb | 33 +++++-------------- .../qemuall/wired-connection.service | 10 ------ .../connman/connman-conf/qemuall/wired-setup | 16 --------- .../connman/connman-conf/qemuall/wired.config | 9 ----- .../connman/connman/connman | 5 ++- 5 files changed, 10 insertions(+), 63 deletions(-) delete mode 100644 meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service delete mode 100644 meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup delete mode 100644 meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config
meta/recipes-connectivity/connman/connman-conf.bb +8 -25
@@ -1,36 +1,19 @@ -SUMMARY = "Connman config to setup wired interface on qemu machines" -DESCRIPTION = "This is the ConnMan configuration to set up a Wired \ -network interface for a qemu machine." +SUMMARY = "Connman config to ignore wired interface on qemu machines" +DESCRIPTION = "This is the ConnMan configuration to avoid touching wired \ +network interface inside qemu machines." LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" -inherit systemd - -SRC_URI:append:qemuall = " file://wired.config \ - file://wired-setup \ - file://wired-connection.service \ -" PR = "r2" S = "${WORKDIR}" PACKAGE_ARCH = "${MACHINE_ARCH}" -FILES:${PN} = "${localstatedir}/* ${datadir}/*" +FILES:${PN} = "${sysconfdir}/*" -do_install() { - #Configure Wired network interface in case of qemu* machines - if test -e ${WORKDIR}/wired.config && - test -e ${WORKDIR}/wired-setup && - test -e ${WORKDIR}/wired-connection.service; then - install -d ${D}${localstatedir}/lib/connman - install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman - install -d ${D}${datadir}/connman - install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/wired-connection.service ${D}${systemd_system_unitdir} - sed -i -e 's|@SCRIPTDIR@|${datadir}/connman|g' ${D}${systemd_system_unitdir}/wired-connection.service - fi +# Kernel IP-Config is perfectly capable of setting up networking passed in via ip= +do_install:append:qemuall() { + mkdir -p ${D}${sysconfdir}/default + echo "export EXTRA_PARAM=\"-I eth0\"" > ${D}${sysconfdir}/default/connman } - -SYSTEMD_SERVICE:${PN}:qemuall = "wired-connection.service"
meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service deleted +0 -10
@@ -1,10 +0,0 @@ -[Unit] -Description=Setup a wired interface -Before=connman.service - -[Service] -Type=oneshot -ExecStart=@SCRIPTDIR@/wired-setup - -[Install] -WantedBy=network.target
meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup deleted +0 -16
@@ -1,16 +0,0 @@ -#!/bin/sh - -CONFIGF=/var/lib/connman/wired.config - -# Extract wired network config from /proc/cmdline -NET_CONF=`cat /proc/cmdline |sed -ne 's/^.*ip=\([^ ]*\):\([^ ]*\):\([^ ]*\):\([^ ]*\).*$/\1\/\4\/\3/p'` - -# Check if eth0 is already set via kernel cmdline -if [ "x$NET_CONF" = "x" ]; then - # Wired interface is not configured via kernel cmdline - # Remove connman config file template - rm -f ${CONFIGF} -else - # Setup a connman config accordingly - sed -i -e "s|^IPv4 =.*|IPv4 = ${NET_CONF}|" ${CONFIGF} -fi
meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config deleted +0 -9
@@ -1,9 +0,0 @@ -[global] -Name = Wired -Description = Wired network configuration - -[service_ethernet] -Type = ethernet -IPv4 = -MAC = 52:54:00:12:34:56 -Nameservers = 8.8.8.8
meta/recipes-connectivity/connman/connman/connman +2 -3
@@ -27,7 +27,6 @@ while read dev mtpt fstype rest; do done do_start() { - EXTRA_PARAM="" if test $nfsroot -eq 1 ; then NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'`
@@ -36,13 +35,13 @@ do_start() { if [ "$NET_ADDR" = dhcp ]; then ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` if [ ! -z "$ethn" ]; then - EXTRA_PARAM="-I $ethn" + EXTRA_PARAM="$EXTRA_PARAM -I $ethn" fi else for i in $NET_DEVS; do ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` if [ "$NET_ADDR" = "$ADDR" ]; then - EXTRA_PARAM="-I $i" + EXTRA_PARAM="$EXTRA_PARAM -I $i" break fi done
Signature · 1 line
2.20.1
PATCH 3/3 ruby: update 3.0.3 -> 3.1.0
In reply to Alexander KanavinTurn on "link external modules statically" option as otherwise ruby installer tries to do additional building inside installed module directories in do_install which fails horribly.
License-Update: additional MIT/BSD items
---
meta/recipes-devtools/ruby/ruby.inc | 9 +---
.../0006-Make-gemspecs-reproducible.patch | 41 ++++++++++++-------
.../ruby/ruby/remove_has_include_macros.patch | 8 ++--
.../ruby/{ruby_3.0.3.bb => ruby_3.1.0.bb} | 16 ++++++--
4 files changed, 44 insertions(+), 30 deletions(-)
rename meta/recipes-devtools/ruby/{ruby_3.0.3.bb => ruby_3.1.0.bb} (78%)meta/recipes-devtools/ruby/ruby.inc +2 -7
@@ -10,7 +10,7 @@ LICENSE = "Ruby | BSD-2-Clause | BSD-3-Clause | GPLv2 | ISC | MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=5b8c87559868796979806100db3f3805 \ file://BSDL;md5=8b50bc6de8f586dc66790ba11d064d75 \ file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://LEGAL;md5=cfe5b0bc9f051b58c7e78db882ca5f9b \ + file://LEGAL;md5=f260190bc1e92e363f0ee3c0463d4c7c \ " DEPENDS = "ruby-native zlib openssl libyaml gdbm readline libffi"
@@ -23,7 +23,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ " UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/" -inherit autotools ptest +inherit autotools ptest pkgconfig # This snippet lets compiled extensions which rely on external libraries,
@@ -37,8 +37,3 @@ do_configure:prepend() { sed -i "s#%%TARGET_CFLAGS%%#$CFLAGS#; s#%%TARGET_LDFLAGS%%#$LDFLAGS#" ${S}/common.mk rm -rf ${S}/ruby/ } - -# Disable openssl extension until it becomes compatible with openssl 3 -do_configure:prepend() { - rm -rf ${S}/ext/openssl/extconf.rb -}
meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch +26 -15
89 lines not on this page · raw message
meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch +4 -4
@@ -1,4 +1,4 @@ -From 303fe0d20184203f1ac86d2a77b1447d47c8c29d Mon Sep 17 00:00:00 2001 +From e74b57febec9bd806e29025e6eeb8091e7021d75 Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Sun, 26 Jan 2020 11:27:40 -0800 Subject: [PATCH] Filter out __has_include* compiler defines
@@ -21,12 +21,12 @@ Signed-off-by: Khem Raj <[email protected]> 1 file changed, 2 insertions(+) diff --git a/common.mk b/common.mk -index 7633050..422aa9c 100644 +index 664f750..3b8fbe6 100644 --- a/common.mk +++ b/common.mk -@@ -233,6 +233,8 @@ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJE +@@ -238,6 +238,8 @@ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJE $(ECHO) building $(@F:.time=.h) - $(MINIRUBY) $(tooldir)/mjit_tabs.rb "$(MJIT_TABS)" \ + $(Q)$(MINIRUBY) $(tooldir)/mjit_tabs.rb "$(MJIT_TABS)" \ $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new + $(Q)sed -i -e "/#define __has_include __has_include/d" $(@F:.time=.h).new + $(Q)sed -i -e "/#define __has_include_next __has_include_next/d" $(@F:.time=.h).new
meta/recipes-devtools/ruby/ruby_3.1.0.bb renamed from meta/recipes-devtools/ruby/ruby_3.0.3.bb +12 -4
@@ -13,7 +13,7 @@ SRC_URI += " \ file://0006-Make-gemspecs-reproducible.patch \ " -SRC_URI[sha256sum] = "3586861cb2df56970287f0fd83f274bd92058872d830d15570b36def7f1a92ac" +SRC_URI[sha256sum] = "50a0504c6edcb4d61ce6b8cfdbddaa95707195fab0ecd7b5e92654b2a9412854" PACKAGECONFIG ??= "" PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
@@ -32,6 +32,7 @@ EXTRA_OECONF = "\ --enable-shared \ --enable-load-relative \ --with-pkg-config=pkg-config \ + --with-static-linked-ext \ " EXTRA_OECONF:append:libc-musl = "\
@@ -67,6 +68,8 @@ do_install:append:class-target () { sed -i -e 's|${DEBUG_PREFIX_MAP}||g' \ ${D}${libdir}/pkgconfig/*.pc + # logs that may contain host-specific paths + find ${D} -name gem_make.out -delete } do_install_ptest () {
@@ -78,9 +81,14 @@ do_install_ptest () { cp -r ${S}/lib/did_you_mean ${S}/lib/rdoc ${D}${PTEST_PATH}/lib # install test-binaries - find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \ - | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \ - | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf - + # These .so files have sporadic reproducibility fails as seen here: + # https://autobuilder.yocto.io/pub/repro-fail/oe-reproducible-20220107-rm1diuww/packages/diff-html/ + # As they are needed only in ruby-ptest, and that is currently altogether disabled, let's take them out. + # If someone wants to look at where the non-determinism comes from, one possible reason is use of + # -rdynamic -Wl,-export-dynamic + #find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \ + # | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \ + # | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf - # adjust path to not assume build directory layout sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \ -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb
Signature · 1 line
2.20.1