Openembedded Core Discussions
 help / color / mirror / Atom feed
From: ecordonnier@snap.com
To: openembedded-core@lists.openembedded.org
Cc: Etienne Cordonnier <ecordonnier@snap.com>
Subject: [PATCH] opkg: fix sha256 support
Date: Thu,  6 Aug 2026 13:27:41 +0200	[thread overview]
Message-ID: <20260806112741.778666-1-ecordonnier@snap.com> (raw)

From: Etienne Cordonnier <ecordonnier@snap.com>

A regression caused sha256 support to not work in opkg 0.9.0 and 0.10.0.
Backport this patch from opkg master branch.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
 ....h.in-add-missing-WITH_SHA256-define.patch | 42 +++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_0.10.0.bb     |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 meta/recipes-devtools/opkg/opkg/0002-config.h.in-add-missing-WITH_SHA256-define.patch

diff --git a/meta/recipes-devtools/opkg/opkg/0002-config.h.in-add-missing-WITH_SHA256-define.patch b/meta/recipes-devtools/opkg/opkg/0002-config.h.in-add-missing-WITH_SHA256-define.patch
new file mode 100644
index 00000000000..346bf8dfa6d
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0002-config.h.in-add-missing-WITH_SHA256-define.patch
@@ -0,0 +1,42 @@
+From 7477db1d557516386593261685a16f31b3aaff43 Mon Sep 17 00:00:00 2001
+From: Etienne Cordonnier <ecordonnier@snap.com>
+Date: Wed, 5 Aug 2026 11:15:25 +0200
+Subject: [PATCH] config.h.in: add missing WITH_SHA256 define
+
+WITH_SHA256 was used throughout the codebase (file_util.c,
+opkg_verify.c, release.c, release_parse.c) guarded by "#if
+WITH_SHA256", but config.h.in never generated the macro, so
+sha256sum support was always compiled out regardless of the
+WITH_SHA256 CMake option.
+
+Also add a comment noting that the option order in this file should
+match the option() order in CMakeLists.txt.
+
+AI-Generated: Claude Sonnet 5
+Upstream-Status: Backport [7477db1d557516386593261685a16f31b3aaff43]
+Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
+Signed-off-by: Alex Stewart <alex.stewart@emerson.com>
+---
+ config.h.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/config.h.in b/config.h.in
+index f2d74c5..b45ea23 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -1,3 +1,4 @@
++/* Keep this list in the same order as the option()s in CMakeLists.txt */
+ #cmakedefine01 WITH_LIBOPKG_API
+ #cmakedefine01 WITH_XZ
+ #cmakedefine01 WITH_BZIP2
+@@ -5,6 +6,7 @@
+ #cmakedefine01 WITH_ZSTD
+ #cmakedefine01 WITH_CURL
+ #cmakedefine01 WITH_SSLCURL
++#cmakedefine01 WITH_SHA256
+ #cmakedefine01 WITH_ACL
+ #cmakedefine01 USE_XATTR
+ #cmakedefine01 USE_SOLVER_LIBSOLV
+-- 
+2.43.0
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.10.0.bb b/meta/recipes-devtools/opkg/opkg_0.10.0.bb
index e3c2dd790dd..0631868a30c 100644
--- a/meta/recipes-devtools/opkg/opkg_0.10.0.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.10.0.bb
@@ -15,6 +15,7 @@ PE = "1"
 SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
            file://opkg.conf \
            file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+           file://0002-config.h.in-add-missing-WITH_SHA256-define.patch \
            file://run-ptest \
            "
 
-- 
2.43.0



                 reply	other threads:[~2026-08-06 11:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260806112741.778666-1-ecordonnier@snap.com \
    --to=ecordonnier@snap.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox