From patchwork Fri Mar 14 19:35:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 59035 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 CC6E3C3DA4A for ; Fri, 14 Mar 2025 19:36:03 +0000 (UTC) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by mx.groups.io with SMTP id smtpd.web11.2790.1741980958397802777 for ; Fri, 14 Mar 2025 12:35:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=Q7HG2yOH; spf=softfail (domain: sakoman.com, ip: 209.85.214.173, mailfrom: steve@sakoman.com) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-22423adf751so40341515ad.2 for ; Fri, 14 Mar 2025 12:35:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1741980958; x=1742585758; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0xQx9g9vrnjZtQUiUBybHDlx54xXQkiVVvlB7/G7wfA=; b=Q7HG2yOHZn3hGT/S1SoR56cnwE60+1RAnE8kVbT/u81mr47OjFVskX4iu8OpmPazvY 4FT+SFUHwNZNLKpWce34om587LMOEfKX7Ne4Q84NARzk5QIcZzrx61YUvlclW4Y9xPCV iziBX/g/N4bZ+etFtKK7t0pcw5UYccc7R2g006T4KHjNvbPR6g9kU/lJkliUKoP6J+o/ wX8JJP/3Pd+xmcxsBvzrbwothQJ6vAtocT5hONOY9QbYCTpnYfcYIsfvewzs+3fjCyA6 XS2C1gMXNt6tyT7GRqX+Zjuo3A+rjVhtnDmFv1Hlqn9aEATD8+JbVsVaKH5QO8m8A3q7 +mMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741980958; x=1742585758; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0xQx9g9vrnjZtQUiUBybHDlx54xXQkiVVvlB7/G7wfA=; b=oLEiGsLaE5OjzRpUZyPL+B4yUbs3ita8TF0sZM3wjd5yKOqIE9I2KfrL6aGBUr/uTO gibGvl2mTHjxq6RF/AqnJoi8XICs/GfmFH+0SNhtjSiHUIOkX13W+ecpbNeuzCCJhRic aJq2TUyjhmHCMkNC+nafJmMcOXUmpzAGV6pGGkLbO7eJSucBijiU62sXDa2zSO0QvR+H qSNjNYcUIkXOWc+gXtvH7fesdo41ypedyiz0Rr2JIRWko59MmIxu5qopLkT4tyebaYWM 5axmEqaikwNH02vRuyDFZb+3DYa+883/JXMU5C+AzU0d/xlUMeWWUrJxvPaaBEZtpprc FGfw== X-Gm-Message-State: AOJu0YxGjVycjAocoeAf78NT7RDI1YK8I7PrptAjURS36IGT9g+bm/Dy z1S3gNtVZsJLeCXbpjJweG0XoY2/6ktOsu0jMstvSICJqIsbrmRyHh+azbLKVyaaTWm+o1thVFD J X-Gm-Gg: ASbGncuAFnVaJjkvD61DP9N3ot7aqyFIJQDhzWtNx01xQl5DSJVtMSlhLvgmXjRBjnt lnUx8HzgPJn0LZLM4u+OvYQyWszOcwF2lItLUM6tos3MGA5SfvJSEFkH6USQSnwPtn3vWYqzKXI 6q/r/OwBwv7zea2/j2mqpkf2wTLER6grCfQQhVd/StcI1FojrKU7U4CvXiq5R+LKVe3R9C93Ihl wwH45KoAOtH3IL3DmaGPHPQ9YpKCC7Fe8nvd13+PKI5k56TCZByGirnNeSEZ4NtAGzVdGYe92gn XxJiFuTO8XGwZd3yI3aPgLLYnWQUvtWDXpQ8 X-Google-Smtp-Source: AGHT+IEz9s+ovpR+DrQCWJJl+bYkffNCmxP/7/ore5xJjARPMa5nS7VVBWs9ZsBNRdwt1AyRBKIafw== X-Received: by 2002:a17:902:c406:b0:224:c47:cbd with SMTP id d9443c01a7336-225e08682b3mr43664415ad.0.1741980957645; Fri, 14 Mar 2025 12:35:57 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:6978:e88e:1ab7:676a]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-225c6ba6d5dsm32265685ad.153.2025.03.14.12.35.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 12:35:57 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 1/4] libarchive: patch CVE-2025-1632 and CVE-2025-25724 Date: Fri, 14 Mar 2025 12:35:36 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 ; Fri, 14 Mar 2025 19:36:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/212860 From: Peter Marko Pick commit referencing this MR which was merged to master. Signed-off-by: Peter Marko Signed-off-by: Steve Sakoman --- .../CVE-2025-1632_CVE-2025-25724.patch | 83 +++++++++++++++++++ .../libarchive/libarchive_3.7.4.bb | 1 + 2 files changed, 84 insertions(+) create mode 100644 meta/recipes-extended/libarchive/libarchive/CVE-2025-1632_CVE-2025-25724.patch diff --git a/meta/recipes-extended/libarchive/libarchive/CVE-2025-1632_CVE-2025-25724.patch b/meta/recipes-extended/libarchive/libarchive/CVE-2025-1632_CVE-2025-25724.patch new file mode 100644 index 0000000000..459b664180 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/CVE-2025-1632_CVE-2025-25724.patch @@ -0,0 +1,83 @@ +From c9bc934e7e91d302e0feca6e713ccc38d6d01532 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Peter=20K=C3=A4stle?= +Date: Mon, 10 Mar 2025 16:43:04 +0100 +Subject: [PATCH] fix CVE-2025-1632 and CVE-2025-25724 (#2532) + +Hi, + +please find my approach to fix the CVE-2025-1632 and CVE-2025-25724 +vulnerabilities in this pr. +As both error cases did trigger a NULL pointer deref (and triggered +hopefully everywhere a coredump), we can safely replace the actual +information by a predefined invalid string without breaking any +functionality. + +CVE: CVE-2025-1632 +CVE: CVE-2025-25724 +Upstream-Status: Backport [https://github.com/libarchive/libarchive/commit/c9bc934e7e91d302e0feca6e713ccc38d6d01532] +Signed-off-by: Peter Marko +--------- + +Signed-off-by: Peter Kaestle +--- + tar/util.c | 5 ++++- + unzip/bsdunzip.c | 10 +++++++--- + 2 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/tar/util.c b/tar/util.c +index 3b099cb5..f3cbdf0b 100644 +--- a/tar/util.c ++++ b/tar/util.c +@@ -748,7 +748,10 @@ list_item_verbose(struct bsdtar *bsdtar, FILE *out, struct archive_entry *entry) + #else + ltime = localtime(&tim); + #endif +- strftime(tmp, sizeof(tmp), fmt, ltime); ++ if (ltime) ++ strftime(tmp, sizeof(tmp), fmt, ltime); ++ else ++ sprintf(tmp, "-- -- ----"); + fprintf(out, " %s ", tmp); + safe_fprintf(out, "%s", archive_entry_pathname(entry)); + +diff --git a/unzip/bsdunzip.c b/unzip/bsdunzip.c +index 7c8cafc3..4a9028b7 100644 +--- a/unzip/bsdunzip.c ++++ b/unzip/bsdunzip.c +@@ -904,6 +904,7 @@ list(struct archive *a, struct archive_entry *e) + char buf[20]; + time_t mtime; + struct tm *tm; ++ const char *pathname; + + mtime = archive_entry_mtime(e); + tm = localtime(&mtime); +@@ -912,22 +913,25 @@ list(struct archive *a, struct archive_entry *e) + else + strftime(buf, sizeof(buf), "%m-%d-%g %R", tm); + ++ pathname = archive_entry_pathname(e); ++ if (!pathname) ++ pathname = ""; + if (!zipinfo_mode) { + if (v_opt == 1) { + printf(" %8ju %s %s\n", + (uintmax_t)archive_entry_size(e), +- buf, archive_entry_pathname(e)); ++ buf, pathname); + } else if (v_opt == 2) { + printf("%8ju Stored %7ju 0%% %s %08x %s\n", + (uintmax_t)archive_entry_size(e), + (uintmax_t)archive_entry_size(e), + buf, + 0U, +- archive_entry_pathname(e)); ++ pathname); + } + } else { + if (Z1_opt) +- printf("%s\n",archive_entry_pathname(e)); ++ printf("%s\n", pathname); + } + ac(archive_read_data_skip(a)); + } diff --git a/meta/recipes-extended/libarchive/libarchive_3.7.4.bb b/meta/recipes-extended/libarchive/libarchive_3.7.4.bb index 80b2e49eac..156a6bdaae 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.7.4.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.7.4.bb @@ -34,6 +34,7 @@ SRC_URI += "file://configurehack.patch \ file://CVE-2024-48957.patch \ file://CVE-2024-48958.patch \ file://CVE-2024-20696.patch \ + file://CVE-2025-1632_CVE-2025-25724.patch \ " UPSTREAM_CHECK_URI = "http://libarchive.org/" From patchwork Fri Mar 14 19:35:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 59034 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 C43F9C282EC for ; Fri, 14 Mar 2025 19:36:03 +0000 (UTC) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mx.groups.io with SMTP id smtpd.web10.2818.1741980960090097416 for ; Fri, 14 Mar 2025 12:36:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=Mc7ow0ID; spf=softfail (domain: sakoman.com, ip: 209.85.214.171, mailfrom: steve@sakoman.com) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2235189adaeso44374405ad.0 for ; Fri, 14 Mar 2025 12:36:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1741980959; x=1742585759; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=YdK75pJJvOAyZ7RacQCXP0X/9zt+mZmlsyt17OKzdiE=; b=Mc7ow0IDQnP1EUP/H6zajd/GRBNJkk3I5wKXMRMvAm1oqoYeIZkEzZDI+0yBjpJZ6n AIY/Aw3cg7kQ5P2Wn5CEcBXs66nS4mN1M3fZraMNf9w6V1dptJ4XUIRVpyUDlOLU/D03 wj6DETBM/mFCkYsTtWyMl9OMxqTH6peuRtDUajlcdCr8f8MOR4Hv5rTIH2HBIDThvIry QEZV/7w3gxpD/uGerETIHlyQVQAvtAs3uOYySVipsldJz0iNevF6Nhk8fNqChvQLL4tD Z75z7AS+4wXXyrKx2TjM3y0FZASWTlE88TkjyRsfvGupjHtvbJ6lKSFqbRsqJfUIcLPK +5OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741980959; x=1742585759; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YdK75pJJvOAyZ7RacQCXP0X/9zt+mZmlsyt17OKzdiE=; b=IvTnU2BDXZNuf4btRYP/DQOSV3wQynsMZGKdjG3hOqccCgtWidc6TIoZc08jefUUd1 CVFhJRCAaF61slclFJa+ffweDe0KakyQT88p2CcFi0GCifNpeFUcZ7P4ApB0z9kAVzsD WufjYng2U8Fbjl5F/8gKap6kXmNCjyX8tnjDkchhTXN7dkXpUkx8wTRXNAFgkAPOqmeE 3wL9+LO5kMd7ZXXWHVF8nFk3YPZPWVezJ9+UykBnQX1XxuI2REm81cA7rlPXhEXfFSLJ 0gbzZ3iWBQsgTE0POyavVw3zsuVeaxJsMibe09dpOr7SnEBZ5AEDA6q2BCTJ98cJfWb0 rJAQ== X-Gm-Message-State: AOJu0YxKNODt4pPalpvy6MwsnP2tpAqO0m9suz558WjCdwMQm13Wlsjz OONr+sg7uyqlLS0vZ4tV5EBVET3KnSzdqfCgnqsZzBHCyujn3eRuHO5WUA6tJ6vOVXnXM3x3rfh + X-Gm-Gg: ASbGncvigW9FOvWiBCBr5KtLLue0O4ACMys5LjADJxsTyYTVBKTdNCd/XXFJHeYXOry AplR3i5VB21C92OQmpET/1XiRGAlF3FSkgXeg6Kdq9A38a+tLxIsoONF7x08+jUUILDWTwM0cqR j0o3QD83hjZbL9B28cjkHYlCr05uIPNoVaxQ+BQc8wcso6LqGFDYvCspUR3VLBsUZb8RJDjn7dj 6m37o8GPUw4IHoryY1oTSuDd+N53Lrv+Xluv5cr/u4EpmGFu0kUBoKMsrWc+24h8YzzMzlSK9oK UOUBUVF3zrrYmMs5Ga1vjHJGosnnh/GZu/XdPCIQ7BBtufI= X-Google-Smtp-Source: AGHT+IH5cMQYaOz86mQpSgf2LTaQT9OPo93yh3PWb3bqf1nC0Qdmn5u4hI+LXWgwqLXoaX+tWIdBuQ== X-Received: by 2002:a17:903:13ce:b0:215:758c:52e8 with SMTP id d9443c01a7336-225e16b1b84mr56340005ad.12.1741980959314; Fri, 14 Mar 2025 12:35:59 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:6978:e88e:1ab7:676a]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-225c6ba6d5dsm32265685ad.153.2025.03.14.12.35.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 12:35:58 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 2/4] mpg123: upgrade 1.32.6 -> 1.32.10 Date: Fri, 14 Mar 2025 12:35:37 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 ; Fri, 14 Mar 2025 19:36:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/212861 From: Zhang Peng Changelog: ========== 1.32.10 - scripts/tag_lyrics.py: fix for python3 - libout123: Use strtok_r() to avoid conflicts multithreaded contexts - libmpg123: Un-break DLL builds that need I/O functions defined in libmpg123.c - ports/cmake: More fixup to also produce .pc files with Libs.private. 1.32.9 - libmpg123: -- enable 64 bit offset path for MSVCRT and avoid warnings about MS's game about POSIX API with and without underscores -- Increase the library patchlevel, as was forgotten on previous release. 1.32.8 Update: The buffer overflow got assigned the CVE ID CVE-2024-10573. - libmpg123: -- Add sections to assembly to support PAC/BTI code for aarch64 (-mbranch-protection variants) -- Prevent premature application of header info into decoding structure, at worst having triggered out-of-bounds writes of decoded PCM data - out123: Show --quiet in --longhelp. 1.32.7 - ports/cmake: Work around bug in CMake that does not detect FPU on Apple ARM CPUs. - Fix some laziness (func() to func(void)) for standards conformance. Signed-off-by: Zhang Peng Signed-off-by: Steve Sakoman --- .../mpg123/{mpg123_1.32.6.bb => mpg123_1.32.10.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta/recipes-multimedia/mpg123/{mpg123_1.32.6.bb => mpg123_1.32.10.bb} (96%) diff --git a/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb b/meta/recipes-multimedia/mpg123/mpg123_1.32.10.bb similarity index 96% rename from meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb rename to meta/recipes-multimedia/mpg123/mpg123_1.32.10.bb index f7786e8588..82f7b7d332 100644 --- a/meta/recipes-multimedia/mpg123/mpg123_1.32.6.bb +++ b/meta/recipes-multimedia/mpg123/mpg123_1.32.10.bb @@ -10,7 +10,7 @@ LICENSE = "LGPL-2.1-only" LIC_FILES_CHKSUM = "file://COPYING;md5=e7b9c15fcfb986abb4cc5e8400a24169" SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2" -SRC_URI[sha256sum] = "ccdd1d0abc31d73d8b435fc658c79049d0a905b30669b6a42a03ad169dc609e6" +SRC_URI[sha256sum] = "87b2c17fe0c979d3ef38eeceff6362b35b28ac8589fbf1854b5be75c9ab6557c" UPSTREAM_CHECK_REGEX = "mpg123-(?P\d+(\.\d+)+)\.tar" From patchwork Fri Mar 14 19:35:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 59032 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 D6D10C35FF6 for ; Fri, 14 Mar 2025 19:36:03 +0000 (UTC) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mx.groups.io with SMTP id smtpd.web11.2791.1741980961774325486 for ; Fri, 14 Mar 2025 12:36:01 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=pIPw85Ej; spf=softfail (domain: sakoman.com, ip: 209.85.214.169, mailfrom: steve@sakoman.com) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2243803b776so69447075ad.0 for ; Fri, 14 Mar 2025 12:36:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1741980961; x=1742585761; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PasTneidHq5WEFQ/gaNGyX+n1seXwU4hAiVB8jQbGMo=; b=pIPw85EjQztFvDRprvRYJLZLJerayciFXHVcEZwjc11S6IOcsiXF74O7TcSYOuje7h GtR6zELY15C/EvgXh1O9Y2L5suOfjyQrHfC/vaaE4S7hFqP8MAwz+1IwwtOgUsesWmtI 89JAqQYUUxgfH4EsnHgqXkKLSh9ZnMMlI+XAbmFUVPEy8EAJj5unPMj+0kzGSFbBoKSC SxeM7achaUmomMly2fKhErT+OnC24NnPJg9lEKJgMga0lA8Zncny9+fNc/R+PYXmRqz6 ZQYyLiDIYqxYdzB4kK9aXvOFa28R5Qs2BVsHYJPruEPu32jD8d1W44QkOGMivDNb2jxl fgDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741980961; x=1742585761; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PasTneidHq5WEFQ/gaNGyX+n1seXwU4hAiVB8jQbGMo=; b=CqlsD7QodffE5gR8CLKYQspb/toIbiTWTqoHyKXuHv6uUyt1gNutOMy4yrxHFofBsf 1lUfAD6n4fZlLD9RUPxLh0xUtSd52jCKw8CaEBm0+9JJ4YnxE58QwZ+Pqef4t6xGXgbL cK2a/susgIdH6RliEdNWffL58BVxL18fKAqmCsapNwNPiaNXEUo727lzFOmcNFDN2SV2 LhzCYkFUma35I5a8ZhJv3v9dPJgDX1YBLPHa5wK0U7z4dxp7r/SnJOo58BJbFHswmfku wehdj3U83eznEmC8sYsa4Lk9d3cycbqVquNQa3cMZ35EomMMQ2V7MlffBHAGc0cPLX9I wF4w== X-Gm-Message-State: AOJu0Yx87FPOIcj+8KiVm6JhJBs4yB9Dr5RIxgt9x4isXp8SugHPMKZT JYvXzlycFa/sVDB5QQwh6wtTgLWGWa8FbeijQe9Fk50la6o2exphhAC47z0CBlfh2DfJAkfWEQw 9 X-Gm-Gg: ASbGncuCsAY9VO8aYa7v4oQNCZGFIth11jzBeX02AxEUHDr9y2RjMgbtG7HB2OzH2PO lYbfH+6PjybOSlrUX+eDowgyYpfhhoqmDj3oibO52l3mNcYgv2Yj7AIJhR6PXhQcGaEzPzbJfaY 7ytq62aB//9BSr+sOzgxKcp7cHDa5esVDihxMGVWCdVtX5GsuGGbzuy1Pgrd0Q5Z0X7R5xGe6X/ P106+NffKst1ERMhqV3+TW7bmdW11OB/jOpRjo8880hooCn0PkkpRNu+DT9c6stZgbZzTlSLSLe LzbKsZEBgzYooIAxazwdqmFJnWuC/pD7SuCW X-Google-Smtp-Source: AGHT+IGZAeoZclFOsxgMWUo39fkGtivBWoH3fZn1XBMjaen563l9Mvy58zooLTsDLm+DIp2FIZn0RQ== X-Received: by 2002:a17:903:1a0b:b0:220:cd9a:a167 with SMTP id d9443c01a7336-225e0a19f52mr56348445ad.4.1741980960961; Fri, 14 Mar 2025 12:36:00 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:6978:e88e:1ab7:676a]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-225c6ba6d5dsm32265685ad.153.2025.03.14.12.36.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 12:36:00 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 3/4] gcc: remove paths to sysroot from configargs.h and checksum-options for gcc-cross-canadian Date: Fri, 14 Mar 2025 12:35:38 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 ; Fri, 14 Mar 2025 19:36:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/212862 From: Oleksandr Hnatiuk Apply fixes from gcc-cross (84a78f46d594 and 0ead8cbdfb96) to gcc-cross-canadian. This will improve (but not fix) reproducibility of gcc-cross-canadian. Also move this code to functions to avoid code duplication. [RP: Tweak patch to make the function parameters clear and fix quoting issues ensuring the code exactly matches the original replacements with an additional parameter.] (From OE-Core rev: 350ff7d53f7506de2bc01f0efc569b8294b9afea) Signed-off-by: Oleksandr Hnatiuk Signed-off-by: Denys Dmytriyenko Signed-off-by: Richard Purdie (cherry picked from commit f1ad5be4337c5d45c0f1bed48184336e9ab1fad8) Signed-off-by: Sana Kazi Signed-off-by: Steve Sakoman --- meta/recipes-devtools/gcc/gcc-common.inc | 22 +++++++++++++++++++ .../gcc/gcc-configure-common.inc | 1 - .../gcc/gcc-cross-canadian.inc | 3 +++ meta/recipes-devtools/gcc/gcc-cross.inc | 15 ++----------- meta/recipes-devtools/gcc/gcc-target.inc | 16 ++------------ 5 files changed, 29 insertions(+), 28 deletions(-) diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc index 5ac82b1b57..7f5cc109e6 100644 --- a/meta/recipes-devtools/gcc/gcc-common.inc +++ b/meta/recipes-devtools/gcc/gcc-common.inc @@ -116,3 +116,25 @@ target_prefix ?= "${prefix}" # The real WORKDIR location isn't a dependency for the shared workdir. src_patches[vardepsexclude] = "WORKDIR" should_apply[vardepsexclude] += "PN" + +remove_sysroot_paths_from_configargs () { + replacement=${1} + # Prevent sysroot path from being used in configargs.h header, as it will + # be rewritten when used by other sysroots preventing support for gcc + # plugins. Additionally the path is embeddeded into the output binary, this + # prevents building a reproducible binary. + oe_runmake configure-gcc + sed -i "s@${STAGING_DIR_TARGET}@$replacement@g" ${B}/gcc/configargs.h + sed -i "s@${STAGING_DIR_HOST}@/$replacement@g" ${B}/gcc/configargs.h +} + +remove_sysroot_paths_from_checksum_options () { + stagingdir=${1} + replacement=${2} + # Prevent sysroot/workdir paths from being used in checksum-options. + # checksum-options is used to generate a checksum which is embedded into + # the output binary. + oe_runmake TARGET-gcc=checksum-options all-gcc + sed -i "s@${DEBUG_PREFIX_MAP}@@g" ${B}/gcc/checksum-options + sed -i "s@$stagingdir@$replacement@g" ${B}/gcc/checksum-options +} diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc index dba25eb754..bc17f10468 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc @@ -119,4 +119,3 @@ do_configure () { oe_runconf } - diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index ec87b46219..adcaef2b0f 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc @@ -63,6 +63,9 @@ do_configure () { } do_compile () { + remove_sysroot_paths_from_configargs '/host' + remove_sysroot_paths_from_checksum_options '${STAGING_DIR_HOST}' '/host' + oe_runmake all-host configure-target-libgcc (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) } diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index a540fb2434..1dbb6dc42b 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc @@ -61,19 +61,8 @@ do_compile () { export CXXFLAGS_FOR_TARGET="${TARGET_CXXFLAGS}" export LDFLAGS_FOR_TARGET="${TARGET_LDFLAGS}" - # Prevent native/host sysroot path from being used in configargs.h header, - # as it will be rewritten when used by other sysroots preventing support - # for gcc plugins - oe_runmake configure-gcc - sed -i 's@${STAGING_DIR_TARGET}@/host@g' ${B}/gcc/configargs.h - sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/configargs.h - - # Prevent sysroot/workdir paths from being used in checksum-options. - # checksum-options is used to generate a checksum which is embedded into - # the output binary. - oe_runmake TARGET-gcc=checksum-options all-gcc - sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options - sed -i 's@${STAGING_DIR_HOST}@/host@g' ${B}/gcc/checksum-options + remove_sysroot_paths_from_configargs '/host' + remove_sysroot_paths_from_checksum_options '${STAGING_DIR_HOST}' '/host' oe_runmake all-host configure-target-libgcc (cd ${B}/${TARGET_SYS}/libgcc; oe_runmake enable-execute-stack.c unwind.h md-unwind-support.h sfp-machine.h gthr-default.h) diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc index 7dac3ef422..f51d94cd65 100644 --- a/meta/recipes-devtools/gcc/gcc-target.inc +++ b/meta/recipes-devtools/gcc/gcc-target.inc @@ -140,20 +140,8 @@ FILES:${PN}-doc = "\ " do_compile () { - # Prevent full target sysroot path from being used in configargs.h header, - # as it will be rewritten when used by other sysroots preventing support - # for gcc plugins. Additionally the path is embeddeded into the output - # binary, this prevents building a reproducible binary. - oe_runmake configure-gcc - sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/configargs.h - sed -i 's@${STAGING_DIR_HOST}@/@g' ${B}/gcc/configargs.h - - # Prevent sysroot/workdir paths from being used in checksum-options. - # checksum-options is used to generate a checksum which is embedded into - # the output binary. - oe_runmake TARGET-gcc=checksum-options all-gcc - sed -i 's@${DEBUG_PREFIX_MAP}@@g' ${B}/gcc/checksum-options - sed -i 's@${STAGING_DIR_TARGET}@/@g' ${B}/gcc/checksum-options + remove_sysroot_paths_from_configargs '/' + remove_sysroot_paths_from_checksum_options '${STAGING_DIR_TARGET}' '/' oe_runmake all-host } From patchwork Fri Mar 14 19:35:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Sakoman X-Patchwork-Id: 59033 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 D6D39C35FF7 for ; Fri, 14 Mar 2025 19:36:03 +0000 (UTC) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mx.groups.io with SMTP id smtpd.web10.2820.1741980963150484952 for ; Fri, 14 Mar 2025 12:36:03 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@sakoman-com.20230601.gappssmtp.com header.s=20230601 header.b=vN7h6Mr2; spf=softfail (domain: sakoman.com, ip: 209.85.214.171, mailfrom: steve@sakoman.com) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2254e0b4b79so64080805ad.2 for ; Fri, 14 Mar 2025 12:36:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sakoman-com.20230601.gappssmtp.com; s=20230601; t=1741980962; x=1742585762; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NymLU09W9Y/xdNghmsoOM6ZWCGXd7ZPeLyf+o0Y0adU=; b=vN7h6Mr2AePCyk17/rHsin5JURHPTrW0yOeEdNaIT1TQY/S7orPTtva8g7r2BDfTUm ZCcBBDnmRVrr9jHgLgzS2lERckHaxIsptU1p6Ln1s/8Dq2wtrCxoqXJjrm/+1S1zUxGL EQjMLvtLQ6jbu9aY0wpJtIsmrpPxFSzilnEvXZW+jyRxc+giDUDVYiH5EfoIdNpnADHS +yFgIIp9dedg1NcsHN/uK3Vmk5nnZW+RyzHi/tynBwf+x3DoNM53oRVrOh4vHXXs38oV DNXFcTox8SDBFzoND0jmv8k2afpYGigLMMHXYfZl3d6TXNm9e+bWu1ieAMJNpHvsGR2c mlDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741980962; x=1742585762; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NymLU09W9Y/xdNghmsoOM6ZWCGXd7ZPeLyf+o0Y0adU=; b=FAB9vOcBHI730X4BnvG3p9WGe/+JspxrVF7nstSHRjRln2UptgXKYr5VnsRJcAuZ3X dmgHakpMg0dobnF8KRHDi/tiA0SAI7XSjkpXZmQDAnfmpp+F6ocjjjzubVn45pK2/AHh eeqWg6+kJE0KLYynflO72Tev9kPSemQnPSuo4npp3mrBEClMCPoa51vFgc12SGXFZO87 EBvTGJ1zxkVesp2hcZOzjBusZbAbzAtGKMRWE9DbiZv07rlIsGgmgyc988d8gG7CX0dE cV4aoN+Z0dcpyDmrmu6Wno9ASjTx6YyCLXIickbCGp7D/bpsntdg/9bbhzjvbXm8ArOE ZpUQ== X-Gm-Message-State: AOJu0YzJq0f6dbddeRml/xyYI4F5n9BRCgMa6TPdOWptqaezUYemJQc2 zm5ttPLDbk9UHtH11bo1YVhxxRSBnmj2191LV/HcDU+2/JdImkBlFix38Faht8QOnmqmJU9C4Fo O X-Gm-Gg: ASbGncuYMLdzLWmjE34R14vuBN81WaD5qipV3oVd2sykHEwO+shORJ4xOJXKyYg+if9 7diecNCa+s16O8MgFJt9TR6VtrZv1w94gzNU2SQ57lNj8HXNONc15YX/DSXLPKGkmVsDaUQqUm1 JGWR5cnXuVYoXb/SUWMadVyYRgA6MUeyPxq8IX3vRrkPwXu8btbmlDNWLLdFrDrsMxGr/tDiMoy Xh2ajH0vbZoCu8UdHI4p4ELFd9Musjo8XuFTy67XtBJvyiBZ9Q47uaDLUFD84vPysrQK6BUQXm9 fHOxobDyvrBupiCqxIG2UZ5wPKyXxwXX55I0 X-Google-Smtp-Source: AGHT+IFnEEuWdef0wAXFx6xIYMok3sCfiqDlmii5ppsOOC77l5u6dPyxBqFV/LjowS1iRz7P7SwyZg== X-Received: by 2002:a17:902:d482:b0:224:1219:934b with SMTP id d9443c01a7336-225e0b298eemr42199765ad.50.1741980962418; Fri, 14 Mar 2025 12:36:02 -0700 (PDT) Received: from hexa.. ([2602:feb4:3b:2100:6978:e88e:1ab7:676a]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-225c6ba6d5dsm32265685ad.153.2025.03.14.12.36.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Mar 2025 12:36:02 -0700 (PDT) From: Steve Sakoman To: openembedded-core@lists.openembedded.org Subject: [OE-core][scarthgap 4/4] gcc-cross-canadian.inc: Fix buildpaths error for pthread.h Date: Fri, 14 Mar 2025 12:35:39 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: 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 ; Fri, 14 Mar 2025 19:36:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/212863 From: Sana Kazi Replace the hardcoded path with /not/exist as used for other options[--with-sysroot] to ensure pthread.h does not contain hardocded references to TMPDIR: ERROR: gcc-cross-canadian-x86-64-13.3.0-r0 do_package_qa: QA Issue: File /usr/local/oe-sdk-hardcoded-buildpath/sysroots/x86_64-pokysdk-linux/ usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/13.3.0/include-fixed/ pthread.h in package gcc-cross-canadian-x86-64 contains reference to TMPDIR [buildpaths] Signed-off-by: Sana Kazi Signed-off-by: Steve Sakoman --- meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index adcaef2b0f..06f0cef864 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc @@ -118,6 +118,11 @@ do_install () { # We don't care about the gcc- copies rm -f ${D}${bindir}/*gcc-${BINV}* + # Remove buildpaths from pthread.h + sed -i -e "s|${RECIPE_SYSROOT_NATIVE}|/not/exist|g" \ + -e "s|${RECIPE_SYSROOT}|/not/exist|g" \ + ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed/pthread.h + # Cleanup empty directories which are not shipped # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686