From patchwork Mon Dec 15 10:04:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 76513 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 B104AD41D74 for ; Mon, 15 Dec 2025 10:05:13 +0000 (UTC) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.45038.1765793104229334598 for ; Mon, 15 Dec 2025 02:05:04 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NT6nepJX; spf=pass (domain: amarulasolutions.com, ip: 209.85.218.49, mailfrom: adam.duskett@amarulasolutions.com) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-b735e96872eso64723266b.0 for ; Mon, 15 Dec 2025 02:05:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1765793102; x=1766397902; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=dweruoFS2hSzD89842ZkHTQ+jWI4ilFOHwDM6py/yME=; b=NT6nepJXElIKhZR4m5a1DlH0PxAcdo084HddRTlEDhfILgH0IN8Nl+G2Scmb9zzWQW sUnpFtzssLzjtFOgfHu76WNtRa4IM8q+eYASQcECB3WlQgU2qgMivvLspcnUFM+1kxVW qbIVRQCCpHtdfPcZ6E50JGg3FbVguK8bnKx8Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765793102; x=1766397902; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dweruoFS2hSzD89842ZkHTQ+jWI4ilFOHwDM6py/yME=; b=BBLy3VdDxJ+AiPgh42EN6MBWaeWG3Wq/5MwiU1eHaxPt37Ib39NpUjghQLlURv4bem oybix3h+3X9QfDmQBiGSQ8TUEpj0IZ56DqtKicTaW/ondLOIrvPopv+gRVRb0HW9cH3I OupzKJvLWQAPb6TXkxAnvZ9dpdDRDRcBzOkiC0/DgAhGk8klItZ/RkvT2XiOwYSSLLgo NqGfw6BqiAKNfBPaTfkEpN4zW76Oi6fWaR0nOb0CnfWIEgJ6XenDfa2Jhu3e9sbfwc2o SkJht9ziYsDXwpoRBjSorf1YXCZ6cAwP6hxxa2rXb7buTO3QuG2bOSsYnFNy5RqgzmOL 8XnA== X-Gm-Message-State: AOJu0Yy3cRoDT1U6O+okq+bXWohwAWfA0KjHR3nhijE58mpbnG66ogmK /ufUNHIc16zOYR17t4JuI+ZjFAqZpsRmMVaVtBjAsoK+jqfhO3kWkhiiN2WnDCF5gE/G47ahyJZ 1923E X-Gm-Gg: AY/fxX5rfW7yPbElUIHTtzLo1DVJbyiuW8vFN7Z0PgbzBSli1/buMLk0kzAHMokrUhc /F8zvK0690RL+O4stx/hLcxaMRbvFv+FschczzZ609kDDsnRxT0iThWln+/IjQO4Pz6WkTisWEW 2+MJOePnEwXLVPQK9zZKzr/D8t7GEvfXRQmML0+juhGds7ZnIByWO/8khDKFWOqlXrxUYe2F+IO I59yycIymzLAUJ3304aVLSRxPGjGMJAUmjG4EuDMVQUWAOaa19kM7iKRr5m6evOZtC1pwciE+fi KUNWLChpYz5oUCQXr/RYu8UOROWyeoV0aerfCws5do3+iFcbcSbKYiQyxcrJ8QBOqe4at20NZXY QKc9HXY+8y1sInv6vhV4dmfugrk+khtYlQgGtoqzBCAbt2GQ1FGv+TpqX1wyiIFI8n0h8yq2Nqe BYy+u7yilNDRcs6R2CyZj9MjDdMEX1AJK3yJoY8a/yUDt2kbQXLki6oYrHXGxxW3fC3BF7wlsnC niN5OjG4U1bSqOLluQ37+lEq32e61V8wZ+nqujFbkqLFfD+sRDKM0tJbmSVWRsGtCX/ X-Google-Smtp-Source: AGHT+IH/91gaT0QBEPbCIWEF23nV9nEN7Y8og4XIcAa1Scvx/0/RLR0kLG6rp9iIjz7vPGWGj2c+DQ== X-Received: by 2002:a17:907:9689:b0:b77:18a3:cd2d with SMTP id a640c23a62f3a-b7d232e1e97mr557937466b.0.1765793102500; Mon, 15 Dec 2025 02:05:02 -0800 (PST) Received: from adam.amarulasolutions.com (2001-1c00-8101-1200-3ddc-5bb8-0efa-16f1.cable.dynamic.v6.ziggo.nl. [2001:1c00:8101:1200:3ddc:5bb8:efa:16f1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7cfa57192bsm1336898366b.53.2025.12.15.02.05.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Dec 2025 02:05:01 -0800 (PST) From: Adam Duskett To: openembedded-core@lists.openembedded.org Cc: Adam Duskett Subject: [PATCH v3 1/6] signing-keys.bb: Fix DISTRO_CODENAME truncation Date: Mon, 15 Dec 2025 11:04:55 +0100 Message-ID: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 15 Dec 2025 10:05:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/227706 If DISTRO_CODENAME is not set in the environment, bash quietly drops the string resulting in a key such as PACKAGEFEED-GPG-KEY-defaultsetup- However, when python calls self.d.getVar('DISTRO_CODENAME'), the resulting string is 'None', leading to a configuration file pointing to a key such as PACKAGEFEED-GPG-KEY-defaultsetup-None Add a default value in signing-keys.bb to set DISTRO_CODENAME to None if DISTRO_CODENAME is not set. Signed-off-by: Adam Duskett --- meta/recipes-core/meta/signing-keys.bb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes-core/meta/signing-keys.bb index 94f4032911..c7713ed4a6 100644 --- a/meta/recipes-core/meta/signing-keys.bb +++ b/meta/recipes-core/meta/signing-keys.bb @@ -45,6 +45,10 @@ addtask get_public_keys before do_install do_get_public_keys[depends] += "gnupg-native:do_populate_sysroot" do_install () { + # Python evalutes an empty DISTRO_CODENAME to "None" which would cause mismatched files + # as the update config file would show GPG-KEY-${DISTRO}-None but the filename is + # installed as GPG-KEY-${DISTRO}- + DISTRO_CODENAME="${DISTRO_CODENAME:-None}" if [ -f "${B}/rpm-key" ]; then install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}" fi @@ -57,6 +61,7 @@ do_install () { } do_deploy () { + DISTRO_CODENAME="${DISTRO_CODENAME:-None}" if [ -f "${B}/rpm-key" ]; then install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO}-${DISTRO_CODENAME}" fi From patchwork Mon Dec 15 10:04:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 76516 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 E252FD5B173 for ; Mon, 15 Dec 2025 10:05:13 +0000 (UTC) Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.45212.1765793105012825365 for ; Mon, 15 Dec 2025 02:05:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lxuGk12S; spf=pass (domain: amarulasolutions.com, ip: 209.85.218.50, mailfrom: adam.duskett@amarulasolutions.com) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-b7a02deecccso56549466b.3 for ; Mon, 15 Dec 2025 02:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1765793103; x=1766397903; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6zk6gwaQfzuC7Z8mPtylj14JajUNqVWdxX4jr1MbhPI=; b=lxuGk12SDTSXxm6BF3/BbetQgN2f2gXAmDZmsL4TyL/9QIIP4RTZszwwxz43wpEz4V 3POQ6fTPND5c2fVzETWRiRCITHFLQ1oAvOtj6xYnvlA5/Gb2qiXD/W6WvDxaIhuZW4BN +QySOXDafljgivyw9/zl753ZAj68avIoZvTBw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765793103; x=1766397903; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6zk6gwaQfzuC7Z8mPtylj14JajUNqVWdxX4jr1MbhPI=; b=KbR1f+0kN69BYPOtfNuIMKN0nbye60e0YhDymVKdDgU2ZEABerPhEfn2B+ndvbjhdK 9cPHPABHGbmG/UE0RvtxmRBRvj8NohvZu8BiK4pq+E2aUA6NWMcmKopBto9vfVG7Toa0 nsH/EbrshLW9SbzzghruvmAXmW0iJGWlSI0vhEPEOXmQ3/bOYE7XE0uLykF0cFmAhRiH AaGOo2eUkZdvKrawh1644ufP4MdKPPpHca0vTkKfFOHOhpgutCRf4gnVv4a5tvM4ULTr wXba7WKZ7q57SLRP3u12nxL4VVuF72lLlY0uxwI+EVWHib9026UAhCZ0EzIPu07YBSht PyMg== X-Gm-Message-State: AOJu0YwTI1SbJb0pTA0Fn4OzhGTIXPGUzExiasyCi/hAuJOK5tEjA5l2 0iY1Zw6UTm4//BoYqRFwtir3MVFKApggAMTJlGrSS2We9ZTNQzZiEpOCFTwNNiztE3EaUtCxK9X eeSTD X-Gm-Gg: AY/fxX43ECNHCIE/1r0J/rJvAc4MP28h22TE7rB+Pq+Iy2wFDThQ/NQpeDS3mTyj0h9 TiVlTdrDQV9VpzJNrtyw6fntJR1HISrQEqCcDVPXc6rj9jwrFqmKsrwfV37N8YeE7kDd1dF2u6T hBPdJKijmiq1SL+USYeZx3w5LR4OuhnK2iyDHSrLKsizPdY8/K2b9rICGcws8pYR7yVL1tNTKYc 7SPAnkN8w5FQAE6Sv7nwVn6PYOuvF+GOCBENwTTJ7Y3IIsKgwIZ6I57UXR4cdO5EgaS0vbO1hiF u2YQrRi88OiYeVwiHu+0qUjDZSR8SwnofKRQm55E/SVOwpMqNwCXeIs1gSLIZ4qmi+9w8ofUcpR ZbRZ1eunby0RQV8DCMGwcWapIBtJI/amaXvHoga+AHHRZxM4D5fMd4P9SdFmG4OkyjziIXccRTZ aP8uM2thFF7svx67KZa56se6cx1eVCeMm3f20ey3fM5OcM2Lsh3CJvcel+Cxf1AhYKHHtPw93FW nLCkOgz9JdwLV+iIJEDCNp6B0EzO359lHze9aY202gtL2WFyN4srDrvqg== X-Google-Smtp-Source: AGHT+IEmlLG27D5SyoIZ/WG4/1tGOkm1G7I5+GUsbXV7169SZmnnBaPwG69S/cRxYLAgJUvZgqSTUg== X-Received: by 2002:a17:907:8693:b0:b76:2667:7736 with SMTP id a640c23a62f3a-b7d23b6fbd5mr635958266b.4.1765793103141; Mon, 15 Dec 2025 02:05:03 -0800 (PST) Received: from adam.amarulasolutions.com (2001-1c00-8101-1200-3ddc-5bb8-0efa-16f1.cable.dynamic.v6.ziggo.nl. [2001:1c00:8101:1200:3ddc:5bb8:efa:16f1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7cfa57192bsm1336898366b.53.2025.12.15.02.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Dec 2025 02:05:02 -0800 (PST) From: Adam Duskett To: openembedded-core@lists.openembedded.org Cc: Adam Duskett Subject: [PATCH v3 2/6] libtoml: new recipe Date: Mon, 15 Dec 2025 11:04:56 +0100 Message-ID: <20251215100500.1626964-2-adam.duskett@amarulasolutions.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> References: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 15 Dec 2025 10:05:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/227707 DNF5 requires libtoml. As such, copy libtoml verbatim from meta-openembedded to openembedded-core. Signed-off-by: Adam Duskett --- meta/conf/distro/include/maintainers.inc | 1 + .../distro/include/ptest-packagelists.inc | 1 + .../0001-Remove-whitespace-in-operator.patch | 46 +++++++++++++++++++ .../libtoml11/files/run-ptest | 12 +++++ .../libtoml11/libtoml11_4.4.0.bb | 38 +++++++++++++++ 5 files changed, 98 insertions(+) create mode 100644 meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch create mode 100755 meta/recipes-devtools/libtoml11/files/run-ptest create mode 100644 meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 8971b9b552..da642ac3c5 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -405,6 +405,7 @@ RECIPE_MAINTAINER:pn-libsoup = "Unassigned " RECIPE_MAINTAINER:pn-libssh2 = "Unassigned " RECIPE_MAINTAINER:pn-libssp-nonshared = "Khem Raj " RECIPE_MAINTAINER:pn-libtasn1 = "Unassigned " +RECIPE_MAINTAINER:pn-libtoml11 = "Unassigned " RECIPE_MAINTAINER:pn-libtest-fatal-perl = "Tim Orling " RECIPE_MAINTAINER:pn-libtest-needs-perl = "Tim Orling " RECIPE_MAINTAINER:pn-libtest-warnings-perl = "Tim Orling " diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 09613294d6..ec0e2d1637 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -40,6 +40,7 @@ PTESTS_FAST = "\ libtest-needs-perl \ libtest-warnings-perl \ libtimedate-perl \ + libtoml11 \ libtry-tiny-perl \ libusb1 \ libxml-namespacesupport-perl \ diff --git a/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch b/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch new file mode 100644 index 0000000000..c8c9922d55 --- /dev/null +++ b/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch @@ -0,0 +1,46 @@ +From dee78f822d8a5b985e565e5c1ef42a59557aa8fc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Mar 2025 11:35:46 -0800 +Subject: [PATCH] Remove whitespace in operator"" + +Clang 20+ errors about this whitespace. + +Fixes +include/toml11/impl/../fwd/literal_fwd.hpp:22:26: error: identifier '_toml' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] +| 22 | ::toml::value operator"" _toml(const char* str, std::size_t len); +| | ~~~~~~~~~~~^~~~~ +| | operator""_toml + +Upstream-Status: Submitted [https://github.com/ToruNiina/toml11/pull/285] +Signed-off-by: Khem Raj +--- + include/toml11/fwd/literal_fwd.hpp | 2 +- + include/toml11/impl/literal_impl.hpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/toml11/fwd/literal_fwd.hpp b/include/toml11/fwd/literal_fwd.hpp +index e46612c..82f62b7 100644 +--- a/include/toml11/fwd/literal_fwd.hpp ++++ b/include/toml11/fwd/literal_fwd.hpp +@@ -19,7 +19,7 @@ inline namespace literals + inline namespace toml_literals + { + +-::toml::value operator"" _toml(const char* str, std::size_t len); ++::toml::value operator""_toml(const char* str, std::size_t len); + + #if defined(TOML11_HAS_CHAR8_T) + // value of u8"" literal has been changed from char to char8_t and char8_t is +diff --git a/include/toml11/impl/literal_impl.hpp b/include/toml11/impl/literal_impl.hpp +index e8298c2..067d4ed 100644 +--- a/include/toml11/impl/literal_impl.hpp ++++ b/include/toml11/impl/literal_impl.hpp +@@ -115,7 +115,7 @@ inline namespace toml_literals + { + + TOML11_INLINE ::toml::value +-operator"" _toml(const char* str, std::size_t len) ++operator""_toml(const char* str, std::size_t len) + { + if(len == 0) + { diff --git a/meta/recipes-devtools/libtoml11/files/run-ptest b/meta/recipes-devtools/libtoml11/files/run-ptest new file mode 100755 index 0000000000..9bc480aa7f --- /dev/null +++ b/meta/recipes-devtools/libtoml11/files/run-ptest @@ -0,0 +1,12 @@ +#!/bin/sh + +cd tests +for atest in test_* ; do + rm -rf tests.log + ./${atest} > tests.log 2>&1 + if [ $? = 0 ] ; then + echo "PASS: ${atest}" + else + echo "FAIL: ${atest}" + fi +done diff --git a/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb b/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb new file mode 100644 index 0000000000..38786b79ed --- /dev/null +++ b/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb @@ -0,0 +1,38 @@ +SUMMARY = "TOML for Modern C++" +DESCRIPTION = "toml11 is a feature-rich TOML language library for \ + C++11/14/17/20." + +HOMEPAGE = "https://github.com/ToruNiina/toml11" + +SECTION = "libs" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3" + +PE = "1" + +SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286" +SRCREV_json = "8c391e04fe4195d8be862c97f38cfe10e2a3472e" +SRCREV_doctest = "ae7a13539fb71f270b87eb2e874fbac80bc8dda2" + +SRC_URI = "git://github.com/ToruNiina/toml11;branch=main;protocol=https \ + git://github.com/nlohmann/json;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/tests/extlib/json;name=json;branch=develop;protocol=https \ + git://github.com/doctest/doctest;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/tests/extlib/doctest;name=doctest;branch=master;protocol=https \ + file://0001-Remove-whitespace-in-operator.patch \ + file://run-ptest \ +" +SRCREV_FORMAT = "json_doctest" + + +inherit cmake ptest + +EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \ + -DTOML11_BUILD_TESTS=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "ON", "OFF", d)} \ +" + +ALLOW_EMPTY:${PN} = "1" + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -r ${B}/tests/test_* ${D}${PTEST_PATH}/tests +} From patchwork Mon Dec 15 10:04:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 76515 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 D54E2D5B174 for ; Mon, 15 Dec 2025 10:05:13 +0000 (UTC) Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.45039.1765793105622234498 for ; Mon, 15 Dec 2025 02:05:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=P4MxN+EE; spf=pass (domain: amarulasolutions.com, ip: 209.85.218.51, mailfrom: adam.duskett@amarulasolutions.com) Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-b79f698aa91so58513366b.1 for ; Mon, 15 Dec 2025 02:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1765793104; x=1766397904; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lfbymjVqmTRLCGavhA4WUXJdBy1KHmliPei8eahndYs=; b=P4MxN+EEohUFDI5EeEIMaVP+kAsME2wb8r2/+tvfItNYqLweRIPOzoBNWp7/vYS6zr kbuTPM3CMI99eeyrAh/Y84+nrphMgWglYNj1Ql+JSUtECS9e7WhIEQghNcEcR1jtTmU2 3QCVk7VjmHQeCQVwwFYVrwm0sU/MKdbb8BRwY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765793104; x=1766397904; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lfbymjVqmTRLCGavhA4WUXJdBy1KHmliPei8eahndYs=; b=wbTjpImsdNQ74PsyJbzcYUo8adIByCaRRllh24KNAefqrmZ3MOaDxs+mSuZZgnl0ZO HE11m6K0d1ck1ku//XC0hVYvU7cLEW310UnliHzgVTpA21C78vzjhO1SHepdp7zmMCid jcnVM0uZg3VwpcRUSF/0/KhJ4qwkP8BXPqKCfrriYP4BvoIGSOEA2HMIv38Hw19PGUzK L6uUg5J9qGEvruEF8ZETcxuRBWpvDPhHELRUHmblL1ThXOPsKbWn8D/zqXAS2vhSnBEc 7OKN/gApP3ka/vx/H8Wz6XQ+s8VT8wUVaeUrBhiuz3Gtdy42AbAtNPQVxSKwg7qRrwcY p85g== X-Gm-Message-State: AOJu0YzndpkDGFLjFzg5Q4e1eDpBnpahQaH84CUMlsvHA1yNe283Lp5c Q/4rbMzOzWxfid0PUQyk3njRIom5xZbxQtM/X6pRdpB0JYCZctnuiunH0X9BUto6HSuXvrpkfl7 IVciA X-Gm-Gg: AY/fxX73nmwknHHKHNXWvQFyUjwMBF7FeG9aJuVhUtm/QaUkhZhSCep/IPiMO4vbyws 9w3gfzjOv5lCjOiBE7t4Cc/xvN5Gu3pNnWDXElmRvoYRRetHbifqADNGFH4Rg14eKWlMFCfliYw /UCvAk2i2TNO/e3mi/xWkVLUFiU0OOdprExuIxpXURm1Ot0n/c2ZMgu2oCz+5ekF33uXgDQ7V0/ 7qUDFWS3YuLzNlx8XGKcSNbXUSzUbr6JJzKU7xz4Z+I0nGsp2YNJjjEn6Xh3tjOjJyWhdEoKcOV /H6WHGmahCayXbRSwZ4CURdPLTMLXP98GU8btXqrfDbxJdYbbr1TsLfvGErNUAG+FGCO5xON+/L xyPkbZFde1YgC9ve0DfqZfDYGhlzuqk4Qm5I1qFUfNt4RDGcCgSDeCwoMD3QRxAFDhTv++Sq6KL M37/WibJloiwSjl7m7VS1zmvEMw87wVGecv5qXKgADVBGM5I3og3PsJSExPlspiF14KrkgXKznA lARggXjJStTcUSv0anZ04SNtl3eQUdZn0gNSbrzPkPGtLLBHihFTjGAbg== X-Google-Smtp-Source: AGHT+IGpt+Dm8rzizukdK4DizjRjKDxY28RHes6sNsAN2wmKNElbVWgRNfEa/yQCkPdQ0BJVA32zgg== X-Received: by 2002:a17:907:9689:b0:b73:8bdb:9608 with SMTP id a640c23a62f3a-b7d235b1605mr569118466b.2.1765793103829; Mon, 15 Dec 2025 02:05:03 -0800 (PST) Received: from adam.amarulasolutions.com (2001-1c00-8101-1200-3ddc-5bb8-0efa-16f1.cable.dynamic.v6.ziggo.nl. [2001:1c00:8101:1200:3ddc:5bb8:efa:16f1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7cfa57192bsm1336898366b.53.2025.12.15.02.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Dec 2025 02:05:03 -0800 (PST) From: Adam Duskett To: openembedded-core@lists.openembedded.org Cc: Adam Duskett Subject: [PATCH v3 3/6] libtoml11: cleanup package to adhere to the recipe style guide Date: Mon, 15 Dec 2025 11:04:57 +0100 Message-ID: <20251215100500.1626964-3-adam.duskett@amarulasolutions.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> References: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 15 Dec 2025 10:05:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/227708 - Add a BUGTRACKER link - Move SRCREV to below SRC_URI - Use gitsm instead of multiple git entries in the SRC_URI - Remove SRCEV_FORMAT as it is not needed. - Add a tag to the SRC_URI - Add a UPSTREAM_CHECK_GITTAGREGEX field - Use `PTEST_ENABLED 1` instead of `DISTRO_FEATURES ptest` - Change "Submitted" in 0001-Remove-whitespace-in-operator.patch to "Backport" with the appropraite link to the relevant commit hash. - Clean up run-ptest. - Add libtoml11 to maintainers.inc and ptest-packagelist.inc Signed-off-by: Adam Duskett --- V1 -> V2: Add this patch to the series .../0001-Remove-whitespace-in-operator.patch | 2 +- .../libtoml11/files/run-ptest | 15 +++++---- .../libtoml11/libtoml11_4.4.0.bb | 33 +++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch b/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch index c8c9922d55..9516ee5cb1 100644 --- a/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch +++ b/meta/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch @@ -11,7 +11,7 @@ include/toml11/impl/../fwd/literal_fwd.hpp:22:26: error: identifier '_toml' prec | | ~~~~~~~~~~~^~~~~ | | operator""_toml -Upstream-Status: Submitted [https://github.com/ToruNiina/toml11/pull/285] +Upstream-Status: Backport [https://github.com/ToruNiina/toml11/commit/dee78f822d8a5b985e565e5c1ef42a59557aa8fc] Signed-off-by: Khem Raj --- include/toml11/fwd/literal_fwd.hpp | 2 +- diff --git a/meta/recipes-devtools/libtoml11/files/run-ptest b/meta/recipes-devtools/libtoml11/files/run-ptest index 9bc480aa7f..22d6f7e0e1 100755 --- a/meta/recipes-devtools/libtoml11/files/run-ptest +++ b/meta/recipes-devtools/libtoml11/files/run-ptest @@ -1,12 +1,13 @@ -#!/bin/sh +#!/usr/bin/env sh cd tests -for atest in test_* ; do - rm -rf tests.log - ./${atest} > tests.log 2>&1 - if [ $? = 0 ] ; then - echo "PASS: ${atest}" + +rm -rf tests.log + +for i in test_* ; do + if ./"${i}" >> tests.log 2>&1; then + echo "PASS: ${i}" else - echo "FAIL: ${atest}" + echo "FAIL: ${i}" fi done diff --git a/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb b/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb index 38786b79ed..c3b00511ae 100644 --- a/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb +++ b/meta/recipes-devtools/libtoml11/libtoml11_4.4.0.bb @@ -1,9 +1,10 @@ SUMMARY = "TOML for Modern C++" -DESCRIPTION = "toml11 is a feature-rich TOML language library for \ - C++11/14/17/20." - +DESCRIPTION = "\ + toml11 is a feature-rich TOML language library for \ + C++11/14/17/20. \ +" HOMEPAGE = "https://github.com/ToruNiina/toml11" - +BUGTRACKER = "https://github.com/ToruNiina/toml11/issues" SECTION = "libs" LICENSE = "MIT" @@ -11,23 +12,19 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3" PE = "1" -SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286" -SRCREV_json = "8c391e04fe4195d8be862c97f38cfe10e2a3472e" -SRCREV_doctest = "ae7a13539fb71f270b87eb2e874fbac80bc8dda2" - -SRC_URI = "git://github.com/ToruNiina/toml11;branch=main;protocol=https \ - git://github.com/nlohmann/json;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/tests/extlib/json;name=json;branch=develop;protocol=https \ - git://github.com/doctest/doctest;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/tests/extlib/doctest;name=doctest;branch=master;protocol=https \ - file://0001-Remove-whitespace-in-operator.patch \ - file://run-ptest \ +SRC_URI = "\ + gitsm://github.com/ToruNiina/toml11.git;protocol=https;branch=main;tag=v${PV} \ + file://0001-Remove-whitespace-in-operator.patch \ + file://run-ptest \ " -SRCREV_FORMAT = "json_doctest" - +SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286" +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" inherit cmake ptest -EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \ - -DTOML11_BUILD_TESTS=${@bb.utils.contains("DISTRO_FEATURES", "ptest", "ON", "OFF", d)} \ +EXTRA_OECMAKE += "\ + -DTOML11_PRECOMPILE=ON \ + -DTOML11_BUILD_TESTS=${@bb.utils.contains("PTEST_ENABLED", "1", "ON", "OFF", d)} \ " ALLOW_EMPTY:${PN} = "1" @@ -36,3 +33,5 @@ do_install_ptest () { install -d ${D}${PTEST_PATH}/tests cp -r ${B}/tests/test_* ${D}${PTEST_PATH}/tests } + +BBCLASSEXTEND = "native nativesdk" From patchwork Mon Dec 15 10:04:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 76514 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 CB9E3D5B172 for ; Mon, 15 Dec 2025 10:05:13 +0000 (UTC) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.45213.1765793106255887310 for ; Mon, 15 Dec 2025 02:05:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=rFhWsD3U; spf=pass (domain: amarulasolutions.com, ip: 209.85.208.42, mailfrom: adam.duskett@amarulasolutions.com) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-64981647564so479753a12.2 for ; Mon, 15 Dec 2025 02:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1765793105; x=1766397905; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Rr7gIuDm4NBc47Dk+FZvMdqdV+j8DGLfSt/7BpLfNlk=; b=rFhWsD3UVmS09MnBqfkyjsFqCOwL/6JJeNeyEqfskm0D0BBbB/ByRGBDfj1Cym2iDf CnaArCr6o6M1yuhX/5obyL8Ey3e5mNxGg1R3ubmVCOwWA9yaXAOrfFeKM79HO2/ukpu8 D9sGw51OtQPzMJWF5y89WDVCZdUTxTcWnCZk0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765793105; x=1766397905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Rr7gIuDm4NBc47Dk+FZvMdqdV+j8DGLfSt/7BpLfNlk=; b=HEOGlg+xOEn7nmdl9B6tnmxm3IOEVpTgLm4QW4ejYrT6Y2+X4ZgdkhGjfZ45AZb0nQ 0OSWAqna9KvZoNzitM/Qnot2vpPxTH+SQtWu4XuS83VaL3/zwypLnjNUAjyrErq4k0UV aqzRKHUhoO9coWtZ/jVudTXF5q91TpWhosh8K0QpYms2nihkVpFx3bYuqSDGXPvgMzkA Bx0axNb4r8dwqNiOTrwIL4uf0fJX5rNPRi3hiMEgx/hKGWmQv/YL1KrY0O1KJQkflvie 6rz0/TwAqWZxi33G4lgUylIRbqxnjOnnjQYWcyf+O/blqu1fXM50840DHGoSGjRB7Y3P aOaA== X-Gm-Message-State: AOJu0YwhRawKW8q/mGF18g3iMvLAfIgQXL9lJqXOzwTThfftirkn9IcD F721jCQ4ZTp3tvNJrnMvlIQRkXxk516QrWC/x+QO4jcnOcbCstEi5ccQGxhKWUctmwn5j4voCZV A2KDc X-Gm-Gg: AY/fxX4N3Bgvu0OBeYYFGjwJXhn61rAbBu1US+qFr8lxtQRXH25UFOzOBjxkZzkIGOO oMzv2dHNhfPsA0/A1+pg2A6rBid+UWGmn0fmDhcxhEVzChzmTct/1nRvjImUHmsMwRKDEWnm0Rv wSKpJ1TkskGyQnTShZhXuQDs7kM1HdsBWJh6tNsZ54oswA888DmiBuw26Hf+54iAocBY41mocBZ WTobJ1KTTHxOQUJdz1u+butJBpxQ/ri2zfaERQav6lEMgwCrcyS8ZKGZfhqnJSHzeoXxZNHyqWn fdf+q1XOfc3fYzdemdUGVJR61B78kJHKlH0OUtzRJlIDpLhezpZM9oeyYS43KnU7x2Qz3MzPz42 MnPBrCfFIwXEh6mkZgF4Vb1BHYpYUqUCoCIP3cRTjcqZAXkwm/IB9VyWPY07RgUm1aRG/0KvsB/ PbcUNpm9snehT9Q2oI7UjB0zYsuCQ99sD+dUZhHrmak6ZqooSCUxvDC2gUuWVZF5KdE7OEQnmKA ca2ZfwjN7vrIPviRV1Qjo3EpmyZw5k3+jFUkdMoUnM5ALPxHIyIwZGLUw== X-Google-Smtp-Source: AGHT+IEGJ/NIECIDv4wyFse7vM/j/6FVgpWt84GMcOGPOh/X6ntpedCJ5ib3ea9d02K0LW8adRIJ9g== X-Received: by 2002:a17:907:d27:b0:b72:5d4a:45d4 with SMTP id a640c23a62f3a-b7d237b540bmr656451466b.3.1765793104569; Mon, 15 Dec 2025 02:05:04 -0800 (PST) Received: from adam.amarulasolutions.com (2001-1c00-8101-1200-3ddc-5bb8-0efa-16f1.cable.dynamic.v6.ziggo.nl. [2001:1c00:8101:1200:3ddc:5bb8:efa:16f1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7cfa57192bsm1336898366b.53.2025.12.15.02.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Dec 2025 02:05:04 -0800 (PST) From: Adam Duskett To: openembedded-core@lists.openembedded.org Cc: Adam Duskett Subject: [PATCH v3 4/6] libsolv: explicitly enable comps for rpm packageconfig Date: Mon, 15 Dec 2025 11:04:58 +0100 Message-ID: <20251215100500.1626964-4-adam.duskett@amarulasolutions.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> References: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 15 Dec 2025 10:05:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/227709 dnf5 requires solv/repo_comps.h Signed-off-by: Adam Duskett --- meta/recipes-extended/libsolv/libsolv_0.7.35.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-extended/libsolv/libsolv_0.7.35.bb b/meta/recipes-extended/libsolv/libsolv_0.7.35.bb index ec74308bb5..52bbc1c4a3 100644 --- a/meta/recipes-extended/libsolv/libsolv_0.7.35.bb +++ b/meta/recipes-extended/libsolv/libsolv_0.7.35.bb @@ -19,7 +19,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" inherit cmake PACKAGECONFIG ??= "${@bb.utils.contains('PACKAGE_CLASSES','package_rpm','rpm','',d)}" -PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON,,rpm" +PACKAGECONFIG[rpm] = "-DENABLE_RPMMD=ON -DENABLE_RPMDB=ON -DENABLE_COMPS=ON,,rpm" EXTRA_OECMAKE = "-DMULTI_SEMANTICS=ON -DENABLE_COMPLEX_DEPS=ON -DENABLE_ZSTD_COMPRESSION=ON -DENABLE_STATIC=ON" From patchwork Mon Dec 15 10:04:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 76512 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 BD53ED59D99 for ; Mon, 15 Dec 2025 10:05:13 +0000 (UTC) Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.45214.1765793106995631268 for ; Mon, 15 Dec 2025 02:05:07 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=W9dScrHA; spf=pass (domain: amarulasolutions.com, ip: 209.85.218.44, mailfrom: adam.duskett@amarulasolutions.com) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-b79f698aa91so58513866b.1 for ; Mon, 15 Dec 2025 02:05:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1765793105; x=1766397905; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9rakWXif7/2W2aWvX2S8sH08Hq00+0jnjL6Ub+zmcJQ=; b=W9dScrHAHmzMNqI40iI3lnNfKT7heI8iS/P6vqyOmXEs860U8lQeKhQJVrjyyHWL9M aqNFU+qooH1v3xf1/8dqD6Lyk4Qc5VAlGj8M+2e2Pqw/uMxG+QGzb74oQkRLin9dZeWl +13wLv3Ri+ug7FtJZFTpa5xfkPsz9DlQK15Pc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765793105; x=1766397905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=9rakWXif7/2W2aWvX2S8sH08Hq00+0jnjL6Ub+zmcJQ=; b=oryImQ/COykoHujs5cWplh5xr3ZcZATvrPVjUFB/BMJho+aGN4aS+b/CTTUHz/s9ry LH30QYnruZoTz/NWPHXmJ1tV4WZ80xyj0hLwoVFd4hfARx7SvZzj0tGp8Fw08gTR6L9R NoLoTuEd4lciO6sDsJnDMsw7hKuMpAEU3C+U3jMrHyUaISANq4+2aq01TO52tkZdHa7M 4K3fyQc87nbCElk72TrBwavidKrXOBHhJCzlrYe6zF/sTZtmWfVsmsDIyZw+ulERW10m 66VUEYjt8pFSEA5OafpKXySIYhHwj9c1heBW8E1VFWXXoqswsOKXfDLCq7DbmPH9sqh+ NT/A== X-Gm-Message-State: AOJu0YxT+9bI0oR6kzd+M8hmF9zFd+Xd0msTRaZVWiaRMgYs44Nei/52 lI9SbAX4SSHnvcKZCi9JTdibTEJSYE35Z0zAixAmqH4jHG4UpwuWtNeErSMWa5K6IIP9M26sO3V VHkD8 X-Gm-Gg: AY/fxX50tAxw3ijEapwfG6YgqQB8byzKgr+ghOvrGuPzc0462xeKj7LWV8g4cK6AH6P NaP2uIFTbN378E1VR1R0BA21qN+N7PRYGuKgmjUQohizHcfi8JYbiMsxjmez6w4LlM/pryoenaX GG125kuZwZBkQpiJdhRgYHPlaeKIbJm7zJgx+7yVT4uq16TuHoIoQ6w+bHmtKs7xhUD8R+pEayQ 7KWCuMmcWdR267aZ6S7uYi3BUU4dZ44VrdHYtAqEBcNteItwxmrGCbACYuI2CAanHxTm2wsq9YQ UwvdKzFDP9vIJjkNCMDNBx3gUuIwQ0ivujIpLDj072NE5N+zis9SuwlZyZNSDnLgm8mWemQx02y UV/dibPnqG6cpFNX9CB378xlb51ce51lduGSrFG8m2k8m375vwVYNy2W5YWLV6/rGyxpTnxCb2s DX4NqKlvNB+GyLlqqu0qsRRQAeRZ1x/YeYcyZhPc6Z8ROFAO6jT/qZoA4afuTz0QMiIJE/3Vjxo fpwkiaFPSfhOcTVotFyg+04nyNpNsXURA8xvE6oeS9XZsr4UisGTvo3Nw== X-Google-Smtp-Source: AGHT+IHw0dSZ+wvqxyjv1lyfVKlDMHhQ1oVZYRyzw5oDwH5cqdQ8DCcM948mzlXQHLu96hN/8v986w== X-Received: by 2002:a17:907:94c6:b0:b76:3d45:51d9 with SMTP id a640c23a62f3a-b7d2320d0demr601998266b.0.1765793105208; Mon, 15 Dec 2025 02:05:05 -0800 (PST) Received: from adam.amarulasolutions.com (2001-1c00-8101-1200-3ddc-5bb8-0efa-16f1.cable.dynamic.v6.ziggo.nl. [2001:1c00:8101:1200:3ddc:5bb8:efa:16f1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7cfa57192bsm1336898366b.53.2025.12.15.02.05.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Dec 2025 02:05:04 -0800 (PST) From: Adam Duskett To: openembedded-core@lists.openembedded.org Cc: Adam Duskett Subject: [PATCH v3 5/6] librepo: add PACKAGECONFIG[sequoia] Date: Mon, 15 Dec 2025 11:04:59 +0100 Message-ID: <20251215100500.1626964-5-adam.duskett@amarulasolutions.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> References: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 15 Dec 2025 10:05:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/227710 Currently, librepo compiled with -DUSE_GPGME=ON (the default setting) causes dnf5 to fail importing repository keys. A very long writeup of the issue is linked below. [1] Add a new PACKAGECONFIG[sequoia] option which sets -DUSE_GPGME=OFF and adds rpm and rpm-sequoia to the dependency list which ensures dnf5 works with repository signing. 1: https://github.com/rpm-software-management/dnf5/issues/2539 Signed-off-by: Adam Duskett --- v1 -> v2: Clean up several typos in the commit message meta/recipes-devtools/librepo/librepo_1.20.0.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/recipes-devtools/librepo/librepo_1.20.0.bb b/meta/recipes-devtools/librepo/librepo_1.20.0.bb index 6557dda43a..7a2e9e6b9b 100644 --- a/meta/recipes-devtools/librepo/librepo_1.20.0.bb +++ b/meta/recipes-devtools/librepo/librepo_1.20.0.bb @@ -15,6 +15,8 @@ DEPENDS = "curl glib-2.0 openssl attr gpgme libxml2" inherit cmake setuptools3-base pkgconfig +PACKAGECONFIG[sequoia] = "-DUSE_GPGME=OFF,-DUSE_GPGME=ON,rpm rpm-sequoia" + EXTRA_OECMAKE = " \ -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} \ -DPYTHON_DESIRED=3 \ From patchwork Mon Dec 15 10:05:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 76517 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 BB74CD5B170 for ; Mon, 15 Dec 2025 10:05:13 +0000 (UTC) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.45040.1765793108385792672 for ; Mon, 15 Dec 2025 02:05:08 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=k6Y1U7kr; spf=pass (domain: amarulasolutions.com, ip: 209.85.218.49, mailfrom: adam.duskett@amarulasolutions.com) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-b7355774747so34653166b.2 for ; Mon, 15 Dec 2025 02:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1765793107; x=1766397907; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hwQtC7rO3wVzJLK554YLqxN3wiY8sEoR/ljunBBOPxs=; b=k6Y1U7krmDGmQl3xCq4bP2fp/gx/eFNbrwltv7/tAPkmfvWV/C8Za6RjWuWG8G7exJ UXes1ePsiNzq0z4aZdD3Rt6D3GNI2OFtvTQJqQtJ3G4kK89s5tUmPmwbE72+d8gzC+J8 Ng+wA5wkS4sMIP81hWWN99xX+hKdiM8o/0RT8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765793107; x=1766397907; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=hwQtC7rO3wVzJLK554YLqxN3wiY8sEoR/ljunBBOPxs=; b=G5TLON+/XawfpMsMSOseZ2Y5tesPlL6WrASXLY1KturnPfQqavty/oO0362QkDrEYK 32WsX4ydZdzOzZg0UihJXN4TGwH9L7IQ9VVOc9J/mAuiaXFuQd0mh5NFan6x0Y+moU9N +txHAB/G7HD16J7TYdU7acBiykDsZMJUrIYO2fuHCxThGf/FZ8vLFh5h7nqMUPuyQozc 20LqTrmaJEnkCWI5dAeDKiRe2DwrmrS2ZIc2VKcvMLkBLX0rmh9eNvKcPvyb0WCDpcb9 gY/A+aAxF9d7KxIldJ3zknjn/NO7W6HTAlpqmp5K1fdy+0GxEUxfPd/gjGO5Rhou/UTN 4AeA== X-Gm-Message-State: AOJu0YytstI5ZjxrgQTJ3lzmTp4cdBGG5kejXdax5oJKxZx37Ir6QHjc vor7NyeRUdyhvfa/W/F72C0vWpa8zLDULt6CvyPR+dXH+G9ZsrSKH304T3ndQf1iPhLJqxi9X3V xMnc7 X-Gm-Gg: AY/fxX5wLWR85NHFdYNHExQSq1WWDc17E8oCFglvcnMe5W2eOYk32a4RsmqM6kLWblN 8QQS6Dd85BSMbCwQhA9HVKF2wRQ0ilfgJ/AmzwdphKT3SR3onFlTU0VnQEmz+nce2tHC4oj8RlW CbdM1AN+MT5UyejSeG288J1j1czfiAwrgImpb5L8bwTIkMdVqjw1uvidbwVjXU+jTzvGczjS01Z RDRdgIEAdYaaSNf0EkJNatRWRNUmNJz2VHs9fXH8OwzyXvh0Ec8ruLvXpr1Bz1Abpogv4ii3MQk KcGLB1pCKA39jog+91/a/HAQttQcmB7+Flt4UojtQ0/YiGTrg3dI8ObGKe4Gi4XGQo4OPdNHDh2 LOT5bi+VQGuIM7CVp79J5HFseH5FeqIeFAhk1EFxDQ2n8j6DzSHbwosI4hBpAnfuLJWuktY3W2+ neFDW0wBg6gVkpXhWY0uOdotoomjLwdWYYBD6RHPw5Fv6nZxttQpZ6x3L3/4Chvny7UvH/g3qxO Vibw/3INhBoc9otVvAINACD/diBThZB5feoTCE47rXZKHy3dPyt0hWz4Q== X-Google-Smtp-Source: AGHT+IGRXIZzN6d5uO+tVBN/CuJUPebG9/1yaGXfhskWNhI/GRO4T/OhJRMuxU9p0qwobJBuQwbCig== X-Received: by 2002:a17:907:d07:b0:b70:e685:5ac8 with SMTP id a640c23a62f3a-b7d237616f5mr640915066b.3.1765793106130; Mon, 15 Dec 2025 02:05:06 -0800 (PST) Received: from adam.amarulasolutions.com (2001-1c00-8101-1200-3ddc-5bb8-0efa-16f1.cable.dynamic.v6.ziggo.nl. [2001:1c00:8101:1200:3ddc:5bb8:efa:16f1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b7cfa57192bsm1336898366b.53.2025.12.15.02.05.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Dec 2025 02:05:05 -0800 (PST) From: Adam Duskett To: openembedded-core@lists.openembedded.org Cc: Adam Duskett Subject: [PATCH v3 6/6] dnf: Upgrade to 5.3.0.0 Date: Mon, 15 Dec 2025 11:05:00 +0100 Message-ID: <20251215100500.1626964-6-adam.duskett@amarulasolutions.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> References: <20251215100500.1626964-1-adam.duskett@amarulasolutions.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 15 Dec 2025 10:05:13 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/227711 Completely rewritten in C++, there are several changes needed to facilitate moving from DNF4 to DNF5. Below are some significant items to note: - The "-v/--verbose" cli option is removed. As such, remove the argument everywhere it was called.[1] - the rpmverbosity cli option is replaced with --setopt=rpmverbosity - Change gpgcheck to pkg_gpgcheck as this is what the documentation recommends.[2] - --nogpgcheck is now --no-gpgchecks - --setopt=protect_running_kernel=False has to be set or else every dnf transaction complains that /boot/vmlinuz-${kernel_version} does not exist in /var/log/dnf5.log. There is an open issue on github[3] to enable the currently not-yet implemented `autocheck_running_kernel option`, but it has been open for quite some time and the protect_running_kernel option supresses the message. - Move --skip-broken to after the install argument as the global --skip-broken argument is removed. - /var/cache/dnf is replaced with /var/cache/libdnf5 - Add `features += 'PACKAGECONFIG:append:pn-rpm = " sequoia"\n'` `features += 'PACKAGECONFIG:append:pn-librepo = " sequoia"\n'` to test_testimage_dnf as librepo currently does not work with gpgme. While DNF5 has many config options, unfortunately, the majority of them depends on sdbus-c++, which is not included in OE-core. However, the package is included in meta-openembedded, so it's best to include the PACKAGECONFIG options in the recipe and leave them off. 1: https://github.com/rpm-software-management/dnf5/issues/464 2: https://dnf5.readthedocs.io/en/latest/dnf5.conf.5.html 3: https://github.com/rpm-software-management/dnf5/issues/1255 Signed-off-by: Adam Duskett --- V1 -> V2: - Fix CVE_PRODUCT issues [Gyorgy] - Add a tag to the SRC_URI [Gyorgy] - Removed the plugin-manifest PACKAGECONFIG and set -DWITH_PLUGIN_MANIFEST=OFF in EXTRA_OECMAKE - Removed do_install:append:${PN}-plugins [Gyorgy] - Fixed typo in SKIP_RECIPE[dnf] [Gyorgy] - Changed commit message subject to "dnf: Upgrade to 5.3.0.0" [Paul] V2 -> V3: - Moved --skip-broken to after the install argument to fix do_populate_sdk failures. [Mathieu Dubois-Briand] .../lib/oeqa/runtime/cases/dnf_runtime.py | 6 +- meta/conf/distro/include/maintainers.inc | 2 +- meta/lib/oe/package_manager/rpm/__init__.py | 17 +- meta/lib/oeqa/runtime/cases/dnf.py | 16 +- meta/lib/oeqa/selftest/cases/runtime_test.py | 5 + ...tly-install-tmpfiles.d-configuration.patch | 18 -- ...ode-etc-and-systemd-unit-directories.patch | 26 --- ...-hardcode-the-systemd-unit-directory.patch | 29 +++ .../0001-dnf-write-the-log-lock-to-root.patch | 29 --- .../0001-lock.py-fix-Exception-handling.patch | 62 ------ ...et-python-path-for-completion_helper.patch | 21 -- .../dnf/0002-cmake-set-CMP0190-to-OLD.patch | 51 +++++ ...0003-Do-not-hardcode-system_cachedir.patch | 36 ++++ ...004-add-support-for-gcc-12-and-below.patch | 96 +++++++++ ...Do-not-prepend-installroot-to-logdir.patch | 28 --- ...string-concatenation-errors-for-musl.patch | 100 +++++++++ .../0006-add-missing-headers-for-musl.patch | 41 ++++ .../0007-Define-FNM_EXTMATCH-for-musl.patch | 36 ++++ ...rm-arch-mapping-issues-for-qemuarmv5.patch | 59 ++++++ ...PYTHON_INSTALL_DIR-by-running-python.patch | 24 --- .../0030-Run-python-scripts-using-env.patch | 34 ---- meta/recipes-devtools/dnf/dnf_4.24.0.bb | 96 --------- meta/recipes-devtools/dnf/dnf_5.3.0.0.bb | 192 ++++++++++++++++++ 23 files changed, 668 insertions(+), 356 deletions(-) delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-the-systemd-unit-directory.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0002-cmake-set-CMP0190-to-OLD.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0003-Do-not-hardcode-system_cachedir.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0004-add-support-for-gcc-12-and-below.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0005-fix-string-concatenation-errors-for-musl.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0006-add-missing-headers-for-musl.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0007-Define-FNM_EXTMATCH-for-musl.patch create mode 100644 meta/recipes-devtools/dnf/dnf/0008-libdnf-fix-arm-arch-mapping-issues-for-qemuarmv5.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch delete mode 100644 meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch delete mode 100644 meta/recipes-devtools/dnf/dnf_4.24.0.bb create mode 100644 meta/recipes-devtools/dnf/dnf_5.3.0.0.bb diff --git a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py index d2f0f88f7d..27158b5193 100644 --- a/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py +++ b/meta-selftest/lib/oeqa/runtime/cases/dnf_runtime.py @@ -41,11 +41,11 @@ class DnfSelftest(DnfTest): import re # Use '-y' for non-interactive mode: automatically import the feed signing key - output_makecache = self.dnf('-vy makecache') + output_makecache = self.dnf('-y makecache') self.assertTrue(re.match(r".*Failed to synchronize cache", output_makecache, re.DOTALL) is None, msg = "dnf makecache failed to synchronize repo: %s" %(output_makecache)) self.assertTrue(re.match(r".*Metadata cache created", output_makecache, re.DOTALL) is not None, msg = "dnf makecache failed: %s" %(output_makecache)) - output_repoinfo = self.dnf('-v repoinfo') - matchobj = re.match(r".*Repo-pkgs\s*:\s*(?P[0-9]+)", output_repoinfo, re.DOTALL) + output_repoinfo = self.dnf('repoinfo') + matchobj = re.match(r".*Total packages\s*:\s*(?P[0-9]+)", output_repoinfo, re.DOTALL) self.assertTrue(matchobj is not None, msg = "Could not find the amount of packages in dnf repoinfo output: %s" %(output_repoinfo)) self.assertTrue(int(matchobj.group('n_pkgs')) > 0, msg = "Amount of remote packages is not more than zero: %s\n" %(output_repoinfo)) diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index da642ac3c5..222c09acf5 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -155,7 +155,7 @@ RECIPE_MAINTAINER:pn-diffutils = "Chen Qi " RECIPE_MAINTAINER:pn-distcc = "Hongxu Jia " RECIPE_MAINTAINER:pn-distcc-config = "Yi Zhao " RECIPE_MAINTAINER:pn-dmidecode = "Unassigned " -RECIPE_MAINTAINER:pn-dnf = "Unassigned " +RECIPE_MAINTAINER:pn-dnf = "Adam Duskett " RECIPE_MAINTAINER:pn-docbook-xml-dtd4 = "Yi Zhao " RECIPE_MAINTAINER:pn-docbook-xsl-stylesheets = "Yi Zhao " RECIPE_MAINTAINER:pn-dos2unix = "Khem Raj " diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py index 1d831745ff..d617ca0404 100644 --- a/meta/lib/oe/package_manager/rpm/__init__.py +++ b/meta/lib/oe/package_manager/rpm/__init__.py @@ -163,7 +163,7 @@ class RpmPM(PackageManager): gpg_opts += 'gpgkey=file://%s/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-%s-%s\n' % (self.d.getVar('sysconfdir'), self.d.getVar('DISTRO'), self.d.getVar('DISTRO_CODENAME')) if self.d.getVar('RPM_SIGN_PACKAGES') != '1': - gpg_opts += 'gpgcheck=0\n' + gpg_opts += 'pkg_gpgcheck=0\n' bb.utils.mkdirhier(oe.path.join(self.target_rootfs, "etc", "yum.repos.d")) remote_uris = self.construct_uris(feed_uris.split(), feed_base_paths.split()) @@ -200,11 +200,11 @@ class RpmPM(PackageManager): package_exclude = self.d.getVar('PACKAGE_EXCLUDE') exclude_pkgs = (bad_recommendations.split() if bad_recommendations else []) + (package_exclude.split() if package_exclude else []) - output = self._invoke_dnf((["--skip-broken"] if attempt_only else []) + - (["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) + + output = self._invoke_dnf((["-x", ",".join(exclude_pkgs)] if len(exclude_pkgs) > 0 else []) + (["--setopt=install_weak_deps=False"] if (hard_depends_only or self.d.getVar('NO_RECOMMENDATIONS') == "1") else []) + - (["--nogpgcheck"] if self.d.getVar('RPM_SIGN_PACKAGES') != '1' else ["--setopt=gpgcheck=True"]) + + (["--no-gpgchecks"] if self.d.getVar('RPM_SIGN_PACKAGES') != '1' else ["--setopt=pkg_gpgcheck=True"]) + ["install"] + + (["--skip-broken"] if attempt_only else []) + pkgs) failed_scriptlets_pkgnames = collections.OrderedDict() @@ -313,10 +313,15 @@ class RpmPM(PackageManager): def _invoke_dnf(self, dnf_args, fatal = True, print_output = True ): os.environ['RPM_ETCCONFIGDIR'] = self.target_rootfs + # Set XDG_CACHE_HOME to avoid dnf attempting to install oe-repo system cache to a /tmp/ directory on the host. + os.environ['XDG_CACHE_HOME'] = oe.path.join(os.path.join(self.target_rootfs, "var/cache/libdnf5")) + dnf_cmd = bb.utils.which(os.getenv('PATH'), "dnf") - standard_dnf_args = ["-v", "--rpmverbosity=info", "-y", - "-c", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), + standard_dnf_args = ["-y", + "--config", oe.path.join(self.target_rootfs, "etc/dnf/dnf.conf"), + "--setopt=rpmverbosity=info", "--setopt=reposdir=%s" %(oe.path.join(self.target_rootfs, "etc/yum.repos.d")), + "--setopt=pluginconfpath=%s" %(os.path.join(self.d.getVar('STAGING_DIR_NATIVE'), "etc/dnf/dnf.conf")), "--installroot=%s" % (self.target_rootfs), "--setopt=logdir=%s" % (self.d.getVar('T')) ] diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py index 3ccb18ce83..1becc8d8a0 100644 --- a/meta/lib/oeqa/runtime/cases/dnf.py +++ b/meta/lib/oeqa/runtime/cases/dnf.py @@ -17,7 +17,7 @@ from oeqa.runtime.decorator.package import OEHasPackage class DnfTest(OERuntimeTestCase): def dnf(self, command, expected = 0): - command = 'dnf %s' % command + command = 'dnf --setopt=protect_running_kernel=False %s' % command status, output = self.target.run(command, 1500) message = os.linesep.join([command, output]) self.assertEqual(status, expected, message) @@ -48,7 +48,7 @@ class DnfBasicTest(DnfTest): @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) def test_dnf_history(self): - self.dnf('history') + self.dnf('history list') class DnfRepoTest(DnfTest): @@ -68,7 +68,7 @@ class DnfRepoTest(DnfTest): deploy_url = 'http://%s:%s/' %(self.target.server_ip, self.repo_server.port) cmdlinerepoopts = ["--repofrompath=oe-testimage-repo-%s,%s%s" %(arch, deploy_url, arch) for arch in pkgarchs] - output = self.dnf(" ".join(cmdlinerepoopts) + " --nogpgcheck " + command) + output = self.dnf(" ".join(cmdlinerepoopts) + " --no-gpgchecks " + command) return output @OETestDepends(['dnf.DnfBasicTest.test_dnf_help']) @@ -96,7 +96,7 @@ class DnfRepoTest(DnfTest): def test_dnf_install_from_disk(self): self.dnf_with_repo('remove -y dnf-test-dep') self.dnf_with_repo('install -y --downloadonly dnf-test-dep') - status, output = self.target.run('find /var/cache/dnf -name dnf-test-dep*rpm') + status, output = self.target.run('find /var/cache/libdnf5 -name dnf-test-dep*rpm') self.assertEqual(status, 0, output) self.dnf_with_repo('install -y %s' % output) @@ -134,8 +134,8 @@ class DnfRepoTest(DnfTest): self.target.run('cp -r /etc/dnf %s/etc' % rootpath, 1500) self.target.run('cp /bin/sh %s/bin' % rootpath, 1500) self.target.run('mount -o bind /dev %s/dev/' % rootpath, 1500) - self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox' % rootpath) - status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath, 1500) + self.dnf_with_repo('install --installroot=%s -y busybox' % rootpath) + status, output = self.target.run('test -e %s/var/cache/libdnf5' % rootpath, 1500) self.assertEqual(0, status, output) status, output = self.target.run('test -e %s/bin/busybox' % rootpath, 1500) self.assertEqual(0, status, output) @@ -158,8 +158,8 @@ class DnfRepoTest(DnfTest): self.target.run('cp -r /etc/dnf %s/etc' % rootpath) self.target.run('cp /bin/busybox %s/bin/sh' % rootpath) self.target.run('mount -o bind /dev %s/dev/' % rootpath) - self.dnf_with_repo('install --installroot=%s -v -y --rpmverbosity=debug busybox' % rootpath) - status, output = self.target.run('test -e %s/var/cache/dnf' % rootpath) + self.dnf_with_repo('install --installroot=%s -y busybox' % rootpath) + status, output = self.target.run('test -e %s/var/cache/libdnf5' % rootpath) self.assertEqual(0, status, output) status, output = self.target.run('test -e %s/bin/busybox' % rootpath) self.assertEqual(0, status, output) diff --git a/meta/lib/oeqa/selftest/cases/runtime_test.py b/meta/lib/oeqa/selftest/cases/runtime_test.py index d58ffa80f5..f6d441b50a 100644 --- a/meta/lib/oeqa/selftest/cases/runtime_test.py +++ b/meta/lib/oeqa/selftest/cases/runtime_test.py @@ -163,6 +163,11 @@ TEST_RUNQEMUPARAMS += " slirp" features += 'EXTRA_IMAGE_FEATURES += "package-management"\n' features += 'PACKAGE_CLASSES = "package_rpm"\n' + # librepo and rpm require sequoia + # https://github.com/rpm-software-management/dnf5/issues/2539 + features += 'PACKAGECONFIG:append:pn-rpm = " sequoia"\n' + features += 'PACKAGECONFIG:append:pn-librepo = " sequoia"\n' + bitbake('gnupg-native -c addto_recipe_sysroot') # Enable package feed signing diff --git a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch b/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch deleted file mode 100644 index fd942228b9..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0001-Corretly-install-tmpfiles.d-configuration.patch +++ /dev/null @@ -1,18 +0,0 @@ -From f70eb308c837f2c944e23bb680a501a605004d65 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 26 Jan 2017 16:36:20 +0200 -Subject: [PATCH] Corretly install tmpfiles.d configuration - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - etc/tmpfiles.d/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/etc/tmpfiles.d/CMakeLists.txt b/etc/tmpfiles.d/CMakeLists.txt -index f69c773e..3eb6d0e8 100644 ---- a/etc/tmpfiles.d/CMakeLists.txt -+++ b/etc/tmpfiles.d/CMakeLists.txt -@@ -1 +1 @@ --INSTALL (FILES dnf.conf DESTINATION /usr/lib/tmpfiles.d/) -+INSTALL (FILES dnf.conf DESTINATION ${SYSCONFDIR}/tmpfiles.d/) diff --git a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch deleted file mode 100644 index 9d978cdc5f..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch +++ /dev/null @@ -1,26 +0,0 @@ -From c2b2b91b58f4531d4baf0a01f5d868d71e577a84 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 26 Jan 2017 16:25:47 +0200 -Subject: [PATCH] Do not hardcode /etc and systemd unit directories - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index e71e9517..8fcb2069 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -3,8 +3,8 @@ PROJECT (dnf NONE) - - INCLUDE (${CMAKE_SOURCE_DIR}/VERSION.cmake) - --SET( SYSCONFDIR /etc) --SET( SYSTEMD_DIR /usr/lib/systemd/system) -+SET( SYSCONFDIR ${CMAKE_INSTALL_SYSCONFDIR}) -+SET( SYSTEMD_DIR $ENV{systemd_system_unitdir}) - - IF (NOT PYTHON_DESIRED) - FIND_PACKAGE (PythonInterp REQUIRED) diff --git a/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-the-systemd-unit-directory.patch b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-the-systemd-unit-directory.patch new file mode 100644 index 0000000000..f82a0fca3c --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0001-Do-not-hardcode-the-systemd-unit-directory.patch @@ -0,0 +1,29 @@ +From c263a746dac19d140fb31d07f1c4d4cb96750666 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 27 Nov 2025 11:07:48 +0100 +Subject: [PATCH] Do not hardcode the systemd unit directory + +Upstream-Status: Inappropriate [oe-core specific] + +Rebased for 5.3.0.0 +Signed-off-by: Adam Duskett +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0507e30..0537e85 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,7 +7,7 @@ project(dnf5 LANGUAGES CXX C VERSION ${VERSION_PRIME}.${VERSION_MAJOR}.${VERSION + cmake_policy(VERSION ${CMAKE_VERSION}) + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") +-set(SYSTEMD_DIR "/usr/lib/systemd/system") ++set(SYSTEMD_DIR $ENV{systemd_system_unitdir}) + + message("Building ${PROJECT_NAME} version ${PROJECT_VERSION}") + +-- +2.52.0 + diff --git a/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch b/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch deleted file mode 100644 index 18f9a30949..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0001-dnf-write-the-log-lock-to-root.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 049e2832284ab883e185d9020c881518a68e6c38 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 28 Apr 2020 15:55:00 +0200 -Subject: [PATCH] dnf: write the log lock to root - -Writing it to /var/log appears to be racing with installation -of base-files, and if lock is created first, base-files -will refuse to install (due to the target directory -already existing, and base-files creating it as a symlink). - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - dnf/logging.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dnf/logging.py b/dnf/logging.py -index ef0b25f3..94610af6 100644 ---- a/dnf/logging.py -+++ b/dnf/logging.py -@@ -118,7 +118,7 @@ class MultiprocessRotatingFileHandler(logging.handlers.RotatingFileHandler): - def __init__(self, filename, mode='a', maxBytes=0, backupCount=0, encoding=None, delay=False): - super(MultiprocessRotatingFileHandler, self).__init__( - filename, mode, maxBytes, backupCount, encoding, delay) -- self.rotate_lock = dnf.lock.build_log_lock("/var/log/", True) -+ self.rotate_lock = dnf.lock.build_log_lock("/", True) - - def emit(self, record): - while True: diff --git a/meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch b/meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch deleted file mode 100644 index 6bffe9af0a..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0001-lock.py-fix-Exception-handling.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 3881757eabfde2ff54400ab127b106ab085d83f0 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Wed, 13 Mar 2024 11:22:05 +0800 -Subject: [PATCH] lock.py: fix Exception handling - -Before, when logdir is not writable, _try_lock will raise an Exception -like "Permission denied: '/var/log/log_lock.pid'", and in this case, -_unlock_thread will not be called and the variable count will not be -handled, it maybe cause log_lock.pid not be deleted in case like [1]. - -For [1], it is an cross compile case, when dnf install some packages to -rootfs, seems like some threads don't do chroot like work, some threads -do chroot like work. so for the threads don't do chroot, "Permission denied" -Exception happend, for the threads that do chroot, log_lock.pid will be -created under installroot/var/log/log_lock.pid, since variable count not -handled correct before, log_lock.pid may not be deleted correctly. - -So fixed like this, if _try_lock raise Exception, _unlock_thread first, -then raise the Exception. - -[1] https://github.com/rpm-software-management/dnf/issues/1963 - -Upstream-Status: Submitted [ https://github.com/rpm-software-management/dnf/pull/2065 ] - -Signed-off-by: Changqing Li ---- - dnf/lock.py | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/dnf/lock.py b/dnf/lock.py -index 6817aac9..5718062a 100644 ---- a/dnf/lock.py -+++ b/dnf/lock.py -@@ -128,7 +128,11 @@ class ProcessLock(object): - self._lock_thread() - prev_pid = -1 - my_pid = os.getpid() -- pid = self._try_lock(my_pid) -+ try: -+ pid = self._try_lock(my_pid) -+ except Exception: -+ self._unlock_thread() -+ raise - while pid != my_pid: - if pid != -1: - if not self.blocking: -@@ -140,7 +144,11 @@ class ProcessLock(object): - logger.info(msg) - prev_pid = pid - time.sleep(1) -- pid = self._try_lock(my_pid) -+ try: -+ pid = self._try_lock(my_pid) -+ except Exception: -+ self._unlock_thread() -+ raise - - def __exit__(self, *exc_args): - if self.count == 1: --- -2.25.1 - diff --git a/meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch b/meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch deleted file mode 100644 index fcd970a7ae..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0001-set-python-path-for-completion_helper.patch +++ /dev/null @@ -1,21 +0,0 @@ -From fa32c7dcabaa3c00d3620a3266e49629365c0cbe Mon Sep 17 00:00:00 2001 -From: Jeremy Puhlman -Date: Wed, 11 Mar 2020 22:10:02 +0000 -Subject: [PATCH] set python path for completion_helper - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Jeremy Puhlman ---- - dnf/cli/completion_helper.py.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dnf/cli/completion_helper.py.in b/dnf/cli/completion_helper.py.in -index 0da0f2a2..9330d15b 100644 ---- a/dnf/cli/completion_helper.py.in -+++ b/dnf/cli/completion_helper.py.in -@@ -1,4 +1,4 @@ --#!@PYTHON_EXECUTABLE@ -+#!/usr/bin/env python3 - # - # This file is part of dnf. - # diff --git a/meta/recipes-devtools/dnf/dnf/0002-cmake-set-CMP0190-to-OLD.patch b/meta/recipes-devtools/dnf/dnf/0002-cmake-set-CMP0190-to-OLD.patch new file mode 100644 index 0000000000..3ac3923956 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0002-cmake-set-CMP0190-to-OLD.patch @@ -0,0 +1,51 @@ +From 8eb5a6208fd9edfa7796d974b2e5256b05ffe001 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 27 Nov 2025 11:49:43 +0100 +Subject: [PATCH] cmake: set CMP0190 to OLD + +Starting with CMake 4.1, cross-compiling python3 requires setting +-DCMAKE_CROSSCOMPILING_EMULATOR which can be done by inheriting +cmake-qemu. However, this leads to the following error: +Interpreter: Cannot run the interpreter ".../python3-native/python3" + +This is due to the target sysroot python3 binary not being installed +because it can't be executed. + +Set CMP0190 to old to force the old behavior. + +https://cmake.org/cmake/help/latest/policy/CMP0190.html + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Adam Duskett +--- + bindings/python3/CMakeLists.txt | 1 + + libdnf5-plugins/python_plugins_loader/CMakeLists.txt | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/bindings/python3/CMakeLists.txt b/bindings/python3/CMakeLists.txt +index fa7033d..4bfa434 100644 +--- a/bindings/python3/CMakeLists.txt ++++ b/bindings/python3/CMakeLists.txt +@@ -6,6 +6,7 @@ endif() + message("Building bindings for python3") + + ++cmake_policy(SET CMP0190 OLD) + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + include_directories(${Python3_INCLUDE_DIRS}) + +diff --git a/libdnf5-plugins/python_plugins_loader/CMakeLists.txt b/libdnf5-plugins/python_plugins_loader/CMakeLists.txt +index 5454a5d..d4a9915 100644 +--- a/libdnf5-plugins/python_plugins_loader/CMakeLists.txt ++++ b/libdnf5-plugins/python_plugins_loader/CMakeLists.txt +@@ -6,6 +6,7 @@ if(NOT WITH_PYTHON_PLUGINS_LOADER) + return() + endif() + ++cmake_policy(SET CMP0190 OLD) + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + find_package(SWIG REQUIRED) + include_directories(${Python3_INCLUDE_DIRS}) +-- +2.52.0 + diff --git a/meta/recipes-devtools/dnf/dnf/0003-Do-not-hardcode-system_cachedir.patch b/meta/recipes-devtools/dnf/dnf/0003-Do-not-hardcode-system_cachedir.patch new file mode 100644 index 0000000000..825368b760 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0003-Do-not-hardcode-system_cachedir.patch @@ -0,0 +1,36 @@ +From d0718ed10c1c255850fff5922f533bceef10f659 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 27 Nov 2025 11:50:20 +0100 +Subject: [PATCH] Do not hardcode system_cachedir + +Because dnf is ran in a fakeroot environment, the UID of the +"user" is 0, and the hardcoded paths to the host system are +attempted, leading to the following error: + +[log_check] DEBUG: Failed to expire repository cache in path "/var/cache/libdnf5/ + +Remove the check for geteuid() == 0 and rely only on the +user cache dir. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Adam Duskett +--- + libdnf5/conf/config_main.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libdnf5/conf/config_main.cpp b/libdnf5/conf/config_main.cpp +index a83e4a2..ebdea4d 100644 +--- a/libdnf5/conf/config_main.cpp ++++ b/libdnf5/conf/config_main.cpp +@@ -237,7 +237,7 @@ class ConfigMain::Impl { + // Repo main config + + OptionNumber retries{10}; +- OptionPath cachedir{geteuid() == 0 ? SYSTEM_CACHEDIR : libdnf5::xdg::get_user_cache_dir() / "libdnf5"}; ++ OptionPath cachedir{libdnf5::xdg::get_user_cache_dir() / "libdnf5"}; + OptionBool fastestmirror{false}; + OptionStringAppendList excludeenvs{std::vector{}}; + OptionStringAppendList excludegroups{std::vector{}}; +-- +2.52.0 + diff --git a/meta/recipes-devtools/dnf/dnf/0004-add-support-for-gcc-12-and-below.patch b/meta/recipes-devtools/dnf/dnf/0004-add-support-for-gcc-12-and-below.patch new file mode 100644 index 0000000000..e0684434b1 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0004-add-support-for-gcc-12-and-below.patch @@ -0,0 +1,96 @@ +From cb0a8fcf3676dcebc87880872ea5b4ddfadd9c5c Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 27 Nov 2025 11:08:41 +0100 +Subject: [PATCH] add support for gcc 12 and below + + - Add missing headers for gcc <= 12 + - Add support for libfmt if the format header is not found + +Note: This patch should be removed once the minimum GCC version +for Yocto is >= 13. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Adam Duskett +--- + libdnf5/CMakeLists.txt | 8 ++++++++ + libdnf5/base/goal_elements.cpp | 2 +- + libdnf5/conf/config_main.cpp | 8 ++++++++ + libdnf5/logger/memory_buffer_logger.cpp | 1 + + 4 files changed, 18 insertions(+), 1 deletion(-) + +diff --git a/libdnf5/CMakeLists.txt b/libdnf5/CMakeLists.txt +index fa4c9d1..06a1f01 100644 +--- a/libdnf5/CMakeLists.txt ++++ b/libdnf5/CMakeLists.txt +@@ -7,6 +7,9 @@ if (NOT WITH_MODULEMD) + list(REMOVE_ITEM LIBDNF5_SOURCES ${LIBDNF5_SOURCES_MODULES}) + endif() + ++include(CheckIncludeFileCXX) ++check_include_file_cxx("format" CXX_FORMAT_SUPPORT) ++ + # create config header file + configure_file("config.h.in" ${CMAKE_CURRENT_SOURCE_DIR}/conf/config.h) + +@@ -47,6 +50,11 @@ set_target_properties(libdnf5 PROPERTIES OUTPUT_NAME "dnf5") + set_target_properties(libdnf5 PROPERTIES SOVERSION ${DNF_SO_VERSION}) + # required to have dlopen symbol + target_link_libraries(libdnf5 PUBLIC ${CMAKE_DL_LIBS}) ++if (NOT CXX_FORMAT_SUPPORT) ++ find_package(fmt REQUIRED) ++ target_link_libraries(libdnf5_obj PRIVATE fmt::fmt) ++ target_compile_definitions(libdnf5_obj PUBLIC USE_FMTLIB) ++endif() + + # required by clang + target_link_libraries(libdnf5 PUBLIC stdc++) +diff --git a/libdnf5/base/goal_elements.cpp b/libdnf5/base/goal_elements.cpp +index 9caaf54..572f327 100644 +--- a/libdnf5/base/goal_elements.cpp ++++ b/libdnf5/base/goal_elements.cpp +@@ -17,7 +17,7 @@ + // You should have received a copy of the GNU Lesser General Public License + // along with libdnf. If not, see . + +- ++#include + #include "libdnf5/base/goal_elements.hpp" + + #include "libdnf5/common/exception.hpp" +diff --git a/libdnf5/conf/config_main.cpp b/libdnf5/conf/config_main.cpp +index ebdea4d..a93b545 100644 +--- a/libdnf5/conf/config_main.cpp ++++ b/libdnf5/conf/config_main.cpp +@@ -37,9 +37,17 @@ + #include + #include + #include ++#include + #include + #include + ++#ifdef USE_FMTLIB ++#include ++namespace std { ++ using fmt::format; ++} ++#endif ++ + namespace libdnf5 { + + /// @brief Converts a friendly bandwidth option to bytes +diff --git a/libdnf5/logger/memory_buffer_logger.cpp b/libdnf5/logger/memory_buffer_logger.cpp +index 85bf707..89307e9 100644 +--- a/libdnf5/logger/memory_buffer_logger.cpp ++++ b/libdnf5/logger/memory_buffer_logger.cpp +@@ -20,6 +20,7 @@ + #include "libdnf5/logger/memory_buffer_logger.hpp" + + #include ++#include + + namespace libdnf5 { + +-- +2.52.0 + diff --git a/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch b/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch deleted file mode 100644 index a1c58d6563..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0005-Do-not-prepend-installroot-to-logdir.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0e7fc4a8523aad616493e6ad33c509e1e530d852 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Wed, 11 Jan 2017 15:10:13 +0200 -Subject: [PATCH] Do not prepend installroot to logdir. - -This would otherwise write the logs into rootfs/var/log -(whereas we want them in $T), -and will break installation of base-files rpm. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - dnf/cli/cli.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/dnf/cli/cli.py b/dnf/cli/cli.py -index d3844df3..ac080f79 100644 ---- a/dnf/cli/cli.py -+++ b/dnf/cli/cli.py -@@ -954,7 +954,7 @@ class Cli(object): - logger.warning(_("Unable to detect release version (use '--releasever' to specify " - "release version)")) - -- for opt in ('cachedir', 'logdir', 'persistdir'): -+ for opt in ('cachedir', 'persistdir'): - conf.prepend_installroot(opt) - - self.base._logging._setup_from_dnf_conf(conf) diff --git a/meta/recipes-devtools/dnf/dnf/0005-fix-string-concatenation-errors-for-musl.patch b/meta/recipes-devtools/dnf/dnf/0005-fix-string-concatenation-errors-for-musl.patch new file mode 100644 index 0000000000..537cf1fa5d --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0005-fix-string-concatenation-errors-for-musl.patch @@ -0,0 +1,100 @@ +From 9ffae0be82214e80d3476bce53efc7c9fc23f494 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 27 Nov 2025 11:53:43 +0100 +Subject: [PATCH] fix string concatenation errors for musl + +Glibc uses some fancy overloading to ensure strchr returns a const char * +if a char * is passed as an argument. However, musl does not, which leads +to several `error: no matching function for call to 'std::__cxx11::basic_string::basic_string(const char*&, char*&)'` +errors. + +Change the variables declaration to const auto * const to fix +the problem. + +Upstream-Status: Backport [https://github.com/rpm-software-management/dnf5/commit/5902c3b4e90410df2c604e429ec03f72137c9b19] +Signed-off-by: Adam Duskett +--- + dnf5-plugins/config-manager_plugin/addrepo.cpp | 2 +- + dnf5-plugins/config-manager_plugin/setopt.cpp | 2 +- + dnf5-plugins/config-manager_plugin/setvar.cpp | 2 +- + dnf5/main.cpp | 4 ++-- + dnf5daemon-client/main.cpp | 2 +- + 5 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/dnf5-plugins/config-manager_plugin/addrepo.cpp b/dnf5-plugins/config-manager_plugin/addrepo.cpp +index 18437be2..6ee99338 100644 +--- a/dnf5-plugins/config-manager_plugin/addrepo.cpp ++++ b/dnf5-plugins/config-manager_plugin/addrepo.cpp +@@ -163,7 +163,7 @@ void ConfigManagerAddRepoCommand::set_argument_parser() { + [[maybe_unused]] cli::ArgumentParser::NamedArg * arg, + [[maybe_unused]] const char * option, + const char * value) { +- auto val = strchr(value + 1, '='); ++ const auto * const val = strchr(value + 1, '='); + if (!val) { + throw cli::ArgumentParserError( + M_("{}: Badly formatted argument value \"{}\""), std::string{"set"}, std::string{value}); +diff --git a/dnf5-plugins/config-manager_plugin/setopt.cpp b/dnf5-plugins/config-manager_plugin/setopt.cpp +index 97fe89d7..973431e2 100644 +--- a/dnf5-plugins/config-manager_plugin/setopt.cpp ++++ b/dnf5-plugins/config-manager_plugin/setopt.cpp +@@ -77,7 +77,7 @@ void ConfigManagerSetOptCommand::set_argument_parser() { + const char * const argv[]) { + for (int i = 0; i < argc; ++i) { + auto value = argv[i]; +- auto val = strchr(value + 1, '='); ++ const auto * const val = strchr(value + 1, '='); + if (!val) { + throw cli::ArgumentParserError( + M_("{}: Badly formatted argument value \"{}\""), std::string{"optval"}, std::string{value}); +diff --git a/dnf5-plugins/config-manager_plugin/setvar.cpp b/dnf5-plugins/config-manager_plugin/setvar.cpp +index d6361642..62722b5f 100644 +--- a/dnf5-plugins/config-manager_plugin/setvar.cpp ++++ b/dnf5-plugins/config-manager_plugin/setvar.cpp +@@ -43,7 +43,7 @@ void ConfigManagerSetVarCommand::set_argument_parser() { + [this, &ctx]([[maybe_unused]] cli::ArgumentParser::PositionalArg * arg, int argc, const char * const argv[]) { + for (int i = 0; i < argc; ++i) { + auto value = argv[i]; +- auto val = strchr(value + 1, '='); ++ const auto * const val = strchr(value + 1, '='); + if (!val) { + throw cli::ArgumentParserError( + M_("{}: Badly formatted argument value \"{}\""), std::string{"varval"}, std::string{value}); +diff --git a/dnf5/main.cpp b/dnf5/main.cpp +index 9f102b26..f51b8094 100644 +--- a/dnf5/main.cpp ++++ b/dnf5/main.cpp +@@ -243,7 +243,7 @@ void RootCommand::set_argument_parser() { + setopt->set_parse_hook_func( + [&ctx]( + [[maybe_unused]] ArgumentParser::NamedArg * arg, [[maybe_unused]] const char * option, const char * value) { +- auto val = strchr(value + 1, '='); ++ const auto * const val = strchr(value + 1, '='); + if (!val) { + throw libdnf5::cli::ArgumentParserError( + M_("{}: Badly formatted argument value \"{}\""), std::string{"setopt"}, std::string(value)); +@@ -282,7 +282,7 @@ void RootCommand::set_argument_parser() { + setvar->set_parse_hook_func( + [&ctx]( + [[maybe_unused]] ArgumentParser::NamedArg * arg, [[maybe_unused]] const char * option, const char * value) { +- auto val = strchr(value + 1, '='); ++ const auto * const val = strchr(value + 1, '='); + if (!val) { + throw libdnf5::cli::ArgumentParserError( + M_("{}: Badly formatted argument value \"{}\""), std::string{"setvar"}, std::string(value)); +diff --git a/dnf5daemon-client/main.cpp b/dnf5daemon-client/main.cpp +index 385a32bd..dfd1ee05 100644 +--- a/dnf5daemon-client/main.cpp ++++ b/dnf5daemon-client/main.cpp +@@ -160,7 +160,7 @@ void RootCommand::set_argument_parser() { + [[maybe_unused]] libdnf5::cli::ArgumentParser::NamedArg * arg, + [[maybe_unused]] const char * option, + const char * value) { +- auto val = strchr(value + 1, '='); ++ const auto * const val = strchr(value + 1, '='); + if (!val) { + throw std::runtime_error(std::string("setopt: Badly formatted argument value") + value); + } +-- +2.52.0 + diff --git a/meta/recipes-devtools/dnf/dnf/0006-add-missing-headers-for-musl.patch b/meta/recipes-devtools/dnf/dnf/0006-add-missing-headers-for-musl.patch new file mode 100644 index 0000000000..dbe9304d4d --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0006-add-missing-headers-for-musl.patch @@ -0,0 +1,41 @@ +From dbe4c82deca42b6fc13f5bce01b35c0406a73db2 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 27 Nov 2025 11:54:40 +0100 +Subject: [PATCH] add missing headers for musl + +cstdint needs to be implicitly added for musl + +Upstream-Status: Backport [https://github.com/rpm-software-management/dnf5/commit/00e5077e041139fab8ffcabe099b858a9559178c] +Signed-off-by: Adam Duskett +--- + include/libdnf5-cli/utils/units.hpp | 1 + + libdnf5-cli/utils/utf8.cpp | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/include/libdnf5-cli/utils/units.hpp b/include/libdnf5-cli/utils/units.hpp +index 0ee19fa4..349fbd35 100644 +--- a/include/libdnf5-cli/utils/units.hpp ++++ b/include/libdnf5-cli/utils/units.hpp +@@ -23,6 +23,7 @@ + + #include "libdnf5-cli/defs.h" + ++#include + #include + #include + +diff --git a/libdnf5-cli/utils/utf8.cpp b/libdnf5-cli/utils/utf8.cpp +index ebeb59f0..d3e0464b 100644 +--- a/libdnf5-cli/utils/utf8.cpp ++++ b/libdnf5-cli/utils/utf8.cpp +@@ -21,6 +21,7 @@ + #include "utf8.hpp" + + #include ++#include + #include + #include + +-- +2.52.0 + diff --git a/meta/recipes-devtools/dnf/dnf/0007-Define-FNM_EXTMATCH-for-musl.patch b/meta/recipes-devtools/dnf/dnf/0007-Define-FNM_EXTMATCH-for-musl.patch new file mode 100644 index 0000000000..203785a5e1 --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0007-Define-FNM_EXTMATCH-for-musl.patch @@ -0,0 +1,36 @@ +From 8c65576fb01d8a7bbe954dca8e9eb528795e0090 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 27 Nov 2025 11:56:23 +0100 +Subject: [PATCH] Define FNM_EXTMATCH for musl + +Fixes the following compilation errors with musl that does not have +FNM_EXTMATCH defined: +``` +error: 'FNM_EXTMATCH' undeclared (first use in this +function); did you mean 'FNM_NOMATCH'? +``` + +Upstream-Status: Backport [https://github.com/rpm-software-management/dnf5/commit/3739c4a34db6e7abcd8b4faf0db7d5307f37d340] +Signed-off-by: Adam Duskett +--- + libdnf5/common/sack/match_string.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libdnf5/common/sack/match_string.cpp b/libdnf5/common/sack/match_string.cpp +index 78cc4dde..c41894d1 100644 +--- a/libdnf5/common/sack/match_string.cpp ++++ b/libdnf5/common/sack/match_string.cpp +@@ -29,6 +29,10 @@ + #include + #include + ++// TODO: Implement proper FNM_EXTMATCH support to fix MUSL errors. ++#if !defined(FNM_EXTMATCH) ++#define FNM_EXTMATCH (0) ++#endif + + namespace libdnf5::sack { + +-- +2.52.0 + diff --git a/meta/recipes-devtools/dnf/dnf/0008-libdnf-fix-arm-arch-mapping-issues-for-qemuarmv5.patch b/meta/recipes-devtools/dnf/dnf/0008-libdnf-fix-arm-arch-mapping-issues-for-qemuarmv5.patch new file mode 100644 index 0000000000..213382a4df --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf/0008-libdnf-fix-arm-arch-mapping-issues-for-qemuarmv5.patch @@ -0,0 +1,59 @@ +From 32e926c627a3d0e81ce14890464abc5e5be74558 Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Thu, 27 Nov 2025 11:48:43 +0100 +Subject: [PATCH] libdnf: fix arm arch mapping issues for qemuarmv5 + +We change the way rpm architectures work, we make the machine name the default +machine specific package architecture. + +This arm mapping code can work or in the case of qemuarmv5, it doesn't as it +creates armv5hl which doesn't exist and causes errrors. We can simply remove +it, we don't need it. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Richard Purdie + +Rebased for 5.3.0.0 +Signed-off-by: Adam Duskett +--- + libdnf5/utils/system.cpp | 24 ------------------------ + 1 file changed, 24 deletions(-) + +diff --git a/libdnf5/utils/system.cpp b/libdnf5/utils/system.cpp +index ecdc57e..35d8801 100644 +--- a/libdnf5/utils/system.cpp ++++ b/libdnf5/utils/system.cpp +@@ -52,30 +52,6 @@ std::string detect_arch() { + throw RuntimeError(M_("Failed to execute uname()")); + } + +- if (!strncmp(un.machine, "armv", 4)) { +- /* un.machine is armvXE, where X is version number and E is +- * endianness (b or l); we need to add modifiers such as +- * h (hardfloat), n (neon). Neon is a requirement of armv8 so +- * as far as rpm is concerned armv8l is the equivalent of armv7hnl +- * (or 7hnb) so we don't explicitly add 'n' for 8+ as it's expected. */ +- char endian = un.machine[strlen(un.machine) - 1]; +- char * modifier = un.machine + 5; +- while (isdigit(*modifier)) /* keep armv7, armv8, armv9, armv10, armv100, ... */ +- modifier++; +- if (getauxval(AT_HWCAP) & HWCAP_ARM_VFP) +- *modifier++ = 'h'; +- if ((atoi(un.machine + 4) == 7) && (getauxval(AT_HWCAP) & HWCAP_ARM_NEON)) +- *modifier++ = 'n'; +- *modifier++ = endian; +- *modifier = 0; +- } +-#ifdef __MIPSEL__ +- // support for little endian MIPS +- if (!strcmp(un.machine, "mips")) +- strcpy(un.machine, "mipsel"); +- else if (!strcmp(un.machine, "mips64")) +- strcpy(un.machine, "mips64el"); +-#endif + return un.machine; + } + +-- +2.52.0 + diff --git a/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch b/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch deleted file mode 100644 index 64ea7874d3..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch +++ /dev/null @@ -1,24 +0,0 @@ -From d5b154ea69afdcd862299a0b7f255f6ece3686c6 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 30 Dec 2016 18:29:07 +0200 -Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 9e2e9e9e..2056089d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -19,7 +19,7 @@ ELSE () - MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED}) - ENDIF() - --EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) -+#EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) - MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") - - ADD_SUBDIRECTORY (dnf) diff --git a/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch b/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch deleted file mode 100644 index eb46113f3a..0000000000 --- a/meta/recipes-devtools/dnf/dnf/0030-Run-python-scripts-using-env.patch +++ /dev/null @@ -1,34 +0,0 @@ -From d3556767b84f3687743fdad0a88af0739d736ea9 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 30 Dec 2016 18:29:37 +0200 -Subject: [PATCH] Run python scripts using env - -Otherwise the build tools hardcode the python path into them. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - bin/dnf-automatic.in | 2 +- - bin/dnf.in | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/bin/dnf-automatic.in b/bin/dnf-automatic.in -index 17e35a05..28827e38 100755 ---- a/bin/dnf-automatic.in -+++ b/bin/dnf-automatic.in -@@ -1,4 +1,4 @@ --#!@PYTHON_EXECUTABLE@ -+#!/usr/bin/env python3 - # dnf-automatic executable. - # - # Copyright (C) 2014-2016 Red Hat, Inc. -diff --git a/bin/dnf.in b/bin/dnf.in -index 55ceb3f2..e38973c7 100755 ---- a/bin/dnf.in -+++ b/bin/dnf.in -@@ -1,4 +1,4 @@ --#!@PYTHON_EXECUTABLE@ -+#!/usr/bin/env python3 - # The dnf executable script. - # - # Copyright (C) 2012-2016 Red Hat, Inc. diff --git a/meta/recipes-devtools/dnf/dnf_4.24.0.bb b/meta/recipes-devtools/dnf/dnf_4.24.0.bb deleted file mode 100644 index d40b85c4b0..0000000000 --- a/meta/recipes-devtools/dnf/dnf_4.24.0.bb +++ /dev/null @@ -1,96 +0,0 @@ -SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver" -DESCRIPTION = "Software package manager that installs, updates, and removes \ -packages on RPM-based Linux distributions. It automatically computes \ -dependencies and determines the actions required to install packages." -HOMEPAGE = "https://github.com/rpm-software-management/dnf" -LICENSE = "GPL-2.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://PACKAGE-LICENSING;md5=4a0548e303dbc77f067335b4d688e745 \ - " - -SRC_URI = "git://github.com/rpm-software-management/dnf.git;branch=master;protocol=https \ - file://0001-Corretly-install-tmpfiles.d-configuration.patch \ - file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \ - file://0005-Do-not-prepend-installroot-to-logdir.patch \ - file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ - file://0030-Run-python-scripts-using-env.patch \ - file://0001-set-python-path-for-completion_helper.patch \ - file://0001-lock.py-fix-Exception-handling.patch \ - " - -SRC_URI:append:class-native = " file://0001-dnf-write-the-log-lock-to-root.patch" - -SRCREV = "e47634fbe3565d0580e89ec21adb7c1b308642ce" -UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" - -inherit cmake gettext bash-completion setuptools3-base systemd - -DEPENDS += "libdnf librepo libcomps" - -# manpages generation requires http://www.sphinx-doc.org/ -EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3" - -BBCLASSEXTEND = "native nativesdk" - -RDEPENDS:${PN} += " \ - python3-core \ - python3-codecs \ - python3-ctypes \ - python3-netclient \ - python3-email \ - python3-threading \ - python3-logging \ - python3-fcntl \ - librepo \ - python3-shell \ - libcomps \ - libdnf \ - python3-sqlite3 \ - python3-compression \ - python3-rpm \ - python3-json \ - python3-curses \ - python3-misc \ - " - -RDEPENDS:${PN}:class-native = "" - -RRECOMMENDS:${PN}:class-target += "gnupg" - -# Create a symlink called 'dnf' as 'make install' does not do it, but -# .spec file in dnf source tree does (and then Fedora and dnf documentation -# says that dnf binary is plain 'dnf'). -do_install:append() { - ln -rs ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf - ln -rs ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic -} - -# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in -do_install:append:class-native() { - create_wrapper ${D}/${bindir}/dnf \ - SEQUOIA_CRYPTO_POLICY=${STAGING_DATADIR_NATIVE}/crypto-policies/back-ends/rpm-sequoia.config \ - RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ - RPM_NO_CHROOT_FOR_SCRIPTS=1 -} - -do_install:append:class-nativesdk() { - create_wrapper ${D}/${bindir}/dnf \ - RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \ - RPM_NO_CHROOT_FOR_SCRIPTS=1 -} - -SYSTEMD_SERVICE:${PN} = "dnf-makecache.service dnf-makecache.timer \ - dnf-automatic.service dnf-automatic.timer \ - dnf-automatic-download.service dnf-automatic-download.timer \ - dnf-automatic-install.service dnf-automatic-install.timer \ - dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \ -" -SYSTEMD_AUTO_ENABLE ?= "disable" - -SKIP_RECIPE[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}" - -# Packages for testing purposes -PACKAGES += "${PN}-test-main ${PN}-test-dep" -ALLOW_EMPTY:${PN}-test-main = "1" -ALLOW_EMPTY:${PN}-test-dep = "1" -RRECOMMENDS:${PN}-test-main = "${PN}-test-dep" diff --git a/meta/recipes-devtools/dnf/dnf_5.3.0.0.bb b/meta/recipes-devtools/dnf/dnf_5.3.0.0.bb new file mode 100644 index 0000000000..560b1f928a --- /dev/null +++ b/meta/recipes-devtools/dnf/dnf_5.3.0.0.bb @@ -0,0 +1,192 @@ +SUMMARY = "DNF package manager rewritten in C++, using libsolv as a dependency resolver" +DESCRIPTION = "\ + DNF5 is a command-line package manager that automates the process of \ + installing, upgrading, configuring, and removing computer programs in a \ + consistent manner. It supports RPM packages, modulemd modules, and comps \ + groups and environments. \ +" +HOMEPAGE = "https://github.com/rpm-software-management/dnf5" +BUGTRACKER = "https://github.com/rpm-software-management/dnf5/issues" +CVE_PRODUCT = "rpm:dnf5 rpm-software-management:dnf5" +SECTION = "base" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-only" +LIC_FILES_CHKSUM = "\ + file://COPYING.md;md5=9733192df318d0f806fd668b92ba0ba6 \ + file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://lgpl-2.1.txt;md5=4b54a1fd55a448865a0b32d41598759d \ +" + +DEPENDS = "\ + fmt \ + glib-2.0 \ + json-c \ + libcomps \ + libmodulemd \ + librepo \ + libsolv \ + libtoml11 \ + libxml2 \ + sqlite3 \ + util-linux \ +" + +SRC_URI = "\ + git://github.com/rpm-software-management/dnf5.git;protocol=https;branch=main;tag=${PV} \ + file://0002-cmake-set-CMP0190-to-OLD.patch \ + file://0003-Do-not-hardcode-system_cachedir.patch \ + file://0004-add-support-for-gcc-12-and-below.patch \ + file://0005-fix-string-concatenation-errors-for-musl.patch \ + file://0006-add-missing-headers-for-musl.patch \ + file://0007-Define-FNM_EXTMATCH-for-musl.patch \ + file://0008-libdnf-fix-arm-arch-mapping-issues-for-qemuarmv5.patch \ +" +SRC_URI:append:class-native = " file://0001-Do-not-hardcode-the-systemd-unit-directory.patch" +SRCREV = "c6a42c2e7e9ee0a04d46e6820a5962925a99b085" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+(\.\d+)+)" + +inherit bash-completion cmake gettext pkgconfig siteinfo systemd +inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3targetconfig', '', d)} + +PACKAGECONFIG[dnfdaemon-client] = "-DWITH_DNF5DAEMON_CLIENT=ON,-DWITH_DNF5DAEMON_CLIENT=OFF,sdbus-c++" +PACKAGECONFIG[dnfdaemon-server] = "-DWITH_DNF5DAEMON_SERVER=ON,-DWITH_DNF5DAEMON_SERVER=OFF,sdbus-c++" +PACKAGECONFIG[plugins] = "-DWITH_DNF5_PLUGINS=ON,-DWITH_DNF5_PLUGINS=OFF,curl sdbus-c++ zlib" +PACKAGECONFIG[plugin-actions] = "-DWITH_PLUGIN_ACTIONS=ON,-DWITH_PLUGIN_ACTIONS=OFF" +PACKAGECONFIG[plugin-appstream] = "-DWITH_PLUGIN_APPSTREAM=ON,-DWITH_PLUGIN_APPSTREAM=OFF,appstream" +PACKAGECONFIG[plugin-expired-pgp-keys] = "-DWITH_PLUGIN_EXPIRED_PGP_KEYS=ON,-DWITH_PLUGIN_EXPIRED_PGP_KEYS=OFF,gnupg" +PACKAGECONFIG[plugin-local] = "-DWITH_PLUGIN_LOCAL=ON,-DWITH_PLUGIN_LOCAL=OFF" + +# sdbus-c++ and journalctl integration. +PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,sdbus-c++" + +# build options - bindings +PACKAGECONFIG[python3] = "-DWITH_PYTHON3=ON,-DWITH_PYTHON3=OFF,python3 swig-native" + +# No sdbus-c++-native package. +PACKAGECONFIG:remove:class-native = "\ + dnfdaemon-client \ + dnfdaemon-server \ + plugins \ + plugin-manifest \ + systemd \ +" + +PACKAGE_BEFORE_PN += "\ + ${PN}-dnfdaemon-server \ + ${PN}-plugins \ + ${PN}-python3 \ +" + +# manpages generation requires http://www.sphinx-doc.org/ +EXTRA_OECMAKE:append = " \ + -DENABLE_SOLV_FOCUSNEW=ON \ + -DWITH_DNF5_OBSOLETES_DNF=OFF \ + -DWITH_DNF5=ON \ + -DWITH_GO=OFF \ + -DWITH_HTML=OFF \ + -DWITH_LIBDNF5_CLI=ON \ + -DWITH_MAN=OFF \ + -DWITH_PERL5=OFF \ + -DWITH_PLUGIN_RHSM=OFF \ + -DWITH_RUBY=OFF \ + -DWITH_TESTS=OFF \ + -DWITH_PLUGIN_MANIFEST=OFF \ +" + +# No sdbus-c++-native package exists so remove all options that depend on it. +EXTRA_OECMAKE:append:class-native = " \ + -DWITH_DNF5DAEMON_CLIENT=OFF \ + -DWITH_DNF5DAEMON_SERVER=OFF \ + -DWITH_DNF5_PLUGINS=OFF \ + -DWITH_PLUGIN_MANIFEST=OFF \ + -DWITH_SYSTEMD=OFF \ +" + +# Create a symlink called 'dnf' as 'make install' does not do it, but +# .spec file in dnf source tree does (and then Fedora and dnf documentation +# says that dnf binary is plain 'dnf'). +do_install:append() { + ln -rs ${D}/${bindir}/dnf5 ${D}/${bindir}/dnf + install -d ${D}${sysconfdir}/dnf + + # DNF always installs service files to /usr/lib/systemd, even if usrmerge is not + # selected. Also, remove systemd files if systemd isn't selected. + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then + rm -rf ${D}${libdir}/systemd + fi + + # Breaks dnf because the builddep plugin is provided in the + # dnf-plugins-core package which is not available in oe-core. + rm -f ${D}${datadir}/dnf5/aliases.d/compatibility-plugins.conf +} + +# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in +do_install:append:class-native() { + create_wrapper ${D}/${bindir}/dnf \ + SEQUOIA_CRYPTO_POLICY=${STAGING_DATADIR_NATIVE}/crypto-policies/back-ends/rpm-sequoia.config \ + RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \ + RPM_NO_CHROOT_FOR_SCRIPTS=1 +} + +do_install:append:class-nativesdk() { + create_wrapper ${D}/${bindir}/dnf \ + RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \ + RPM_NO_CHROOT_FOR_SCRIPTS=1 +} + +SYSTEMD_SERVICE:${PN} = "\ + dnf5-makecache.service \ + dnf5-makecache.timer \ +" + +SYSTEMD_AUTO_ENABLE ?= "disable" + +# Packages for testing purposes +PACKAGES += "${PN}-test-main ${PN}-test-dep" + +FILES:${PN} += "\ + ${bindir}/dnf* \ + ${datadir}/dbus-1/system-services/org.rpm.dnf.v0.service \ + ${datadir}/dnf5 \ + ${datadir}/polkit-1/actions/org.rpm.dnf* \ + ${datadir}/polkit-1/rules.d/org.rpm.dnf* \ + ${libdir}/dnf5 \ + ${libdir}/libdnf5* \ + ${sysconfdir}/dnf \ +" + +FILES:${PN}-bash-completion += "\ + ${datadir}/bash-completion/completions/dnf5 \ +" + +FILES:${PN}-dnfdaemon-server += "\ + ${systemd_system_unitdir}/dnf5daemon-server.service \ + ${datadir}/dbus-1/interfaces/org.rpm.dnf* \ + ${datadir}/dbus-1/system.d/org.rpm.dnf* \ +" + +FILES:${PN}-plugins += "\ + ${systemd_system_unitdir}/dnf-automatic.service \ + ${systemd_system_unitdir}/dnf-automatic.timer \ + ${systemd_system_unitdir}/dnf5-automatic.service \ + ${systemd_system_unitdir}/dnf5-automatic.timer \ +" + +FILES:${PN}-python3 += "\ + ${libdir}/${PYTHON_DIR}/site-packages/libdnf* \ +" + +FILES:${PN}-systemd += "\ + ${systemd_system_unitdir}/dnf5-offline-transaction.service \ + ${systemd_system_unitdir}/dnf5-offline-transaction-cleanup.service \ +" + +RRECOMMENDS:${PN}:class-target += "bash-completion gnupg" +RRECOMMENDS:${PN}-test-main = "${PN}-test-dep" +ALLOW_EMPTY:${PN}-test-main = "1" +ALLOW_EMPTY:${PN}-test-dep = "1" + +SKIP_RECIPE[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build without package_rpm in PACKAGE_CLASSES due to disabled rpm support in libsolv', d)}" + +BBCLASSEXTEND = "native nativesdk"