summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Geskey2020-02-04 20:23:39 +0000
committerMatt Geskey2020-02-04 20:25:06 +0000
commite0bc4b90f12a88000e16d937858e004d26540475 (patch)
treefaebd3c70e01c39db15d7e76e4884fa62bd8f4a8
downloadaur-e0bc4b90f12a88000e16d937858e004d26540475.tar.gz
Create kolide-laucher-git package
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD57
-rw-r--r--kolide-launcher.service12
-rw-r--r--launcher.conf5
4 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ac25d578b69
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = kolide-launcher-git
+ pkgdesc = osquery command and control
+ pkgver = v0.11.6.r2.g0cdd690
+ pkgrel = 1
+ url = https://www.kolide.co/
+ arch = x86_64
+ arch = i686
+ license = MIT
+ makedepends = go
+ depends = osquery
+ backup = etc/kolide/launcher.conf
+ source = kolide-launcher-git::git+https://github.com/kolide/launcher.git
+ source = launcher.conf
+ source = kolide-launcher.service
+ sha256sums = SKIP
+ sha256sums = 84e6c43518ae8e0fb8a94a954fcb7bb56df8f14d4adb7916913d2635f1bdac9c
+ sha256sums = 6b0f9ec82302b7cf52e1710668f2b84ccce84d917cefa2ed32557eb1673972dc
+
+pkgname = kolide-launcher-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9a9ba25ea02
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: Matt Geskey <matt@celtra.com>
+pkgname=kolide-launcher-git
+pkgver=v0.11.6.r2.g0cdd690
+pkgrel=1
+pkgdesc="osquery command and control"
+url="https://www.kolide.co/"
+arch=('x86_64' 'i686')
+license=('MIT')
+depends=('osquery')
+makedepends=('go')
+#install="kolide.install"
+source=("${pkgname}::git+https://github.com/kolide/launcher.git"
+ "launcher.conf"
+ "kolide-launcher.service"
+)
+backup=("etc/kolide/launcher.conf")
+sha256sums=("SKIP"
+ "84e6c43518ae8e0fb8a94a954fcb7bb56df8f14d4adb7916913d2635f1bdac9c"
+ "6b0f9ec82302b7cf52e1710668f2b84ccce84d917cefa2ed32557eb1673972dc"
+)
+
+pkgver() {
+ cd "${srcdir}/${pkgname}"
+
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+
+ install -m755 -d "${srcdir}/go/src/github.com/kolide"
+ ln -sf "${srcdir}/${pkgname}" "${srcdir}/go/src/github.com/kolide/launcher"
+}
+
+build() {
+ cd "${srcdir}/go/src/github.com/kolide/launcher"
+
+ mkdir -p build
+
+ export GOPATH="${srcdir}/go"
+ export PATH="${GOPATH}/bin:${PATH}"
+
+ make deps
+ make
+}
+
+package() {
+ cd "${srcdir}/go/src/github.com/kolide/launcher"
+
+ install -Dm755 "build/launcher" "${pkgdir}/usr/bin/kolide-launcher"
+ install -Dm755 "build/osquery-extension.ext" "${pkgdir}/usr/bin/osquery-extension.ext"
+ install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/kolide/LICENSE"
+
+ install -m755 -d "${pkgdir}/var/lib/kolide"
+ install -Dm644 "${srcdir}/launcher.conf" "${pkgdir}/etc/kolide/launcher.conf"
+ install -Dm644 "${srcdir}/kolide-launcher.service" "${pkgdir}/usr/lib/systemd/system/kolide-launcher.service"
+}
diff --git a/kolide-launcher.service b/kolide-launcher.service
new file mode 100644
index 00000000000..434cb92ab2e
--- /dev/null
+++ b/kolide-launcher.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=The Kolide Launcher
+After=network.service syslog.service
+
+[Service]
+ExecStart=/usr/bin/kolide-launcher \
+ -config /etc/kolide/launcher.conf
+Restart=on-failure
+RestartSec=3
+
+[Install]
+WantedBy=multi-user.target
diff --git a/launcher.conf b/launcher.conf
new file mode 100644
index 00000000000..e908a35ae15
--- /dev/null
+++ b/launcher.conf
@@ -0,0 +1,5 @@
+# A list of flags and arguments to be passed to kolide-launcher
+
+with_initial_runner
+root_directory /var/lib/kolide
+osqueryd_path /usr/bin/osqueryd