diff options
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r-- | meta/recipes-extended/procps/procps/0001-src-w.c-use-utmp.h-only.patch | 65 | ||||
-rw-r--r-- | meta/recipes-extended/procps/procps/0001-w.c-correct-musl-builds.patch | 44 | ||||
-rw-r--r-- | meta/recipes-extended/procps/procps/0002-proc-escape.c-add-missing-include.patch | 23 | ||||
-rw-r--r-- | meta/recipes-extended/procps/procps_4.0.3.bb (renamed from meta/recipes-extended/procps/procps_3.3.17.bb) | 9 |
4 files changed, 67 insertions, 74 deletions
diff --git a/meta/recipes-extended/procps/procps/0001-src-w.c-use-utmp.h-only.patch b/meta/recipes-extended/procps/procps/0001-src-w.c-use-utmp.h-only.patch new file mode 100644 index 0000000000..23c91ec775 --- /dev/null +++ b/meta/recipes-extended/procps/procps/0001-src-w.c-use-utmp.h-only.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From c41b3be62fbb78e0939fddaebad519360cbd8702 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Mon, 6 Mar 2023 09:27:57 +0100 | ||
4 | Subject: [PATCH] src/w.c: use only utmpx | ||
5 | |||
6 | Nowadays this works both on musl and glibc systems, however on musl | ||
7 | utmp.h is also needed to avoid the following failure: | ||
8 | |||
9 | | ../git/src/w.c: In function 'print_from': | ||
10 | | ../git/src/w.c:73:28: error: '__UT_HOSTSIZE' undeclared (first use in this function); did you mean 'UT_HOSTSIZE'? | ||
11 | | 73 | # define UT_HOSTSIZE __UT_HOSTSIZE | ||
12 | | | ^~~~~~~~~~~~~ | ||
13 | | ../git/src/w.c:233:64: note: in expansion of macro 'UT_HOSTSIZE' | ||
14 | | 233 | print_display_or_interface(u->ut_host, UT_HOSTSIZE, fromlen - len); | ||
15 | | | ^~~~~~~~~~~ | ||
16 | | | ||
17 | |||
18 | It is caused by including utmpx.h, but not utmp.h, which (on musl) | ||
19 | lacks the needed definitions. | ||
20 | |||
21 | I have verified that both musl and glibc based builds continue to work. | ||
22 | |||
23 | Upstream-Status: Submitted [https://gitlab.com/procps-ng/procps/-/merge_requests/171] | ||
24 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
25 | |||
26 | --- | ||
27 | src/w.c | 17 ++--------------- | ||
28 | 1 file changed, 2 insertions(+), 15 deletions(-) | ||
29 | |||
30 | diff --git a/src/w.c b/src/w.c | ||
31 | index 5e878f04..912c5df3 100644 | ||
32 | --- a/src/w.c | ||
33 | +++ b/src/w.c | ||
34 | @@ -46,11 +46,8 @@ | ||
35 | #include <termios.h> | ||
36 | #include <time.h> | ||
37 | #include <unistd.h> | ||
38 | -#ifdef HAVE_UTMPX_H | ||
39 | -# include <utmpx.h> | ||
40 | -#else | ||
41 | -# include <utmp.h> | ||
42 | -#endif | ||
43 | +#include <utmp.h> | ||
44 | +#include <utmpx.h> | ||
45 | #include <arpa/inet.h> | ||
46 | |||
47 | #include "c.h" | ||
48 | @@ -63,17 +60,7 @@ | ||
49 | static int ignoreuser = 0; /* for '-u' */ | ||
50 | static int oldstyle = 0; /* for '-o' */ | ||
51 | |||
52 | -#ifdef HAVE_UTMPX_H | ||
53 | typedef struct utmpx utmp_t; | ||
54 | -#else | ||
55 | -typedef struct utmp utmp_t; | ||
56 | -#endif | ||
57 | - | ||
58 | -#if !defined(UT_HOSTSIZE) || defined(__UT_HOSTSIZE) | ||
59 | -# define UT_HOSTSIZE __UT_HOSTSIZE | ||
60 | -# define UT_LINESIZE __UT_LINESIZE | ||
61 | -# define UT_NAMESIZE __UT_NAMESIZE | ||
62 | -#endif | ||
63 | |||
64 | #ifdef W_SHOWFROM | ||
65 | # define FROM_STRING "on" | ||
diff --git a/meta/recipes-extended/procps/procps/0001-w.c-correct-musl-builds.patch b/meta/recipes-extended/procps/procps/0001-w.c-correct-musl-builds.patch deleted file mode 100644 index c92ad28e4f..0000000000 --- a/meta/recipes-extended/procps/procps/0001-w.c-correct-musl-builds.patch +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | From 22f8d25567b8d64bdbab0fb0b4915b4362561d9b Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 24 Feb 2021 21:14:31 +0000 | ||
4 | Subject: [PATCH] w.c: correct musl builds | ||
5 | |||
6 | No need to redefine UT_ stuff to something that does not exist. | ||
7 | |||
8 | UT_ is already provided in musl but via utmp.h header, so include | ||
9 | it always. | ||
10 | |||
11 | Upstream-Status: Submitted [https://gitlab.com/procps-ng/procps/-/merge_requests/126] | ||
12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
13 | --- | ||
14 | w.c | 9 +-------- | ||
15 | 1 file changed, 1 insertion(+), 8 deletions(-) | ||
16 | |||
17 | diff --git a/w.c b/w.c | ||
18 | index 9d07ac9..d10639b 100644 | ||
19 | --- a/w.c | ||
20 | +++ b/w.c | ||
21 | @@ -57,9 +57,8 @@ | ||
22 | #include <unistd.h> | ||
23 | #ifdef HAVE_UTMPX_H | ||
24 | # include <utmpx.h> | ||
25 | -#else | ||
26 | -# include <utmp.h> | ||
27 | #endif | ||
28 | +#include <utmp.h> | ||
29 | #include <arpa/inet.h> | ||
30 | |||
31 | static int ignoreuser = 0; /* for '-u' */ | ||
32 | @@ -72,12 +71,6 @@ typedef struct utmpx utmp_t; | ||
33 | typedef struct utmp utmp_t; | ||
34 | #endif | ||
35 | |||
36 | -#if !defined(UT_HOSTSIZE) || defined(__UT_HOSTSIZE) | ||
37 | -# define UT_HOSTSIZE __UT_HOSTSIZE | ||
38 | -# define UT_LINESIZE __UT_LINESIZE | ||
39 | -# define UT_NAMESIZE __UT_NAMESIZE | ||
40 | -#endif | ||
41 | - | ||
42 | #ifdef W_SHOWFROM | ||
43 | # define FROM_STRING "on" | ||
44 | #else | ||
diff --git a/meta/recipes-extended/procps/procps/0002-proc-escape.c-add-missing-include.patch b/meta/recipes-extended/procps/procps/0002-proc-escape.c-add-missing-include.patch deleted file mode 100644 index 5fa1ac9d78..0000000000 --- a/meta/recipes-extended/procps/procps/0002-proc-escape.c-add-missing-include.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | From 4f964821398dff7ab21fec63da15e1e00b2e9277 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 24 Feb 2021 21:16:14 +0000 | ||
4 | Subject: [PATCH] proc/escape.c: add missing include | ||
5 | |||
6 | Upstream-Status: Submitted [https://gitlab.com/procps-ng/procps/-/merge_requests/126] | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | proc/escape.c | 1 + | ||
10 | 1 file changed, 1 insertion(+) | ||
11 | |||
12 | diff --git a/proc/escape.c b/proc/escape.c | ||
13 | index 2e8fb7d..e1f4612 100644 | ||
14 | --- a/proc/escape.c | ||
15 | +++ b/proc/escape.c | ||
16 | @@ -21,6 +21,7 @@ | ||
17 | #include <sys/types.h> | ||
18 | #include <string.h> | ||
19 | #include <limits.h> | ||
20 | +#include <langinfo.h> | ||
21 | #include "procps.h" | ||
22 | #include "escape.h" | ||
23 | #include "readproc.h" | ||
diff --git a/meta/recipes-extended/procps/procps_3.3.17.bb b/meta/recipes-extended/procps/procps_4.0.3.bb index 59ad89d326..cc3420df4e 100644 --- a/meta/recipes-extended/procps/procps_3.3.17.bb +++ b/meta/recipes-extended/procps/procps_4.0.3.bb | |||
@@ -14,14 +14,9 @@ inherit autotools gettext pkgconfig update-alternatives | |||
14 | 14 | ||
15 | SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master \ | 15 | SRC_URI = "git://gitlab.com/procps-ng/procps.git;protocol=https;branch=master \ |
16 | file://sysctl.conf \ | 16 | file://sysctl.conf \ |
17 | file://0001-w.c-correct-musl-builds.patch \ | 17 | file://0001-src-w.c-use-utmp.h-only.patch \ |
18 | file://0002-proc-escape.c-add-missing-include.patch \ | ||
19 | " | 18 | " |
20 | SRCREV = "19a508ea121c0c4ac6d0224575a036de745eaaf8" | 19 | SRCREV = "806eb270f217ff7e1e745c7bda2b002b5be74be4" |
21 | # 4.x version is an API incompatible rewrite | ||
22 | # until procps consumers are transitioned to it we need to stick with 3.x | ||
23 | # https://gitlab.com/procps-ng/procps/-/issues/239 | ||
24 | UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>3(\.\d+)+)" | ||
25 | 20 | ||
26 | S = "${WORKDIR}/git" | 21 | S = "${WORKDIR}/git" |
27 | 22 | ||