aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorOlivier Mauras <olivier@mauras.ch>2016-09-07 23:23:12 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-09-16 00:44:21 +0200
commit1fa6b2eb53bf56460a16c768109a956689a37f98 (patch)
tree8680e9fcdd6de01ee5a6b5f5f337d177d94f9677 /community
parent14060b55ac33e3a4fe45153d67fc7abef14f22a4 (diff)
downloadaports-1fa6b2eb53bf56460a16c768109a956689a37f98.tar.bz2
aports-1fa6b2eb53bf56460a16c768109a956689a37f98.tar.xz
community/salt: update to 2016.3.3 and refactor based on official SRPM
Diffstat (limited to 'community')
-rw-r--r--community/salt/APKBUILD172
-rw-r--r--community/salt/salt-api.confd5
-rw-r--r--community/salt/salt-api.initd13
3 files changed, 145 insertions, 45 deletions
diff --git a/community/salt/APKBUILD b/community/salt/APKBUILD
index 99721a66f4..48e2c7fa20 100644
--- a/community/salt/APKBUILD
+++ b/community/salt/APKBUILD
@@ -1,27 +1,29 @@
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
+# Contributor: Olivier Mauras <olivier@mauras.ch>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=salt
-pkgver=2016.3.2
+pkgver=2016.3.3
pkgrel=0
-pkgdesc="A remote execution and communication system built on zeromq"
+pkgdesc="A parallel remote execution system"
url="https://github.com/saltstack/salt"
arch="noarch"
-license="ASL 2.0"
-depends="py-tornado py2-markupsafe py2-futures"
-depends_dev=""
-makedepends="$depends_dev python2-dev py-zmq
- py2-crypto py2-psutil py-jinja2 py-yaml py-msgpack"
-install=""
-subpackages="$pkgname-doc"
-source="https://github.com/saltstack/salt/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
- salt-master.initd
- salt-master.confd
- salt-minion.initd
- salt-minion.confd
- salt-syndic.initd
- salt-syndic.confd"
-
-builddir="$srcdir"/$pkgname-$pkgver
+license="ASL-2.0"
+depends="py-tornado py2-yaml py-jinja2 py2-markupsafe py2-msgpack py2-crypto py2-zmq
+ py2-six py2-requests py2-futures py2-pygit2 procps"
+makedepends="python2-dev py-tornado py2-yaml py-jinja2 py2-markupsafe
+ py2-msgpack py2-crypto py2-zmq py2-six py2-requests py2-futures py2-libcloud"
+subpackages="$pkgname-doc $pkgname-master $pkgname-minion $pkgname-syndic $pkgname-api
+ $pkgname-cloud $pkgname-ssh"
+source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/saltstack/$pkgname/tar.gz/v$pkgver
+ salt-api.confd
+ salt-api.initd
+ salt-master.confd
+ salt-master.initd
+ salt-minion.confd
+ salt-minion.initd
+ salt-syndic.confd
+ salt-syndic.initd"
+builddir="$srcdir/$pkgname-$pkgver"
build() {
cd "$builddir"
@@ -30,38 +32,118 @@ build() {
package() {
cd "$builddir"
- python2 setup.py install --root=$pkgdir/ --optimize=1 || return 1
- mkdir -p ${pkgdir}/etc/rc.d/
- cp ${srcdir}/salt-master.initd ${pkgdir}/etc/rc.d/salt-master
- cp ${srcdir}/salt-minion.initd ${pkgdir}/etc/rc.d/salt-minion
- cp ${srcdir}/salt-syndic.initd ${pkgdir}/etc/rc.d/salt-syndic
- chmod +x ${pkgdir}/etc/rc.d/salt-master
- chmod +x ${pkgdir}/etc/rc.d/salt-minion
- chmod +x ${pkgdir}/etc/rc.d/salt-syndic
-
- mkdir -p ${pkgdir}/etc/salt/
- cp ${srcdir}/${pkgname}-${pkgver}/conf/master ${pkgdir}/etc/salt/
- cp ${srcdir}/${pkgname}-${pkgver}/conf/minion ${pkgdir}/etc/salt/
+ python2 setup.py install --root="$pkgdir"/ --optimize=1 || return 1
+ mkdir -p "${pkgdir}"/var/log/$pkgname || return 1
}
-md5sums="27a9bb34c205ffe07e95b316e2131177 salt-2016.3.2.tar.gz
-0b40fd1b49ff4c2f34382fd69c341c34 salt-master.initd
+_init_copy() {
+ local type="$1"
+ install -m 755 -D "$srcdir"/salt-$type.initd "$subpkgdir"/etc/init.d/salt-$type || return 1
+ install -m 644 -D "$srcdir"/salt-$type.confd "$subpkgdir"/etc/conf.d/salt-$type || return 1
+}
+
+_conf_copy() {
+ local type="$1"
+ mkdir -p "$subpkgdir"/etc/salt/ || return 1
+ cp -rf "$builddir"/conf/$type* "$subpkgdir"/etc/salt/ || return 1
+}
+
+master() {
+ pkgdesc="Management component for salt, a parallel remote execution system"
+ depends="$pkgname"
+
+ _init_copy master
+ _conf_copy master
+
+ mkdir -p "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/bin/salt "$subpkgdir"/usr/bin/salt || return 1
+
+ local i
+ for i in cp key master run unity
+ do
+ mv "$pkgdir"/usr/bin/salt-$i "$subpkgdir"/usr/bin || return 1
+ done
+}
+
+minion() {
+ pkgdesc="Client component for Salt, a parallel remote execution system"
+ depends="$pkgname"
+
+ _init_copy minion
+ _conf_copy minion
+ _conf_copy proxy
+
+ mkdir -p "${subpkgdir}"/usr/bin || return 1
+
+ local i
+ for i in call minion proxy
+ do
+ mv "${pkgdir}"/usr/bin/salt-$i "${subpkgdir}"/usr/bin || return 1
+ done
+}
+
+syndic() {
+ pkgdesc="Master-of-master component for Salt, a parallel remote execution system"
+ depends="$pkgname-master"
+
+ mkdir -p "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/bin/salt-syndic "$subpkgdir"/usr/bin || return 1
+}
+
+api() {
+ pkgdesc="REST API for Salt, a parallel remote execution system"
+ depends="$pkgname-master"
+
+ _init_copy api
+
+ mkdir -p "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/bin/salt-api "$subpkgdir"/usr/bin || return 1
+}
+
+cloud() {
+ pkgdesc="Cloud provisioner for Salt, a parallel remote execution system"
+ depends="$pkgname-master py2-libcloud"
+
+ _conf_copy cloud
+
+ mkdir -p "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/bin/salt-cloud "$subpkgdir"/usr/bin || return 1
+}
+
+ssh() {
+ pkgdesc="Agentless SSH-based version of Salt, a parallel remote execution system"
+ depends="$pkgname"
+
+ _conf_copy roster
+
+ mkdir -p "$subpkgdir"/usr/bin || return 1
+ mv "$pkgdir"/usr/bin/salt-ssh "$subpkgdir"/usr/bin || return 1
+}
+
+md5sums="5db25ad762a0780ff5d74561516a97fa salt-2016.3.3.tar.gz
+322f17cc48aabdc8cbf5f0bccf3e2059 salt-api.confd
+014e02c0aafafcd74179e32f5a3b55a8 salt-api.initd
7bb58f256213aaaa23d86d5127c9ffe3 salt-master.confd
-c8326b9cff0df6065a1320eefea09b2c salt-minion.initd
+0b40fd1b49ff4c2f34382fd69c341c34 salt-master.initd
75badf5042aa93a6da74659ca12bef70 salt-minion.confd
-dffce15d3a16a2dc40dd02d0c24fb4c6 salt-syndic.initd
-a24d13b018a35b31b34167bcaa749db5 salt-syndic.confd"
-sha256sums="6a84b724d02b0dba438dea57650724064675d82620e66749bd2fe8f21da71be0 salt-2016.3.2.tar.gz
-40c9864ab001c00de60b52baff5c9cf7c2c0f248a1e02fb15260ae70287bce70 salt-master.initd
+c8326b9cff0df6065a1320eefea09b2c salt-minion.initd
+a24d13b018a35b31b34167bcaa749db5 salt-syndic.confd
+dffce15d3a16a2dc40dd02d0c24fb4c6 salt-syndic.initd"
+sha256sums="7d09bc9142d96ecdfe779cf813e43ab62b9b4632f6e0711af383809661b87e1d salt-2016.3.3.tar.gz
+b25cfdb769305f2245b27f6753adee590bac10faeb8c43ba605dbf7e931fe258 salt-api.confd
+f8918f2819b81e69af1b8564b90ec370942ed733aefd4b97e5d2446a892880eb salt-api.initd
383475b21261ac22c5930e99060d53630dfb35aac67aa03a18ec738e0f4dff50 salt-master.confd
-ae9236919c3fee3eef0ef8ad54334d6f833a51bbd4d42c40214614498acbe573 salt-minion.initd
+40c9864ab001c00de60b52baff5c9cf7c2c0f248a1e02fb15260ae70287bce70 salt-master.initd
286148f5391d42c04a62a13cc125fa2130b5821e50da913c5a20d3a913e5f2d1 salt-minion.confd
-6a453f63e51f2cc1ecb024ee8e7fa1beab7fbcea010f3eb10ea23bdb2383e7f5 salt-syndic.initd
-66a663c426e2fa157ea78f7f9b2f33f17b72dbc48e119f8dd2609aab8f8370e7 salt-syndic.confd"
-sha512sums="608e2a43bc8c55eeb8c9e0f9207306e591151940ad1ffb869ada12963c0790f37653936e539c0b70439c13180909de2c763db6c30e7f9e2087068985d1b3ff91 salt-2016.3.2.tar.gz
-324e687e8b0eaccb799b4a719448341a4e09cda3add102890beddaf371ac42957bbc1622f145b2b86420061655bb27f27879302b5b34c6eee1987d2dcae6b8ef salt-master.initd
+ae9236919c3fee3eef0ef8ad54334d6f833a51bbd4d42c40214614498acbe573 salt-minion.initd
+66a663c426e2fa157ea78f7f9b2f33f17b72dbc48e119f8dd2609aab8f8370e7 salt-syndic.confd
+6a453f63e51f2cc1ecb024ee8e7fa1beab7fbcea010f3eb10ea23bdb2383e7f5 salt-syndic.initd"
+sha512sums="89a6f9e7d8a337ec5addda2374c833d251162150c4e57ce34f7f9e81a75f540539071064c0e7c4486ef6e447c6422363f868e9b035e4c5af2f3d320e98e0226d salt-2016.3.3.tar.gz
+975ba2f5e681fbd62045da61cc3dc065b148683a07b5df7eca9f131e47314eb6bfa8660ca1c06a3bd93683c7097d0ff9f8e514273dd24d82fb2de6a255e6b275 salt-api.confd
+435d399bfecf431d0c713031e2ae57ce25b5c6edc98b62f33bd7a4ff1c587e3cdeb988445ae0c3e9ffc1911555c3694654d98815f9562b8a14bf0688ec1ebea6 salt-api.initd
cfbbeb8023a383e7c42d84e3346edfd068c9ec7650c4ddc3caa38534da325a67497e1f06ca02cc1f0941b7348a3af6d1dca7cd6f2bcb3612ca10e1ec98997e5a salt-master.confd
-c6634a592c6f3e65dd2b704cb500486bf8004c5b287d4a4d42b09af36ef129c59d6a89f005af058cf7911e8587d927b3db931186569084f13ebaca56f6ef93a0 salt-minion.initd
+324e687e8b0eaccb799b4a719448341a4e09cda3add102890beddaf371ac42957bbc1622f145b2b86420061655bb27f27879302b5b34c6eee1987d2dcae6b8ef salt-master.initd
0051e13351cef8db81dc075a194bb384723f07d5591b5b4d3f3adf4180afaf7beced470ab79ceca9d1ec0dae62dbd72084eb76af009fc78411a011050a94a2ed salt-minion.confd
-d71133e834685304e0167554035ebbc861252f972bbe981cc71e45b70f15d94a28a02a369463c9a641372919689f96b62a0408b14f824ad986d536e52b1e5ec0 salt-syndic.initd
-bafc6ea10cdafd0aef868feb35aecbe4ae6a7dff0ae42862bded85715ad763eb89e1ed27437866a7e5f2b9f7064e3c2a3fb59814487744ba4227238d95cf3818 salt-syndic.confd"
+c6634a592c6f3e65dd2b704cb500486bf8004c5b287d4a4d42b09af36ef129c59d6a89f005af058cf7911e8587d927b3db931186569084f13ebaca56f6ef93a0 salt-minion.initd
+bafc6ea10cdafd0aef868feb35aecbe4ae6a7dff0ae42862bded85715ad763eb89e1ed27437866a7e5f2b9f7064e3c2a3fb59814487744ba4227238d95cf3818 salt-syndic.confd
+d71133e834685304e0167554035ebbc861252f972bbe981cc71e45b70f15d94a28a02a369463c9a641372919689f96b62a0408b14f824ad986d536e52b1e5ec0 salt-syndic.initd"
diff --git a/community/salt/salt-api.confd b/community/salt/salt-api.confd
new file mode 100644
index 0000000000..277e3bcbec
--- /dev/null
+++ b/community/salt/salt-api.confd
@@ -0,0 +1,5 @@
+# /etc/conf.d/salt-api: config file for /etc/init.d/salt-api
+# See man pages for salt-api or run `salt-api --help`
+# for valid cmdline options
+
+SALT_OPTS="--log-level=warning"
diff --git a/community/salt/salt-api.initd b/community/salt/salt-api.initd
new file mode 100644
index 0000000000..aa62bc2793
--- /dev/null
+++ b/community/salt/salt-api.initd
@@ -0,0 +1,13 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/salt/files/api-initd-1,v 1.1 2012/04/24 23:37:27 chutzpah Exp $
+
+command="/usr/bin/salt-api"
+command_args="--daemon ${SALT_OPTS}"
+pidfile="/var/run/salt-api.pid"
+name="SALT api daemon"
+
+depend() {
+ use net
+}