From d77a1260a2dc01009548f1ed225235b1d767d591 Mon Sep 17 00:00:00 2001 From: Tyler Swagar Date: May 16 2022 18:22:23 +0000 Subject: [PATCH 1/89] updpkg: nonsystemd/elogind 246.10-1 --- diff --git a/nonsystemd/elogind/PKGBUILD b/nonsystemd/elogind/PKGBUILD index cf3e8cf..ee13812 100644 --- a/nonsystemd/elogind/PKGBUILD +++ b/nonsystemd/elogind/PKGBUILD @@ -6,6 +6,7 @@ # This package comes from Artix # Parabola changes: # - elogind and libelogind: do not provide {lib,}elogind=$pkgver, it's ridiculous +# - elogind: do not provide systemd-tools, openrc will conflict it # - libelogind: make libsystemd.so a copy of libelogind.so instead of linking it, # so in that way it will provide the correct version according to the # architecture (libsystemd.so=0-64 or libsystemd.so=0-32) @@ -14,20 +15,20 @@ pkgbase=elogind pkgname=('elogind' 'libelogind') pkgver=246.10 -pkgrel=2 +pkgrel=1 pkgdesc="The systemd project's logind, extracted to a standalone package" -arch=('x86_64') -arch+=('i686' 'armv7h') +arch=('x86_64' 'i686' 'armv7h') url="https://github.com/elogind/elogind" license=('GPL' 'LGPL2.1') -makedepends=('acl' 'intltool' 'libtool' 'gperf' 'gtk-doc' 'polkit' 'dbus' - 'libseccomp' 'meson' 'kexec-tools' 'openrc' 'libcap') +conflicts=('systemd-libsystemd') +makedepends=('intltool' 'libtool' 'gperf' 'gtk-doc' 'polkit' 'dbus' + 'libseccomp' 'meson' 'kexec-tools' 'openrc') options=('!libtool') source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/elogind/elogind/archive/v${pkgver}.tar.gz" - #'elogind.confd' 'elogind.initd' - 'elogind.sv.initd') + 'elogind.confd' 'elogind.initd') sha256sums=('c490dc158c8f5bca8d00ecfcc7ad5af24d1c7b9e59990a0b3b1323996221a922' - 'b4097e85f81f37d8529eb57563813e94b7c7afb9931d892907d805093187761b') + '344db76bf8aadfba4363c63aacd93c945a647bd5e425d756cbfd9cb4453afc66' + '2fc375b3aa61cb63b16c55840acaa69d26b16a01d393ee129d77c804efdac278') build() { local meson_options=( @@ -38,7 +39,6 @@ build() { -Ddefault-hierarchy=hybrid -Dcgroup-controller=openrc -Ddefault-kill-user-processes=false - -Dman=true ) arch-meson "$pkgbase-${pkgver}" build "${meson_options[@]}" @@ -52,46 +52,44 @@ check(){ package_elogind() { pkgdesc="The systemd project's logind, extracted to a standalone package" - provides=("systemd=${pkgver}" 'logind') - depends=('acl' 'dbus' 'libseccomp' 'libelogind' 'kexec-tools' 'udev') + provides=("systemd=${pkgver}") + depends=('pam' 'dbus' 'libseccomp' 'libelogind' 'kexec-tools' 'udev') optdepends=('polkit: polkit support') backup=('etc/elogind/logind.conf') provides+=("${pkgname}-openrc") - conflicts=('systemd-udev' "${pkgname}-openrc") + conflicts+=('systemd-udev' "${pkgname}-openrc") replaces=("${pkgname}-openrc") DESTDIR="$pkgdir" meson install -C build - ln -sfv libelogind.pc "${pkgdir}"/usr/lib/pkgconfig/libsystemd.pc + ln -sfv libelogind.pc ${pkgdir}/usr/lib/pkgconfig/libsystemd.pc - install -dm755 "${srcdir}"/_libelogind - mv -v "${pkgdir}"/usr/lib/libelogind*.so* "${srcdir}"/_libelogind + install -dm755 ${srcdir}/_libelogind + mv -v ${pkgdir}/usr/lib/libelogind*.so* ${srcdir}/_libelogind - install -d "${pkgdir}"/{etc,usr/lib}/elogind/{logind,sleep}.conf.d + # Init scripts + install -Dm755 ${srcdir}/elogind.initd ${pkgdir}/etc/init.d/elogind + install -Dm755 ${srcdir}/elogind.confd ${pkgdir}/etc/conf.d/elogind - # Init script - #install -Dm755 "${srcdir}"/elogind.initd "${pkgdir}"/etc/init.d/elogind - #install -Dm755 "${srcdir}"/elogind.confd "${pkgdir}"/etc/conf.d/elogind - install -Dm755 "${srcdir}"/elogind.sv.initd "${pkgdir}"/etc/init.d/elogind - - install -d "${pkgdir}"/etc/runlevels/boot - ln -sf /etc/init.d/elogind "${pkgdir}"/etc/runlevels/boot/elogind + install -d "${pkgdir}/etc/runlevels/boot" + ln -sf "/etc/init.d/elogind" "${pkgdir}/etc/runlevels/boot/elogind" } package_libelogind(){ pkgdesc="elogind client libraries" - provides=('libelogind.so' 'liblogind') - provides+=("libsystemd=${pkgver}" "systemd-libs=${pkgver}" + groups=('base-devel') + provides=('libelogind.so' + "libsystemd=${pkgver}" "systemd-libs=${pkgver}" 'libsystemd.so') - conflicts=('libsystemd.so') + conflicts+=('libsystemd.so') depends=('libcap' 'libudev') - cd "${pkgbase}-${pkgver}" + cd ${pkgbase}-${pkgver} - install -dm755 "${pkgdir}"/usr/lib - mv "${srcdir}"/_libelogind/libelogind*.so* "${pkgdir}"/usr/lib + install -dm755 ${pkgdir}/usr/lib + mv ${srcdir}/_libelogind/libelogind*.so* ${pkgdir}/usr/lib - install -m755 "${pkgdir}"/usr/lib/libelogind.so "${pkgdir}"/usr/lib/libsystemd.so - ln -sfv libsystemd.so "${pkgdir}"/usr/lib/libsystemd.so.0 + install -m755 ${pkgdir}/usr/lib/libelogind.so ${pkgdir}/usr/lib/libsystemd.so + ln -sfv libsystemd.so ${pkgdir}/usr/lib/libsystemd.so.0 } From 6704c83f90a33993a46c8ae8809d74905fccf5e7 Mon Sep 17 00:00:00 2001 From: Tyler Swagar Date: May 16 2022 18:22:23 +0000 Subject: [PATCH 2/89] updpkg: nonsystemd/openrc 0.43.3-1 --- diff --git a/nonsystemd/openrc/PKGBUILD b/nonsystemd/openrc/PKGBUILD index 7de97f7..eb0b0d2 100644 --- a/nonsystemd/openrc/PKGBUILD +++ b/nonsystemd/openrc/PKGBUILD @@ -9,42 +9,28 @@ pkgbase=openrc pkgname=('openrc' 'openrc-bash-completions' 'openrc-zsh-completions' 'openrc-init' 'openrc-sysvinit' 'openrc-net') -pkgver=0.42.1 -pkgrel=7 +pkgver=0.43.3 +pkgrel=1 pkgdesc="Gentoo's universal init system" arch=('x86_64' 'i686' 'armv7h') url="https://github.com/OpenRC/openrc" license=('BSD2') 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' - 'kmod-static-nodes.initd' - gcc-10-fix.patch::${url}/commit/375ef42393f3dc6edbaa2cb70c79b2366072db38.patch - supervise-daemon-fix.patch::${url}/commit/6deda13754f1b60245945e953cce8d97e40e86fc.patch - openrc-shutdown-fix.patch::${url}/commit/fd852865e06a74ecf8b77ff534fa8053e020160f.patch - posix-compliant-grep.patch::${url}/commit/a7e7fd2b37a7666f26c2d4de9386b2d04f583b41.patch - binfmt-fix.patch::${url}/commit/eb610859519292c6164c4ba601d22e642c306beb.patch - cgroup2-verify.patch::${url}/commit/87cfad3d6cd619c6090e8209092448ae68279b0c.patch) -sha256sums=('91a01ca6d930a0688fb91338209985de57cac7aa2d37feddacb78fd3d95308e2' - '5211012d0e1bdfc1a32113cee5a2eec3a2be4b3549f88216cdecbadd6ca46d81' + 'kmod-static-nodes.initd') +sha256sums=('968e81743a1de7a2348590b3b3286d6af5baf96da28fa1e6364e24f8203fc3b6' '0b44210db9770588bd491cd6c0ac9412d99124c6be4c9d3f7d31ec8746072f5c' '7de1e65f48ba31fc015cfb77be167b41aabdf0f20cb6617ecf3f4c3ca434c9e8' 'a3fda2186e023ae60c0e0d3806ffeb95effe675acea03cdfd0bf30e8f1c188d4' '28ec075d30096bd54499e994f76f8526460474f1e4c33607045c1a71b0684263' '860d5b9ae60e13633bd94023c222fa1ef918a02db3ce2e3255cdd6bb9eef047e' '28aa413fd78bca98bb23294eeb3f49149825a2c2f97a7ee10039385f5e8e50e9' - '3ecbe7761b92a123a5a3d395ec3d9e090b0dfba7910a5987b4a2298c20a7e571' - 'addb1bf115b811fba3d120f5c68535ec07f32a55e570b661f1e5575f74327bac' - '654dada5ffe56d6ae10d0ea4f9cb62c8c6c39a5398cd02561419a8bbf3f686b7' - '5576a8b6c9fbe79ede027ed053f922da60d1cbe818803677f5aa5532f98ffac4' - '46f6e809aabb629212a739af7f5177930e9c4a7f2adfdfc59911d778d3716ec9' - '7e5d7dc888327ef99637fa7207ac9470d72cc37198ddd7ba2cdf72d10a1c7031' - '41c6598da76bcdcdc8d9349f559bc6b587a6f6dec55bf7c79669af2b28af43e1') + '3ecbe7761b92a123a5a3d395ec3d9e090b0dfba7910a5987b4a2298c20a7e571') _args=( BRANDING='Parabola GNU/Linux-libre' @@ -64,15 +50,6 @@ _args=( prepare(){ cd "${srcdir}/${pkgbase}-${pkgver}" sed -i 's:0444:0644:' mk/sys.mk - patch -Np 1 -i ../gcc-10-fix.patch - patch -Np 1 -i ../supervise-daemon-fix.patch - patch -Np 1 -i ../openrc-shutdown-fix.patch - patch -Np 1 -i ../posix-compliant-grep.patch - patch -Np 1 -i ../binfmt-fix.patch - patch -Np 1 -i ../cgroup2-verify.patch - - # make bootmisc work with sysvinit too - patch -RNp1 -i ../revert.patch } check(){ From 86f9ebd92f56f5989492d4eb512432c456581fbf Mon Sep 17 00:00:00 2001 From: Tyler Swagar Date: May 16 2022 18:22:23 +0000 Subject: [PATCH 3/89] updpkg: nonsystemd/networkmanager 1.30.4-3.nonsystemd1 --- diff --git a/nonsystemd/networkmanager/PKGBUILD b/nonsystemd/networkmanager/PKGBUILD index dc667e6..72d9a3e 100644 --- a/nonsystemd/networkmanager/PKGBUILD +++ b/nonsystemd/networkmanager/PKGBUILD @@ -7,29 +7,27 @@ # Contributor (Arch): Valentine Sinitsyn pkgbase=networkmanager -pkgname=(networkmanager libnm nm-cloud-setup) -pkgver=1.32.2 -pkgrel=1 +pkgname=(networkmanager libnm) +pkgver=1.30.4 +pkgrel=3 pkgrel+=.nonsystemd1 pkgdesc="Network connection manager and user applications" url="https://wiki.gnome.org/Projects/NetworkManager" -arch=(x86_64) -arch+=(i686 armv7h) -license=(GPL2) +arch=(x86_64 i686 armv7h) +license=(GPL2 LGPL2.1) _pppver=2.4.9 -makedepends=(intltool dhclient dhcpcd iptables-nft gobject-introspection gtk-doc - "ppp=$_pppver" modemmanager iproute2 nss polkit wpa_supplicant curl - logind libmm-glib libnewt libndp libteam nftables vala perl-yaml - python-gobject git vala jansson bluez-libs glib2-docs iwd dnsmasq - openresolv libpsl audit meson) +makedepends=(intltool dhclient iptables gobject-introspection gtk-doc "ppp=$_pppver" modemmanager + iproute2 nss polkit wpa_supplicant curl elogind libmm-glib + libnewt libndp libteam vala perl-yaml python-gobject git vala jansson bluez-libs + glib2-docs dhcpcd iwd dnsmasq openresolv libpsl audit meson) checkdepends=(libx11 python-dbus) -_commit=bf1b09702ed442a3efe426c8ceba4ef1e6bb1902 # tags/1.20.6^0 +_commit=a3e45da9f984d58e3b76d6ca064033541d819eca # tags/1.30.4^0 source=("git+https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git#commit=$_commit" NetworkManager.{confd,initd} 10-openrc-status) sha256sums=('SKIP' '4594573f01fe5e04b6dde4525796acf909158591bdcefd662ec23fe0d1c3e1bd' - 'eaf7d210540ed9f4c6b4ba81ddbb30a2aa5ce8b528057f7d64ce3478981f88e4' - 'd32a21c0683cf7a09370b35b7e3d3b3f28f5d4d242ecde2c866cfb400b94bcbe') + '861445d46e8863dca26a91018da3dd9fee6a64467a93e7512774dfd88914539d' + '1535237db113a76261d6f1ce0b24a55e956934b0c1c59e9fd624f621961327b6') pkgver() { cd NetworkManager @@ -38,53 +36,44 @@ pkgver() { prepare() { cd NetworkManager + + # https://bugs.archlinux.org/task/70710 + git cherry-pick -n 8acad5a20cc61081438294efc634c0e245452e35 } build() { local meson_args=( - # system paths -D dbus_conf_dir=/usr/share/dbus-1/system.d - - # platform -D dist_version="$pkgver-$pkgrel" -D session_tracking_consolekit=false -D suspend_resume=elogind -D modify_system=true -D polkit_agent=true -D selinux=false - -D systemdsystemunitdir=no - -D session_tracking=elogind - -D systemd_journal=false - - # features -D iwd=true -D pppd_plugin_dir=/usr/lib/pppd/$_pppver -D teamdctl=true - -D nm_cloud_setup=true -D bluez5_dun=true -D ebpf=true - - # configuration plugins -D config_plugins_default=keyfile - - # handlers for resolv.conf - -D netconfig=no - -D config_dns_rc_manager_default=symlink - - # miscellaneous -D vapi=true -D docs=true -D more_asserts=no -D more_logging=false -D qt=false + -D systemdsystemunitdir=no + -D session_tracking=elogind + -D systemd_journal=false ) arch-meson NetworkManager build "${meson_args[@]}" - meson compile -C build + ninja -C build } check() { - meson test -C build --print-errorlogs + # iproute2 bug + # https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/be76d8b624fab99cbd76092ff511e6adc305279c + meson test -C build --print-errorlogs || : } _pick() { @@ -99,77 +88,58 @@ _pick() { package_networkmanager() { depends=(libnm iproute2 polkit wpa_supplicant libmm-glib libnewt libndp libteam curl - bluez-libs libpsl audit mobile-broadband-provider-info elogind) + bluez-libs libpsl audit elogind) optdepends=('dnsmasq: connection sharing' - 'nftables: connection sharing' - 'iptables: connection sharing' 'bluez: Bluetooth support' 'ppp: dialup connection support' 'modemmanager: cellular network support' - 'iwd: wpa_supplicant alternative' - 'dhclient: alternative DHCP client' - 'dhcpcd: alternative DHCP client' - 'openresolv: alternative resolv.conf manager' - 'firewalld: firewall support') + 'iwd: wpa_supplicant alternative') provides=($pkgname-{elogind,openrc}) replaces=($pkgname-{elogind,openrc}) backup=(etc/NetworkManager/NetworkManager.conf) + groups=(gnome) - meson install -C build --destdir "$pkgdir" - - cd "$pkgdir" + DESTDIR="$pkgdir" meson install -C build # /etc/NetworkManager - install -d etc/NetworkManager/{conf,dnsmasq}.d - install -dm700 etc/NetworkManager/system-connections - install -m644 /dev/stdin etc/NetworkManager/NetworkManager.conf < Date: May 16 2022 18:22:23 +0000 Subject: [PATCH 4/89] [polkit]: CVE-2021-4034 --- diff --git a/nonsystemd/polkit/PKGBUILD b/nonsystemd/polkit/PKGBUILD index 133fcb7..9ea8cf1 100644 --- a/nonsystemd/polkit/PKGBUILD +++ b/nonsystemd/polkit/PKGBUILD @@ -2,63 +2,66 @@ # Maintainer (Arch): Jan de Groot pkgname=polkit -pkgver=0.118 -pkgrel=1 +pkgver=0.120 +pkgrel=4 pkgrel+=.nonsystemd1 pkgdesc="Application development toolkit for controlling system-wide privileges" arch=(x86_64 i686 armv7h) license=(LGPL) url="https://www.freedesktop.org/wiki/Software/polkit/" depends=(glib2 pam expat elogind js78) -makedepends=(intltool gtk-doc gobject-introspection git autoconf-archive) +makedepends=(meson gtk-doc gobject-introspection git) backup=(etc/pam.d/polkit-1) provides=(polkit-elogind) replaces=(polkit-elogind polkit-consolekit) -_commit=ff4c2144f0fb1325275887d9e254117fcd8a1b52 # git tag 0.118 +_commit=92b910ce2273daf6a76038f6bd764fa6958d4e8e # tags/0.120 source=("git+https://gitlab.freedesktop.org/polkit/polkit.git#commit=$_commit" '99-parabola.rules' - 'elogind-configure-fix.patch') + 'elogind-configure-fix.patch' + 'meson-0.61.diff') sha256sums=('SKIP' 'd28d6ecaf7682860e2b3768bb266bd94313546b7cd0ef3c2eace7b1576c47adb' - 'd90b2a95aa3e9e1ebf9369c038c144e04900e095c5405bc4ba4901c31bf3f59b') + 'd90b2a95aa3e9e1ebf9369c038c144e04900e095c5405bc4ba4901c31bf3f59b' + '45d08bbb76e1e22ca8e698df04652b7aceaded34f9b76ce6b68152fb26b0de8d') pkgver() { - cd $pkgname + cd polkit git describe --tags | sed 's/-/+/g' } prepare() { - cd $pkgname + cd polkit patch -Np 1 -i ${srcdir}/elogind-configure-fix.patch - NOCONFIGURE=1 ./autogen.sh -} - -build() { - cd $pkgname - ./configure --prefix=/usr --sysconfdir=/etc \ - --localstatedir=/var --libexecdir=/usr/lib \ - --enable-libsystemd-login=no --disable-static \ - --enable-libelogind=yes --with-systemdsystemunitdir=no \ - --enable-gtk-doc --with-os-type=redhat + # CVE-2021-4034 + git cherry-pick -n a2bf5c9c83b6ae46cbd5c779d3055bff81ded683 - sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + # Fix build with Meson 0.61.0 + git apply -3 ../meson-0.61.diff +} - make +build() { + arch-meson polkit build \ + --prefix=/usr \ + -D session_tracking=libelogind \ + -D systemdsystemunitdir=no \ + -D os_type=redhat \ + -D examples=true \ + -D tests=true \ + -D gtk_doc=true \ + -D man=true + meson compile -C build } check() { - cd $pkgname - make -k check || : + meson test -C build --print-errorlogs -t 3 } package() { - cd $pkgname - make DESTDIR="$pkgdir" install \ - dbusconfdir=/usr/share/dbus-1/system.d \ - rulesdir=/usr/share/polkit-1/rules.d + meson install -C build --destdir "$pkgdir" install -d -o root -g 102 -m 750 "$pkgdir"/{etc,usr/share}/polkit-1/rules.d + mv "$pkgdir"/{etc,usr/share}/polkit-1/rules.d/50-default.rules install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" < Date: May 16 2022 18:22:23 +0000 Subject: [PATCH 5/89] [polkit]: WIP --- diff --git a/nonsystemd/polkit/PKGBUILD b/nonsystemd/polkit/PKGBUILD index 9ea8cf1..19f45a9 100644 --- a/nonsystemd/polkit/PKGBUILD +++ b/nonsystemd/polkit/PKGBUILD @@ -1,26 +1,30 @@ # Maintainer: David P. -# Maintainer (Arch): Jan de Groot +# Maintainer (arch): Jan Alexander Steffens (heftig) +# Contributor: Jan de Groot pkgname=polkit pkgver=0.120 -pkgrel=4 +pkgrel=3 pkgrel+=.nonsystemd1 pkgdesc="Application development toolkit for controlling system-wide privileges" -arch=(x86_64 i686 armv7h) +arch=(x86_64) +arch+=(i686 armv7h) license=(LGPL) url="https://www.freedesktop.org/wiki/Software/polkit/" -depends=(glib2 pam expat elogind js78) +depends=(glib2 pam expat systemd js78) +depends=( ${depends[*]/systemd/elogind}) makedepends=(meson gtk-doc gobject-introspection git) +checkdepends=(python-dbusmock) backup=(etc/pam.d/polkit-1) provides=(polkit-elogind) replaces=(polkit-elogind polkit-consolekit) _commit=92b910ce2273daf6a76038f6bd764fa6958d4e8e # tags/0.120 -source=("git+https://gitlab.freedesktop.org/polkit/polkit.git#commit=$_commit" - '99-parabola.rules' - 'elogind-configure-fix.patch' - 'meson-0.61.diff') -sha256sums=('SKIP' - 'd28d6ecaf7682860e2b3768bb266bd94313546b7cd0ef3c2eace7b1576c47adb' +source=("git+https://gitlab.freedesktop.org/polkit/polkit.git#commit=$_commit") +source+=('99-parabola.rules' + 'elogind-configure-fix.patch' + 'meson-0.61.diff') +sha256sums=('SKIP') +sha256sums=('d28d6ecaf7682860e2b3768bb266bd94313546b7cd0ef3c2eace7b1576c47adb' 'd90b2a95aa3e9e1ebf9369c038c144e04900e095c5405bc4ba4901c31bf3f59b' '45d08bbb76e1e22ca8e698df04652b7aceaded34f9b76ce6b68152fb26b0de8d') From 7a00200e0ecbeafe3c63a9b97daf878fcd1b578e Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 15:06:10 +0000 Subject: [PATCH 6/89] apache-openrc --- diff --git a/nonsystemd/apache-openrc/PKGBUILD b/nonsystemd/apache-openrc/PKGBUILD new file mode 100644 index 0000000..0a30db7 --- /dev/null +++ b/nonsystemd/apache-openrc/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: artoo + +pkgname=apache-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC apache init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('apache' 'openrc') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/httpd') +source=("httpd.initd" + "httpd.confd") +sha512sums=('3fb9e5ed081d921019e3b2287d6e3655cb299c28be653a7a52c15859bdaca12c14c22380e1573426e36d39295b0fb2d5dcdc030fded55ab8f5e88424156ffbd5' + 'fb28f9b4290e67b1ff650c1929682f41d7cb98b4d4f257a98062b2217b2ede4895818a6e97b90b7e151f9ab22f5e6fdcd08ca74fa66696b6effcb762c86e2f1e') + +package() { + install -Dm755 "${srcdir}"/httpd.initd "${pkgdir}"/etc/init.d/httpd + install -Dm644 "${srcdir}"/httpd.confd "${pkgdir}"/etc/conf.d/httpd + + sed -e 's|/usr/sbin/apache2|/usr/bin/apachectl|' \ + -e 's|/etc/apache2/httpd.conf|/etc/httpd/conf/httpd.conf|' \ + -e 's/! test -f/test -f/' \ + -e 's|/usr/lib/apache2|/usr/lib/httpd|' \ + -e 's|apache2.pid|httpd/httpd.pid|' \ + -e 's|apache2 >/dev/null|httpd >/dev/null|' \ + -e 's|/run/apache_ssl_mutex|/run/httpd|' \ + -i "${pkgdir}/etc/init.d/httpd" + + sed -e 's|/etc/apache2/httpd.conf|/etc/httpd/conf/httpd.conf|' \ + -e 's|/usr/lib/apache2|/usr/lib/httpd|' \ + -e 's|apache2.pid|httpd/httpd.pid|' \ + -e 's|apache2|httpd|g' \ + -i "${pkgdir}/etc/conf.d/httpd" +} diff --git a/nonsystemd/apache-openrc/httpd.confd b/nonsystemd/apache-openrc/httpd.confd new file mode 100644 index 0000000..c7b38ab --- /dev/null +++ b/nonsystemd/apache-openrc/httpd.confd @@ -0,0 +1,74 @@ +# /etc/conf.d/httpd: config file for /etc/init.d/httpd + +# When you install a module it is easy to activate or deactivate the modules +# and other features of apache using the APACHE2_OPTS line. Every module should +# install a configuration in /etc/httpd/modules.d. In that file will have an +# directive where NNN is the option to enable that module. +# +# Here are the options available in the default configuration: +# +# AUTH_DIGEST Enables mod_auth_digest +# AUTHNZ_LDAP Enables authentication through mod_ldap (available if USE=ldap) +# CACHE Enables mod_cache +# DAV Enables mod_dav +# ERRORDOCS Enables default error documents for many languages. +# INFO Enables mod_info, a useful module for debugging +# LANGUAGE Enables content-negotiation based on language and charset. +# LDAP Enables mod_ldap (available if USE=ldap) +# MANUAL Enables /manual/ to be the apache manual (available if USE=docs) +# MEM_CACHE Enables default configuration mod_mem_cache +# PROXY Enables mod_proxy +# SSL Enables SSL (available if USE=ssl) +# STATUS Enabled mod_status, a useful module for statistics +# SUEXEC Enables running CGI scripts (in USERDIR) through suexec. +# USERDIR Enables /~username mapping to /home/username/public_html +# +# +# The following two options provide the default virtual host for the HTTP and +# HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache +# will not listen for incomming connections on the approriate port. +# +# DEFAULT_VHOST Enables name-based virtual hosts, with the default +# virtual host being in /var/www/localhost/htdocs +# SSL_DEFAULT_VHOST Enables default vhost for SSL (you should enable this +# when you enable SSL) +# +APACHE2_OPTS="-D DEFAULT_VHOST -D LANGUAGE -D INFO" + +# Extended options for advanced uses of Apache ONLY +# You don't need to edit these unless you are doing crazy Apache stuff +# As not having them set correctly, or feeding in an incorrect configuration +# via them will result in Apache failing to start +# YOU HAVE BEEN WARNED. + +# PID file +#PIDFILE=/run/httpd/httpd.pid + +# timeout for startup/shutdown checks +#TIMEOUT=10 + +# ServerRoot setting +#SERVERROOT=/usr/lib/httpd + +# Configuration file location +# - If this does NOT start with a '/', then it is treated relative to +# $SERVERROOT by Apache +#CONFIGFILE=/etc/httpd/conf/httpd.conf + +# Location to log startup errors to +# They are normally dumped to your terminal. +#STARTUPERRORLOG="/var/log/httpd/startuperror.log" + +# A command that outputs a formatted text version of the HTML at the URL +# of the command line. Designed for lynx, however other programs may work. +#LYNX="lynx -dump" + +# The URL to your server's mod_status status page. +# Required for status and fullstatus +#STATUSURL="http://localhost/server-status" + +# Method to use when reloading the server +# Valid options are 'restart' and 'graceful' +# See http://httpd.apache.org/docs/2.2/stopping.html for information on +# what they do and how they differ. +#RELOAD_TYPE="graceful" diff --git a/nonsystemd/apache-openrc/httpd.initd b/nonsystemd/apache-openrc/httpd.initd new file mode 100644 index 0000000..9e504e5 --- /dev/null +++ b/nonsystemd/apache-openrc/httpd.initd @@ -0,0 +1,181 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="configtest modules virtualhosts" +extra_started_commands="configdump fullstatus graceful gracefulstop reload" + +description_configdump="Dumps the configuration of the runing apache server. Requires server-info to be enabled and www-client/lynx." +description_configtest="Run syntax tests for configuration files." +description_fullstatus="Gives the full status of the server. Requires lynx and server-status to be enabled." +description_graceful="A graceful restart advises the children to exit after the current request and reloads the configuration." +description_gracefulstop="A graceful stop advises the children to exit after the current request and stops the server." +description_modules="Dump a list of loaded Static and Shared Modules." +description_reload="Kills all children and reloads the configuration." +description_virtualhosts="Show the settings as parsed from the config file (currently only shows the virtualhost settings)." +description_stop="Kills all children and stops the server." + +# Apply default values for some conf.d variables. +PIDFILE="${PIDFILE:-/run/httpd/httpd.pid}" +TIMEOUT=${TIMEOUT:-15} +SERVERROOT="${SERVERROOT:-/usr/lib/httpd}" +CONFIGFILE="${CONFIGFILE:-/etc/httpd/conf/httpd.conf}" +LYNX="${LYNX:-lynx -dump}" +STATUSURL="${STATUSURL:-http://localhost/server-status}" +RELOAD_TYPE="${RELOAD_TYPE:-graceful}" + +# Append the server root and configuration file parameters to the +# user's APACHE2_OPTS. +APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}" +APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}" + +# The path to the apache2 binary. +APACHE2="/usr/bin/apachectl" + +depend() { + need net + use dns entropy logger mysql netmount postgresql + after sshd +} + +configtest() { + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +checkconfd() { + if [ ! -d ${SERVERROOT} ]; then + eerror "SERVERROOT does not exist: ${SERVERROOT}" + return 1 + fi +} + +checkconfig() { + checkpath --directory /run/httpd + checkconfd || return 1 + + OUTPUT=$( ${APACHE2} ${APACHE2_OPTS} -t 2>&1 ) + ret=$? + if [ $ret -ne 0 ]; then + eerror "${SVCNAME} has detected an error in your setup:" + printf "%s\n" "${OUTPUT}" + fi + + return $ret +} + +start() { + checkconfig || return 1 + + if [ -n "${STARTUPERRORLOG}" ] ; then + # We must make sure that we only append to APACHE2_OPTS + # in start() and not in stop() or anywhere else that may + # be executed along with start(), see bug #566726. + APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}" + fi + + ebegin "Starting ${SVCNAME}" + # Use start stop daemon to apply system limits #347301 + start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start + + local i=0 retval=1 + while [ $i -lt ${TIMEOUT} ] ; do + if [ -e "${PIDFILE}" ] ; then + retval=0 + break + fi + sleep 1 && i=$(expr $i + 1) + done + + eend ${retval} +} + +stop() { + if [ "${RC_CMD}" = "restart" ]; then + checkconfig || return 1 + fi + + PID=$(cat "${PIDFILE}" 2>/dev/null) + if [ -z "${PID}" ]; then + einfo "${SVCNAME} not running (no pid file)" + return 0 + fi + + ebegin "Stopping ${SVCNAME}" + ${APACHE2} ${APACHE2_OPTS} -k stop + + local i=0 retval=0 + while ( test -f "${PIDFILE}" || pgrep -P ${PID} httpd >/dev/null ) \ + && [ $i -lt ${TIMEOUT} ]; do + sleep 1 && i=$(expr $i + 1) + done + [ -e "${PIDFILE}" ] && retval=1 + + eend ${retval} +} + +reload() { + checkconfig || return 1 + + if [ "${RELOAD_TYPE}" = "restart" ]; then + ebegin "Restarting ${SVCNAME}" + ${APACHE2} ${APACHE2_OPTS} -k restart + eend $? + elif [ "${RELOAD_TYPE}" = "graceful" ]; then + ebegin "Gracefully restarting ${SVCNAME}" + ${APACHE2} ${APACHE2_OPTS} -k graceful + eend $? + else + eerror "${RELOAD_TYPE} is not a valid RELOAD_TYPE. Please edit /etc/conf.d/${SVCNAME}" + fi +} + +graceful() { + checkconfig || return 1 + ebegin "Gracefully restarting ${SVCNAME}" + ${APACHE2} ${APACHE2_OPTS} -k graceful + eend $? +} + +gracefulstop() { + checkconfig || return 1 + ebegin "Gracefully stopping ${SVCNAME}" + ${APACHE2} ${APACHE2_OPTS} -k graceful-stop + eend $? +} + +modules() { + checkconfig || return 1 + ${APACHE2} ${APACHE2_OPTS} -M 2>&1 +} + +fullstatus() { + if ! command -v $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then + eerror "lynx not found! you need to emerge www-client/lynx" + else + ${LYNX} ${STATUSURL} + fi +} + +virtualhosts() { + checkconfig || return 1 + ${APACHE2} ${APACHE2_OPTS} -S +} + +configdump() { + INFOURL="${INFOURL:-http://localhost/server-info}" + + checkconfd || return 1 + + if ! command -v $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then + eerror "lynx not found! you need to emerge www-client/lynx" + else + echo "${APACHE2} started with '${APACHE2_OPTS}'" + for i in config server list; do + ${LYNX} "${INFOURL}/?${i}" | sed '/Apache Server Information/d;/^[[:space:]]\+[_]\+$/Q' + done + fi +} + +# vim: ts=4 filetype=gentoo-init-d From ab178976bbeb8bbf140dea2ac9cd1879ae60c07d Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 15:08:36 +0000 Subject: [PATCH 7/89] bind-openrc --- diff --git a/nonsystemd/bind-openrc/PKGBUILD b/nonsystemd/bind-openrc/PKGBUILD new file mode 100644 index 0000000..5488440 --- /dev/null +++ b/nonsystemd/bind-openrc/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: artoo + +pkgname=bind-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC bind init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'bind') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/named') +source=("named.confd" + "named.initd") +sha512sums=('68fa7c8963ac59349de3d05972c07aa0123b7bebbe0ba9604463ccfd1b377c2babe01eed4745cbe0f7d3831d1b47c2fa620f8092c67465fb771cae4932b0861a' + '0cda69fd663e1847be52d83bfb2749eeffa26b01cbaea5f9e0c9f82d540a13843b1f1f5ad494d29b6aae82ef7ab6c31396bcb4066c33afe2c00e27823cbe7110') + +package() { + install -Dm755 "${srcdir}"/named.initd "${pkgdir}"/etc/init.d/named + install -Dm644 "${srcdir}"/named.confd "${pkgdir}"/etc/conf.d/named +} diff --git a/nonsystemd/bind-openrc/named.confd b/nonsystemd/bind-openrc/named.confd new file mode 100644 index 0000000..477a480 --- /dev/null +++ b/nonsystemd/bind-openrc/named.confd @@ -0,0 +1,48 @@ +# Set various named options here. +# +#OPTIONS="" + +# Set this to the number of processors you want bind to use. +# Leave this unchanged if you want bind to automatically detect the number +#CPU="1" + +# If you wish to run bind in a chroot: +# 1) un-comment the CHROOT= assignment, below. You may use +# a different chroot directory but MAKE SURE it's empty. +# 2) run: emerge --config = +# +#CHROOT="/chroot/dns" + +# Uncomment to enable binmount of /usr/share/GeoIP +#CHROOT_GEOIP="1" + +# Uncomment the line below to avoid that the init script mounts the needed paths +# into the chroot directory. +# You have to copy all needed config files by hand if you say CHROOT_NOMOUNT="1". +#CHROOT_NOMOUNT="1" + +# Uncomment this option if you have setup your own chroot environment and you +# don't want/need the chroot consistency check +#CHROOT_NOCHECK=1 + +# Default pid file location +PIDFILE="${CHROOT}/run/named/named.pid" + +# Scheduling priority: 19 is the lowest and -20 is the highest. +# Default: 0 +#NAMED_NICELEVEL="0" + +# Uncomment rc_named_use/rc_named_after for the database you need. +# Its necessary to ensure the database backend will be started before named. + +# MySQL +#rc_named_use="mysql" +#rc_named_after="mysql" + +# PostgreSQL +#rc_named_use="pg_autovacuum postgresql" +#rc_named_after="pg_autovacuum postgresql" + +# LDAP +#rc_named_use="ldap" +#rc_named_after="ldap" diff --git a/nonsystemd/bind-openrc/named.initd b/nonsystemd/bind-openrc/named.initd new file mode 100644 index 0000000..243a3fa --- /dev/null +++ b/nonsystemd/bind-openrc/named.initd @@ -0,0 +1,252 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="checkconfig checkzones" +extra_started_commands="reload" + +depend() { + need net + use logger + provide dns +} + +NAMED_CONF=${CHROOT}/etc/named.conf + +OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0} +MOUNT_CHECK_TIMEOUT=${MOUNT_CHECK_TIMEOUT:-60} + +_mount() { + local from + local to + local opts + local ret=0 + + if [ "${#}" -lt 3 ]; then + eerror "_mount(): to few arguments" + return 1 + fi + + from=$1 + to=$2 + shift 2 + + opts="${*}" + shift $# + + if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then + einfo "mounting ${from} to ${to}" + mount ${from} ${to} ${opts} + ret=$? + + eend $ret + return $ret + fi + + return 0 +} + +_umount() { + local dir=$1 + local ret=0 + + if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then + ebegin "umounting ${dir}" + umount ${dir} + ret=$? + + eend $ret + return $ret + fi + + return 0 +} + +_get_pidfile() { + # as suggested in bug #107724, bug 335398#c17 + [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\ + /usr/bin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} | grep 'pid-file' | cut -d\" -f2) + [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/run/named/named.pid +} + +check_chroot() { + if [ -n "${CHROOT}" ]; then + [ ! -d "${CHROOT}" ] && return 1 + [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1 + [ ! -d "${CHROOT}/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1 + [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1 + [ ! -d "${CHROOT}/var/log/named" ] && return 1 + [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1 + [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1 + [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1 + if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then + if [ -d "/usr/lib64" ]; then + [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1 + elif [ -d "/usr/lib" ]; then + [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1 + fi + fi + fi + + return 0 +} + +checkconfig() { + ebegin "Checking named configuration" + + if [ ! -f "${NAMED_CONF}" ] ; then + eerror "No ${NAMED_CONF} file exists!" + return 1 + fi + + /usr/bin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} || { + eerror "named-checkconf failed! Please fix your config first." + return 1 + } + + eend 0 + return 0 +} + +checkzones() { + ebegin "Checking named configuration and zones" + /usr/bin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} + eend $? +} + +start() { + local piddir + + ebegin "Starting ${CHROOT:+chrooted }named" + + if [ -n "${CHROOT}" ]; then + if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then + check_chroot || { + eend 1 + eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" + return 1 + } + fi + + if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then + if [ ! -e /usr/lib/engines/libgost.so ]; then + eend 1 + eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support" + return 1 + fi + cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || { + eend 1 + eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'" + return 1 + } + fi + cp -Lp /etc/localtime "${CHROOT}/etc/localtime" + + if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then + einfo "Mounting chroot dirs" + _mount /etc/bind ${CHROOT}/etc/bind -o bind + _mount /var/bind ${CHROOT}/var/bind -o bind + _mount /var/log/named ${CHROOT}/var/log/named -o bind + if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then + _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind + fi + fi + + # On initial startup, if piddir inside the chroot /run/named + # Then the .../run part might not exist yet + checkpath -q -d -o root:root -m 0755 "${piddir}/.." + fi + + checkconfig || { eend 1; return 1; } + + # create piddir (usually /run/named) if necessary, bug 334535 + _get_pidfile + piddir="${PIDFILE%/*}" + checkpath -q -d -o root:named -m 0770 "${piddir}" || { + eerror "Failed to create PID directory at $piddir" + eend 1 + return 1 + } + + # In case someone have $CPU set in /etc/conf.d/named + if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then + CPU="-n ${CPU}" + fi + + start-stop-daemon --start --pidfile ${PIDFILE} \ + --nicelevel ${NAMED_NICELEVEL:-0} \ + --exec /usr/bin/named \ + -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT} + eend $? +} + +stop() { + local reported=0 + + ebegin "Stopping ${CHROOT:+chrooted }named" + + # Workaround for now, until openrc's restart has been fixed. + # openrc doesn't care about a restart() function in init scripts. + if [ "${RC_CMD}" = "restart" ]; then + if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then + check_chroot || { + eend 1 + eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" + return 1 + } + fi + + checkconfig || { eend 1; return 1; } + fi + + # -R 10, bug 335398 + _get_pidfile + start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \ + --exec /usr/bin/named + + if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then + ebegin "Umounting chroot dirs" + + # just to be sure everything gets clean + while fuser -s ${CHROOT} 2>/dev/null; do + if [ "${reported}" -eq 0 ]; then + einfo "Waiting until all named processes are stopped (max. ${MOUNT_CHECK_TIMEOUT} seconds)" + elif [ "${reported}" -eq "${MOUNT_CHECK_TIMEOUT}" ]; then + eerror "Waiting until all named processes are stopped failed!" + eend 1 + break + fi + sleep 1 + reported=$((reported+1)) + done + + [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP + _umount ${CHROOT}/etc/bind + _umount ${CHROOT}/var/log/named + _umount ${CHROOT}/var/bind + fi + + eend $? +} + +reload() { + local ret + + ebegin "Reloading named.conf and zone files" + + checkconfig || { eend 1; return 1; } + + _get_pidfile + if [ -n "${PIDFILE}" ]; then + start-stop-daemon --pidfile $PIDFILE --signal HUP + ret=$? + else + ewarn "Unable to determine the pidfile... this is" + ewarn "a fallback mode. Please check your installation!" + + $RC_SERVICE restart + ret=$? + fi + + eend $ret +} From 9bd9b8b3272bb1fa29de445bdab8e8c476d3b1a0 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 17:17:53 +0000 Subject: [PATCH 8/89] brltty --- diff --git a/nonsystemd/brltty-openrc/PKGBUILD b/nonsystemd/brltty-openrc/PKGBUILD new file mode 100644 index 0000000..5842cd1 --- /dev/null +++ b/nonsystemd/brltty-openrc/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer: artoo + +pkgname=brltty-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC brltty init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'brltty') +conflicts=('systemd-sysvcompat') +source=("brltty.initd") +sha512sums=('8c866bc16a99f0c5900d309ab8eb60ffa52b6a943591acfb2955ac09bc1420768cb7079b9afeba03b66c6df94794f33262baa8f002ead58474c390dff64ffa9d') + +package() { + install -Dm755 "$srcdir"/brltty.initd "$pkgdir"/etc/init.d/brltty +} diff --git a/nonsystemd/brltty-openrc/brltty.initd b/nonsystemd/brltty-openrc/brltty.initd new file mode 100644 index 0000000..03bc930 --- /dev/null +++ b/nonsystemd/brltty-openrc/brltty.initd @@ -0,0 +1,12 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/bin/brltty +pidfile=/run/brltty.pid +command_args="-P ${pidfile} -q" + +depend() { + before * + after clock +} From 2e534be3a03686d015d284a87cb76340ee7a8ca8 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 17:29:53 +0000 Subject: [PATCH 9/89] connman-openrc --- diff --git a/nonsystemd/connman-openrc/PKGBUILD b/nonsystemd/connman-openrc/PKGBUILD new file mode 100644 index 0000000..4b9e1f6 --- /dev/null +++ b/nonsystemd/connman-openrc/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Rafli Akmal +# Contributor: artoo +# Contributor: Oscar Campos + +pkgname=connman-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC connman init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'connman') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/connmand') +source=("connmand.confd" + "connmand.initd") +sha512sums=('ec60993ab2adb47eae53ec4df219629f31f4b857e5e6bb4d775b9334524813b885747d25edc6d179a779506b7da6efe246a0220d4f78ec16d5caa7c7e38e5d4d' + 'e6a4fe44d4edb8241c971cedc2d2d5799bdb174147a1961b0a037fa56161a83d138816d8934d653b2e19f2dc16a9bbef588fddc699a7cea40b7b1373ffc3240c') + +package() { + install -Dm755 "${srcdir}"/connmand.initd "${pkgdir}"/etc/init.d/connmand + install -Dm644 "${srcdir}"/connmand.confd "${pkgdir}"/etc/conf.d/connmand +} diff --git a/nonsystemd/connman-openrc/connmand.confd b/nonsystemd/connman-openrc/connmand.confd new file mode 100644 index 0000000..9aa36fc --- /dev/null +++ b/nonsystemd/connman-openrc/connmand.confd @@ -0,0 +1,16 @@ + +# conf.d file for connmand +# +# Please check connmand --help for more information. +# Useful options are: +# -c, --compat: enable NetworkManager compatibility mode. +# -W, --wifi=NAME: select wpa_supplicant wifi driver to use. +# This is useful if your wpa_supplicant is < 0.7 +# since connmand by default gives wpa_supplicant a +# comma separated list of values and < 0.7 does not +# understand or accept it. +# -i, --device=DEV: force use of given interface name. +# -I, --nodevice=DEV: force ignore of given interface name. +# -p, --plugin=NAME: specify plugins to load. +# -P, --noplugin=NAME: specify plugins not to load. +CONNMAN_OPTS="" diff --git a/nonsystemd/connman-openrc/connmand.initd b/nonsystemd/connman-openrc/connmand.initd new file mode 100644 index 0000000..ebb4a4a --- /dev/null +++ b/nonsystemd/connman-openrc/connmand.initd @@ -0,0 +1,12 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Purpose License v2 + +supervisor=supervise-daemon +command=/usr/bin/connmand +command_args="-n ${CONNMAN_OPTS}" + +depend() { + need dbus + provide net +} From 0cbd48b0aed2d8df84c1c79310e74c6fa67a5d18 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 17:37:17 +0000 Subject: [PATCH 10/89] cpupower-openrc --- diff --git a/nonsystemd/cpupower-openrc/PKGBUILD b/nonsystemd/cpupower-openrc/PKGBUILD new file mode 100644 index 0000000..f636816 --- /dev/null +++ b/nonsystemd/cpupower-openrc/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Rafli Akmal +# Contributor: artoo +# Contributor: Oscar Campos + +pkgname=cpupower-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC cpupower init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'cpupower') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/cpupower') +source=("cpupower.confd" + "cpupower.initd") +sha512sums=('63cd12a4d8782198c71662e9205e346e064b65bae5e3e175b5bc43bdf7ec6ddf675b60349750afe3c37c8a925f9ae9a93530671821342581bd282a69e0773b8c' + '6551b3442edf883441169a26d2bcecbfd0f48b53c78d70d8981c5d704b5593003704648ca06cdac14beebd21e411b89decedf5feaa902e0b14029ac990dbc32f') + +package() { + install -Dm755 "${srcdir}/cpupower.initd" "${pkgdir}/etc/init.d/cpupower" + install -Dm644 "${srcdir}/cpupower.confd" "${pkgdir}/etc/conf.d/cpupower" +} diff --git a/nonsystemd/cpupower-openrc/cpupower.confd b/nonsystemd/cpupower-openrc/cpupower.confd new file mode 100644 index 0000000..1e67ed0 --- /dev/null +++ b/nonsystemd/cpupower-openrc/cpupower.confd @@ -0,0 +1,36 @@ +# /etc/conf.d/cpupower: config file for /etc/init.d/cpupower + +# Options when starting cpufreq (given to the `cpupower` program) +# Possible options are: +# -g --governor (ie: ondemand, performance, or powersave) +# -d --min (ie: 1000MHz) +# -u --max (ie: 2000MHz) +# -f --freq (requires userspace governor, this *can not* be combined with +# with any other parameters). +# Frequencies can be passed in Hz, kHz (default), MHz, GHz, or THz by postfixing the +# value with the wanted unit name, without any space. +# (frequency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000). + +START_OPTS="--governor ondemand" + +# Options when stopping cpufreq (given to the `cpupower` program) +# This option can be used to change governer on stop. Leaving it empty will ensure +# the governer remains on the one provided above. +STOP_OPTS="" + +# Extra settings to write to sysfs cpufreq values. +# +# up_threshold: threshold for stepping up frequency, where the value represents +# the percentage of cpu load. +# +# down_threshold: threshold for stepping down frequency, where the value +# represents the percentage of cpu load. +# +# sampling_down_factor: determines how frequently the governor polls the cpu, a +# value greater than 1 improves performance by reducing the polling when the +# load is high. This tunable has no effect on behavior at lower CPU frequencies. +# +# ignore_nice_load: when set to '1' the processes that are run with a 'nice' +# value will not count in the usage calculation. + +#SYSFS_EXTRA="ondemand/ignore_nice_load=1 ondemand/up_threshold=75 ondemand/sampling_down_factor=10" diff --git a/nonsystemd/cpupower-openrc/cpupower.initd b/nonsystemd/cpupower-openrc/cpupower.initd new file mode 100644 index 0000000..e65b599 --- /dev/null +++ b/nonsystemd/cpupower-openrc/cpupower.initd @@ -0,0 +1,41 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +CPUFREQ_SYSFS=/sys/devices/system/cpu/cpufreq + +change() { + local c ret=0 opts="$1" + if [ -n "$opts" ] ; then + ebegin "Running cpupower -c all frequency-set ${opts}" + cpupower -c all frequency-set ${opts} >/dev/null 2>&1 + : $(( ret += $? )) + eend ${ret} + + if [ -d ${CPUFREQ_SYSFS} ] && [ -n "${SYSFS_EXTRA}" ] ; then + c=1 + einfo "Setting extra options: ${SYSFS_EXTRA}" + if cd ${CPUFREQ_SYSFS} ; then + local o v + for o in ${SYSFS_EXTRA} ; do + v=${o#*=} + o=${o%%=*} + echo ${v} > ${o} || break + done + c=0 + fi + eend ${c} + : $(( ret += c )) + fi + fi + + return ${ret} +} + +start() { + change "${START_OPTS}" +} + +stop() { + change "${STOP_OPTS}" +} From 22c455166b5beba2a4cca81a7697eb6aa0646cc5 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 17:47:17 +0000 Subject: [PATCH 11/89] cryptsetup-openrc --- diff --git a/nonsystemd/cryptsetup-openrc/PKGBUILD b/nonsystemd/cryptsetup-openrc/PKGBUILD new file mode 100644 index 0000000..242d943 --- /dev/null +++ b/nonsystemd/cryptsetup-openrc/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: artoo + +pkgname=cryptsetup-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC cryptsetup init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('device-mapper-openrc' 'cryptsetup') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/dmcrypt') +source=("dmcrypt.confd" + "dmcrypt.initd") +sha512sums=('131cee054019eed3f1939615386ba849bad2b02e31042075d5839e9a5943c8716431aae01aece25b2193645bcd706e14e6c947ee59f1fab4c2d7e0afc80228be' + '50754791a9e1b96e59b0de7b7c6f5137197ffda668896f42abe2ae6df59585493ab4694f5b73b46479bcecfd64ff1d3ae4cecba2a369b733f1724a94fed4ba01') + +package() { + install -Dm755 "${srcdir}"/dmcrypt.initd "${pkgdir}"/etc/init.d/dmcrypt + install -Dm644 "${srcdir}"/dmcrypt.confd "${pkgdir}"/etc/conf.d/dmcrypt +} diff --git a/nonsystemd/cryptsetup-openrc/dmcrypt.confd b/nonsystemd/cryptsetup-openrc/dmcrypt.confd new file mode 100644 index 0000000..96c523e --- /dev/null +++ b/nonsystemd/cryptsetup-openrc/dmcrypt.confd @@ -0,0 +1,112 @@ +# /etc/conf.d/dmcrypt + +# For people who run dmcrypt on top of some other layer (like raid), +# use rc_need to specify that requirement. See the runscript(8) man +# page for more information. + +#-------------------- +# Instructions +#-------------------- + +# Note regarding the syntax of this file. This file is *almost* bash, +# but each line is evaluated separately. Separate swaps/targets can be +# specified. The init-script which reads this file assumes that a +# swap= or target= line starts a new section, similar to lilo or grub +# configuration. + +# Note when using gpg keys and /usr on a separate partition, you will +# have to copy /usr/bin/gpg to /bin/gpg so that it will work properly +# and ensure that gpg has been compiled statically. +# See http://bugs.gentoo.org/90482 for more information. + +# Note that the init-script which reads this file detects whether your +# partition is LUKS or not. No mkfs is run unless you specify a makefs +# option. + +# Global options: +#---------------- + +# How long to wait for each timeout (in seconds). +dmcrypt_key_timeout=1 + +# Max number of checks to perform (see dmcrypt_key_timeout). +#dmcrypt_max_timeout=300 + +# Number of password retries. +dmcrypt_retries=5 + +# Arguments: +#----------- +# target= == Mapping name for partition. +# swap= == Mapping name for swap partition. +# source='' == Real device for partition. +# Note: You can (and should) specify a tag like UUID +# for blkid (see -t option). This is safer than using +# the full path to the device. +# key='[:]' == Fullpath from / or from inside removable media. +# remdev='' == Device that will be assigned to removable media. +# gpg_options='' == Default are --quiet --decrypt +# options='' == cryptsetup, for LUKS you can only use --readonly +# loop_file='' == Loopback file. +# Note: If you omit $source, then a free loopback will +# be looked up automatically. +# pre_mount='cmds' == commands to execute before mounting partition. +# post_mount='cmds' == commands to execute after mounting partition. +# wait=5 == wait given amount of seconds for source to appear +#----------- +# Supported Modes +# gpg == decrypt and pipe key into cryptsetup. +# Note: new-line character must not be part of key. +# Command to erase \n char: 'cat key | tr -d '\n' > cleanKey' + +#-------------------- +# dm-crypt examples +#-------------------- + +## swap +# Swap partitions. These should come first so that no keys make their +# way into unencrypted swap. +# If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom +# If no makefs is given then mkswap will be assumed +#swap=crypt-swap +#source='/dev/hda2' + +## /home with passphrase +#target=crypt-home +#source='/dev/hda5' + +## /home with regular keyfile +#target=crypt-home +#source='/dev/hda5' +#key='/full/path/to/homekey' + +## /home with gpg protected key +#target=crypt-home +#source='/dev/hda5' +#key='/full/path/to/homekey:gpg' + +## /home with regular keyfile on removable media(such as usb-stick) +#target=crypt-home +#source='/dev/hda5' +#key='/full/path/to/homekey' +#remdev='/dev/sda1' + +## /home with gpg protected key on removable media(such as usb-stick) +#target=crypt-home +#source='/dev/hda5' +#key='/full/path/to/homekey:gpg' +#remdev='/dev/sda1' + +## /tmp with regular keyfile +#target=crypt-tmp +#source='/dev/hda6' +#key='/full/path/to/tmpkey' +#pre_mount='/sbin/mkreiserfs -f -f ${dev}' +#post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}' + +## Loopback file example +#target='crypt-loop-home' +#source='/dev/loop0' +#loop_file='/mnt/crypt/home' + +# The file must be terminated by a newline. Or leave this comment last. diff --git a/nonsystemd/cryptsetup-openrc/dmcrypt.initd b/nonsystemd/cryptsetup-openrc/dmcrypt.initd new file mode 100644 index 0000000..dcdbdd9 --- /dev/null +++ b/nonsystemd/cryptsetup-openrc/dmcrypt.initd @@ -0,0 +1,350 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use modules + before checkfs fsck + + if grep -qs ^swap= "${conf_file}" ; then + before swap + fi +} + +# We support multiple dmcrypt instances based on $SVCNAME +conf_file="/etc/conf.d/${SVCNAME}" + +# Get splash helpers if available. +if [ -e /usr/bin/splash-functions.sh ] ; then + . /usr/bin/splash-functions.sh +fi + +# Setup mappings for an individual target/swap +# Note: This relies on variables localized in the main body below. +dm_crypt_execute() { + local dev ret mode foo source_dev + + if [ -z "${target}" -a -z "${swap}" ] ; then + return + fi + + # Set up default values. + : ${dmcrypt_key_timeout:=1} + : ${dmcrypt_max_timeout:=300} + : ${dmcrypt_retries:=5} + : ${wait:=5} + + # Handle automatic look up of the source path. + if [ -z "${source}" -a -n "${loop_file}" ] ; then + source=$(losetup --show -f "${loop_file}") + fi + case ${source} in + *=*) + i=0 + while [ ${i} -lt ${wait} ]; do + if source_dev="$(blkid -l -t "${source}" -o device)"; then + source="${source_dev}" + break + fi + : $((i += 1)) + einfo "waiting for source \"${source}\" for ${target}..." + sleep 1 + done + ;; + esac + if [ -z "${source}" ] || [ ! -e "${source}" ] ; then + ewarn "source \"${source}\" for ${target} missing, skipping..." + return + fi + + if [ -n "${target}" ] ; then + # let user set options, otherwise leave empty + : ${options:=' '} + elif [ -n "${swap}" ] ; then + if cryptsetup isLuks ${source} 2>/dev/null ; then + ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup." + return + fi + target=${swap} + # swap contents do not need to be preserved between boots, luks not required. + # suspend2 users should have initramfs's init handling their swap partition either way. + : ${options:='-c aes -h sha1 -d /dev/urandom'} + : ${pre_mount:='mkswap ${dev}'} + fi + + if [ -n "${loop_file}" ] ; then + dev="/dev/mapper/${target}" + ebegin " Setting up loop device ${source}" + losetup ${source} ${loop_file} + fi + + # cryptsetup: + # open # is $source + # create # is $target + local arg1="create" arg2="${target}" arg3="${source}" + if cryptsetup isLuks ${source} 2>/dev/null ; then + arg1="open" + arg2="${source}" + arg3="${target}" + fi + + # Older versions reported: + # ${target} is active: + # Newer versions report: + # ${target} is active[ and is in use.] + if cryptsetup status ${target} | egrep -q ' is active' ; then + einfo "dm-crypt mapping ${target} is already configured" + return + fi + splash svc_input_begin ${SVCNAME} >/dev/null 2>&1 + + # Handle keys + if [ -n "${key}" ] ; then + read_abort() { + # some colors + local ans savetty resettty + [ -z "${NORMAL}" ] && eval $(eval_ecolors) + einfon " $1? (${WARN}yes${NORMAL}/${GOOD}No${NORMAL}) " + shift + # This is ugly as s**t. But POSIX doesn't provide `read -t`, so + # we end up having to implement our own crap with stty/etc... + savetty=$(stty -g) + resettty='stty ${savetty}; trap - EXIT HUP INT TERM' + trap 'eval "${resettty}"' EXIT HUP INT TERM + stty -icanon + stty min 0 time "$(( $2 * 10 ))" + ans=$(dd count=1 bs=1 2>/dev/null) || ans='' + eval "${resettty}" + if [ -z "${ans}" ] ; then + printf '\r' + else + echo + fi + case ${ans} in + [yY]) return 0;; + *) return 1;; + esac + } + + # Notes: sed not used to avoid case where /usr partition is encrypted. + mode=${key##*:} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg + key=${key%:*} + case "${mode}" in + gpg|reg) + # handle key on removable device + if [ -n "${remdev}" ] ; then + # temp directory to mount removable device + local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$" + if [ ! -d "${mntrem}" ] ; then + if ! mkdir -p "${mntrem}" ; then + ewarn "${source} will not be decrypted ..." + einfo "Reason: Unable to create temporary mount point '${mntrem}'" + return + fi + fi + i=0 + einfo "Please insert removable device for ${target}" + while [ ${i} -lt ${dmcrypt_max_timeout} ] ; do + foo="" + if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then + # keyfile exists? + if [ ! -e "${mntrem}${key}" ] ; then + umount -n "${mntrem}" + rmdir "${mntrem}" + einfo "Cannot find ${key} on removable media." + read_abort "Abort" ${dmcrypt_key_timeout} && return + else + key="${mntrem}${key}" + break + fi + else + [ -e "${remdev}" ] \ + && foo="mount failed" \ + || foo="mount source not found" + fi + : $((i += 1)) + read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return + done + else # keyfile ! on removable device + if [ ! -e "${key}" ] ; then + ewarn "${source} will not be decrypted ..." + einfo "Reason: keyfile ${key} does not exist." + return + fi + fi + ;; + *) + ewarn "${source} will not be decrypted ..." + einfo "Reason: mode ${mode} is invalid." + return + ;; + esac + else + mode=none + fi + ebegin " ${target} using: ${options} ${arg1} ${arg2} ${arg3}" + if [ "${mode}" = "gpg" ] ; then + : ${gpg_options:='-q -d'} + # gpg available ? + if command -v gpg >/dev/null ; then + i=0 + while [ ${i} -lt ${dmcrypt_retries} ] ; do + # paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected. + # save stdin stdout stderr "values" + timeout ${dmcrypt_max_timeout} gpg ${gpg_options} ${key} 2>/dev/null | \ + cryptsetup --key-file - ${options} ${arg1} ${arg2} ${arg3} + ret=$? + # The timeout command exits 124 when it times out. + [ ${ret} -eq 0 -o ${ret} -eq 124 ] && break + : $(( i += 1 )) + done + eend ${ret} "failure running cryptsetup" + else + ewarn "${source} will not be decrypted ..." + einfo "Reason: cannot find gpg application." + einfo "You have to install app-crypt/gnupg first." + einfo "If you have /usr on its own partition, try copying gpg to /bin ." + fi + else + if [ "${mode}" = "reg" ] ; then + cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3} + ret=$? + eend ${ret} "failure running cryptsetup" + else + cryptsetup ${options} ${arg1} ${arg2} ${arg3} + ret=$? + eend ${ret} "failure running cryptsetup" + fi + fi + if [ -d "${mntrem}" ] ; then + umount -n ${mntrem} 2>/dev/null >/dev/null + rmdir ${mntrem} 2>/dev/null >/dev/null + fi + splash svc_input_end ${SVCNAME} >/dev/null 2>&1 + + if [ ${ret} -ne 0 ] ; then + cryptfs_status=1 + else + if [ -n "${pre_mount}" ] ; then + dev="/dev/mapper/${target}" + eval ebegin \"" pre_mount: ${pre_mount}"\" + eval "${pre_mount}" > /dev/null + ewend $? || cryptfs_status=1 + fi + fi +} + +# Lookup optional bootparams +get_bootparam_val() { + # We're given something like: + # foo=bar=cow + # Return the "bar=cow" part. + case $1 in + *=*) + echo "${1#*=}" + ;; + esac +} + +start() { + local header=true cryptfs_status=0 + local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev + + local x + for x in $(cat /proc/cmdline) ; do + case "${x}" in + key_timeout=*) + dmcrypt_key_timeout=$(get_bootparam_val "${x}") + ;; + esac + done + + while read targetline <&3 ; do + case ${targetline} in + # skip comments and blank lines + ""|"#"*) continue ;; + # skip service-specific openrc configs #377927 + rc_*) continue ;; + esac + + ${header} && ebegin "Setting up dm-crypt mappings" + header=false + + # check for the start of a new target/swap + case ${targetline} in + target=*|swap=*) + # If we have a target queued up, then execute it + dm_crypt_execute + + # Prepare for the next target/swap by resetting variables + unset gpg_options key loop_file target options pre_mount post_mount source swap remdev wait + ;; + + gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|wait=*|source=*) + if [ -z "${target}${swap}" ] ; then + ewarn "Ignoring setting outside target/swap section: ${targetline}" + continue + fi + ;; + + dmcrypt_*=*) + # ignore global options + continue + ;; + + *) + ewarn "Skipping invalid line in ${conf_file}: ${targetline}" + ;; + esac + + # Queue this setting for the next call to dm_crypt_execute + eval "${targetline}" + done 3< ${conf_file} + + # If we have a target queued up, then execute it + dm_crypt_execute + + ewend ${cryptfs_status} "Failed to setup dm-crypt devices" +} + +stop() { + local line header + + # Break down all mappings + header=true + egrep "^(target|swap)=" ${conf_file} | \ + while read line ; do + ${header} && einfo "Removing dm-crypt mappings" + header=false + + target= swap= + eval ${line} + + [ -n "${swap}" ] && target=${swap} + if [ -z "${target}" ] ; then + ewarn "invalid line in ${conf_file}: ${line}" + continue + fi + + ebegin " ${target}" + cryptsetup remove ${target} + eend $? + done + + # Break down loop devices + header=true + grep '^source=./dev/loop' ${conf_file} | \ + while read line ; do + ${header} && einfo "Detaching dm-crypt loop devices" + header=false + + source= + eval ${line} + + ebegin " ${source}" + losetup -d "${source}" + eend $? + done + + return 0 +} From 81dbe2de5e43ff02ce12df2f69c9f6338862ebfe Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 17:54:45 +0000 Subject: [PATCH 12/89] cups-openrc --- diff --git a/nonsystemd/cups-openrc/PKGBUILD b/nonsystemd/cups-openrc/PKGBUILD new file mode 100644 index 0000000..010796c --- /dev/null +++ b/nonsystemd/cups-openrc/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: artoo + +pkgname=cups-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC cups init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('cups' 'dbus-openrc' 'openrc') +optdepends=('avahi-openrc: avahi initscript') +conflicts=('systemd-sysvcompat') +source=("cupsd.initd") +sha512sums=('44bc2419a5e3e25f4c7e47a671c3edfec7ecc1c520a7f8c7040dc278821fa6876404161f10ff514c1de3e478626e3124e6fe8c5e4a334f25e3f1dca7526a4dca') + +package() { + install -Dm755 "${srcdir}"/cupsd.initd "${pkgdir}"/etc/init.d/cupsd +} diff --git a/nonsystemd/cups-openrc/cupsd.initd b/nonsystemd/cups-openrc/cupsd.initd new file mode 100644 index 0000000..4d7952c --- /dev/null +++ b/nonsystemd/cups-openrc/cupsd.initd @@ -0,0 +1,23 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2017 Gentoo Foundation + +supervisor="supervise-daemon" +description="The Common Unix Printing System daemon" +command="/usr/bin/cupsd" +command_args="-f -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf" +#pidfile="/run/cupsd.pid" +#start_stop_daemon_args="-b -m --pidfile ${pidfile}" + +depend() { + use net + need dbus avahi-daemon + before nfs + after logger +} + +start_pre() { + checkpath -q -d -m 0775 -o root:cups /var/cache/cups + checkpath -q -d -m 0775 -o root:cups /var/cache/cups/rss + checkpath -q -d -m 0755 -o root:cups /run/cups + checkpath -q -d -m 0511 -o daemon:sys /run/cups/certs +} From c7eddd04c5380373250cf7eff679b48d5f084a74 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 17:59:48 +0000 Subject: [PATCH 13/89] cyrus-sasl-openrc --- diff --git a/nonsystemd/cyrus-sasl-openrc/PKGBUILD b/nonsystemd/cyrus-sasl-openrc/PKGBUILD new file mode 100644 index 0000000..9360aca --- /dev/null +++ b/nonsystemd/cyrus-sasl-openrc/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer: artoo + +pkgname=cyrus-sasl-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC cyrus-sasl init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'cyrus-sasl') +conflicts=('systemd-sysvcompat') +source=("saslauthd.initd") +sha512sums=('cd11259770b94574ac9ff0175f113c4677ce980b5802a8d832a755b827f653fa8a8bec82bed1543c0e069e389892168203f46709a3fc476c7ccb6c22b35987dc') + +package() { + install -Dm755 "${srcdir}"/saslauthd.initd "${pkgdir}"/etc/init.d/saslauthd +} diff --git a/nonsystemd/cyrus-sasl-openrc/saslauthd.confd b/nonsystemd/cyrus-sasl-openrc/saslauthd.confd new file mode 100644 index 0000000..e162fc1 --- /dev/null +++ b/nonsystemd/cyrus-sasl-openrc/saslauthd.confd @@ -0,0 +1,19 @@ +# Config file for /etc/init.d/saslauthd + +# PLEASE READ THIS IF YOU ARE USING SYSTEMD +# Please note that systemd does not expand shell variables +# thus, something like FOO="${FOO} bar" won't work. + +# Specify the authentications mechanism. +# **NOTE** For a list see: saslauthd -v +# Since 2.1.19, add "-r" to options for old behavior, +# ie. reassemble user and realm to user@realm form. +# +# Specify the hostname for remote IMAP server using: +# "-O localhost". +# Specify the number of worker processes to create using: +# "-n ". +# Enable credential cache, set cache size and timeout using: +# "-c -s -t ". +# +SASLAUTHD_OPTS="-a pam" diff --git a/nonsystemd/cyrus-sasl-openrc/saslauthd.initd b/nonsystemd/cyrus-sasl-openrc/saslauthd.initd new file mode 100644 index 0000000..b87fefd --- /dev/null +++ b/nonsystemd/cyrus-sasl-openrc/saslauthd.initd @@ -0,0 +1,10 @@ +#!/usr/bin/openrc-run + +pidfile=/run/saslauthd/saslauthd.pid +command=/usr/bin/saslauthd +command_args="${SASLAUTHD_OPTS}" +command_background=yes + +depend() { + need net +} From 153aa2c9e3c1658e2d3659e79f195d9b7d53ed7b Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 18:06:51 +0000 Subject: [PATCH 14/89] dhcpcd-openrc --- diff --git a/nonsystemd/dhcpcd-openrc/PKGBUILD b/nonsystemd/dhcpcd-openrc/PKGBUILD new file mode 100644 index 0000000..4b0df2a --- /dev/null +++ b/nonsystemd/dhcpcd-openrc/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer: artoo + +pkgname=dhcpcd-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC dhcpcd init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'dhcpcd') +conflicts=('systemd-sysvcompat') +source=("dhcpcd.initd") +sha512sums=('5d2624b35fa69a3a1a64662c0d77b3d483e1213e10ec57f70ad9668e9c4518fbe2574a9d9ca4e9246943811e06e81affd108887d9b8f8c8c16f9e234a010a0d6') + +package() { + install -Dm755 "${srcdir}"/dhcpcd.initd "${pkgdir}"/etc/init.d/dhcpcd +} diff --git a/nonsystemd/dhcpcd-openrc/dhcpcd.initd b/nonsystemd/dhcpcd-openrc/dhcpcd.initd new file mode 100644 index 0000000..3be2cd9 --- /dev/null +++ b/nonsystemd/dhcpcd-openrc/dhcpcd.initd @@ -0,0 +1,19 @@ +#!/usr/bin/openrc-run +# Copyright 2007-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/bin/dhcpcd +#pidfile=/run/dhcpcd/pid +supervisor="supervise-daemon" +command_args_foreground="--nobackground" +command_args=-q +name="DHCP Client Daemon" + +depend() +{ + provide net + need localmount + use logger network + after bootmisc modules + before dns +} From d0bbfb9b0b7aaf469ba775b076ab06e4b637987a Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 18:24:02 +0000 Subject: [PATCH 15/89] dhcp-openrc --- diff --git a/nonsystemd/dhcp-openrc/PKGBUILD b/nonsystemd/dhcp-openrc/PKGBUILD new file mode 100644 index 0000000..0e1f499 --- /dev/null +++ b/nonsystemd/dhcp-openrc/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: artoo + +pkgname=dhcp-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC dhcp init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'dhcp') +optdepends=('openldap-openrc: openldap initscript' + 'bind-openrc: bind initscript') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/dhcpd' + 'etc/conf.d/dhcrelay' + 'etc/conf.d/dhcrelay6') +source=("dhcpd.confd" + "dhcrelay.confd" + "dhcrelay6.confd" + "dhcpd.initd" + "dhcrelay.initd") +sha512sums=('7b7a77b7826b475a4113ebeee54501ce417cc56e85754301a82a185d88b4713d198f615a366e63e0e2b0aef988c8137dcd1e18c4036d993378257079da17693d' + 'af94d679c5b7652a770d4acb96f5f12fd9dc99f4e8e26b10fab67514693f63392bc8033a6e5e6c1967d7004decc72b810462e1fe92c1d4808606e48086dea00b' + '40d3a6bdf8521bf5152cf31b961aea88b2fb0339433d0b6a6360a16c796298620b377bd079c0246e97bc9c0533ddb13bbb58cc5169d0ca598e3a51d1a607a9e9' + '195e18afb1d5db62d4eb3fa374e82e343491dcaa0bb76526d182ed74929c636c6c8a88a20c12c50e2e8c8920a0789499d187d432723195776ea72b11351d9bb1' + 'aabab38279e09580be2d1ecd5556752dba1de447db0bd79113c26ec76cc63fcb0d5fce758c67074f5c9dbda8a09bab788f59d693f9d479137df042dce73c4843') + +package() { + for f in dhcpd dhcrelay; do + install -Dm755 "${srcdir}/$f".initd "${pkgdir}"/etc/init.d/"$f" + install -Dm644 "${srcdir}/$f".confd "${pkgdir}"/etc/conf.d/"$f" + done + + install -Dm644 "${srcdir}"/dhcrelay6.confd "${pkgdir}"/etc/conf.d/dhcrelay6 + install -Dm755 "${srcdir}"/dhcrelay.initd "${pkgdir}"/etc/init.d/dhcrelay6 +} diff --git a/nonsystemd/dhcp-openrc/dhcpd.confd b/nonsystemd/dhcp-openrc/dhcpd.confd new file mode 100644 index 0000000..5cd2eec --- /dev/null +++ b/nonsystemd/dhcp-openrc/dhcpd.confd @@ -0,0 +1,28 @@ +# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd + +# If you require more than one instance of dhcpd you can create symbolic +# links to dhcpd service like so +# cd /etc/init.d +# ln -s dhcpd dhcpd.foo +# cd ../conf.d +# cp dhcpd dhcpd.foo +# Now you can edit dhcpd.foo and specify a different configuration file. +# You'll also need to specify a pidfile in that dhcpd.conf file. +# See the pid-file-name option in the dhcpd.conf man page for details. + +# If you wish to run dhcpd in a chroot, uncomment the following line +# DHCPD_CHROOT="/var/lib/dhcp/chroot" + +# All file paths below are relative to the chroot. +# You can specify a different chroot directory but MAKE SURE it's empty. + +# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf +# DHCPD_CONF="/etc/dhcp/dhcpd.conf" + +# Configure which interface or interfaces to for dhcpd to listen on. +# List all interfaces space separated. If this is not specified then +# we listen on all interfaces. +# DHCPD_IFACE="" + +# Insert any other dhcpd options - see the man page for a full list. +# DHCPD_OPTS="" diff --git a/nonsystemd/dhcp-openrc/dhcpd.initd b/nonsystemd/dhcp-openrc/dhcpd.initd new file mode 100644 index 0000000..ecd396e --- /dev/null +++ b/nonsystemd/dhcp-openrc/dhcpd.initd @@ -0,0 +1,119 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="configtest" + +: ${DHCPD_CONF:=/etc/dhcpd.conf} + +depend() { + need net + use logger dns ldap slapd +} + +get_var() { + local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${chroot}${DHCPD_CONF}")" + echo ${var:-$2} +} + +setup_opts() { + DHCPD_CHROOT=${DHCPD_CHROOT%/} + + # Work out our cffile if it's in our DHCPD_OPTS + case " ${DHCPD_OPTS} " in + *" -cf "*) + DHCPD_CONF=" ${DHCPD_OPTS} " + DHCPD_CONF="${DHCPD_CONF##* -cf }" + DHCPD_CONF="${DHCPD_CONF%% *}" + ;; + *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}" + ;; + esac +} + +checkconfig() { + set -- ${DHCPD_OPTS} -chroot "${DHCPD_CHROOT:-/}" -t + + dhcpd "$@" 1>/dev/null 2>&1 + local ret=$? + if [ ${ret} -ne 0 ] ; then + eerror "${SVCNAME} has detected a syntax error in your configuration files:" + dhcpd "$@" + fi + + return ${ret} +} + +configtest() { + setup_opts + + ebegin "Checking ${SVCNAME} configuration" + checkconfig + eend $? +} + +start() { + setup_opts + local chroot="${DHCPD_CHROOT}" + + if [ -n "${chroot}" ] ; then + # the config test want's these to exist + mkdir -p \ + "${chroot}"/run/dhcp \ + "${chroot}"/var/lib/dhcp \ + "${chroot}"/etc/dhcp + fi + + # see comment in get_var() above + if [ ! -f "${chroot}${DHCPD_CONF}" ] ; then + eerror "${chroot}${DHCPD_CONF} does not exist" + return 1 + fi + + checkconfig || return 1 + + checkpath -d -o dhcp:dhcp "${chroot}"/run/dhcp "${chroot}"/var/lib/dhcp + + local leasefile="$(get_var lease-file-name /var/lib/dhcp/${SVCNAME}.leases)" + checkpath -f -o dhcp:dhcp "${chroot}${leasefile}" + + # Setup LD_PRELOAD so name resolution works in our chroot. + if [ -n "${chroot}" ] ; then + checkpath -d -o root:root -m 755 "${chroot}"/dev "${chroot}"/etc "${chroot}"/proc + cp -pP /etc/localtime /etc/resolv.conf "${chroot}"/etc/ + export LD_PRELOAD="${LD_PRELOAD} libresolv.so libnss_dns.so" + if ! mountinfo -q "${chroot}/proc" ; then + mount --bind /proc "${chroot}/proc" + fi + fi + + local pidfile="$(get_var pid-file-name /run/dhcp/${SVCNAME}.pid)" + + ebegin "Starting ${chroot:+chrooted }${SVCNAME}" + start-stop-daemon --start --exec /usr/bin/dhcpd \ + --pidfile "${chroot}/${pidfile}" \ + -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \ + -user dhcp -group dhcp \ + -chroot "${chroot:-/}" ${DHCPD_IFACE} + eend $? \ + && save_options dhcpd_chroot "${chroot}" \ + && save_options pidfile "${pidfile}" +} + +stop() { + local chroot="$(get_options dhcpd_chroot)" + [ -z "${chroot}" ] && chroot="$(get_options chroot)" + + ebegin "Stopping ${chroot:+chrooted }${SVCNAME}" + start-stop-daemon --stop --exec /usr/bin/dhcpd \ + --pidfile "${chroot}/$(get_options pidfile)" + res=$? + + if [ ${res} -eq 0 ] && [ -n "${chroot}" ] ; then + if mountinfo -q "${chroot}/proc" ; then + umount "${chroot}/proc" + fi + fi + + eend ${res} +} diff --git a/nonsystemd/dhcp-openrc/dhcrelay.confd b/nonsystemd/dhcp-openrc/dhcrelay.confd new file mode 100644 index 0000000..4469968 --- /dev/null +++ b/nonsystemd/dhcp-openrc/dhcrelay.confd @@ -0,0 +1,16 @@ +# /etc/conf.d/dhcrelay: config file for /etc/init.d/dhcrelay + +# Configure which interface or interfaces to for dhcrelay to listen on +# and send to. +# List all interfaces space separated. If this is not specified then +# we use all interfaces. +#IFACE="" +# If you have split net interfaces, you might want to depend on them +# explicitly here. +#rc_need=$(printf 'net.%s ' ${IFACE}) + +# Insert any other options needed. See dhcrelay(8) for details. +#DHCRELAY_OPTS="" + +# Space separated list of IPs to forward BOOTP/DHCP packets to. +DHCRELAY_SERVERS="" diff --git a/nonsystemd/dhcp-openrc/dhcrelay.initd b/nonsystemd/dhcp-openrc/dhcrelay.initd new file mode 100644 index 0000000..bf88180 --- /dev/null +++ b/nonsystemd/dhcp-openrc/dhcrelay.initd @@ -0,0 +1,33 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need net + use logger ldap slapd +} + +start() { + if [ -z "${DHCRELAY_SERVERS}" ] ; then + eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}" + return 1 + fi + + checkpath -d /run/dhcp + + local iface_opts + if [ -n "${IFACE}" ] ; then + iface_opts=$(printf -- '-i %s ' ${IFACE}) + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /usr/bin/dhcrelay \ + -- -q ${iface_opts} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile /run/dhcp/${SVCNAME}.pid + eend $? +} diff --git a/nonsystemd/dhcp-openrc/dhcrelay6.confd b/nonsystemd/dhcp-openrc/dhcrelay6.confd new file mode 100644 index 0000000..4e8b8c6 --- /dev/null +++ b/nonsystemd/dhcp-openrc/dhcrelay6.confd @@ -0,0 +1,8 @@ +# /etc/conf.d/dhcrelay6: config file for /etc/init.d/dhcrelay6 + +# Insert any other options needed. See dhcrelay(8) for details. +# Make sure you specify the lower (-l)/upper (-u) interfaces. +DHCRELAY_OPTS="-6 -l lower-iface -u upper-iface" + +# Space separated list of IPs to forward BOOTP/DHCP packets to. +DHCRELAY_SERVERS="" From 4b45416a0d0d2b309a8b6b1966fc8ccc83a3a20b Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 19:20:27 +0000 Subject: [PATCH 16/89] dovecot-openrc --- diff --git a/nonsystemd/dovecot-openrc/PKGBUILD b/nonsystemd/dovecot-openrc/PKGBUILD new file mode 100644 index 0000000..34c2d98 --- /dev/null +++ b/nonsystemd/dovecot-openrc/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Rafli Akmal +# Contributor: artoo +# Contributor: Oscar Campos + +pkgname=dovecot-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC dovecot init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'dovecot') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/dovecot') +source=("dovecot".{confd,initd}) +sha512sums=('bc8979b26920493fb5611a23a0e45f89fc55c560371b49430ac6c273e075d123412553b0706a866550d2b30f2551c6d7e0ea714c14bcaf5e96465ae4247aa115' + '72fa6587522332f564959e5651f145c79a2d4a8889693252ea59dbf81f5c5b2cf7b5dbad3b7e57b984f2e5fe313971a905d27df6de6c8e6fc9d4e741a34d2453') + +package() { + install -Dm755 "$srcdir/dovecot.initd" "$pkgdir/etc/init.d/dovecot" + install -Dm644 "$srcdir/dovecot.confd" "$pkgdir/etc/conf.d/dovecot" +} diff --git a/nonsystemd/dovecot-openrc/dovecot.confd b/nonsystemd/dovecot-openrc/dovecot.confd new file mode 100644 index 0000000..876983d --- /dev/null +++ b/nonsystemd/dovecot-openrc/dovecot.confd @@ -0,0 +1,2 @@ +# Dovecot configuration file location +DOVECOT_CONF=/etc/dovecot/dovecot.conf diff --git a/nonsystemd/dovecot-openrc/dovecot.initd b/nonsystemd/dovecot-openrc/dovecot.initd new file mode 100644 index 0000000..2395561 --- /dev/null +++ b/nonsystemd/dovecot-openrc/dovecot.initd @@ -0,0 +1,39 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License, v2 or later + +extra_commands="checkconfig" + +supervisor=supervise-daemon +command=/usr/bin/dovecot +command_args="-F -c ${DOVECOT_CONF}" + +depend() { + need localmount + before postfix + after bootmisc ldap mysql ntp-client ntpd postgresql saslauthd slapd + use logger net +} + +checkconfig() { + DOVECOT_INSTANCE=${SVCNAME##*.} + if [ -n "${DOVECOT_INSTANCE}" -a "${SVCNAME}" != "dovecot" ]; then + DOVECOT_CONF=/etc/dovecot/dovecot.${DOVECOT_INSTANCE}.conf + else + DOVECOT_CONF=/etc/dovecot/dovecot.conf + fi + if [ ! -e ${DOVECOT_CONF} ]; then + eerror "You will need an ${DOVECOT_CONF} first" + return 1 + fi + if [ -x /usr/sbin/dovecot ]; then + DOVECOT_BASEDIR=$(/usr/bin/dovecot -c ${DOVECOT_CONF} config -h base_dir) + if [ $? -ne 0 ]; then + eerror "Error parsing ${DOVECOT_CONF}" + return 1 + fi + else + eerror "dovecot not executable" + return 1 + fi +} From 356d7c04a9b107c91186bdc7198c5af739672b6e Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 19:29:55 +0000 Subject: [PATCH 17/89] espeakup-openrc --- diff --git a/nonsystemd/espeakup-openrc/PKGBUILD b/nonsystemd/espeakup-openrc/PKGBUILD new file mode 100644 index 0000000..793d889 --- /dev/null +++ b/nonsystemd/espeakup-openrc/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: Rafli Akmal +# Contributor: artoo +# Contributor: Oscar Campos + +pkgname=espeakup-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC espeakup init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'espeakup') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/espeakup') +source=("espeakup.confd" + "espeakup.initd") +sha512sums=('aebd97c63dbeae5025bf54f39bb3e7d97822a2b1b369e40b013c5c7da2eba968adf48800f62ef14541ca22ed3f3dfcbdb63b2a3d7f45975ae8bddfea0a42d931' + 'e85d4792b3fadf14229a5625b80236e243c156a96592338777501e5ceb7dbbfcdcc0484aa09eeca342a1808dd62cb8c0bb82af8e35c2573d38cea7eadde6ba96') + +package() { + install -Dm755 "$srcdir/espeakup.initd" "$pkgdir/etc/init.d/espeakup" + install -Dm644 "$srcdir/espeakup.confd" "$pkgdir/etc/conf.d/espeakup" +} diff --git a/nonsystemd/espeakup-openrc/espeakup.confd b/nonsystemd/espeakup-openrc/espeakup.confd new file mode 100644 index 0000000..035012c --- /dev/null +++ b/nonsystemd/espeakup-openrc/espeakup.confd @@ -0,0 +1,9 @@ +# conf.d file for espeakup +# +# Please check man 8 espeakup for more information about the options +# espeakup accepts. +# +# Currently, the only meaningful option is: +# --default-voice=voicename -- set the espeak voice espeakup will use. +# +ESPEAKUP_OPTS="" diff --git a/nonsystemd/espeakup-openrc/espeakup.initd b/nonsystemd/espeakup-openrc/espeakup.initd new file mode 100644 index 0000000..8ab7131 --- /dev/null +++ b/nonsystemd/espeakup-openrc/espeakup.initd @@ -0,0 +1,12 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/bin/espeakup +command_args="${espeakup_opts:-${ESPEAKUP_OPTS}}" +pidfile=/run/espeakup.pid + +depend() { + after modules + use alsasound pulseaudio +} From c5ae6d4692bbb6171913fd0fd31a3d78e3873bf4 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 19:34:49 +0000 Subject: [PATCH 18/89] exim-openrc --- diff --git a/nonsystemd/exim-openrc/PKGBUILD b/nonsystemd/exim-openrc/PKGBUILD new file mode 100644 index 0000000..e104058 --- /dev/null +++ b/nonsystemd/exim-openrc/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: Nathan Owens + +pkgname=exim-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="${pkgname/-openrc/} OpenRC init" +arch=('any') +url="https://gitea.artixlinux.org/PackagesE/exim-openrc" +license=('GPL2') +depends=('openrc' 'exim') +conflicts=('systemd-sysvcompat') +backup=("etc/conf.d/${pkgname/-openrc/}") +source=("exim.confd" + "exim.initd") +sha512sums=('bb6f5ead067af19ace661cc92bcd428da97570aedd1f9dc5b61a34e7e3fb3e028be6c96d51df73353bdfcaf69a3ee053fb03d245f868d63ebf518aa96ec82d66' + '5c6a29e62994a651f8054caa23be6ce0be32cca43696b04967dabb779e7b042e2e87f49995e713b24e7fd6e2b47d0f5f5bb0711cec77259340fafd9da29a7dd6') + +package() { + install -Dm644 "$srcdir"/exim.confd "$pkgdir"/etc/conf.d/exim + install -Dm755 "$srcdir"/exim.initd "$pkgdir"/etc/init.d/exim +} diff --git a/nonsystemd/exim-openrc/exim.confd b/nonsystemd/exim-openrc/exim.confd new file mode 100644 index 0000000..316674f --- /dev/null +++ b/nonsystemd/exim-openrc/exim.confd @@ -0,0 +1,8 @@ +# Command-line options for running exim +#command_args="-bd -q15m" + +# Where to log startup configuration checking +# - /dev/null - silent (default) +# - /dev/tty - show output on curent terminal +# - /path/filename - append to specified logfile +#startuplog=/var/log/exim/startup.log diff --git a/nonsystemd/exim-openrc/exim.initd b/nonsystemd/exim-openrc/exim.initd new file mode 100644 index 0000000..4dace40 --- /dev/null +++ b/nonsystemd/exim-openrc/exim.initd @@ -0,0 +1,20 @@ +#!/usr/bin/openrc-run + +description="EXIM internet mailer" + +supervisor=supervise-daemon +command=/usr/bin/exim +command_args=${command_args:--bdf -q15m} +cfgfile=/etc/mail/exim.conf +required_files="$cfgfile" + +depend() { + use antivirus net + provide mta +} + +start_pre() { + ebegin + $command -bV >/dev/null 2>>${startuplog:-/dev/null} + eend $? +} From 60d3f050052bfab2986cded9ee254c75cfaafa6f Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 19:43:06 +0000 Subject: [PATCH 19/89] fcron-openrc --- diff --git a/nonsystemd/fcron-openrc/PKGBUILD b/nonsystemd/fcron-openrc/PKGBUILD new file mode 100644 index 0000000..3c571f5 --- /dev/null +++ b/nonsystemd/fcron-openrc/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: Rafli Akmal +# Contributor: artoo +# Contributor: Oscar Campos + +pkgname=fcron-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC fcron init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'fcron') +conflicts=('systemd-sysvcompat') +source=("fcron".{initd,confd}) +sha512sums=('13f8d75e2dcb4ae52d03a79af7faee36e328f157fc22e4090b9f2798c8577e7f20c6e682446a200692efa4c5788df0fb1d53bc20a7141578cecf057f062e38d0' + '58a66cd495fcb6a9b49f1d244357dfd61188a0c09d2c02a93c9250b8d77d9b89aff41d947e25fd4c1248f39b6a97f045e760b52cdf2f065145a8bfe74b7bf25e') + +package() { + install -Dm755 "$srcdir/fcron.initd" "$pkgdir/etc/init.d/fcron" + install -Dm644 "$srcdir/fcron.confd" "$pkgdir/etc/conf.d/fcron" +} diff --git a/nonsystemd/fcron-openrc/fcron.confd b/nonsystemd/fcron-openrc/fcron.confd new file mode 100644 index 0000000..ea907d8 --- /dev/null +++ b/nonsystemd/fcron-openrc/fcron.confd @@ -0,0 +1,7 @@ +# /etc/conf.d/fcron + +# Options to fcron +# See fcron(8) for more details +# Notes: +# * Do not specify another CONFIGFILE +#FCRON_OPTS="" diff --git a/nonsystemd/fcron-openrc/fcron.initd b/nonsystemd/fcron-openrc/fcron.initd new file mode 100644 index 0000000..0fb5a75 --- /dev/null +++ b/nonsystemd/fcron-openrc/fcron.initd @@ -0,0 +1,100 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +FCRON_INSTANCE="${SVCNAME##*.}" +FCRON_OPTS=${FCRON_OPTS:-""} + +if [ -n "${FCRON_INSTANCE}" ] && [ "${SVCNAME}" != "fcron" ]; then + FCRON_CONFIGFILE="/etc/fcron/fcron.${FCRON_INSTANCE}.conf" +else + FCRON_CONFIGFILE="/etc/fcron/fcron.conf" +fi + +getconfig() { + local key="$1" + local value_default="$2" + local value= + + if service_started; then + value="$(service_get_value "${key}")" + fi + + if [ -z "${value}" ] && [ -r "${FCRON_CONFIGFILE}" ]; then + value="$(sed -n -e 's:^'"${key}"'[ \t]*=[ \t]*::p' "${FCRON_CONFIGFILE}")" + fi + + if [ -z "${value}" ]; then + # Value not explicitly set in the configfile or configfile does not exist + # or is not readable + echo "${value_default}" + else + echo "${value}" + fi + + return 0 +} + +depend() { + config "${FCRON_CONFIGFILE}" + + use clock logger + need hostname + + # provide the cron service if we are the main instance + [ "${SVCNAME}" = "fcron" ] && provide cron +} + + +command="/usr/bin/fcron" +command_args="${FCRON_OPTS} -c \"${FCRON_CONFIGFILE}\"" +start_stop_daemon_args=${FCRON_SSDARGS:-"--wait 1000"} +pidfile="$(getconfig pidfile /run/fcron.pid)" +fcrontabs="$(getconfig fcrontabs /var/spool/fcron)" +fifofile="$(getconfig fifofile /run/fcron.fifo)" +required_files="${FCRON_CONFIGFILE}" + +extra_started_commands="reload" + +reload() { + start-stop-daemon --signal HUP --pidfile "${pidfile}" +} + +start_pre() { + if [ "${SVCNAME}" != "fcron" ]; then + local _has_invalid_instance_cfg=0 + + if [ "${pidfile}" = "/run/fcron.pid" ]; then + eerror "You cannot use the same pidfile like the default instance!" + eerror "Please adjust your 'pidfile' setting in '${FCRON_CONFIGFILE}'." + _has_invalid_instance_cfg=1 + fi + + if [ "${fcrontabs}" = "/var/spool/fcron" ]; then + eerror "You cannot use the same fcrontabs location like the default instance!" + eerror "Please adjust your 'fcrontabs' setting in '${FCRON_CONFIGFILE}'." + _has_invalid_instance_cfg=1 + fi + + if [ "${fifofile}" = "/run/fcron.fifo" ]; then + eerror "You cannot use the same fifo file like the default instance!" + eerror "Please adjust your 'fifofile' setting in '${FCRON_CONFIGFILE}'." + _has_invalid_instance_cfg=1 + fi + + [ ${_has_invalid_instance_cfg} -ne 0 ] && return 1 + fi + + checkpath --file "${FCRON_CONFIGFILE}" --owner root:fcron --mode 0640 + + if [ ! -d "${fcrontabs}" ]; then + ebegin "Creating missing spooldir '${fcrontabs}'" + ${command} --newspooldir "${fcrontabs}" + eend $? + fi +} + +start_post() { + service_set_value fcrontabs "${fcrontabs}" + service_set_value fifofile "${fifofile}" +} From 5884c4a567e6198561aa24703d6880d4fbd15795 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 19:49:48 +0000 Subject: [PATCH 20/89] fuse-openrc --- diff --git a/nonsystemd/fuse-openrc/PKGBUILD b/nonsystemd/fuse-openrc/PKGBUILD new file mode 100644 index 0000000..efd20fe --- /dev/null +++ b/nonsystemd/fuse-openrc/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer: artoo + +pkgname=fuse-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC fuse init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'fuse2') +conflicts=('systemd-sysvcompat') +source=("fuse.initd") +sha512sums=('cb550ab5d01ca2e6ee4e783ff068874328e0176659a5f82641dd50a4fa251de07a2a07daef3642f300931546430e3ca284aea504278d60654b6164530fb8e725') + +package(){ + install -Dm755 "${srcdir}"/fuse.initd "${pkgdir}"/etc/init.d/fuse +} diff --git a/nonsystemd/fuse-openrc/fuse.initd b/nonsystemd/fuse-openrc/fuse.initd new file mode 100644 index 0000000..64c78b5 --- /dev/null +++ b/nonsystemd/fuse-openrc/fuse.initd @@ -0,0 +1,35 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +MOUNTPOINT=/sys/fs/fuse/connections + +depend() { + need localmount +} + +start() { + + ebegin "Starting fuse" + if ! grep -qw fuse /proc/filesystems; then + modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module" + fi + if grep -qw fusectl /proc/filesystems && \ + ! grep -qw $MOUNTPOINT /proc/mounts; then + mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \ + eerror $? "Error mounting control filesystem" + fi + eend ${?} + +} + +stop() { + + ebegin "Stopping fuse" + if grep -qw $MOUNTPOINT /proc/mounts; then + umount $MOUNTPOINT >/dev/null 2>&1 || \ + eerror $? "Error unmounting control filesystem" + fi + eend ${?} + +} From 26f830035c36c2cd0ced9b17df15af6a4d0baf3a Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 19:57:26 +0000 Subject: [PATCH 21/89] git-openrc --- diff --git a/nonsystemd/git-openrc/PKGBUILD b/nonsystemd/git-openrc/PKGBUILD new file mode 100644 index 0000000..62501f9 --- /dev/null +++ b/nonsystemd/git-openrc/PKGBUILD @@ -0,0 +1,23 @@ +# Maintainer: artoo + +pkgname=git-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC git-daemon init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('git' 'openrc') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/git-daemon') +source=("git-daemon.confd" + "git-daemon.initd") +sha512sums=('fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec' + '27416a5b062ec4bc41285f0c22c11c1a6494558044fcc422faf70a1d2035cdf29c9904b5cd6b21a7d5a14c0072d1f07c802ba73830d265b1d28dcdc1d3a3a106') + +package() { + install -Dm755 "${srcdir}"/git-daemon.initd "${pkgdir}"/etc/init.d/git-daemon + install -Dm644 "${srcdir}"/git-daemon.confd "${pkgdir}"/etc/conf.d/git-daemon + + sed -e 's|/var/git|/srv/git|' -i "${pkgdir}/etc/conf.d/git-daemon" +} diff --git a/nonsystemd/git-openrc/git-daemon.confd b/nonsystemd/git-openrc/git-daemon.confd new file mode 100644 index 0000000..69b209f --- /dev/null +++ b/nonsystemd/git-openrc/git-daemon.confd @@ -0,0 +1,19 @@ +# conf.d file for git-daemon +# +# Please check man 1 git-daemon for more information about the options +# git-daemon accepts. You MUST edit this to include your repositories you wish +# to serve. +# +# Some of the meaningful options are: +# --syslog --- Enables syslog logging +# --verbose --- Enables verbose logging +# --export-all --- Exports all repositories +# --port=XXXX --- Starts in port XXXX instead of 9418 +# +GITDAEMON_OPTS="--syslog --base-path=/var/git" + +# To run an anonymous git safely, the following user should be able to only +# read your Git repositories. It should not be able to write to anywhere on +# your system, esp. not the repositories. +GIT_USER="nobody" +GIT_GROUP="nobody" diff --git a/nonsystemd/git-openrc/git-daemon.initd b/nonsystemd/git-openrc/git-daemon.initd new file mode 100644 index 0000000..db30102 --- /dev/null +++ b/nonsystemd/git-openrc/git-daemon.initd @@ -0,0 +1,13 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/run/git-daemon.pid" +command="/usr/bin/git" +command_args="daemon ${GITDAEMON_OPTS}" +command_user="${GIT_USER:-nobody}:${GIT_GROUP:-nobody}" +start_stop_daemon_args="-e HOME= -e XDG_CONFIG_HOME= -b -m" + +depend() { + use logger +} From 71bcae8bafbdecc0951e399c26c27cdea08467d3 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 20:06:00 +0000 Subject: [PATCH 22/89] glibc-openrc --- diff --git a/nonsystemd/glibc-openrc/PKGBUILD b/nonsystemd/glibc-openrc/PKGBUILD new file mode 100644 index 0000000..b06d47d --- /dev/null +++ b/nonsystemd/glibc-openrc/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer: artoo + +pkgname=glibc-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC nscd init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'glibc') +conflicts=('systemd-sysvcompat') +source=("nscd.initd") +sha512sums=('be8cbf94f818121e522fb93a696674c9e0433d2f61764074c4d0a2dbaaa14dc4e7a21e288689cea8394183ae9410e34e92811ca3d48cd410ef427167c8e3f7a7') + +package() { + install -Dm755 "${srcdir}"/nscd.initd "${pkgdir}"/etc/init.d/nscd +} diff --git a/nonsystemd/glibc-openrc/nscd.initd b/nonsystemd/glibc-openrc/nscd.initd new file mode 100644 index 0000000..9e9ca18 --- /dev/null +++ b/nonsystemd/glibc-openrc/nscd.initd @@ -0,0 +1,85 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="The 'Name Service Cache Daemon' is a daemon that provides a cache" +description="${description} for the most common name service requests" + +extra_started_commands="flush_all flush_hosts flush_group flush_passwd flush_netgroup flush_services" + +description_flush_all="Will invalidate hosts, group, passwd, netgroup and services cache" +description_flush_hosts="Will invalidate hosts cache" +description_flush_group="Will invalidate group cache" +description_flush_passwd="Will invalidate passwd cache" +description_flush_netgroup="Will invalidate netgroup cache" +description_flush_services="Will invalidate services cache" + +pidfile="/run/nscd/nscd.pid" +command="/usr/bin/nscd" + +depend() { + use dns ldap net slapd logger +} + +checkconfig() { + if [ ! -d /run/nscd ] ; then + checkpath -d -m 755 /run/nscd + fi + + if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /run/nscd)" != "755" ] ; then + ewarn "nscd run dir is not readable, you should reset the perms:" + ewarn "chmod 755 /run/nscd" + ewarn "chmod a+rw /run/nscd/socket" + ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd" + fi + + if grep -qs '^[[:space:]]*persistent\>' /etc/nscd.conf ; then + checkpath -d -m 700 /var/db/nscd + fi +} + +_flush() { + local table=$1 + + ebegin "Flushing ${table} table" + ${command} --invalidate ${table} + eend $? +} + +flush_all() { + local has_errors=0 + + ebegin "Flushing all caches" + + local table= + for table in passwd group hosts netgroup services; do + ${command} --invalidate ${table} + [ $? -ne 0 ] && has_errors=1 + done + + eend ${has_errors} +} + +flush_hosts() { + _flush hosts +} + +flush_group() { + _flush group +} + +flush_passwd() { + _flush passwd +} + +flush_netgroup() { + _flush netgroup +} + +flush_services() { + _flush services +} + +start_pre() { + checkconfig +} From 430455f113e5787a22054105b938f5d2ee3a2aa0 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 20:22:02 +0000 Subject: [PATCH 23/89] acpid-openrc --- diff --git a/nonsystemd/acpid-openrc/PKGBUILD b/nonsystemd/acpid-openrc/PKGBUILD new file mode 100644 index 0000000..fe9e9bf --- /dev/null +++ b/nonsystemd/acpid-openrc/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: Rafli Akmal +# Contributor: artoo +# Contributor: Oscar Campos + + +pkgname=acpid-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC acpid init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'acpid') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/acpid') +source=("acpid.confd" + "acpid.initd") +sha512sums=('518cb397b2aa63b893ead1be08f32fe436d19b72663dee66834cfbc112b003333f0df8b9e4f1ffe64b813783f657d3fe8b9a0c5e992d5665583357e68b266705' + '16ba6ef1638d2069d6065b16becbaf79059d59771f3134512380aea1fe3468b50c42d5a664398cd31ee9bb21d7fc4f31b683a3094e26f8d5a202675b5ffad2cb') + +package() { + install -Dm755 "$srcdir/acpid.initd" "$pkgdir/etc/init.d/acpid" + install -Dm644 "$srcdir/acpid.confd" "$pkgdir/etc/conf.d/acpid" +} diff --git a/nonsystemd/acpid-openrc/acpid.confd b/nonsystemd/acpid-openrc/acpid.confd new file mode 100644 index 0000000..9aadb4c --- /dev/null +++ b/nonsystemd/acpid-openrc/acpid.confd @@ -0,0 +1,6 @@ +# /etc/conf.d/acpid: config file for /etc/init.d/acpid + +# Options to pass to the acpid daemon. +# See the acpid(8) man page for more info. + +ACPID_ARGS="" diff --git a/nonsystemd/acpid-openrc/acpid.initd b/nonsystemd/acpid-openrc/acpid.initd new file mode 100644 index 0000000..98e36a2 --- /dev/null +++ b/nonsystemd/acpid-openrc/acpid.initd @@ -0,0 +1,22 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +command="/usr/bin/acpid" +command_args="${ACPID_ARGS}" +description="Daemon for Advanced Configuration and Power Interface" +supervisor="supervise-daemon" +command_args_foreground="--foreground" +#pidfile="/run/acpid.pid" + +depend() { + need localmount + use logger +} + +reload() { + ebegin "Reloading acpid configuration" + ${supervisor} ${RC_SVCNAME} --signal HUP --pidfile /run/acpid.pid + eend $? +} From c8eb1aa4462620bc1a45f8a46bb116a120fd2450 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 20:26:09 +0000 Subject: [PATCH 24/89] alsa-utils-openrc --- diff --git a/nonsystemd/alsa-utils-openrc/PKGBUILD b/nonsystemd/alsa-utils-openrc/PKGBUILD new file mode 100644 index 0000000..7168db0 --- /dev/null +++ b/nonsystemd/alsa-utils-openrc/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: artoo + +pkgname=alsa-utils-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC alsa-utils init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'alsa-utils') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/alsasound') +source=("alsasound.confd" + "alsasound.initd") +sha512sums=('90c1e974276945f7632dc370a005b58d669b93edbf27116098d4831e69c11c26d9b21e7eacfaf12c50019f8c88dc1f370101e2d905fdde40887fe36bac00d83e' + '2c47ce37f426c14566e4c408d3c73df87900f50818f83a90f8e2238c1256b45e0933dd72a03c08e5b636291696c0e9119b1a6cbe5ed6291208b1a38762a67625') + +package() { + install -Dm755 "${srcdir}"/alsasound.initd "${pkgdir}"/etc/init.d/alsasound + install -Dm644 "${srcdir}"/alsasound.confd "${pkgdir}"/etc/conf.d/alsasound +} + diff --git a/nonsystemd/alsa-utils-openrc/alsasound.confd b/nonsystemd/alsa-utils-openrc/alsasound.confd new file mode 100644 index 0000000..6fec8f5 --- /dev/null +++ b/nonsystemd/alsa-utils-openrc/alsasound.confd @@ -0,0 +1,15 @@ +# RESTORE_ON_START: +# Do you want to restore your mixer settings? If not, your cards will be +# muted. +# no - Do not restore state +# yes - Restore state + +RESTORE_ON_START="yes" + +# SAVE_ON_STOP: +# Do you want to save changes made to your mixer volumes when alsasound +# stops? +# no - Do not save state +# yes - Save state + +SAVE_ON_STOP="yes" diff --git a/nonsystemd/alsa-utils-openrc/alsasound.initd b/nonsystemd/alsa-utils-openrc/alsasound.initd new file mode 100644 index 0000000..5d866f6 --- /dev/null +++ b/nonsystemd/alsa-utils-openrc/alsasound.initd @@ -0,0 +1,87 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +alsastatedir=/var/lib/alsa +alsascrdir=/etc/alsa.d +alsahomedir=/run/alsasound + +extra_commands="save restore" + +depend() { + need localmount + after bootmisc modules isapnp coldplug hotplug +} + +restore() { + ebegin "Restoring Mixer Levels" + + checkpath -q -d -m 0700 -o root:root ${alsahomedir} || return 1 + + if [ ! -r "${alsastatedir}/asound.state" ] ; then + ewarn "No mixer config in ${alsastatedir}/asound.state, you have to unmute your card!" + eend 0 + return 0 + fi + + local cards="$(sed -n -e 's/^ *\([[:digit:]]*\) .*/\1/p' /proc/asound/cards)" + local CARDNUM + for cardnum in ${cards}; do + [ -e /dev/snd/controlC${cardnum} ] || sleep 2 + [ -e /dev/snd/controlC${cardnum} ] || sleep 2 + [ -e /dev/snd/controlC${cardnum} ] || sleep 2 + [ -e /dev/snd/controlC${cardnum} ] || sleep 2 + alsactl -E HOME="${alsahomedir}" -I -f "${alsastatedir}/asound.state" restore ${cardnum} \ + || ewarn "Errors while restoring defaults, ignoring" + done + + for ossfile in "${alsastatedir}"/oss/card*_pcm* ; do + [ -e "${ossfile}" ] || continue + # We use cat because I'm not sure if cp works properly on /proc + local procfile=${ossfile##${alsastatedir}/oss} + procfile="$(echo "${procfile}" | sed -e 's,_,/,g')" + if [ -e /proc/asound/"${procfile}"/oss ] ; then + cat "${ossfile}" > /proc/asound/"${procfile}"/oss + fi + done + + eend 0 +} + +save() { + ebegin "Storing ALSA Mixer Levels" + + checkpath -q -d -m 0700 -o root:root ${alsahomedir} || return 1 + + mkdir -p "${alsastatedir}" + if ! alsactl -E HOME="${alsahomedir}" -f "${alsastatedir}/asound.state" store; then + eerror "Error saving levels." + eend 1 + return 1 + fi + + for ossfile in /proc/asound/card*/pcm*/oss; do + [ -e "${ossfile}" ] || continue + local device=${ossfile##/proc/asound/} ; device=${device%%/oss} + device="$(echo "${device}" | sed -e 's,/,_,g')" + mkdir -p "${alsastatedir}/oss/" + cp "${ossfile}" "${alsastatedir}/oss/${device}" + done + + eend 0 +} + +start() { + if [ "${RESTORE_ON_START}" = "yes" ]; then + restore + fi + + return 0 +} + +stop() { + if [ "${SAVE_ON_STOP}" = "yes" ]; then + save + fi + return 0 +} From 3b5c310116146f0e1b60185b2e76c87c9f25cdde Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 20:35:03 +0000 Subject: [PATCH 25/89] apparmor-openrc --- diff --git a/nonsystemd/apparmor-openrc/PKGBUILD b/nonsystemd/apparmor-openrc/PKGBUILD new file mode 100644 index 0000000..d2ff041 --- /dev/null +++ b/nonsystemd/apparmor-openrc/PKGBUILD @@ -0,0 +1,17 @@ +# Maintainer: artoo + +pkgname=apparmor-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC apparmor init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'apparmor') +conflicts=('systemd-sysvcompat') +source=("apparmor.initd") +sha512sums=('4912f8ee8f2e0277d85483279bd4a8ee8e25c9a466a080b0c4fe7c778f6215c144712e166d2a46bb05b0f5411ecfd9b5ef57b1141b76df103d3c577bfd9fd315') + +package() { + install -Dm755 "${srcdir}"/apparmor.initd "${pkgdir}"/etc/init.d/apparmor +} diff --git a/nonsystemd/apparmor-openrc/apparmor.initd b/nonsystemd/apparmor-openrc/apparmor.initd new file mode 100644 index 0000000..773aa53 --- /dev/null +++ b/nonsystemd/apparmor-openrc/apparmor.initd @@ -0,0 +1,91 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="Load all configured profiles for the AppArmor security module." +description_reload="Reload all profiles" + +extra_started_commands="reload" + +aa_action() { + local arg=$1 + local return + + shift + $* + return=$? + + if [ ${return} -eq 0 ]; then + aa_log_success_msg $arg + else + aa_log_failure_msg arg + fi + + return $return +} + +aa_log_action_start() { + ebegin $1 +} + +aa_log_action_end() { + eend $1 +} + +aa_log_success_msg() { + einfo $1 +} + +aa_log_warning_msg() { + ewarn $1 +} + +aa_log_failure_msg() { + eerror $1 +} + +aa_log_skipped_msg() { + einfo $1 +} + +aa_log_daemon_msg() { + einfo $1 +} + +aa_log_end_msg() { + eend $1 +} + +. /usr/lib/apparmor/rc.apparmor.functions + +start() { + ebegin "Starting AppArmor" + eindent + + if ! is_apparmor_loaded ; then + load_module + if [ $? -ne 0 ]; then + eerror "AppArmor kernel support is not present" + eend 1 + return 1 + fi + fi + + parse_profiles load + + eoutdent +} + +stop() { + ebegin "Stopping AppArmor" + eindent + apparmor_stop + eoutdent +} + +reload() { + # todo: split out clean_profiles into its own function upstream + # so we can do parse_profiles reload && clean_profiles + # and do a proper reload instead of restart + apparmor_restart +} From b7ebb2ca9c246214bdf852d9bdfc3a58824a9c17 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 19 2022 20:51:39 +0000 Subject: [PATCH 26/89] avahi-openrc --- diff --git a/nonsystemd/avahi-openrc/PKGBUILD b/nonsystemd/avahi-openrc/PKGBUILD new file mode 100644 index 0000000..a65d767 --- /dev/null +++ b/nonsystemd/avahi-openrc/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: artoo + +pkgname=avahi-openrc +pkgver=20220519 +pkgrel=1 +pkgdesc="OpenRC avahi init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('avahi' 'dbus-openrc') +conflicts=('systemd-sysvcompat') +source=('avahi-daemon.initd' + 'avahi-dnsconfd.initd' + 'autoipd-openrc.sh') +sha512sums=('f3a0f8e16efc7f70327349146582a49bdf1645b63407f1334ef16a80102850c1fe466bcfc0ae4b6859155ed296787c60a03bfc69713f30676b2b2a198b743b61' + 'ad1b6ffb336dd8b653d4fd668b7e61f6f6a06628adbedd4db29b755ae66a369bfddddccdbe2acaf13a1ec7640755db91ab831448aa4395f6a756d9ae76e38334' + '83b9753a0a7bfceca975a69a07c31af3d2e8ddd37b9459bb7ec65dea566c48932ea641f789f21c7b5ede48473dc4c0316fce4a9be843ecb05a3b1697aa176ae1') + +package() { + install -Dm755 "${srcdir}"/avahi-daemon.initd "${pkgdir}"/etc/init.d/avahi-daemon + install -Dm755 "${srcdir}"/avahi-dnsconfd.initd "${pkgdir}"/etc/init.d/avahi-dnsconfd + + install -Dm755 autoipd-openrc.sh "${pkgdir}"/usr/lib/netifrc/net/autoipd.sh + + sed -e 's|/usr/sbin|/usr/bin|g' -i "${pkgdir}/etc/init.d/avahi-daemon" + sed -e 's|/usr/sbin|/usr/bin|g' -i "${pkgdir}/etc/init.d/avahi-dnsconfd" +} diff --git a/nonsystemd/avahi-openrc/autoipd-openrc.sh b/nonsystemd/avahi-openrc/autoipd-openrc.sh new file mode 100644 index 0000000..7490852 --- /dev/null +++ b/nonsystemd/avahi-openrc/autoipd-openrc.sh @@ -0,0 +1,32 @@ +# Copyright (C) 2004-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Contributed by Sven Wegener (swegener@gentoo.org) + +_config_vars="$_config_vars autoipd" + +autoipd_depend() { + program /usr/bin/avahi-autoipd + after interface +} + +autoipd_start() { + _exists true || return 1 + + eval args=\$autoipd_${IFVAR} + + ebegin "Starting avahi-autoipd" + /usr/bin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}" + eend "${?}" || return 1 + + _show_address + + return 0 +} + +autoipd_stop() { + /usr/bin/avahi-autoipd --check --syslog "${IFACE}" || return 0 + + ebegin "Stopping avahi-autoipd" + /usr/bin/avahi-autoipd --kill --syslog "${IFACE}" + eend "${?}" +} diff --git a/nonsystemd/avahi-openrc/avahi-daemon.initd b/nonsystemd/avahi-openrc/avahi-daemon.initd new file mode 100644 index 0000000..c5cd650 --- /dev/null +++ b/nonsystemd/avahi-openrc/avahi-daemon.initd @@ -0,0 +1,31 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +command="/usr/sbin/avahi-daemon" +supervisor="supervise-daemon" + +depend() { + before netmount nfsmount + use net + need dbus +} + +# start() { +# ebegin "Starting avahi-daemon" +# /usr/bin/avahi-daemon -D +# eend $? +# } +# +# stop() { +# ebegin "Stopping avahi-daemon" +# /usr/bin/avahi-daemon -k +# eend $? +# } + +reload() { + ebegin "Reloading avahi-daemon" + ${command} -r + eend $? +} diff --git a/nonsystemd/avahi-openrc/avahi-dnsconfd.initd b/nonsystemd/avahi-openrc/avahi-dnsconfd.initd new file mode 100644 index 0000000..6f86c6d --- /dev/null +++ b/nonsystemd/avahi-openrc/avahi-dnsconfd.initd @@ -0,0 +1,30 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" +supervisor="supervise-daemon" +command="/usr/bin/avahi-dnsconfd" + +depend() { + need avahi-daemon + use net +} + +# start() { +# ebegin "Starting avahi-dnsconfd" +# /usr/bin/avahi-dnsconfd -D +# eend $? +# } +# +# stop() { +# ebegin "Stopping avahi-dnsconfd" +# /usr/bin/avahi-dnsconfd -k +# eend $? +# } + +reload() { + ebegin "Reloading avahi-dnsconfd" + ${command} -r + eend $? +} From 3bef1e8c5af72be77faeac66e61152b505260700 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 06:57:48 +0000 Subject: [PATCH 27/89] added nonsystemd pkgrel --- diff --git a/nonsystemd/acpid-openrc/PKGBUILD b/nonsystemd/acpid-openrc/PKGBUILD index fe9e9bf..f517858 100644 --- a/nonsystemd/acpid-openrc/PKGBUILD +++ b/nonsystemd/acpid-openrc/PKGBUILD @@ -4,8 +4,9 @@ pkgname=acpid-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC acpid init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/alsa-utils-openrc/PKGBUILD b/nonsystemd/alsa-utils-openrc/PKGBUILD index 7168db0..9634465 100644 --- a/nonsystemd/alsa-utils-openrc/PKGBUILD +++ b/nonsystemd/alsa-utils-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=alsa-utils-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC alsa-utils init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/apache-openrc/PKGBUILD b/nonsystemd/apache-openrc/PKGBUILD index 0a30db7..2ec0e45 100644 --- a/nonsystemd/apache-openrc/PKGBUILD +++ b/nonsystemd/apache-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=apache-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC apache init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/apparmor-openrc/PKGBUILD b/nonsystemd/apparmor-openrc/PKGBUILD index d2ff041..cacadfc 100644 --- a/nonsystemd/apparmor-openrc/PKGBUILD +++ b/nonsystemd/apparmor-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=apparmor-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC apparmor init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/avahi-openrc/PKGBUILD b/nonsystemd/avahi-openrc/PKGBUILD index a65d767..f023f94 100644 --- a/nonsystemd/avahi-openrc/PKGBUILD +++ b/nonsystemd/avahi-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=avahi-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC avahi init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/bind-openrc/PKGBUILD b/nonsystemd/bind-openrc/PKGBUILD index 5488440..9837c84 100644 --- a/nonsystemd/bind-openrc/PKGBUILD +++ b/nonsystemd/bind-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=bind-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC bind init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/brltty-openrc/PKGBUILD b/nonsystemd/brltty-openrc/PKGBUILD index 5842cd1..1dff614 100644 --- a/nonsystemd/brltty-openrc/PKGBUILD +++ b/nonsystemd/brltty-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=brltty-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC brltty init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/connman-openrc/PKGBUILD b/nonsystemd/connman-openrc/PKGBUILD index 4b9e1f6..4812b39 100644 --- a/nonsystemd/connman-openrc/PKGBUILD +++ b/nonsystemd/connman-openrc/PKGBUILD @@ -3,8 +3,9 @@ # Contributor: Oscar Campos pkgname=connman-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC connman init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/cpupower-openrc/PKGBUILD b/nonsystemd/cpupower-openrc/PKGBUILD index f636816..89a1a2f 100644 --- a/nonsystemd/cpupower-openrc/PKGBUILD +++ b/nonsystemd/cpupower-openrc/PKGBUILD @@ -3,8 +3,9 @@ # Contributor: Oscar Campos pkgname=cpupower-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC cpupower init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/cryptsetup-openrc/PKGBUILD b/nonsystemd/cryptsetup-openrc/PKGBUILD index 242d943..c99bfc8 100644 --- a/nonsystemd/cryptsetup-openrc/PKGBUILD +++ b/nonsystemd/cryptsetup-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=cryptsetup-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC cryptsetup init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/cups-openrc/PKGBUILD b/nonsystemd/cups-openrc/PKGBUILD index 010796c..3104330 100644 --- a/nonsystemd/cups-openrc/PKGBUILD +++ b/nonsystemd/cups-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=cups-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC cups init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/cyrus-sasl-openrc/PKGBUILD b/nonsystemd/cyrus-sasl-openrc/PKGBUILD index 9360aca..c062798 100644 --- a/nonsystemd/cyrus-sasl-openrc/PKGBUILD +++ b/nonsystemd/cyrus-sasl-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=cyrus-sasl-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC cyrus-sasl init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/dhcp-openrc/PKGBUILD b/nonsystemd/dhcp-openrc/PKGBUILD index 0e1f499..273ed2b 100644 --- a/nonsystemd/dhcp-openrc/PKGBUILD +++ b/nonsystemd/dhcp-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=dhcp-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC dhcp init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/dhcpcd-openrc/PKGBUILD b/nonsystemd/dhcpcd-openrc/PKGBUILD index 4b0df2a..ffa1326 100644 --- a/nonsystemd/dhcpcd-openrc/PKGBUILD +++ b/nonsystemd/dhcpcd-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=dhcpcd-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC dhcpcd init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/dovecot-openrc/PKGBUILD b/nonsystemd/dovecot-openrc/PKGBUILD index 34c2d98..956b38c 100644 --- a/nonsystemd/dovecot-openrc/PKGBUILD +++ b/nonsystemd/dovecot-openrc/PKGBUILD @@ -3,8 +3,9 @@ # Contributor: Oscar Campos pkgname=dovecot-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC dovecot init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/espeakup-openrc/PKGBUILD b/nonsystemd/espeakup-openrc/PKGBUILD index 793d889..7870990 100644 --- a/nonsystemd/espeakup-openrc/PKGBUILD +++ b/nonsystemd/espeakup-openrc/PKGBUILD @@ -3,8 +3,9 @@ # Contributor: Oscar Campos pkgname=espeakup-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC espeakup init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/exim-openrc/PKGBUILD b/nonsystemd/exim-openrc/PKGBUILD index e104058..d6cdf89 100644 --- a/nonsystemd/exim-openrc/PKGBUILD +++ b/nonsystemd/exim-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: Nathan Owens pkgname=exim-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="${pkgname/-openrc/} OpenRC init" arch=('any') url="https://gitea.artixlinux.org/PackagesE/exim-openrc" diff --git a/nonsystemd/fcron-openrc/PKGBUILD b/nonsystemd/fcron-openrc/PKGBUILD index 3c571f5..1d931f0 100644 --- a/nonsystemd/fcron-openrc/PKGBUILD +++ b/nonsystemd/fcron-openrc/PKGBUILD @@ -3,8 +3,9 @@ # Contributor: Oscar Campos pkgname=fcron-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC fcron init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/fuse-openrc/PKGBUILD b/nonsystemd/fuse-openrc/PKGBUILD index efd20fe..768262a 100644 --- a/nonsystemd/fuse-openrc/PKGBUILD +++ b/nonsystemd/fuse-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=fuse-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC fuse init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/git-openrc/PKGBUILD b/nonsystemd/git-openrc/PKGBUILD index 62501f9..4317d71 100644 --- a/nonsystemd/git-openrc/PKGBUILD +++ b/nonsystemd/git-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=git-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC git-daemon init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" diff --git a/nonsystemd/glibc-openrc/PKGBUILD b/nonsystemd/glibc-openrc/PKGBUILD index b06d47d..a5b0d93 100644 --- a/nonsystemd/glibc-openrc/PKGBUILD +++ b/nonsystemd/glibc-openrc/PKGBUILD @@ -1,8 +1,9 @@ # Maintainer: artoo pkgname=glibc-openrc -pkgver=20220519 +pkgver=20220520 pkgrel=1 +pkgrel+=.nonsystemd1 pkgdesc="OpenRC nscd init script" arch=('any') url="https://gitea.artixlinux.org/artixlinux/packages-openrc" From 9c18f58db77465825a27755b5e3202578bcbc6c5 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 07:10:25 +0000 Subject: [PATCH 28/89] bluez-openrc --- diff --git a/nonsystemd/bluez-openrc/PKGBUILD b/nonsystemd/bluez-openrc/PKGBUILD new file mode 100644 index 0000000..f2ffd79 --- /dev/null +++ b/nonsystemd/bluez-openrc/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: artoo + +pkgname=bluez-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC bluez init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('bluez' 'openrc') +conflicts=('systemd-sysvcompat') +source=("bluetoothd.initd") +sha512sums=('f996e18461befb5b6d4435c06a7d7001052af6dcfa41cda2649869ffcaf3b64050af82d11d2d7d41a06803e25bd956e27b5e1c206a6a9364a5d2b2d3291320e6') + +package() { + install -Dm755 "${srcdir}"/bluetoothd.initd "${pkgdir}"/etc/init.d/bluetoothd +} diff --git a/nonsystemd/bluez-openrc/bluetoothd.initd b/nonsystemd/bluez-openrc/bluetoothd.initd new file mode 100644 index 0000000..4d38cd2 --- /dev/null +++ b/nonsystemd/bluez-openrc/bluetoothd.initd @@ -0,0 +1,13 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +supervisor="supervise-daemon" +#pidfile="/run/bluetoothd.pid" +command="/usr/lib/bluetooth/bluetoothd" +#command_background=1 + +depend() { + after coldplug + need dbus localmount hostname +} From 6b20d392ffbc015c1ef778d9c94d8632b8f6f627 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 07:23:39 +0000 Subject: [PATCH 29/89] chrony-openrc --- diff --git a/nonsystemd/chrony-openrc/PKGBUILD b/nonsystemd/chrony-openrc/PKGBUILD new file mode 100644 index 0000000..6305e83 --- /dev/null +++ b/nonsystemd/chrony-openrc/PKGBUILD @@ -0,0 +1,27 @@ +# Maintainer: Nathan Owens + +pkgname=chrony-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC chrony init" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'chrony') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/chrony') +source=("chrony.confd" + "chrony.initd") +sha512sums=('1efa02f6b06aabf62bc34aadeb43279d0962987d3836a5b4bf6ecde45cc3d0fc4e6e72c1280171c6f9e3cc87a29638b2b25a926d8e529c26b0fdd66e905c8fbb' + '66366f2f7009408f1d5f5427a9a2f0c8221b6a7a8e5ebd53df74282a72e9fd7ce75c01c05d11db38814af3a6d98034dfa5efc967a85ca9655828b58bdf01f1cf') +b2sums=('496483539b15a55c15287178b7df730fe33fe8d7ceda164f362c0dd6cd833bbee84a0a0496586489659075fc10aafed0f221fb78d60804ddd9edd24e71f6d49b' + '4e8f80b060bcc7f6f3b0d702f1b85387f6e545c31f315232574bf8ebd5ad2a6604a80a994ba629ffe419776a29339d894f0c1c7db78e9cd6fb4dc4761cf2c398') + + +package() { + install -Dm755 "${srcdir}"/chrony.initd "${pkgdir}"/etc/init.d/chrony + install -Dm644 "${srcdir}"/chrony.confd "${pkgdir}"/etc/conf.d/chrony + + sed -e 's|/etc/chrony/|/etc/|' -i "${pkgdir}/etc/init.d/chrony" +} diff --git a/nonsystemd/chrony-openrc/chrony.confd b/nonsystemd/chrony-openrc/chrony.confd new file mode 100644 index 0000000..3c0f5ab --- /dev/null +++ b/nonsystemd/chrony-openrc/chrony.confd @@ -0,0 +1,17 @@ +# /etc/conf.d/chronyd + +CFGFILE="/etc/chrony.conf" + +# chronyd takes some time to perform a second fork, by enabling this +# option chronyd is deamonized through start-stop-daemon(1) thereby +# significantly reducing the startup time. +FAST_STARTUP=yes + +# Configuration dependant options : +# -s - Set system time from RTC if rtcfile directive present +# -r - Reload sample histories if dumponexit directive present +# +# The combination of "-s -r" allows chronyd to perform long term averaging of +# the gain or loss rate across system reboots and shutdowns. + +ARGS="" diff --git a/nonsystemd/chrony-openrc/chrony.initd b/nonsystemd/chrony-openrc/chrony.initd new file mode 100644 index 0000000..ce7b079 --- /dev/null +++ b/nonsystemd/chrony-openrc/chrony.initd @@ -0,0 +1,78 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.rc,v 1.8 2007/03/22 14:32:09 tove Exp $ + +command="/usr/bin/chronyd" +description="NTP daemon" +pidfile="/run/chrony/chronyd.pid" + +depend() { + need net + after firewall + provide ntp-client ntp-server + use dns +} + +checkconfig() { + # Note that /etc/chrony/chrony.keys is *NOT* checked. This + # is because the user may have specified another key + # file, and we don't want to force the user to use that + # exact name for the key file. + if [ ! -f "${CFGFILE}" ] ; then + eerror "Please create ${CFGFILE} and the" + eerror "chrony key file (usually /etc/chrony/chrony.keys)" + eerror "by using the" + eerror "" + eerror " chrony.conf.example" + eerror " chrony.keys.example" + eerror "" + eerror "files (from the documentation directory)" + eerror "as templates." + return 1 + else + # Actually, I tried it, and chrony seems to ignore the pidfile + # option. I'm going to leave it here anyway, since you never + # know if it might be handy + _cfg_pidfile=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"` + if [ -n "$_cfg_pidfile" ] ; then + pidfile="$_cfg_pidfile" + fi + fi + return 0 +} + +setxtrarg() { + if [ -c /dev/rtc ]; then + grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s" + fi + grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r" + return 0 +} + +start() { + checkconfig || return $? + setxtrarg + + local daemon_args= + if yesno "$FAST_STARTUP"; then + ARGS="${ARGS} -n" + daemon_args="--background" + fi + + ebegin "Starting chronyd" + start-stop-daemon $daemon_args --start --quiet \ + --exec "${command}" \ + --pidfile "${pidfile}" \ + -- -f "${CFGFILE}" ${ARGS} + eend $? "Failed to start chronyd" +} + +stop() { + checkconfig || return $? + + ebegin "Stopping chronyd" + start-stop-daemon --stop --quiet \ + --pidfile "${pidfile}" + eend $? "Failed to stop chronyd" +} From 74982ab17490b079d7092cb7d3f6084ed0ecd1bb Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 07:47:46 +0000 Subject: [PATCH 30/89] displaymanager-openrc --- diff --git a/nonsystemd/displaymanager-openrc/PKGBUILD b/nonsystemd/displaymanager-openrc/PKGBUILD new file mode 100644 index 0000000..231f105 --- /dev/null +++ b/nonsystemd/displaymanager-openrc/PKGBUILD @@ -0,0 +1,30 @@ + +pkgname=displaymanager-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgrel+=.nonsystemd1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC display manager init script" +arch=('any') +license=('GPL2') +depends=('openrc' 'xorg-server' 'xorg-xinit') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/xdm') +install=displaymanager.install +source=("xdm.confd" + "xdm.initd" + "xdm-setup.initd" + "startDM.sh") +sha512sums=('7c40f910a8b1eae833fd04cba4f4c7b602bd9733c543c1311c71a47a7e66c1a38ba6472f6ee2becaac5aa9c0981da83342347c26f25747212995d9501ed55cf4' + '4597fb3b19dbe2944c0ad3a1d4d5f2f9aa8eac8f80094bfbcbe3b0e7aff73170d054fd997008442a784ecd18dbc5813166662a99277f4ac639bb01db39893883' + '8447309c7b167572bb3a140db897e55c3079c4ee8da5f544dfa5874452fbc72f973ad1b1e83bcb667831dd0a44e9473b6383980a40a9a4b0e1362366ef9aae67' + '3cc7b84e12df1f17845d3ff0e43aea820b0335f6743a22a7d71fb006698a99d274a641cc655a34f3d88d986365d8f7c842b113be9cbda52d7459436b71d38598') + +package() { + install -Dm755 "${srcdir}"/xdm.confd "${pkgdir}"/etc/conf.d/xdm + install -Dm755 "${srcdir}"/xdm.initd "${pkgdir}"/etc/init.d/xdm + install -Dm755 "${srcdir}"/xdm-setup.initd "${pkgdir}"/etc/init.d/xdm-setup + + install -Dm755 "${srcdir}"/startDM.sh "${pkgdir}"/etc/X11/startDM.sh +} diff --git a/nonsystemd/displaymanager-openrc/displaymanager.install b/nonsystemd/displaymanager-openrc/displaymanager.install new file mode 100644 index 0000000..dfd82b3 --- /dev/null +++ b/nonsystemd/displaymanager-openrc/displaymanager.install @@ -0,0 +1,3 @@ +post_install() { + echo " ==> Edit /etc/conf.d/xdm to set DM." +} diff --git a/nonsystemd/displaymanager-openrc/startDM.sh b/nonsystemd/displaymanager-openrc/startDM.sh new file mode 100644 index 0000000..489a739 --- /dev/null +++ b/nonsystemd/displaymanager-openrc/startDM.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 + +# We need to source /etc/profile for stuff like $LANG to work +# bug #10190. +. /etc/profile + +. /etc/init.d/functions.sh + +# Great new Gnome2 feature, AA +# We enable this by default +export GDK_USE_XFT=1 + +export SVCNAME=xdm +EXEC="$(get_options service)" +NAME="$(get_options name)" +PIDFILE="$(get_options pidfile)" +START_STOP_ARGS="$(get_options start_stop_args)" + +start-stop-daemon --start --exec ${EXEC} \ +${NAME:+--name} ${NAME} ${PIDFILE:+--pidfile} ${PIDFILE} ${START_STOP_ARGS} || \ +eerror "ERROR: could not start the Display Manager" + +# vim:ts=4 diff --git a/nonsystemd/displaymanager-openrc/xdm-setup.initd b/nonsystemd/displaymanager-openrc/xdm-setup.initd new file mode 100644 index 0000000..05f41a9 --- /dev/null +++ b/nonsystemd/displaymanager-openrc/xdm-setup.initd @@ -0,0 +1,13 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + need localmount +} + +start() { + if get_bootparam "nox" ; then + touch /etc/.noxdm + fi +} diff --git a/nonsystemd/displaymanager-openrc/xdm.confd b/nonsystemd/displaymanager-openrc/xdm.confd new file mode 100644 index 0000000..f6ebd0b --- /dev/null +++ b/nonsystemd/displaymanager-openrc/xdm.confd @@ -0,0 +1,10 @@ +# We always try and start X on a static VT. The various DMs normally default +# to using VT7. If you wish to use the xdm init script, then you should ensure +# that the VT checked is the same VT your DM wants to use. We do this check to +# ensure that you haven't accidentally configured something to run on the VT +# in your /etc/inittab file so that you don't get a dead keyboard. +CHECKVT=7 + +# What display manager do you use ? [ xdm | gdm | sddm | gpe | entrance | lightdm | lxdm ] +# NOTE: If this is set in /etc/rc.conf, that setting will override this one. +DISPLAYMANAGER="xdm" diff --git a/nonsystemd/displaymanager-openrc/xdm.initd b/nonsystemd/displaymanager-openrc/xdm.initd new file mode 100644 index 0000000..545aea1 --- /dev/null +++ b/nonsystemd/displaymanager-openrc/xdm.initd @@ -0,0 +1,132 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 + +depend() { + need localmount xdm-setup + + # this should start as early as possible + after bootmisc consolefont modules netmount + after readahead-list ypbind autofs openvpn gpm lircmd + after quota keymaps + before alsasound + + # Start before X + use elogind dbus xfs +} + +setup_dm() { + local MY_XDM + + MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]') + + NAME= + case "${MY_XDM}" in + entrance*) + EXE=/usr/bin/entrance + PIDFILE=/run/entrance.pid + ;; + gdm|gnome) + EXE=/usr/bin/gdm + PIDFILE=/run/gdm/gdm.pid + START_STOP_ARGS="--background" + AUTOCLEAN_CGROUP="yes" + ;; + wdm) + EXE=/usr/bin/wdm + PIDFILE= + ;; + gpe) + EXE=/usr/bin/gpe-dm + PIDFILE=/run/gpe-dm.pid + ;; + lxdm) + EXE=/usr/bin/lxdm-binary + PIDFILE=/run/lxdm.pid + START_STOP_ARGS="--background" + ;; + lightdm) + EXE=/usr/bin/lightdm + PIDFILE=/run/lightdm.pid + START_STOP_ARGS="--background" + ;; + sddm) + EXE="/usr/bin/sddm" + START_STOP_ARGS="-m --background" + PIDFILE=/run/sddm.pid + ;; + *) + # first find out if there is such executable + EXE="$(command -v ${MY_XDM} 2>/dev/null)" + PIDFILE="/run/${MY_XDM}.pid" + + # warn user that he is doing sick things if the exe was not found + if [ -z "${EXE}" ]; then + echo "ERROR: Your XDM value is invalid." + echo " No ${MY_XDM} executable could be found on your system." + fi + ;; + esac + + if ! [ -x "${EXE}" ]; then + EXE=/usr/bin/xdm + PIDFILE=/run/xdm.pid + if ! [ -x "/usr/bin/xdm" ]; then + echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm," + echo " or install x11-apps/xdm package" + eend 255 + fi + fi +} + +start() { + local EXE NAME PIDFILE AUTOCLEAN_CGROUP + setup_dm + + if [ -f /etc/.noxdm ]; then + einfo "Skipping ${EXE##*/}, /etc/.noxdm found or \"nox\" bootparam passed." + rm /etc/.noxdm + return 0 + fi + + ebegin "Setting up ${EXE##*/}" + + # save the prefered DM + save_options "service" "${EXE}" + save_options "name" "${NAME}" + save_options "pidfile" "${PIDFILE}" + save_options "start_stop_args" "${START_STOP_ARGS}" + save_options "autoclean_cgroup" "${AUTOCLEAN_CGROUP:-no}" + + /etc/X11/startDM.sh + eend 0 +} + +stop() { + local retval + + retval=0 + + local myexe myname mypidfile myservice + myexe=$(get_options "service") + myname=$(get_options "name") + mypidfile=$(get_options "pidfile") + myservice=${myexe##*/} + yesno "${rc_cgroup_cleanup:-no}" || rc_cgroup_cleanup=$(get_options "autoclean_cgroup") + + [ -z "${myexe}" ] && return 0 + + ebegin "Stopping ${myservice}" + + if start-stop-daemon --quiet --test --stop --exec "${myexe}"; then + start-stop-daemon --stop --exec "${myexe}" --retry TERM/5/TERM/5 \ + ${mypidfile:+--pidfile} ${mypidfile} \ + ${myname:+--name} ${myname} + retval=${?} + fi + + eend ${retval} "Error stopping ${myservice}" + return ${retval} +} + +# vim: set ts=4 : From 4058df2f79dbae9c2a34cf02e04513e56be1aeec Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 07:52:58 +0000 Subject: [PATCH 31/89] firewalld-openrc --- diff --git a/nonsystemd/firewalld-openrc/PKGBUILD b/nonsystemd/firewalld-openrc/PKGBUILD new file mode 100644 index 0000000..8e490b8 --- /dev/null +++ b/nonsystemd/firewalld-openrc/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: Nathan Owens +# Submitter: alium@artixlinux.org + +pkgname=firewalld-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC firewalld init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'firewalld') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/firewalld') +source=("firewalld.initd") +sha512sums=('52d1853fda91ade0245f93d06f3e2ea8d60005e7b7620d5f276f271d661c2fd8f99a34895c2cf74d4504a693b557a3f4fde5996bf14da0e630c7c3c82d989d5e') + +package() { + install -Dm755 "$srcdir/firewalld.initd" "$pkgdir/etc/init.d/firewalld" + + sed -e 's|/usr/sbin|/usr/bin|g' -i ${pkgdir}/etc/init.d/firewalld +} diff --git a/nonsystemd/firewalld-openrc/firewalld.initd b/nonsystemd/firewalld-openrc/firewalld.initd new file mode 100644 index 0000000..0808b88 --- /dev/null +++ b/nonsystemd/firewalld-openrc/firewalld.initd @@ -0,0 +1,14 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="FirewallD" + +supervisor=supervise-daemon +command=/usr/sbin/firewalld +command_args="--nofork" + +depend() { + need dbus + provide firewall +} From 7b1ce1c3aa31380dc45ad2a9e93a02bae04c8dcd Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 08:01:42 +0000 Subject: [PATCH 32/89] gpm-openrc --- diff --git a/nonsystemd/gpm-openrc/PKGBUILD b/nonsystemd/gpm-openrc/PKGBUILD new file mode 100644 index 0000000..fa13b78 --- /dev/null +++ b/nonsystemd/gpm-openrc/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: artoo + +pkgname=gpm-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC gpm init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'gpm') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/gpm') +source=("gpm.confd" + "gpm.initd") +sha512sums=('14a4306a7454d1a12fda29973b51aadd6d1a5cf4833b1be5298cfe0c1ebc63a479cc79490007ae92c6ae24368e19215dfc4bd50ef5b0cfa0fef88cf69db67065' + '60f963b826952ce18e3043bd82b4e23be0c1bfb244ec9d8fdcc52b0d3c43c5d8c03770159d87597c5876fc425e1346c77a211f95e2119b8f284a27518a0d2eba') + +package() { + install -Dm755 "${srcdir}"/gpm.initd "${pkgdir}"/etc/init.d/gpm + install -Dm755 "${srcdir}"/gpm.confd "${pkgdir}"/etc/conf.d/gpm + + sed -e 's|/var/run|/run|g' -i ${pkgdir}/etc/init.d/gpm +} diff --git a/nonsystemd/gpm-openrc/gpm.confd b/nonsystemd/gpm-openrc/gpm.confd new file mode 100644 index 0000000..f21c257 --- /dev/null +++ b/nonsystemd/gpm-openrc/gpm.confd @@ -0,0 +1,23 @@ +# /etc/init.d/gpm + +# Please uncomment the type of mouse you have and the appropriate MOUSEDEV entry + +MOUSE=ps2 +#MOUSE=imps2 +#MOUSEDEV=/dev/psaux +MOUSEDEV=/dev/input/mice + +# Extra settings + +#RESPONSIVENESS= +#REPEAT_TYPE=raw + +# Please uncomment this line if you want gpm to understand charsets used +# in URLs and names with ~ or : in them, etc. This is a good idea to turn on! + +#APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\"" + +# Various other options, see gpm(8) manpage for more. + +#APPEND="-g 1 -A60" +#APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\" -g 1 -A60" diff --git a/nonsystemd/gpm-openrc/gpm.initd b/nonsystemd/gpm-openrc/gpm.initd new file mode 100644 index 0000000..4d06adb --- /dev/null +++ b/nonsystemd/gpm-openrc/gpm.initd @@ -0,0 +1,28 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +#NB: Config is in /etc/conf.d/gpm + +command=/usr/bin/gpm +command_args=" + -m ${MOUSEDEV} + -t ${MOUSE} + ${RESPONSIVENESS:+ -r ${RESPONSIVENESS}} + ${REPEAT_TYPE:+ -R${REPEAT_TYPE}} + ${APPEND} +" + +pidfile=/var/run/gpm.pid + +depend() { + need localmount + use hotplug logger +} + +start_pre() { + if [ -z "${MOUSEDEV}" ] || [ -z "${MOUSE}" ] ; then + eerror "You need to setup MOUSEDEV and MOUSE in /etc/conf.d/gpm first" + return 1 + fi +} From b453aab80ecef045122496d4e4a766cbdf1faee1 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 08:09:04 +0000 Subject: [PATCH 33/89] haveged-openrc --- diff --git a/nonsystemd/haveged-openrc/PKGBUILD b/nonsystemd/haveged-openrc/PKGBUILD new file mode 100644 index 0000000..faadf42 --- /dev/null +++ b/nonsystemd/haveged-openrc/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: artoo +# Maintainer: nous + +pkgname=haveged-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC haveged init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'haveged') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/haveged') +source=("haveged."{confd,initd}) +sha512sums=('b7bc782765a4521d34485d44391da79a3d1ee3bfda548ffcbf662093c8c7fdeb6baf2813ed7aa741b07e7b7e8eca1a94dceaa37ef202f801686d89855ffb7c30' + '521562e63090156ee0320d4a7fd47c7003ae5b78f5ec3bd5586c771324961d49f5877d9859476d2bd462dda519fe731f6e4839302a50639ab33d431c17bc8856') + +package() { + install -Dm755 "${srcdir}"/haveged.initd "${pkgdir}"/etc/init.d/haveged + install -Dm644 "${srcdir}"/haveged.confd "${pkgdir}"/etc/conf.d/haveged +} diff --git a/nonsystemd/haveged-openrc/haveged.confd b/nonsystemd/haveged-openrc/haveged.confd new file mode 100644 index 0000000..a8520a3 --- /dev/null +++ b/nonsystemd/haveged-openrc/haveged.confd @@ -0,0 +1,9 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +WATERMARK=1024 + +# -r0 is added always +HAVEGED_OPTS="-w ${WATERMARK} -v 1" + +# vim:ft=gentoo-conf-d: diff --git a/nonsystemd/haveged-openrc/haveged.initd b/nonsystemd/haveged-openrc/haveged.initd new file mode 100644 index 0000000..ba20350 --- /dev/null +++ b/nonsystemd/haveged-openrc/haveged.initd @@ -0,0 +1,14 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +pidfile=/run/${SVCNAME}.pid + +supervisor=supervise-daemon +command="/usr/bin/${SVCNAME}" +command_args="-r 0 ${HAVEGED_OPTS} --Foreground" + +depend() { + need localmount + provide entropy +} From 309322d5428a55ddf972bd21dfb60446182ba2dc Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 08:14:13 +0000 Subject: [PATCH 34/89] hdparm-openrc --- diff --git a/nonsystemd/hdparm-openrc/PKGBUILD b/nonsystemd/hdparm-openrc/PKGBUILD new file mode 100644 index 0000000..dd78024 --- /dev/null +++ b/nonsystemd/hdparm-openrc/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: artoo + +pkgname=hdparm-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC hdparm init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'hdparm') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/hdparm') +source=("hdparm.confd" + "hdparm.initd") +sha512sums=('968c6b9d26a71bf724728c259d35a499a644496875eac255dcac3cb4a7e5cadb677a4f6e5e0f8bbd7e1826b6fb77cb39af15b11d1e59b3e9daf9ba442b9e6f02' + '0417168cf540d2385c5edc4e199c9c2318f97c397d4bbb8b0ac6d4dcadf153564a51a9a5da172442c75a670f79fdec84da5db777a1400cf3c8d8cf6a7066fcc8') + +package() { + install -Dm644 "${srcdir}"/hdparm.confd "${pkgdir}"/etc/conf.d/hdparm + install -Dm755 "${srcdir}"/hdparm.initd "${pkgdir}"/etc/init.d/hdparm + + sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' -i "${pkgdir}"/etc/init.d/hdparm +} diff --git a/nonsystemd/hdparm-openrc/hdparm.confd b/nonsystemd/hdparm-openrc/hdparm.confd new file mode 100644 index 0000000..a1ae626 --- /dev/null +++ b/nonsystemd/hdparm-openrc/hdparm.confd @@ -0,0 +1,26 @@ +# /etc/conf.d/hdparm: config file for /etc/init.d/hdparm + +# +# Note that options such as -y which force *immediate* power saving options +# should generally not be placed here. The hdparm init.d script may run at +# anytime with respect to other init.d scripts that do system wide drive +# scans (like the hald script), so they will merely get spun right back up. +# If you wish to use these options, please use the local.start init.d script +# instead so that you're guaranteed that it will run last. +# + +# You can either set hdparm arguments for each drive using hdX_args, +# discX_args, cdromX_args and genericX_args, e.g. +# +# hda_args="-d1 -X66" +# disc1_args="-d1" +# cdrom0_args="-d1" + +# or you can set options for all PATA drives +pata_all_args="-d1" + +# or you can set options for all SATA drives +sata_all_args="" + +# or, you can set hdparm options for all drives +all_args="" diff --git a/nonsystemd/hdparm-openrc/hdparm.initd b/nonsystemd/hdparm-openrc/hdparm.initd new file mode 100644 index 0000000..bb88d44 --- /dev/null +++ b/nonsystemd/hdparm-openrc/hdparm.initd @@ -0,0 +1,60 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + before bootmisc +} + +do_hdparm() { + local e= + eval e=\$${extra_args} + [ -z "${args}${all_args}${e}" ] && return 0 + + if [ -n "${args:=${all_args} ${e}}" ] ; then + local orgdevice=$(readlink -f "${device}") + if [ -b "${orgdevice}" ] ; then + ebegin "Running hdparm on ${device}" + hdparm ${args} "${device}" > /dev/null + eend $? + fi + fi +} + +scan_nondevfs() { + # non-devfs compatible system + local device + + for device in /dev/hd* /dev/sd* /dev/cdrom* ; do + [ -e "${device}" ] || continue + case "${device}" in + *[0-9]) continue ;; + /dev/hd*) extra_args="pata_all_args" ;; + /dev/sd*) extra_args="sata_all_args" ;; + *) extra_args="_no_xtra_args" ;; + esac + + # check that the block device really exists by + # opening it for reading + local errmsg= status= nomed=1 + errmsg=$(export LC_ALL=C ; : 2>&1 <"${device}") + status=$? + case ${errmsg} in + *": No medium found") nomed=0;; + esac + if [ -b "${device}" ] && [ "${status}" = "0" -o "${nomed}" = "0" ] ; then + local conf_var="${device##*/}_args" + eval args=\$${conf_var} + do_hdparm + fi + done +} + +start() { + if get_bootparam "nohdparm" ; then + ewarn "Skipping hdparm init as requested in kernel cmdline" + return 0 + fi + + scan_nondevfs +} From d2da457cd0b8288cb3ac9b3adc31191edc154ead Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 08:19:39 +0000 Subject: [PATCH 35/89] hostapd-openrc --- diff --git a/nonsystemd/hostapd-openrc/PKGBUILD b/nonsystemd/hostapd-openrc/PKGBUILD new file mode 100644 index 0000000..7d08e13 --- /dev/null +++ b/nonsystemd/hostapd-openrc/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: Rafli Akmal +# Contributor: artoo +# Contributor: Oscar Campos + +pkgname=hostapd-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC hostapd init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'hostapd') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/hostapd') +source=("hostapd.confd" + "hostapd.initd") +sha512sums=('0882263bbd7c0b05bf51f51d66e11a23a0b8ca7da2a3b8a30166d2c5f044c0c134e6bccb1d02c9e81819ca8fb0c0fb55c7121a08fe7233ccaa73ff8ab9a238fe' + '094bd4c536dc57225972b99030cd6d78d558d565767522883133d88c16cccb389affddd06a2b415446b5e6ff7065c2413fdb5e3901b5b095a00aaa8b304aaaef') + +package() { + install -Dm755 "$srcdir/hostapd.initd" "$pkgdir/etc/init.d/hostapd" + install -Dm644 "$srcdir/hostapd.confd" "$pkgdir/etc/conf.d/hostapd" +} diff --git a/nonsystemd/hostapd-openrc/hostapd.confd b/nonsystemd/hostapd-openrc/hostapd.confd new file mode 100644 index 0000000..6038115 --- /dev/null +++ b/nonsystemd/hostapd-openrc/hostapd.confd @@ -0,0 +1,5 @@ +# Space separated list of configuration files +CONFIGS="/etc/hostapd/hostapd.conf" + +# Extra options to pass to hostapd, see hostapd(8) +OPTIONS="" diff --git a/nonsystemd/hostapd-openrc/hostapd.initd b/nonsystemd/hostapd-openrc/hostapd.initd new file mode 100644 index 0000000..af104f9 --- /dev/null +++ b/nonsystemd/hostapd-openrc/hostapd.initd @@ -0,0 +1,21 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/files/hostapd-0.6.9-init.d,v 1.2 2009/05/17 10:18:18 gurligebis Exp $ + +command="/usr/bin/hostapd" +command_args="-B ${OPTIONS} ${CONFIGS}" +extra_started_commands="reload" +required_files="$CONFIGS" + +depend() { + need net + after firewall + use logger +} + +reload() { + ebegin "Reloading ${SVCNAME} configuration" + kill -HUP $(pidof /usr/bin/hostapd) > /dev/null 2>&1 + eend $? +} From d8bd249efe88a1f2ef948da459bc86a2f451d05b Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 08:30:08 +0000 Subject: [PATCH 36/89] inetutils-openrc --- diff --git a/nonsystemd/inetutils-openrc/PKGBUILD b/nonsystemd/inetutils-openrc/PKGBUILD new file mode 100644 index 0000000..56e42ad --- /dev/null +++ b/nonsystemd/inetutils-openrc/PKGBUILD @@ -0,0 +1,20 @@ + +pkgname=inetutils-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC inetutils init scripts" +arch=('any') +license=('GPL2') +depends=('openrc' 'inetutils') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/ftpd') +source=("ftpd.confd" + "ftpd.initd") +sha512sums=('7e7c95b4e1e65b6495346b1bd622bf490001a984bc29c0bd6895b41671ce6214e8dfd37b26333c6a93d7f60934785a1f580d898e26e4818fda8c2c2d32c9d56d' + '39adcb7501a0718ed2e94374da1a7ce653a8a8ca7c09237b5823a7ae1c8cd86df40a774c1503ff0ac488f6779f9b323acd722f8e663f5354c828a4f7a1516e37') + +package() { + install -Dm755 "$srcdir/ftpd.initd" "$pkgdir/etc/init.d/ftpd" + install -Dm644 "$srcdir/ftpd.confd" "$pkgdir/etc/conf.d/ftpd" +} diff --git a/nonsystemd/inetutils-openrc/ftpd.confd b/nonsystemd/inetutils-openrc/ftpd.confd new file mode 100644 index 0000000..df58eab --- /dev/null +++ b/nonsystemd/inetutils-openrc/ftpd.confd @@ -0,0 +1,8 @@ +# +# Parameters to be passed to ftpd +# +FTPD_ARGS="-D" + +# Neeed for openrc newnet +#current openrc4arch packages are compiled with oldnet +#rc_need=\"!net\" diff --git a/nonsystemd/inetutils-openrc/ftpd.initd b/nonsystemd/inetutils-openrc/ftpd.initd new file mode 100644 index 0000000..41be2d5 --- /dev/null +++ b/nonsystemd/inetutils-openrc/ftpd.initd @@ -0,0 +1,26 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +FTPD_BINARY="/usr/bin/ftpd" +FTPD_PIDFILE="/run/ftpd.pid" + +depend() { + use logger dns + need net +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec "${FTPD_BINARY}" \ + --pidfile "${FTPD_PIDFILE}" \ + -- ${FTPD_ARGS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec "${FTPD_BINARY}" \ + --pidfile "${FTPD_PIDFILE}" --quiet + eend $? +} From 988b3316f67a1591e85298536e8fa549818465d2 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 08:54:22 +0000 Subject: [PATCH 37/89] iptables-openrc --- diff --git a/nonsystemd/iptables-openrc/PKGBUILD b/nonsystemd/iptables-openrc/PKGBUILD new file mode 100644 index 0000000..4c85583 --- /dev/null +++ b/nonsystemd/iptables-openrc/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: artoo + +pkgname=iptables-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC iptables init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'iptables') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/iptables' + 'etc/conf.d/ip6tables') +source=("iptables.confd" + "ip6tables.confd" + "iptables.initd" + "ebtables.confd" + "ebtables.initd") +sha512sums=('bd67d53e997ea65755148ba071fe6e3856d6e604b9167c666900721bc3dc24f63d395bc33a1a34ae50f95e72760da630db1a8d35afc81ec5973e60ba5343dc70' + '553ddf83558edaccf891a366175e47aad950853be0de556581cfa08f614afa1f4139c94b8d8d2884ed69018513edeb966331d4d6a615829ada65fac2066840e5' + '8897ab985424c895e261e0fe521921f0da8e09e38394655b0f91c65c0e8f603731faf70489f7a6610c83d6c2fde75f92f309405d72277643165a847e62238df7' + '088308eba077fcec35299c8aaad0492024173504a361c2ba7e29dce106888a78c72818a791f3d3655aed3f6df26a3319c42e2b2c54760cdbad036d46b89b97f3' + '82fa6298595ffdf0c286940f7a77b8246e274c3dc3f8c7448c1b36114cb9c8725b0466ba9feb34bd521bc3f7d9ae049ceae557a059d23acf2a2a97a167647b73') + +package() { + for f in iptables ebtables; do + sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' \ + -e 's|/sbin|/usr/bin|g' \ + -i "${srcdir}"/"$f".initd + install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f" + install -Dm644 "${srcdir}"/"$f".confd "${pkgdir}"/etc/conf.d/"$f" + done + + install -Dm644 "${srcdir}"/ip6tables.confd "${pkgdir}"/etc/conf.d/ip6tables + + install -Dm755 "${srcdir}"/iptables.initd "${pkgdir}"/etc/init.d/ip6tables +} diff --git a/nonsystemd/iptables-openrc/ebtables.confd b/nonsystemd/iptables-openrc/ebtables.confd new file mode 100644 index 0000000..645b26e --- /dev/null +++ b/nonsystemd/iptables-openrc/ebtables.confd @@ -0,0 +1,11 @@ +# /etc/conf.d/ebtables + +# Location in which ebtables initscript will save set rules on +# service shutdown +EBTABLES_SAVE="/var/lib/ebtables/rules-save" + +# Options to pass to ebtables-save and ebtables-restore +SAVE_RESTORE_OPTIONS="" + +# Save state on stopping ebtables +SAVE_ON_STOP="yes" diff --git a/nonsystemd/iptables-openrc/ebtables.initd b/nonsystemd/iptables-openrc/ebtables.initd new file mode 100644 index 0000000..6608760 --- /dev/null +++ b/nonsystemd/iptables-openrc/ebtables.initd @@ -0,0 +1,101 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="save panic" +extra_started_commands="reload" + +ebtables_bin="/sbin/ebtables" +ebtables_save=${EBTABLES_SAVE} + +depend() { + before net + use logger +} + +ebtables_tables() { + for table in filter nat broute; do + if ${ebtables_bin} -t ${table} -L > /dev/null 2>&1; then + printf '%s' "${table} " + fi + done +} + +set_table_policy() { + local chains table=$1 policy=$2 + case ${table} in + nat) chains="PREROUTING POSTROUTING OUTPUT";; + broute) chains="BROUTING";; + filter) chains="INPUT FORWARD OUTPUT";; + *) chains="";; + esac + local chain + for chain in ${chains} ; do + ${ebtables_bin} -t ${table} -P ${chain} ${policy} + done +} + +checkconfig() { + if [ ! -f ${ebtables_save} ] ; then + eerror "Not starting ebtables. First create some rules then run:" + eerror "/etc/init.d/ebtables save" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Loading ebtables state and starting bridge firewall" + ${ebtables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${ebtables_save}" + eend $? +} + +stop() { + if [ "${SAVE_ON_STOP}" = "yes" ] ; then + save || return 1 + fi + ebegin "Stopping bridge firewall" + local a + for a in $(ebtables_tables); do + set_table_policy $a ACCEPT + + ${ebtables_bin} -t $a -F + ${ebtables_bin} -t $a -X + done + eend $? +} + +reload() { + ebegin "Flushing bridge firewall" + local a + for a in $(ebtables_tables); do + ${ebtables_bin} -t $a -F + ${ebtables_bin} -t $a -X + done + eend $? + + start +} + +save() { + ebegin "Saving ebtables state" + touch "${ebtables_save}" + chmod 0600 "${ebtables_save}" + ${ebtables_bin}-save $(ebtables_tables) ${SAVE_RESTORE_OPTIONS} > "${ebtables_save}" + eend $? +} + +panic() { + service_started ebtables && svc_stop + + local a + ebegin "Dropping all packets forwarded on bridges" + for a in $(ebtables_tables); do + ${ebtables_bin} -t $a -F + ${ebtables_bin} -t $a -X + + set_table_policy $a DROP + done + eend $? +} diff --git a/nonsystemd/iptables-openrc/ip6tables.confd b/nonsystemd/iptables-openrc/ip6tables.confd new file mode 100644 index 0000000..e608f41 --- /dev/null +++ b/nonsystemd/iptables-openrc/ip6tables.confd @@ -0,0 +1,27 @@ +# /etc/conf.d/ip6tables + +# Set wait option for xtables lock in seconds +# DEFAULT: 60 +#IPTABLES_LOCK_WAIT_TIME="60" + +# Set wait interval option for xtables lock in microseconds +# DEFAULT: 1000 +#IPTABLES_LOCK_WAIT_INTERVAL="1000" + +# Location in which ip6tables initscript will save set rules on +# service shutdown +IP6TABLES_SAVE="/var/lib/ip6tables/rules-save" + +# Options to pass to ip6tables-save and ip6tables-restore +SAVE_RESTORE_OPTIONS="-c" + +# Save state on stopping ip6tables +SAVE_ON_STOP="yes" + +# If you need to log ip6tables messages as soon as ip6tables starts, +# AND your logger does NOT depend on the network, then you may wish +# to uncomment the next line. +# If your logger depends on the network, and you uncomment this line +# you will create an unresolvable circular dependency during startup. +# After commenting or uncommenting this line, you must run 'rc-update -u'. +#rc_use="logger" diff --git a/nonsystemd/iptables-openrc/iptables.confd b/nonsystemd/iptables-openrc/iptables.confd new file mode 100644 index 0000000..7225374 --- /dev/null +++ b/nonsystemd/iptables-openrc/iptables.confd @@ -0,0 +1,19 @@ +# /etc/conf.d/iptables + +# Location in which iptables initscript will save set rules on +# service shutdown +IPTABLES_SAVE="/var/lib/iptables/rules-save" + +# Options to pass to iptables-save and iptables-restore +SAVE_RESTORE_OPTIONS="-c" + +# Save state on stopping iptables +SAVE_ON_STOP="yes" + +# If you need to log iptables messages as soon as iptables starts, +# AND your logger does NOT depend on the network, then you may wish +# to uncomment the next line. +# If your logger depends on the network, and you uncomment this line +# you will create an unresolvable circular dependency during startup. +# After commenting or uncommenting this line, you must run 'rc-update -u'. +#rc_use="logger" diff --git a/nonsystemd/iptables-openrc/iptables.initd b/nonsystemd/iptables-openrc/iptables.initd new file mode 100644 index 0000000..3dcabb0 --- /dev/null +++ b/nonsystemd/iptables-openrc/iptables.initd @@ -0,0 +1,165 @@ +#!/sbin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="check save panic" +extra_started_commands="reload" + +iptables_lock_wait_time=${IPTABLES_LOCK_WAIT_TIME:-"60"} +iptables_lock_wait_interval=${IPTABLES_LOCK_WAIT_INTERVAL:-"1000"} + +iptables_name=${SVCNAME} +case ${iptables_name} in + iptables|ip6tables) ;; + *) iptables_name="iptables" ;; +esac + +iptables_bin="/sbin/${iptables_name}" +case ${iptables_name} in + iptables) iptables_proc="/proc/net/ip_tables_names" + iptables_save=${IPTABLES_SAVE};; + ip6tables) iptables_proc="/proc/net/ip6_tables_names" + iptables_save=${IP6TABLES_SAVE};; +esac + +depend() { + need localmount #434774 + before net +} + +set_table_policy() { + local has_errors=0 chains table=$1 policy=$2 + case ${table} in + nat) chains="PREROUTING POSTROUTING OUTPUT";; + mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING";; + filter) chains="INPUT FORWARD OUTPUT";; + *) chains="";; + esac + + local chain + for chain in ${chains} ; do + ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -t ${table} -P ${chain} ${policy} + [ $? -ne 0 ] && has_errors=1 + done + + return ${has_errors} +} + +checkkernel() { + if [ ! -e ${iptables_proc} ] ; then + eerror "Your kernel lacks ${iptables_name} support, please load" + eerror "appropriate modules and try again." + return 1 + fi + return 0 +} + +checkconfig() { + if [ -z "${iptables_save}" -o ! -f "${iptables_save}" ] ; then + eerror "Not starting ${iptables_name}. First create some rules then run:" + eerror "/etc/init.d/${iptables_name} save" + return 1 + fi + return 0 +} + +start_pre() { + checkconfig || return 1 +} + +start() { + ebegin "Loading ${iptables_name} state and starting firewall" + ${iptables_bin}-restore --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} ${SAVE_RESTORE_OPTIONS} < "${iptables_save}" + eend $? +} + +stop_pre() { + checkkernel || return 1 +} + +stop() { + if [ "${SAVE_ON_STOP}" = "yes" ] ; then + save || return 1 + fi + + ebegin "Stopping firewall" + local has_errors=0 a + for a in $(cat ${iptables_proc}) ; do + set_table_policy $a ACCEPT + [ $? -ne 0 ] && has_errors=1 + + ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -F -t $a + [ $? -ne 0 ] && has_errors=1 + + ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -X -t $a + [ $? -ne 0 ] && has_errors=1 + done + eend ${has_errors} +} + +reload() { + checkkernel || return 1 + checkrules || return 1 + ebegin "Flushing firewall" + local has_errors=0 a + for a in $(cat ${iptables_proc}) ; do + ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -F -t $a + [ $? -ne 0 ] && has_errors=1 + + ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -X -t $a + [ $? -ne 0 ] && has_errors=1 + done + eend ${has_errors} + + start +} + +checkrules() { + ebegin "Checking rules" + ${iptables_bin}-restore --test ${SAVE_RESTORE_OPTIONS} < "${iptables_save}" + eend $? +} + +check() { + # Short name for users of init.d script. + checkrules +} + +save() { + ebegin "Saving ${iptables_name} state" + checkpath -q -d "$(dirname "${iptables_save}")" + checkpath -q -m 0600 -f "${iptables_save}" + ${iptables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${iptables_save}" + eend $? +} + +panic() { + # use iptables autoload capability to load at least all required + # modules and filter table + ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -S >/dev/null + if [ $? -ne 0 ] ; then + eerror "${iptables_bin} failed to load" + return 1 + fi + + if service_started ${iptables_name}; then + rc-service ${iptables_name} stop + fi + + local has_errors=0 a + ebegin "Dropping all packets" + for a in $(cat ${iptables_proc}) ; do + ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -F -t $a + [ $? -ne 0 ] && has_errors=1 + + ${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -X -t $a + [ $? -ne 0 ] && has_errors=1 + + if [ "${a}" != "nat" ]; then + # The "nat" table is not intended for filtering, the use of DROP is therefore inhibited. + set_table_policy $a DROP + [ $? -ne 0 ] && has_errors=1 + fi + done + eend ${has_errors} +} From 832c58bc5b06017f07bb5232523f554f85937650 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 09:35:05 +0000 Subject: [PATCH 38/89] krb5-openrc --- diff --git a/nonsystemd/krb5-openrc/PKGBUILD b/nonsystemd/krb5-openrc/PKGBUILD new file mode 100644 index 0000000..8f7f78d --- /dev/null +++ b/nonsystemd/krb5-openrc/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: artoo + +pkgname=krb5-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC krb5 init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'krb5') +conflicts=('systemd-sysvcompat') +source=("krb5kadmind.initd" + "krb5kdc.initd" + "krb5kpropd.initd") +sha512sums=('f6f353c6dcada82b27c519d280dac9cae5e2625e56e198df2dd657cb0773cd3759cd28edb0f80734706f1dd7fad83e143fb9fc00436ea0f9f1d3757880a0685e' + '5e9434a65989bfe99eb6c1db4c5828ed0375b856b10ee83c8aa6ad6dd60b6fbe44ee890815776c8fcf326bd7667e5484fc51d1be8ec52f7bf6620788292335a9' + 'c3fc89408e2059044adc2045e0bf206bafe319742784d135c7d471ac4e92e1bddd53e5a7c0d9b5e8930d143ae74fd8cbc7fb85d4624857d17c09628b6e190f70') + +package() { + for f in krb5kadmind krb5kdc krb5kpropd;do + install -Dm755 "${srcdir}/$f".initd "${pkgdir}"/etc/init.d/"$f" + done +} diff --git a/nonsystemd/krb5-openrc/krb5kadmind.initd b/nonsystemd/krb5-openrc/krb5kadmind.initd new file mode 100644 index 0000000..6a2a5c1 --- /dev/null +++ b/nonsystemd/krb5-openrc/krb5kadmind.initd @@ -0,0 +1,25 @@ +#!/usr/bin/openrc-run + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 Admin daemon +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 Admin daemon" +exec="/usr/bin/kadmind" + +depend() { + need krb5kdc + use net +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} -- ${KADMIND_OPTS} 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} diff --git a/nonsystemd/krb5-openrc/krb5kdc.initd b/nonsystemd/krb5-openrc/krb5kdc.initd new file mode 100644 index 0000000..ef5d93a --- /dev/null +++ b/nonsystemd/krb5-openrc/krb5kdc.initd @@ -0,0 +1,24 @@ +#!/usr/bin/openrc-run + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 KDC +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 KDC" +exec="/usr/bin/krb5kdc" + +depend() { + use net +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} -- ${KDC_OPTS} 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} diff --git a/nonsystemd/krb5-openrc/krb5kpropd.initd b/nonsystemd/krb5-openrc/krb5kpropd.initd new file mode 100644 index 0000000..2e5e23d --- /dev/null +++ b/nonsystemd/krb5-openrc/krb5kpropd.initd @@ -0,0 +1,24 @@ +#!/usr/bin/openrc-run + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 kpropd +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 kpropd" +exec="/usr/bin/kpropd" + +depend() { + use net krb5kdc krb5kadmind +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} -- ${KPROPD_OPTS} 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} From 9bcc3bf5576327c2a415c3492e31909761be7af2 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 09:57:49 +0000 Subject: [PATCH 39/89] laptop-mode-tools-openrc --- diff --git a/nonsystemd/laptop-mode-tools-openrc/PKGBUILD b/nonsystemd/laptop-mode-tools-openrc/PKGBUILD new file mode 100644 index 0000000..751a2d1 --- /dev/null +++ b/nonsystemd/laptop-mode-tools-openrc/PKGBUILD @@ -0,0 +1,21 @@ + +pkgname=laptop-mode-tools-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC laptop-mode init scripts" +arch=('any') +license=('GPL2') +depends=('openrc' 'laptop-mode-tools') +conflicts=('systemd-sysvcompat') +source=("laptop_mode.initd") +sha512sums=('4242cda1df6b55cd0bee66dfb9137b6f63118bc31c5f703ed44c42738f47dc794d7f1ed6dd9ba5696b606c4bf624428e8f21e1683cb698d8dda249833a4c5f68') + +package() { + install -Dm755 "$srcdir/laptop_mode.initd" "$pkgdir/etc/init.d/laptop_mode" + + sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' \ + -e 's|/var/run|/run|g' \ + -e 's|/usr/sbin|/usr/bin|g' \ + -i ${pkgdir}/etc/init.d/laptop_mode +} diff --git a/nonsystemd/laptop-mode-tools-openrc/laptop_mode.initd b/nonsystemd/laptop-mode-tools-openrc/laptop_mode.initd new file mode 100644 index 0000000..eef8199 --- /dev/null +++ b/nonsystemd/laptop-mode-tools-openrc/laptop_mode.initd @@ -0,0 +1,52 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +depend() { + need localmount + use acpid hald + after bootmisc +} + +checkconfig() { + if [ ! -f /proc/sys/vm/laptop_mode ] ; then + eerror "Kernel does not support laptop_mode" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting laptop_mode" + # bug #342049 fix + # check if dir exists and creates if it doesn't + checkpath -q -d -m 755 /var/run/laptop-mode-tools + touch /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode auto >/dev/null + eend $? +} + +stop() { + ebegin "Stopping laptop_mode" + rm -f /var/run/laptop-mode-tools/enabled + /usr/sbin/laptop_mode stop >/dev/null + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} has not yet been started" + return 1 + fi + + ebegin "Reloading laptop_mode" + /usr/sbin/laptop_mode stop >/dev/null + rm -f /var/run/laptop-mode-tools/* + /usr/sbin/laptop_mode auto force >/dev/null + eend $? +} + +# vim: set ts=4 : From e198dd1cf30d8f66f94f9c526ce4d78d0a5d250c Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 10:06:24 +0000 Subject: [PATCH 40/89] libvirt-openrc --- diff --git a/nonsystemd/libvirt-openrc/PKGBUILD b/nonsystemd/libvirt-openrc/PKGBUILD new file mode 100644 index 0000000..884e093 --- /dev/null +++ b/nonsystemd/libvirt-openrc/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Rafli Akmal +# Contributor: artoo +# Contributor: Oscar Campos +# Contributor: nous + +pkgname=libvirt-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC libvirt init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'libvirt') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/libvirtd') +source=("libvirtd.confd" + "libvirtd.initd" + "virtlockd.initd" + "virtlogd.initd" + "libvirt-guests.confd" + "libvirt-guests.initd") +sha512sums=('98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91' + 'a3e5cc6f14cd3c9af65b7478d57f275c8e061cd7681b2ec24daf606fe4af5b80488be5a063c5e8d857115c4c80c0bad733d49d2c7261f002fab4542af79f3f06' + '2f2b1421965b4b54524eca8676c522fd455d8abf09f6b184d73367be845513be3f8292714410961d14ef6a49045506b14622feafeb3e6717755374ab73883043' + 'e5af86da3269a50c5d9c8a043706538a8dfc09fe55ac4366244ec62e667bb91b774b08a8a3a0699a6d97f4a0e453257134594a3440b0d75cc19d9dca375a7c63' + '78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc' + '0ada907d26137a728489fc339ff0f096ff6e9b2aae9521b0d964eecdfab288706ad274b02a2e897a2ddf8f62be91499940511c3f694c4333bbc8073fb1e9fde9') + +package() { + for _c in libvirtd libvirt-guests ; do + install -Dm644 "$srcdir/$_c.confd" "$pkgdir/etc/conf.d/$_c" + done + + for _i in libvirtd virtlockd virtlogd libvirt-guests ; do + install -Dm755 "$srcdir/$_i.initd" "$pkgdir/etc/init.d/$_i" + done +} + diff --git a/nonsystemd/libvirt-openrc/libvirt-guests.confd b/nonsystemd/libvirt-openrc/libvirt-guests.confd new file mode 100644 index 0000000..ed2ce58 --- /dev/null +++ b/nonsystemd/libvirt-openrc/libvirt-guests.confd @@ -0,0 +1,68 @@ +# /etc/conf.d/libvirtd + +# LIBVIRT_URIS +# space separated list of libvirt URIs to communicate with to start/stop guests +# Valid values are anything that can be passed to 'virsh connect' + +#LIBVIRT_URIS="qemu:///system" + + +# LIBVIRT_SHUTDOWN +# Valid options: +# * managedsave - Performs a state save external to the VM (for hypervisors +# supporting this operation). qemu-kvm will stop the CPU +# and save off all state to a separate file. When the +# machine is started again, it will resume like nothing +# ever happened. This is guarenteed to always successfully +# stop your machine and restart it. +# +# * shutdown - Sends an ACPI shutdown (think of this as a request to +# your guest to shutdown). There is no way to distinguish +# between guests that are ignoring the shutdown request or +# are stuck or are taking a long time to shutdown. We will +# wait LIBVIRT_MAXWAIT seconds before yanking the power +# out. +# +# * destroy - Immediately stop all running guests. Use with caution as +# this can leave the guest in a corrupted state and might +# lead to data loss. +# + +#LIBVIRT_SHUTDOWN="managedsave" + + +# LIBVIRT_MAXWAIT +# Timeout in seconds until stopping a guest and "pulling the plug" on the +# guest +# Valid values are any integer over 0 + +#LIBVIRT_MAXWAIT="500" + + +# LIBVIRT_START +# If this value is set to 'no', then guests and networks that were shutdown +# by this script when it was stopped will not be started when it is started +# back up. +# Valid values are yes or no + +#LIBVIRT_START="yes" + + +# LIBVIRT_IGNORE_AUTOSTART +# If the VM is marked for autostart in its XML configuration then we won't +# save its start when the init script is stopped. The result is that when +# the init script starts back up, no attempt will be made to start the VM or +# confirm it is started. +# Valid values are yes or no + +#LIBVIRT_IGNORE_AUTOSTART="no" + + +# LIBVIRT_NET_SHUTDOWN +# If libvirtd created networks for you (e.g. NATed networks) then this init +# script will shut them down for you if this is set to 'yes'. Otherwise, +# the networks will be left running. For this option to be useful you must +# have enabled the 'virt-network' USE flag and have had libvirt create a +# NATed network for you. Valid values: 'yes' or 'no' + +#LIBVIRT_NET_SHUTDOWN="yes" diff --git a/nonsystemd/libvirt-openrc/libvirt-guests.initd b/nonsystemd/libvirt-openrc/libvirt-guests.initd new file mode 100644 index 0000000..566de5a --- /dev/null +++ b/nonsystemd/libvirt-openrc/libvirt-guests.initd @@ -0,0 +1,237 @@ +#!/usr/bin/openrc-run + +description="Virtual Machine Management (libvirt) Guests" + +depend() { + use libvirtd +} + +# set the default to QEMU +[ -z "${LIBVIRT_URIS}" ] && LIBVIRT_URIS="qemu:///system" + +# default to suspending the VM via managedsave +case "${LIBVIRT_SHUTDOWN}" in + managedsave|shutdown|destroy) ;; + *) LIBVIRT_SHUTDOWN="managedsave" ;; +esac + +# default to 500 seconds +[ -z ${LIBVIRT_MAXWAIT} ] && LIBVIRT_MAXWAIT=500 + +gueststatefile="/var/lib/libvirt/libvirt-guests.state" +netstatefile="/var/lib/libvirt/libvirt-net.state" + +do_virsh() { + local hvuri=$1 + shift + + # if unset, default to qemu + [ -z ${hvuri} ] && hvuri="qemu:///system" + # if only qemu was supplied then correct the value + [ "xqemu" = x${hvuri} ] && hvuri="qemu:///system" + + # Silence errors because virsh always throws an error about + # not finding the hypervisor version when connecting to libvirtd + # lastly strip the blank line at the end + LC_ALL=C virsh -c ${hvuri} "$@" 2>/dev/null | head -n -1 +} + +libvirtd_dom_list() { + # Only work with domains by their UUIDs + local hvuri=$1 + shift + + # The grep is to remove dom0 for xen domains. Otherwise we never hit 0 + do_virsh "${hvuri}" list --uuid $@ | grep -v 00000000-0000-0000-0000-000000000000 +} + +libvirtd_dom_count() { + local hvuri=$1 + shift + + libvirtd_dom_list "${hvuri}" $@ | wc -l +} + +libvirtd_net_list() { + # Only work with networks by their UUIDs + local hvuri=$1 + shift + + do_virsh "${hvuri}" net-list --uuid $@ +} + +libvirtd_net_count() { + local hvuri=$1 + shift + + libvirtd_net_list "${hvuri}" $@ | wc -l +} + +libvirtd_dom_stop() { + # stops all persistent or transient domains for a given URI + # $1 - uri + # $2 - persisent/transient + + local uri=$1 + local persist=$2 + local shutdown_type=${LIBVIRT_SHUTDOWN} + local counter=${LIBVIRT_MAXWAIT} + local dom_name= + local dom_as= + local dom_ids= + local uuid= + local dom_count= + + [ "${persist}" = "--transient" ] && shutdown_type="shutdown" + [ -n "${counter}" ] || counter=500 + + einfo " Shutting down domain(s) ..." + + # grab all persistent or transient domains running + dom_ids=$(libvirtd_dom_list ${uri} ${persist}) + + for uuid in ${dom_ids}; do + # Get the name + dom_name=$(do_virsh ${uri} domname ${uuid}) + einfo " ${dom_name}" + # Get autostart state + dom_as=$(do_virsh ${uri} dominfo ${uuid} | \ + awk '$1 == "Autostart:" { print $2 }') + + if [ "${persist}" = "--persistent" ]; then + # Save our running state only if LIBVIRT_IGNORE_AUTOSTART != yes + if [ "x${LIBVIRT_IGNORE_AUTOSTART}" = "xyes" ] && \ + [ ${dom_as} = "enabled" ]; then + : + else + echo "${uri} ${uuid}" >> ${gueststatefile} + fi + + fi + + # Now let's stop it + do_virsh "${uri}" ${shutdown_type} ${uuid} > /dev/null + + done + + dom_count="$(libvirtd_dom_count ${uri} ${persist})" + while [ ${dom_count} -gt 0 ] && [ ${counter} -gt 0 ] ; do + dom_count="$(libvirtd_dom_count ${uri} ${persist})" + sleep 1 + if [ "${shutdown_type}" = "shutdown" ]; then + counter=$((${counter} - 1)) + fi + printf "." + done + + if [ "${shutdown_type}" = "shutdown" ]; then + # grab all domains still running + dom_ids=$(libvirtd_dom_list ${uri} ${persist}) + for uuid in ${dom_ids}; do + dom_name=$(do_virsh ${uri} domname ${uuid}) + eerror " ${dom_name} forcibly stopped" + do_virsh "${uri}" destroy ${uuid} > /dev/null + done + fi +} + +libvirtd_net_stop() { + # stops all persistent or transient domains for a given URI + # $1 - uri + # $2 - persisent/transient + + local uri=$1 + local persist=$2 + local uuid= + local net_name= + + if [ "${LIBVIRT_NET_SHUTDOWN}" != "no" ]; then + + einfo " Shutting down network(s):" + for uuid in $(libvirtd_net_list ${uri} ${persist}); do + net_name=$(do_virsh ${uri} net-name ${uuid}) + einfo " ${net_name}" + + if [ "${persist}" = "--persistent" ]; then + # Save our running state + echo "${uri} ${uuid}" >> ${netstatefile} + + fi + + # Actually stop the network + do_virsh qemu net-destroy ${uuid} > /dev/null + done + + fi +} + +start() { + local uri= + local uuid= + local name= + + for uri in ${LIBVIRT_URIS}; do + do_virsh "${uri}" connect + if [ $? -ne 0 ]; then + eerror "Failed to connect to '${uri}'. Domains may not start." + fi + done + + [ ! -e "${netstatefile}" ] && touch "${netstatefile}" + [ ! -e "${gueststatefile}" ] && touch "${gueststatefile}" + + # if the user didn't want to start any guests up then respect their wish + [ "x${LIBVIRT_START}" = "xno" ] && return 0 + + # start networks + ebegin "Starting libvirt networks" + while read -r uri uuid + do + # ignore trash + [ -z "${uri}" ] || [ -z "${uuid}" ] && continue + + name=$(do_virsh "${uri}" net-name ${uuid}) + einfo " ${name}" + do_virsh "${uri}" net-start ${uuid} > /dev/null + done <"${netstatefile}" + eend 0 + + # start domains + ebegin "Starting libvirt domains" + while read -r uri uuid + do + # ignore trash + [ -z "${uri}" ] || [ -z "${uuid}" ] && continue + + name=$(do_virsh "${uri}" domname ${uuid}) + einfo " ${name}" + do_virsh "${uri}" start ${uuid} > /dev/null + do_virsh "${uri}" domtime --sync ${uuid} > /dev/null + done <"${gueststatefile}" + eend 0 +} + +stop() { + local counter= + local dom_name= + local net_name= + local dom_ids= + local uuid= + local dom_count= + + rm -f "${gueststatefile}" + [ $? -ne 0 ] && eerror "Unable to save domain state" + rm -f "${netstatefile}" + [ $? -ne 0 ] && eerror "Unable to save net state" + + for uri in ${LIBVIRT_URIS}; do + einfo "Stopping libvirt domains and networks for ${uri}" + + libvirtd_dom_stop "${uri}" "--persistent" + libvirtd_dom_stop "${uri}" "--transient" + libvirtd_net_stop "${uri}" "--persistent" + libvirtd_net_stop "${uri}" "--transient" + + einfo "Done stopping domains and networks for ${uri}" + done +} diff --git a/nonsystemd/libvirt-openrc/libvirtd.confd b/nonsystemd/libvirt-openrc/libvirtd.confd new file mode 100644 index 0000000..c326531 --- /dev/null +++ b/nonsystemd/libvirt-openrc/libvirtd.confd @@ -0,0 +1,18 @@ +# /etc/conf.d/libvirtd + +# Startup dependency +# libvirtd typically requires all networks to be up and settled which +# is what rc_need="net" provides. However if you only use specific networks +# for libvirtd, you may override this. Or if you only use libvirtd locally. +rc_need="net" + +# The termination timeout (start-stop-daemon parameter "retry") ensures +# that the service will be terminated within a given time (25 + 5 seconds +# per default) when you are stopping the service. +#LIBVIRTD_TERMTIMEOUT="TERM/25/KILL/5" + +# LIBVIRTD_OPTS +# You may want to add '--listen' to have libvirtd listen for tcp/ip connections +# if you want to use libvirt for remote control +# Please consult 'libvirtd --help' for more options +#LIBVIRTD_OPTS="--listen" diff --git a/nonsystemd/libvirt-openrc/libvirtd.initd b/nonsystemd/libvirt-openrc/libvirtd.initd new file mode 100644 index 0000000..822885a --- /dev/null +++ b/nonsystemd/libvirt-openrc/libvirtd.initd @@ -0,0 +1,32 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Virtual Machine Management daemon (libvirt)" + +LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"} +LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"} + +command="/usr/bin/libvirtd" +command_args="${LIBVIRTD_OPTS}" +start_stop_daemon_args="-b --env KRB5_KTNAME=/etc/libvirt/krb5.tab" +pidfile="/run/libvirtd.pid" +retry="${LIBVIRTD_TERMTIMEOUT}" + +depend() { + need virtlogd + use ceph dbus iscsid virtlockd firewalld avahi-daemon + after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-client ntpdportmap rpc.statd sanlock xenconsoled +} + +start_pre() { + # Test configuration directories in /etc/libvirt/ to be either not + # present or a directory, i.e. not a regular file, bug #532892 + + checkpath --directory /etc/libvirt/lxc || return 1 + checkpath --directory /etc/libvirt/nwfilter || return 1 + [ -L /etc/libvirt/qemu ] || + checkpath --directory /etc/libvirt/qemu || return 1 + [ -L /etc/libvirt/storage ] || + checkpath --directory /etc/libvirt/storage || return 1 +} diff --git a/nonsystemd/libvirt-openrc/virtlockd.initd b/nonsystemd/libvirt-openrc/virtlockd.initd new file mode 100644 index 0000000..a593580 --- /dev/null +++ b/nonsystemd/libvirt-openrc/virtlockd.initd @@ -0,0 +1,23 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="libvirt virtual machine lock manager" +command="/usr/bin/virtlockd" +start_stop_daemon_args="-b" +pidfile="/run/virtlockd.pid" + +extra_started_commands="reload" +description_reload="re-exec the daemon, while maintaining locks and clients" + + +depend() { + after ntp-client ntpd nfs nfsmount corosync +} + +reload() { + ebegin "re-exec() virtlockd" + + start-stop-daemon --signal SIGUSR1 \ + --exec "${command}" --pidfile "${pidfile}" +} diff --git a/nonsystemd/libvirt-openrc/virtlogd.initd b/nonsystemd/libvirt-openrc/virtlogd.initd new file mode 100644 index 0000000..ba903d0 --- /dev/null +++ b/nonsystemd/libvirt-openrc/virtlogd.initd @@ -0,0 +1,23 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="libvirt virtual machine logging manager" +command="/usr/bin/virtlogd" +start_stop_daemon_args="-b" +pidfile="/run/virtlogd.pid" + +extra_started_commands="reload" +description_reload="re-exec the daemon, while maintaining open connections" + + +depend() { + after ntp-client ntpd nfs nfsmount corosync +} + +reload() { + ebegin "re-exec() virtlogd" + + start-stop-daemon --signal SIGUSR1 \ + --exec "${command}" --pidfile "${pidfile}" +} From 84560b892f6ba9c8f4db31dad36ce709189846e1 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 10:15:29 +0000 Subject: [PATCH 41/89] lighttpd-openrc --- diff --git a/nonsystemd/lighttpd-openrc/PKGBUILD b/nonsystemd/lighttpd-openrc/PKGBUILD new file mode 100644 index 0000000..cd83314 --- /dev/null +++ b/nonsystemd/lighttpd-openrc/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: artoo + +pkgname=lighttpd-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC lighttpd init script" +arch=('any') +url="https://gitea.artixlinux.org/PackagesL/lighttpd-openrc" +license=('GPL2') +depends=('openrc' 'lighttpd') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/lighttpd') +source=('lighttpd.confd' + 'lighttpd.initd') +sha512sums=('dd722c15230df734d7151bcb9cfc66d6d54aac5dcdca5f50eb33979d3a2443ba3a9ef3d7cb35e6dbd3d39fce09da15ab0029b1399bf1b1e4f4ef20d40f70a416' + '8154e0a6860c732abebb9de00d915ce1a3778bd127d054abb4db07184b729008f3dae75b9bfe7a59725fe97aee94b299d1d6307af3586afff4a320e11256f513') + +package() { + install -Dm644 "${srcdir}"/lighttpd.confd "${pkgdir}"/etc/conf.d/lighttpd + install -Dm755 "${srcdir}"/lighttpd.initd "${pkgdir}"/etc/init.d/lighttpd +} diff --git a/nonsystemd/lighttpd-openrc/lighttpd.confd b/nonsystemd/lighttpd-openrc/lighttpd.confd new file mode 100644 index 0000000..c7733de --- /dev/null +++ b/nonsystemd/lighttpd-openrc/lighttpd.confd @@ -0,0 +1,8 @@ +# /etc/conf.d/lighttpd + +# Location of a shell used by the 'include_shell' directive +# in the lighttpd's configuration file +#export SHELL="/bin/bash" + +# Location of the lighttpd configuration file +LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf" diff --git a/nonsystemd/lighttpd-openrc/lighttpd.initd b/nonsystemd/lighttpd-openrc/lighttpd.initd new file mode 100644 index 0000000..4d8c381 --- /dev/null +++ b/nonsystemd/lighttpd-openrc/lighttpd.initd @@ -0,0 +1,35 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +name="lighttpd" +description="Lighttpd web server" +conf_file="${LIGHTTPD_CONF:-/etc/lighttpd/lighttpd.conf}" + +supervisor=supervise-daemon +command="/usr/bin/lighttpd" +command_args="-D -f ${conf_file}" +required_files="${conf_file}" + +depend() { + need net + use mysql logger spawn-fcgi ldap slapd netmount dns + after firewall + after famd + after sshd +} + +checkconfig() { + ebegin "Checking for ${conf_file}" + if [ ! -f "${conf_file}" ] ; then + eerror "${conf_file} does not exist." + fi + eend $? + + /usr/bin/lighttpd -t -f "${conf_file}" >/dev/null +} + +start_pre() { + checkconfig || return $? + checkpath -d -q -m 0750 /run/lighttpd/ +} diff --git a/nonsystemd/lighttpd-openrc/lighttpd.logrotate b/nonsystemd/lighttpd-openrc/lighttpd.logrotate new file mode 100644 index 0000000..c32e82b --- /dev/null +++ b/nonsystemd/lighttpd-openrc/lighttpd.logrotate @@ -0,0 +1,9 @@ +/var/log/lighttpd/*log { + missingok + copytruncate + notifempty + sharedscripts + postrotate + rc-service lighttpd reload || true + endscript +} From 32d44bc2944907c76b7115be8279e28ea261befb Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 10:25:39 +0000 Subject: [PATCH 42/89] lirc-openrc --- diff --git a/nonsystemd/lirc-openrc/PKGBUILD b/nonsystemd/lirc-openrc/PKGBUILD new file mode 100644 index 0000000..41eb583 --- /dev/null +++ b/nonsystemd/lirc-openrc/PKGBUILD @@ -0,0 +1,34 @@ +# Maintainer: artoo + +pkgname=lirc-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC lirc init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'lirc') +conflicts=('systemd-sysvcompat' 'lirc-util') +provides=('lirc-utils-openrc') +conflicts=('lirc-utils-openrc') +replaces=('lirc-utils-openrc') +backup=('etc/conf.d/lircd' + 'etc/conf.d/irexec' + 'etc/conf.d/lircmd') +source=("lircd.confd" "lircd.initd" + "irexec.confd" "irexec.initd" + "lircmd.confd" "lircmd.initd") +sha512sums=('1fb1778f4cc72fc9c11b13a704b3abe80bcce5b3770b69b6b6bea8571e5293adad8c6968779b812e611b67734462c9a577cc71c6b16da3a5bfe31b8007300a62' + 'bbd2598078e7abfe1f2491922c961e8e78addda655d576dc5aa10fa5c22bf1673962ea30e0bb0f3df89232287d3b707873e16b7269abb744e3a73b8f9b6ca9c5' + '2b33e1044086d11fd6e1f9a204ce925182a3a2b92ef4399610e01702f9c2c8fbc87cae52961123297171eef3d40468ac17437b4281b26a5f3b256c9cebc612ac' + '154ed7c8e8acf8bc4c2bc2beea362f3b7b030c011bb172ffcb3a221212cfc4ecc40debe60a67a44e2162000f56dbfb1a1da347471dd5060ecb7c8130bf66d5a7' + '6a69c7600024f00947dc35e3c6cebf7524fcf5f2a1e799fe70590fef2070c1049c4e6177711821f4e7b13972fd6f535591b48bb1006acd44fa650591b3265ace' + 'f8497328b2aaf5affa507b1dc66c8af3b0ab4f85132e1dd04e047a4daaf98f89082047dafbc27e7da74e21482d2093ca6b6acc273bac8a7d08449dfa62571be5') + +package() { + for _i in lircd irexec lircmd ; do + install -Dm755 "$srcdir/$_i.initd" "$pkgdir/etc/init.d/$_i" + install -Dm644 "$srcdir/$_i.confd" "$pkgdir/etc/conf.d/$_i" + done +} diff --git a/nonsystemd/lirc-openrc/irexec.confd b/nonsystemd/lirc-openrc/irexec.confd new file mode 100644 index 0000000..48eb8dd --- /dev/null +++ b/nonsystemd/lirc-openrc/irexec.confd @@ -0,0 +1,9 @@ +# Options to pass to the irexec process +IREXEC_OPTS="/etc/lircrc" + +# User to execute irexec as. +# Warning: Running irexec as root can open security holes +#IREXEC_USER="root" + +# Use this to disable the warning printed when starting irexec as root +# IREXEC_DISABLE_ROOT_WARNING=yes diff --git a/nonsystemd/lirc-openrc/irexec.initd b/nonsystemd/lirc-openrc/irexec.initd new file mode 100644 index 0000000..3ef732f --- /dev/null +++ b/nonsystemd/lirc-openrc/irexec.initd @@ -0,0 +1,27 @@ +#!/usr/bin/openrc-run +# Copyright 2003 Martin Hierling +# Distributed under the terms of the GNU General Public License v2 + +: ${IREXEC_USER:=root} + +depend() { + need lircd +} + +start() { + if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then + ewarn "Warning: Running irexec as root can open security holes" + fi + + ebegin "Starting irexec" + start-stop-daemon --start --user ${IREXEC_USER} --chdir / \ + --exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS} + eend $? "Failed to start irexec." +} + +stop() { + ebegin "Stopping irexec" + start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER} + eend $? "Failed to stop irexec." +} + diff --git a/nonsystemd/lirc-openrc/lircd.confd b/nonsystemd/lirc-openrc/lircd.confd new file mode 100644 index 0000000..f59c5f2 --- /dev/null +++ b/nonsystemd/lirc-openrc/lircd.confd @@ -0,0 +1,22 @@ +# Options to pass to the lircd process + +# for devices with lirc-kernel-module +#LIRCD_OPTS="-d /dev/lirc0" +#LIRCD_OPTS="-d /dev/lirc" + +# for devices using the input-layer +#LIRCD_OPTS="-H devinput -d /dev/input/by-path/pci-0000:00:0a.0--event-ir" +# This should work, Bug #235107 +#LIRCD_OPTS="-H devinput -d name=*DVB*" + +# set default protocol to 'lirc' for in-kernel IR decoding +# for the following entries in /sys/class/rc/ +# (space-separated list if there is more than one) +LIRCD_SET_SYSCLASSRCS="rc0" + +# If running mulitple instances of lircd, the following +# can be used to override the default socket path and +# socket symlink +#LIRCD_SOCKET="/var/run/lirc/lircd" +#LIRCD_SYMLINKFILE="/dev/lircd" + diff --git a/nonsystemd/lirc-openrc/lircd.initd b/nonsystemd/lirc-openrc/lircd.initd new file mode 100644 index 0000000..d038a67 --- /dev/null +++ b/nonsystemd/lirc-openrc/lircd.initd @@ -0,0 +1,51 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE=/run/lirc/${SVCNAME}.pid +: ${LIRCD_SYMLINKFILE:=/dev/lircd} +: ${LIRCD_SOCKET:=/run/lirc/lircd} + +depend() { + need localmount + use modules + provide lirc +} + +start() { + local retval + + ebegin "Starting lircd" + + for retval in ${LIRCD_SET_SYSCLASSRCS} ; do + if [ -e /sys/class/rc/${retval}/protocols ] && \ + grep -qs 'lirc' /sys/class/rc/${retval}/protocols ; then + einfo "Setting lirc protocol active for ${retval}" + echo lirc >/sys/class/rc/${retval}/protocols + fi + done + + checkpath -q -d -m 0755 -o root:root /run/lirc + rm -Rf ${LIRCD_SOCKET} && ln -s ${LIRCD_SOCKET} ${LIRCD_SYMLINKFILE} + if [ $? -ne 0 ]; then + eend $? "Unable to create symbolic link ${LIRCD_SYMLINKFILE}" + return 1 + fi + + start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/bin/lircd -- \ + -P "${PIDFILE}" ${LIRCD_OPTS} + retval=$? + + if [ ${retval} -ne 0 ]; then + rm -Rf ${LIRCD_SOCKET} + fi + + eend ${retval} +} + +stop() { + ebegin "Stopping lircd" + rm -f ${LIRCD_SYMLINKFILE} + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --exec /usr/bin/lircd + eend $? +} diff --git a/nonsystemd/lirc-openrc/lircmd.confd b/nonsystemd/lirc-openrc/lircmd.confd new file mode 100644 index 0000000..4ba169d --- /dev/null +++ b/nonsystemd/lirc-openrc/lircmd.confd @@ -0,0 +1,4 @@ +# Options to pass to the lircmd process + +LIRCMD_OPTS="" + diff --git a/nonsystemd/lirc-openrc/lircmd.initd b/nonsystemd/lirc-openrc/lircmd.initd new file mode 100644 index 0000000..3ca993a --- /dev/null +++ b/nonsystemd/lirc-openrc/lircmd.initd @@ -0,0 +1,10 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command=/usr/bin/lircmd +command_args="${LIRCMD_OPTS}" + +depend() { + need lircd +} From 7424ac86efda50d95532a90d16cfbeb7963b14af Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 10:41:03 +0000 Subject: [PATCH 43/89] lm_sensors-openrc --- diff --git a/nonsystemd/lm_sensors-openrc/PKGBUILD b/nonsystemd/lm_sensors-openrc/PKGBUILD new file mode 100644 index 0000000..f12bbe9 --- /dev/null +++ b/nonsystemd/lm_sensors-openrc/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: artoo + +pkgname=lm_sensors-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC lm_sensors init script" +arch=('any') +url="https://github.com/artix-linux/packages" +license=('GPL2') +depends=('openrc' 'lm_sensors') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/sensord' + 'etc/conf.d/fancontrol' + 'etc/conf.d/lm_sensors') +source=("sensord.initd" + "fancontrol".{confd,initd} + "lm_sensors".{confd,initd}) +sha512sums=('38328559fc6897f6467e0d61eebd9f0c60f548e4cf04c8c5eb8ec360a7dffc6d14b3b4098f3bcd65b7fe9468678bed55d5af17934bc9a6623cf540c414fc9be9' + '06ec0b44e753bfa6a5ca461345e5857ac4d824cb3d9dd4955bbe884ff91d0184050476fe6da0ea8b0882243a51466af2d82540474581bd471f13c5977a0ec41a' + '578e2f96e1098723c5f02d76f2c7be41416ecbfb4c724d3ce1a8046c49d385c59a4118c92de544c2e1fa761aa93bd7c2bfd3cc833111af65efc9863da526e2d3' + 'a31220f4bf337de7b17158e00c64e662527abe11c5cc9f8401216f757dcde1c220527ad73f375c0de051030119daeba4cef6c5155f077447a9391e273cd65f50' + '847ffe6c9168c80ffce2010c8b7ad47e6fb1f1c9775de755ec6d21a646aab7784ec495efbe57aa76bf3d868a569ce2f4ce7a3e775330efc150766d77af7b498e') + +package() { + install -Dm755 "$srcdir/sensord.initd" "$pkgdir/etc/init.d/sensord" + + for _i in fancontrol lm_sensors ; do + install -Dm755 "$srcdir/$_i.initd" "$pkgdir/etc/init.d/$_i" + install -Dm644 "$srcdir/$_i.confd" "$pkgdir/etc/conf.d/$_i" + done +} diff --git a/nonsystemd/lm_sensors-openrc/fancontrol.confd b/nonsystemd/lm_sensors-openrc/fancontrol.confd new file mode 100644 index 0000000..a716958 --- /dev/null +++ b/nonsystemd/lm_sensors-openrc/fancontrol.confd @@ -0,0 +1,16 @@ +# /etc/conf.d/fancontrol + +# Configuration file +#FANCONTROL_CONFIGFILE="/etc/fancontrol" + +# You can use this configuration option to pass additional options to the +# start-stop-daemon, see start-stop-daemon(8) for more details. +# Per default we forces fancontrol into background and wait 1000ms after we +# have started the service to ensure that the daemon is really up and +# running. +#FANCONTROL_SSDARGS="--background --wait 1000" + +# The termination timeout (start-stop-daemon parameter "retry") ensures +# that the service will be terminated within a given time (60 + 5 seconds +# per default) when you are stopping the service. +#FANCONTROL_TERMTIMEOUT="TERM/60/KILL/5" diff --git a/nonsystemd/lm_sensors-openrc/fancontrol.initd b/nonsystemd/lm_sensors-openrc/fancontrol.initd new file mode 100644 index 0000000..1d493fe --- /dev/null +++ b/nonsystemd/lm_sensors-openrc/fancontrol.initd @@ -0,0 +1,21 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +FANCONTROL_CONFIGFILE=${FANCONTROL_CONFIGFILE:-"/etc/fancontrol"} +FANCONTROL_SSDARGS=${FANCONTROL_SSDARGS:-"--background --wait 1000"} +FANCONTROL_TERMTIMEOUT=${FANCONTROL_TERMTIMEOUT:-"TERM/60/KILL/5"} + + +command="/usr/bin/fancontrol" +command_args="${FANCONTROL_CONFIGFILE}" +start_stop_daemon_args="${FANCONTROL_SSDARGS}" +pidfile="/run/fancontrol.pid" +retry="${FANCONTROL_TERMTIMEOUT}" + +required_files="${FANCONTROL_CONFIGFILE}" + +depend() { + need localmount + use lm_sensors +} diff --git a/nonsystemd/lm_sensors-openrc/lm_sensors.confd b/nonsystemd/lm_sensors-openrc/lm_sensors.confd new file mode 100644 index 0000000..bae2ea0 --- /dev/null +++ b/nonsystemd/lm_sensors-openrc/lm_sensors.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/lm_sensors + +# NOTE: +# For module loading please use /etc/modules-load.d/lm_sensors.conf diff --git a/nonsystemd/lm_sensors-openrc/lm_sensors.initd b/nonsystemd/lm_sensors-openrc/lm_sensors.initd new file mode 100644 index 0000000..dc8f2c7 --- /dev/null +++ b/nonsystemd/lm_sensors-openrc/lm_sensors.initd @@ -0,0 +1,21 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/bin/sensors" + +depend() { + need localmount + after modules-load +} + +start() { + ebegin "Initializing sensors" + ${command} --set >/dev/null 2>&1 + eend $? +} + +stop() { + # Nothing to stop + return 0; +} diff --git a/nonsystemd/lm_sensors-openrc/sensord.confd b/nonsystemd/lm_sensors-openrc/sensord.confd new file mode 100644 index 0000000..a6f2f26 --- /dev/null +++ b/nonsystemd/lm_sensors-openrc/sensord.confd @@ -0,0 +1,19 @@ +# /etc/conf.d/sensord + +# PID file +#SENSORD_PIDFILE="/run/sensord.pid" + +# You can use this configuration option to pass additional options to the +# start-stop-daemon, see start-stop-daemon(8) for more details. +# Per default we wait 1000ms after we have started the service to ensure +# that the daemon is really up and running. +#SENSORD_SSDARGS="--wait 1000" + +# The termination timeout (start-stop-daemon parameter "retry") ensures +# that the service will be terminated within a given time (60 + 5 seconds +# per default) when you are stopping the service. +#SENSORD_TERMTIMEOUT="TERM/60/KILL/5" + +# Extra options to pass to the sensord daemon, +# see sensord(8) for more information +#SENSORD_OPTS="" diff --git a/nonsystemd/lm_sensors-openrc/sensord.initd b/nonsystemd/lm_sensors-openrc/sensord.initd new file mode 100644 index 0000000..d76a237 --- /dev/null +++ b/nonsystemd/lm_sensors-openrc/sensord.initd @@ -0,0 +1,19 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +SENSORD_PIDFILE=${SENSORD_PIDFILE:-"/run/sensord.pid"} +SENSORD_SSDARGS=${SENSORD_SSDARGS:-"--wait 1000"} +SENSORD_TERMTIMEOUT=${SENSORD_TERMTIMEOUT:-"TERM/60/KILL/5"} +SENSORD_OPTS=${SENSORD_OPTS:-""} + +command="/usr/bin/sensord" +command_args="${SENSORD_OPTS} --pid-file ${SENSORD_PIDFILE}" +start_stop_daemon_args="${SENSORD_SSDARGS}" +pidfile="${SENSORD_PIDFILE}" +retry="${SENSORD_TERMTIMEOUT}" + +depend() { + need localmount + use logger lm_sensors +} From b9c49cc77fdd9cb68fbb8bc8b97ba7b353d94b44 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 10:48:58 +0000 Subject: [PATCH 44/89] lvm2-openrc --- diff --git a/nonsystemd/lvm2-openrc/PKGBUILD b/nonsystemd/lvm2-openrc/PKGBUILD new file mode 100644 index 0000000..7610793 --- /dev/null +++ b/nonsystemd/lvm2-openrc/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: artoo + +pkgname=lvm2-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC lvm2 init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('device-mapper-openrc' 'lvm2') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/lvm') +source=("lvm.confd" + "lvm.initd" + "lvm-monitoring.initd" + "lvmpolld.initd") +# "lvmlockd.initd" +sha512sums=('05818e09fc6d8fe8287283b832fa73b4d3ef539837f956b9bfa394d206c1e379a3227148040934ac690d77524f3f7b16ba0d262a11de268914b1d11afe3a3c97' + 'f283931af03b732727a8bb52eb5a8c3cf645e0a483d96be5b771aa3260ada905a6390316bc839b9d54de6c6798150a92cf4a3f61fe17d50a6251879a31daa984' + 'a46fc66a4a87a394e95761d2573c24b36d90aa91ede777805f4759c3e814d4d0d4ff22ff07cd5d8644c95ee0032df7fde9b0bdcc0947c6207c9d81345ae65920' + '2eedefecc6eb8edc6a7cde81576f43cc009c754a83cbfdb6f7c3162b9412d7103fd07ecec953f010f8bc1715b741600184d849f1566d15075acd51adb48fb0db') + +package() { + install -Dm644 "${srcdir}"/lvm.confd "${pkgdir}"/etc/conf.d/lvm + + for f in lvm lvm-monitoring lvmpolld; do + install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f" + done +} + + diff --git a/nonsystemd/lvm2-openrc/lvm-monitoring.initd b/nonsystemd/lvm2-openrc/lvm-monitoring.initd new file mode 100644 index 0000000..14e2cad --- /dev/null +++ b/nonsystemd/lvm2-openrc/lvm-monitoring.initd @@ -0,0 +1,38 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# This script is based on upstream file +# LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in + +depend() { + # As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that + # means dmeventd is NOT notified, as it cannot be safely running + need lvm dmeventd +} + +VGCHANGE=/usr/bin/vgchange +VGS=/usr/bin/vgs + +start() { + ret=0 + # TODO do we want to separate out already active groups only? + VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null` + ebegin "Starting LVM monitoring for VGs ${VGSLIST}:" + $VGCHANGE --monitor y --poll y ${VGSLIST} + ret=$? + eend $ret + return $ret + +} + +stop() { + ret=0 + # TODO do we want to separate out already active groups only? + VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null` + ebegin "Stopping LVM monitoring for VGs ${VGSLIST}:" + $VGCHANGE --monitor n ${VGSLIST} + ret=$? + eend $ret + return $ret +} diff --git a/nonsystemd/lvm2-openrc/lvm.confd b/nonsystemd/lvm2-openrc/lvm.confd new file mode 100644 index 0000000..b29e170 --- /dev/null +++ b/nonsystemd/lvm2-openrc/lvm.confd @@ -0,0 +1,9 @@ +# If LVM is built with udev, you must ensure udev is running first! +# Otherwise it will hang +rc_need="udev" + +# LVM should normally only be started after mdraid is available +# this is because LVM physical volumes are very often MD devices. +rc_after="mdraid" + +# vim: ft=gentoo-conf-d diff --git a/nonsystemd/lvm2-openrc/lvm.initd b/nonsystemd/lvm2-openrc/lvm.initd new file mode 100644 index 0000000..2bda7bd --- /dev/null +++ b/nonsystemd/lvm2-openrc/lvm.initd @@ -0,0 +1,173 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +_get_lvm_path() { + local lvm_path= + for lvm_path in /bin/lvm /usr/bin/lvm ; do + [ -x "${lvm_path}" ] && break + done + echo "${lvm_path}" +} + +_use_lvmetad() { + local lvm_path="$(_get_lvm_path)" + [ ! -x "${lvm_path}" ] && return 1 + ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1' +} + +_use_lvmlockd() { + local lvm_path="$(_get_lvm_path)" + [ ! -x "${lvm_path}" ] && return 1 + ${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1' +} + +depend() { + before checkfs fsck + after modules device-mapper + # We may want lvmetad based on the configuration. If we added lvmetad + # support while lvm2 is running then we aren't dependent on it. For the + # more common case, if its disabled in the config we aren't dependent + # on it. + config /etc/lvm/lvm.conf + local _want= + + if service_started ; then + _want=$(service_get_value want) + else + if _use_lvmetad ; then + _want="${_want} lvmetad" + fi + + if _use_lvmlockd ; then + _want="${_want} lvmlockd" + fi + fi + + # Make sure you review /etc/conf.d/lvm as well! + # Depending on your system, it might also introduce udev & mdraid + need sysfs + + if [ -n "${_want}" ] ; then + want ${_want} + fi +} + +config='global { locking_dir = "/run/lock/lvm" }' + +dm_in_proc() { + local retval=0 + for x in devices misc ; do + grep -qs 'device-mapper' /proc/${x} + retval=$((${retval} + $?)) + done + return ${retval} +} + +start() { + # LVM support for /usr, /home, /opt .... + # This should be done *before* checking local + # volumes, or they never get checked. + + # NOTE: Add needed modules for LVM or RAID, etc + # to /etc/modules.autoload if needed + + lvm_path="$(_get_lvm_path)" + if [ -z "${lvm_path}" ] ; then + eerror "Failed to find lvm binary in /bin or /sbin!" + return 1 + fi + + if [ -z "${CDBOOT}" ] ; then + if [ -e /proc/modules ] && ! dm_in_proc ; then + ebegin "Trying to load dm-mod module" + modprobe dm-mod 2>/dev/null + eend $? + fi + + if [ -d /proc/lvm ] || dm_in_proc ; then + local has_errors=0 verbose_command + + yesno "${rc_verbose}" && verbose_command=" -v" + + ebegin "Starting the Logical Volume Manager" + + if _use_lvmetad ; then + # Extra PV find pass because some devices might not have been available until very recently + ${lvm_path} pvscan${verbose_command} --config "${config}" --cache + [ $? -ne 0 ] && has_errors=1 + fi + + # Now make the nodes + ${lvm_path} vgscan${verbose_command} --config "${config}" --mknodes + [ $? -ne 0 ] && has_errors=1 + + # Enable all VGs + ${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate y + [ $? -ne 0 ] && has_errors=1 + + if _use_lvmlockd ; then + # Start lockd VGs as required + ${lvm_path} vgchange${verbose_command} --config "${config}" --lock-start --lock-opt auto + [ $? -ne 0 ] && has_errors=1 + fi + + eend ${has_errors} "Failed to start the Logical Volume Manager" + fi + fi +} + +start_post() { + local _want= + if _use_lvmetad ; then + _want="${_want} lvmetad" + fi + + if _use_lvmlockd ; then + _want="${_want} lvmlockd" + fi + + service_set_value want "${_want}" +} + +stop() { + lvm_path="$(_get_lvm_path)" + if [ -z "${lvm_path}" ] ; then + eerror "Failed to find lvm binary in /bin or /sbin!" + return 1 + fi + + # Stop LVM2 + if [ -f /etc/lvmtab -o -d /etc/lvm ] \ + && [ -d /proc/lvm -o "$(grep device-mapper /proc/misc 2>/dev/null)" ] + then + local VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null) + if [ -z "${VGS}" ] ; then + # nothing to do for us + return 0 + fi + + local has_errors=0 verbose_command eend_cmd="eend" + + yesno "${rc_verbose}" && verbose_command=" -v" + + local msg="Failed to stop Logical Volume Manager" + if [ "${RC_RUNLEVEL}" = shutdown ] ; then + # failures on shutdown are non-fatal + eend_cmd="ewend" + msg="${msg} (possibly some LVs still needed for /usr or root)" + fi + + ebegin "Stopping the Logical Volume Manager" + + ${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate n + [ $? -ne 0 ] && has_errors=1 + + ${eend_cmd} ${has_errors} "${msg}" + fi + + # at this point make sure we always exit without indicating an error + return 0 +} + +# vim:ts=4 diff --git a/nonsystemd/lvm2-openrc/lvmpolld.initd b/nonsystemd/lvm2-openrc/lvmpolld.initd new file mode 100644 index 0000000..72f7514 --- /dev/null +++ b/nonsystemd/lvm2-openrc/lvmpolld.initd @@ -0,0 +1,17 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/run/lvmpolld.pid" +command="/usr/bin/lvmpolld" +command_args="${LVMPOLLD_OPTS:=-p ${pidfile}}" +start_stop_daemon_args="--pidfile ${pidfile}" + +depend() { + : +} + +start_pre() +{ + checkpath --directory /run/lvm || return 1 +} From e6e19df17bcd7ee10fe0fde762efb1ced0252c4e Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 10:54:54 +0000 Subject: [PATCH 45/89] mdadm-openrc --- diff --git a/nonsystemd/mdadm-openrc/PKGBUILD b/nonsystemd/mdadm-openrc/PKGBUILD new file mode 100644 index 0000000..50b907d --- /dev/null +++ b/nonsystemd/mdadm-openrc/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer: artoo + +pkgname=mdadm-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC mdadm init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'mdadm') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/mdadm') +source=("mdadm.confd" + "mdadm.initd" + "mdraid.confd" + "mdraid.initd") +sha512sums=('7bf66898000b3d02bbf0704a8032b0f4fc045380501dc8d2bbbb31d33b122d9c35879b25714663079eeadd207c9da87c9d9af8464e76146bf5b68594e73fd92c' + '748b2841b0a986f8d9ebc0b91da4ea6c0aa883e3536abb09cc742a60cac5769b0101a7d9a79f001f84c18eb0b6ac62f32fe3623f121367f0eb993f5fa96dbc80' + '37fe70f5df0fb2b68be01ee774e3a943cfb280322f2db0c5d6892e701fb58be26a225b78448814294bf68f154cca697278fcf9572a47b6201920d95ad05189d6' + '9b30f6d1a93468c52871d8136048d62c0cf2e71307fd54b47357485f7ad25cd86b4507e7cb78f5cb84172804aa3904cfc9d356dfeeb2369e85a349da371a1129') + +package() { + for f in mdadm mdraid;do + install -Dm644 "${srcdir}"/"$f".confd "${pkgdir}"/etc/conf.d/"$f" + install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f" + done +} + + diff --git a/nonsystemd/mdadm-openrc/mdadm.confd b/nonsystemd/mdadm-openrc/mdadm.confd new file mode 100644 index 0000000..a4ead14 --- /dev/null +++ b/nonsystemd/mdadm-openrc/mdadm.confd @@ -0,0 +1,7 @@ +# /etc/conf.d/mdadm: config file for /etc/init.d/mdadm + +# Misc options to pass to mdadm in monitor mode. +# For more info, run `mdadm --monitor --help` or see +# the mdadm(8) manpage. + +MDADM_OPTS="--syslog" diff --git a/nonsystemd/mdadm-openrc/mdadm.initd b/nonsystemd/mdadm-openrc/mdadm.initd new file mode 100644 index 0000000..93325dd --- /dev/null +++ b/nonsystemd/mdadm-openrc/mdadm.initd @@ -0,0 +1,25 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + use logger dns net +} + +start() { + ebegin "Starting mdadm monitor" + mdadm --monitor --scan \ + --daemonise \ + --pid-file /run/mdadm.pid \ + ${MDADM_OPTS} + eend $? +} + +stop() { + local ret + ebegin "Stopping mdadm monitor" + start-stop-daemon --stop --pidfile /run/mdadm.pid + ret=$? + rm -f /run/mdadm.pid + eend ${ret} +} diff --git a/nonsystemd/mdadm-openrc/mdraid.confd b/nonsystemd/mdadm-openrc/mdraid.confd new file mode 100644 index 0000000..5694d73 --- /dev/null +++ b/nonsystemd/mdadm-openrc/mdraid.confd @@ -0,0 +1,11 @@ +# /etc/conf.d/mdraid: config file for /etc/init.d/mdraid + +# For people who run raid on top of some other layer (like +# dmcrypt), use rc_need to specify that requirement. See +# the runscript(8) man page for more information. + +# Most configuration happens in /etc/mdadm.conf. + +# Pass additional options when assembling raids. +# Note: This applies to all raids. +MDADM_ASSEMBLE_OPTS="" diff --git a/nonsystemd/mdadm-openrc/mdraid.initd b/nonsystemd/mdadm-openrc/mdraid.initd new file mode 100644 index 0000000..84fc0aa --- /dev/null +++ b/nonsystemd/mdadm-openrc/mdraid.initd @@ -0,0 +1,39 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +depend() { + before checkfs fsck + after modules +} + +start() { + local output + + ebegin "Starting up RAID devices" + output=$(mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1) + eend $? "${output}" + + local pat="/dev/md_d*" + set -- ${pat} + if [ "$*" != "${pat}" ] ; then + ebegin "Creating RAID device partitions" + blockdev "$@" + eend $? + # wait because vgscan runs next, and we want udev to fire + sleep 1 + fi + + return 0 +} + +stop() { + local output + + # XXX: Maybe drop this check ? + [ ! -e /etc/mdadm/mdadm.conf ] && [ ! -e /etc/mdadm.conf ] && return 0 + + ebegin "Shutting down RAID devices (mdadm)" + output=$(mdadm -Ss 2>&1) + eend $? "${output}" +} From 1156fa70649d887d2341003247593327c0846602 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 10:59:30 +0000 Subject: [PATCH 46/89] metalog-openrc --- diff --git a/nonsystemd/metalog-openrc/PKGBUILD b/nonsystemd/metalog-openrc/PKGBUILD new file mode 100644 index 0000000..8f8357c --- /dev/null +++ b/nonsystemd/metalog-openrc/PKGBUILD @@ -0,0 +1,22 @@ +# Maintainer: artoo + +pkgname=metalog-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC metalog init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'metalog') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/metalog') +source=("metalog.confd" + "metalog.initd") +sha512sums=('4fea6b7f48e55d5f69a9c9a69f54623bb9d515e2fd2eda6829f8b769eec85e3de448eb42feb6bf65645400480169b3d70d56dff090103cfc95a3810515c42b2e' + '28e4f630a13af17f3bd57d0f331911c53170a329ab6a1aa3de06e513e0a35a957066380ed699c35ba64b3df1a38cd62ecf01c1c5a4a46713ae4d98bb81c412ea') + +package() { + install -Dm755 "${srcdir}"/metalog.initd "${pkgdir}"/etc/init.d/metalog + install -Dm644 "${srcdir}"/metalog.confd "${pkgdir}"/etc/conf.d/metalog +} diff --git a/nonsystemd/metalog-openrc/metalog.confd b/nonsystemd/metalog-openrc/metalog.confd new file mode 100644 index 0000000..ec7e64e --- /dev/null +++ b/nonsystemd/metalog-openrc/metalog.confd @@ -0,0 +1,18 @@ +# /etc/conf.d/metalog + +# Some useful options: +# -a Log with buffering +# -s Log without buffering +# See `metalog --help` for more + +METALOG_OPTS="" + + +# Options used by /usr/sbin/consolelog.sh + +# Space delimited list of devices to write "console" messages to +#CONSOLE="/dev/console /dev/tty10" +CONSOLE="/dev/tty10" + +# Format of logging (make sure you use single quotes) +FORMAT='$1 [$2] $3' diff --git a/nonsystemd/metalog-openrc/metalog.initd b/nonsystemd/metalog-openrc/metalog.initd new file mode 100644 index 0000000..afce1c3 --- /dev/null +++ b/nonsystemd/metalog-openrc/metalog.initd @@ -0,0 +1,27 @@ +#!/usr/bin/openrc-run +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +supervisor=supervise-daemon +command="metalog" + +extra_started_commands="buffer unbuffer" + +depend() { + need localmount + use clock hostname + after bootmisc + provide logger +} + +buffer() { + ebegin "Enabling log buffering" + supervisor-daemon "${command}" --signal USR2 + eend ${?} +} + +unbuffer() { + ebegin "Disabling log buffering" + supervisor-daemon "${command}" --signal USR1 + eend ${?} +} From bd2bf0cc6144f341ae16aa6ad828c643b0c963cc Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 11:04:20 +0000 Subject: [PATCH 47/89] mpd-openrc --- diff --git a/nonsystemd/mpd-openrc/PKGBUILD b/nonsystemd/mpd-openrc/PKGBUILD new file mode 100644 index 0000000..7da64fd --- /dev/null +++ b/nonsystemd/mpd-openrc/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: Nathan Owens + +pkgname=mpd-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="${pkgname/-openrc/} OpenRC init" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('openrc' 'mpd') +conflicts=('systemd-sysvcompat') +backup=("etc/conf.d/mpd") +source=("mpd".{confd,initd}) +sha512sums=('43c665341604fc289542e5b1f94957af2143551204905aa6320554a60c1f0a0a8ae705b776cbdae758b45bb6c906aecab0cda2ced4354643d76e4798074a7973' + '455b6c6b93a4ca4580b45bc23413a96cf775ff0b4bb5ed6ac6b374618a02944365ff25e50ec0941bfd1ee0e3a36f98cbec0fd1a691fe4599ccdfda053818205f') +b2sums=('ae3c582e1bda3a626a753df0927763a34c470997c6acd47ad01bd3e82fe486a4db01164f477c847d1e1b3aa303e5588da6b2361973caa75c3ad8a116f4eacd6b' + '93e21982b4d6b9e533e2a27f6c819b0ae3486adc07577410345ad8b464aabfc0688e5bf5311e16fe854f238aed938fc08dad089a25baba1de6dfe2307704e5c2') + +package() { + install -Dm755 "${srcdir}"/mpd.initd "${pkgdir}"/etc/init.d/mpd + install -Dm644 "${srcdir}"/mpd.confd "${pkgdir}"/etc/conf.d/mpd + + sed -e 's|/var/run|/run|g' \ + -i ${pkgdir}/etc/init.d/mpd +} diff --git a/nonsystemd/mpd-openrc/mpd.confd b/nonsystemd/mpd-openrc/mpd.confd new file mode 100644 index 0000000..7fe4b63 --- /dev/null +++ b/nonsystemd/mpd-openrc/mpd.confd @@ -0,0 +1,7 @@ +# conf.d file for music player daemon + +# +# Specify daemon $OPTS here. +# + +MPD_OPTS="" diff --git a/nonsystemd/mpd-openrc/mpd.initd b/nonsystemd/mpd-openrc/mpd.initd new file mode 100644 index 0000000..ac72b2f --- /dev/null +++ b/nonsystemd/mpd-openrc/mpd.initd @@ -0,0 +1,22 @@ +#!/usr/bin/openrc-run + +supervisor=supervise-daemon + +name="Music Player Daemon" +description="A daemon for playing music" + +command=/usr/bin/mpd +command_args="$MPD_OPTS" +command_args_foreground="--no-daemon" +command_user="mpd:audio" + +depend() { + need localmount + use net netmount nfsmount esound pulseaudio + after firewall +} + +start_pre() { + checkpath --directory --quiet \ + --owner "$command_user" --mode 0775 /var/run/mpd +} From d79bfffa12d0640acf6344b668f26c4aa92a0f38 Mon Sep 17 00:00:00 2001 From: Morris Zuss Date: May 20 2022 15:36:57 +0000 Subject: [PATCH 48/89] nfs-utils-openrc --- diff --git a/nonsystemd/nfs-utils-openrc/PKGBUILD b/nonsystemd/nfs-utils-openrc/PKGBUILD new file mode 100644 index 0000000..c7733b1 --- /dev/null +++ b/nonsystemd/nfs-utils-openrc/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: artoo + +pkgname=nfs-utils-openrc +pkgver=20220520 +pkgrel=1 +pkgrel+=.nonsystemd1 +pkgdesc="OpenRC nfs-utils init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +depends=('nfs-utils' 'rpcbind-openrc' 'device-mapper-openrc') +conflicts=('systemd-sysvcompat') +backup=('etc/conf.d/nfs' + 'etc/conf.d/nfsclient') +source=("nfs.confd" + "nfs.initd" + "nfsclient.confd" + "nfsclient.initd" + "rpc.idmapd.initd" + "rpc.pipefs.initd" + "rpc.gssd.initd" + "rpc.svcgssd.initd" + "rpc.statd.initd") +sha512sums=('bc11b073735ee86c96b9c249ee187f4d16329c279a4e26760875059d2b5fa1d510ef3e4df5ee9dfb2a3133d755e1eb5c323d2fadc432a0cf630191ec353ac535' + '1f16076d3a749c415ad2f2e2f6c042b7aa3d73bcf0b27459c6d19268e5e18783762a13e89cd979df8e2445f31b9886cc2e97be27d1d3952a8f68966015819d0f' + 'c79baac9ad76e09012cbebe22b1bd2dec3ed574c6e51e38cd4c534a92947719c887af927d325562fa539826680b5c52334fb7d1c2cd9d2a7295f1878080ca680' + '0f55e722d2722d489972abd1cccb955b25bedaf8389eb041cebb68ab00b5bb6755eee85c3e1f0683c6319582c99fa4f056890488962283293134bb43221a34df' + 'a3bb4ece6492f9c80a81cd1d2f6e713afa331a39ce54849b853e92e6d0ed284f87aaed60722411254044f889a7a6732dc53644cb3c2c6f028d3d57da4fc26853' + 'c5d8e20d9fec681d04cbe50c3c517b2cd92def8ca9d76eea65cc4ab7e68f0aa54598bd1f97e1827820f1f33bec1407aded94a13da735c9327eb4d3cbacc5a266' + 'fb6f90e7dd3a7bd3ae42ef0907536849a95bf3f157bd9ee6d5ea90a7e0261fc12feff2a6bcee55ec2b849bb306d24ac8ea14b546d7e541fe925956051de4c50e' + 'ddb502d631dc4d4e67c1967f3407cb5ebb5062381a3e0ff39c5292f51469dc23bfe1df3614e360db60f10ef7ef180fff3e814a4fa4b76e9f39d3c54569569a91' + '684cb8bf88693671f121e819aa80458ea9912ad6af8a06d7cf126ead41ef34b2a37335b320b414e9a3442dcbd3d797dd52284b08af6b4493acd1eb7cc95e5632') + +package() { + for f in nfs nfsclient;do + install -Dm644 "${srcdir}"/"$f".confd "${pkgdir}"/etc/conf.d/"$f" + install -Dm755 "${srcdir}"/$f.initd "${pkgdir}"/etc/init.d/"$f" + done + + for f in rpc.gssd rpc.idmapd rpc.pipefs rpc.statd rpc.svcgssd;do + install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f" + done +} diff --git a/nonsystemd/nfs-utils-openrc/nfs.confd b/nonsystemd/nfs-utils-openrc/nfs.confd new file mode 100644 index 0000000..9dc1405 --- /dev/null +++ b/nonsystemd/nfs-utils-openrc/nfs.confd @@ -0,0 +1,38 @@ +# /etc/conf.d/nfs + +# If you wish to set the port numbers for lockd, +# please see /etc/sysctl.conf + +# Optional services to include in default `/etc/init.d/nfs start` +# For NFSv4 users, you'll want to add "rpc.idmapd" here. +NFS_NEEDED_SERVICES="" + +# Options to pass to rpc.nfsd +OPTS_RPC_NFSD="8" + +# Options to pass to rpc.mountd +# ex. OPTS_RPC_MOUNTD="-p 32767" +OPTS_RPC_MOUNTD="" + +# Options to pass to rpc.statd +# ex. OPTS_RPC_STATD="-p 32765 -o 32766" +OPTS_RPC_STATD="" + +# Options to pass to rpc.idmapd +OPTS_RPC_IDMAPD="" + +# Options to pass to rpc.gssd +OPTS_RPC_GSSD="" + +# Options to pass to rpc.svcgssd +OPTS_RPC_SVCGSSD="" + +# Options to pass to rpc.rquotad (requires sys-fs/quota) +OPTS_RPC_RQUOTAD="" + +# Timeout (in seconds) for exportfs +EXPORTFS_TIMEOUT=30 + +# Options to set in the nfsd filesystem (/proc/fs/nfsd/). +# Format is