Commit fc10bfad authored by Milan P. Stanić's avatar Milan P. Stanić
Browse files

main/ell: upgrade to 0.35

remove uintset-Fix-incomplete-memcpy-in_clone.patch, fixed upstream
add patches posted upstream which fixes dhcp and pem
parent 4332976a
# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=ell
pkgver=0.33
pkgrel=1
pkgver=0.35
pkgrel=0
pkgdesc="Linux library for embedded development"
url="https://01.org/ell"
arch="all"
......@@ -11,7 +11,8 @@ makedepends="glib-dev linux-headers"
checkdepends="dbus"
subpackages="$pkgname-dev"
source="https://mirrors.edge.kernel.org/pub/linux/libs/ell/ell-$pkgver.tar.gz
uintset-Fix-incomplete-memcpy-in_clone.patch
ell-dhcp.patch
ell-pem.patch
"
build() {
......@@ -34,5 +35,6 @@ package() {
make DESTDIR="$pkgdir" install
}
sha512sums="ce4f91bd53d2606b71297505cb5f94048024da4a27ba74cd36685565344637f4a0b72e67465ff464f2d55485361f50ce5a9f2eda8da55a3ed9d7b0d6e27d3508 ell-0.33.tar.gz
f0fd872af9e58cce5ba4664013c918e25df30c1f6178ea777c97b0acad2381773677494d42f25fe2910e7f1ac69faabf22f8235e64fe54024fd2ffd5e5e03e87 uintset-Fix-incomplete-memcpy-in_clone.patch"
sha512sums="7676b9160e3b8e1bf88c5dede90761a3ee01e59028eccab127b48ee983cfbf73ba2177c453ed07e9d6a213e6ab02a1f9aed2ee88b6475da0a1a1a1e18f5fdabf ell-0.35.tar.gz
cce268e76fcfed1a53b890c4c79f28f4570477963c4f795ef75940da233d9642a5574b608e6dcf449ffd4de468b923eafdebfe8cb4ef3e5bf55aecd1c32e28f0 ell-dhcp.patch
c33bc3270c94c218280e80db857cdc99f757a6e51f3a5cdb5110b77c35faf80ce0418b8329b9d198d74be923e9da87fe53211c25b32541d0ea974fb5ccc2805d ell-pem.patch"
From: Érico Rolim <erico.erc(a)gmail.com>
---
I would prefer adding `#include <linux/types>` directly in
dhcp-private.h, but this patch follows the current style.
ell/dhcp-server.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ell/dhcp-server.c b/ell/dhcp-server.c
index c983ed4..144e83e 100644
--- a/ell/dhcp-server.c
+++ b/ell/dhcp-server.c
@@ -24,6 +24,7 @@
#include <config.h>
#endif
+#include <linux/types.h>
#include <net/ethernet.h>
#include <sys/socket.h>
#include <arpa/inet.h>
--
2.29.2
From: =?utf-8?q?=C3=89rico_Nogueira_=3Cericonr_at_disroot=2Eorg=3E?=
To: ellatlists.01.org
Subject: [BUG] ELL doesn't have a fallback for rawmemchr
Date: Mon, 30 Nov 2020 13:49:47 -0300
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=utf-8
Hi!
Building ELL 0.35 on a musl system fails, due to ell/pem.c using
rawmemchr(), which is a glibc extension. Building IWD with internal
ELL fails for the same reason.
I see that IWD itself has src/missing.h with a fallback, but ELL lacks
that.
We are using the following patch to fix the build:
diff --git a/ell/pem.c b/ell/pem.c
index 790f2c2..237ae02 100644
--- a/ell/pem.c
+++ b/ell/pem.c
@@ -224,7 +224,7 @@ static uint8_t *pem_load_buffer(const void *buf, size_t=
buf_len,
/* Check that each header line has a key and a colon */
while (start < end) {
- const char *lf = rawmemchr(start, '\n');
+ const char *lf = memchr(start, '\n', end - start);
const char *colon = memchr(start, ':', lf - start);
if (!colon)
--
If ELL is willing to include a src/missing.h of their own, that would
solve the issue, but avoiding rawmemchr() completely is also a
possibility.
Thanks,
Érico
From 5ff7cf20042f5bed6b898e2cda15712a755d91e5 Mon Sep 17 00:00:00 2001
From: Denis Kenzior <denkenz@gmail.com>
Date: Wed, 21 Oct 2020 16:55:47 -0500
Subject: uintset: Fix incomplete memcpy in _clone
l_uintset_clone was not calculating the bitmap size correctly and not
fully copying the bits of the original set.
---
ell/uintset.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ell/uintset.c b/ell/uintset.c
index d18ccfa..5a64d65 100644
--- a/ell/uintset.c
+++ b/ell/uintset.c
@@ -485,7 +485,8 @@ LIB_EXPORT struct l_uintset *l_uintset_clone(const struct l_uintset *original)
if (unlikely(!original))
return NULL;
- bitmap_size = (original->size + BITS_PER_LONG - 1) / BITS_PER_LONG;
+ bitmap_size = sizeof(unsigned long) *
+ ((original->size + BITS_PER_LONG - 1) / BITS_PER_LONG);
clone = l_uintset_new_from_range(original->min, original->max);
memcpy(clone->bits, original->bits, bitmap_size);
--
cgit 1.2.3-1.el7
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment