summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2024-11-20 12:36:58 +0800
committerSteve Sakoman <steve@sakoman.com>2024-11-26 06:11:30 -0800
commit055a8f6fc83bd1204865661ce8d34fce4898fa3c (patch)
treefa670fa4977bc5fef69e1d9f10cac0cc1e66586a
parentca10bad4db99afddaa86ef43b66f74ffe8d94b26 (diff)
downloadpoky-055a8f6fc83bd1204865661ce8d34fce4898fa3c.tar.gz
sysvinit: backport patch for fixing one issue of pidof
When a program is a link to an executable, and this executable is handled by update-alternatives, renamed to a different name, cmd `pidof full_path_of_program` will not work. Eg: /usr/sbin/httpd -> /usr/sbin/httpd.apache2 `pidof /usr/sbin/httpd` cannot get pid of the process httpd Backport the patch to fix above issue. (From OE-Core rev: 60e6fe983c82d8a62fc07d9271d44d0cb072f0fd) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/0001-Accepted-patch-from-Mark-Hindley-which-avoids-cleari.patch31
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_3.04.bb1
2 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-Accepted-patch-from-Mark-Hindley-which-avoids-cleari.patch b/meta/recipes-core/sysvinit/sysvinit/0001-Accepted-patch-from-Mark-Hindley-which-avoids-cleari.patch
new file mode 100644
index 0000000000..33c9f62eac
--- /dev/null
+++ b/meta/recipes-core/sysvinit/sysvinit/0001-Accepted-patch-from-Mark-Hindley-which-avoids-cleari.patch
@@ -0,0 +1,31 @@
1From 5be52641a10ad6cd89bc7cdb80318e32be7e6662 Mon Sep 17 00:00:00 2001
2From: Jesse <jsmith@resonatingmedia.com>
3Date: Wed, 29 Mar 2023 10:34:45 -0300
4Subject: [PATCH] Accepted patch from Mark Hindley which avoids clearing
5 realpath information in pidof when trying to find matching executables.
6
7Upstream-Status: Backport [https://github.com/slicer69/sysvinit/commit/c06458e1c1822a2c8ff89fbdd29262ca97dd18b1#diff-4244fa301bd80b0a8f553ce0751fb0fcde1a45ee9dee71db85135cffde8ac712R13]
8
9Signed-off-by: Changqing Li <changqing.li@windriver.com>
10
11---
12 src/killall5.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/killall5.c b/src/killall5.c
16index 86866b0..f7a401e 100644
17--- a/src/killall5.c
18+++ b/src/killall5.c
19@@ -766,8 +766,8 @@ PIDQ_HEAD *pidof(char *prog)
20 return NULL;
21
22 /* Try to stat the executable. */
23+ memset(real_path, 0, sizeof(real_path));
24 if ( (prog[0] == '/') && ( realpath(prog, real_path) ) ) {
25- memset(&real_path[0], 0, sizeof(real_path));
26 dostat++;
27 }
28
29--
302.25.1
31
diff --git a/meta/recipes-core/sysvinit/sysvinit_3.04.bb b/meta/recipes-core/sysvinit/sysvinit_3.04.bb
index 1dd5f575d2..d3f77d8150 100644
--- a/meta/recipes-core/sysvinit/sysvinit_3.04.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_3.04.bb
@@ -23,6 +23,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.xz \
23 file://bootlogd.init \ 23 file://bootlogd.init \
24 file://01_bootlogd \ 24 file://01_bootlogd \
25 file://0001-hddown-include-libgen.h-for-basename-API.patch \ 25 file://0001-hddown-include-libgen.h-for-basename-API.patch \
26 file://0001-Accepted-patch-from-Mark-Hindley-which-avoids-cleari.patch \
26 " 27 "
27SRC_URI[sha256sum] = "2a621fe6e4528bc91308b74867ddaaebbdf7753f02395c0c5bae817bd2b7e3a5" 28SRC_URI[sha256sum] = "2a621fe6e4528bc91308b74867ddaaebbdf7753f02395c0c5bae817bd2b7e3a5"
28 29