diff options
author | freaj <freaj@riseup.net> | 2015-03-23 11:13:12 +0100 |
---|---|---|
committer | freaj <freaj@riseup.net> | 2015-03-23 11:13:12 +0100 |
commit | 1846e57b8e352d4f7fa711f32206375d318e93d8 (patch) | |
tree | 399a4892fed5db85c28bb09b0349d68d69cf76e0 /pcr/openrc-base | |
parent | 4e9d434eb8c3cf9fc54beeb0807adfd5e1ba7e33 (diff) | |
download | abslibre-1846e57b8e352d4f7fa711f32206375d318e93d8.tar.gz abslibre-1846e57b8e352d4f7fa711f32206375d318e93d8.tar.bz2 abslibre-1846e57b8e352d4f7fa711f32206375d318e93d8.zip |
openrc-base: add new package to [pcr]
Diffstat (limited to 'pcr/openrc-base')
-rw-r--r-- | pcr/openrc-base/PKGBUILD | 269 | ||||
-rw-r--r-- | pcr/openrc-base/cronie.install | 16 | ||||
-rw-r--r-- | pcr/openrc-base/cryptsetup.install | 16 | ||||
-rw-r--r-- | pcr/openrc-base/dbus.install | 16 | ||||
-rw-r--r-- | pcr/openrc-base/device-mapper.install | 20 | ||||
-rw-r--r-- | pcr/openrc-base/dhcpcd.install | 16 | ||||
-rw-r--r-- | pcr/openrc-base/eudev.install | 14 | ||||
-rw-r--r-- | pcr/openrc-base/glibc.install | 16 | ||||
-rw-r--r-- | pcr/openrc-base/inetutils.confd | 8 | ||||
-rw-r--r-- | pcr/openrc-base/inetutils.initd | 27 | ||||
-rw-r--r-- | pcr/openrc-base/inetutils.install | 16 | ||||
-rw-r--r-- | pcr/openrc-base/lvm2.install | 24 | ||||
-rw-r--r-- | pcr/openrc-base/mdadm.install | 16 |
13 files changed, 474 insertions, 0 deletions
diff --git a/pcr/openrc-base/PKGBUILD b/pcr/openrc-base/PKGBUILD new file mode 100644 index 000000000..9519fb572 --- /dev/null +++ b/pcr/openrc-base/PKGBUILD @@ -0,0 +1,269 @@ +# Maintainer : freaj <freaj@riseup.net> +# Maintainer (Manjaro): artoo <artoo@manjaro.org> + +_Icron1=cronie-1.3-initd +_Icron2=anacron-1.0-initd +_Ccrypt=1.0.6-dmcrypt.confd +_Icrypt=1.5.1-dmcrypt.rc +_Idbus=dbus.initd +_Inscd=nscd +_Cdm=device-mapper.conf-1.02.22-r3 +_Idm1=device-mapper.rc-2.02.105-r2 +_Idm2=dmeventd.initd-2.02.67-r1 +_Clvm=lvm.confd-2.02.28-r2 +_Ilvm1=lvm.rc-2.02.105-r2 +_Ilvm2=lvm-monitoring.initd-2.02.105-r2 +_Ilvm3=lvmetad.initd-2.02.105-r2 +_Cmdadm=mdadm.confd +_Imdadm=mdadm.rc +_Idhcpcd=dhcpcd.initd +_Cmdraid=mdraid.confd +_Imdraid=mdraid.rc +_Ieudev=udev-postmount + +_gentoo_uri="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86" + + +# set false if you want building without eudev(leaving systemd) +_is_eudev=true + +pkgbase=openrc-base +_pkgname=('cronie-openrc' + 'cryptsetup-openrc' + 'dbus-openrc' + 'dhcpcd-openrc' + 'device-mapper-openrc' + 'glibc-openrc' + 'inetutils-openrc' + 'lvm2-openrc' + 'mdadm-openrc') +if ${_is_eudev};then + pkgname=( ${_pkgname[@]} 'eudev-openrc') +else + pkgname=( ${_pkgname[@]} ) +fi +pkgver=20150215 +pkgrel=1 +pkgdesc="OpenRC init scripts" +arch=('any') +url="https://github.com/manjaro/packages-openrc" +license=('GPL2') +groups=('openrc' 'openrc-base') +conflicts=('initscripts' + 'systemd-sysvcompat' + 'openrc' + 'openrc-git' + 'openrc-sysvinit') +source=("${_gentoo_uri}/sys-process/cronie/files/${_Icron1}" + "${_gentoo_uri}/sys-process/cronie/files/${_Icron2}" + "${_gentoo_uri}/sys-fs/cryptsetup/files/${_Ccrypt}" + "${_gentoo_uri}/sys-fs/cryptsetup/files/${_Icrypt}" + "${_gentoo_uri}/sys-apps/dbus/files/${_Idbus}" + "${_gentoo_uri}/sys-libs/glibc/files/${_Inscd}" + "${_gentoo_uri}/sys-fs/lvm2/files/${_Cdm}" + "${_gentoo_uri}/sys-fs/lvm2/files/${_Idm1}" + "${_gentoo_uri}/sys-fs/lvm2/files/${_Idm2}" + "${_gentoo_uri}/sys-fs/lvm2/files/${_Clvm}" + "${_gentoo_uri}/sys-fs/lvm2/files/${_Ilvm1}" + "${_gentoo_uri}/sys-fs/lvm2/files/${_Ilvm2}" + "${_gentoo_uri}/sys-fs/lvm2/files/${_Ilvm3}" + "${_gentoo_uri}/sys-fs/mdadm/files/${_Cmdadm}" + "${_gentoo_uri}/sys-fs/mdadm/files/${_Imdadm}" + "${_gentoo_uri}/sys-fs/mdadm/files/${_Cmdraid}" + "${_gentoo_uri}/sys-fs/mdadm/files/${_Imdraid}" + "${_gentoo_uri}/net-misc/dhcpcd/files/${_Idhcpcd}" + "${_gentoo_uri}/sys-fs/eudev/files/${_Ieudev}" + 'inetutils.confd' + 'inetutils.initd') + +_shebang='s|#!/sbin/runscript|#!/usr/bin/openrc-run|' +_runpath='s|/var/run|/run|g' +_binpath=('s|/usr/sbin|/usr/bin|g' 's|/sbin|/usr/bin|g') + +pkgver() { + date +%Y%m%d +} + +package_cronie-openrc() { + pkgdesc="OpenRC cronie init script" + groups=('openrc' 'openrc-base' 'openrc-desktop') + depends=('openrc-core' 'cronie') + provides=('openrc-cron') + conflicts=('fcron' + 'fcron-openrc' + 'openrc' + 'openrc-git' + 'openrc-arch-services-git' + 'initscripts' + 'systemd-sysvcompat') + backup=('etc/init.d/cronie') + install=cronie.install + + install -Dm755 "${srcdir}/${_Icron1}" "${pkgdir}/etc/init.d/cronie" + install -Dm755 "${srcdir}/${_Icron2}" "${pkgdir}/etc/init.d/anacron" + + for f in ${pkgdir}/etc/init.d/*; do + sed -e "${_shebang}" \ + -e "${_binpath[0]}" \ + -e "${_runpath}" \ + -i $f + done +} + +package_dhcpcd-openrc() { + pkgdesc="OpenRC dhcpcd init script" + groups=('openrc' 'openrc-base' 'openrc-desktop') + depends=('openrc-core' 'dhcpcd') + install=dhcpcd.install + + install -Dm755 "${srcdir}/${_Idhcpcd}" "${pkgdir}/etc/init.d/dhcpcd" + + sed -e "${_shebang}" \ + -e "${_binpath[1]}" \ + -e "${_runpath}" \ + -i "${pkgdir}/etc/init.d/dhcpcd" +} + +package_dbus-openrc() { + pkgdesc="OpenRC dbus init script" + groups=('openrc' 'openrc-base' 'openrc-desktop') + depends=('openrc-core' 'dbus') + install=dbus.install + + install -Dm755 "${srcdir}/${_Idbus}" "${pkgdir}/etc/init.d/dbus" + + local _p1='s|dbus.pid|dbus/pid|g' + sed -e "${_shebang}" -e "${_runpath}" \ + -e "${_p1}" \ + -i "${pkgdir}/etc/init.d/dbus" +} + +package_device-mapper-openrc() { + pkgdesc="OpenRC device-mapper init script" + depends=('openrc-core' 'device-mapper') + backup=('etc/conf.d/device-mapper') + install=device-mapper.install + + install -Dm755 "${srcdir}/${_Cdm}" "${pkgdir}/etc/conf.d/device-mapper" + install -Dm755 "${srcdir}/${_Idm1}" "${pkgdir}/etc/init.d/device-mapper" + install -Dm755 "${srcdir}/${_Idm2}" "${pkgdir}/etc/init.d/dmeventd" + + for f in ${pkgdir}/etc/init.d/*; do + sed -e "${_shebang}" \ + -e "${_binpath[1]}" \ + -e "${_runpath}" \ + -i $f + done +} + +package_cryptsetup-openrc() { + pkgdesc="OpenRC cryptsetup init script" + depends=('device-mapper-openrc' 'cryptsetup') + backup=('etc/conf.d/dmcrypt') + install=cryptsetup.install + + install -Dm755 "${srcdir}/${_Ccrypt}" "${pkgdir}/etc/conf.d/dmcrypt" + install -Dm755 "${srcdir}/${_Icrypt}" "${pkgdir}/etc/init.d/dmcrypt" + + sed -e "${_shebang}" \ + -e "${_binpath[0]}" \ + -e "${_runpath}" \ + -i "${pkgdir}/etc/init.d/dmcrypt" +} + +package_glibc-openrc() { + pkgdesc="OpenRC nscd init script" + depends=('openrc-core' 'glibc') + optdepends=('openldap-openrc' + 'bind-openrc') + install=glibc.install + + install -Dm755 "${srcdir}/${_Inscd}" "${pkgdir}/etc/init.d/nscd" + + sed -e "${_shebang}" \ + -e "${_binpath[0]}" \ + -e "${_runpath}" \ + -i "${pkgdir}/etc/init.d/nscd" +} + +package_inetutils-openrc() { + pkgdesc="OpenRC ftpd init script" + depends=('openrc-core' 'inetutils') + backup=('etc/conf.d/ftpd') + install=inetutils.install + + install -Dm755 "${srcdir}/inetutils.confd" "${pkgdir}/etc/conf.d/ftpd" + install -Dm755 "${srcdir}/inetutils.initd" "${pkgdir}/etc/init.d/ftpd" +} + +package_lvm2-openrc() { + pkgdesc="OpenRC lvm2 init script" + depends=('device-mapper-openrc' 'lvm2') + backup=('etc/conf.d/lvm') + install=lvm2.install + + install -Dm755 "${srcdir}/${_Clvm}" "${pkgdir}/etc/conf.d/lvm" + install -Dm755 "${srcdir}/${_Ilvm1}" "${pkgdir}/etc/init.d/lvm" + install -Dm755 "${srcdir}/${_Ilvm2}" "${pkgdir}/etc/init.d/lvm-monitoring" + install -Dm755 "${srcdir}/${_Ilvm3}" "${pkgdir}/etc/init.d/lvmetad" + + for f in ${pkgdir}/etc/init.d/*; do + sed -e "${_shebang}" \ + -e "${_binpath[1]}" \ + -e "${_runpath}" \ + -i $f + done +} + +package_mdadm-openrc() { + pkgdesc="OpenRC mdadm init script" + depends=('openrc-core' 'mdadm') + optdepends=('bind-openrc') + backup=('etc/conf.d/mdadm') + install=mdadm.install + + install -Dm755 "${srcdir}/${_Cmdadm}" "${pkgdir}/etc/conf.d/mdadm" + install -Dm755 "${srcdir}/${_Imdadm}" "${pkgdir}/etc/init.d/mdadm" + + install -Dm755 "${srcdir}/${_Cmdraid}" "${pkgdir}/etc/conf.d/mdraid" + install -Dm755 "${srcdir}/${_Imdraid}" "${pkgdir}/etc/init.d/mdraid" + + sed -e "${_shebang}" \ + -e "${_runpath}" \ + -i "${pkgdir}/etc/init.d/mdadm" + sed -e "${_shebang}" \ + -i "${pkgdir}/etc/init.d/mdraid" +} + +package_eudev-openrc(){ + pkgdesc="OpenRC eudev postmount script" + groups=('eudev-base') + depends=('openrc-core' 'eudev') + install=eudev.install + + install -Dm755 "${srcdir}/${_Ieudev}" "${pkgdir}/etc/init.d/udev-postmount" + + sed -e "${_shebang}" -i "${pkgdir}/etc/init.d/udev-postmount" +} + +sha256sums=('292a7b20fe33bd027357475fea6aa1194afa7e5c1c47a85299db945b9d1c847e' + '7ff283ee8b492929d33831461b72e872fe9d3a98344cf39af442f575875b0132' + '9696d70a49296113a9ae3dff1b023b859df984bfb3572426ba199a630b628ce8' + '1010666cfb3cd2c662032c3e8f3c2aec35316fc376d0ce30f2c821b581ae2c6d' + '98e37b8b6ed25004e48c5855d74c9361eea06d3fee13cefcc0ed10ccf452aa01' + '6165db3a2fcb251d4f3655c0461e018ce9c92a37f7f22a8fd2b75178b5435bc8' + '57777904f12a35617e5a4193c964ebb32396452487fd02353e71e16e7b46bc22' + '036b6de05e6cbd921a667d6fc6b01d30c8f9b720e1a0d0e2453ecd62d32573fb' + '0c051388991ba69afbf2f6baf36ba227d7c26fc8f0d7588d8de76d9a74886d79' + '28370c089c39c248d7ded0960b8d8a9256bada44d44c22ce3cec87d512ef6844' + 'a5754ffa0a05a0c29a9f6b5acf1b21dd313581fd6156c1ef722dc620e0114676' + 'd7655cadd3a3a9d3683a540413365310ca9503c38fd21a9bfccec40630ca72f1' + '60accb4b6114753232f2db0adf3fc3f46d4459bfedf79b888801a13c55d79fa9' + 'ec55674955af7a31da51b8b72b599e8519809287dad796a9b16155bcba471b79' + '3073b14619cb7b2c99c33f2d6cfd1e59ce5557899bffebaa65fa52f3caffadc7' + '1b7918c4bdd024607bcb49d7cea0a77cb70502d2fbb4dbe07024bb5b5699c8e0' + '73303ec32b7010c7f6d4fd66dde1a5baea07e73c79d3e516dce31000abdb4089' + '72b42c9939fda3fb56666813513029ed36194c1708bddce06bcb3e131e547492' + '0220e949b1f31832a205021c0a8615e77b27b73b7c9b16ef4a61bbd2774aeecb' + '59fe1aa68c43f4958afc397a0d6b35da263a20fcdb457005123a0d64cb1f7477' + '7f46e5e9ac9f204fb1564560c506a5bb4cede8823b89e3f1844e4f8be258e9ef') diff --git a/pcr/openrc-base/cronie.install b/pcr/openrc-base/cronie.install new file mode 100644 index 000000000..aa2454c36 --- /dev/null +++ b/pcr/openrc-base/cronie.install @@ -0,0 +1,16 @@ +_svc="cronie" +_rlvl="default" + +post_install() { + _cmd="rc-update add ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} diff --git a/pcr/openrc-base/cryptsetup.install b/pcr/openrc-base/cryptsetup.install new file mode 100644 index 000000000..edbb2dd26 --- /dev/null +++ b/pcr/openrc-base/cryptsetup.install @@ -0,0 +1,16 @@ +_svc="dmcrypt" +_rlvl="boot" + +post_install() { + _cmd="rc-update add ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} diff --git a/pcr/openrc-base/dbus.install b/pcr/openrc-base/dbus.install new file mode 100644 index 000000000..f93bc37ca --- /dev/null +++ b/pcr/openrc-base/dbus.install @@ -0,0 +1,16 @@ +_svc="dbus" +_rlvl="default" + +post_install() { + _cmd="rc-update add ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} diff --git a/pcr/openrc-base/device-mapper.install b/pcr/openrc-base/device-mapper.install new file mode 100644 index 000000000..f2429ddb9 --- /dev/null +++ b/pcr/openrc-base/device-mapper.install @@ -0,0 +1,20 @@ +_svc=('device-mapper' 'dmeventd') +_rlvl="boot" + +post_install() { + _cmd="rc-update add ${_svc[0]} ${_rlvl}" + echo " ==> run '${_cmd}'" + _cmd="rc-update add ${_svc[1]} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc[0]} ${_rlvl}" + echo " ==> run '${_cmd}'" + _cmd="rc-update del ${_svc[1]} ${_rlvl}" + echo " ==> run '${_cmd}'" +} diff --git a/pcr/openrc-base/dhcpcd.install b/pcr/openrc-base/dhcpcd.install new file mode 100644 index 000000000..278467b94 --- /dev/null +++ b/pcr/openrc-base/dhcpcd.install @@ -0,0 +1,16 @@ +_svc="dhcpcd" +_rlvl="default" + +post_install() { + _cmd="rc-update add ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} diff --git a/pcr/openrc-base/eudev.install b/pcr/openrc-base/eudev.install new file mode 100644 index 000000000..0043774fa --- /dev/null +++ b/pcr/openrc-base/eudev.install @@ -0,0 +1,14 @@ +_svc="udev-postmount" +_rlvl="default" + +post_install() { + rc-update add ${_svc} ${_rlvl} +} + +post_upgrade() { + post_install "$1" +} + +pre_remove() { + rc-update del ${_svc} ${_rlvl} +} diff --git a/pcr/openrc-base/glibc.install b/pcr/openrc-base/glibc.install new file mode 100644 index 000000000..eed830c26 --- /dev/null +++ b/pcr/openrc-base/glibc.install @@ -0,0 +1,16 @@ +_svc="nscd" +_rlvl="default" + +post_install() { + _cmd="rc-update add ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} diff --git a/pcr/openrc-base/inetutils.confd b/pcr/openrc-base/inetutils.confd new file mode 100644 index 000000000..df58eab46 --- /dev/null +++ b/pcr/openrc-base/inetutils.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/pcr/openrc-base/inetutils.initd b/pcr/openrc-base/inetutils.initd new file mode 100644 index 000000000..a53184c4c --- /dev/null +++ b/pcr/openrc-base/inetutils.initd @@ -0,0 +1,27 @@ +#!/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 $? +} + diff --git a/pcr/openrc-base/inetutils.install b/pcr/openrc-base/inetutils.install new file mode 100644 index 000000000..85b4fad7a --- /dev/null +++ b/pcr/openrc-base/inetutils.install @@ -0,0 +1,16 @@ +_svc="ftpd" +_rlvl="default" + +post_install() { + _cmd="rc-update add ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} diff --git a/pcr/openrc-base/lvm2.install b/pcr/openrc-base/lvm2.install new file mode 100644 index 000000000..8a00d2936 --- /dev/null +++ b/pcr/openrc-base/lvm2.install @@ -0,0 +1,24 @@ +_svc=('lvm' 'lvmetad' 'lvm-monitoring') +_rlvl=('boot' 'default') + +post_install() { + _cmd="rc-update add ${_svc[0]} ${_rlvl[0]}" + echo " ==> run '${_cmd}'" +# _cmd="rc-update add ${_svc[1]} ${_rlvl[1]}" +# echo " ==> run '${_cmd}'" +# _cmd="rc-update add ${_svc[2]} ${_rlvl[1]}" +# echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc[0]} ${_rlvl[0]}" + echo " ==> run '${_cmd}'" +# _cmd="rc-update del ${_svc[1]} ${_rlvl[1]}" +# echo " ==> run '${_cmd}'" +# _cmd="rc-update del ${_svc[2]} ${_rlvl[1]}" +# echo " ==> run '${_cmd}'" +} diff --git a/pcr/openrc-base/mdadm.install b/pcr/openrc-base/mdadm.install new file mode 100644 index 000000000..8bcffe5f6 --- /dev/null +++ b/pcr/openrc-base/mdadm.install @@ -0,0 +1,16 @@ +_svc="mdadm" +_rlvl="boot" + +post_install() { + _cmd="rc-update add ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} + +post_upgrade() { + post_install "$1" +} + +post_remove() { + _cmd="rc-update del ${_svc} ${_rlvl}" + echo " ==> run '${_cmd}'" +} |