diff options
Diffstat (limited to 'meta/recipes-core/sysvinit')
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit-inittab/start_getty | 45 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 60 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch | 38 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch | 16 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/install.patch | 9 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch | 38 | ||||
-rwxr-xr-x | meta/recipes-core/sysvinit/sysvinit/rc | 16 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/rcS-default | 7 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/realpath.patch | 2 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch | 17 | ||||
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit_3.04.bb (renamed from meta/recipes-core/sysvinit/sysvinit_2.96.bb) | 45 |
11 files changed, 151 insertions, 142 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty index 96fd6cfcfd..f5671ee53d 100644 --- a/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty +++ b/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty @@ -1,17 +1,8 @@ #!/bin/sh -############################################################################### -# This script is used to automatically set up the serial console(s) on startup. -# The variable SERIAL_CONSOLES can be set in meta/conf/machine/*.conf. -# Script enhancement has been done based on Bug YOCTO #10844. -# Most of the information is retrieved from /proc virtual filesystem containing -# all the runtime system information (eg. system memory, device mount, etc). -############################################################################### -# Get active serial filename. -active_serial=$(grep "serial" /proc/tty/drivers | cut -d/ -f1 | sed "s/ *$//") - -# Rephrase input parameter from ttyS target index (ttyS1, ttyS2, ttyAMA0, etc). -runtime_tty=$(echo $2 | grep -oh '[0-9]') +SPEED=$1 +DEVICE=$2 +TERM=$3 # busybox' getty does this itself, util-linux' agetty needs extra help getty="/sbin/getty" @@ -22,34 +13,8 @@ case $(readlink -f "${getty}") in if [ -x "/usr/bin/setsid" ] ; then setsid="/usr/bin/setsid" fi + options="" ;; esac -# Backup $IFS. -DEFAULT_IFS=$IFS -# Customize Internal Field Separator. -IFS="$(printf '\n\t')" - -for line in $active_serial; do - # Check we have the file containing current active serial target index. - if [ -e "/proc/tty/driver/$line" ] - then - # Remove all unknown entries and discard the first line (desc). - activetty=$(grep -v "unknown" "/proc/tty/driver/$line" \ - | tail -n +2 | grep -oh "^\s*\S*[0-9]") - for active in $activetty; do - # If indexes do match then enable the serial console. - if [ $active -eq $runtime_tty ] - then - if [ -c /dev/$2 ] - then - ${setsid:-} ${getty} -L $1 $2 $3 - fi - break - fi - done - fi -done - -# Restore $IFS. -IFS=$DEFAULT_IFS +${setsid:-} ${getty} ${options:-} -L $SPEED $DEVICE $TERM diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb index 8781492d47..6ff2ca1bf4 100644 --- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -1,13 +1,13 @@ SUMMARY = "Inittab configuration for SysVinit" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" -PR = "r10" SRC_URI = "file://inittab \ file://start_getty" -S = "${WORKDIR}" +S = "${WORKDIR}/sources" +UNPACKDIR = "${S}" INHIBIT_DEFAULT_DEPS = "1" @@ -17,19 +17,19 @@ do_compile() { do_install() { install -d ${D}${sysconfdir} - install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + install -m 0644 ${S}/inittab ${D}${sysconfdir}/inittab install -d ${D}${base_bindir} - install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty + install -m 0755 ${S}/start_getty ${D}${base_bindir}/start_getty sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty - set -x - tmp="${SERIAL_CONSOLES}" - for i in $tmp + CONSOLES="${SERIAL_CONSOLES}" + for s in $CONSOLES do - j=`echo ${i} | sed s/\;/\ /g` - l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'` - label=`echo $l | sed 's/.*\(....\)/\1/'` - echo "$label:12345:respawn:${base_bindir}/start_getty ${j} vt102" >> ${D}${sysconfdir}/inittab + speed=$(echo $s | cut -d\; -f 1) + device=$(echo $s | cut -d\; -f 2) + label=$(echo $device | sed -e 's/tty//' | tail --bytes=5) + + echo "$label:12345:respawn:${sbindir}/ttyrun $device ${base_bindir}/start_getty $speed $device vt102" >> ${D}${sysconfdir}/inittab done if [ "${USE_VT}" = "1" ]; then @@ -53,41 +53,15 @@ EOF fi } -pkg_postinst_${PN} () { -# run this on host and on target -if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then - exit 0 -fi -} - -pkg_postinst_ontarget_${PN} () { -# run this on the target -if [ -e /proc/consoles ]; then - tmp="${SERIAL_CONSOLES_CHECK}" - for i in $tmp - do - j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g` - k=`echo ${i} | sed s/^.*\://g` - if [ -z "`grep ${j} /proc/consoles`" ]; then - if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then - sed -i -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab - fi - fi - done - kill -HUP 1 -else - exit 1 -fi -} - # USE_VT and SERIAL_CONSOLES are generally defined by the MACHINE .conf. # Set PACKAGE_ARCH appropriately. PACKAGE_ARCH = "${MACHINE_ARCH}" -FILES_${PN} = "${sysconfdir}/inittab ${base_bindir}/start_getty" -CONFFILES_${PN} = "${sysconfdir}/inittab" +FILES:${PN} = "${sysconfdir}/inittab ${base_bindir}/start_getty" +CONFFILES:${PN} = "${sysconfdir}/inittab" USE_VT ?= "1" SYSVINIT_ENABLED_GETTYS ?= "1" -RCONFLICTS_${PN} = "busybox-inittab" +RDEPENDS:${PN} = "ttyrun" +RCONFLICTS:${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 @@ +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/crypt-lib.patch b/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch index bd4444b81b..5c39fb001b 100644 --- a/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch +++ b/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch @@ -1,4 +1,4 @@ -From 7276275d9a08d5ae268fb263027bbc60bc0ab2e8 Mon Sep 17 00:00:00 2001 +From c3a068cf24a22bea7349849ec111ae8d91a54db4 Mon Sep 17 00:00:00 2001 From: Jeff Dike <jdike@x86_64.user-mode-linux.org> Date: Wed, 14 Jul 2010 14:35:52 -0400 Subject: [PATCH] sysvinit - Remove sulogin dependency on /usr/lib*/libcrypt.a @@ -11,24 +11,26 @@ Upstream-Status: Inappropriate [configuration] # - jdike@linux.intel.com --- - src/Makefile | 9 ++------- - 1 file changed, 2 insertions(+), 7 deletions(-) + src/Makefile | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Makefile b/src/Makefile -index 1380d7f..628e77f 100644 +index 5b1a5a2..b686394 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -97,13 +97,8 @@ else +@@ -97,15 +97,8 @@ else endif # Additional libs for GNU libc. --ifneq ($(wildcard /usr/lib*/libcrypt.*),) +-ifneq ($(wildcard $(ROOT)/usr/lib*/libcrypt.*),) - SULOGINLIBS += -lcrypt -endif - -# Additional libs for GNU libc / multiarch on Debian based systems. --ifneq ($(wildcard /usr/lib/*/libcrypt.*),) +-ifneq ($(wildcard $(ROOT)/usr/lib/*/libcrypt.*),) +-ifneq ($(findstring -lcrypt, $(SULOGINLIBS)), -lcrypt) - SULOGINLIBS += -lcrypt +-endif +ifneq ($(LCRYPT),) + SULOGINLIBS += $(LCRYPT) endif diff --git a/meta/recipes-core/sysvinit/sysvinit/install.patch b/meta/recipes-core/sysvinit/sysvinit/install.patch index 2930fb0195..bc6d493c2b 100644 --- a/meta/recipes-core/sysvinit/sysvinit/install.patch +++ b/meta/recipes-core/sysvinit/sysvinit/install.patch @@ -1,16 +1,16 @@ -From b6cc66ab245ceb6bca0116dff7a41f6d7677b96a Mon Sep 17 00:00:00 2001 +From 5e35aa105e7a2e85db2a89fee4114090b1ac55be Mon Sep 17 00:00:00 2001 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 +++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/src/Makefile b/src/Makefile -index 9f9f09e..1380d7f 100644 +index 1b368dc..5b1a5a2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -77,7 +77,14 @@ else @@ -29,7 +29,7 @@ index 9f9f09e..1380d7f 100644 ifeq ($(WITH_SELINUX),yes) SELINUX_DEF = -DWITH_SELINUX -@@ -189,42 +196,42 @@ clobber: cleanobjs +@@ -191,43 +198,43 @@ clobber: cleanobjs distclean: clobber install: all @@ -50,6 +50,7 @@ index 9f9f09e..1380d7f 100644 + $(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \ done # $(INSTALL_DIR) $(ROOT)/etc/ + $(INSTALL_DIR) $(ROOT)/etc/inittab.d # $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/ - ln -sf halt $(ROOT)/sbin/reboot - ln -sf halt $(ROOT)/sbin/poweroff 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/rc b/meta/recipes-core/sysvinit/sysvinit/rc index 7ca41ae1ae..41196ec90b 100755 --- a/meta/recipes-core/sysvinit/sysvinit/rc +++ b/meta/recipes-core/sysvinit/sysvinit/rc @@ -17,6 +17,7 @@ . /etc/default/rcS export VERBOSE +export PSPLASH_FIFO_DIR startup_progress() { step=$(($step + $step_change)) @@ -26,11 +27,8 @@ startup_progress() { progress=$progress_size fi #echo "PROGRESS is $progress $runlevel $first_step + ($step of $num_steps) $step_change $progress_size" - #if type psplash-write >/dev/null 2>&1; then - # TMPDIR=/mnt/.psplash psplash-write "PROGRESS $progress" || true - #fi - if [ -e /mnt/.psplash/psplash_fifo ]; then - echo "PROGRESS $progress" > /mnt/.psplash/psplash_fifo + if type psplash-write >/dev/null 2>&1; then + psplash-write "PROGRESS $progress" || true fi } @@ -66,7 +64,7 @@ startup() { stty onlcr 0>&1 # Limit stack size for startup scripts - [ "$STACK_SIZE" == "" ] || ulimit -S -s $STACK_SIZE + [ "$STACK_SIZE" = "" ] || ulimit -S -s $STACK_SIZE # Now find out what the current and what the previous runlevel are. @@ -162,6 +160,9 @@ startup() { # [ -f $previous_start ] && [ ! -f $stop ] && continue fi + if [ x"${PSPLASH_TEXT_UPDATES}" = x"yes" ]; then + psplash-write "MSG $(basename $i .sh | cut -c 4-)" || true + fi case "$runlevel" in 0|6) startup $i stop @@ -176,7 +177,6 @@ startup() { #Uncomment to cause psplash to exit manually, otherwise it exits when it sees a VC switch if [ "x$runlevel" != "xS" ] && [ ! -x /etc/rc${runlevel}.d/S??xserver-nodm ]; then if type psplash-write >/dev/null 2>&1; then - TMPDIR=/mnt/.psplash psplash-write "QUIT" || true - umount -l /mnt/.psplash + psplash-write "QUIT" || true fi fi diff --git a/meta/recipes-core/sysvinit/sysvinit/rcS-default b/meta/recipes-core/sysvinit/sysvinit/rcS-default index 709cdf6ec5..f7c4a2f841 100644 --- a/meta/recipes-core/sysvinit/sysvinit/rcS-default +++ b/meta/recipes-core/sysvinit/sysvinit/rcS-default @@ -27,3 +27,10 @@ VOLATILE_ENABLE_CACHE=yes # Setting ROOTFS_READ_ONLY to yes and rebooting will give you a read-only rootfs. # Normally you should not change this value. ROOTFS_READ_ONLY=no +# rcS is also used when using busybox init and shares initscripts, some initscripts +# need to have specific behavior depending on init system +INIT_SYSTEM=sysvinit +# set the psplash fifo directory +PSPLASH_FIFO_DIR=/mnt +# psplash textual updates knob +PSPLASH_TEXT_UPDATES=#PSPLASH_TEXT# 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 diff --git a/meta/recipes-core/sysvinit/sysvinit_2.96.bb b/meta/recipes-core/sysvinit/sysvinit_3.04.bb index d2b85ed9c0..fb9d00891c 100644 --- a/meta/recipes-core/sysvinit/sysvinit_2.96.bb +++ b/meta/recipes-core/sysvinit/sysvinit_3.04.bb @@ -2,12 +2,12 @@ SUMMARY = "System-V like init" DESCRIPTION = "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." HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/" SECTION = "base" -LICENSE = "GPLv2+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \ " -RDEPENDS_${PN} = "${PN}-inittab" +RDEPENDS:${PN} = "${PN}-inittab" SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \ file://install.patch \ @@ -15,25 +15,27 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \ file://pidof-add-m-option.patch \ file://realpath.patch \ file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \ + file://sysvinit_remove_linux_fs.patch \ file://rcS-default \ file://rc \ file://rcS \ file://bootlogd.init \ file://01_bootlogd \ + file://0001-hddown-include-libgen.h-for-basename-API.patch \ " -SRC_URI[md5sum] = "48cebffebf2a96ab09bec14bf9976016" -SRC_URI[sha256sum] = "2a2e26b72aa235a23ab1c8471005f890309ce1196c83fbc9413c57b9ab62b587" +SRC_URI[sha256sum] = "2a621fe6e4528bc91308b74867ddaaebbdf7753f02395c0c5bae817bd2b7e3a5" S = "${WORKDIR}/sysvinit-${PV}" -B = "${S}/src" inherit update-alternatives features_check -DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt" +DEPENDS:append = " update-rc.d-native base-passwd virtual/crypt" do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot" +PACKAGECONFIG[psplash-text-updates] = ",," + REQUIRED_DISTRO_FEATURES = "sysvinit" -ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall" +ALTERNATIVE:${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall" ALTERNATIVE_PRIORITY = "200" @@ -49,13 +51,13 @@ ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" -ALTERNATIVE_${PN}-pidof = "pidof" +ALTERNATIVE:${PN}-pidof = "pidof" ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof" -ALTERNATIVE_${PN}-sulogin = "sulogin" +ALTERNATIVE:${PN}-sulogin = "sulogin" ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" -ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1" +ALTERNATIVE:${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1" ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" @@ -66,13 +68,13 @@ ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" PACKAGES =+ "sysvinit-pidof sysvinit-sulogin" -FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" -FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5" -FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit" +FILES:${PN} += "${base_sbindir}/* ${base_bindir}/*" +FILES:sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5" +FILES:sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit" -RDEPENDS_${PN} += "sysvinit-pidof initd-functions base-passwd" +RDEPENDS:${PN} += "sysvinit-pidof initd-functions base-passwd" -CFLAGS_prepend = "-D_GNU_SOURCE " +CFLAGS:prepend = "-D_GNU_SOURCE " export LCRYPT = "-lcrypt" EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \ 'base_sbindir=${base_sbindir}' \ @@ -93,17 +95,20 @@ do_install () { install -d ${D}${sysconfdir}/rc$level.d done - install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS - install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd + sed -e \ + 's:#PSPLASH_TEXT#:${@bb.utils.contains("PACKAGECONFIG","psplash-text-updates","yes","no", d)}:g' \ + ${UNPACKDIR}/rcS-default > ${D}${sysconfdir}/default/rcS + chmod 0644 ${D}${sysconfdir}/default/rcS + install -m 0755 ${UNPACKDIR}/rc ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/rcS ${D}${sysconfdir}/init.d + install -m 0755 ${UNPACKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd update-rc.d -r ${D} bootlogd start 07 S . update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 . install -d ${D}${sysconfdir}/default/volatiles - install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles + install -m 0644 ${UNPACKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown |