Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# /etc/inittab: init(8) configuration.
|
||||
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
|
||||
|
||||
# The default runlevel.
|
||||
id:5:initdefault:
|
||||
|
||||
# Boot-time system configuration/initialization script.
|
||||
# This is run first except when booting in emergency (-b) mode.
|
||||
si::sysinit:/etc/init.d/rcS
|
||||
|
||||
# What to do in single-user mode.
|
||||
~~:S:wait:/sbin/sulogin
|
||||
|
||||
# /etc/init.d executes the S and K scripts upon change
|
||||
# of runlevel.
|
||||
#
|
||||
# Runlevel 0 is halt.
|
||||
# Runlevel 1 is single-user.
|
||||
# Runlevels 2-5 are multi-user.
|
||||
# Runlevel 6 is reboot.
|
||||
|
||||
l0:0:wait:/etc/init.d/rc 0
|
||||
l1:1:wait:/etc/init.d/rc 1
|
||||
l2:2:wait:/etc/init.d/rc 2
|
||||
l3:3:wait:/etc/init.d/rc 3
|
||||
l4:4:wait:/etc/init.d/rc 4
|
||||
l5:5:wait:/etc/init.d/rc 5
|
||||
l6:6:wait:/etc/init.d/rc 6
|
||||
# Normally not reached, but fallthrough in case of emergency.
|
||||
z6:6:respawn:/sbin/sulogin
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
SPEED=$1
|
||||
DEVICE=$2
|
||||
TERM=$3
|
||||
|
||||
# busybox' getty does this itself, util-linux' agetty needs extra help
|
||||
getty="/sbin/getty"
|
||||
case $(readlink -f "${getty}") in
|
||||
*/busybox*)
|
||||
;;
|
||||
*)
|
||||
if [ -x "/usr/bin/setsid" ] ; then
|
||||
setsid="/usr/bin/setsid"
|
||||
fi
|
||||
options=""
|
||||
;;
|
||||
esac
|
||||
|
||||
${setsid:-} ${getty} ${options:-} -L $SPEED $DEVICE $TERM
|
||||
@@ -0,0 +1,66 @@
|
||||
SUMMARY = "Inittab configuration for SysVinit"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
|
||||
|
||||
|
||||
SRC_URI = "file://inittab \
|
||||
file://start_getty"
|
||||
|
||||
S = "${WORKDIR}"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
|
||||
do_compile() {
|
||||
:
|
||||
}
|
||||
|
||||
do_install() {
|
||||
install -d ${D}${sysconfdir}
|
||||
install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
|
||||
install -d ${D}${base_bindir}
|
||||
install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty
|
||||
sed -e 's,/usr/bin,${bindir},g' -i ${D}${base_bindir}/start_getty
|
||||
|
||||
CONSOLES="${SERIAL_CONSOLES}"
|
||||
for s in $CONSOLES
|
||||
do
|
||||
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
|
||||
cat <<EOF >>${D}${sysconfdir}/inittab
|
||||
# ${base_sbindir}/getty invocations for the runlevels.
|
||||
#
|
||||
# The "id" field MUST be the same as the last
|
||||
# characters of the device (after "tty").
|
||||
#
|
||||
# Format:
|
||||
# <id>:<runlevels>:<action>:<process>
|
||||
#
|
||||
|
||||
EOF
|
||||
|
||||
for n in ${SYSVINIT_ENABLED_GETTYS}
|
||||
do
|
||||
echo "$n:12345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab
|
||||
done
|
||||
echo "" >> ${D}${sysconfdir}/inittab
|
||||
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"
|
||||
|
||||
USE_VT ?= "1"
|
||||
SYSVINIT_ENABLED_GETTYS ?= "1"
|
||||
|
||||
RDEPENDS:${PN} = "ttyrun"
|
||||
RCONFLICTS:${PN} = "busybox-inittab"
|
||||
@@ -0,0 +1,31 @@
|
||||
From 5be52641a10ad6cd89bc7cdb80318e32be7e6662 Mon Sep 17 00:00:00 2001
|
||||
From: Jesse <jsmith@resonatingmedia.com>
|
||||
Date: Wed, 29 Mar 2023 10:34:45 -0300
|
||||
Subject: [PATCH] Accepted patch from Mark Hindley which avoids clearing
|
||||
realpath information in pidof when trying to find matching executables.
|
||||
|
||||
Upstream-Status: Backport [https://github.com/slicer69/sysvinit/commit/c06458e1c1822a2c8ff89fbdd29262ca97dd18b1#diff-4244fa301bd80b0a8f553ce0751fb0fcde1a45ee9dee71db85135cffde8ac712R13]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
|
||||
---
|
||||
src/killall5.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/killall5.c b/src/killall5.c
|
||||
index 86866b0..f7a401e 100644
|
||||
--- a/src/killall5.c
|
||||
+++ b/src/killall5.c
|
||||
@@ -766,8 +766,8 @@ PIDQ_HEAD *pidof(char *prog)
|
||||
return NULL;
|
||||
|
||||
/* Try to stat the executable. */
|
||||
+ memset(real_path, 0, sizeof(real_path));
|
||||
if ( (prog[0] == '/') && ( realpath(prog, real_path) ) ) {
|
||||
- memset(&real_path[0], 0, sizeof(real_path));
|
||||
dostat++;
|
||||
}
|
||||
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
From c710a3accd1fabdb671274e1a458405282d51e0c Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 6 Aug 2018 15:38:58 -0700
|
||||
Subject: [PATCH] include sys/sysmacros.h for major/minor definitions
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
Upstream-Status: Pending
|
||||
|
||||
---
|
||||
src/bootlogd.c | 1 +
|
||||
src/mountpoint.c | 1 +
|
||||
src/shutdown.c | 1 +
|
||||
3 files changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/bootlogd.c b/src/bootlogd.c
|
||||
index 787db87..8b07903 100644
|
||||
--- a/src/bootlogd.c
|
||||
+++ b/src/bootlogd.c
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <time.h>
|
||||
diff --git a/src/mountpoint.c b/src/mountpoint.c
|
||||
index 5f20522..94df7a1 100644
|
||||
--- a/src/mountpoint.c
|
||||
+++ b/src/mountpoint.c
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
diff --git a/src/shutdown.c b/src/shutdown.c
|
||||
index b744a2c..40b7faf 100644
|
||||
--- a/src/shutdown.c
|
||||
+++ b/src/shutdown.c
|
||||
@@ -40,6 +40,7 @@
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <sys/wait.h>
|
||||
#ifdef __linux__
|
||||
#include <sys/sysmacros.h> /* brought in my LFS patch */
|
||||
@@ -0,0 +1 @@
|
||||
f root root 0644 /var/log/boot none
|
||||
98
sources/poky/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
Executable file
98
sources/poky/meta/recipes-core/sysvinit/sysvinit/bootlogd.init
Executable file
@@ -0,0 +1,98 @@
|
||||
#! /bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: bootlogd
|
||||
# Required-Start:
|
||||
# Required-Stop:
|
||||
# Default-Start: S
|
||||
# Default-Stop: 2 3 4 5
|
||||
# Short-Description: One of the first scripts to be executed. Starts or stops
|
||||
# the bootlogd log program. If this script is called as
|
||||
# "stop-bootlogd", it will stop the daemon instead of
|
||||
# starting it even when called with the "start" argument.
|
||||
#
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/sbin/bootlogd
|
||||
NAME=bootlogd
|
||||
DESC="Bootlog daemon"
|
||||
|
||||
# source function library
|
||||
. /etc/init.d/functions
|
||||
|
||||
test -f $DAEMON || exit 0
|
||||
|
||||
[ -r /etc/default/bootlogd ] && . /etc/default/bootlogd
|
||||
|
||||
## set -e # not needed
|
||||
|
||||
case "$BOOTLOGD_ENABLE" in
|
||||
[Nn]*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
STOPPER=
|
||||
ACTION="$1"
|
||||
case "$0" in
|
||||
*stop-bootlog*)
|
||||
STOPPER=Y
|
||||
if [ "$ACTION" = start ]
|
||||
then
|
||||
ACTION=stop
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$ACTION" in
|
||||
start)
|
||||
[ "${VERBOSE}" != "no" ] && echo -n "Starting $DESC: "
|
||||
if [ -d /proc/1/. ]
|
||||
then
|
||||
umask 027
|
||||
start-stop-daemon --start --quiet \
|
||||
--exec $DAEMON -- -r -c
|
||||
else
|
||||
$DAEMON -r -c
|
||||
fi
|
||||
[ "${VERBOSE}" != "no" ] && echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
# stop may get called during bootup, so let it honor
|
||||
# rcS VERBOSE setting
|
||||
[ "${VERBOSE}" != "no" ] && echo -n "Stopping $DESC: "
|
||||
start-stop-daemon --stop --quiet --exec $DAEMON
|
||||
|
||||
if [ "$STOPPER" ] && [ "$(which savelog 2>/dev/null)" ] && \
|
||||
[ -f /var/log/boot ] && [ -f /var/log/boot~ ]
|
||||
then
|
||||
cd /var/log
|
||||
chgrp adm boot
|
||||
savelog -p -c 5 boot > /dev/null 2>&1
|
||||
mv boot.0 boot
|
||||
mv boot~ boot.0
|
||||
fi
|
||||
|
||||
[ "${VERBOSE}" != "no" ] && echo "$NAME."
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo -n "Restarting $DESC: "
|
||||
start-stop-daemon --stop --quiet --exec $DAEMON
|
||||
sleep 1
|
||||
start-stop-daemon --start --quiet --exec $DAEMON
|
||||
echo "$NAME."
|
||||
;;
|
||||
status)
|
||||
status $DAEMON
|
||||
exit $?
|
||||
;;
|
||||
*)
|
||||
N=${0##*/}
|
||||
N=${N#[SK]??}
|
||||
echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
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
|
||||
|
||||
Upstream-Status: Inappropriate [configuration]
|
||||
|
||||
# The src Makefile was checking for libcrypt.a on the host, not in the
|
||||
# build environment. This patch checks for $LCRYPT in the environment
|
||||
# and uses it if it's there.
|
||||
# - jdike@linux.intel.com
|
||||
|
||||
---
|
||||
src/Makefile | 11 ++---------
|
||||
1 file changed, 2 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 5b1a5a2..b686394 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -97,15 +97,8 @@ else
|
||||
endif
|
||||
|
||||
# Additional libs for GNU libc.
|
||||
-ifneq ($(wildcard $(ROOT)/usr/lib*/libcrypt.*),)
|
||||
- SULOGINLIBS += -lcrypt
|
||||
-endif
|
||||
-
|
||||
-# Additional libs for GNU libc / multiarch on Debian based systems.
|
||||
-ifneq ($(wildcard $(ROOT)/usr/lib/*/libcrypt.*),)
|
||||
-ifneq ($(findstring -lcrypt, $(SULOGINLIBS)), -lcrypt)
|
||||
- SULOGINLIBS += -lcrypt
|
||||
-endif
|
||||
+ifneq ($(LCRYPT),)
|
||||
+ SULOGINLIBS += $(LCRYPT)
|
||||
endif
|
||||
|
||||
all: $(BIN) $(SBIN) $(USRBIN)
|
||||
@@ -0,0 +1,97 @@
|
||||
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: 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 1b368dc..5b1a5a2 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -77,7 +77,14 @@ else
|
||||
INSTALL_DATA = install -m 644
|
||||
endif
|
||||
INSTALL_DIR = install -m 755 -d
|
||||
-MANDIR = /usr/share/man
|
||||
+
|
||||
+ROOT ?=
|
||||
+base_bindir ?= /bin
|
||||
+base_sbindir ?= /sbin
|
||||
+bindir ?= /usr/bin
|
||||
+sysconfdir ?= /etc
|
||||
+includedir ?= /usr/include
|
||||
+mandir ?= /usr/share/man
|
||||
|
||||
ifeq ($(WITH_SELINUX),yes)
|
||||
SELINUX_DEF = -DWITH_SELINUX
|
||||
@@ -191,43 +198,43 @@ clobber: cleanobjs
|
||||
distclean: clobber
|
||||
|
||||
install: all
|
||||
- $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/
|
||||
- $(INSTALL_DIR) $(ROOT)/usr/bin/
|
||||
+ $(INSTALL_DIR) $(ROOT)$(base_bindir)/ $(ROOT)$(base_sbindir)/
|
||||
+ $(INSTALL_DIR) $(ROOT)$(bindir)/
|
||||
for i in $(BIN); do \
|
||||
- $(INSTALL_EXEC) $$i $(ROOT)/bin/ ; \
|
||||
+ $(INSTALL_EXEC) $$i $(ROOT)$(base_bindir)/ ; \
|
||||
done
|
||||
for i in $(SBIN); do \
|
||||
- $(INSTALL_EXEC) $$i $(ROOT)/sbin/ ; \
|
||||
+ $(INSTALL_EXEC) $$i $(ROOT)$(base_sbindir)/ ; \
|
||||
done
|
||||
for i in $(USRBIN); do \
|
||||
- $(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \
|
||||
+ $(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
|
||||
- ln -sf init $(ROOT)/sbin/telinit
|
||||
- ln -sf /sbin/killall5 $(ROOT)/bin/pidof
|
||||
- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
|
||||
- ln -sf last $(ROOT)/usr/bin/lastb; \
|
||||
+ ln -sf halt $(ROOT)$(base_sbindir)/reboot
|
||||
+ ln -sf halt $(ROOT)$(base_sbindir)/poweroff
|
||||
+ ln -sf init $(ROOT)$(base_sbindir)/telinit
|
||||
+ ln -sf $(base_sbindir)/killall5 $(ROOT)$(base_bindir)/pidof
|
||||
+ if [ ! -f $(ROOT)$(bindir)/lastb ]; then \
|
||||
+ ln -sf last $(ROOT)$(bindir)/lastb; \
|
||||
fi
|
||||
- $(INSTALL_DIR) $(ROOT)/usr/include/
|
||||
- $(INSTALL_DATA) initreq.h $(ROOT)/usr/include/
|
||||
- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man1/
|
||||
- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man5/
|
||||
- $(INSTALL_DIR) $(ROOT)$(MANDIR)/man8/
|
||||
+ $(INSTALL_DIR) $(ROOT)$(includedir)/
|
||||
+ $(INSTALL_DATA) initreq.h $(ROOT)$(includedir)/
|
||||
+ $(INSTALL_DIR) $(ROOT)$(mandir)/man1/
|
||||
+ $(INSTALL_DIR) $(ROOT)$(mandir)/man5/
|
||||
+ $(INSTALL_DIR) $(ROOT)$(mandir)/man8/
|
||||
for man in $(MAN1); do \
|
||||
- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man1/; \
|
||||
- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man1/$$man ; \
|
||||
+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man1/; \
|
||||
+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man1/$$man ; \
|
||||
done
|
||||
for man in $(MAN5); do \
|
||||
- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man5/; \
|
||||
- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man5/$$man ; \
|
||||
+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man5/; \
|
||||
+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man5/$$man ; \
|
||||
done
|
||||
for man in $(MAN8); do \
|
||||
- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man8/; \
|
||||
- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man8/$$man ; \
|
||||
+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man8/; \
|
||||
+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man8/$$man ; \
|
||||
done
|
||||
ifeq ($(ROOT),)
|
||||
#
|
||||
@@ -0,0 +1,191 @@
|
||||
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
|
||||
|
||||
When used with -o, will also omit any processes that have the same
|
||||
argv[0] and argv[1] as any explicitly omitted process ids. This can be
|
||||
used to avoid multiple shell scripts concurrently calling pidof returning
|
||||
each other's pids.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=883856
|
||||
|
||||
Upstream-Status: Backport
|
||||
Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166
|
||||
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
|
||||
---
|
||||
man/pidof.8 | 6 +++++
|
||||
src/killall5.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
2 files changed, 65 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/man/pidof.8 b/man/pidof.8
|
||||
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
|
||||
.RB [ \-n ]
|
||||
.RB [ \-x ]
|
||||
.RB [ \-z ]
|
||||
+.RB [ \-m ]
|
||||
.RB [ \-o
|
||||
.IR omitpid[,omitpid...] ]
|
||||
.RB [ \-o
|
||||
@@ -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 \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
|
||||
+argv[0] and argv[1] as any explicitly omitted process ids. This can be
|
||||
+used to avoid multiple shell scripts concurrently calling pidof returning
|
||||
+each other's pids.
|
||||
.SH "EXIT STATUS"
|
||||
.TP
|
||||
.B 0
|
||||
diff --git a/src/killall5.c b/src/killall5.c
|
||||
index b0728fa..72289e3 100644
|
||||
--- a/src/killall5.c
|
||||
+++ b/src/killall5.c
|
||||
@@ -121,6 +121,7 @@ typedef struct _s_nfs
|
||||
|
||||
/* List of processes. */
|
||||
PROC *plist;
|
||||
+PROC *olist;
|
||||
|
||||
/* List of processes to omit. */
|
||||
OMIT *omit;
|
||||
@@ -356,6 +357,20 @@ static void clear_mnt(void)
|
||||
}
|
||||
}
|
||||
|
||||
+static void clear_omit(void)
|
||||
+{
|
||||
+ OMIT *o;
|
||||
+ PROC *p;
|
||||
+ for (o = omit; o; o = omit) {
|
||||
+ omit = omit->next;
|
||||
+ free(o);
|
||||
+ }
|
||||
+ for (p = olist; p; p = olist) {
|
||||
+ olist = olist->next;
|
||||
+ free(p);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Check if path is a shadow off a NFS partition.
|
||||
*/
|
||||
@@ -481,6 +496,7 @@ int readproc()
|
||||
DIR *dir;
|
||||
FILE *fp;
|
||||
PROC *p, *n;
|
||||
+ OMIT *o, *m;
|
||||
struct dirent *d;
|
||||
char path[PATH_MAX+1];
|
||||
char buf[PATH_MAX+1];
|
||||
@@ -670,6 +686,17 @@ int readproc()
|
||||
p->next = plist;
|
||||
plist = p;
|
||||
p->pid = pid;
|
||||
+ /* Could be smarter, but it's a small list. */
|
||||
+ m = omit;
|
||||
+ for (o = omit; m; o = m) {
|
||||
+ m = o->next;
|
||||
+ if (o->pid == p->pid) {
|
||||
+ n = (PROC*)xmalloc(sizeof(PROC));
|
||||
+ *n = *p;
|
||||
+ n->next = olist;
|
||||
+ olist = n;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
closedir(dir);
|
||||
|
||||
@@ -870,6 +897,26 @@ PIDQ_HEAD *pidof(char *prog)
|
||||
return q;
|
||||
}
|
||||
|
||||
+int matches(PROC *o, PROC *p)
|
||||
+{
|
||||
+ int ret = 0;
|
||||
+ char *oargv1, *pargv1;
|
||||
+ if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
|
||||
+ if (o->argv1 && p->argv1) {
|
||||
+ if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL)
|
||||
+ oargv1 = strdup(o->argv1);
|
||||
+ if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL)
|
||||
+ pargv1 = strdup(p->argv1);
|
||||
+ if (! strcmp(oargv1, pargv1)) {
|
||||
+ ret = 1;
|
||||
+ }
|
||||
+ free(oargv1);
|
||||
+ free(pargv1);
|
||||
+ }
|
||||
+ }
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/* Give usage message and exit. */
|
||||
void usage(void)
|
||||
{
|
||||
@@ -920,6 +967,7 @@ void nsyslog(int pri, char *fmt, ...)
|
||||
#define PIDOF_OMIT 0x02
|
||||
#define PIDOF_NETFS 0x04
|
||||
#define PIDOF_QUIET 0x08
|
||||
+#define PIDOF_OMIT_OMIT_MATCHES 0x08
|
||||
|
||||
/*
|
||||
* Pidof functionality.
|
||||
@@ -937,6 +985,7 @@ int main_pidof(int argc, char **argv)
|
||||
char tmp[512];
|
||||
char sep = ' ';
|
||||
|
||||
+ olist = (PROC*)0;
|
||||
omit = (OMIT*)0;
|
||||
nlist = (NFS*)0;
|
||||
opterr = 0;
|
||||
@@ -944,7 +993,7 @@ int main_pidof(int argc, char **argv)
|
||||
if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0))
|
||||
flags |= PIDOF_NETFS;
|
||||
|
||||
- while ((opt = getopt(argc,argv,"qhco:d:sxzn")) != EOF) switch (opt) {
|
||||
+ while ((opt = getopt(argc,argv,"qhcmo:d:sxzn")) != EOF) switch (opt) {
|
||||
case '?':
|
||||
nsyslog(LOG_ERR,"invalid options on command line!\n");
|
||||
closelog();
|
||||
@@ -995,6 +1044,9 @@ int main_pidof(int argc, char **argv)
|
||||
case 'z':
|
||||
list_dz_processes = TRUE;
|
||||
break;
|
||||
+ case 'm':
|
||||
+ flags |= PIDOF_OMIT_OMIT_MATCHES;
|
||||
+ break;
|
||||
case 'n':
|
||||
flags |= PIDOF_NETFS;
|
||||
break;
|
||||
@@ -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) {
|
||||
- OMIT * optr;
|
||||
- for (optr = omit; optr; optr = optr->next) {
|
||||
+ PROC * optr;
|
||||
+ for (optr = olist; optr; optr = optr->next) {
|
||||
if (optr->pid == p->pid)
|
||||
break;
|
||||
+ if (flags & PIDOF_OMIT_OMIT_MATCHES)
|
||||
+ if (matches(optr, p))
|
||||
+ break;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1071,6 +1126,7 @@ int main_pidof(int argc, char **argv)
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
+ clear_omit();
|
||||
clear_mnt();
|
||||
|
||||
closelog();
|
||||
182
sources/poky/meta/recipes-core/sysvinit/sysvinit/rc
Executable file
182
sources/poky/meta/recipes-core/sysvinit/sysvinit/rc
Executable file
@@ -0,0 +1,182 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# rc This file is responsible for starting/stopping
|
||||
# services when the runlevel changes.
|
||||
#
|
||||
# Optimization feature:
|
||||
# A startup script is _not_ run when the service was
|
||||
# running in the previous runlevel and it wasn't stopped
|
||||
# in the runlevel transition (most Debian services don't
|
||||
# have K?? links in rc{1,2,3,4,5} )
|
||||
#
|
||||
# Author: Miquel van Smoorenburg <miquels@cistron.nl>
|
||||
# Bruce Perens <Bruce@Pixar.com>
|
||||
#
|
||||
# Version: @(#)rc 2.78 07-Nov-1999 miquels@cistron.nl
|
||||
#
|
||||
|
||||
. /etc/default/rcS
|
||||
export VERBOSE
|
||||
export PSPLASH_FIFO_DIR
|
||||
|
||||
startup_progress() {
|
||||
step=$(($step + $step_change))
|
||||
if [ "$num_steps" != "0" ]; then
|
||||
progress=$((($step * $progress_size / $num_steps) + $first_step))
|
||||
else
|
||||
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
|
||||
psplash-write "PROGRESS $progress" || true
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Start script or program.
|
||||
#
|
||||
startup() {
|
||||
# Handle verbosity
|
||||
[ "$VERBOSE" = very ] && echo "INIT: Running $@..."
|
||||
|
||||
case "$1" in
|
||||
*.sh)
|
||||
# Source shell script for speed.
|
||||
(
|
||||
trap - INT QUIT TSTP
|
||||
scriptname=$1
|
||||
shift
|
||||
. $scriptname
|
||||
)
|
||||
;;
|
||||
*)
|
||||
"$@"
|
||||
;;
|
||||
esac
|
||||
startup_progress
|
||||
}
|
||||
|
||||
# Ignore CTRL-C only in this shell, so we can interrupt subprocesses.
|
||||
trap ":" INT QUIT TSTP
|
||||
|
||||
# Set onlcr to avoid staircase effect.
|
||||
stty onlcr 0>&1
|
||||
|
||||
# Limit stack size for startup scripts
|
||||
[ "$STACK_SIZE" = "" ] || ulimit -S -s $STACK_SIZE
|
||||
|
||||
# Now find out what the current and what the previous runlevel are.
|
||||
|
||||
runlevel=$RUNLEVEL
|
||||
# Get first argument. Set new runlevel to this argument.
|
||||
[ "$1" != "" ] && runlevel=$1
|
||||
if [ "$runlevel" = "" ]
|
||||
then
|
||||
echo "Usage: $0 <runlevel>" >&2
|
||||
exit 1
|
||||
fi
|
||||
previous=$PREVLEVEL
|
||||
[ "$previous" = "" ] && previous=N
|
||||
|
||||
export runlevel previous
|
||||
|
||||
# Is there an rc directory for this new runlevel?
|
||||
if [ -d /etc/rc$runlevel.d ]
|
||||
then
|
||||
# Find out where in the progress bar the initramfs got to.
|
||||
PROGRESS_STATE=0
|
||||
#if [ -f /dev/.initramfs/progress_state ]; then
|
||||
# . /dev/.initramfs/progress_state
|
||||
#fi
|
||||
|
||||
# Split the remaining portion of the progress bar into thirds
|
||||
progress_size=$(((100 - $PROGRESS_STATE) / 3))
|
||||
|
||||
case "$runlevel" in
|
||||
0|6)
|
||||
# Count down from -100 to 0 and use the entire bar
|
||||
first_step=-100
|
||||
progress_size=100
|
||||
step_change=1
|
||||
;;
|
||||
S)
|
||||
# Begin where the initramfs left off and use 2/3
|
||||
# of the remaining space
|
||||
first_step=$PROGRESS_STATE
|
||||
progress_size=$(($progress_size * 2))
|
||||
step_change=1
|
||||
;;
|
||||
*)
|
||||
# Begin where rcS left off and use the final 1/3 of
|
||||
# the space (by leaving progress_size unchanged)
|
||||
first_step=$(($progress_size * 2 + $PROGRESS_STATE))
|
||||
step_change=1
|
||||
;;
|
||||
esac
|
||||
|
||||
num_steps=0
|
||||
for s in /etc/rc$runlevel.d/[SK]*; do
|
||||
case "${s##/etc/rc$runlevel.d/S??}" in
|
||||
gdm|xdm|kdm|reboot|halt)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
num_steps=$(($num_steps + 1))
|
||||
done
|
||||
step=0
|
||||
|
||||
# First, run the KILL scripts.
|
||||
if [ $previous != N ]
|
||||
then
|
||||
for i in /etc/rc$runlevel.d/K[0-9][0-9]*
|
||||
do
|
||||
# Check if the script is there.
|
||||
[ ! -f $i ] && continue
|
||||
|
||||
# Stop the service.
|
||||
startup $i stop
|
||||
done
|
||||
fi
|
||||
|
||||
# Now run the START scripts for this runlevel.
|
||||
for i in /etc/rc$runlevel.d/S*
|
||||
do
|
||||
[ ! -f $i ] && continue
|
||||
|
||||
if [ $previous != N ] && [ $previous != S ]
|
||||
then
|
||||
#
|
||||
# Find start script in previous runlevel and
|
||||
# stop script in this runlevel.
|
||||
#
|
||||
suffix=${i#/etc/rc$runlevel.d/S[0-9][0-9]}
|
||||
stop=/etc/rc$runlevel.d/K[0-9][0-9]$suffix
|
||||
previous_start=/etc/rc$previous.d/S[0-9][0-9]$suffix
|
||||
#
|
||||
# If there is a start script in the previous level
|
||||
# and _no_ stop script in this level, we don't
|
||||
# have to re-start the service.
|
||||
#
|
||||
[ -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
|
||||
;;
|
||||
*)
|
||||
startup $i start
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
#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
|
||||
psplash-write "QUIT" || true
|
||||
fi
|
||||
fi
|
||||
34
sources/poky/meta/recipes-core/sysvinit/sysvinit/rcS
Executable file
34
sources/poky/meta/recipes-core/sysvinit/sysvinit/rcS
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# rcS Call all S??* scripts in /etc/rcS.d in
|
||||
# numerical/alphabetical order.
|
||||
#
|
||||
# Version: @(#)/etc/init.d/rcS 2.76 19-Apr-1999 miquels@cistron.nl
|
||||
#
|
||||
|
||||
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||
runlevel=S
|
||||
prevlevel=N
|
||||
umask 022
|
||||
export PATH runlevel prevlevel
|
||||
|
||||
# Make sure proc is mounted
|
||||
#
|
||||
[ -d "/proc/1" ] || mount /proc
|
||||
|
||||
#
|
||||
# Source defaults.
|
||||
#
|
||||
. /etc/default/rcS
|
||||
|
||||
#
|
||||
# Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
|
||||
#
|
||||
trap ":" INT QUIT TSTP
|
||||
|
||||
#
|
||||
# Call all parts in order.
|
||||
#
|
||||
exec /etc/init.d/rc S
|
||||
|
||||
|
||||
36
sources/poky/meta/recipes-core/sysvinit/sysvinit/rcS-default
Normal file
36
sources/poky/meta/recipes-core/sysvinit/sysvinit/rcS-default
Normal file
@@ -0,0 +1,36 @@
|
||||
#
|
||||
# Defaults for the boot scripts in /etc/rcS.d
|
||||
#
|
||||
|
||||
# Time files in /tmp are kept in days.
|
||||
TMPTIME=0
|
||||
# Set to yes if you want sulogin to be spawned on bootup
|
||||
SULOGIN=no
|
||||
# Set to no if you want to be able to login over telnet/rlogin
|
||||
# before system startup is complete (as soon as inetd is started)
|
||||
DELAYLOGIN=no
|
||||
# Assume that the BIOS clock is set to UTC time (recommended)
|
||||
UTC=yes
|
||||
# Set VERBOSE to "no" if you would like a more quiet bootup.
|
||||
VERBOSE=no
|
||||
# Set EDITMOTD to "no" if you don't want /etc/motd to be edited automatically
|
||||
EDITMOTD=no
|
||||
# Whether to fsck root on boot
|
||||
ENABLE_ROOTFS_FSCK=no
|
||||
# Set FSCKFIX to "yes" if you want to add "-y" to the fsck at startup.
|
||||
FSCKFIX=yes
|
||||
# Set TICKADJ to the correct tick value for this specific machine
|
||||
#TICKADJ=10000
|
||||
# Enable caching in populate-volatile.sh
|
||||
VOLATILE_ENABLE_CACHE=yes
|
||||
# Indicate whether the rootfs is intended to be read-only or not.
|
||||
# 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#
|
||||
@@ -0,0 +1,59 @@
|
||||
From eb158c97f19d473d01befe96359a7f93ae834517 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Thu, 19 Nov 2015 00:10:03 +0000
|
||||
Subject: [PATCH] Fix build on musl use realpath() API its available on all
|
||||
libcs
|
||||
|
||||
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]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
src/killall5.c | 4 ++--
|
||||
src/mountpoint.c | 1 +
|
||||
src/wall.c | 1 +
|
||||
3 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/killall5.c b/src/killall5.c
|
||||
index a664954..9798423 100644
|
||||
--- a/src/killall5.c
|
||||
+++ b/src/killall5.c
|
||||
@@ -977,9 +977,9 @@ int matches(PROC *o, PROC *p)
|
||||
char *oargv1, *pargv1;
|
||||
if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
|
||||
if (o->argv1 && p->argv1) {
|
||||
- if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL)
|
||||
+ if ((oargv1 = realpath(o->argv1, NULL)) == NULL)
|
||||
oargv1 = strdup(o->argv1);
|
||||
- if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL)
|
||||
+ if ((pargv1 = realpath(p->argv1, NULL)) == NULL)
|
||||
pargv1 = strdup(p->argv1);
|
||||
if (! strcmp(oargv1, pargv1)) {
|
||||
ret = 1;
|
||||
diff --git a/src/mountpoint.c b/src/mountpoint.c
|
||||
index b24335e..5f20522 100644
|
||||
--- a/src/mountpoint.c
|
||||
+++ b/src/mountpoint.c
|
||||
@@ -23,6 +23,7 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
+#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
diff --git a/src/wall.c b/src/wall.c
|
||||
index d3a2c70..00826e9 100644
|
||||
--- a/src/wall.c
|
||||
+++ b/src/wall.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <pwd.h>
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
+#include <time.h>
|
||||
#include "init.h"
|
||||
|
||||
|
||||
@@ -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
|
||||
121
sources/poky/meta/recipes-core/sysvinit/sysvinit_3.04.bb
Normal file
121
sources/poky/meta/recipes-core/sysvinit/sysvinit_3.04.bb
Normal file
@@ -0,0 +1,121 @@
|
||||
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 = "GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
|
||||
file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \
|
||||
"
|
||||
|
||||
RDEPENDS:${PN} = "${PN}-inittab"
|
||||
|
||||
GITHUB_BASE_URI = "https://github.com/slicer69/${BPN}/releases/"
|
||||
SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.xz \
|
||||
file://install.patch \
|
||||
file://crypt-lib.patch \
|
||||
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 \
|
||||
file://0001-Accepted-patch-from-Mark-Hindley-which-avoids-cleari.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "2a621fe6e4528bc91308b74867ddaaebbdf7753f02395c0c5bae817bd2b7e3a5"
|
||||
|
||||
S = "${WORKDIR}/sysvinit-${PV}"
|
||||
|
||||
inherit update-alternatives features_check github-releases
|
||||
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_PRIORITY = "200"
|
||||
|
||||
ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
|
||||
ALTERNATIVE_PRIORITY[init] = "50"
|
||||
|
||||
ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
|
||||
ALTERNATIVE_PRIORITY[mountpoint] = "20"
|
||||
|
||||
ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
|
||||
ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
|
||||
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_LINK_NAME[pidof] = "${base_bindir}/pidof"
|
||||
|
||||
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_LINK_NAME[last.1] = "${mandir}/man1/last.1"
|
||||
ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
|
||||
ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
|
||||
ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
|
||||
ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
|
||||
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"
|
||||
|
||||
RDEPENDS:${PN} += "sysvinit-pidof initd-functions base-passwd"
|
||||
|
||||
CFLAGS:prepend = "-D_GNU_SOURCE "
|
||||
export LCRYPT = "-lcrypt"
|
||||
EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \
|
||||
'base_sbindir=${base_sbindir}' \
|
||||
'bindir=${bindir}' \
|
||||
'sbindir=${sbindir}' \
|
||||
'sysconfdir=${sysconfdir}' \
|
||||
'includedir=${includedir}' \
|
||||
'mandir=${mandir}' \
|
||||
MNTPOINT=yes"
|
||||
|
||||
do_install () {
|
||||
oe_runmake 'ROOT=${D}' install
|
||||
|
||||
install -d ${D}${sysconfdir} \
|
||||
${D}${sysconfdir}/default \
|
||||
${D}${sysconfdir}/init.d
|
||||
for level in S 0 1 2 3 4 5 6; do
|
||||
install -d ${D}${sysconfdir}/rc$level.d
|
||||
done
|
||||
|
||||
sed -e \
|
||||
's:#PSPLASH_TEXT#:${@bb.utils.contains("PACKAGECONFIG","psplash-text-updates","yes","no", d)}:g' \
|
||||
${WORKDIR}/rcS-default > ${D}${sysconfdir}/default/rcS
|
||||
chmod 0644 ${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
|
||||
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
|
||||
|
||||
chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
|
||||
chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
|
||||
|
||||
# Already provided by e2fsprogs; sysvinit's version is a copy from there
|
||||
rm ${D}${base_sbindir}/logsave
|
||||
rm ${D}${mandir}/man8/logsave.8
|
||||
}
|
||||
Reference in New Issue
Block a user