117 lines
6.0 KiB
Plaintext
117 lines
6.0 KiB
Plaintext
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
pkgname=zdt-base
|
|
pkgver=0.1.2
|
|
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
|
|
dhclient.conf
|
|
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"
|
|
|
|
# dhcp tuning for MTU
|
|
install -Dm644 "$srcdir"/dhclient.conf "$pkgdir"/etc/dhcp/dhclient.conf
|
|
|
|
# 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="
|
|
92e669eb440dbc89e083e3b61c9f9fa871bedfdca404b8c3533fa1caec0d061f428c39697921c68c49d3de9af2043946d9baf989ba47482827d5626fe9f3e479 cb_base.sh
|
|
3e02b858680d751b2c1fb22feeec2b767e328fdf007d9fb6687f309e62630467e982cc33d47c4417311938d35bb17dc210f9e0a40b90298dc22cf142f022c124 cb_lock.sh
|
|
f392ae57c4a5ccc019eb5fcc191429a4ba81b2593bfb12bab3b3da3365342b2b89908dfd90d8debf813e3455a61ff8d123f49fa4adce8ea44c06d9db1f7b7e19 cb_volumes.sh
|
|
89a27da781fe302aaed9ed7dcd1b8fc8b94f39802f86b1faeedee50d68a9d61fcbfe037bc29a938994c507cbcda08d86d2c387db118408ca9b7d085f99bb0a17 cb_init.sh
|
|
9c688e08e44ae965eaa6021e005f65077690c30fe6b2de7371c57ae3a53a18f12a356587261c950b8c900f73cb35af3ba7795d33181532b485aeee3b6ca41757 cloudbender-early.init
|
|
46500f8dc08e2e5e5d34886225ef4993f02da9f0a8b55107e886337ec1318fe683a172c398d1236e8f2559b57e0aba66238725e0a20e0440e1423d71aa3d77ea cloudbender.init
|
|
b9479835d8667fa99f8b1b140f969f0464a9bb3c60c7d19b57e306cfe82357d453932791e446caded71fddd379161ae8328367f1ee75ae3afc1b85e12294b621 zdt-sysctl.conf
|
|
76e6a4f309f31bfa07de2d3b1faebe5670722752e18157b69d6e868cbe9e85eda393aed0728b0347a01a810eee442844c78259f86ff71e3136a013f4cbfaaea4 ps_mem.py
|
|
9d087f2d4403a9c6d4d2f06fbb86519f2b8b134d8eb305facaef07c183815f917fb7bac916d39d504dbab7fdf3321a3f70954dde57e8986cc223371715bb1c54 syslog-ng.conf
|
|
484bdcf001b71ce5feed26935db437c613c059790b99f3f5a3e788b129f3e22ba096843585309993446a88c0ab5d60fd0fa530ef3cfb6de1fd34ffc828172329 syslog-ng.logrotate.conf
|
|
1db58e670748bf9a507068251c21c9ca1744727bbf53fd925059239a58721f6f60c0bd357e4c52e9277a913640a6784e0025a7f3834868a1e93e9e1cbc66d5a6 syslog-ng.apparmor
|
|
b928ba547af080a07dc9063d44cb0f258d0e88e7c5a977e8f1cf1263c23608f0a138b8ffca0cdf5818ee72fccb3ce8433f877811be3107bb9c275dfff988179c monitrc
|
|
64944727d658ff37e7ff9d22a23869e225e104d9229756ba4fef1fc481c56f782472a1c74f8127636b4a98d4545ae30e7d35822a1f0a0fa31a59ec8eaf8c0396 monit_alert.sh.aws
|
|
346b0170ada6cc1207ffb7b8ef138a1570a63c7df4d57618aa4b6b6c0d2df2197b0f5b23578ec83c641ee5e724865ac06985222e125809c990467426a0851b72 neofetch.conf
|
|
532b8e2eb04942ab20bdc36b5dea1c60239fcbfcb85706123f3e05c18d65c938b85e9072d964ae5793177625a8db47b532db1f5bd5ed5ecbb70d5a331666ff54 zdt-ascii.txt
|
|
c565516121b9e6f9d5f769511eb900546753e67cc4208d1b388fdce44cd28699261a5c3905f9a168d4b2d45ac65ac3a2a6a95335f1bbd76d2f444d5f50ec5c9e dhclient.conf
|
|
c3e72cd92936b03f2b9eab5e97e9a12fcddcdf2c943342e42e7702e2d2407e00859c62dc9b4de3378688d2f05458aa5c104272af7ab13e53a62f1676d1a9a1b4 profile
|
|
2d419d5c25a3829e99326b09876f459e48ab66f5756a8ad39b406c0f2829f5a323e8ff512afd8f32b7b07f24c88efa911bee495ce6c4d1925194cb54d3ba57bd route53.py
|
|
00eaff6c0a506580340b2547c3b1602a54238bac6090a15516839411478a4b4fdc138668b8ad23455445131f3a3e3fda175ed4bb0dd375402641c0e7b69c3218 get_iam_sshkeys.py
|
|
8fd5dca9b9fdae61022f136215afa8adc0d199afcf26593bdd0bd1946d0f2efc5d7ed345704ef9642fbeedeeea007ed31b67fafe89289b749a560a045da45b8e uniq_hostname.py
|
|
"
|