112 lines
5.8 KiB
Plaintext
112 lines
5.8 KiB
Plaintext
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
pkgname=zdt-base
|
|
pkgver=0.3.18
|
|
pkgrel=0
|
|
pkgdesc="ZeroDownTime Alpine additions and customizations"
|
|
url="https://git.zero-downtime.net/ZeroDownTime/alpine-overlay/src/branch/master/kubezero/zdt-base"
|
|
arch="noarch"
|
|
license="AGPL-3.0"
|
|
depends="logrotate syslog-ng neofetch monit file tiny-cloud"
|
|
options="!check"
|
|
subpackages="$pkgname-openrc $pkgname-aws"
|
|
install="$pkgname.post-install"
|
|
|
|
source="
|
|
cb_base.sh
|
|
cb_lock.sh
|
|
cb_volumes.sh
|
|
cb_init.sh
|
|
cloudbender-early.init
|
|
cloudbender.init
|
|
zdt-sysctl.conf
|
|
https://raw.githubusercontent.com/pixelb/ps_mem/v3.14/ps_mem.py
|
|
syslog-ng.conf
|
|
syslog-ng.logrotate.conf
|
|
syslog-ng.apparmor
|
|
monitrc
|
|
monit_alert.sh.aws
|
|
neofetch.conf
|
|
zdt-ascii.txt
|
|
profile
|
|
route53.py
|
|
get_iam_sshkeys.py
|
|
uniq_hostname.py
|
|
"
|
|
|
|
build() {
|
|
sed -i -e 's,#!/usr/bin/env python,#!/usr/bin/env python3,' ps_mem.py
|
|
}
|
|
|
|
package() {
|
|
# core libraries
|
|
install -Dm755 "$srcdir/cb_base.sh" "$pkgdir/usr/lib/cloudbender/base.sh"
|
|
install -Dm755 "$srcdir/cb_lock.sh" "$pkgdir/usr/lib/cloudbender/lock.sh"
|
|
install -Dm755 "$srcdir/cb_volumes.sh" "$pkgdir/usr/lib/cloudbender/volumes.sh"
|
|
install -Dm755 "$srcdir/cb_init.sh" "$pkgdir/usr/lib/cloudbender/init.sh"
|
|
|
|
# convienience
|
|
mkdir -p "$pkgdir"/etc/cloudbender "$pkgdir/home/alpine"
|
|
install -Dm644 "$srcdir/profile" "$pkgdir/home/alpine/.profile"
|
|
|
|
# various sysctl tunings
|
|
install -Dm644 "$srcdir"/zdt-sysctl.conf "$pkgdir"/etc/sysctl.d/60-zdt.conf
|
|
|
|
# early init script to eg. mount var, cannot use any network !
|
|
install -Dm755 "$srcdir/cloudbender-early.init" "$pkgdir/etc/init.d/cloudbender-early"
|
|
|
|
# various tasks during boot
|
|
install -Dm755 "$srcdir/cloudbender.init" "$pkgdir/etc/init.d/cloudbender"
|
|
|
|
# syslog-ng configs, json all into messages
|
|
install -Dm644 "$srcdir"/syslog-ng.conf "$pkgdir"/lib/zdt/syslog-ng.conf
|
|
install -Dm644 "$srcdir"/syslog-ng.logrotate.conf "$pkgdir"/lib/zdt/syslog-ng.logrotate.conf
|
|
install -Dm644 "$srcdir"/syslog-ng.apparmor "$pkgdir"/lib/zdt/syslog-ng.apparmor
|
|
|
|
# monit
|
|
mkdir -p "$pkgdir"/etc/monit.d
|
|
install -Dm600 "$srcdir"/monitrc "$pkgdir"/etc/monitrc.zdt
|
|
|
|
# ps_mem
|
|
install -Dm755 "$srcdir"/ps_mem.py "$pkgdir"/usr/sbin/ps_mem
|
|
|
|
# Neofetch
|
|
install -Dm644 "$srcdir"/neofetch.conf "$pkgdir"/etc/neofetch.conf
|
|
install -Dm644 "$srcdir"/zdt-ascii.txt "$pkgdir"/etc/neofetch-logo.txt
|
|
mkdir -p "$pkgdir"/etc/profile.d
|
|
echo '[ -n "$SSH_TTY" -a "$SHLVL" -eq 1 ] && neofetch --config /etc/neofetch.conf' > "$pkgdir"/etc/profile.d/motd.sh
|
|
}
|
|
|
|
aws() {
|
|
# Basic AWS tools
|
|
mkdir -p "$subpkgdir"
|
|
install -Dm755 "$srcdir"/route53.py "$subpkgdir"/usr/sbin/route53.py
|
|
install -Dm755 "$srcdir"/uniq_hostname.py "$subpkgdir"/usr/sbin/uniq_hostname.py
|
|
install -Dm755 "$srcdir"/get_iam_sshkeys.py "$subpkgdir"/usr/sbin/get_iam_sshkeys.py
|
|
|
|
# Cloudbender SNS integration
|
|
install -Dm755 "$srcdir"/monit_alert.sh.aws "$pkgdir"/usr/bin/monit_alert.sh
|
|
}
|
|
|
|
sha512sums="
|
|
13944b955f3c2db54674cd84d58950fc9d8ca522d96081f05ed9bfef8289e30c3dd508796c94d9b283b9c168aadc70f9a934442ec48a5c0c9f25578e62ea0b78 cb_base.sh
|
|
3e02b858680d751b2c1fb22feeec2b767e328fdf007d9fb6687f309e62630467e982cc33d47c4417311938d35bb17dc210f9e0a40b90298dc22cf142f022c124 cb_lock.sh
|
|
d7bb357e25aa797b68185036814f1b34d4d6b098de43ef0cf3b71011ebee3d6c2e4bd8fa73a5c7dd6f37c6bbbf3c9c344461a9507346104d4fe783dd1f8b2e23 cb_volumes.sh
|
|
4ccae4451de8fa83d1a73182ad539ca218a98f68f0bbfe2fc4d99ade75e802e3baa65b4a0e00ae2a0b3c870e6467b219d1c5a22e04f3930c3efd7de6c3cf38ab cb_init.sh
|
|
9c688e08e44ae965eaa6021e005f65077690c30fe6b2de7371c57ae3a53a18f12a356587261c950b8c900f73cb35af3ba7795d33181532b485aeee3b6ca41757 cloudbender-early.init
|
|
7fea4ed0ebcf781ae197962c9f6d287c66e7380c758126a1b46c711baf3c7e93d6ccf1d536dada590ca02a7f7b271fd5ecb0dcb4854772cc8b1b70d379249f65 cloudbender.init
|
|
b9479835d8667fa99f8b1b140f969f0464a9bb3c60c7d19b57e306cfe82357d453932791e446caded71fddd379161ae8328367f1ee75ae3afc1b85e12294b621 zdt-sysctl.conf
|
|
76e6a4f309f31bfa07de2d3b1faebe5670722752e18157b69d6e868cbe9e85eda393aed0728b0347a01a810eee442844c78259f86ff71e3136a013f4cbfaaea4 ps_mem.py
|
|
5376f4bf8356ce9249c45e78085073245181e8742c7b4be47c71dcd97a611ae125a7dfd3060502bdd591560af070334f89fe60dbc09c008926149c538ab0560a syslog-ng.conf
|
|
484bdcf001b71ce5feed26935db437c613c059790b99f3f5a3e788b129f3e22ba096843585309993446a88c0ab5d60fd0fa530ef3cfb6de1fd34ffc828172329 syslog-ng.logrotate.conf
|
|
e86eed7dd2f4507b04050b869927b471e8de26bc7d97e7064850478323380a0580a92de302509901ea531d6e3fa79afcbf24997ef13cd0496bb3ee719ad674ee syslog-ng.apparmor
|
|
b928ba547af080a07dc9063d44cb0f258d0e88e7c5a977e8f1cf1263c23608f0a138b8ffca0cdf5818ee72fccb3ce8433f877811be3107bb9c275dfff988179c monitrc
|
|
64944727d658ff37e7ff9d22a23869e225e104d9229756ba4fef1fc481c56f782472a1c74f8127636b4a98d4545ae30e7d35822a1f0a0fa31a59ec8eaf8c0396 monit_alert.sh.aws
|
|
346b0170ada6cc1207ffb7b8ef138a1570a63c7df4d57618aa4b6b6c0d2df2197b0f5b23578ec83c641ee5e724865ac06985222e125809c990467426a0851b72 neofetch.conf
|
|
532b8e2eb04942ab20bdc36b5dea1c60239fcbfcb85706123f3e05c18d65c938b85e9072d964ae5793177625a8db47b532db1f5bd5ed5ecbb70d5a331666ff54 zdt-ascii.txt
|
|
c3e72cd92936b03f2b9eab5e97e9a12fcddcdf2c943342e42e7702e2d2407e00859c62dc9b4de3378688d2f05458aa5c104272af7ab13e53a62f1676d1a9a1b4 profile
|
|
816049360aa442f9e9aa4d6525795913cfe3dc7c6c14dc4ccad59c0880500f9d42f198edc442fe036bc84ba2690d9c5bc8ae622341d8276b3f14947db6b879b1 route53.py
|
|
7da28446762a36a6737c5b30becbce78775bd943b4d0c5ef938a50f49b4f51f66708434aa79004c19d16c56c83f54c8d6d68e1502ebc250c73f8aae12bed83c0 get_iam_sshkeys.py
|
|
8fd5dca9b9fdae61022f136215afa8adc0d199afcf26593bdd0bd1946d0f2efc5d7ed345704ef9642fbeedeeea007ed31b67fafe89289b749a560a045da45b8e uniq_hostname.py
|
|
"
|