diff options
Diffstat (limited to 'meta/recipes-core/sysvinit/sysvinit')
5 files changed, 76 insertions, 21 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch b/meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch new file mode 100644 index 0000000000..5e4053bad1 --- /dev/null +++ b/meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch @@ -0,0 +1,38 @@ +From a07c1d94e79840c59563741b45e690e77d4f3dfa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 3 Dec 2023 20:09:30 -0800 +Subject: [PATCH] hddown: include libgen.h for basename API + +musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler + +include libgen.h for using the posix declaration of the funciton. + +Fixes + +hddown.c:135:8: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion] + 135 | ptr = basename(lnk); + | ^ ~~~~~~~~~~~~~ + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [https://github.com/slicer69/sysvinit/pull/21] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/hddown.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/hddown.c b/src/hddown.c +index 7a2cf28..3b31bc0 100644 +--- a/src/hddown.c ++++ b/src/hddown.c +@@ -24,6 +24,7 @@ char *v_hddown = "@(#)hddown.c 1.02 22-Apr-2003 miquels@cistron.nl"; + #ifndef _GNU_SOURCE + #define _GNU_SOURCE + #endif ++#include <libgen.h> + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +-- +2.43.0 + diff --git a/meta/recipes-core/sysvinit/sysvinit/install.patch b/meta/recipes-core/sysvinit/sysvinit/install.patch index 90563a6294..bc6d493c2b 100644 --- a/meta/recipes-core/sysvinit/sysvinit/install.patch +++ b/meta/recipes-core/sysvinit/sysvinit/install.patch @@ -3,7 +3,7 @@ From: Qing He <qing.he@intel.com> Date: Fri, 18 Jun 2010 09:40:30 +0800 Subject: [PATCH] sysvinit: upgrade to version 2.88dsf -Upstream-Status: Pending +Upstream-Status: Submitted [https://github.com/slicer69/sysvinit/pull/13] --- src/Makefile | 53 +++++++++++++++++++++++++++++----------------------- diff --git a/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch b/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch index 494aa0e012..8ef292ed12 100644 --- a/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch +++ b/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch @@ -1,4 +1,4 @@ -From 6c490ea6579a132fabb7dbd25387bb521f820371 Mon Sep 17 00:00:00 2001 +From 0e441712d0e366a0384ff3fa879f5a2d2607c24f Mon Sep 17 00:00:00 2001 From: Hongxu Jia <hongxu.jia@windriver.com> Date: Wed, 24 Jul 2013 17:07:22 +0800 Subject: [PATCH] pidof: add -m option @@ -10,7 +10,7 @@ each other's pids. https://bugzilla.redhat.com/show_bug.cgi?id=883856 -Upstream-Status: backport +Upstream-Status: Backport Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> @@ -21,10 +21,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 2 files changed, 65 insertions(+), 3 deletions(-) diff --git a/man/pidof.8 b/man/pidof.8 -index ebe5f55..2fdc4d3 100644 +index 6866cb3..a87d878 100644 --- a/man/pidof.8 +++ b/man/pidof.8 -@@ -25,6 +25,7 @@ pidof -- find the process ID of a running program. +@@ -25,6 +25,7 @@ pidof - find the process ID of a running program .RB [ \-n ] .RB [ \-x ] .RB [ \-z ] @@ -32,9 +32,9 @@ index ebe5f55..2fdc4d3 100644 .RB [ \-o .IR omitpid[,omitpid...] ] .RB [ \-o -@@ -76,6 +77,11 @@ is shown. The default separator is a space. +@@ -77,6 +78,11 @@ is shown. The default separator is a space. Tells \fIpidof\fP to omit processes with that process id. The special - pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP + pid \fB%PPID\fP can be used to name the parent process of the \fBpidof\fP program, in other words the calling shell or shell script. +.IP -m +When used with -o, will also omit any processes that have the same @@ -45,10 +45,10 @@ index ebe5f55..2fdc4d3 100644 .TP .B 0 diff --git a/src/killall5.c b/src/killall5.c -index 8b5cb38..a664954 100644 +index b0728fa..72289e3 100644 --- a/src/killall5.c +++ b/src/killall5.c -@@ -126,6 +126,7 @@ typedef struct _s_nfs +@@ -121,6 +121,7 @@ typedef struct _s_nfs /* List of processes. */ PROC *plist; @@ -56,7 +56,7 @@ index 8b5cb38..a664954 100644 /* List of processes to omit. */ OMIT *omit; -@@ -361,6 +362,20 @@ static void clear_mnt(void) +@@ -356,6 +357,20 @@ static void clear_mnt(void) } } @@ -77,15 +77,15 @@ index 8b5cb38..a664954 100644 /* * Check if path is a shadow off a NFS partition. */ -@@ -486,6 +501,7 @@ int readproc(int do_stat) +@@ -481,6 +496,7 @@ int readproc() DIR *dir; FILE *fp; PROC *p, *n; + OMIT *o, *m; struct dirent *d; - struct stat st; char path[PATH_MAX+1]; -@@ -733,6 +749,17 @@ int readproc(int do_stat) + char buf[PATH_MAX+1]; +@@ -670,6 +686,17 @@ int readproc() p->next = plist; plist = p; p->pid = pid; @@ -103,7 +103,7 @@ index 8b5cb38..a664954 100644 } closedir(dir); -@@ -944,6 +971,26 @@ PIDQ_HEAD *pidof(char *prog) +@@ -870,6 +897,26 @@ PIDQ_HEAD *pidof(char *prog) return q; } @@ -130,7 +130,7 @@ index 8b5cb38..a664954 100644 /* Give usage message and exit. */ void usage(void) { -@@ -994,6 +1041,7 @@ void nsyslog(int pri, char *fmt, ...) +@@ -920,6 +967,7 @@ void nsyslog(int pri, char *fmt, ...) #define PIDOF_OMIT 0x02 #define PIDOF_NETFS 0x04 #define PIDOF_QUIET 0x08 @@ -138,7 +138,7 @@ index 8b5cb38..a664954 100644 /* * Pidof functionality. -@@ -1011,6 +1059,7 @@ int main_pidof(int argc, char **argv) +@@ -937,6 +985,7 @@ int main_pidof(int argc, char **argv) char tmp[512]; char sep = ' '; @@ -146,7 +146,7 @@ index 8b5cb38..a664954 100644 omit = (OMIT*)0; nlist = (NFS*)0; opterr = 0; -@@ -1018,7 +1067,7 @@ int main_pidof(int argc, char **argv) +@@ -944,7 +993,7 @@ int main_pidof(int argc, char **argv) if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0)) flags |= PIDOF_NETFS; @@ -155,7 +155,7 @@ index 8b5cb38..a664954 100644 case '?': nsyslog(LOG_ERR,"invalid options on command line!\n"); closelog(); -@@ -1069,6 +1118,9 @@ int main_pidof(int argc, char **argv) +@@ -995,6 +1044,9 @@ int main_pidof(int argc, char **argv) case 'z': list_dz_processes = TRUE; break; @@ -165,7 +165,7 @@ index 8b5cb38..a664954 100644 case 'n': flags |= PIDOF_NETFS; break; -@@ -1100,10 +1152,13 @@ int main_pidof(int argc, char **argv) +@@ -1026,10 +1078,13 @@ int main_pidof(int argc, char **argv) pid_t spid = 0; while ((p = get_next_from_pid_q(q))) { if ((flags & PIDOF_OMIT) && omit) { @@ -181,7 +181,7 @@ index 8b5cb38..a664954 100644 } /* -@@ -1145,6 +1200,7 @@ int main_pidof(int argc, char **argv) +@@ -1071,6 +1126,7 @@ int main_pidof(int argc, char **argv) printf("\n"); } diff --git a/meta/recipes-core/sysvinit/sysvinit/realpath.patch b/meta/recipes-core/sysvinit/sysvinit/realpath.patch index 859fd8baad..b559aa3b49 100644 --- a/meta/recipes-core/sysvinit/sysvinit/realpath.patch +++ b/meta/recipes-core/sysvinit/sysvinit/realpath.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Fix build on musl use realpath() API its available on all realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd However for Linux it should always work -Upstream-Status: Inappropriate[Linux specific] +Upstream-Status: Inappropriate [Linux specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> diff --git a/meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch b/meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch new file mode 100644 index 0000000000..89d65c23b7 --- /dev/null +++ b/meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch @@ -0,0 +1,17 @@ +# From glibc 2.36, <linux/mount.h> (included from <linux/fs.h>) and +# <sys/mount.h> (included from glibc) are no longer compatible: +# https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- sysvinit-3.04/src/sulogin.c.orig 2022-08-07 23:07:42.952576274 +0200 ++++ sysvinit-3.04/src/sulogin.c 2022-08-07 23:08:26.511470983 +0200 +@@ -51,7 +51,6 @@ + #ifdef __linux__ + # include <sys/statfs.h> + # include <sys/mount.h> +-# include <linux/fs.h> + # include <linux/magic.h> + # include <linux/major.h> + # ifndef TMPFS_MAGIC |