new package: openrc-0.41.2
PATCH 1/13 new package: openrc-0.41.2
This adds openrc init system package. This performs default openrc installation with openrc-init that acts as pid1.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/openrc/Config.in | 14 ++++++++++++ package/openrc/openrc.hash | 2 ++ package/openrc/openrc.mk | 46 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 package/openrc/Config.in create mode 100644 package/openrc/openrc.hash create mode 100644 package/openrc/openrc.mk
DEVELOPERS +1 -0
@@ -1615,6 +1615,7 @@ F: board/altera/socrates_cyclone5/ F: board/pine64/rock64 F: configs/rock64_defconfig F: configs/socrates_cyclone5_defconfig +F: package/openrc/ N: Michel Stempin <[email protected]> F: board/licheepi/
package/Config.in +1 -0
@@ -2194,6 +2194,7 @@ menu "System tools" source "package/ncdu/Config.in" source "package/numactl/Config.in" source "package/nut/Config.in" + source "package/openrc/Config.in" source "package/openvmtools/Config.in" source "package/pamtester/Config.in" source "package/polkit/Config.in"
package/openrc/Config.in new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_OPENRC + bool "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.
package/openrc/openrc.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Calculated manually +sha256 c99488ca54f2b795328d07bbd456ade49b571136bba7501f7eaaeb1ca9f9ecc4 openrc-0.41.2.tar.gz
package/openrc/openrc.mk new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.18.1
PATCH 2/13 package/skeleton-init-openrc: basic skeleton for openrc
This basic skeleton is similar to skeleton-init-sysv.
All links in /var are same as in skeleton-init-sysv to be compatible with current default filesystem scheme.
Exceptions:
* /dev/shm and /dev/pts dirs were removed, since they are created by openrc devfs service
* /etc/fstab does not need /dev/shm, /dev/pts and /sys entries becuse they are mounted by devfs and sysfs services respectively
--- DEVELOPERS | 1 + package/Config.in | 1 + package/skeleton-init-openrc/Config.in | 7 ++++++ .../skeleton-init-sysv.mk | 22 +++++++++++++++++++ package/skeleton-init-openrc/skeleton/dev/log | 1 + .../skeleton-init-openrc/skeleton/etc/fstab | 3 +++ .../skeleton-init-openrc/skeleton/var/cache | 1 + .../skeleton/var/lib/misc | 1 + .../skeleton-init-openrc/skeleton/var/lock | 1 + package/skeleton-init-openrc/skeleton/var/log | 1 + package/skeleton-init-openrc/skeleton/var/run | 1 + .../skeleton-init-openrc/skeleton/var/spool | 1 + package/skeleton-init-openrc/skeleton/var/tmp | 1 + 13 files changed, 42 insertions(+) create mode 100644 package/skeleton-init-openrc/Config.in create mode 100644 package/skeleton-init-openrc/skeleton-init-sysv.mk create mode 120000 package/skeleton-init-openrc/skeleton/dev/log create mode 100644 package/skeleton-init-openrc/skeleton/etc/fstab create mode 120000 package/skeleton-init-openrc/skeleton/var/cache create mode 120000 package/skeleton-init-openrc/skeleton/var/lib/misc create mode 120000 package/skeleton-init-openrc/skeleton/var/lock create mode 120000 package/skeleton-init-openrc/skeleton/var/log create mode 120000 package/skeleton-init-openrc/skeleton/var/run create mode 120000 package/skeleton-init-openrc/skeleton/var/spool create mode 120000 package/skeleton-init-openrc/skeleton/var/tmp
DEVELOPERS +1 -0
@@ -1616,6 +1616,7 @@ F: board/pine64/rock64 F: configs/rock64_defconfig F: configs/socrates_cyclone5_defconfig F: package/openrc/ +F: package/skeleton-init-openrc/ N: Michel Stempin <[email protected]> F: board/licheepi/
package/Config.in +1 -0
@@ -5,6 +5,7 @@ menu "Target packages" source "package/skeleton-custom/Config.in" source "package/skeleton-init-common/Config.in" source "package/skeleton-init-none/Config.in" + source "package/skeleton-init-openrc/Config.in" source "package/skeleton-init-systemd/Config.in" source "package/skeleton-init-sysv/Config.in"
package/skeleton-init-openrc/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_SKELETON_INIT_OPENRC + bool + select BR2_PACKAGE_HAS_SKELETON + select BR2_PACKAGE_SKELETON_INIT_COMMON + +config BR2_PACKAGE_PROVIDES_SKELETON + default "skeleton-init-openrc" if BR2_PACKAGE_SKELETON_INIT_OPENRC
package/skeleton-init-openrc/skeleton-init-sysv.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# skeleton-init-openrc +# +################################################################################ + +# The skeleton can't depend on the toolchain, since all packages depends on the +# skeleton and the toolchain is a target package, as is skeleton. +# Hence, skeleton would depends on the toolchain and the toolchain would depend +# on skeleton. +SKELETON_INIT_OPENRC_ADD_TOOLCHAIN_DEPENDENCY = NO +SKELETON_INIT_OPENRC_ADD_SKELETON_DEPENDENCY = NO + +SKELETON_INIT_OPENRC_DEPENDENCIES = skeleton-init-common + +SKELETON_INIT_OPENRC_PROVIDES = skeleton + +define SKELETON_INIT_OPENRC_INSTALL_TARGET_CMDS + $(call SYSTEM_RSYNC,$(SKELETON_INIT_OPENRC_PKGDIR)/skeleton,$(TARGET_DIR)) +endef + +$(eval $(generic-package))
package/skeleton-init-openrc/skeleton/dev/log new file +1 -0
@@ -0,0 +1 @@ +../tmp/log
package/skeleton-init-openrc/skeleton/etc/fstab new file +3 -0
@@ -0,0 +1,3 @@ +# <file system> <mount pt> <type> <options> <dump> <pass> +tmpfs /tmp tmpfs mode=1777 0 0 +tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
package/skeleton-init-openrc/skeleton/var/cache new file +1 -0
@@ -0,0 +1 @@ +../tmp
package/skeleton-init-openrc/skeleton/var/lib/misc new file +1 -0
@@ -0,0 +1 @@ +../../tmp
package/skeleton-init-openrc/skeleton/var/lock new file +1 -0
@@ -0,0 +1 @@ +../tmp
package/skeleton-init-openrc/skeleton/var/log new file +1 -0
@@ -0,0 +1 @@ +../tmp
package/skeleton-init-openrc/skeleton/var/run new file +1 -0
@@ -0,0 +1 @@ +../run
package/skeleton-init-openrc/skeleton/var/spool new file +1 -0
@@ -0,0 +1 @@ +../tmp
package/skeleton-init-openrc/skeleton/var/tmp new file +1 -0
@@ -0,0 +1 @@ +../tmp
Signature · 1 line
2.18.1
PATCH 3/13 system/Config.in: add new init - openrc
In reply to Michał ŁyszczekThis is very basic settings for openrc init.
* system/Config.in
Allows to select openrc as init system (which auto selects openrc-skeleton and openrc package).
* package/ifupdown-scripts/Config.in
openrc has its own service to bring up/down interfaces, so ifupdown-scripts should not be enabled when openrc is enabled to prevent service clash.
--- package/ifupdown-scripts/Config.in | 2 +- package/openrc/Config.in | 1 + system/Config.in | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-)
package/ifupdown-scripts/Config.in +1 -1
@@ -1,7 +1,7 @@ config BR2_PACKAGE_IFUPDOWN_SCRIPTS bool "ifupdown scripts" default y if BR2_ROOTFS_SKELETON_DEFAULT - depends on !BR2_PACKAGE_SYSTEMD_NETWORKD + depends on !BR2_PACKAGE_SYSTEMD_NETWORKD && !BR2_PACKAGE_OPENRC help Set of scripts used by ifupdown (either the standalone one, or the busybox one) to bring network up, or tear it down.
package/openrc/Config.in +1 -0
@@ -1,6 +1,7 @@ config BR2_PACKAGE_OPENRC bool "OpenRC" select BR2_PACKAGE_NCURSES + depends on BR2_INIT_OPENRC 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
system/Config.in +6 -0
@@ -11,6 +11,7 @@ config BR2_ROOTFS_SKELETON_DEFAULT bool "default target skeleton" select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_INIT_SYSV select BR2_PACKAGE_SKELETON_INIT_SYSV if BR2_INIT_BUSYBOX + select BR2_PACKAGE_SKELETON_INIT_OPENRC if BR2_INIT_OPENRC select BR2_PACKAGE_SKELETON_INIT_SYSTEMD if BR2_INIT_SYSTEMD select BR2_PACKAGE_SKELETON_INIT_NONE if BR2_INIT_NONE help
@@ -98,6 +99,11 @@ config BR2_INIT_SYSV select BR2_PACKAGE_INITSCRIPTS select BR2_PACKAGE_SYSVINIT +config BR2_INIT_OPENRC + bool "OpenRC" + depends on BR2_USE_MMU + select BR2_PACKAGE_OPENRC + # In Buildroot, we decided not to support a split-usr when systemd is # used as an init system. This is a design decision, not a systemd # issue. Thus the select is with BR2_INIT_SYSTEMD (below) rather than
Signature · 1 line
2.18.1
PATCH 4/13 package/openrc: add support for spawning getty
In reply to Michał Łyszczek* package/openrc/openrc.mk
add code that monitors BR2_TARGET_GENERIC_GETTY and if set, creates configuration file (with SYSTEM_GETTY_*) for port in /etc/conf.d/getty.$(SYSTEM_GETTY_PORT) and links so openrc starts service.
* package/skeleton-init-openrc/skeleton/etc/init.d/getty openrc service that spawns getty on configured port.
* system/Config.in
change dependency of BR2_TARGET_GENERIC_GETTY_TERM and BR2_TARGET_GENERIC_GETTY_OPTIONS so openrc can make use of these fields too.
--- package/openrc/openrc.mk | 13 ++++++++ .../skeleton/etc/conf.d/.empty | 0 .../skeleton/etc/init.d/getty | 31 +++++++++++++++++++ .../skeleton/etc/runlevels/default/.empty | 0 system/Config.in | 8 ++--- 5 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 package/skeleton-init-openrc/skeleton/etc/conf.d/.empty create mode 100755 package/skeleton-init-openrc/skeleton/etc/init.d/getty create mode 100644 package/skeleton-init-openrc/skeleton/etc/runlevels/default/.empty
package/openrc/openrc.mk +13 -0
@@ -43,4 +43,17 @@ define OPENRC_REMOVE_UNNEEDED endef OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_REMOVE_UNNEEDED +ifeq ($(BR2_TARGET_GENERIC_GETTY),y) +GETTY_SVCNAME = getty.$(SYSTEM_GETTY_PORT) +GETTY_CONF_D = $(TARGET_DIR)/etc/conf.d/$(GETTY_SVCNAME) +define OPENRC_SET_GETTY + echo "baud=\"$(SYSTEM_GETTY_BAUDRATE)\"" > $(GETTY_CONF_D) + echo "term_type=\"$(SYSTEM_GETTY_TERM)\"" >> $(GETTY_CONF_D) + echo "getty_options=\"-L $(SYSTEM_GETTY_OPTIONS)\"" >> $(GETTY_CONF_D) + ln -sf getty $(TARGET_DIR)/etc/init.d/$(GETTY_SVCNAME) + ln -sf /etc/init.d/$(GETTY_SVCNAME) $(TARGET_DIR)/etc/runlevels/default/$(GETTY_SVCNAME) +endef +OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_SET_GETTY +endif # BR2_TARGET_GENERIC_GETTY + $(eval $(generic-package))
package/skeleton-init-openrc/skeleton/etc/conf.d/.empty new file +0 -0
package/skeleton-init-openrc/skeleton/etc/init.d/getty new file +31 -0
@@ -0,0 +1,31 @@ +#!/sbin/openrc-run +# based on agetty service from OpenRC package + +description="start getty on terminal" +supervisor=supervise-daemon +port="${RC_SVCNAME#*.}" +term_type="${term_type:-linux}" +command=/sbin/getty +command_args_foreground="${getty_options} ${baud} ${port} ${term_type}" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + # start getty at the very end of init + after * + keyword -prefix +} + +start_pre() { + if [ -z "$port" ]; then + eerror "${RC_SVCNAME} cannot be started directly. You must create" + eerror "symbolic links to it for the ports you want to start" + eerror "agetty on and add those to the appropriate runlevels." + return 1 + else + export EINFO_QUIET="${quiet:-yes}" + fi +} + +stop_pre() { + export EINFO_QUIET="${quiet:-yes}" +}
package/skeleton-init-openrc/skeleton/etc/runlevels/default/.empty new file +0 -0
system/Config.in +4 -4
@@ -343,16 +343,16 @@ config BR2_TARGET_GENERIC_GETTY_BAUDRATE config BR2_TARGET_GENERIC_GETTY_TERM string "TERM environment variable" default "vt100" - # currently observed only by busybox and sysvinit - depends on BR2_INIT_BUSYBOX || BR2_INIT_SYSV + # currently observed by all but systemd + depends on !BR2_INIT_SYSTEMD help Specify a TERM type. config BR2_TARGET_GENERIC_GETTY_OPTIONS string "other options to pass to getty" default "" - # currently observed only by busybox and sysvinit - depends on BR2_INIT_BUSYBOX || BR2_INIT_SYSV + # currently observed by all but systemd + depends on !BR2_INIT_SYSTEMD help Any other flags you want to pass to getty, Refer to getty --help for details.
Signature · 1 line
2.18.1
PATCH 5/13 package/pkg-generic.mk: add _INSTALL_INIT_OPENRC
In reply to Michał ŁyszczekAdd _INSTALL_INIT_OPENRC so packages can define own steps to perform to install openrc service scripts.
--- package/pkg-generic.mk | 2 ++ 1 file changed, 2 insertions(+)
package/pkg-generic.mk +2 -0
@@ -337,6 +337,8 @@ $(BUILD_DIR)/%/.stamp_target_installed: $($(PKG)_INSTALL_INIT_SYSTEMD)) $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ $($(PKG)_INSTALL_INIT_SYSV)) + $(if $(BR2_INIT_OPENRC), \ + $($(PKG)_INSTALL_INIT_OPENRC)) $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \
Signature · 1 line
2.18.1
PATCH 5/13 package/pkg-generic.mk: add _INSTALL_INIT_OPENRC
Hello Micha?,
Quoted 13 lines · On Thu, 9 May 2019 00:09:29 +0200 Micha? ?yszczek <[email protected]>…
Add
_INSTALL_INIT_OPENRCso packages can define own steps to perform to install openrc service scripts.Signed-off-by Micha? ?yszczek <[email protected]>--- package/pkg-generic.mk | 2 ++ 1 file changed, 2 insertions(+)package/pkg-generic.mk +0
-0
package/pkg-generic.mk $(BUILD_DIR)/%/.stamp_target_installed: · line 341
Quoted 5 lines
package/pkg-generic.mk +2
-0@@ -337,6 +337,8 @@ $(BUILD_DIR)/%/.stamp_target_installed: $($(PKG)_INSTALL_INIT_SYSTEMD)) $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ $($(PKG)_INSTALL_INIT_SYSV)) + $(if $(BR2_INIT_OPENRC), \ + $($(PKG)_INSTALL_INIT_OPENRC))
This addition will require an update to the Buildroot manual, in adding-packages-generic.txt, where the other <pkg>_INSTALL_INIT_* variables are described.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 6/13 package/skeleton-init-openrc: add support to remount rootfs as rw
In reply to Michał ŁyszczekAdds support to openrc skeleton to monitor BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW and remount rootfs as rw when options is set.
--- .../skeleton-init-openrc/skeleton-init-sysv.mk | 15 +++++++++++++++ package/skeleton-init-openrc/skeleton/etc/fstab | 1 + 2 files changed, 16 insertions(+)
package/skeleton-init-openrc/skeleton-init-sysv.mk +15 -0
@@ -15,8 +15,23 @@ SKELETON_INIT_OPENRC_DEPENDENCIES = skeleton-init-common SKELETON_INIT_OPENRC_PROVIDES = skeleton +ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y) +# Comment /dev/root entry in fstab. When openrc does not find fstab entry for +# "/", it will try to remount "/" as "rw". +define SKELETON_INIT_OPENRC_ROOT_RO_OR_RW + $(SED) '/^ *\/dev\/root.*$$/s~^~#~' $(TARGET_DIR)/etc/fstab +endef +else +# Uncomment /dev/root entry in fstab which has "ro" option so openrc notices +# it and doesn't remount root to rw. +define SKELETON_INIT_OPENRC_ROOT_RO_OR_RW + $(SED) '/^# *\/dev\/root.*$$/s~^#\+~~' $(TARGET_DIR)/etc/fstab +endef +endif # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW + define SKELETON_INIT_OPENRC_INSTALL_TARGET_CMDS $(call SYSTEM_RSYNC,$(SKELETON_INIT_OPENRC_PKGDIR)/skeleton,$(TARGET_DIR)) + $(SKELETON_INIT_OPENRC_ROOT_RO_OR_RW) endef $(eval $(generic-package))
package/skeleton-init-openrc/skeleton/etc/fstab +1 -0
@@ -1,3 +1,4 @@ # <file system> <mount pt> <type> <options> <dump> <pass> +/dev/root / ext2 ro,noauto 0 0 tmpfs /tmp tmpfs mode=1777 0 0 tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
Signature · 1 line
2.18.1
PATCH 7/13 new package: openrc-netifrc-0.6.1
In reply to Michał Łyszczeknetifrc package is a collection of scripts for openrc that configures network interfaces. It can take advantage of many external binaries like dhcp, wpa_supplicant or ifplugd.
--- DEVELOPERS | 1 + package/Config.in | 1 + package/openrc-netifrc/Config.in | 6 +++ package/openrc-netifrc/openrc-netifrc.hash | 2 + package/openrc-netifrc/openrc-netifrc.mk | 59 ++++++++++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 package/openrc-netifrc/Config.in create mode 100644 package/openrc-netifrc/openrc-netifrc.hash create mode 100644 package/openrc-netifrc/openrc-netifrc.mk
DEVELOPERS +1 -0
@@ -1616,6 +1616,7 @@ F: board/pine64/rock64 F: configs/rock64_defconfig F: configs/socrates_cyclone5_defconfig F: package/openrc/ +F: package/openrc-netifrc/ F: package/skeleton-init-openrc/ N: Michel Stempin <[email protected]>
package/Config.in +1 -0
@@ -2196,6 +2196,7 @@ menu "System tools" source "package/numactl/Config.in" source "package/nut/Config.in" source "package/openrc/Config.in" + source "package/openrc-netifrc/Config.in" source "package/openvmtools/Config.in" source "package/pamtester/Config.in" source "package/polkit/Config.in"
package/openrc-netifrc/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_OPENRC_NETIFRC + bool "Install network interface startup scripts" + depends on BR2_PACKAGE_OPENRC + help + This package provides a system of modules to manage and configure network + interfaces via individual per-interface scripts in /etc/init.d.
package/openrc-netifrc/openrc-netifrc.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Calculated manually +sha256 004907e0c3db2d106d6a51d604d79f971f1013fa7642054ad7efe5076e52f7b3 netifrc-0.6.1.tar.gz
package/openrc-netifrc/openrc-netifrc.mk new file +59 -0
59 lines not on this page · raw message
Signature · 1 line
2.18.1
PATCH 8/13 package/openrc-netifrc/openrc-netifrc.mk: add support for BR2_SYSTEM_DHCP
In reply to Michał ŁyszczekThis patch makes openrc-netifrc package aware of BR2_SYSTEM_DHCP config, and if set, will start dhcp daemon on configured interface.
--- package/openrc-netifrc/openrc-netifrc.mk | 10 ++++++++++ system/Config.in | 10 +++++++--- 2 files changed, 17 insertions(+), 3 deletions(-)
package/openrc-netifrc/openrc-netifrc.mk +10 -0
@@ -56,4 +56,14 @@ endef OPENRC_NETIFRC_TARGET_FINALIZE_HOOKS += OPENRC_NETIFRC_INSTALL endif # BR2_PACKAGE_OPENRC_NETIFRC +OPENRC_NETIFRC_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP)) +ifneq ($(OPENRC_NETIFRC_DHCP_IFACE),) +define OPENRC_NETIFRC_SYSTEM_DHCP + echo "config_$(OPENRC_NETIFRC_DHCP_IFACE)=\"dhcp\"" >> $(TARGET_DIR)/etc/conf.d/net + ln -sf net.lo $(TARGET_DIR)/etc/init.d/net.$(OPENRC_NETIFRC_DHCP_IFACE) + ln -sf /etc/init.d/net.$(OPENRC_NETIFRC_DHCP_IFACE) $(TARGET_DIR)/etc/runlevels/default/net.$(OPENRC_NETIFRC_DHCP_IFACE) +endef +OPENRC_NETIFRC_TARGET_FINALIZE_HOOKS += OPENRC_NETIFRC_SYSTEM_DHCP +endif # BR2_SYSTEM_DHCP + $(eval $(generic-package))
system/Config.in +7 -3
@@ -372,7 +372,9 @@ config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW config BR2_SYSTEM_DHCP string "Network interface to configure through DHCP" default "" - depends on BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || BR2_PACKAGE_SYSTEMD_NETWORKD + depends on ((BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ + BR2_PACKAGE_SYSTEMD_NETWORKD) && !BR2_PACKAGE_OPENRC) || \ + BR2_PACKAGE_OPENRC_NETIFRC help Enter here the name of the network interface (E.G. eth0) to automatically configure through DHCP at bootup.
@@ -383,8 +385,10 @@ config BR2_SYSTEM_DHCP overwrite /etc/network/interfaces or add a networkd configuration file. -comment "automatic network configuration via DHCP needs ifupdown or busybox or networkd" - depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || BR2_PACKAGE_SYSTEMD_NETWORKD) +comment "automatic network configuration via DHCP needs ifupdown or busybox or networkd or openrc-netifrc" + depends on !(((BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN || \ + BR2_PACKAGE_SYSTEMD_NETWORKD) && !BR2_PACKAGE_OPENRC) || \ + BR2_PACKAGE_OPENRC_NETIFRC) endif # BR2_ROOTFS_SKELETON_DEFAULT
Signature · 1 line
2.18.1
PATCH 9/13 package/openrc: add patch to support busybox version of sysctl
In reply to Michał ŁyszczekBusybox version of sysctl does not support --system argument, and files need to be loaded one by one. This patch adds code to sysctl service in openrc to recognize busybox sysctl and execute proper function based on that.
--- ...tl.in-add-support-for-busybox-sysctl.patch | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 package/openrc/0001-init.d-sysctl.in-add-support-for-busybox-sysctl.patch
package/openrc/0001-init.d-sysctl.in-add-support-for-busybox-sysctl.patch new file +66 -0
@@ -0,0 +1,66 @@ +From ec1a0c8fa2e7a7c6cf70f68bdabc07cbb1a567cf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= <[email protected]> +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 <[email protected]> +--- + 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 +
Signature · 1 line
2.18.1
PATCH 10/13 package/openrc: change /run/lock from root:uucp to root:daemon
In reply to Michał ŁyszczekOn 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.
--- ....in-change-run-lock-from-root-uucp-t.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/openrc/0002-sh-init.sh.Linux.in-change-run-lock-from-root-uucp-t.patch
package/openrc/0002-sh-init.sh.Linux.in-change-run-lock-from-root-uucp-t.patch new file +34 -0
@@ -0,0 +1,34 @@ +From 5ae8209afad9a4284723712b46d8685e7f7fd72c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20=C5=81yszczek?= <[email protected]> +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 <[email protected]> +--- + 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 +
Signature · 1 line
2.18.1
PATCH 11/13 package/openrc: add support to set terminal encoding
In reply to Michał ŁyszczekWhen openrc init is enabled, user can chose to set terminal encoding to ascii, utf-8 or to keep default settings.
* system/Config.in
New kconfig choice BR2_TARGET_GENERIC_TERMENCODING_* to choose terminal encoding. Depends on openrc init.
* package/openrc/openrc.mk
monitors BR2_TARGET_GENERIC_TERMENCODING_* choice and make proper changes on TARGET_DIR to enable/disable terminal encoding set.
--- package/openrc/openrc.mk | 19 +++++++++++++++++++ system/Config.in | 17 +++++++++++++++++ 2 files changed, 36 insertions(+)
package/openrc/openrc.mk +19 -0
@@ -56,4 +56,23 @@ endef OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_SET_GETTY endif # BR2_TARGET_GENERIC_GETTY +ifeq ($(BR2_TARGET_GENERIC_TERMENCODING_KEEP),y) +# openrc by default installs service to set terminal encoding, if we want to +# keep default encoding we need to remove service from boot. +define OPENRC_TERMENCODING + $(RM) $(TARGET_DIR)/etc/runlevels/boot/{termencoding,save-termencoding} + $(RM) $(TARGET_DIR)/etc/conf.d/termencoding +endef +OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_TERMENCODING +else +ifeq ($(BR2_TARGET_GENERIC_TERMENCODING_UTF8),y) +# By default openrc will set terminal encoding to ASCII, if we want encoding +# to be utf8, we need to set it. +define OPENRC_TERMENCODING + echo "unicode=\"yes\"" > $(TARGET_DIR)/etc/conf.d/termencoding +endef +OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_TERMENCODING +endif # BR2_TARGET_GENERIC_TERMENCODING_UTF8 +endif # BR2_TARGET_GENERIC_TERMENCODING_KEEP + $(eval $(generic-package))
system/Config.in +17 -0
@@ -390,6 +390,23 @@ comment "automatic network configuration via DHCP needs ifupdown or busybox or n BR2_PACKAGE_SYSTEMD_NETWORKD) && !BR2_PACKAGE_OPENRC) || \ BR2_PACKAGE_OPENRC_NETIFRC) +choice + prompt "Terminal encoding" + default BR2_TARGET_GENERIC_TERMENCODING_KEEP + depends on BR2_INIT_OPENRC + help + Set terminal encoding. This makes sense only when you are going to + use virtual terminals with external monitor (or qemu) that uses + /dev/tty[1-12]. + +config BR2_TARGET_GENERIC_TERMENCODING_KEEP + bool "keep default" +config BR2_TARGET_GENERIC_TERMENCODING_ASCII + bool "ascii" +config BR2_TARGET_GENERIC_TERMENCODING_UTF8 + bool "utf-8" +endchoice + endif # BR2_ROOTFS_SKELETON_DEFAULT config BR2_SYSTEM_DEFAULT_PATH
Signature · 1 line
2.18.1
PATCH 12/13 package/openrc: add support for setting terminal keymap
In reply to Michał ŁyszczekWhen openrc init is enabled, user can chose to set terminal keymap or keep default settings.
* system/Config.in
New config BR2_TARGET_GENERIC_TERM_KEYMAP which is available only when openrc is selected and kbd package is installed. Used to set keymap from /usr/share/keymaps
* package/openrc/openrc.mk
monitors BR2_TARGET_GENERIC_TERM_KEYMAP and configures init to use specified keymap. It will also check if keymap exists in the system
--- package/openrc/openrc.mk | 28 ++++++++++++++++++++++++++++ system/Config.in | 12 ++++++++++++ 2 files changed, 40 insertions(+)
package/openrc/openrc.mk +28 -0
@@ -75,4 +75,32 @@ OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_TERMENCODING endif # BR2_TARGET_GENERIC_TERMENCODING_UTF8 endif # BR2_TARGET_GENERIC_TERMENCODING_KEEP +OPENRC_TERM_KEYMAP = $(call qstrip,$(BR2_TARGET_GENERIC_TERM_KEYMAP)) +ifneq ($(OPENRC_TERM_KEYMAP),) +OPENRC_DEPENDENCIES += kbd +# 1) check if passed kaymap exists in the installed system +# 2) set keymap value in /etc/conf.d/keymaps +# 3) set keyboard mode to same encoding as terminal encoding +define OPENRC_SET_TERM_KEYMAP + if ! find $(TARGET_DIR)/usr/share/keymaps -name "*$(OPENRC_TERM_KEYMAP).map*" | grep -q ".*"; then \ + echo "keymap $(OPENRC_TERM_KEYMAP) not found in $(TARGET_DIR)/usr/share/keymaps"; \ + exit 1; \ + fi + echo "keymap=\"$(OPENRC_TERM_KEYMAP)\"" > $(TARGET_DIR)/etc/conf.d/keymaps + if test -f $(TARGET_DIR)/etc/conf.d/termencoding; then \ + grep "unicode=" $(TARGET_DIR)/etc/conf.d/termencoding >> $(TARGET_DIR)/etc/conf.d/keymaps; \ + fi +endef +else +# openrc installs keymaps service by default, so if keymap is not set (like +# because kbd is not installed) we need to remove keymaps service from boot +# so there are no errors about missing programs. If kbd is installed, but +# keymap config is empty value, we also remove service to keep default values. +define OPENRC_SET_TERM_KEYMAP + $(RM) $(TARGET_DIR)/etc/runlevels/boot/{keymaps,save-keymaps} + $(RM) $(TARGET_DIR)/etc/conf.d/keymaps +endef +endif # OPENRC_TERM_KEYMAP +OPENRC_TARGET_FINALIZE_HOOKS += OPENRC_SET_TERM_KEYMAP + $(eval $(generic-package))
system/Config.in +12 -0
@@ -407,6 +407,18 @@ config BR2_TARGET_GENERIC_TERMENCODING_UTF8 bool "utf-8" endchoice +config BR2_TARGET_GENERIC_TERM_KEYMAP + string "Set terminal keymap" + default "us" + depends on BR2_INIT_OPENRC && BR2_PACKAGE_KBD + help + Configures all virtual terminals (on /dev/tty[1-12]) to use + specified keymap. List of keymaps are installed in /usr/share/keymaps. + Set to empty, to keep default keymap. + +comment "Setting terminal keymap requires OpenRC and kdb package" + depends on !(BR2_INIT_OPENRC && BR2_PACKAGE_KBD) + endif # BR2_ROOTFS_SKELETON_DEFAULT config BR2_SYSTEM_DEFAULT_PATH
Signature · 1 line
2.18.1
PATCH 13/13 package/skeleton-init-openrc: add support for starting sysv scripts
In reply to Michał Łyszczek* package/skeleton-init-openrc/skeleton/etc/init.d/sysv-rcs This openrc script implements rcS and rcK equivalent which will start or stop any script from /etc/init.d/S??*
* package/skeleton-init-openrc/skeleton/etc/runlevels/default/sysv-rcs symlink to /etc/init.d/sysv-rcs to start service at startup
* package/pkg-generic.mk
When openrc is enabled, evaluate $(PKG)_INSTALL_INIT_OPENRC, but if install steps for openrc are not avilable, then evaluate $(PKG)_INSTALL_INIT_SYSV))
--- package/pkg-generic.mk | 4 +- .../skeleton/etc/init.d/sysv-rcs | 53 +++++++++++++++++++ .../skeleton/etc/runlevels/default/sysv-rcs | 1 + 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 package/skeleton-init-openrc/skeleton/etc/init.d/sysv-rcs create mode 120000 package/skeleton-init-openrc/skeleton/etc/runlevels/default/sysv-rcs
package/pkg-generic.mk +3 -1
@@ -338,7 +338,9 @@ $(BUILD_DIR)/%/.stamp_target_installed: $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ $($(PKG)_INSTALL_INIT_SYSV)) $(if $(BR2_INIT_OPENRC), \ - $($(PKG)_INSTALL_INIT_OPENRC)) + $(if $($(PKG)_INSTALL_INIT_OPENRC), \ + $($(PKG)_INSTALL_INIT_OPENRC), \ + $($(PKG)_INSTALL_INIT_SYSV))) $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \
package/skeleton-init-openrc/skeleton/etc/init.d/sysv-rcs new file +53 -0
53 lines not on this page · raw message
package/skeleton-init-openrc/skeleton/etc/runlevels/default/sysv-rcs new file +1 -0
@@ -0,0 +1 @@ +/etc/init.d/sysv-rcs
Signature · 1 line
2.18.1
PATCH 1/13 new package: openrc-0.41.2
In reply to Michał ŁyszczekHello Micha?,
Looks good overall, there are just a few comments/questions below.
Quoted 4 lines · On Thu, 9 May 2019 00:09:25 +0200 Micha? ?yszczek <[email protected]>…
This adds openrc init system package. This performs default openrc installation with openrc-init that acts as pid1.
Signed-off-by Micha? ?yszczek <[email protected]>
First of all, the commit title should be:
package/openrc: new package
and it should be fixed similarly in PATCH 07/13 in your series, for the openrc-netifrc package.
Quoted 10 lines
package/openrc/Config.in new file +4
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_OPENRC + bool "OpenRC" + select BR2_PACKAGE_NCURSES + help
package/openrc/Config.in line 14
Quoted 10 lines
package/openrc/Config.in new file +10
-0+ 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.
We like to have the upstream URL of the project at the end of the Config.in help text, see how other packages do that.
package/openrc/openrc.hash line 2
Quoted 8 lines
package/openrc/openrc.hash new file +2
-0@@ -0,0 +1,2 @@ +# Calculated manually +sha256 c99488ca54f2b795328d07bbd456ade49b571136bba7501f7eaaeb1ca9f9ecc4 openrc-0.41.2.tar.gz
Please add the hash of the license file.
Quoted 6 lines
package/openrc/openrc.mk new file +0
-0
package/openrc/openrc.mk line 8
Quoted 8 lines
package/openrc/openrc.mk new file +8
-0@@ -0,0 +1,46 @@ +################################################################################ +# +# openrc +# +################################################################################ + +OPENRC_VERSION = 0.41.2 +OPENRC_SOURCE = openrc-$(OPENRC_VERSION).tar.gz
This is not needed, the default value is that one.
package/openrc/openrc.mk line 13
Quoted 5 lines
package/openrc/openrc.mk new file +5
-0+OPENRC_SITE = $(call github,OpenRC,openrc,$(OPENRC_VERSION)) +OPENRC_LICENSE = BSD-2-Clause +OPENRC_LICENSE_FILES = LICENSE + +OPENRC_DEPENDENCIES += ncurses
Just = and not +=.
Quoted 8 lines
package/openrc/openrc.mk new file +8
-0+ +ifeq ($(BR2_SHARED_LIBS),y) +OPENRC_MAKE_OPTS += MKSTATICLIBS=no +else +OPENRC_MAKE_OPTS += MKSTATICLIBS=yes +endif + +# set LIBNAME so openrc puts files in proper directories and sets proper
package/openrc/openrc.mk line 31
Quoted 10 lines
package/openrc/openrc.mk new file +10
-0+# 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 +OPENRC_MAKE_OPTS += LIBEXECDIR=/usr/libexec/rc +OPENRC_MAKE_OPTS += TARGETDIR=$(TARGET_DIR) +OPENRC_MAKE_OPTS += MKPKGCONFIG=no +OPENRC_MAKE_OPTS += MKSELINUX=no +OPENRC_MAKE_OPTS += MKSYSVINIT=yes +OPENRC_MAKE_OPTS += BRANDING="Buildroot $(BR2_VERSION_FULL)" +OPENRC_MAKE_OPTS += CC=$(TARGET_CC)
It would be nicer to see all those unconditional make opts before the conditional one for static/shared libraries, and have them on a single line.
OPENRC_MAKE_OPTS = \ LIBNAME=lib \ LIBEXECDIR=... \ ...
ifeq ($(BR2_SHARED_LIBS),y)OPENRC_MAKE_OPTS += ...
elseOPENRC_MAKE_OPTS += ...
endif
Also, a few questions:
- How is the TARGETDIR variable used by the build system ? Why does it need to know the installation location at build time ?
- What is the effect of MKPKGCONFIG=no ? What is openrc using pkg-config for ?
package/openrc/openrc.mk line 38
Quoted 6 lines
package/openrc/openrc.mk new file +6
-0+define OPENRC_BUILD_CMDS + $(MAKE) $(OPENRC_MAKE_OPTS) -C $(@D) +endef + +define OPENRC_INSTALL_TARGET_CMDS + DESTDIR=$(TARGET_DIR) $(MAKE) $(OPENRC_MAKE_OPTS) -C $(@D) install
DESTDIR should be placed after $(OPENRC_MAKE_OPTS).
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/13 new package: openrc-0.41.2
Hello Thomas,
Quoted 4 lines · Thomas Petazzoni
Also, a few questions:
- How is the TARGETDIR variable used by the build system ? Why does it need to know the installation location at build time ?
Good catch, it's not needed, it's a leftover from my integration I did in March, but found better solution so it is not needed anymore. Deleted.
Quoted 2 lines
- What is the effect of MKPKGCONFIG=no ? What is openrc using pkg-config for ?
openrc does not use pkg-config per se, if MKPKGCONFIG is enabled, it will
just install *.pc files on rootfs for other programs to find librc and
libeinfo. These libs exposes C api to controll openrc (al rc-* functions
uses it). From the looks of it, these libs would be usefull if you wanted
to write your own programs to manager services, and vast majority of people using openrc won't need it. Also, that's the reason why there is not INSTALL_STAGING=yes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190509/8907fb13/attachment.asc>
PATCH 1/13 new package: openrc-0.41.2
Hello Michal,
Quoted 10 lines · On Thu, 09 May 2019 12:30:24 +0200 michal.lyszczek at bofc.pl wrote:
Quoted 2 lines
- What is the effect of MKPKGCONFIG=no ? What is openrc using pkg-config for ?
openrc does not use pkg-config per se, if MKPKGCONFIG is enabled, it will just install *.pc files on rootfs for other programs to find librc and libeinfo. These libs exposes C api to controll openrc (al rc-* functions uses it). From the looks of it, these libs would be usefull if you wanted to write your own programs to manager services, and vast majority of people using openrc won't need it. Also, that's the reason why there is not INSTALL_STAGING=yes.
OK, thanks for the explanation, it makes perfect sense. Could perhaps be explained in the commit log or in a comment in the .mk file.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH 1/13 new package: openrc-0.41.2
In reply to Michał ŁyszczekMicha?, All,
Sorry for the long delay in replying to this series...
During the developers meetging this week-end, I've reworked most of your
series: https://patchwork.ozlabs.org/project/buildroot/list/?series=123190
I've however left two patches behind:
- package/openrc: add support to set terminal encoding
- package/openrc: add support for setting terminal keymap
We've discussed those two patches, and we agree that the feature is very useful. However, we would like to have something that is not entirely specific to openrc.
Indeed, the config options (e.g. BR2_TARGET_GENERIC_TERM_KEYMAP) should be available for all init systems. The only part that should be specific to each init system should be how the options are applied.
Finally, we would very much like to have run-time testing of openrc as an init system, like we have for busybox and systemd, see:
support/testing/tests/init/
Would like to work on these two points, once the new series ahs been applied?
Thank you for your very valuable initial work! :-)
Regards,
Yann E. MORIN.
On 2019-05-09 00:09 +0200, Micha? ?yszczek spake thusly:
Quoted 126 lines
This adds openrc init system package. This performs default openrc installation with openrc-init that acts as pid1.
Signed-off-by Micha? ?yszczek <[email protected]>--- DEVELOPERS | 1 + package/Config.in | 1 + package/openrc/Config.in | 14 ++++++++++++ package/openrc/openrc.hash | 2 ++ package/openrc/openrc.mk | 46 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 package/openrc/Config.in create mode 100644 package/openrc/openrc.hash create mode 100644 package/openrc/openrc.mkDEVELOPERS +1
-0@@ -1615,6 +1615,7 @@ F: board/altera/socrates_cyclone5/ F: board/pine64/rock64 F: configs/rock64_defconfig F: configs/socrates_cyclone5_defconfig +F: package/openrc/ N: Michel Stempin <[email protected]> F: board/licheepi/package/Config.in +1
-0@@ -2194,6 +2194,7 @@ menu "System tools" source "package/ncdu/Config.in" source "package/numactl/Config.in" source "package/nut/Config.in" + source "package/openrc/Config.in" source "package/openvmtools/Config.in" source "package/pamtester/Config.in" source "package/polkit/Config.in"package/openrc/Config.in new file +14
-0@@ -0,0 +1,14 @@ +config BR2_PACKAGE_OPENRC + bool "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.package/openrc/openrc.hash new file +2
-0@@ -0,0 +1,2 @@ +# Calculated manually +sha256 c99488ca54f2b795328d07bbd456ade49b571136bba7501f7eaaeb1ca9f9ecc4 openrc-0.41.2.tar.gzpackage/openrc/openrc.mk new file +46
-0@@ -0,0 +1,46 @@ +################################################################################ +# +# openrc +# +################################################################################ + +OPENRC_VERSION = 0.41.2 +OPENRC_SOURCE = openrc-$(OPENRC_VERSION).tar.gz +OPENRC_SITE = $(call github,OpenRC,openrc,$(OPENRC_VERSION)) +OPENRC_LICENSE = BSD-2-Clause +OPENRC_LICENSE_FILES = LICENSE + +OPENRC_DEPENDENCIES += ncurses + +ifeq ($(BR2_SHARED_LIBS),y) +OPENRC_MAKE_OPTS += MKSTATICLIBS=no +else +OPENRC_MAKE_OPTS += MKSTATICLIBS=yes +endif + +# 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 +OPENRC_MAKE_OPTS += LIBEXECDIR=/usr/libexec/rc +OPENRC_MAKE_OPTS += TARGETDIR=$(TARGET_DIR) +OPENRC_MAKE_OPTS += MKPKGCONFIG=no +OPENRC_MAKE_OPTS += MKSELINUX=no +OPENRC_MAKE_OPTS += MKSYSVINIT=yes +OPENRC_MAKE_OPTS += BRANDING="Buildroot $(BR2_VERSION_FULL)" +OPENRC_MAKE_OPTS += CC=$(TARGET_CC) + +define OPENRC_BUILD_CMDS + $(MAKE) $(OPENRC_MAKE_OPTS) -C $(@D) +endef + +define OPENRC_INSTALL_TARGET_CMDS + DESTDIR=$(TARGET_DIR) $(MAKE) $(OPENRC_MAKE_OPTS) -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))Signature · 6 lines
2.18.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/13 new package: openrc-0.41.2
Hello Yann,
Quoted 3 lines · Yann E. MORIN
Micha?, All,
Sorry for the long delay in replying to this series...
Nothing to worry about, really.
Quoted 16 lines
During the developers meetging this week-end, I've reworked most of your
series: https://patchwork.ozlabs.org/project/buildroot/list/?series=123190I've however left two patches behind:
- package/openrc: add support to set terminal encoding
- package/openrc: add support for setting terminal keymapWe've discussed those two patches, and we agree that the feature is very useful. However, we would like to have something that is not entirely specific to openrc.
Indeed, the config options (e.g.
BR2_TARGET_GENERIC_TERM_KEYMAP) should be available for all init systems. The only part that should be specific to each init system should be how the options are applied.
Quoted 6 lines
Finally, we would very much like to have run-time testing of openrc as an init system, like we have for busybox and systemd, see:
support/testing/tests/init/Would like to work on these two points, once the new series ahs been applied?
Yes, I can prepare tests and add generic support for setting terminal encoding and keymap.
Quoted 1 line
Thank you for your very valuable initial work! :-)
And thank you for tweaking my changes :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20190805/4959c672/attachment.asc>