gnome-keyring: Fix build with musl
PATCH 1/3 gnome-keyring: Fix build with musl
Signed-off-by Khem Raj <[email protected]>
--- .../gnome-keyring/gnome-keyring/musl.patch | 17 +++++++++++++++++ .../recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb | 4 +++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/musl.patch
meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring/musl.patch new file +17 -0
@@ -0,0 +1,17 @@ +include sys/select.h for FD_* macros + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Pending + +Index: gnome-keyring-2.32.1/pkcs11/rpc-layer/gkm-rpc-daemon-standalone.c +=================================================================== +--- gnome-keyring-2.32.1.orig/pkcs11/rpc-layer/gkm-rpc-daemon-standalone.c ++++ gnome-keyring-2.32.1/pkcs11/rpc-layer/gkm-rpc-daemon-standalone.c +@@ -32,6 +32,7 @@ + #include <unistd.h> + #include <stdlib.h> + #include <string.h> ++#include <sys/select.h> + + #include <dlfcn.h> + #include <pthread.h>
meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb +3 -1
@@ -15,7 +15,9 @@ PR = "r12" inherit autotools gnome gtk-doc pkgconfig gsettings -SRC_URI += "file://egg-asn1x.patch" +SRC_URI += "file://egg-asn1x.patch \ + file://musl.patch \ +" DEPENDS = "gtk+ libgcrypt libtasn1 libtasn1-native gconf ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} intltool-native" RDEPENDS_${PN} = "libgnome-keyring glib-2.0-utils"
Signature · 1 line
2.14.1
PATCH 2/3 openhpi: Fix build with musl
Signed-off-by Khem Raj <[email protected]>
--- .../files/0001-ipmidirect-Replace-__STRING.patch | 31 ++++++++++++++ ...ck-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch | 47 ++++++++++++++++++++++ .../recipes-daemons/openhpi/openhpi_3.6.1.bb | 11 ++--- 3 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch create mode 100644 meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch
meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch new file +31 -0
@@ -0,0 +1,31 @@ +From be40b3f11460cf495bbbef45692e7763afda0c2b Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 14 Sep 2017 17:56:31 -0700 +Subject: [PATCH] ipmidirect: Replace __STRING + +__STRING is not universally available e.g. +musl does not define it + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + plugins/ipmidirect/t/test.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/ipmidirect/t/test.h b/plugins/ipmidirect/t/test.h +index 8d71381..978d5ff 100644 +--- a/plugins/ipmidirect/t/test.h ++++ b/plugins/ipmidirect/t/test.h +@@ -22,7 +22,7 @@ TestFunction( const char *str, const char *file, int line, bool expr ) + } + + +-#define Test(expr) TestFunction( __STRING(expr), __FILE__, __LINE__, expr ) ++#define Test(expr) TestFunction( #expr, __FILE__, __LINE__, expr ) + + + static int +-- +2.14.1 +
meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch new file +47 -0
47 lines not on this page · raw message
meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb +6 -5
@@ -23,6 +23,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4" DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs autoconf-archive-native" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ + file://openhpi.init \ + file://openhpid.service \ + file://run-ptest \ file://openhpi-netsnmp-cross-compile.patch \ file://openhpi-sysfs-cross-compile.patch \ file://openhpi-libxml2-cross-compile.patch \
@@ -39,11 +42,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://c++11.patch \ file://clang-c++11.patch \ file://fix-narrowing-warning.patch \ - \ - file://openhpi.init \ - file://openhpid.service \ - file://run-ptest \ -" + file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \ + file://0001-ipmidirect-Replace-__STRING.patch \ + " SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23" SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc"
Signature · 1 line
2.14.1
PATCH 3/3 breakpad: Upgrade to latest master
In reply to Khem RajFix build with musl while here
Signed-off-by Khem Raj <[email protected]>
--- .../0001-Turn-off-sign-compare-for-musl-libc.patch | 41 +++++ ...-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch | 24 +++ .../0001-lss-Match-syscalls-to-match-musl.patch | 27 +++ .../breakpad/0002-Avoid-using-basename.patch | 29 +++ ...nal.h-is-a-nonportable-alias-for-signal.h.patch | 26 +++ .../breakpad/0003-Dont-include-stab.h.patch | 63 +++++++ ...nflict-between-musl-libc-dirent.h-and-lss.patch | 35 ++++ ...cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch | 26 +++ ...-Import-necessary-definitions-from-stab.h.patch | 199 +++++++++++++++++++++ .../breakpad/0005-md2core-Replace-basename.patch | 38 ++++ meta-oe/recipes-devtools/breakpad/breakpad_git.bb | 17 +- 11 files changed, 520 insertions(+), 5 deletions(-) create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0002-Avoid-using-basename.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch create mode 100644 meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch
meta-oe/recipes-devtools/breakpad/breakpad/0001-Turn-off-sign-compare-for-musl-libc.patch new file +41 -0
@@ -0,0 +1,41 @@ +From ab8dcad25d0ac1f3a88814e78794e5d450de15ac Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 14 Sep 2017 23:12:51 -0700 +Subject: [PATCH 1/5] Turn off sign-compare for musl-libc + +Fix + +../../../../../../../workspace/sources/breakpad/src/client/linux/crash_generation/crash_generation_server.cc:234:14: error: comparison of integers of different signs: 'unsigned long' and 'int' [-Werror,-Wsign-compare] hdr = CMSG_NXTHDR(&msg, hdr)) { ^~~~~~~~~~~~~~~~~~~~~~ +/mnt/a/oe/build/tmp/work/cortexa7hf-neon-vfpv4-bec-linux-musleabi/breakpad/1_1.0+git999-r0/recipe-sysroot/usr/include/sys/socket.h:288:44: note: expanded from macro 'CMSG_NXTHDR' __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - (unsigned char *)(cmsg) \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. + +Signed-off-by: Khem Raj <[email protected]> +--- + src/client/linux/crash_generation/crash_generation_server.cc | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc +index 2596afde..2faeb9e5 100644 +--- a/src/client/linux/crash_generation/crash_generation_server.cc ++++ b/src/client/linux/crash_generation/crash_generation_server.cc +@@ -230,8 +230,18 @@ CrashGenerationServer::ClientEvent(short revents) + // Walk the control payload and extract the file descriptor and validated pid. + pid_t crashing_pid = -1; + int signal_fd = -1; ++#ifndef __GLIBC__ ++ // In musl-libc, CMSG_NXTHDR typecasts char* to cmsghdr* which causes ++ // clang to throw sign-compare warning. This is to suppress the warning ++ // inline. ++ #pragma clang diagnostic push ++ #pragma clang diagnostic ignored "-Wsign-compare" ++#endif + for (struct cmsghdr *hdr = CMSG_FIRSTHDR(&msg); hdr; + hdr = CMSG_NXTHDR(&msg, hdr)) { ++#ifndef __GLIBC__ ++ #pragma clang diagnostic pop ++#endif + if (hdr->cmsg_level != SOL_SOCKET) + continue; + if (hdr->cmsg_type == SCM_RIGHTS) { +-- +2.14.1 +
meta-oe/recipes-devtools/breakpad/breakpad/0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch new file +24 -0
@@ -0,0 +1,24 @@ +From 68580cb62f77117be3164c52abae68f75e8e59a1 Mon Sep 17 00:00:00 2001 +From: Felix Janda <[email protected]> +Date: Sun, 1 Feb 2015 14:26:52 +0100 +Subject: [PATCH 1/3] include <sys/reg.h> to get __WORDSIZE on musl libc + +--- + src/common/linux/elf_core_dump.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/common/linux/elf_core_dump.h b/src/common/linux/elf_core_dump.h +index d03c7a88..02eb391c 100644 +--- a/src/common/linux/elf_core_dump.h ++++ b/src/common/linux/elf_core_dump.h +@@ -36,6 +36,7 @@ + #include <elf.h> + #include <link.h> + #include <stddef.h> ++#include <sys/reg.h> + + #include "common/memory_range.h" + +-- +2.14.1 +
meta-oe/recipes-devtools/breakpad/breakpad/0001-lss-Match-syscalls-to-match-musl.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 5f7333e4f7b7485598bd71aa80967e1a16a7f901 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 14 Sep 2017 22:57:52 -0700 +Subject: [PATCH] lss: Match syscalls to match musl + +Signed-off-by: Khem Raj <[email protected]> +--- + linux_syscall_support.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/linux_syscall_support.h b/linux_syscall_support.h +index cb3fac2..6894a77 100644 +--- a/linux_syscall_support.h ++++ b/linux_syscall_support.h +@@ -793,6 +793,9 @@ struct kernel_statfs { + #define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG) + #endif + ++#ifndef __NR_fstatat ++#define __NR_fstatat __NR_fstatat64 ++#endif + + #if defined(__x86_64__) + #ifndef ARCH_SET_GS +-- +2.14.1 +
meta-oe/recipes-devtools/breakpad/breakpad/0002-Avoid-using-basename.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 806964f852773e427fea82a7716d44ce3be4498c Mon Sep 17 00:00:00 2001 +From: Felix Janda <[email protected]> +Date: Sun, 1 Feb 2015 14:27:32 +0100 +Subject: [PATCH 2/3] Avoid using basename + +--- + src/common/linux/dump_symbols.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc +index d029ca14..6ac4a17b 100644 +--- a/src/common/linux/dump_symbols.cc ++++ b/src/common/linux/dump_symbols.cc +@@ -881,9 +881,9 @@ const char* ElfArchitecture(const typename ElfClass::Ehdr* elf_header) { + // last slash, or the whole filename if there are no slashes. + string BaseFileName(const string &filename) { + // Lots of copies! basename's behavior is less than ideal. +- char* c_filename = strdup(filename.c_str()); +- string base = basename(c_filename); +- free(c_filename); ++ const char *c_filename = filename.c_str(); ++ const char *p = strrchr(c_filename, '/'); ++ string base = p ? p+1 : c_filename; + return base; + } + +-- +2.14.1 +
meta-oe/recipes-devtools/breakpad/breakpad/0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 15582e19c2545d5ffe8ff07f957d0ed602aeca74 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 14 Sep 2017 23:15:09 -0700 +Subject: [PATCH 2/5] <sys/signal.h> is a nonportable alias for <signal.h> + +Signed-off-by: Khem Raj <[email protected]> +--- + src/client/linux/handler/exception_handler.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc +index 05936d28..cca023fd 100644 +--- a/src/client/linux/handler/exception_handler.cc ++++ b/src/client/linux/handler/exception_handler.cc +@@ -78,7 +78,7 @@ + #include <sys/wait.h> + #include <unistd.h> + +-#include <sys/signal.h> ++#include <signal.h> + #include <sys/ucontext.h> + #include <sys/user.h> + #include <ucontext.h> +-- +2.14.1 +
meta-oe/recipes-devtools/breakpad/breakpad/0003-Dont-include-stab.h.patch new file +63 -0
63 lines not on this page · raw message
meta-oe/recipes-devtools/breakpad/breakpad/0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 7aa266545dabf9934ccd44d4fc836040497159be Mon Sep 17 00:00:00 2001 +From: Felix Janda <[email protected]> +Date: Sun, 1 Feb 2015 13:41:08 +0100 +Subject: [PATCH 3/3] Fix conflict between musl libc <dirent.h> and lss + +Include <dirent.h> late to avoid the macro getdents64 in musl +libc's <dirent.h> to conflict with linux_sycall_support.h. +--- + src/client/linux/crash_generation/crash_generation_server.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc +index 26c50a5c..2596afde 100644 +--- a/src/client/linux/crash_generation/crash_generation_server.cc ++++ b/src/client/linux/crash_generation/crash_generation_server.cc +@@ -28,7 +28,6 @@ + // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + #include <assert.h> +-#include <dirent.h> + #include <fcntl.h> + #include <limits.h> + #include <poll.h> +@@ -49,6 +48,8 @@ + #include "common/linux/guid_creator.h" + #include "common/linux/safe_readlink.h" + ++#include <dirent.h> ++ + static const char kCommandQuit = 'x'; + + namespace google_breakpad { +-- +2.14.1 +
meta-oe/recipes-devtools/breakpad/breakpad/0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 680f9590d19a6e35c7c5587e3f4d8194aab0fcd2 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 14 Sep 2017 23:28:36 -0700 +Subject: [PATCH 4/5] elf_reader.cc: include <sys/reg.h> to get __WORDSIZE on + musl libc + +Signed-off-by: Khem Raj <[email protected]> +--- + src/common/dwarf/elf_reader.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/common/dwarf/elf_reader.cc b/src/common/dwarf/elf_reader.cc +index 4135a51a..bb58a5a1 100644 +--- a/src/common/dwarf/elf_reader.cc ++++ b/src/common/dwarf/elf_reader.cc +@@ -33,6 +33,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/mman.h> ++#include <sys/reg.h> + #include <unistd.h> + #include <fcntl.h> + #include <string.h> +-- +2.14.1 +
meta-oe/recipes-devtools/breakpad/breakpad/0005-Import-necessary-definitions-from-stab.h.patch new file +199 -0
199 lines not on this page · raw message
meta-oe/recipes-devtools/breakpad/breakpad/0005-md2core-Replace-basename.patch new file +38 -0
@@ -0,0 +1,38 @@ +From bbf2b5ed5d93b227df8aea5726727b48e29f6790 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 14 Sep 2017 23:35:40 -0700 +Subject: [PATCH 5/5] md2core: Replace basename() + +musl does not provide it + +Signed-off-by: Khem Raj <[email protected]> +--- + src/tools/linux/md2core/minidump-2-core.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc +index 6a9e28eb..52b81c22 100644 +--- a/src/tools/linux/md2core/minidump-2-core.cc ++++ b/src/tools/linux/md2core/minidump-2-core.cc +@@ -107,6 +107,9 @@ struct Options { + + static void + Usage(int argc, const char* argv[]) { ++ const char *c_filename = argv[0];; ++ const char *p = strrchr(c_filename, '/'); ++ const char *base = p ? p+1 : c_filename; + fprintf(stderr, + "Usage: %s [options] <minidump file>\n" + "\n" +@@ -133,7 +136,7 @@ Usage(int argc, const char* argv[]) { + " lookups to be done in this directory rather than the filesystem\n" + " layout as it exists in the crashing image. This path should end\n" + " with a slash if it's a directory. e.g. /var/lib/breakpad/\n" +- "", basename(argv[0])); ++ "", base); + } + + static void +-- +2.14.1 +
meta-oe/recipes-devtools/breakpad/breakpad_git.bb +12 -5
@@ -17,22 +17,29 @@ PE = "1" PV = "1.0+git${SRCPV}" -SRCREV_FORMAT = "breakpad_glog_gtest_protobuf_lss_gyp" +SRCREV_FORMAT = "breakpad_gtest_protobuf_lss_gyp" -SRCREV_breakpad = "66856d617b6658ce09ef2bc1b15d457ab7b152b0" -SRCREV_glog = "d8cb47f77d1c31779f3ff890e1a5748483778d6a" +SRCREV_breakpad = "dea867e76f24e4a68395684b9d1cf24bcef82f20" SRCREV_gtest = "ec44c6c1675c25b9827aacd08c02433cccde7780" SRCREV_protobuf = "cb6dd4ef5f82e41e06179dcd57d3b1d9246ad6ac" SRCREV_lss = "a91633d172407f6c83dd69af11510b37afebb7f9" -SRCREV_gyp = "e8ab0833a42691cd2184bd4c45d779e43821d3e0" +SRCREV_gyp = "324dd166b7c0b39d513026fa52d6280ac6d56770" SRC_URI = "git://github.com/google/breakpad;name=breakpad \ - git://github.com/google/glog.git;destsuffix=git/src/third_party/glog;name=glog \ git://github.com/google/googletest.git;destsuffix=git/src/testing/gtest;name=gtest \ git://github.com/google/protobuf.git;destsuffix=git/src/third_party/protobuf/protobuf;name=protobuf \ git://chromium.googlesource.com/linux-syscall-support;protocol=https;destsuffix=git/src/third_party/lss;name=lss \ git://chromium.googlesource.com/external/gyp;protocol=https;destsuffix=git/src/tools/gyp;name=gyp \ file://0001-Replace-use-of-struct-ucontext-with-ucontext_t.patch \ + file://0001-include-sys-reg.h-to-get-__WORDSIZE-on-musl-libc.patch \ + file://0002-Avoid-using-basename.patch \ + file://0003-Fix-conflict-between-musl-libc-dirent.h-and-lss.patch \ + file://0001-Turn-off-sign-compare-for-musl-libc.patch \ + file://0002-sys-signal.h-is-a-nonportable-alias-for-signal.h.patch \ + file://0003-Dont-include-stab.h.patch \ + file://0004-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch \ + file://0005-md2core-Replace-basename.patch \ + file://0001-lss-Match-syscalls-to-match-musl.patch;patchdir=src/third_party/lss \ " S = "${WORKDIR}/git"
Signature · 1 line
2.14.1