From patchwork Tue Jan 11 22:14:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 2318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E6C6C433EF for ; Tue, 11 Jan 2022 22:14:49 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web11.15221.1641939288571930499 for ; Tue, 11 Jan 2022 14:14:48 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hvTuOdwF; spf=pass (domain: gmail.com, ip: 209.85.221.44, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f44.google.com with SMTP id d19so899137wrb.0 for ; Tue, 11 Jan 2022 14:14:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kFXOe2j+vS9M2gPD+NkM/60yNZCVoQja1OOnujY0gMs=; b=hvTuOdwFuFxyRYiuJvW0GxEHiiLzJn3ghPVQZGplQo+vk2iAsEbsmztN5n9h8PzRdV tRI73ulAl7sO4/APNloI5rqgSekCIZK9/lVMTI9NE7WZxQiMQBymZbsgvbOo0hTytqzy ezmFwWj9Fu5RPoDSBXKN1NGv7Tjq7R23TkF5SiF1kYxb6oa/+I2ErieAL9E2JZDrzQ7s Bxz6pqtpUqWQztI1CSs2L2gu2j/PRI3SInV5dWm5OETwgDgcC0aYOdRq7qSRapdK7wp8 tfmJ/nMtbsQF33gEWlKnaDkfN3rEAS7nhbk2DZhRMegnutZEibaXcYStidpfrZ2Ga1mT uwBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kFXOe2j+vS9M2gPD+NkM/60yNZCVoQja1OOnujY0gMs=; b=JOKo3DVHHvbICxw4cDayJg6tadsIuk768vMcQd78zgWMlW4kh/ergWCvIpLKBqjU0Z OEjxIcSd6bpgX27CV79L96xGWTYbqT1kK0j7RnlN1Qp23dHZA+GVSxi+XYfEslUPhFb+ 96GefnHzSDCmP3g4mcPhiGEhC5Qi7ifcwR7irqD/7ZrqG2JL0+8QPLt0Mph0FlUzE97Y JxxdfDskjNo4K0bld+P5n4/mejDEc0ry8LoEFtgPbFLBs+zWY+I6qC0ekCOlE5/cEebN YixEGauUxRfPYMIJ9FUhuio7kWwS+AyVrx8nbc4Unm4ftAfMtYUum0fkGhpod+35z7uZ dd/w== X-Gm-Message-State: AOAM530gaqsHLzzTW3uBg7NOB1ONxADRBg20e5is6JB1uIyn2oNyNWXK 3sOs/pAhuCybqQ0FjZk3g7gLGjz2Kq4= X-Google-Smtp-Source: ABdhPJyWdEd2vnNUINn7IPXCRSCZ1Fhlpn85UFos2d65KWXLtIxIWl3IndreHNTTVskGobllaiiBEQ== X-Received: by 2002:adf:fec2:: with SMTP id q2mr5644724wrs.546.1641939287091; Tue, 11 Jan 2022 14:14:47 -0800 (PST) Received: from nereus.lab.linutronix.de. (b2b-109-90-143-203.unitymedia.biz. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id f5sm356997wri.52.2022.01.11.14.14.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 14:14:46 -0800 (PST) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Hongxu Jia , Alexander Kanavin Subject: [PATCH 1/3] python3: drop unneeded multiprocessing module patch Date: Tue, 11 Jan 2022 23:14:38 +0100 Message-Id: <20220111221440.3867495-1-alex@linutronix.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 11 Jan 2022 22:14:49 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/160467 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. >>> import multiprocessing >>> pool_sema = multiprocessing.BoundedSemaphore(value=1) >>> pool_sema.acquire() True >>> pool_sema.release() >>> Signed-off-by: Alexander Kanavin --- ...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 diff --git a/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch b/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch deleted file mode 100644 index 374433c68e..0000000000 --- a/meta/recipes-devtools/python/python3/0001-setup.py-pass-missing-libraries-to-Extension-for-mul.patch +++ /dev/null @@ -1,70 +0,0 @@ -From bad7e6a625436402a01d03021fb9ccd58bc9930f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -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 -Date: Wed Jun 11 16:44:04 2008 +0000 - - Merged revisions 64104,64117 via svnmerge from - svn+ssh://pythondev@svn.python.org/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 "", line 1, in -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 -Signed-off-by: Alexander Kanavin - ---- - 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 diff --git a/meta/recipes-devtools/python/python3_3.10.1.bb b/meta/recipes-devtools/python/python3_3.10.1.bb index e7ae687177..d6ac431185 100644 --- a/meta/recipes-devtools/python/python3_3.10.1.bb +++ b/meta/recipes-devtools/python/python3_3.10.1.bb @@ -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 \ From patchwork Tue Jan 11 22:14:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 2319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2853CC433FE for ; Tue, 11 Jan 2022 22:14:50 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.groups.io with SMTP id smtpd.web10.15045.1641939289329851560 for ; Tue, 11 Jan 2022 14:14:49 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZpRV0rB0; spf=pass (domain: gmail.com, ip: 209.85.221.52, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f52.google.com with SMTP id l25so739537wrb.13 for ; Tue, 11 Jan 2022 14:14:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mjoWR7x+sP1eprcLgQUcVKNvTDb5AFiY2I5J7E9BpK4=; b=ZpRV0rB0MI0oVecrGOQWCZ7VsF0eVEJySfV/+QRPEE0FXnMCTlhp6ORZhrm/fAuZ1q UtOuPuGF4uOW19f15o28VcxysDe4AUPaib7WNM8a6mdUnYLTjSfYUfQUOi9c091OW8Os J2HNLJihvmrYa6DwVt3o7GhpcpoHyv/OZO1P0EgEPmnjfoBFEOhmle0aPPh5WaCAP4Eh b+pvXchhmLBfIXpwyJMuJ0HnMNMQ8Dx5FlUFmGjNtYL5aqxE77kmzoB5oxujU4I05CN/ AJhIJ4YSdw7cKBY7VDPJFZ522YcPL+dasv4/vdT6fMfYBzgesuYjHNaelPaajQFYm/Cp 9keQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mjoWR7x+sP1eprcLgQUcVKNvTDb5AFiY2I5J7E9BpK4=; b=NRXpO7Cp26dYHiKuPmVKb9bnW0rvgFQHloeZG8m9k+GUAdiS2AjU3PTm9PXBlyZT2B 8KP8pqrAgcadhz4SVaYCAH68c5ZgBUdPzOrI91ruQ1kWsBTD996Hqt6xeUih6ko0+cEt BUP1JLtHOqF7mTUEcbgwh5QO6zTs9JhNkXUhxGkbK3Vi68bqNDxhpkfAPNsPFO1lht1z eVZcv/CCPS+7h+RUeyvUXJ+JX8gxIlfq+T75y1/mcPfRxRLAX4fFIr4xhkAPAbM9YmWk X8kkKC1XkSgkpcTYDVEZ1ck46NpbmvQ1UxNeVus+tLWeiOVKFW974TmmKhNK+YEtajV4 zv9w== X-Gm-Message-State: AOAM532CSwGp/JT1A1MnmYi2EV0jMu+Xw0tyRHbClVO83Gb71ecm6bzn 5jEc11UmqvDgVvaJB4faV4ilwfLqCPs= X-Google-Smtp-Source: ABdhPJx5pK0nu8+ZBp5CzmYDD2cQfwv4vA7/9u6Bpa74FyTHSGNO1Il2/oOYszgVqXjtTDkpCaTuEQ== X-Received: by 2002:adf:e44a:: with SMTP id t10mr5585197wrm.342.1641939287911; Tue, 11 Jan 2022 14:14:47 -0800 (PST) Received: from nereus.lab.linutronix.de. (b2b-109-90-143-203.unitymedia.biz. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id f5sm356997wri.52.2022.01.11.14.14.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 14:14:47 -0800 (PST) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 2/3] connman-conf: do nothing in qemu, do not touch eth0 Date: Tue, 11 Jan 2022 23:14:39 +0100 Message-Id: <20220111221440.3867495-2-alex@linutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220111221440.3867495-1-alex@linutronix.de> References: <20220111221440.3867495-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 11 Jan 2022 22:14:50 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/160468 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.8 connman-conf only does the same thing again by (badly and incompletely) parsing those parameters with sed. Signed-off-by: Alexander Kanavin --- .../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 diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb index 006f976997..97ac49818c 100644 --- a/meta/recipes-connectivity/connman/connman-conf.bb +++ b/meta/recipes-connectivity/connman/connman-conf.bb @@ -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" diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service deleted file mode 100644 index 48adfc08ac..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Setup a wired interface -Before=connman.service - -[Service] -Type=oneshot -ExecStart=@SCRIPTDIR@/wired-setup - -[Install] -WantedBy=network.target diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup deleted file mode 100644 index c46899ef32..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup +++ /dev/null @@ -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 diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config deleted file mode 100644 index 42998ce897..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config +++ /dev/null @@ -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 diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman index c64fa0d715..310a696863 100644 --- a/meta/recipes-connectivity/connman/connman/connman +++ b/meta/recipes-connectivity/connman/connman/connman @@ -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 From patchwork Tue Jan 11 22:14:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 2320 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FF0CC433F5 for ; Tue, 11 Jan 2022 22:14:51 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web12.15203.1641939290281117462 for ; Tue, 11 Jan 2022 14:14:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TRScrq6/; spf=pass (domain: gmail.com, ip: 209.85.221.44, mailfrom: alex.kanavin@gmail.com) Received: by mail-wr1-f44.google.com with SMTP id v6so780719wra.8 for ; Tue, 11 Jan 2022 14:14:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hbSrex4+MgkqLa4MkqEzJTnY9nDsAr6C5wDQeg/MCkY=; b=TRScrq6/4G/+LTvaMO5EgrN3GoYj99VQwgttFQ7nDWkx9Wfc0IQkO9a59uFMM1reaC IRujwn7fKAO3KtO1q8TL7iav2eInE79AeAo6PpjE/qQFevjCL8w9D9xxGEU+TuHzsoeF ype3HVrld9JMDyKtXBKVRzhBZUsDjRtogyFZlkQlR4/XFs+NfG1wY5++jIxOpPnkva2a WvOVy8n+9XlqtUX7S/ZhjJ4chBhIjmjXx497BsIxLgSjAZVFmN8BkIIGYU/Js6c8fteB EwTqhPyq7ufEyd9nyfWusI16D+VBwTFaURcqAnGHfz8TjSVcQsghe8fc0boVxxU3iGJ8 Dv4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hbSrex4+MgkqLa4MkqEzJTnY9nDsAr6C5wDQeg/MCkY=; b=7sjPgUYuq587mkYnmlahNUcQdVH5s5Fnf39/y5PVycRFDeFaRpQhfdjwd+3jSmMp1G CJox8E2j+xbYvZxF602yTjRfwHjToUa1YPLecsDQttiBP8rEkbu0hKPQsfY1ZC6tTn2E o5Pimas+KUeHdQFZ4SljK3rQBiVzViTJ8+dFjli9LOM1qDK7LhalOoocedIqB9RatrZP 2+yuHc7cyyshGHZ6Y/5MUKucUOBU8DVvegQHVBJvrZvFQKitWPBxnvsoc4qxylZKIqWQ +yy6mCpUHnkN3eJMXXn1wq44idBicYIudGFgdAxujhwfK+vVH1bBZzFTWTQTOgHs0Znk 9szQ== X-Gm-Message-State: AOAM533moiXNkUOacxHum4SRdhh7IFzmUC3t1c1hkQxFdMabcqamM7cP pgHtAItMh2QR0ujxkMKYGAUsFx7mjJo= X-Google-Smtp-Source: ABdhPJwXd2qL32jYxoT08/ZVWVQTfONtDuc2AQLSjwRje4BtwoXyq0XCGjxUsdQ7WaHPBUe9BB1Xcw== X-Received: by 2002:adf:d23b:: with SMTP id k27mr5872505wrh.517.1641939288805; Tue, 11 Jan 2022 14:14:48 -0800 (PST) Received: from nereus.lab.linutronix.de. (b2b-109-90-143-203.unitymedia.biz. [109.90.143.203]) by smtp.gmail.com with ESMTPSA id f5sm356997wri.52.2022.01.11.14.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jan 2022 14:14:48 -0800 (PST) From: Alexander Kanavin X-Google-Original-From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin Subject: [PATCH 3/3] ruby: update 3.0.3 -> 3.1.0 Date: Tue, 11 Jan 2022 23:14:40 +0100 Message-Id: <20220111221440.3867495-3-alex@linutronix.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220111221440.3867495-1-alex@linutronix.de> References: <20220111221440.3867495-1-alex@linutronix.de> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 11 Jan 2022 22:14:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/160469 Turn 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 Signed-off-by: Alexander Kanavin --- 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%) diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc index 2b5caf35f5..20ae15bd7a 100644 --- a/meta/recipes-devtools/ruby/ruby.inc +++ b/meta/recipes-devtools/ruby/ruby.inc @@ -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 -} diff --git a/meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch b/meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch index 504893b4b4..de8d4f04cc 100644 --- a/meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch +++ b/meta/recipes-devtools/ruby/ruby/0006-Make-gemspecs-reproducible.patch @@ -1,6 +1,7 @@ +From 6e1dc610724a7aa8368cbcddf4bbe21cccc0f731 Mon Sep 17 00:00:00 2001 From: Lucas Kanashiro Date: Fri, 1 Nov 2019 15:25:17 -0300 -Subject: Make gemspecs reproducible +Subject: [PATCH] Make gemspecs reproducible Without an explicit date, they will get the current date and make the build unreproducible @@ -10,34 +11,40 @@ Upstream-Status: Backport [debian] --- ext/bigdecimal/bigdecimal.gemspec | 1 + ext/fiddle/fiddle.gemspec | 1 + - ext/io/console/io-console.gemspec | 2 +- + ext/io/console/io-console.gemspec | 1 + lib/ipaddr.gemspec | 1 + lib/rdoc/rdoc.gemspec | 1 + - 5 files changed, 5 insertions(+), 1 deletion(-) + 5 files changed, 5 insertions(+) +diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec +index fd49c1b..5b8bb00 100644 --- a/ext/bigdecimal/bigdecimal.gemspec +++ b/ext/bigdecimal/bigdecimal.gemspec -@@ -6,6 +6,7 @@ +@@ -4,6 +4,7 @@ Gem::Specification.new do |s| s.name = "bigdecimal" - s.version = bigdecimal_version + s.version = "3.1.1" s.authors = ["Kenta Murata", "Zachary Scott", "Shigeo Kobayashi"] + s.date = RUBY_RELEASE_DATE s.email = ["mrkn@mrkn.jp"] - + s.summary = "Arbitrary-precision decimal floating-point number library." +diff --git a/ext/fiddle/fiddle.gemspec b/ext/fiddle/fiddle.gemspec +index a9c0ec4..89da078 100644 --- a/ext/fiddle/fiddle.gemspec +++ b/ext/fiddle/fiddle.gemspec -@@ -8,6 +8,7 @@ +@@ -8,6 +8,7 @@ end Gem::Specification.new do |spec| spec.name = "fiddle" spec.version = version_module::Fiddle::VERSION + spec.date = RUBY_RELEASE_DATE spec.authors = ["Aaron Patterson", "SHIBATA Hiroshi"] spec.email = ["aaron@tenderlovemaking.com", "hsbt@ruby-lang.org"] - + +diff --git a/ext/io/console/io-console.gemspec b/ext/io/console/io-console.gemspec +index 36beda7..e932d83 100644 --- a/ext/io/console/io-console.gemspec +++ b/ext/io/console/io-console.gemspec -@@ -4,6 +4,7 @@ +@@ -4,6 +4,7 @@ _VERSION = "0.5.10" Gem::Specification.new do |s| s.name = "io-console" s.version = _VERSION @@ -45,23 +52,27 @@ Upstream-Status: Backport [debian] s.summary = "Console interface" s.email = "nobu@ruby-lang.org" s.description = "add console capabilities to IO instances." +diff --git a/lib/ipaddr.gemspec b/lib/ipaddr.gemspec +index 36e2300..06dc888 100644 --- a/lib/ipaddr.gemspec +++ b/lib/ipaddr.gemspec -@@ -6,6 +6,7 @@ +@@ -6,6 +6,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) Gem::Specification.new do |spec| spec.name = "ipaddr" - spec.version = "1.2.2" + spec.version = "1.2.3" + spec.date = RUBY_RELEASE_DATE spec.authors = ["Akinori MUSHA", "Hajimu UMEMOTO"] spec.email = ["knu@idaemons.org", "ume@mahoroba.org"] - + +diff --git a/lib/rdoc/rdoc.gemspec b/lib/rdoc/rdoc.gemspec +index 525a15f..f6d0e22 100644 --- a/lib/rdoc/rdoc.gemspec +++ b/lib/rdoc/rdoc.gemspec -@@ -7,6 +7,7 @@ - +@@ -7,6 +7,7 @@ end + Gem::Specification.new do |s| s.name = "rdoc" + s.date = RUBY_RELEASE_DATE s.version = RDoc::VERSION - + s.authors = [ diff --git a/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch b/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch index 6e90a8ee77..b78e3db892 100644 --- a/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch +++ b/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch @@ -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 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 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 diff --git a/meta/recipes-devtools/ruby/ruby_3.0.3.bb b/meta/recipes-devtools/ruby/ruby_3.1.0.bb similarity index 78% rename from meta/recipes-devtools/ruby/ruby_3.0.3.bb rename to meta/recipes-devtools/ruby/ruby_3.1.0.bb index 5cf0625101..7183c93d45 100644 --- a/meta/recipes-devtools/ruby/ruby_3.0.3.bb +++ b/meta/recipes-devtools/ruby/ruby_3.1.0.bb @@ -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