From 745724ec9f8de9c968bb49fe74fffd125e03d543 Mon Sep 17 00:00:00 2001 From: Oleg Titov Date: Tue, 7 May 2019 12:05:07 -0500 Subject: testing/k3s: add openrc scripts --- testing/k3s/APKBUILD | 16 ++++++++++++---- testing/k3s/k3s.confd | 2 ++ testing/k3s/k3s.initd | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 testing/k3s/k3s.confd create mode 100644 testing/k3s/k3s.initd (limited to 'testing/k3s') diff --git a/testing/k3s/APKBUILD b/testing/k3s/APKBUILD index aad7f7032f..1af8590fc0 100644 --- a/testing/k3s/APKBUILD +++ b/testing/k3s/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Oleg Titov pkgname=k3s pkgver=0.5.0 -pkgrel=0 +pkgrel=1 pkgdesc="Lightweigt Kubernetes. 5 less than k8s." url="https://k3s.io" arch="all" @@ -11,8 +11,11 @@ options="!check" # No test suite from upstream depends="containerd" makedepends="go linux-headers" install="" -subpackages="$pkgname-doc" -source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/k3s/archive/v$pkgver.tar.gz" +subpackages="$pkgname-doc $pkgname-openrc" +source="$pkgname-$pkgver.tar.gz::https://github.com/rancher/k3s/archive/v$pkgver.tar.gz + k3s.initd + k3s.confd + " builddir="$srcdir/src/github.com/rancher/$pkgname" prepare() { @@ -51,6 +54,11 @@ package() { install -m644 -D -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE install -m644 -D -t "$pkgdir"/usr/share/doc/$pkgname README.md + + install -m755 -D "$srcdir"/k3s.initd "$pkgdir"/etc/init.d/k3s + install -m644 -D "$srcdir"/k3s.confd "$pkgdir"/etc/conf.d/k3s } -sha512sums="10fa2eba818105024ee130d75b01cbb0aec0ed2472118510399ae05e78f171b47d85587ba3dbd8a1f2fcd6cc5f971cfb38eff0efa2b00404f98d87cb1f2e8521 k3s-0.5.0.tar.gz" +sha512sums="10fa2eba818105024ee130d75b01cbb0aec0ed2472118510399ae05e78f171b47d85587ba3dbd8a1f2fcd6cc5f971cfb38eff0efa2b00404f98d87cb1f2e8521 k3s-0.5.0.tar.gz +9501422f1bf5375555116cbeedb32de32109153396699bde1300ce01156c3e57fe3fb14a57f7de1dce47c955e5e6d61de7fea181a07b407f5b452006bc58991c k3s.initd +dda2fc70e884ef439fece8f850d798f98d07cd431f0b8b79183f192b35f68fc7c633d3c790aae7b86ca57331212a7bb2f783131b752a4e1e71ef918469e6b944 k3s.confd" diff --git a/testing/k3s/k3s.confd b/testing/k3s/k3s.confd new file mode 100644 index 0000000000..18ad18b749 --- /dev/null +++ b/testing/k3s/k3s.confd @@ -0,0 +1,2 @@ +# k3s options +K3S_OPTS="" diff --git a/testing/k3s/k3s.initd b/testing/k3s/k3s.initd new file mode 100644 index 0000000000..41b1a00254 --- /dev/null +++ b/testing/k3s/k3s.initd @@ -0,0 +1,14 @@ +#!/sbin/openrc-run + +name="k3s" +command="/usr/bin/k3s" +command_args="$K3S_OPTS" +command_background="yes" + +start_stop_daemon_args="server" +pidfile="/run/k3s.pid" + +depend() { + need net + after firewall +} -- cgit v1.2.3