procps: upgrade 3.3.16 -> 3.3.17
PATCH v2 1/1 procps: upgrade 3.3.16 -> 3.3.17
Add patch to fix bug of compile under musl:
0001-Fix-compile-bug-of-musl.patch
---
.../procps/0001-Fix-compile-bug-of-musl.patch | 52 +++++++++++++++++++
.../{procps_3.3.16.bb => procps_3.3.17.bb} | 5 +-
2 files changed, 55 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch
rename meta/recipes-extended/procps/{procps_3.3.16.bb => procps_3.3.17.bb} (95%)meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch new file +52 -0
@@ -0,0 +1,52 @@ +From 4ceaef8b624042d510492864cb5ee0179452312b Mon Sep 17 00:00:00 2001 +From: Wang Mingyu <[email protected]> +Date: Thu, 4 Mar 2021 17:16:03 +0900 +Subject: [PATCH] Fix compile bug of musl + +It solves the problem that the variable definition cannot be found because the header file cannot be included under musl + +Signed-off-by: Wang Mingyu <[email protected]> +--- + proc/escape.c | 2 +- + w.c | 12 ++++++++---- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/proc/escape.c b/proc/escape.c +index 2e8fb7d..21ccdc6 100644 +--- a/proc/escape.c ++++ b/proc/escape.c +@@ -25,7 +25,7 @@ + #include "escape.h" + #include "readproc.h" + +-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)) ++#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)) || (DEFAULT_LIBC == LIBC_UCLIBC) + # include <wchar.h> + # include <wctype.h> + # include <stdlib.h> /* MB_CUR_MAX */ +diff --git a/w.c b/w.c +index 9d07ac9..722b612 100644 +--- a/w.c ++++ b/w.c +@@ -56,10 +56,14 @@ + #include <time.h> + #include <unistd.h> + #ifdef HAVE_UTMPX_H +-# include <utmpx.h> +-#else +-# include <utmp.h> +-#endif ++# if HAVE_UTMP_H ++ /* needs utmp.h, for the definition of e.g., UT_HOSTSIZE. */ ++# include <utmp.h> ++# endif ++# include <utmpx.h> ++#elif HAVE_UTMP_H ++# include <utmp.h> ++#endif + #include <arpa/inet.h> + + static int ignoreuser = 0; /* for '-u' */ +-- +2.25.1 +
meta/recipes-extended/procps/procps_3.3.17.bb renamed from meta/recipes-extended/procps/procps_3.3.16.bb +3 -2
@@ -14,8 +14,9 @@ inherit autotools gettext pkgconfig update-alternatives SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https \ file://sysctl.conf \ + file://0001-Fix-compile-bug-of-musl.patch \ " -SRCREV = "59c88e18f29000ceaf7e5f98181b07be443cf12f" +SRCREV = "19a508ea121c0c4ac6d0224575a036de745eaaf8" S = "${WORKDIR}/git"
@@ -98,4 +99,4 @@ ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" ALTERNATIVE_${PN}-sysctl = "sysctl" ALTERNATIVE_TARGET[sysctl] = "${base_sbindir}/sysctl" -ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" +ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl"
Signature · 1 line
2.25.1
Thanks, I already sent the same version update earlier and it is being tested in master-next. When you add a custom patch, remember to add Upstream-Status, and for issues like musl compatibility, submit it upstream.
Alex
Quoted 110 lines · Wang Mingyu
Add patch to fix bug of compile under musl:
0001-Fix-compile-bug-of-musl.patchSigned-off-by Wang Mingyu <[email protected]>--- .../procps/0001-Fix-compile-bug-of-musl.patch | 52 +++++++++++++++++++ .../{procps_3.3.16.bb => procps_3.3.17.bb} | 5 +- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch rename meta/recipes-extended/procps/{procps_3.3.16.bb => procps_3.3.17.bb}(95%)
diff --git
a/meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patchb/meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patchnew file mode 100644
index 0000000000..98186c7d78
---/dev/null
+++b/meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patchmeta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch new file +6
-0@@ -0,0 +1,52 @@ +From 4ceaef8b624042d510492864cb5ee0179452312b Mon Sep 17 00:00:00 2001 +From: Wang Mingyu <[email protected]> +Date: Thu, 4 Mar 2021 17:16:03 +0900 +Subject: [PATCH] Fix compile bug of musl + +It solves the problem that the variable definition cannot be foundbecause the header file cannot be included under musl
meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch new file +16
-0+ +Signed-off-by: Wang Mingyu <[email protected]> +--- + proc/escape.c | 2 +- + w.c | 12 ++++++++---- + 2 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/proc/escape.c b/proc/escape.c +index 2e8fb7d..21ccdc6 100644 +--- a/proc/escape.c ++++ b/proc/escape.c +@@ -25,7 +25,7 @@ + #include "escape.h" + #include "readproc.h" + +-#if (__GNU_LIBRARY__ >= 6) && (!defined(__UCLIBC__) ||
defined(__UCLIBC_HAS_WCHAR__))
++#if (__GNU_LIBRARY__>= 6) && (!defined(__UCLIBC__) ||defined(__UCLIBC_HAS_WCHAR__)) || (DEFAULT_LIBC==LIBC_UCLIBC)
+ # include <wchar.h>
+ # include <wctype.h>
+ # include <stdlib.h> /*MB_CUR_MAX*/meta/recipes-extended/procps/procps/0001-Fix-compile-bug-of-musl.patch new file +26
-0+diff --git a/w.c b/w.c +index 9d07ac9..722b612 100644 +--- a/w.c ++++ b/w.c +@@ -56,10 +56,14 @@ + #include <time.h> + #include <unistd.h> + #ifdef HAVE_UTMPX_H +-# include <utmpx.h> +-#else +-# include <utmp.h> +-#endif ++# if HAVE_UTMP_H ++ /* needs utmp.h, for the definition of e.g., UT_HOSTSIZE. */ ++# include <utmp.h> ++# endif ++# include <utmpx.h> ++#elif HAVE_UTMP_H ++# include <utmp.h> ++#endif + #include <arpa/inet.h> + + static int ignoreuser = 0; /* for '-u' */ +-- +2.25.1 +meta/recipes-extended/procps/procps_3.3.17.bb renamed from meta/recipes-extended/procps/procps_3.3.16.bb +3
-3@@ -14,8 +14,9 @@ inherit autotools gettext pkgconfig update-alternatives SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https \ file://sysctl.conf \ + file://0001-Fix-compile-bug-of-musl.patch \ " -SRCREV = "59c88e18f29000ceaf7e5f98181b07be443cf12f" +SRCREV = "19a508ea121c0c4ac6d0224575a036de745eaaf8" S = "${WORKDIR}/git"@@ -98,4 +99,4 @@ ALTERNATIVE_LINK_NAME[ps] = "${base_bindir}/ps" ALTERNATIVE_${PN}-sysctl = "sysctl" ALTERNATIVE_TARGET[sysctl] = "${base_sbindir}/sysctl" -ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" +ALTERNATIVE_LINK_NAME[sysctl] = "${base_sbindir}/sysctl" --2.25.1