caps: Fix buld with -pie
PATCH 1/4 caps: Fix buld with -pie
--- .../recipes-multimedia/caps/caps/append_ldflags.patch | 18 ++++++++++++++++++ meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb | 1 + 2 files changed, 19 insertions(+) create mode 100644 meta-multimedia/recipes-multimedia/caps/caps/append_ldflags.patch
meta-multimedia/recipes-multimedia/caps/caps/append_ldflags.patch new file +18 -0
@@ -0,0 +1,18 @@ +Change the order of linker flags such that -shared is appearig after -pie/-fpie +this helps in building the package when secuiry flags are enabled + +-Khem + +Index: caps-0.9.24/Makefile +=================================================================== +--- caps-0.9.24.orig/Makefile ++++ caps-0.9.24/Makefile +@@ -14,7 +14,7 @@ STRIP = strip + -include defines.make + + CFLAGS += $(OPTS) $(_CFLAGS) +-LDFLAGS += $(_LDFLAGS) $(CFLAGS) ++LDFLAGS += $(CFLAGS) $(_LDFLAGS) + + PLUG = caps +
meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb +1 -0
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRC_URI = "http://quitte.de/dsp/${PN}_${PV}.tar.bz2 \ file://Avoid-ambiguity-in-div-invocation.patch \ file://0001-basic.h-Use-c99-supported-stdint-types.patch \ + file://append_ldflags.patch \ " SRC_URI[md5sum] = "c1d634038dcb54702306c0e30cb1c626"
Signature · 1 line
2.13.0
PATCH 2/4 python-numeric: Fix build with musl
Use gettimeofday() definition from system
--- ...-define-this-function-differently-than-it.patch | 30 ++++++++++++++++++++++ .../recipes-devtools/python/python-numeric_24.2.bb | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 322e781c67d7a78fc2cfc3d377f50b825fc64abb Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 2 Jun 2017 20:21:01 -0700 +Subject: [PATCH] it tries to define this function differently than it is + defined in sys/time.h. + +Use the definition from system + +Signed-off-by: Khem Raj <[email protected]> +--- + Packages/RNG/Src/ranf.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Packages/RNG/Src/ranf.c b/Packages/RNG/Src/ranf.c +index 5ca7dc5..e669fa8 100644 +--- a/Packages/RNG/Src/ranf.c ++++ b/Packages/RNG/Src/ranf.c +@@ -149,9 +149,6 @@ void Mixranf(int *s,u32 s48[2]) + #else + struct timeval tv; + struct timezone tz; +-#if !defined(__sgi) +- int gettimeofday(struct timeval *, struct timezone *); +-#endif + + (void)gettimeofday(&tv,&tz); + s48[0] = (u32)tv.tv_sec; +-- +2.13.0 +
meta-python/recipes-devtools/python/python-numeric_24.2.bb +3 -1
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://Legal.htm;md5=e3ce75dedd4043918d15979ae43e312e" PR = "ml3" -SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/Numeric-${PV}.tar.gz" +SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/Numeric-${PV}.tar.gz \ + file://0001-it-tries-to-define-this-function-differently-than-it.patch \ +" S = "${WORKDIR}/Numeric-${PV}" inherit distutils
Signature · 1 line
2.13.0
Re: [meta-python][PATCH 2/4] python-numeric: Fix build with musl
Quoted 15 lines · Khem Raj
Use
gettimeofday()definition from systemSigned-off-by Khem Raj <[email protected]>--- ...-define-this-function-differently-than-it.patch | 30 ++++++++++++++++++++++ .../recipes-devtools/python/python-numeric_24.2.bb | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-)create mode 100644
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patchmeta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch new file +0
-0
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch line 7
Quoted 7 lines
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch new file +7
-0@@ -0,0 +1,30 @@ +From 322e781c67d7a78fc2cfc3d377f50b825fc64abb Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 2 Jun 2017 20:21:01 -0700 +Subject: [PATCH] it tries to define this function differently than it is + defined in sys/time.h. + +Use the definition from system
missing Upstream-Status
Quoted 38 lines
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch new file +23
-0+ +Signed-off-by: Khem Raj <[email protected]> +--- + Packages/RNG/Src/ranf.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Packages/RNG/Src/ranf.c b/Packages/RNG/Src/ranf.c +index 5ca7dc5..e669fa8 100644 +--- a/Packages/RNG/Src/ranf.c ++++ b/Packages/RNG/Src/ranf.c +@@ -149,9 +149,6 @@ void Mixranf(int *s,u32 s48[2]) + #else + struct timeval tv; + struct timezone tz; +-#if !defined(__sgi) +- int gettimeofday(struct timeval *, struct timezone *); +-#endif + + (void)gettimeofday(&tv,&tz); + s48[0] = (u32)tv.tv_sec; +-- +2.13.0 +meta-python/recipes-devtools/python/python-numeric_24.2.bb +3
-1@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://Legal.htm;md5=e3ce75dedd4043918d15979ae43e312e" PR = "ml3" -SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/Numeric-${PV}.tar.gz" +SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/Numeric-${PV}.tar.gz \ + file://0001-it-tries-to-define-this-function-differently-than-it.patch \ +" S = "${WORKDIR}/Numeric-${PV}" inherit distutils
Re: [meta-python][PATCH 2/4] python-numeric: Fix build with musl
Quoted 22 lines · On Sat, Jun 3, 2017 at 8:22 AM akuster808 <[email protected]> wrote:
Quoted 5 lines · Khem Raj
Use
gettimeofday()definition from systemSigned-off-by Khem Raj <[email protected]>--- ...-define-this-function-differently-than-it.patch | 30++++++++++++++++++++++
Quoted 3 lines
.../recipes-devtools/python/python-numeric_24.2.bb | 4 ++- 2 files changed, 33 insertions(+), 1 deletion(-)create mode 100644
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patchQuoted 2 lines
diff --git
a/meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patchb/meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patchQuoted 4 lines
new file mode 100644
index 000000000..81ed744cb
---/dev/null
+++
b/meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch
Quoted 9 lines
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch line 7
Quoted 8 lines
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch new file +7
-0@@ -0,0 +1,30 @@ +From 322e781c67d7a78fc2cfc3d377f50b825fc64abb Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 2 Jun 2017 20:21:01 -0700 +Subject: [PATCH] it tries to define this function differently than it is + defined in sys/time.h. + +Use the definition from systemmissing Upstream-Status
It's Pending
I don't think we do that meticulously on meta-oe but it's a good info nevertheless I will add it
Quoted 45 lines
Review
Quoted 26 lines
meta-python/recipes-devtools/python/python-numeric/0001-it-tries-to-define-this-function-differently-than-it.patch new file +23
-0+ +Signed-off-by: Khem Raj <[email protected]> +--- + Packages/RNG/Src/ranf.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/Packages/RNG/Src/ranf.c b/Packages/RNG/Src/ranf.c +index 5ca7dc5..e669fa8 100644 +--- a/Packages/RNG/Src/ranf.c ++++ b/Packages/RNG/Src/ranf.c +@@ -149,9 +149,6 @@ void Mixranf(int *s,u32 s48[2]) + #else + struct timeval tv; + struct timezone tz; +-#if !defined(__sgi) +- int gettimeofday(struct timeval *, struct timezone *); +-#endif + + (void)gettimeofday(&tv,&tz); + s48[0] = (u32)tv.tv_sec; +-- +2.13.0 +(quoted diff) +0
-0b/meta-python/recipes-devtools/python/python-numeric_24.2.bb
meta-python/recipes-devtools/python/python-numeric_24.2.bb LIC_FILES_CHKSUM =
Quoted 4 lines
index
c0b04e144..c91d77c81100644meta-python/recipes-devtools/python/python-numeric_24.2.bb +0
-0@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM ="file://Legal.htm;md5=e3ce75dedd4043918d15979ae43e312e"
meta-python/recipes-devtools/python/python-numeric_24.2.bb LIC_FILES_CHKSUM = "file://Legal.htm;md5=e3ce75dedd4043918d15979ae43e312e"
Quoted 6 lines
meta-python/recipes-devtools/python/python-numeric_24.2.bb +2
-1PR = "ml3" -SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/Numeric-${PV}.tar.gz" +SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/Numeric-${PV}.tar.gz \ +file://0001-it-tries-to-define-this-function-differently-than-it.patch \
Quoted 4 lines
meta-python/recipes-devtools/python/python-numeric_24.2.bb +1
-0+" S = "${WORKDIR}/Numeric-${PV}" inherit distutils
PATCH 3/4 openipmi: Fix build with musl
In reply to Khem Raj--- .../openipmi/files/include_sys_types.patch | 17 +++++++++++++++++ meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb | 1 + 2 files changed, 18 insertions(+) create mode 100644 meta-oe/recipes-support/openipmi/files/include_sys_types.patch
meta-oe/recipes-support/openipmi/files/include_sys_types.patch new file +17 -0
@@ -0,0 +1,17 @@ +include sys/types.h for u_int32_t + +ui.c:340:5: error: unknown type name 'u_int32_t'; did you mean 'uint32_t'? + u_int32_t addr; + ^~~~~~~~~ +Index: OpenIPMI-2.0.22/ui/ui.c +=================================================================== +--- OpenIPMI-2.0.22.orig/ui/ui.c ++++ OpenIPMI-2.0.22/ui/ui.c +@@ -42,6 +42,7 @@ + #include <fcntl.h> + #include <time.h> + #include <sys/time.h> ++#include <sys/types.h> + #include <ctype.h> + + #include <OpenIPMI/selector.h>
meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb +1 -0
@@ -30,6 +30,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \ file://ipmi-init-fix-the-arguments.patch \ file://makefile-add-ldflags.patch \ file://do-not-install-pyc-and-pyo.patch \ + file://include_sys_types.patch \ file://openipmi-helper \ file://ipmi.service \ "
Signature · 1 line
2.13.0
Re: [meta-oe][PATCH 3/4] openipmi: Fix build with musl
Khem,
meta-oe/recipes-support/openipmi/files/include_sys_types.patch
Quoted 12 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- .../openipmi/files/include_sys_types.patch | 17 +++++++++++++++++ meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb | 1 + 2 files changed, 18 insertions(+)create mode 100644
meta-oe/recipes-support/openipmi/files/include_sys_types.patchmeta-oe/recipes-support/openipmi/files/include_sys_types.patch new file +0
-0
isn't this missing Upstream-Status and Signed-off-by?
- armin
Quoted 30 lines
meta-oe/recipes-support/openipmi/files/include_sys_types.patch new file +17
-0@@ -0,0 +1,17 @@ +include sys/types.h for u_int32_t + +ui.c:340:5: error: unknown type name 'u_int32_t'; did you mean 'uint32_t'? + u_int32_t addr; + ^~~~~~~~~ +Index: OpenIPMI-2.0.22/ui/ui.c +=================================================================== +--- OpenIPMI-2.0.22.orig/ui/ui.c ++++ OpenIPMI-2.0.22/ui/ui.c +@@ -42,6 +42,7 @@ + #include <fcntl.h> + #include <time.h> + #include <sys/time.h> ++#include <sys/types.h> + #include <ctype.h> + + #include <OpenIPMI/selector.h>meta-oe/recipes-support/openipmi/openipmi_2.0.22.bb +1
-0@@ -30,6 +30,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/openipmi/OpenIPMI-${PV}.tar.gz \ file://ipmi-init-fix-the-arguments.patch \ file://makefile-add-ldflags.patch \ file://do-not-install-pyc-and-pyo.patch \ + file://include_sys_types.patch \ file://openipmi-helper \ file://ipmi.service \ "
PATCH 4/4 samba: Fix build with musl
In reply to Khem Raj--- .../recipes-connectivity/samba/samba/glibc_only.patch | 15 +++++++++++++++ .../samba/samba/netdb_defines.patch | 19 +++++++++++++++++++ .../recipes-connectivity/samba/samba_4.6.2.bb | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 meta-networking/recipes-connectivity/samba/samba/glibc_only.patch create mode 100644 meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch
meta-networking/recipes-connectivity/samba/samba/glibc_only.patch new file +15 -0
@@ -0,0 +1,15 @@ +Index: samba-4.6.2/ctdb/tests/src/test_mutex_raw.c +=================================================================== +--- samba-4.6.2.orig/ctdb/tests/src/test_mutex_raw.c ++++ samba-4.6.2/ctdb/tests/src/test_mutex_raw.c +@@ -166,8 +166,10 @@ int main(int argc, const char **argv) + if (ret == 0) { + pthread_mutex_unlock(mutex); + } ++#ifdef __GLIBC__ + } else if (ret == EBUSY) { + printf("pid=%u\n", mutex->__data.__owner); ++#endif + } else if (ret == 0) { + pthread_mutex_unlock(mutex); + }
meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch new file +19 -0
@@ -0,0 +1,19 @@ +Index: samba-4.6.2/nsswitch/wins.c +=================================================================== +--- samba-4.6.2.orig/nsswitch/wins.c ++++ samba-4.6.2/nsswitch/wins.c +@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex = + #define INADDRSZ 4 + #endif + ++#ifndef NETDB_INTERNAL ++#define NETDB_INTERNAL (-1) ++#endif ++ ++#ifndef NETDB_SUCCESS ++#define NETDB_SUCCESS 0 ++#endif ++ + NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname, + struct hostent *he, + char *buffer,
meta-networking/recipes-connectivity/samba/samba_4.6.2.bb +2 -0
@@ -18,6 +18,8 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ file://21-add-config-option-without-valgrind.patch \ file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \ file://0006-avoid-using-colon-in-the-checking-msg.patch \ + file://netdb_defines.patch \ + file://glibc_only.patch \ file://volatiles.03_samba \ " SRC_URI_append_libc-musl = " \
Signature · 1 line
2.13.0
Re: [meta-networking][PATCH 4/4] samba: Fix build with musl
meta-networking/recipes-connectivity/samba/samba/glibc_only.patch
Quoted 12 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- .../recipes-connectivity/samba/samba/glibc_only.patch | 15 +++++++++++++++ .../samba/samba/netdb_defines.patch | 19 +++++++++++++++++++ .../recipes-connectivity/samba/samba_4.6.2.bb | 2 ++ 3 files changed, 36 insertions(+)create mode 100644
meta-networking/recipes-connectivity/samba/samba/glibc_only.patchcreate mode 100644meta-networking/recipes-connectivity/samba/samba/netdb_defines.patchmeta-networking/recipes-connectivity/samba/samba/glibc_only.patch new file +0
-0
Isn't this missing Upstream-Status and Signed-off-by ?
- armin
Quoted 56 lines
meta-networking/recipes-connectivity/samba/samba/glibc_only.patch new file +15
-0@@ -0,0 +1,15 @@ +Index: samba-4.6.2/ctdb/tests/src/test_mutex_raw.c +=================================================================== +--- samba-4.6.2.orig/ctdb/tests/src/test_mutex_raw.c ++++ samba-4.6.2/ctdb/tests/src/test_mutex_raw.c +@@ -166,8 +166,10 @@ int main(int argc, const char **argv) + if (ret == 0) { + pthread_mutex_unlock(mutex); + } ++#ifdef __GLIBC__ + } else if (ret == EBUSY) { + printf("pid=%u\n", mutex->__data.__owner); ++#endif + } else if (ret == 0) { + pthread_mutex_unlock(mutex); + }meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch new file +19
-0@@ -0,0 +1,19 @@ +Index: samba-4.6.2/nsswitch/wins.c +=================================================================== +--- samba-4.6.2.orig/nsswitch/wins.c ++++ samba-4.6.2/nsswitch/wins.c +@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex = + #define INADDRSZ 4 + #endif + ++#ifndef NETDB_INTERNAL ++#define NETDB_INTERNAL (-1) ++#endif ++ ++#ifndef NETDB_SUCCESS ++#define NETDB_SUCCESS 0 ++#endif ++ + NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname, + struct hostent *he, + char *buffer,meta-networking/recipes-connectivity/samba/samba_4.6.2.bb +2
-0@@ -18,6 +18,8 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ file://21-add-config-option-without-valgrind.patch \ file://0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch \ file://0006-avoid-using-colon-in-the-checking-msg.patch \ + file://netdb_defines.patch \ + file://glibc_only.patch \ file://volatiles.03_samba \ " SRC_URI_append_libc-musl = " \
Quoted 13 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- .../recipes-multimedia/caps/caps/append_ldflags.patch | 18 ++++++++++++++++++ meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb | 1 + 2 files changed, 19 insertions(+)create mode 100644
meta-multimedia/recipes-multimedia/caps/caps/append_ldflags.patchmeta-multimedia/recipes-multimedia/caps/caps/append_ldflags.patch new file +0
-0
meta-multimedia/recipes-multimedia/caps/caps/append_ldflags.patch line 4
Quoted 4 lines
meta-multimedia/recipes-multimedia/caps/caps/append_ldflags.patch new file +4
-0@@ -0,0 +1,18 @@ +Change the order of linker flags such that -shared is appearig after -pie/-fpie +this helps in building the package when secuiry flags are enabled + +-Khem
Missing Upstream-Status and Signed-off-by
- armin
Quoted 26 lines
meta-multimedia/recipes-multimedia/caps/caps/append_ldflags.patch new file +14
-0+ +Index: caps-0.9.24/Makefile +=================================================================== +--- caps-0.9.24.orig/Makefile ++++ caps-0.9.24/Makefile +@@ -14,7 +14,7 @@ STRIP = strip + -include defines.make + + CFLAGS += $(OPTS) $(_CFLAGS) +-LDFLAGS += $(_LDFLAGS) $(CFLAGS) ++LDFLAGS += $(CFLAGS) $(_LDFLAGS) + + PLUG = caps +meta-multimedia/recipes-multimedia/caps/caps_0.9.24.bb +1
-0@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRC_URI = "http://quitte.de/dsp/${PN}_${PV}.tar.bz2 \ file://Avoid-ambiguity-in-div-invocation.patch \ file://0001-basic.h-Use-c99-supported-stdint-types.patch \ + file://append_ldflags.patch \ " SRC_URI[md5sum] = "c1d634038dcb54702306c0e30cb1c626"