More musl fixes
cover More musl fixes
This patchset fixes few more recipes as we move towards building world with musl, mainly addresses the recipes which install charset.alias on musl systems, Now we have 60 odd packages left to compile in world build
Khem Raj (10):
at: Remove glibc specific code
coreutils: Add code to consider musl when selecting charsets
openssh: Upgrade 6.7 - > 6.8
dosfstools: Fix build with musl
distcc:Include missing fcntl.h in zeroconf
parted: Add patches to fix build on musl
libnfsidmap: Include sys/types.h for u_int32_t
recipes: Fix charset.alias for musl
mtd-utils: update to latest and fix static inlining
connman: Fix builds to compile on musl
...need_charset_alias-when-building-for-musl.patch | 30 +++
meta/recipes-bsp/grub/grub2.inc | 1 +
...cktrace-API-only-when-compiling-for-glibc.patch | 41 ++++
.../connman/connman/0002-musl-header-fixes.patch | 235 +++++++++++++++++++++
...resolve-musl-does-not-implement-res_ninit.patch | 77 +++++++
...Fix-duplicate-definitions-issue-with-musl.patch | 43 ++++
meta/recipes-connectivity/connman/connman_1.28.bb | 4 +
...clude-sys-types.h-for-getting-u_-typedefs.patch | 27 +++
.../Set_nobody_user_group.patch | 0
.../{files => libnfsidmap}/fix-ac-prereq.patch | 0
.../nfs-utils/libnfsidmap_0.25.bb | 1 +
.../openssh/add-test-support-for-busybox.patch | 38 ++--
.../openssh/{openssh_6.7p1.bb => openssh_6.8p1.bb} | 4 +-
...need_charset_alias-when-building-for-musl.patch | 33 +++
meta/recipes-core/coreutils/coreutils_8.23.bb | 1 +
...need_charset_alias-when-building-for-musl.patch | 33 +++
meta/recipes-devtools/bison/bison_2.7.1.bb | 1 +
meta/recipes-devtools/distcc/distcc_3.1.bb | 1 +
.../files/0001-zeroconf-Include-fcntl.h.patch | 29 +++
...ude-fcntl.h-for-getting-loff_t-definition.patch | 41 ++++
.../recipes-devtools/dosfstools/dosfstools_2.11.bb | 5 +-
meta/recipes-devtools/m4/m4-1.4.17.inc | 3 +
...need_charset_alias-when-building-for-musl.patch | 33 +++
...emove-duplicate-hashtable_iterator_value-.patch | 64 ++++++
meta/recipes-devtools/mtd/mtd-utils_git.bb | 1 +
...need_charset_alias-when-building-for-musl.patch | 33 +++
meta/recipes-devtools/patch/patch_2.7.5.bb | 4 +-
.../at/at/0001-remove-glibc-assumption.patch | 57 +++++
meta/recipes-extended/at/at_3.1.16.bb | 1 +
meta/recipes-extended/augeas/augeas.inc | 1 +
...need_charset_alias-when-building-for-musl.patch | 30 +++
...need_charset_alias-when-building-for-musl.patch | 30 +++
meta/recipes-extended/cpio/cpio_2.11.bb | 3 +-
...need_charset_alias-when-building-for-musl.patch | 33 +++
meta/recipes-extended/diffutils/diffutils_3.3.bb | 1 +
...need_charset_alias-when-building-for-musl.patch | 30 +++
.../recipes-extended/findutils/findutils_4.5.14.bb | 2 +
...need_charset_alias-when-building-for-musl.patch | 33 +++
meta/recipes-extended/grep/grep_2.21.bb | 4 +-
...need_charset_alias-when-building-for-musl.patch | 30 +++
meta/recipes-extended/groff/groff_1.22.3.bb | 8 +-
.../0001-Include-fcntl.h-in-platform_defs.h.patch | 29 +++
...need_charset_alias-when-building-for-musl.patch | 33 +++
meta/recipes-extended/parted/parted_3.2.bb | 2 +
...need_charset_alias-when-building-for-musl.patch | 33 +++
meta/recipes-extended/sed/sed_4.2.2.bb | 1 +
...need_charset_alias-when-building-for-musl.patch | 30 +++
meta/recipes-extended/texinfo/texinfo_5.2.bb | 3 +-
...need_charset_alias-when-building-for-musl.patch | 30 +++
meta/recipes-extended/wget/wget_1.16.3.bb | 1 +
...need_charset_alias-when-building-for-musl.patch | 30 +++
.../libunistring/libunistring_0.9.4.bb | 1 +
52 files changed, 1214 insertions(+), 25 deletions(-)
create mode 100644 meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch
create mode 100644 meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch
create mode 100644 meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch
create mode 100644 meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
create mode 100644 meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch
rename meta/recipes-connectivity/nfs-utils/{files => libnfsidmap}/Set_nobody_user_group.patch (100%)
rename meta/recipes-connectivity/nfs-utils/{files => libnfsidmap}/fix-ac-prereq.patch (100%)
rename meta/recipes-connectivity/openssh/{openssh_6.7p1.bb => openssh_6.8p1.bb} (97%)
create mode 100644 meta/recipes-core/coreutils/coreutils-8.23/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch
create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch
create mode 100644 meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
create mode 100644 meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
create mode 100644 meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch
create mode 100644 meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch
create mode 100644 meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patchSignature · 1 line
2.1.4
PATCH 1/10 at: Remove glibc specific code
Fixes errors like
| /home/kraj/work/bleeding/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/at/3.1.16-r0/at-3.1.16/parsetime.y:264:
undefined reference to `__isleap'
| collect2: error: ld returned 1 exit status
--- .../at/at/0001-remove-glibc-assumption.patch | 57 ++++++++++++++++++++++ meta/recipes-extended/at/at_3.1.16.bb | 1 + 2 files changed, 58 insertions(+) create mode 100644 meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch
meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch new file +57 -0
@@ -0,0 +1,57 @@ +From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 16:35:30 -0700 +Subject: [PATCH] remove glibc assumption + +glibc time.h header has an undocumented __isleap macro +that we are using anf musl is missing it. +Since it is undocumented & does not appear +on any other libc, stop using it and just define the macro in +locally instead. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + parsetime.y | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/parsetime.y b/parsetime.y +index 7005e88..324e6d3 100644 +--- a/parsetime.y ++++ b/parsetime.y +@@ -8,6 +8,9 @@ + + #define YYDEBUG 1 + ++#define is_leap_year(y) \ ++ ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0)) ++ + struct tm exectm; + static int isgmt; + static int yearspec; +@@ -217,8 +220,8 @@ date : month_name day_number + mnum == 12) && dnum > 31) + || ((mnum == 4 || mnum == 6 || mnum == 9 || + mnum == 11) && dnum > 30) +- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900)) +- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900)) ++ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900)) ++ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900)) + ) + { + yyerror("Error in day of month"); +@@ -261,8 +264,8 @@ date : month_name day_number + mnum == 12) && dnum > 31) + || ((mnum == 4 || mnum == 6 || mnum == 9 || + mnum == 11) && dnum > 30) +- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900)) +- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900)) ++ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900)) ++ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900)) + ) + { + yyerror("Error in day of month"); +-- +2.1.4 +
meta/recipes-extended/at/at_3.1.16.bb +1 -0
@@ -24,6 +24,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \ file://atd.service \ ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ file://makefile-fix-parallel.patch \ + file://0001-remove-glibc-assumption.patch \ " PAM_SRC_URI = "file://pam.conf.patch \
Signature · 1 line
2.1.4
PATCH 2/10 coreutils: Add code to consider musl when selecting charsets
The real issue is in gnulib where it should be fixed but gnulib gets imported in source into various components and that may take a while. So lets fix the componnets versions and as/if they land in new gnulib with a fix we can take it off.
--- ...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++ meta/recipes-core/coreutils/coreutils_8.23.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 meta/recipes-core/coreutils/coreutils-8.23/0001-Unset-need_charset_alias-when-building-for-musl.patch
meta/recipes-core/coreutils/coreutils-8.23/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 +
meta/recipes-core/coreutils/coreutils_8.23.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \ file://man-decouple-manpages-from-build.patch \ file://remove-usr-local-lib-from-m4.patch \ file://fix-selinux-flask.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ " SRC_URI[tarball.md5sum] = "abed135279f87ad6762ce57ff6d89c41"
Signature · 1 line
2.1.4
PATCH 3/10 openssh: Upgrade 6.7 - > 6.8
In reply to Khem RajIts a major releaseof openssh, should be fully
compatible with 6.7 additionally works with musl
---
.../openssh/add-test-support-for-busybox.patch | 38 +++++++++++++---------
.../openssh/{openssh_6.7p1.bb => openssh_6.8p1.bb} | 4 +--
2 files changed, 25 insertions(+), 17 deletions(-)
rename meta/recipes-connectivity/openssh/{openssh_6.7p1.bb => openssh_6.8p1.bb} (97%)meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch +23 -15
@@ -6,10 +6,12 @@ Adjust test cases to work with busybox. Signed-off-by: Maxin B. John <[email protected]> Upstream-Status: Pending ---- a/regress/cipher-speed.sh 2012-06-30 07:08:53.000000000 +0200 -+++ b/regress/cipher-speed.sh 2013-02-15 11:30:20.670022055 +0100 -@@ -26,7 +26,7 @@ - echon "$c/$m:\t" +Index: openssh-6.8p1/regress/cipher-speed.sh +=================================================================== +--- openssh-6.8p1.orig/regress/cipher-speed.sh ++++ openssh-6.8p1/regress/cipher-speed.sh +@@ -17,7 +17,7 @@ for c in `${SSH} -Q cipher`; do n=0; for + printf "%-60s" "$c/$m:" ( ${SSH} -o 'compression no' \ -F $OBJ/ssh_proxy -2 -m $m -c $c somehost \ - exec sh -c \'"dd of=/dev/null obs=32k"\' \
@@ -17,8 +19,8 @@ Upstream-Status: Pending < ${DATA} ) 2>&1 | getbytes if [ $? -ne 0 ]; then -@@ -42,7 +42,7 @@ - echon "$c:\t" +@@ -42,7 +42,7 @@ for c in $ciphers; do + printf "%-60s" "$c:" ( ${SSH} -o 'compression no' \ -F $OBJ/ssh_proxy -1 -c $c somehost \ - exec sh -c \'"dd of=/dev/null obs=32k"\' \
@@ -26,9 +28,11 @@ Upstream-Status: Pending < ${DATA} ) 2>&1 | getbytes if [ $? -ne 0 ]; then fail "ssh -1 failed with cipher $c" ---- a/regress/transfer.sh 2003-09-04 06:54:40.000000000 +0200 -+++ b/regress/transfer.sh 2013-02-15 11:25:34.666411185 +0100 -@@ -18,7 +18,7 @@ +Index: openssh-6.8p1/regress/transfer.sh +=================================================================== +--- openssh-6.8p1.orig/regress/transfer.sh ++++ openssh-6.8p1/regress/transfer.sh +@@ -15,7 +15,7 @@ for p in ${SSH_PROTOCOLS}; do for s in 10 100 1k 32k 64k 128k 256k; do trace "proto $p dd-size ${s}" rm -f ${COPY}
@@ -37,20 +41,24 @@ Upstream-Status: Pending ${SSH} -q -$p -F $OBJ/ssh_proxy somehost "cat > ${COPY}" if [ $? -ne 0 ]; then fail "ssh cat $DATA failed" ---- a/regress/yes-head.sh 2005-11-28 06:41:03.000000000 +0100 -+++ b/regress/yes-head.sh 2013-02-15 11:55:11.413715068 +0100 +Index: openssh-6.8p1/regress/yes-head.sh +=================================================================== +--- openssh-6.8p1.orig/regress/yes-head.sh ++++ openssh-6.8p1/regress/yes-head.sh @@ -4,7 +4,7 @@ tid="yes pipe head" - for p in 1 2; do + for p in ${SSH_PROTOCOLS}; do - lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -2000"' | (sleep 3 ; wc -l)` + lines=`${SSH} -$p -F $OBJ/ssh_proxy thishost 'sh -c "while true;do echo yes;done | _POSIX2_VERSION=199209 head -n 2000"' | (sleep 3 ; wc -l)` if [ $? -ne 0 ]; then fail "yes|head test failed" lines = 0; ---- a/regress/key-options.sh 2008-07-04 09:08:58.000000000 +0200 -+++ b/regress/key-options.sh 2013-02-15 12:06:05.109486098 +0100 -@@ -54,7 +54,7 @@ +Index: openssh-6.8p1/regress/key-options.sh +=================================================================== +--- openssh-6.8p1.orig/regress/key-options.sh ++++ openssh-6.8p1/regress/key-options.sh +@@ -54,7 +54,7 @@ for p in ${SSH_PROTOCOLS}; do fi sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys
meta/recipes-connectivity/openssh/openssh_6.8p1.bb renamed from meta/recipes-connectivity/openssh/openssh_6.7p1.bb +2 -2
@@ -25,8 +25,8 @@ SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar. PAM_SRC_URI = "file://sshd" -SRC_URI[md5sum] = "3246aa79317b1d23cae783a3bf8275d6" -SRC_URI[sha256sum] = "b2f8394eae858dabbdef7dac10b99aec00c95462753e80342e530bbb6f725507" +SRC_URI[md5sum] = "08f72de6751acfbd0892b5f003922701" +SRC_URI[sha256sum] = "3ff64ce73ee124480b5bf767b9830d7d3c03bbcb6abe716b78f0192c37ce160e" inherit useradd update-rc.d update-alternatives systemd
Signature · 1 line
2.1.4
PATCH 4/10 dosfstools: Fix build with musl
In reply to Khem RajWe need to pass _GNU_SOURCE and include fcntl.h
--- ...ude-fcntl.h-for-getting-loff_t-definition.patch | 41 ++++++++++++++++++++++ .../recipes-devtools/dosfstools/dosfstools_2.11.bb | 5 ++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch
meta/recipes-devtools/dosfstools/dosfstools/0001-Include-fcntl.h-for-getting-loff_t-definition.patch new file +41 -0
@@ -0,0 +1,41 @@ +From b7c42c6a9829bea911b22201edd7df2a9bec1a14 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:52:34 -0700 +Subject: [PATCH] Include fcntl.h for getting loff_t definition + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + dosfsck/dosfsck.h | 2 ++ + dosfsck/lfn.c | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/dosfsck/dosfsck.h b/dosfsck/dosfsck.h +index d9314b1..2076d5f 100644 +--- a/dosfsck/dosfsck.h ++++ b/dosfsck/dosfsck.h +@@ -50,6 +50,8 @@ + #define CT_LE_L(v) (v) + #endif /* __BIG_ENDIAN */ + ++#include <fcntl.h> ++ + #define VFAT_LN_ATTR (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME) + + /* ++roman: Use own definition of boot sector structure -- the kernel headers' +diff --git a/dosfsck/lfn.c b/dosfsck/lfn.c +index 9b2cfc3..bb04fda 100644 +--- a/dosfsck/lfn.c ++++ b/dosfsck/lfn.c +@@ -7,6 +7,7 @@ + #include <string.h> + #include <limits.h> + #include <time.h> ++#include <fcntl.h> + + #include "common.h" + #include "io.h" +-- +2.1.4 +
meta/recipes-devtools/dosfstools/dosfstools_2.11.bb +4 -1
@@ -17,7 +17,9 @@ SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.src.tar.gz/407d4 file://dosfstools-msdos_fs-types.patch \ file://include-linux-types.patch \ file://nofat32_autoselect.patch \ - file://fix_populated_dosfs_creation.patch " + file://fix_populated_dosfs_creation.patch \ + file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \ + " SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6" SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c98a484"
@@ -26,6 +28,7 @@ SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c # add this in here to for sure allow for big files. # CFLAGS_append = " -D_FILE_OFFSET_BITS=64" +CFLAGS_append_libc-musl = " -D_GNU_SOURCE" do_install () { oe_runmake "PREFIX=${D}" "SBINDIR=${D}${base_sbindir}" \
Signature · 1 line
2.1.4
PATCH 5/10 distcc:Include missing fcntl.h in zeroconf
In reply to Khem RajThis is exposed by musl
--- meta/recipes-devtools/distcc/distcc_3.1.bb | 1 + .../files/0001-zeroconf-Include-fcntl.h.patch | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch
meta/recipes-devtools/distcc/distcc_3.1.bb +1 -0
@@ -19,6 +19,7 @@ RRECOMMENDS_${PN} = "avahi-daemon" SRC_URI = "http://distcc.googlecode.com/files/${BPN}-${PV}.tar.bz2 \ file://separatebuilddir.patch \ + file://0001-zeroconf-Include-fcntl.h.patch \ file://default \ file://distccmon-gnome.desktop \ file://distcc \
meta/recipes-devtools/distcc/files/0001-zeroconf-Include-fcntl.h.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 8331fc4759d809512f404e7a27f817ad6d616450 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 18:00:33 -0700 +Subject: [PATCH] zeroconf: Include fcntl.h + +We need it for getting deinitions for O_* e.g. O_CREAT + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + src/zeroconf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/zeroconf.c b/src/zeroconf.c +index 414ddc4..31bd33f 100644 +--- a/src/zeroconf.c ++++ b/src/zeroconf.c +@@ -33,6 +33,7 @@ + #include <unistd.h> + #include <stdlib.h> + #include <limits.h> ++#include <fcntl.h> + + #include <avahi-common/domain.h> + #include <avahi-common/error.h> +-- +2.1.4 +
Signature · 1 line
2.1.4
PATCH 6/10 parted: Add patches to fix build on musl
In reply to Khem RajTheese patches are actually generic but expose issues when compiling on musl
--- .../0001-Include-fcntl.h-in-platform_defs.h.patch | 29 +++++++++++++++++++ ...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++ meta/recipes-extended/parted/parted_3.2.bb | 2 ++ 3 files changed, 64 insertions(+) create mode 100644 meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch create mode 100644 meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
meta/recipes-extended/parted/files/0001-Include-fcntl.h-in-platform_defs.h.patch new file +29 -0
@@ -0,0 +1,29 @@ +From d78dd087c4ec4715aab5fe115668e726046ecd76 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 18:16:05 -0700 +Subject: [PATCH] Include fcntl.h in /platform_defs.h + +exposed when compiling using musl + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + libparted/fs/xfs/platform_defs.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libparted/fs/xfs/platform_defs.h b/libparted/fs/xfs/platform_defs.h +index 2b55752..32bd3d3 100644 +--- a/libparted/fs/xfs/platform_defs.h ++++ b/libparted/fs/xfs/platform_defs.h +@@ -42,6 +42,7 @@ + #include <stdlib.h> + #include <string.h> + #include <unistd.h> ++#include <fcntl.h> + #include <sys/param.h> + #include <sys/types.h> + +-- +2.1.4 +
meta/recipes-extended/parted/files/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 +
meta/recipes-extended/parted/parted_3.2.bb +2 -0
@@ -11,6 +11,8 @@ SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \ file://syscalls.patch \ file://fix-doc-mandir.patch \ file://fix-compile-failure-while-dis.patch \ + file://0001-Include-fcntl.h-in-platform_defs.h.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ file://run-ptest \ file://Makefile \ "
Signature · 1 line
2.1.4
PATCH 7/10 libnfsidmap: Include sys/types.h for u_int32_t
In reply to Khem RajExposed using musl
---
...clude-sys-types.h-for-getting-u_-typedefs.patch | 27 ++++++++++++++++++++++
.../Set_nobody_user_group.patch | 0
.../{files => libnfsidmap}/fix-ac-prereq.patch | 0
.../nfs-utils/libnfsidmap_0.25.bb | 1 +
4 files changed, 28 insertions(+)
create mode 100644 meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch
rename meta/recipes-connectivity/nfs-utils/{files => libnfsidmap}/Set_nobody_user_group.patch (100%)
rename meta/recipes-connectivity/nfs-utils/{files => libnfsidmap}/fix-ac-prereq.patch (100%)meta/recipes-connectivity/nfs-utils/libnfsidmap/0001-include-sys-types.h-for-getting-u_-typedefs.patch new file +27 -0
@@ -0,0 +1,27 @@ +From a5e95a42e7bceddc9ecad06694c1a0588f4bafc8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 14 Apr 2015 07:22:47 -0700 +Subject: [PATCH] include sys/types.h for getting u_* typedefs + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + cfg.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cfg.h b/cfg.h +index d4d4cab..fe49e8f 100644 +--- a/cfg.h ++++ b/cfg.h +@@ -33,6 +33,7 @@ + #ifndef _CONF_H_ + #define _CONF_H_ + ++#include <sys/types.h> + #include "queue.h" + + struct conf_list_node { +-- +2.1.4 +
meta/recipes-connectivity/nfs-utils/libnfsidmap/Set_nobody_user_group.patch renamed from meta/recipes-connectivity/nfs-utils/files/Set_nobody_user_group.patch +0 -0
meta/recipes-connectivity/nfs-utils/libnfsidmap/fix-ac-prereq.patch renamed from meta/recipes-connectivity/nfs-utils/files/fix-ac-prereq.patch +0 -0
meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb +1 -0
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d9c6a2a0ca6017fda7cd905ed2739b37" SRC_URI = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/${BPN}-${PV}.tar.gz \ file://fix-ac-prereq.patch \ file://Set_nobody_user_group.patch \ + file://0001-include-sys-types.h-for-getting-u_-typedefs.patch \ " SRC_URI[md5sum] = "2ac4893c92716add1a1447ae01df77ab"
Signature · 1 line
2.1.4
PATCH 8/10 recipes: Fix charset.alias for musl
In reply to Khem RajThis is same gnulib fix replicated across needed recipes
--- ...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++ meta/recipes-bsp/grub/grub2.inc | 1 + ...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++ meta/recipes-devtools/bison/bison_2.7.1.bb | 1 + meta/recipes-devtools/m4/m4-1.4.17.inc | 3 ++ ...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++ ...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++ meta/recipes-devtools/patch/patch_2.7.5.bb | 4 ++- meta/recipes-extended/augeas/augeas.inc | 1 + ...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++ ...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++ meta/recipes-extended/cpio/cpio_2.11.bb | 3 +- ...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++ meta/recipes-extended/diffutils/diffutils_3.3.bb | 1 + ...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++ .../recipes-extended/findutils/findutils_4.5.14.bb | 2 ++ ...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++ meta/recipes-extended/grep/grep_2.21.bb | 4 ++- ...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++ meta/recipes-extended/groff/groff_1.22.3.bb | 8 ++++-- ...need_charset_alias-when-building-for-musl.patch | 33 ++++++++++++++++++++++ meta/recipes-extended/sed/sed_4.2.2.bb | 1 + ...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++ meta/recipes-extended/texinfo/texinfo_5.2.bb | 3 +- ...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++ meta/recipes-extended/wget/wget_1.16.3.bb | 1 + ...need_charset_alias-when-building-for-musl.patch | 30 ++++++++++++++++++++ .../libunistring/libunistring_0.9.4.bb | 1 + 28 files changed, 465 insertions(+), 7 deletions(-) create mode 100644 meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch
meta/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: grub-2.00/grub-core/gnulib/Makefile.am +=================================================================== +--- grub-2.00.orig/grub-core/gnulib/Makefile.am ++++ grub-2.00/grub-core/gnulib/Makefile.am +@@ -410,7 +410,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \
meta/recipes-bsp/grub/grub2.inc +1 -0
@@ -24,6 +24,7 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \ file://grub-no-unused-result.patch \ file://grub-efi-allow-a-compilation-without-mcmodel-large.patch \ file://grub-efi-fix-with-glibc-2.20.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ " DEPENDS = "flex-native bison-native xz"
meta/recipes-devtools/bison/bison/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 +
meta/recipes-devtools/bison/bison_2.7.1.bb +1 -0
@@ -19,6 +19,7 @@ EXTRA_OECONF += "M4=m4" SRC_URI = "${BASE_SRC_URI} \ file://fix_cross_manpage_building.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ " SRC_URI[md5sum] = "7be02eb973eccf388f1ae750fc09eed0"
meta/recipes-devtools/m4/m4-1.4.17.inc +3 -0
@@ -11,5 +11,8 @@ SRC_URI += "file://ac_config_links.patch \ file://remove-gets.patch \ " +SRC_URI_append_class-target = "\ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + " SRC_URI[md5sum] = "a5e9954b1dae036762f7b13673a2cf76" SRC_URI[sha256sum] = "3ce725133ee552b8b4baca7837fb772940b25e81b2a9dc92537aeaf733538c9e"
meta/recipes-devtools/m4/m4/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 +
meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 +
meta/recipes-devtools/patch/patch_2.7.5.bb +3 -1
@@ -1,6 +1,8 @@ require patch.inc LICENSE = "GPLv3" +SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch" + SRC_URI[md5sum] = "ed4d5674ef4543b4eb463db168886dc7" SRC_URI[sha256sum] = "7436f5a19f93c3ca83153ce9c5cbe4847e97c5d956e57a220121e741f6e7968f"
@@ -9,5 +11,5 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" acpaths = "-I ${S}/m4 " PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)}" -PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr," +PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
meta/recipes-extended/augeas/augeas.inc +1 -0
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=bbb461211a33b134d42ed5ee802b37ff" SRC_URI = "http://download.augeas.net/${BP}.tar.gz \ file://add-missing-argz-conditional.patch \ file://sepbuildfix.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ " DEPENDS = "readline libxml2"
meta/recipes-extended/augeas/augeas/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: augeas-1.2.0/gnulib/lib/Makefile.am +=================================================================== +--- augeas-1.2.0.orig/gnulib/lib/Makefile.am ++++ augeas-1.2.0/gnulib/lib/Makefile.am +@@ -463,7 +463,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \
meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: cpio-2.11/gnu/Makefile.am +=================================================================== +--- cpio-2.11.orig/gnu/Makefile.am ++++ cpio-2.11/gnu/Makefile.am +@@ -734,7 +734,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \
meta/recipes-extended/cpio/cpio_2.11.bb +2 -1
@@ -8,7 +8,8 @@ PR = "r5" SRC_URI += "file://remove-gets.patch \ file://fix-memory-overrun.patch \ file://cpio-CVE-2015-1197.patch \ - " + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + " SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c" SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
meta/recipes-extended/diffutils/diffutils-3.3/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 +
meta/recipes-extended/diffutils/diffutils_3.3.bb +1 -0
@@ -4,6 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" require diffutils.inc SRC_URI = "${GNU_MIRROR}/diffutils/diffutils-${PV}.tar.xz \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ file://run-ptest \ "
meta/recipes-extended/findutils/findutils/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: findutils-4.5.14/gl/lib/Makefile.am +=================================================================== +--- findutils-4.5.14.orig/gl/lib/Makefile.am ++++ findutils-4.5.14/gl/lib/Makefile.am +@@ -1220,7 +1220,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \
meta/recipes-extended/findutils/findutils_4.5.14.bb +2 -0
@@ -6,6 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" DEPENDS = "bison-native" +SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch" + SRC_URI[md5sum] = "a8a8176282fd28e8d1234c84d847fa66" SRC_URI[sha256sum] = "0de3cf625a5c9f154eee3171e072515ffdde405244dd00502af617ac57b73ae2"
meta/recipes-extended/grep/grep/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 +
meta/recipes-extended/grep/grep_2.21.bb +3 -1
@@ -5,7 +5,9 @@ SECTION = "console/utils" LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee" -SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz" +SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + " SRC_URI[md5sum] = "43c48064d6409862b8a850db83c8038a" SRC_URI[sha256sum] = "5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de"
meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: groff-1.22.3/src/libs/gnulib/lib/Makefile.am +=================================================================== +--- groff-1.22.3.orig/src/libs/gnulib/lib/Makefile.am ++++ groff-1.22.3/src/libs/gnulib/lib/Makefile.am +@@ -113,7 +113,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \
meta/recipes-extended/groff/groff_1.22.3.bb +5 -3
@@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ file://groff-1.22.2-correct-man.local-install-path.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ " SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5"
@@ -16,9 +17,7 @@ SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6 DEPENDS = "groff-native" DEPENDS_class-native = "" -RDEPENDS_${PN} += "sed" - -RDEPENDS_${PN} = "perl" +RDEPENDS_${PN} += "perl sed" inherit autotools texinfo
@@ -54,6 +53,9 @@ do_install_append() { sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i fi done + if [ -e ${D}${libdir}/charset.alias ]; then + rm -rf ${D}${libdir}/charset.alias + fi } do_install_append_class-native() {
meta/recipes-extended/sed/sed-4.2.2/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +33 -0
@@ -0,0 +1,33 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/gnulib.mk b/lib/gnulib.mk +index e1d74db..c0e92dd 100644 +--- a/lib/gnulib.mk ++++ b/lib/gnulib.mk +@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ +-- +2.1.4 +
meta/recipes-extended/sed/sed_4.2.2.bb +1 -0
@@ -7,6 +7,7 @@ SECTION = "console/utils" SRC_URI = "${GNU_MIRROR}/sed/sed-${PV}.tar.gz \ file://sed-add-ptest.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ file://run-ptest \ "
meta/recipes-extended/texinfo/texinfo/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: texinfo-5.2/gnulib/lib/Makefile.am +=================================================================== +--- texinfo-5.2.orig/gnulib/lib/Makefile.am ++++ texinfo-5.2/gnulib/lib/Makefile.am +@@ -378,7 +378,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \
meta/recipes-extended/texinfo/texinfo_5.2.bb +2 -1
@@ -34,6 +34,7 @@ SRC_URI = "${GNU_MIRROR}/texinfo/${BP}.tar.gz \ file://disable-native-tools.patch \ file://link-zip.patch \ file://dont-depend-on-help2man.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ ${TARGET_PATCH} \ "
@@ -58,7 +59,7 @@ do_compile_prepend() { do_install_append() { mkdir -p ${D}${datadir}/${tex_texinfo} - install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo} + install -p -m644 ${S}/doc/texinfo.tex ${S}/doc/txi-??.tex ${D}${datadir}/${tex_texinfo} sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/texi2any ${D}${bindir}/pod2texi }
meta/recipes-extended/wget/wget/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: wget-1.16.3/lib/Makefile.am +=================================================================== +--- wget-1.16.3.orig/lib/Makefile.am ++++ wget-1.16.3/lib/Makefile.am +@@ -846,7 +846,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \
meta/recipes-extended/wget/wget_1.16.3.bb +1 -0
@@ -1,5 +1,6 @@ SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \ file://fix_makefile.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ " SRC_URI[md5sum] = "f61d9011b99f824106a5d5a05dd0f63d"
meta/recipes-support/libunistring/libunistring/0001-Unset-need_charset_alias-when-building-for-musl.patch new file +30 -0
@@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Not Required + +Signed-off-by: Khem Raj <[email protected]> +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libunistring-0.9.4/lib/Makefile.gnulib +=================================================================== +--- libunistring-0.9.4.orig/lib/Makefile.gnulib ++++ libunistring-0.9.4/lib/Makefile.gnulib +@@ -380,7 +380,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \
meta/recipes-support/libunistring/libunistring_0.9.4.bb +1 -0
@@ -19,6 +19,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \ file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ " SRC_URI[md5sum] = "c24a6a3838d9ad4a41a62549312c4226"
Signature · 1 line
2.1.4
PATCH 9/10 mtd-utils: update to latest and fix static inlining
In reply to Khem Rajuse static storage class instead of extern for inline functions and remove duplicate definitions as a result
--- ...emove-duplicate-hashtable_iterator_value-.patch | 64 ++++++++++++++++++++++ meta/recipes-devtools/mtd/mtd-utils_git.bb | 1 + 2 files changed, 65 insertions(+) create mode 100644 meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch new file +64 -0
@@ -0,0 +1,64 @@ +From b856ff35c20124ceae40bbc4d32584df47618c96 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 25 Feb 2015 09:28:26 +0000 +Subject: [PATCH] hashtable: Remove duplicate hashtable_iterator_value/hashtable_iterator_key + +gcc5 is defaulting to gnu11 instead of gnu89 like previous versions +as a result the semantics of 'extern inline' changes where in gnu89 for 'extern inline' no external +visible function is generated,in c99 'external inline' generates externally visible function +there is no equivalent in c99+ because redefinitions arent allowed +but 'static inline' remains same for for c89 and c99+, thats why we change the semantics +so we make the functions static inline, and achieve the same effect + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: pending + +--- + mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------ + 1 file changed, 12 deletions(-) + +Index: git/mkfs.ubifs/hashtable/hashtable_itr.h +=================================================================== +--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.h ++++ git/mkfs.ubifs/hashtable/hashtable_itr.h +@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h); + /* hashtable_iterator_key + * - return the value of the (key,value) pair at the current position */ + +-extern inline void * ++static inline void * + hashtable_iterator_key(struct hashtable_itr *i) + { + return i->e->k; +@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_ + /*****************************************************************************/ + /* value - return the value of the (key,value) pair at the current position */ + +-extern inline void * ++static inline void * + hashtable_iterator_value(struct hashtable_itr *i) + { + return i->e->v; +Index: git/mkfs.ubifs/hashtable/hashtable_itr.c +=================================================================== +--- git.orig/mkfs.ubifs/hashtable/hashtable_itr.c ++++ git/mkfs.ubifs/hashtable/hashtable_itr.c +@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h) + } + + /*****************************************************************************/ +-/* key - return the key of the (key,value) pair at the current position */ +-/* value - return the value of the (key,value) pair at the current position */ +- +-void * +-hashtable_iterator_key(struct hashtable_itr *i) +-{ return i->e->k; } +- +-void * +-hashtable_iterator_value(struct hashtable_itr *i) +-{ return i->e->v; } +- +-/*****************************************************************************/ + /* advance - advance the iterator to the next element + * returns zero if advanced to end of table */ +
meta/recipes-devtools/mtd/mtd-utils_git.bb +1 -0
@@ -13,6 +13,7 @@ SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b" SRC_URI = "git://git.infradead.org/mtd-utils.git \ file://add-exclusion-to-mkfs-jffs2-git-2.patch \ file://fix-armv7-neon-alignment.patch \ + file://0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch \ " S = "${WORKDIR}/git/"
Signature · 1 line
2.1.4
PATCH 10/10 connman: Fix builds to compile on musl
In reply to Khem RajAdd explicit includes for headers which are indirectly included on glibc Dont use backtrace APIs on non-glibc C libsres_nimit is a glibc specific API in resolvers so we avoid it
--- ...cktrace-API-only-when-compiling-for-glibc.patch | 41 ++++ .../connman/connman/0002-musl-header-fixes.patch | 235 +++++++++++++++++++++ ...resolve-musl-does-not-implement-res_ninit.patch | 77 +++++++ ...Fix-duplicate-definitions-issue-with-musl.patch | 43 ++++ meta/recipes-connectivity/connman/connman_1.28.bb | 4 + 5 files changed, 400 insertions(+) create mode 100644 meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch create mode 100644 meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch create mode 100644 meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch create mode 100644 meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch
meta/recipes-connectivity/connman/connman/0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch new file +41 -0
@@ -0,0 +1,41 @@ +From b736e90681e135e0cccb143a9ce8b7049e1ec0f0 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 6 Apr 2015 22:57:20 -0700 +Subject: [PATCH 1/4] Enable backtrace() API only when compiling for glibc + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + src/log.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/log.c b/src/log.c +index a693bd0..3bf9fcc 100644 +--- a/src/log.c ++++ b/src/log.c +@@ -30,7 +30,9 @@ + #include <stdlib.h> + #include <string.h> + #include <syslog.h> ++#ifdef __GLIBC__ + #include <execinfo.h> ++#endif + #include <dlfcn.h> + + #include "connman.h" +@@ -215,9 +217,9 @@ static void print_backtrace(unsigned int offset) + static void signal_handler(int signo) + { + connman_error("Aborting (signal %d) [%s]", signo, program_exec); +- ++#ifdef __GLIBC__ + print_backtrace(2); +- ++#endif + exit(EXIT_FAILURE); + } + +-- +2.1.4 +
meta/recipes-connectivity/connman/connman/0002-musl-header-fixes.patch new file +235 -0
235 lines not on this page · raw message
meta/recipes-connectivity/connman/connman/0003-resolve-musl-does-not-implement-res_ninit.patch new file +77 -0
77 lines not on this page · raw message
meta/recipes-connectivity/connman/connman/0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch new file +43 -0
43 lines not on this page · raw message
meta/recipes-connectivity/connman/connman_1.28.bb +4 -0
@@ -3,6 +3,10 @@ require connman.inc SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ file://add_xuser_dbus_permission.patch \ + file://0001-Enable-backtrace-API-only-when-compiling-for-glibc.patch \ + file://0002-musl-header-fixes.patch \ + file://0003-resolve-musl-does-not-implement-res_ninit.patch \ + file://0004-tethering-Fix-duplicate-definitions-issue-with-musl.patch \ file://connman \ " SRC_URI[md5sum] = "6e07c93877f80bb73c9d4dbfc697f3fc"
Signature · 1 line
2.1.4