summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/sysvinit')
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb7
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch38
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch50
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch28
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/install.patch97
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch191
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/realpath.patch59
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch17
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_3.14.bb (renamed from meta/recipes-core/sysvinit/sysvinit_3.04.bb)25
9 files changed, 27 insertions, 485 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 6bbe517df1..c77266e71e 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -2,11 +2,10 @@ SUMMARY = "Inittab configuration for SysVinit"
2LICENSE = "GPL-2.0-only" 2LICENSE = "GPL-2.0-only"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" 3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
4 4
5
6SRC_URI = "file://inittab \ 5SRC_URI = "file://inittab \
7 file://start_getty" 6 file://start_getty"
8 7
9S = "${WORKDIR}" 8S = "${UNPACKDIR}"
10 9
11INHIBIT_DEFAULT_DEPS = "1" 10INHIBIT_DEFAULT_DEPS = "1"
12 11
@@ -16,9 +15,9 @@ do_compile() {
16 15
17do_install() { 16do_install() {
18 install -d ${D}${sysconfdir} 17 install -d ${D}${sysconfdir}
19 install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab 18 install -m 0644 ${S}/inittab ${D}${sysconfdir}/inittab
20 install -d ${D}${base_bindir} 19 install -d ${D}${base_bindir}
21 install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty 20 install -m 0755 ${S}/start_getty ${D}${base_bindir}/start_getty
22 sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty 21 sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty
23 22
24 CONSOLES="${SERIAL_CONSOLES}" 23 CONSOLES="${SERIAL_CONSOLES}"
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
deleted file mode 100644
index 5e4053bad1..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From a07c1d94e79840c59563741b45e690e77d4f3dfa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 3 Dec 2023 20:09:30 -0800
4Subject: [PATCH] hddown: include libgen.h for basename API
5
6musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler
7
8include libgen.h for using the posix declaration of the funciton.
9
10Fixes
11
12hddown.c:135:8: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
13 135 | ptr = basename(lnk);
14 | ^ ~~~~~~~~~~~~~
15
16[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
17
18Upstream-Status: Submitted [https://github.com/slicer69/sysvinit/pull/21]
19Signed-off-by: Khem Raj <raj.khem@gmail.com>
20---
21 src/hddown.c | 1 +
22 1 file changed, 1 insertion(+)
23
24diff --git a/src/hddown.c b/src/hddown.c
25index 7a2cf28..3b31bc0 100644
26--- a/src/hddown.c
27+++ b/src/hddown.c
28@@ -24,6 +24,7 @@ char *v_hddown = "@(#)hddown.c 1.02 22-Apr-2003 miquels@cistron.nl";
29 #ifndef _GNU_SOURCE
30 #define _GNU_SOURCE
31 #endif
32+#include <libgen.h>
33 #include <stdio.h>
34 #include <stdlib.h>
35 #include <unistd.h>
36--
372.43.0
38
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch b/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
deleted file mode 100644
index 60fbd87534..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From c710a3accd1fabdb671274e1a458405282d51e0c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Aug 2018 15:38:58 -0700
4Subject: [PATCH] include sys/sysmacros.h for major/minor definitions
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7Upstream-Status: Pending
8
9---
10 src/bootlogd.c | 1 +
11 src/mountpoint.c | 1 +
12 src/shutdown.c | 1 +
13 3 files changed, 3 insertions(+)
14
15diff --git a/src/bootlogd.c b/src/bootlogd.c
16index 787db87..8b07903 100644
17--- a/src/bootlogd.c
18+++ b/src/bootlogd.c
19@@ -29,6 +29,7 @@
20 #include <sys/types.h>
21 #include <sys/time.h>
22 #include <sys/stat.h>
23+#include <sys/sysmacros.h>
24 #include <sys/ioctl.h>
25 #include <sys/utsname.h>
26 #include <time.h>
27diff --git a/src/mountpoint.c b/src/mountpoint.c
28index 5f20522..94df7a1 100644
29--- a/src/mountpoint.c
30+++ b/src/mountpoint.c
31@@ -25,6 +25,7 @@
32
33 #include <sys/types.h>
34 #include <sys/stat.h>
35+#include <sys/sysmacros.h>
36 #include <unistd.h>
37 #include <stdlib.h>
38 #include <string.h>
39diff --git a/src/shutdown.c b/src/shutdown.c
40index b744a2c..40b7faf 100644
41--- a/src/shutdown.c
42+++ b/src/shutdown.c
43@@ -40,6 +40,7 @@
44 #endif
45 #include <sys/types.h>
46 #include <sys/stat.h>
47+#include <sys/sysmacros.h>
48 #include <sys/wait.h>
49 #ifdef __linux__
50 #include <sys/sysmacros.h> /* brought in my LFS patch */
diff --git a/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch b/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
index 5c39fb001b..1ac54fb667 100644
--- a/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
+++ b/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
@@ -1,33 +1,33 @@
1From c3a068cf24a22bea7349849ec111ae8d91a54db4 Mon Sep 17 00:00:00 2001 1From f040b04c50d13755b2063c4db0e0be0647cf5d14 Mon Sep 17 00:00:00 2001
2From: Jeff Dike <jdike@x86_64.user-mode-linux.org> 2From: Jeff Dike <jdike@x86_64.user-mode-linux.org>
3Date: Wed, 14 Jul 2010 14:35:52 -0400 3Date: Wed, 14 Jul 2010 14:35:52 -0400
4Subject: [PATCH] sysvinit - Remove sulogin dependency on /usr/lib*/libcrypt.a 4Subject: [PATCH] sysvinit - Remove sulogin dependency on /usr/lib*/libcrypt.a
5 5
6Upstream-Status: Inappropriate [configuration] 6The src Makefile was checking for libcrypt.a on the host, not in the
7 7build environment. This patch checks for $LCRYPT in the environment
8# The src Makefile was checking for libcrypt.a on the host, not in the 8and uses it if it's there.
9# build environment. This patch checks for $LCRYPT in the environment 9jdike@linux.intel.com
10# and uses it if it's there.
11# - jdike@linux.intel.com
12 10
11Upstream-Status: Inappropriate [configuration]
13--- 12---
14 src/Makefile | 11 ++--------- 13 src/Makefile | 12 ++----------
15 1 file changed, 2 insertions(+), 9 deletions(-) 14 1 file changed, 2 insertions(+), 10 deletions(-)
16 15
17diff --git a/src/Makefile b/src/Makefile 16diff --git a/src/Makefile b/src/Makefile
18index 5b1a5a2..b686394 100644 17index 6d9f01c..b12a233 100644
19--- a/src/Makefile 18--- a/src/Makefile
20+++ b/src/Makefile 19+++ b/src/Makefile
21@@ -97,15 +97,8 @@ else 20@@ -97,16 +97,8 @@ else
21 SULOGINLIBS =
22 endif 22 endif
23 23
24 # Additional libs for GNU libc. 24-# Additional libs for GNU libc.
25-ifneq ($(wildcard $(ROOT)/usr/lib*/libcrypt.*),) 25-ifneq ($(wildcard $(ROOT)/$(usrdir)/lib*/libcrypt.*),)
26- SULOGINLIBS += -lcrypt 26- SULOGINLIBS += -lcrypt
27-endif 27-endif
28- 28-
29-# Additional libs for GNU libc / multiarch on Debian based systems. 29-# Additional libs for GNU libc / multiarch on Debian based systems.
30-ifneq ($(wildcard $(ROOT)/usr/lib/*/libcrypt.*),) 30-ifneq ($(wildcard $(ROOT)/$(usrdir)/lib/*/libcrypt.*),)
31-ifneq ($(findstring -lcrypt, $(SULOGINLIBS)), -lcrypt) 31-ifneq ($(findstring -lcrypt, $(SULOGINLIBS)), -lcrypt)
32- SULOGINLIBS += -lcrypt 32- SULOGINLIBS += -lcrypt
33-endif 33-endif
diff --git a/meta/recipes-core/sysvinit/sysvinit/install.patch b/meta/recipes-core/sysvinit/sysvinit/install.patch
deleted file mode 100644
index bc6d493c2b..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit/install.patch
+++ /dev/null
@@ -1,97 +0,0 @@
1From 5e35aa105e7a2e85db2a89fee4114090b1ac55be Mon Sep 17 00:00:00 2001
2From: Qing He <qing.he@intel.com>
3Date: Fri, 18 Jun 2010 09:40:30 +0800
4Subject: [PATCH] sysvinit: upgrade to version 2.88dsf
5
6Upstream-Status: Submitted [https://github.com/slicer69/sysvinit/pull/13]
7
8---
9 src/Makefile | 53 +++++++++++++++++++++++++++++-----------------------
10 1 file changed, 30 insertions(+), 23 deletions(-)
11
12diff --git a/src/Makefile b/src/Makefile
13index 1b368dc..5b1a5a2 100644
14--- a/src/Makefile
15+++ b/src/Makefile
16@@ -77,7 +77,14 @@ else
17 INSTALL_DATA = install -m 644
18 endif
19 INSTALL_DIR = install -m 755 -d
20-MANDIR = /usr/share/man
21+
22+ROOT ?=
23+base_bindir ?= /bin
24+base_sbindir ?= /sbin
25+bindir ?= /usr/bin
26+sysconfdir ?= /etc
27+includedir ?= /usr/include
28+mandir ?= /usr/share/man
29
30 ifeq ($(WITH_SELINUX),yes)
31 SELINUX_DEF = -DWITH_SELINUX
32@@ -191,43 +198,43 @@ clobber: cleanobjs
33 distclean: clobber
34
35 install: all
36- $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/
37- $(INSTALL_DIR) $(ROOT)/usr/bin/
38+ $(INSTALL_DIR) $(ROOT)$(base_bindir)/ $(ROOT)$(base_sbindir)/
39+ $(INSTALL_DIR) $(ROOT)$(bindir)/
40 for i in $(BIN); do \
41- $(INSTALL_EXEC) $$i $(ROOT)/bin/ ; \
42+ $(INSTALL_EXEC) $$i $(ROOT)$(base_bindir)/ ; \
43 done
44 for i in $(SBIN); do \
45- $(INSTALL_EXEC) $$i $(ROOT)/sbin/ ; \
46+ $(INSTALL_EXEC) $$i $(ROOT)$(base_sbindir)/ ; \
47 done
48 for i in $(USRBIN); do \
49- $(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \
50+ $(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \
51 done
52 # $(INSTALL_DIR) $(ROOT)/etc/
53 $(INSTALL_DIR) $(ROOT)/etc/inittab.d
54 # $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/
55- ln -sf halt $(ROOT)/sbin/reboot
56- ln -sf halt $(ROOT)/sbin/poweroff
57- ln -sf init $(ROOT)/sbin/telinit
58- ln -sf /sbin/killall5 $(ROOT)/bin/pidof
59- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
60- ln -sf last $(ROOT)/usr/bin/lastb; \
61+ ln -sf halt $(ROOT)$(base_sbindir)/reboot
62+ ln -sf halt $(ROOT)$(base_sbindir)/poweroff
63+ ln -sf init $(ROOT)$(base_sbindir)/telinit
64+ ln -sf $(base_sbindir)/killall5 $(ROOT)$(base_bindir)/pidof
65+ if [ ! -f $(ROOT)$(bindir)/lastb ]; then \
66+ ln -sf last $(ROOT)$(bindir)/lastb; \
67 fi
68- $(INSTALL_DIR) $(ROOT)/usr/include/
69- $(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
70- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man1/
71- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man5/
72- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man8/
73+ $(INSTALL_DIR) $(ROOT)$(includedir)/
74+ $(INSTALL_DATA) initreq.h $(ROOT)$(includedir)/
75+ $(INSTALL_DIR) $(ROOT)$(mandir)/man1/
76+ $(INSTALL_DIR) $(ROOT)$(mandir)/man5/
77+ $(INSTALL_DIR) $(ROOT)$(mandir)/man8/
78 for man in $(MAN1); do \
79- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man1/; \
80- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man1/$$man ; \
81+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man1/; \
82+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man1/$$man ; \
83 done
84 for man in $(MAN5); do \
85- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man5/; \
86- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man5/$$man ; \
87+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man5/; \
88+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man5/$$man ; \
89 done
90 for man in $(MAN8); do \
91- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man8/; \
92- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man8/$$man ; \
93+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man8/; \
94+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man8/$$man ; \
95 done
96 ifeq ($(ROOT),)
97 #
diff --git a/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch b/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch
deleted file mode 100644
index 8ef292ed12..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch
+++ /dev/null
@@ -1,191 +0,0 @@
1From 0e441712d0e366a0384ff3fa879f5a2d2607c24f Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 24 Jul 2013 17:07:22 +0800
4Subject: [PATCH] pidof: add -m option
5
6When used with -o, will also omit any processes that have the same
7argv[0] and argv[1] as any explicitly omitted process ids. This can be
8used to avoid multiple shell scripts concurrently calling pidof returning
9each other's pids.
10
11https://bugzilla.redhat.com/show_bug.cgi?id=883856
12
13Upstream-Status: Backport
14Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166
15
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17
18---
19 man/pidof.8 | 6 +++++
20 src/killall5.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++---
21 2 files changed, 65 insertions(+), 3 deletions(-)
22
23diff --git a/man/pidof.8 b/man/pidof.8
24index 6866cb3..a87d878 100644
25--- a/man/pidof.8
26+++ b/man/pidof.8
27@@ -25,6 +25,7 @@ pidof - find the process ID of a running program
28 .RB [ \-n ]
29 .RB [ \-x ]
30 .RB [ \-z ]
31+.RB [ \-m ]
32 .RB [ \-o
33 .IR omitpid[,omitpid...] ]
34 .RB [ \-o
35@@ -77,6 +78,11 @@ is shown. The default separator is a space.
36 Tells \fIpidof\fP to omit processes with that process id. The special
37 pid \fB%PPID\fP can be used to name the parent process of the \fBpidof\fP
38 program, in other words the calling shell or shell script.
39+.IP -m
40+When used with -o, will also omit any processes that have the same
41+argv[0] and argv[1] as any explicitly omitted process ids. This can be
42+used to avoid multiple shell scripts concurrently calling pidof returning
43+each other's pids.
44 .SH "EXIT STATUS"
45 .TP
46 .B 0
47diff --git a/src/killall5.c b/src/killall5.c
48index b0728fa..72289e3 100644
49--- a/src/killall5.c
50+++ b/src/killall5.c
51@@ -121,6 +121,7 @@ typedef struct _s_nfs
52
53 /* List of processes. */
54 PROC *plist;
55+PROC *olist;
56
57 /* List of processes to omit. */
58 OMIT *omit;
59@@ -356,6 +357,20 @@ static void clear_mnt(void)
60 }
61 }
62
63+static void clear_omit(void)
64+{
65+ OMIT *o;
66+ PROC *p;
67+ for (o = omit; o; o = omit) {
68+ omit = omit->next;
69+ free(o);
70+ }
71+ for (p = olist; p; p = olist) {
72+ olist = olist->next;
73+ free(p);
74+ }
75+}
76+
77 /*
78 * Check if path is a shadow off a NFS partition.
79 */
80@@ -481,6 +496,7 @@ int readproc()
81 DIR *dir;
82 FILE *fp;
83 PROC *p, *n;
84+ OMIT *o, *m;
85 struct dirent *d;
86 char path[PATH_MAX+1];
87 char buf[PATH_MAX+1];
88@@ -670,6 +686,17 @@ int readproc()
89 p->next = plist;
90 plist = p;
91 p->pid = pid;
92+ /* Could be smarter, but it's a small list. */
93+ m = omit;
94+ for (o = omit; m; o = m) {
95+ m = o->next;
96+ if (o->pid == p->pid) {
97+ n = (PROC*)xmalloc(sizeof(PROC));
98+ *n = *p;
99+ n->next = olist;
100+ olist = n;
101+ }
102+ }
103 }
104 closedir(dir);
105
106@@ -870,6 +897,26 @@ PIDQ_HEAD *pidof(char *prog)
107 return q;
108 }
109
110+int matches(PROC *o, PROC *p)
111+{
112+ int ret = 0;
113+ char *oargv1, *pargv1;
114+ if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
115+ if (o->argv1 && p->argv1) {
116+ if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL)
117+ oargv1 = strdup(o->argv1);
118+ if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL)
119+ pargv1 = strdup(p->argv1);
120+ if (! strcmp(oargv1, pargv1)) {
121+ ret = 1;
122+ }
123+ free(oargv1);
124+ free(pargv1);
125+ }
126+ }
127+ return ret;
128+}
129+
130 /* Give usage message and exit. */
131 void usage(void)
132 {
133@@ -920,6 +967,7 @@ void nsyslog(int pri, char *fmt, ...)
134 #define PIDOF_OMIT 0x02
135 #define PIDOF_NETFS 0x04
136 #define PIDOF_QUIET 0x08
137+#define PIDOF_OMIT_OMIT_MATCHES 0x08
138
139 /*
140 * Pidof functionality.
141@@ -937,6 +985,7 @@ int main_pidof(int argc, char **argv)
142 char tmp[512];
143 char sep = ' ';
144
145+ olist = (PROC*)0;
146 omit = (OMIT*)0;
147 nlist = (NFS*)0;
148 opterr = 0;
149@@ -944,7 +993,7 @@ int main_pidof(int argc, char **argv)
150 if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0))
151 flags |= PIDOF_NETFS;
152
153- while ((opt = getopt(argc,argv,"qhco:d:sxzn")) != EOF) switch (opt) {
154+ while ((opt = getopt(argc,argv,"qhcmo:d:sxzn")) != EOF) switch (opt) {
155 case '?':
156 nsyslog(LOG_ERR,"invalid options on command line!\n");
157 closelog();
158@@ -995,6 +1044,9 @@ int main_pidof(int argc, char **argv)
159 case 'z':
160 list_dz_processes = TRUE;
161 break;
162+ case 'm':
163+ flags |= PIDOF_OMIT_OMIT_MATCHES;
164+ break;
165 case 'n':
166 flags |= PIDOF_NETFS;
167 break;
168@@ -1026,10 +1078,13 @@ int main_pidof(int argc, char **argv)
169 pid_t spid = 0;
170 while ((p = get_next_from_pid_q(q))) {
171 if ((flags & PIDOF_OMIT) && omit) {
172- OMIT * optr;
173- for (optr = omit; optr; optr = optr->next) {
174+ PROC * optr;
175+ for (optr = olist; optr; optr = optr->next) {
176 if (optr->pid == p->pid)
177 break;
178+ if (flags & PIDOF_OMIT_OMIT_MATCHES)
179+ if (matches(optr, p))
180+ break;
181 }
182
183 /*
184@@ -1071,6 +1126,7 @@ int main_pidof(int argc, char **argv)
185 printf("\n");
186 }
187
188+ clear_omit();
189 clear_mnt();
190
191 closelog();
diff --git a/meta/recipes-core/sysvinit/sysvinit/realpath.patch b/meta/recipes-core/sysvinit/sysvinit/realpath.patch
deleted file mode 100644
index b559aa3b49..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit/realpath.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From eb158c97f19d473d01befe96359a7f93ae834517 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 Nov 2015 00:10:03 +0000
4Subject: [PATCH] Fix build on musl use realpath() API its available on all
5 libcs
6
7realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd
8However for Linux it should always work
9
10Upstream-Status: Inappropriate [Linux specific]
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14---
15 src/killall5.c | 4 ++--
16 src/mountpoint.c | 1 +
17 src/wall.c | 1 +
18 3 files changed, 4 insertions(+), 2 deletions(-)
19
20diff --git a/src/killall5.c b/src/killall5.c
21index a664954..9798423 100644
22--- a/src/killall5.c
23+++ b/src/killall5.c
24@@ -977,9 +977,9 @@ int matches(PROC *o, PROC *p)
25 char *oargv1, *pargv1;
26 if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
27 if (o->argv1 && p->argv1) {
28- if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL)
29+ if ((oargv1 = realpath(o->argv1, NULL)) == NULL)
30 oargv1 = strdup(o->argv1);
31- if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL)
32+ if ((pargv1 = realpath(p->argv1, NULL)) == NULL)
33 pargv1 = strdup(p->argv1);
34 if (! strcmp(oargv1, pargv1)) {
35 ret = 1;
36diff --git a/src/mountpoint.c b/src/mountpoint.c
37index b24335e..5f20522 100644
38--- a/src/mountpoint.c
39+++ b/src/mountpoint.c
40@@ -23,6 +23,7 @@
41 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
42 */
43
44+#include <sys/types.h>
45 #include <sys/stat.h>
46 #include <unistd.h>
47 #include <stdlib.h>
48diff --git a/src/wall.c b/src/wall.c
49index d3a2c70..00826e9 100644
50--- a/src/wall.c
51+++ b/src/wall.c
52@@ -30,6 +30,7 @@
53 #include <pwd.h>
54 #include <syslog.h>
55 #include <sys/types.h>
56+#include <time.h>
57 #include "init.h"
58
59
diff --git a/meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch b/meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch
deleted file mode 100644
index 89d65c23b7..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch
+++ /dev/null
@@ -1,17 +0,0 @@
1# From glibc 2.36, <linux/mount.h> (included from <linux/fs.h>) and
2# <sys/mount.h> (included from glibc) are no longer compatible:
3# https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
4
5Upstream-Status: Pending
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7
8--- sysvinit-3.04/src/sulogin.c.orig 2022-08-07 23:07:42.952576274 +0200
9+++ sysvinit-3.04/src/sulogin.c 2022-08-07 23:08:26.511470983 +0200
10@@ -51,7 +51,6 @@
11 #ifdef __linux__
12 # include <sys/statfs.h>
13 # include <sys/mount.h>
14-# include <linux/fs.h>
15 # include <linux/magic.h>
16 # include <linux/major.h>
17 # ifndef TMPFS_MAGIC
diff --git a/meta/recipes-core/sysvinit/sysvinit_3.04.bb b/meta/recipes-core/sysvinit/sysvinit_3.14.bb
index 6a612468f3..d4bb797624 100644
--- a/meta/recipes-core/sysvinit/sysvinit_3.04.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_3.14.bb
@@ -9,25 +9,20 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
9 9
10RDEPENDS:${PN} = "${PN}-inittab" 10RDEPENDS:${PN} = "${PN}-inittab"
11 11
12SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \ 12GITHUB_BASE_URI = "https://github.com/slicer69/${BPN}/releases/"
13 file://install.patch \ 13SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.xz \
14 file://crypt-lib.patch \ 14 file://crypt-lib.patch \
15 file://pidof-add-m-option.patch \
16 file://realpath.patch \
17 file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \
18 file://sysvinit_remove_linux_fs.patch \
19 file://rcS-default \ 15 file://rcS-default \
20 file://rc \ 16 file://rc \
21 file://rcS \ 17 file://rcS \
22 file://bootlogd.init \ 18 file://bootlogd.init \
23 file://01_bootlogd \ 19 file://01_bootlogd \
24 file://0001-hddown-include-libgen.h-for-basename-API.patch \
25 " 20 "
26SRC_URI[sha256sum] = "2a621fe6e4528bc91308b74867ddaaebbdf7753f02395c0c5bae817bd2b7e3a5" 21SRC_URI[sha256sum] = "c90874b8c054a35991fb8c4d30c443ed1e9b1815ff6165c7b483f558be4e4b53"
27 22
28S = "${WORKDIR}/sysvinit-${PV}" 23S = "${UNPACKDIR}/sysvinit-${PV}"
29 24
30inherit update-alternatives features_check 25inherit update-alternatives features_check github-releases
31DEPENDS:append = " update-rc.d-native base-passwd virtual/crypt" 26DEPENDS:append = " update-rc.d-native base-passwd virtual/crypt"
32do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot" 27do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot"
33 28
@@ -97,18 +92,18 @@ do_install () {
97 92
98 sed -e \ 93 sed -e \
99 's:#PSPLASH_TEXT#:${@bb.utils.contains("PACKAGECONFIG","psplash-text-updates","yes","no", d)}:g' \ 94 's:#PSPLASH_TEXT#:${@bb.utils.contains("PACKAGECONFIG","psplash-text-updates","yes","no", d)}:g' \
100 ${WORKDIR}/rcS-default > ${D}${sysconfdir}/default/rcS 95 ${UNPACKDIR}/rcS-default > ${D}${sysconfdir}/default/rcS
101 chmod 0644 ${D}${sysconfdir}/default/rcS 96 chmod 0644 ${D}${sysconfdir}/default/rcS
102 install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d 97 install -m 0755 ${UNPACKDIR}/rc ${D}${sysconfdir}/init.d
103 install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d 98 install -m 0755 ${UNPACKDIR}/rcS ${D}${sysconfdir}/init.d
104 install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd 99 install -m 0755 ${UNPACKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd
105 ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd 100 ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd
106 101
107 update-rc.d -r ${D} bootlogd start 07 S . 102 update-rc.d -r ${D} bootlogd start 07 S .
108 update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 . 103 update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 .
109 104
110 install -d ${D}${sysconfdir}/default/volatiles 105 install -d ${D}${sysconfdir}/default/volatiles
111 install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles 106 install -m 0644 ${UNPACKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles
112 107
113 chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown 108 chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
114 chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown 109 chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown