From ee31f38742e2c64d6353f03bba0c16880989b11b Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 8 Sep 2018 23:05:26 +0100 Subject: sys-apps/openrc : import from hasufell, downgrade to 0.34.11 --- .../openrc/files/openrc-disable-cgroupsv2.patch | 12 ++ .../openrc/files/openrc-enable-rclogger.patch | 12 ++ packages/sys-apps/openrc/files/openrc.logrotate | 4 + .../sys-apps/openrc/files/start-stop-daemon.pam | 2 + packages/sys-apps/openrc/openrc-0.34.11.exheres-0 | 162 +++++++++++++++++++++ 5 files changed, 192 insertions(+) create mode 100644 packages/sys-apps/openrc/files/openrc-disable-cgroupsv2.patch create mode 100644 packages/sys-apps/openrc/files/openrc-enable-rclogger.patch create mode 100644 packages/sys-apps/openrc/files/openrc.logrotate create mode 100644 packages/sys-apps/openrc/files/start-stop-daemon.pam create mode 100644 packages/sys-apps/openrc/openrc-0.34.11.exheres-0 diff --git a/packages/sys-apps/openrc/files/openrc-disable-cgroupsv2.patch b/packages/sys-apps/openrc/files/openrc-disable-cgroupsv2.patch new file mode 100644 index 0000000..900ad4b --- /dev/null +++ b/packages/sys-apps/openrc/files/openrc-disable-cgroupsv2.patch @@ -0,0 +1,12 @@ +diff -Nur a/etc/rc.conf b/etc/rc.conf +--- a/etc/rc.conf 2017-10-10 19:38:12.000000000 +0100 ++++ b/etc/rc.conf 2017-10-22 09:24:59.365825762 +0100 +@@ -196,7 +196,7 @@ + # cgroups version 1 on /sys/fs/cgroup. + # "legacy" mounts cgroups version 1 on /sys/fs/cgroup + # "unified" mounts cgroups version 2 on /sys/fs/cgroup +-#rc_cgroup_mode="hybrid" ++rc_cgroup_mode="legacy" + + # This is a list of controllers which should be enabled for cgroups version 2. + # If hybrid mode is being used, controllers listed here will not be diff --git a/packages/sys-apps/openrc/files/openrc-enable-rclogger.patch b/packages/sys-apps/openrc/files/openrc-enable-rclogger.patch new file mode 100644 index 0000000..14f4caf --- /dev/null +++ b/packages/sys-apps/openrc/files/openrc-enable-rclogger.patch @@ -0,0 +1,12 @@ +diff -Nur a/etc/rc.conf b/etc/rc.conf +--- a/etc/rc.conf 2017-05-30 18:46:49.000000000 +0100 ++++ b/etc/rc.conf 2017-06-04 12:45:58.300189719 +0100 +@@ -48,7 +48,7 @@ + # /var/log/rc.log + # NOTE: Linux systems require the devfs service to be started before + # logging can take place and as such cannot log the sysinit runlevel. +-#rc_logger="NO" ++rc_logger="YES" + + # Through rc_log_path you can specify a custom log file. + # The default value is: /var/log/rc.log diff --git a/packages/sys-apps/openrc/files/openrc.logrotate b/packages/sys-apps/openrc/files/openrc.logrotate new file mode 100644 index 0000000..5e5e64b --- /dev/null +++ b/packages/sys-apps/openrc/files/openrc.logrotate @@ -0,0 +1,4 @@ +/var/log/rc.log { + missingok + notifempty +} diff --git a/packages/sys-apps/openrc/files/start-stop-daemon.pam b/packages/sys-apps/openrc/files/start-stop-daemon.pam new file mode 100644 index 0000000..2127f6a --- /dev/null +++ b/packages/sys-apps/openrc/files/start-stop-daemon.pam @@ -0,0 +1,2 @@ +account required pam_permit.so +session include system-services diff --git a/packages/sys-apps/openrc/openrc-0.34.11.exheres-0 b/packages/sys-apps/openrc/openrc-0.34.11.exheres-0 new file mode 100644 index 0000000..bd8e0c0 --- /dev/null +++ b/packages/sys-apps/openrc/openrc-0.34.11.exheres-0 @@ -0,0 +1,162 @@ +# Copyright 2018 Redcore Linux Project +# Distributed under the terms of the GNU General Public License v2 + +require bash-completion zsh-completion +require github + +SUMMARY="A dependency-based init system that works with the system-provided init program" +SLOT="0" +LICENCES="BSD-2" + +MYOPTIONS=" + ( providers: + runit + sinit + sysvinit + ) [[ + *description = [ provider for the init daemon ] + number-selected = at-most-one + ]] + ncurses + newnet [[ description = [ + Enable the new network stack (experimental) + ] ]] + pam +" + +PLATFORMS="~amd64 ~x86" + +DEPENDENCIES=" + build+run: + ncurses? ( sys-libs/ncurses ) + pam? ( sys-libs/pam ) + run: + providers:runit? ( sys-apps/runit ) + providers:sinit? ( sys-apps/sinit ) + providers:sysvinit? ( sys-apps/sysvinit ) +" + +REMOTE_IDS="github:OpenRC/${PN}" + +DEFAULT_SRC_PREPARE_PATCHES=( + "${FILES}"/openrc-enable-rclogger.patch + "${FILES}"/openrc-disable-cgroupsv2.patch +) + + +DEFAULT_SRC_COMPILE_PARAMS=( + LIBNAME=lib + LIBEXECDIR=/usr/$(exhost --target)/libexec/rc + OS=Linux +) + +DEFAULT_SRC_INSTALL_PARAMS=( + PREFIX=/usr/$(exhost --target) + SBINDIR=/usr/$(exhost --target)/bin + SYSCONFDIR=/etc + UPREFIX=/usr + INCDIR=/usr/$(exhost --target)/include + INCMODE=0755 + LIBDIR=/usr/$(exhost --target)/lib + SHLIBDIR=/usr/$(exhost --target)/lib + LIBMODE=0755 + BASHCOMPDIR=${BASHCOMPLETIONDIR} + ZSHCOMPDIR=${ZSHCOMPLETIONDIR} +) + +pkg_setup() { + exdirectory --allow /etc/sysctl.d +} + +src_prepare() { + default + + edo sed -e 's#readelf #${READELF:-readelf} #g' \ + -i src/test/runtests.sh +} + +src_compile() { + export BRANDING="Redcore Linux" + + export DEBUG= + export MKTERMCAP=$(optionv ncurses) + + export AR=$(exhost --tool-prefix)ar + export RANLIB=$(exhost --tool-prefix)ranlib + export CC=$(exhost --tool-prefix)cc + + MAKE_ARGS=" + ${DEFAULT_SRC_COMPILE_PARAMS[@]} + MKAUDIT=no + MKBASHCOMP=$(option bash-completion yes no) + MKNET=$(option newnet yes no) + MKPAM=$(optionv pam) + MKSELINUX=no + MKSTATICLIBS=no + MKSYSVINIT=no + MKZSHCOMP=$(option zsh-completion yes no) + " + + emake ${MAKE_ARGS} +} + +src_test() { + export READELF=$(exhost --tool-prefix)readelf + default +} + +src_install() { + emake \ + ${DEFAULT_SRC_INSTALL_PARAMS[@]} \ + ${MAKE_ARGS} \ + DESTDIR="${IMAGE}" install + + keepdir /usr/$(exhost --target)/libexec/rc/init.d + keepdir /usr/$(exhost --target)/libexec/rc/tmp + + dodir /usr/share/"${PN}" + edo cp -PR "${IMAGE}"/etc/runlevels "${IMAGE}"/usr/share/${PN} + rm -rf "${IMAGE}"/etc/runlevels + + insinto /etc/logrotate.d + newins "${FILES}"/openrc.logrotate openrc + + insinto /etc/pam.d + newins "${FILES}"/start-stop-daemon.pam start-stop-daemon + newins "${FILES}"/start-stop-daemon.pam supervise-daemon + + dodoc ChangeLog *.md + if option newnet; then + dodoc README.newnet + fi +} + +pkg_postinst() { + # Make our runlevels if they don't exist + if [[ ! -e "${ROOT}"etc/runlevels ]] || + [[ -e "${ROOT}"etc/runlevels/.add_boot_init.created ]] ; then + einfo "Copying across default runlevels" + cp -RPp "${ROOT}"usr/share/${PN}/runlevels "${ROOT}"etc + rm -f "${ROOT}"etc/runlevels/.add_boot_init.created + else + if [[ ! -e "${ROOT}"etc/runlevels/sysinit/devfs ]] ; then + mkdir -p "${ROOT}"etc/runlevels/sysinit + cp -RPp "${ROOT}"usr/share/${PN}/runlevels/sysinit/* \ + "${ROOT}"etc/runlevels/sysinit + fi + if [[ ! -e "${ROOT}"etc/runlevels/shutdown/mount-ro ]] ; then + mkdir -p "${ROOT}"etc/runlevels/shutdown + cp -RPp "${ROOT}"usr/share/${PN}/runlevels/shutdown/* \ + "${ROOT}"etc/runlevels/shutdown + fi + if [[ ! -e "${ROOT}"etc/runlevels/nonetwork/local ]]; then + cp -RPp "${ROOT}"usr/share/${PN}/runlevels/nonetwork \ + "${ROOT}"etc/runlevels + fi + fi + + # update the dependency tree after touching all files #224171 + [[ "${ROOT}" = "/" ]] && + "${ROOT}usr/$(exhost --target)/libexec"/rc/bin/rc-depend -u +} + -- cgit v1.2.3