This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
From ec1a0c8fa2e7a7c6cf70f68bdabc07cbb1a567cf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= <michal.lyszczek@bofc.pl>
Date: Sun, 5 May 2019 23:43:40 +0200
Subject: [PATCH] init.d/sysctl.in: add support for busybox sysctl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Busybox version of sysctl does not support --system argument,
and files need to be loaded one by one. This patch adds code
to recognize busybox sysctl and execute proper function based
on that.
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
---
init.d/sysctl.in | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/init.d/sysctl.in b/init.d/sysctl.in
index e49f4db2..a705b3d4 100644
--- a/init.d/sysctl.in
+++ b/init.d/sysctl.in
@@ -37,6 +37,23 @@ BSD_sysctl()
return $retval
}
+Busybox_sysctl()
+{
+ local quiet
+ yesno $rc_verbose || quiet=-q
+
+ eindent
+ for conf in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
+ if [ -r "$conf" ]; then
+ vebegin "applying $conf"
+ sysctl $quiet -p "$conf" || retval=1
+ veend $retval
+ fi
+ done
+ eoutdent
+ return $retval
+}
+
Linux_sysctl()
{
local quiet
@@ -52,7 +69,15 @@ start()
ebegin "Configuring kernel parameters"
case "$RC_UNAME" in
*BSD|GNU) BSD_sysctl; rc=$? ;;
- Linux) Linux_sysctl; rc=$? ;;
+ Linux)
+ sysctl -h > /dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ # busybox version of sysctl does not recognize -h option
+ Busybox_sysctl
+ else
+ Linux_sysctl
+ fi
+ rc=$? ;;
esac
eend $rc "Unable to configure some kernel parameters"
}
--
2.18.1

View File

@@ -0,0 +1,34 @@
From 5ae8209afad9a4284723712b46d8685e7f7fd72c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= <michal.lyszczek@bofc.pl>
Date: Mon, 6 May 2019 00:06:39 +0200
Subject: [PATCH] sh/init.sh.Linux.in: change /run/lock from root:uucp to
root:daemon
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On gentoo /run/lock is owned by uucp group because of historical
reasons. However uucp does not exist on buildroot by default, and
it makes more sense that 'daemon' group should own this directory.
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
---
sh/init.sh.Linux.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in
index 222bbd3b..7f1a88db 100644
--- a/sh/init.sh.Linux.in
+++ b/sh/init.sh.Linux.in
@@ -85,7 +85,7 @@ fi
[ -x /sbin/restorecon ] && /sbin/restorecon -rF /run
checkpath -d $RC_SVCDIR
-checkpath -d -m 0775 -o root:uucp /run/lock
+checkpath -d -m 0775 -o root:daemon /run/lock
# Try to mount xenfs as early as possible, otherwise rc_sys() will always
# return RC_SYS_XENU and will think that we are in a domU while it's not.
--
2.18.1

26
package/openrc/Config.in Normal file
View File

@@ -0,0 +1,26 @@
config BR2_PACKAGE_OPENRC
bool "openrc"
depends on BR2_USE_MMU # fork()
depends on !BR2_STATIC_LIBS
depends on BR2_INIT_OPENRC
select BR2_PACKAGE_NCURSES
help
Init that works on top of pid 1 (for example
openrc-init). By default it does quite a lot on startup
(like setting hwclock, mounting directories, configuring
interfaces and so on). So for this init to properly work you
need at least these tools on the root filesystem (default
busybox configuration provides them all):
swapon, fsck, hwclock, getty, login, grep, mount, coreutils,
procps, modprobe (kmod), net-tools
Number of tools may be decreased by removing services that
use them.
https://github.com/OpenRC/openrc
comment "openrc needs a toolchain w/ dynamic library"
depends on BR2_USE_MMU
depends on BR2_INIT_OPENRC
depends on BR2_STATIC_LIBS

View File

@@ -0,0 +1,3 @@
# Locally calculated
sha256 c99488ca54f2b795328d07bbd456ade49b571136bba7501f7eaaeb1ca9f9ecc4 openrc-0.41.2.tar.gz
sha256 96862463f4e77e2508e4fc2c83773fd24807cb699368b63fd93a5e2b466dd624 LICENSE

45
package/openrc/openrc.mk Normal file
View File

@@ -0,0 +1,45 @@
################################################################################
#
# openrc
#
################################################################################
OPENRC_VERSION = 0.41.2
OPENRC_SITE = $(call github,OpenRC,openrc,$(OPENRC_VERSION))
OPENRC_LICENSE = BSD-2-Clause
OPENRC_LICENSE_FILES = LICENSE
OPENRC_DEPENDENCIES = ncurses
# set LIBNAME so openrc puts files in proper directories and sets proper
# paths in installed files. Since in buildroot /lib64 and /lib32 always
# points to /lib, it's safe to hardcode it to "lib"
OPENRC_MAKE_OPTS = \
LIBNAME=lib \
LIBEXECDIR=/usr/libexec/rc \
MKPKGCONFIG=no \
MKSELINUX=no \
MKSYSVINIT=yes \
BRANDING="Buildroot $(BR2_VERSION_FULL)" \
CC=$(TARGET_CC)
ifeq ($(BR2_SHARED_LIBS),y)
OPENRC_MAKE_OPTS += MKSTATICLIBS=no
else
OPENRC_MAKE_OPTS += MKSTATICLIBS=yes
endif
define OPENRC_BUILD_CMDS
$(MAKE) $(OPENRC_MAKE_OPTS) -C $(@D)
endef
define OPENRC_INSTALL_TARGET_CMDS
$(MAKE) $(OPENRC_MAKE_OPTS) DESTDIR=$(TARGET_DIR) -C $(@D) install
endef
define OPENRC_REMOVE_UNNEEDED
$(RM) -r $(TARGET_DIR)/usr/share/openrc
endef
OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_REMOVE_UNNEEDED
$(eval $(generic-package))