diff options
author | David P <megver83@parabola.nu> | 2019-11-14 16:21:39 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2019-11-14 16:21:39 -0300 |
commit | ecba403684f0feec11a19117b3cd9da9e9e6e518 (patch) | |
tree | 35ba0161f9c78b20316bd259a651695ebd33cea6 /nonsystemd | |
parent | f1c2fe7e17b688f3ec312ce47aa8897f185c1f1d (diff) | |
download | abslibre-ecba403684f0feec11a19117b3cd9da9e9e6e518.tar.gz abslibre-ecba403684f0feec11a19117b3cd9da9e9e6e518.tar.bz2 abslibre-ecba403684f0feec11a19117b3cd9da9e9e6e518.zip |
nonsystemd/openrc: adopt some good stuff from pcr/openrc
and install halt.sh in openrc-sysvinit
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd')
-rw-r--r-- | nonsystemd/openrc/PKGBUILD | 107 | ||||
-rw-r--r-- | nonsystemd/openrc/opensysusers.initd | 18 | ||||
-rw-r--r-- | nonsystemd/openrc/opentmpfiles-dev.confd | 2 | ||||
-rw-r--r-- | nonsystemd/openrc/opentmpfiles-dev.initd | 20 | ||||
-rw-r--r-- | nonsystemd/openrc/opentmpfiles-setup.confd | 2 | ||||
-rw-r--r-- | nonsystemd/openrc/opentmpfiles-setup.initd | 19 |
6 files changed, 54 insertions, 114 deletions
diff --git a/nonsystemd/openrc/PKGBUILD b/nonsystemd/openrc/PKGBUILD index a2a5c4864..3a5623700 100644 --- a/nonsystemd/openrc/PKGBUILD +++ b/nonsystemd/openrc/PKGBUILD @@ -6,73 +6,58 @@ # Maintainer (Artix): Chris Cromer <cromer@artixlinux.org> # Contributor (Artix): williamh <williamh@gentoo.org> -_url="https://github.com/OpenRC/openrc/archive" - pkgbase=openrc pkgname=('openrc' 'openrc-bash-completions' 'openrc-zsh-completions' - 'openrc-init' 'openrc-sysvinit') + 'openrc-init' 'openrc-sysvinit' 'openrc-net') pkgver=0.42.1 -pkgrel=3 +pkgrel=4 pkgdesc="Gentoo's universal init system" arch=('x86_64' 'i686' 'armv7h') -url="http://www.gentoo.org/proj/en/base/openrc/" +url="https://github.com/OpenRC/openrc" license=('BSD2') -makedepends=('psmisc' 'pam' 'netifrc' 'opentmpfiles' 'zsh') -source=("${pkgbase}-${pkgver}.tar.gz::${_url}/${pkgver}.tar.gz" +source=("${pkgbase}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz" + "revert.patch::${url}/commit/1801561c2d36c330df7fd02c7508f503a61ff5ba.patch" "${pkgbase}.logrotate" 'openrc-hook' '30-openrc-upgrade.hook' '30-sysctl.hook' 'sysctl.conf' '30-binfmt.hook' - 'opentmpfiles-dev.initd' - 'opentmpfiles-setup.initd' - 'opentmpfiles-dev.confd' - 'opentmpfiles-setup.confd' - 'opensysusers.initd' 'kmod-static-nodes.initd' 'binfmt-sh.patch') sha256sums=('91a01ca6d930a0688fb91338209985de57cac7aa2d37feddacb78fd3d95308e2' + '5211012d0e1bdfc1a32113cee5a2eec3a2be4b3549f88216cdecbadd6ca46d81' '0b44210db9770588bd491cd6c0ac9412d99124c6be4c9d3f7d31ec8746072f5c' '624160cf29103f4df50c4764c246fe1eda6845f6307767ee1e1c90724336f41b' 'a3fda2186e023ae60c0e0d3806ffeb95effe675acea03cdfd0bf30e8f1c188d4' 'cb5bc649c2c9998300aff1e9862a9404b44e53178d153d68288603e99c5aaefe' '4170bcf3655ff6fb32b35fc592a4294a64d25df98d2f0f09f467689ed1ad54ea' '1f4cd15749ff89fd564e216ff0c1f9ff085e0200dba24d74e3de948f681bd80f' - 'c357e37ef59845954add9ccf89eff07beae0bd5274fdaa3ebf32da61c9d38436' - '68779b6f4d8f4bcc206ff0e7ddab2c4cbff029727404cffa94079c1bf06094c8' - '505b7fa013d90b1775439c06b6b0d420f877768cc59eaff5ffb1493a9e28b4ba' - '505b7fa013d90b1775439c06b6b0d420f877768cc59eaff5ffb1493a9e28b4ba' - '6476fd66ead2ad43129e3135656f4fde64addddabb6b7405665b3cf8db4aa6ad' '3ecbe7761b92a123a5a3d395ec3d9e090b0dfba7910a5987b4a2298c20a7e571' '3680546deb196de39a2ea4f7a3b30977773be011cc1f0285e64015f41c18e853') _args=( + BRANDING='Parabola GNU/Linux-libre' SYSCONFDIR=/etc PREFIX=/usr SBINDIR=/usr/bin - LIBEXECDIR=/usr/lib/openrc + LIBEXECDIR=/usr/lib/rc MKSELINUX=no MKPAM=pam MKTERMCAP=ncurses - MKNET=no MKSYSVINIT=yes MKBASHCOMP=yes MKZSHCOMP=yes MKPKGCONFIG=yes ) -if [ -f /usr/lib/os-release ]; then - . /usr/lib/os-release - _args+=(BRANDING="${NAME}") -else - _args+=(BRANDING='Unknown Linux') -fi - prepare(){ cd "${srcdir}/${pkgbase}-${pkgver}" sed -i 's:0444:0644:' mk/sys.mk patch -Np 1 -i ../binfmt-sh.patch + + # make bootmisc work with sysvinit too + patch -RNp1 -i ../revert.patch } check(){ @@ -86,15 +71,27 @@ build(){ } package_openrc() { - depends=('psmisc' 'pam' 'opentmpfiles' 'netifrc' 'openrc-pid1') + depends=('psmisc' 'pam' 'openrc-pid1') + optdepends=('openrc-net: OpenRC ("newnet") network management scripts' + 'netifrc: Gentoo ("oldnet") network management scripts') backup=('etc/rc.conf' + 'etc/conf.d/agetty' + 'etc/conf.d/bootmisc' 'etc/conf.d/consolefont' - 'etc/conf.d/keymaps' + 'etc/conf.d/devfs' + 'etc/conf.d/dmesg' + 'etc/conf.d/fsck' 'etc/conf.d/hostname' - 'etc/conf.d/modules' 'etc/conf.d/hwclock' - 'etc/conf.d/opentmpfiles-dev' - 'etc/conf.d/opentmpfiles-setup') + 'etc/conf.d/keymaps' + 'etc/conf.d/killprocs' + 'etc/conf.d/localmount' + 'etc/conf.d/modules' + 'etc/conf.d/mtab' + 'etc/conf.d/net-online' + 'etc/conf.d/netmount' + 'etc/conf.d/swap' + 'etc/conf.d/urandom') provides=('kmod-openrc') conflicts=('kmod-openrc' 'systemd-tools') replaces=('kmod-openrc') @@ -141,10 +138,10 @@ package_openrc() { for file in \ etc/init.d/agetty.tty{1..6} \ etc/runlevels/default/agetty.tty{1..6} \ - {usr,usr/lib/openrc}/bin/shutdown \ - {usr,usr/lib/openrc}/bin/reboot \ - {usr,usr/lib/openrc}/bin/halt \ - {usr,usr/lib/openrc}/bin/poweroff \ + {usr,usr/lib/rc}/bin/shutdown \ + {usr,usr/lib/rc}/bin/reboot \ + {usr,usr/lib/rc}/bin/halt \ + {usr,usr/lib/rc}/bin/poweroff \ usr/bin/openrc-{init,shutdown} \ usr/bin/init \ usr/share/man/man8/openrc-{init,shutdown}.8 @@ -153,22 +150,15 @@ package_openrc() { mv -v "${pkgdir}"/"${file}" "${srcdir}"/_init/"${file}" done + # split networking scripts + for file in etc/{init,conf}.d/{network,staticroute}; do + install -d "${srcdir}"/_net/"${file%/*}" + mv -v "${pkgdir}"/"${file}" "${srcdir}"/_net/"${file}" + done + install -d "${srcdir}"/_init/etc/conf.d cp -v "${pkgdir}"/etc/conf.d/agetty "${srcdir}"/_init/etc/conf.d/agetty - # sysusers & tmpfiles - install -m755 "${srcdir}"/opentmpfiles-dev.confd "${pkgdir}"/etc/conf.d/opentmpfiles-dev - install -m755 "${srcdir}"/opentmpfiles-dev.initd "${pkgdir}"/etc/init.d/opentmpfiles-dev - - install -m755 "${srcdir}"/opentmpfiles-setup.confd "${pkgdir}"/etc/conf.d/opentmpfiles-setup - install -m755 "${srcdir}"/opentmpfiles-setup.initd "${pkgdir}"/etc/init.d/opentmpfiles-setup - - install -m755 "${srcdir}"/opensysusers.initd "${pkgdir}"/etc/init.d/opensysusers - - ln -snf /etc/init.d/opensysusers "${pkgdir}"/etc/runlevels/boot/opensysusers - ln -snf /etc/init.d/opentmpfiles-dev "${pkgdir}"/etc/runlevels/sysinit/opentmpfiles-dev - ln -snf /etc/init.d/opentmpfiles-setup "${pkgdir}"/etc/runlevels/boot/opentmpfiles-setup - # kmod staticc nodes install -m755 "${srcdir}"/kmod-static-nodes.initd "${pkgdir}"/etc/init.d/kmod-static-nodes ln -snf /etc/init.d/kmod-static-nodes "${pkgdir}"/etc/runlevels/sysinit/kmod-static-nodes @@ -195,14 +185,12 @@ package_openrc-init() { conflicts=('openrc-pid1' 'init') backup=(etc/conf.d/agetty.tty{1..6}) - cd "${pkgbase}-${pkgver}" - mv -v "${srcdir}"/_init/* "${pkgdir}" # license - install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE + install -Dm644 "${pkgbase}-${pkgver}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE - for num in {1..6};do + for num in {1..6}; do cp -v ${pkgdir}/etc/conf.d/agetty ${pkgdir}/etc/conf.d/agetty.tty$num done rm ${pkgdir}/etc/conf.d/agetty @@ -220,6 +208,19 @@ package_openrc-sysvinit() { # license install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE - # sample sysvinit inittab install -Dm644 support/sysvinit/inittab "${pkgdir}"/etc/inittab + install -Dm755 support/sysvinit/halt.sh "${pkgdir}"/usr/bin/halt.sh + sed -i 's|/sbin|/usr/bin|g' "${pkgdir}"/etc/inittab "${pkgdir}"/usr/bin/halt.sh +} + +package_openrc-net() { + pkgdesc="OpenRC new-style networking" + depends=('openrc') + backup=('etc/conf.d/network' + 'etc/conf.d/staticroute') + + mv -v "${srcdir}"/_net/* "${pkgdir}" + + # license + install -Dm644 "${pkgbase}-${pkgver}"/LICENSE "${pkgdir}"/usr/share/licenses/"${pkgname}"/LICENSE } diff --git a/nonsystemd/openrc/opensysusers.initd b/nonsystemd/openrc/opensysusers.initd deleted file mode 100644 index 6aa2d61fd..000000000 --- a/nonsystemd/openrc/opensysusers.initd +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/openrc-run -# Copyright (c) 2017 - 2018 Chris Cromer -# Released under the 2-clause BSD license. - -description="Set up sysusers.d entries" - -depend() -{ - need localmount -} - -start() -{ - ebegin "Setting up sysusers.d entries" - /usr/bin/sysusers - eend $? -} - diff --git a/nonsystemd/openrc/opentmpfiles-dev.confd b/nonsystemd/openrc/opentmpfiles-dev.confd deleted file mode 100644 index 86558d435..000000000 --- a/nonsystemd/openrc/opentmpfiles-dev.confd +++ /dev/null @@ -1,2 +0,0 @@ -# Extra options to pass to tmpfiles -#tmpfiles_opts="" diff --git a/nonsystemd/openrc/opentmpfiles-dev.initd b/nonsystemd/openrc/opentmpfiles-dev.initd deleted file mode 100644 index 587d0e9ea..000000000 --- a/nonsystemd/openrc/opentmpfiles-dev.initd +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/openrc-run -# Copyright 1999-2012 Gentoo Foundation -# Released under the 2-clause BSD license. - -description="Set up tmpfiles.d entries for /dev" - -depend() -{ - provide tmpfiles-dev tmpfiles.dev - use dev-mount - before dev - keyword -prefix -vserver -} - -start() -{ - ebegin "Setting up tmpfiles.d entries for /dev" - tmpfiles --prefix=/dev --create --boot ${tmpfiles_opts} - eend $? -} diff --git a/nonsystemd/openrc/opentmpfiles-setup.confd b/nonsystemd/openrc/opentmpfiles-setup.confd deleted file mode 100644 index 86558d435..000000000 --- a/nonsystemd/openrc/opentmpfiles-setup.confd +++ /dev/null @@ -1,2 +0,0 @@ -# Extra options to pass to tmpfiles -#tmpfiles_opts="" diff --git a/nonsystemd/openrc/opentmpfiles-setup.initd b/nonsystemd/openrc/opentmpfiles-setup.initd deleted file mode 100644 index d36481f25..000000000 --- a/nonsystemd/openrc/opentmpfiles-setup.initd +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/openrc-run -# Copyright 1999-2012 Gentoo Foundation -# Released under the 2-clause BSD license. - -description="Set up tmpfiles.d entries" - -depend() -{ - provide tmpfiles-setup tmpfiles.setup - need localmount -} - -start() -{ - ebegin "Setting up tmpfiles.d entries" - tmpfiles --exclude-prefix=/dev --create --remove --boot \ - ${tmpfiles_opts} - eend $? -} |