From: "Jeremy Lainé" <jeremy.laine@bolloretelecom.eu>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [RFC] move to opkg / md5 error on big-endian machine
Date: Wed, 19 Mar 2008 18:52:27 +0100 [thread overview]
Message-ID: <47E152DB.4050208@bolloretelecom.eu> (raw)
In-Reply-To: <BDAD3E9D-ACB9-433B-81C7-F727545ACCFE@student.utwente.nl>
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
opkg systematically fails to check the MD5 checksums on big-endian
targets. The reason for this is that md5.c was taken from glibc, and
it only sets the endianness correctly if _LIBC is defined:
#ifdef _LIBC
# include <endian.h>
# if __BYTE_ORDER == __BIG_ENDIAN
# define WORDS_BIGENDIAN 1
# endif
[snip]
#endif
Attached is a patch thats sets WORDS_BIGENDIAN on big-endian machines
without touching the code, and fixes the MD5 errors I was getting.
Rather than putting this patch into OE, maybe we should push this
upstream?
Cheers,
- --
Jeremy LAINE
Bolloré telecom | 11bis, rue Scribe | F-75009 Paris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFH4VLbCL1n3lVB9EYRArVFAJ9M22nqlh2jqV+OKg7HqNsgIC/hBgCfa2R8
VdUuk6OIo5W72sXs/8tQ8G8=
=DyiG
-----END PGP SIGNATURE-----
[-- Attachment #2: check_endianness.patch --]
[-- Type: text/x-diff, Size: 1048 bytes --]
diff -urN opkg.orig/configure.ac opkg/configure.ac
--- opkg.orig/configure.ac 2008-03-19 10:43:40.000000000 +0100
+++ opkg/configure.ac 2008-03-19 18:37:08.000000000 +0100
@@ -93,6 +93,10 @@
AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
+# Checks endianness
+AC_C_BIGENDIAN(ENDIAN_CFLAGS="-DWORDS_BIGENDIAN=1",)
+AC_SUBST(BIGENDIAN_CFLAGS)
+
# Don't do annoying tests that don't work when cross-compiling, just trust them.
# The AC_FUNC_MEMCMP test doesn't work during a cross-compile, disable.
# AC_FUNC_MEMCMP
diff -urN opkg.orig/libopkg/Makefile.am opkg/libopkg/Makefile.am
--- opkg.orig/libopkg/Makefile.am 2008-03-19 10:43:40.000000000 +0100
+++ opkg/libopkg/Makefile.am 2008-03-19 18:36:19.000000000 +0100
@@ -59,7 +59,7 @@
$(opkg_cmd_sources) $(opkg_db_sources) \
$(opkg_util_sources) $(opkg_list_sources)
-libopkg_la_CFLAGS = $(ALL_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)
+libopkg_la_CFLAGS = $(ALL_CFLAGS) $(BIGENDIAN_CFLAGS) $(CURL_CFLAGS) $(GPGME_CFLAGS)
lib_LTLIBRARIES = libopkg.la
[-- Attachment #3: check_endianness.patch.sig --]
[-- Type: application/octet-stream, Size: 65 bytes --]
next prev parent reply other threads:[~2008-03-19 17:52 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 8:55 [RFC] move to opkg Koen Kooi
2008-03-18 9:55 ` Junqian Gordon Xu
2008-03-19 15:33 ` WPkg Silvano Catinella
2008-03-25 17:23 ` WPkg Michael 'Mickey' Lauer
2008-03-25 23:42 ` WPkg Rod Whitby
2008-04-01 9:15 ` WPkg Silvano Catinella
2008-03-18 9:56 ` [RFC] move to opkg Marcin Juszkiewicz
2008-03-18 10:09 ` Koen Kooi
2008-03-18 10:42 ` Koen Kooi
2008-03-18 11:34 ` Jacob Thebault-Spieker
2008-03-18 11:42 ` Koen Kooi
2008-03-18 13:49 ` Geoffrey Wossum
2008-03-18 14:32 ` Koen Kooi
2008-03-18 16:48 ` Richard Purdie
2008-03-18 17:05 ` Koen Kooi
2008-03-23 0:38 ` Mike (mwester)
2008-03-23 5:17 ` Mike (mwester)
2008-03-23 10:43 ` Marcin Juszkiewicz
2008-03-23 11:02 ` Koen Kooi
2008-03-23 13:25 ` Mike (mwester)
2008-03-23 18:18 ` Tom Rini
2008-03-23 18:55 ` Koen Kooi
2008-03-23 22:20 ` Tom Rini
2008-03-23 23:10 ` Rod Whitby
2008-03-23 23:06 ` Richard Purdie
2008-03-23 23:46 ` Rod Whitby
2008-03-24 4:30 ` Mike (mwester)
2008-03-24 7:55 ` Stelios Koroneos
2008-03-18 18:12 ` Tom Rini
2008-03-18 18:18 ` Mikhail Gusarov
2008-03-18 18:40 ` Koen Kooi
2008-03-19 9:06 ` Richard Purdie
2008-03-19 9:13 ` Marcin Juszkiewicz
2008-03-18 14:35 ` Marcin Juszkiewicz
2008-03-18 22:00 ` Koen Kooi
2008-03-19 17:52 ` Jeremy Lainé [this message]
2008-03-22 20:38 ` [RFC] move to opkg / md5 error on big-endian machine Jeremy Lainé
2008-03-23 10:59 ` [RFC] move to opkg Jeremy Lainé
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=47E152DB.4050208@bolloretelecom.eu \
--to=jeremy.laine@bolloretelecom.eu \
--cc=openembedded-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.