<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>16319</bug_id>
          
          <creation_ts>2026-06-16 12:57:15 +0000</creation_ts>
          <short_desc>Checksum validation is not working on big endian targets</short_desc>
          <delta_ts>2026-06-16 16:16:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>opkg</product>
          <component>opkg</component>
          <version>0.9.0</version>
          <rep_platform>Other</rep_platform>
          <op_sys>mips64</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>next-patch</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michal Sieron">michalwsieron</reporter>
          <assigned_to name="Alex Stewart">alex.stewart</assigned_to>
          
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>105901</commentid>
    <comment_count>0</comment_count>
    <who name="Michal Sieron">michalwsieron</who>
    <bug_when>2026-06-16 12:57:15 +0000</bug_when>
    <thetext>CMake based setup does not configure big-endian builds correctly.

Autoconf based setup used (https://git.yoctoproject.org/opkg/tree/configure.ac?h=v0.8.0#n260):
```
# Checks endianness
AC_C_BIGENDIAN(BIGENDIAN_CFLAGS=&quot;-DWORDS_BIGENDIAN=1&quot;,)
AC_SUBST(BIGENDIAN_CFLAGS)
```
to define `WORDS_BIGENDIAN`, which is used in md5.c and sha256.c to define `SWAP` macro.
With new CMake based setup this is no longer the case, and checksum validation doesn&apos;t work.

We hit this on a mips64 target, but I assume some powerpc targets are affected as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105902</commentid>
    <comment_count>1</comment_count>
    <who name="Alex Stewart">alex.stewart</who>
    <bug_when>2026-06-16 16:16:09 +0000</bug_when>
    <thetext>Fixed by Michal&apos;s commit a56ca271876c8a6ff6540f8b68d7969357207b05.

https://git.yoctoproject.org/opkg/commit/?id=a56ca271876c8a6ff6540f8b68d7969357207b05</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>