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/start_getty45
-rw-r--r--meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb51
-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/install.patch2
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch38
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/realpath.patch2
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch17
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_3.04.bb (renamed from meta/recipes-core/sysvinit/sysvinit_2.99.bb)28
8 files changed, 108 insertions, 113 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
index dfa799adac..f5671ee53d 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
@@ -1,17 +1,8 @@
1#!/bin/sh 1#!/bin/sh
2###############################################################################
3# This script is used to automatically set up the serial console(s) on startup.
4# The variable SERIAL_CONSOLES can be set in meta/conf/machine/*.conf.
5# Script enhancement has been done based on Bug YOCTO #10844.
6# Most of the information is retrieved from /proc virtual filesystem containing
7# all the runtime system information (eg. system memory, device mount, etc).
8###############################################################################
9 2
10# Get active serial filename. 3SPEED=$1
11active_serial=$(grep "serial" /proc/tty/drivers | cut -d/ -f1 | sed "s/ *$//") 4DEVICE=$2
12 5TERM=$3
13# Rephrase input parameter from ttyS target index (ttyS1, ttyS2, ttyAMA0, etc).
14runtime_tty=$(echo $2 | grep -oh '[0-9]\+')
15 6
16# busybox' getty does this itself, util-linux' agetty needs extra help 7# busybox' getty does this itself, util-linux' agetty needs extra help
17getty="/sbin/getty" 8getty="/sbin/getty"
@@ -22,34 +13,8 @@ case $(readlink -f "${getty}") in
22 if [ -x "/usr/bin/setsid" ] ; then 13 if [ -x "/usr/bin/setsid" ] ; then
23 setsid="/usr/bin/setsid" 14 setsid="/usr/bin/setsid"
24 fi 15 fi
16 options=""
25 ;; 17 ;;
26esac 18esac
27 19
28# Backup $IFS. 20${setsid:-} ${getty} ${options:-} -L $SPEED $DEVICE $TERM
29DEFAULT_IFS=$IFS
30# Customize Internal Field Separator.
31IFS="$(printf '\n\t')"
32
33for line in $active_serial; do
34 # Check we have the file containing current active serial target index.
35 if [ -e "/proc/tty/driver/$line" ]
36 then
37 # Remove all unknown entries and discard the first line (desc).
38 activetty=$(grep -v "unknown" "/proc/tty/driver/$line" \
39 | tail -n +2 | grep -oh "^\s*\S*[0-9]\+")
40 for active in $activetty; do
41 # If indexes do match then enable the serial console.
42 if [ $active -eq $runtime_tty ]
43 then
44 if [ -c /dev/$2 ]
45 then
46 ${setsid:-} ${getty} -L $1 $2 $3
47 fi
48 break
49 fi
50 done
51 fi
52done
53
54# Restore $IFS.
55IFS=$DEFAULT_IFS
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index d95d1a63f5..6bbe517df1 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -1,8 +1,7 @@
1SUMMARY = "Inittab configuration for SysVinit" 1SUMMARY = "Inittab configuration for SysVinit"
2LICENSE = "GPLv2" 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
5PR = "r10"
6 5
7SRC_URI = "file://inittab \ 6SRC_URI = "file://inittab \
8 file://start_getty" 7 file://start_getty"
@@ -22,14 +21,14 @@ do_install() {
22 install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty 21 install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty
23 sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty 22 sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty
24 23
25 set -x 24 CONSOLES="${SERIAL_CONSOLES}"
26 tmp="${SERIAL_CONSOLES}" 25 for s in $CONSOLES
27 for i in $tmp
28 do 26 do
29 j=`echo ${i} | sed s/\;/\ /g` 27 speed=$(echo $s | cut -d\; -f 1)
30 l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'` 28 device=$(echo $s | cut -d\; -f 2)
31 label=`echo $l | sed 's/.*\(....\)/\1/'` 29 label=$(echo $device | sed -e 's/tty//' | tail --bytes=5)
32 echo "$label:12345:respawn:${base_bindir}/start_getty ${j} vt102" >> ${D}${sysconfdir}/inittab 30
31 echo "$label:12345:respawn:${sbindir}/ttyrun $device ${base_bindir}/start_getty $speed $device vt102" >> ${D}${sysconfdir}/inittab
33 done 32 done
34 33
35 if [ "${USE_VT}" = "1" ]; then 34 if [ "${USE_VT}" = "1" ]; then
@@ -53,41 +52,15 @@ EOF
53 fi 52 fi
54} 53}
55 54
56pkg_postinst_${PN} () {
57# run this on host and on target
58if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then
59 exit 0
60fi
61}
62
63pkg_postinst_ontarget_${PN} () {
64# run this on the target
65if [ -e /proc/consoles ]; then
66 tmp="${SERIAL_CONSOLES_CHECK}"
67 for i in $tmp
68 do
69 j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g`
70 k=`echo ${i} | sed s/^.*\://g`
71 if [ -z "`grep ${j} /proc/consoles`" ]; then
72 if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then
73 sed -i -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab
74 fi
75 fi
76 done
77 kill -HUP 1
78else
79 exit 1
80fi
81}
82
83# USE_VT and SERIAL_CONSOLES are generally defined by the MACHINE .conf. 55# USE_VT and SERIAL_CONSOLES are generally defined by the MACHINE .conf.
84# Set PACKAGE_ARCH appropriately. 56# Set PACKAGE_ARCH appropriately.
85PACKAGE_ARCH = "${MACHINE_ARCH}" 57PACKAGE_ARCH = "${MACHINE_ARCH}"
86 58
87FILES_${PN} = "${sysconfdir}/inittab ${base_bindir}/start_getty" 59FILES:${PN} = "${sysconfdir}/inittab ${base_bindir}/start_getty"
88CONFFILES_${PN} = "${sysconfdir}/inittab" 60CONFFILES:${PN} = "${sysconfdir}/inittab"
89 61
90USE_VT ?= "1" 62USE_VT ?= "1"
91SYSVINIT_ENABLED_GETTYS ?= "1" 63SYSVINIT_ENABLED_GETTYS ?= "1"
92 64
93RCONFLICTS_${PN} = "busybox-inittab" 65RDEPENDS:${PN} = "ttyrun"
66RCONFLICTS:${PN} = "busybox-inittab"
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 @@
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/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>
3Date: Fri, 18 Jun 2010 09:40:30 +0800 3Date: Fri, 18 Jun 2010 09:40:30 +0800
4Subject: [PATCH] sysvinit: upgrade to version 2.88dsf 4Subject: [PATCH] sysvinit: upgrade to version 2.88dsf
5 5
6Upstream-Status: Pending 6Upstream-Status: Submitted [https://github.com/slicer69/sysvinit/pull/13]
7 7
8--- 8---
9 src/Makefile | 53 +++++++++++++++++++++++++++++----------------------- 9 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 @@
1From 6c490ea6579a132fabb7dbd25387bb521f820371 Mon Sep 17 00:00:00 2001 1From 0e441712d0e366a0384ff3fa879f5a2d2607c24f Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 24 Jul 2013 17:07:22 +0800 3Date: Wed, 24 Jul 2013 17:07:22 +0800
4Subject: [PATCH] pidof: add -m option 4Subject: [PATCH] pidof: add -m option
@@ -10,7 +10,7 @@ each other's pids.
10 10
11https://bugzilla.redhat.com/show_bug.cgi?id=883856 11https://bugzilla.redhat.com/show_bug.cgi?id=883856
12 12
13Upstream-Status: backport 13Upstream-Status: Backport
14Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166 14Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166
15 15
16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
@@ -21,10 +21,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
21 2 files changed, 65 insertions(+), 3 deletions(-) 21 2 files changed, 65 insertions(+), 3 deletions(-)
22 22
23diff --git a/man/pidof.8 b/man/pidof.8 23diff --git a/man/pidof.8 b/man/pidof.8
24index ebe5f55..2fdc4d3 100644 24index 6866cb3..a87d878 100644
25--- a/man/pidof.8 25--- a/man/pidof.8
26+++ b/man/pidof.8 26+++ b/man/pidof.8
27@@ -25,6 +25,7 @@ pidof -- find the process ID of a running program. 27@@ -25,6 +25,7 @@ pidof - find the process ID of a running program
28 .RB [ \-n ] 28 .RB [ \-n ]
29 .RB [ \-x ] 29 .RB [ \-x ]
30 .RB [ \-z ] 30 .RB [ \-z ]
@@ -32,9 +32,9 @@ index ebe5f55..2fdc4d3 100644
32 .RB [ \-o 32 .RB [ \-o
33 .IR omitpid[,omitpid...] ] 33 .IR omitpid[,omitpid...] ]
34 .RB [ \-o 34 .RB [ \-o
35@@ -76,6 +77,11 @@ is shown. The default separator is a space. 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 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 \fIpidof\fP 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. 38 program, in other words the calling shell or shell script.
39+.IP -m 39+.IP -m
40+When used with -o, will also omit any processes that have the same 40+When used with -o, will also omit any processes that have the same
@@ -45,10 +45,10 @@ index ebe5f55..2fdc4d3 100644
45 .TP 45 .TP
46 .B 0 46 .B 0
47diff --git a/src/killall5.c b/src/killall5.c 47diff --git a/src/killall5.c b/src/killall5.c
48index 8b5cb38..a664954 100644 48index b0728fa..72289e3 100644
49--- a/src/killall5.c 49--- a/src/killall5.c
50+++ b/src/killall5.c 50+++ b/src/killall5.c
51@@ -126,6 +126,7 @@ typedef struct _s_nfs 51@@ -121,6 +121,7 @@ typedef struct _s_nfs
52 52
53 /* List of processes. */ 53 /* List of processes. */
54 PROC *plist; 54 PROC *plist;
@@ -56,7 +56,7 @@ index 8b5cb38..a664954 100644
56 56
57 /* List of processes to omit. */ 57 /* List of processes to omit. */
58 OMIT *omit; 58 OMIT *omit;
59@@ -361,6 +362,20 @@ static void clear_mnt(void) 59@@ -356,6 +357,20 @@ static void clear_mnt(void)
60 } 60 }
61 } 61 }
62 62
@@ -77,15 +77,15 @@ index 8b5cb38..a664954 100644
77 /* 77 /*
78 * Check if path is a shadow off a NFS partition. 78 * Check if path is a shadow off a NFS partition.
79 */ 79 */
80@@ -486,6 +501,7 @@ int readproc(int do_stat) 80@@ -481,6 +496,7 @@ int readproc()
81 DIR *dir; 81 DIR *dir;
82 FILE *fp; 82 FILE *fp;
83 PROC *p, *n; 83 PROC *p, *n;
84+ OMIT *o, *m; 84+ OMIT *o, *m;
85 struct dirent *d; 85 struct dirent *d;
86 struct stat st;
87 char path[PATH_MAX+1]; 86 char path[PATH_MAX+1];
88@@ -733,6 +749,17 @@ int readproc(int do_stat) 87 char buf[PATH_MAX+1];
88@@ -670,6 +686,17 @@ int readproc()
89 p->next = plist; 89 p->next = plist;
90 plist = p; 90 plist = p;
91 p->pid = pid; 91 p->pid = pid;
@@ -103,7 +103,7 @@ index 8b5cb38..a664954 100644
103 } 103 }
104 closedir(dir); 104 closedir(dir);
105 105
106@@ -944,6 +971,26 @@ PIDQ_HEAD *pidof(char *prog) 106@@ -870,6 +897,26 @@ PIDQ_HEAD *pidof(char *prog)
107 return q; 107 return q;
108 } 108 }
109 109
@@ -130,7 +130,7 @@ index 8b5cb38..a664954 100644
130 /* Give usage message and exit. */ 130 /* Give usage message and exit. */
131 void usage(void) 131 void usage(void)
132 { 132 {
133@@ -994,6 +1041,7 @@ void nsyslog(int pri, char *fmt, ...) 133@@ -920,6 +967,7 @@ void nsyslog(int pri, char *fmt, ...)
134 #define PIDOF_OMIT 0x02 134 #define PIDOF_OMIT 0x02
135 #define PIDOF_NETFS 0x04 135 #define PIDOF_NETFS 0x04
136 #define PIDOF_QUIET 0x08 136 #define PIDOF_QUIET 0x08
@@ -138,7 +138,7 @@ index 8b5cb38..a664954 100644
138 138
139 /* 139 /*
140 * Pidof functionality. 140 * Pidof functionality.
141@@ -1011,6 +1059,7 @@ int main_pidof(int argc, char **argv) 141@@ -937,6 +985,7 @@ int main_pidof(int argc, char **argv)
142 char tmp[512]; 142 char tmp[512];
143 char sep = ' '; 143 char sep = ' ';
144 144
@@ -146,7 +146,7 @@ index 8b5cb38..a664954 100644
146 omit = (OMIT*)0; 146 omit = (OMIT*)0;
147 nlist = (NFS*)0; 147 nlist = (NFS*)0;
148 opterr = 0; 148 opterr = 0;
149@@ -1018,7 +1067,7 @@ int main_pidof(int argc, char **argv) 149@@ -944,7 +993,7 @@ int main_pidof(int argc, char **argv)
150 if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0)) 150 if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0))
151 flags |= PIDOF_NETFS; 151 flags |= PIDOF_NETFS;
152 152
@@ -155,7 +155,7 @@ index 8b5cb38..a664954 100644
155 case '?': 155 case '?':
156 nsyslog(LOG_ERR,"invalid options on command line!\n"); 156 nsyslog(LOG_ERR,"invalid options on command line!\n");
157 closelog(); 157 closelog();
158@@ -1069,6 +1118,9 @@ int main_pidof(int argc, char **argv) 158@@ -995,6 +1044,9 @@ int main_pidof(int argc, char **argv)
159 case 'z': 159 case 'z':
160 list_dz_processes = TRUE; 160 list_dz_processes = TRUE;
161 break; 161 break;
@@ -165,7 +165,7 @@ index 8b5cb38..a664954 100644
165 case 'n': 165 case 'n':
166 flags |= PIDOF_NETFS; 166 flags |= PIDOF_NETFS;
167 break; 167 break;
168@@ -1100,10 +1152,13 @@ int main_pidof(int argc, char **argv) 168@@ -1026,10 +1078,13 @@ int main_pidof(int argc, char **argv)
169 pid_t spid = 0; 169 pid_t spid = 0;
170 while ((p = get_next_from_pid_q(q))) { 170 while ((p = get_next_from_pid_q(q))) {
171 if ((flags & PIDOF_OMIT) && omit) { 171 if ((flags & PIDOF_OMIT) && omit) {
@@ -181,7 +181,7 @@ index 8b5cb38..a664954 100644
181 } 181 }
182 182
183 /* 183 /*
184@@ -1145,6 +1200,7 @@ int main_pidof(int argc, char **argv) 184@@ -1071,6 +1126,7 @@ int main_pidof(int argc, char **argv)
185 printf("\n"); 185 printf("\n");
186 } 186 }
187 187
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
7realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd 7realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd
8However for Linux it should always work 8However for Linux it should always work
9 9
10Upstream-Status: Inappropriate[Linux specific] 10Upstream-Status: Inappropriate [Linux specific]
11 11
12Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13 13
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 @@
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_2.99.bb b/meta/recipes-core/sysvinit/sysvinit_3.04.bb
index e39f22a8bb..6a612468f3 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.99.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_3.04.bb
@@ -2,12 +2,12 @@ SUMMARY = "System-V like init"
2DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts." 2DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts."
3HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/" 3HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/"
4SECTION = "base" 4SECTION = "base"
5LICENSE = "GPLv2+" 5LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
7 file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \ 7 file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \
8 " 8 "
9 9
10RDEPENDS_${PN} = "${PN}-inittab" 10RDEPENDS:${PN} = "${PN}-inittab"
11 11
12SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \ 12SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \
13 file://install.patch \ 13 file://install.patch \
@@ -15,25 +15,27 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \
15 file://pidof-add-m-option.patch \ 15 file://pidof-add-m-option.patch \
16 file://realpath.patch \ 16 file://realpath.patch \
17 file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \ 17 file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \
18 file://sysvinit_remove_linux_fs.patch \
18 file://rcS-default \ 19 file://rcS-default \
19 file://rc \ 20 file://rc \
20 file://rcS \ 21 file://rcS \
21 file://bootlogd.init \ 22 file://bootlogd.init \
22 file://01_bootlogd \ 23 file://01_bootlogd \
24 file://0001-hddown-include-libgen.h-for-basename-API.patch \
23 " 25 "
24SRC_URI[sha256sum] = "b05c3677bb698afe64c997968b00c49b2a9bd320ce963523230ee7ea41197757" 26SRC_URI[sha256sum] = "2a621fe6e4528bc91308b74867ddaaebbdf7753f02395c0c5bae817bd2b7e3a5"
25 27
26S = "${WORKDIR}/sysvinit-${PV}" 28S = "${WORKDIR}/sysvinit-${PV}"
27 29
28inherit update-alternatives features_check 30inherit update-alternatives features_check
29DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt" 31DEPENDS:append = " update-rc.d-native base-passwd virtual/crypt"
30do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot" 32do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot"
31 33
32PACKAGECONFIG[psplash-text-updates] = ",," 34PACKAGECONFIG[psplash-text-updates] = ",,"
33 35
34REQUIRED_DISTRO_FEATURES = "sysvinit" 36REQUIRED_DISTRO_FEATURES = "sysvinit"
35 37
36ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall" 38ALTERNATIVE:${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall"
37 39
38ALTERNATIVE_PRIORITY = "200" 40ALTERNATIVE_PRIORITY = "200"
39 41
@@ -49,13 +51,13 @@ ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
49ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" 51ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
50ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" 52ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
51 53
52ALTERNATIVE_${PN}-pidof = "pidof" 54ALTERNATIVE:${PN}-pidof = "pidof"
53ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof" 55ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof"
54 56
55ALTERNATIVE_${PN}-sulogin = "sulogin" 57ALTERNATIVE:${PN}-sulogin = "sulogin"
56ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" 58ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
57 59
58ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1" 60ALTERNATIVE:${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
59 61
60ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" 62ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
61ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" 63ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
@@ -66,13 +68,13 @@ ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
66ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" 68ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
67 69
68PACKAGES =+ "sysvinit-pidof sysvinit-sulogin" 70PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
69FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" 71FILES:${PN} += "${base_sbindir}/* ${base_bindir}/*"
70FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5" 72FILES:sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
71FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit" 73FILES:sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit"
72 74
73RDEPENDS_${PN} += "sysvinit-pidof initd-functions base-passwd" 75RDEPENDS:${PN} += "sysvinit-pidof initd-functions base-passwd"
74 76
75CFLAGS_prepend = "-D_GNU_SOURCE " 77CFLAGS:prepend = "-D_GNU_SOURCE "
76export LCRYPT = "-lcrypt" 78export LCRYPT = "-lcrypt"
77EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \ 79EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \
78 'base_sbindir=${base_sbindir}' \ 80 'base_sbindir=${base_sbindir}' \