diff options
author | Gergely Imreh | 2017-10-13 13:20:33 +0100 |
---|---|---|
committer | Gergely Imreh | 2017-10-13 13:20:33 +0100 |
commit | 3372d40c94639befef623fffce5f6f2c02705101 (patch) | |
tree | 611c8c462e3627bc691470cf4573b4091d11e1c4 | |
download | aur-3372d40c94639befef623fffce5f6f2c02705101.tar.gz |
initial release: 17.06.rev1
-rw-r--r-- | .SRCINFO | 41 | ||||
-rw-r--r-- | 80-balena.rules | 3 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | balena.service | 34 | ||||
-rw-r--r-- | balena.socket | 12 | ||||
-rw-r--r-- | balena.sysusers | 2 |
6 files changed, 147 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..3ddf92de0c50 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,41 @@ +# Generated by mksrcinfo v8 +# Fri Oct 13 12:12:28 UTC 2017 +pkgbase = balena + pkgdesc = Pack, ship and run any application as a lightweight container + pkgver = 17.06.rev1 + pkgrel = 1 + epoch = 1 + url = https://www.balena.io/ + arch = x86_64 + arch = i686 + license = Apache + makedepends = git + makedepends = go + makedepends = btrfs-progs + makedepends = cmake + makedepends = systemd + depends = glibc + depends = bridge-utils + depends = iproute2 + depends = device-mapper + depends = sqlite + depends = libsystemd + depends = libseccomp + depends = libtool + optdepends = btrfs-progs: btrfs backend support + optdepends = lxc: lxc backend support + options = !strip + options = !buildflags + source = git+https://github.com/resin-os/balena.git#tag=17.06-rev1 + source = balena.service + source = balena.socket + source = balena.sysusers + source = 80-balena.rules + sha256sums = SKIP + sha256sums = 34297f867f86df0f367539ab361839c41d4a56e28ac04608cd5f4fc79320d119 + sha256sums = 2e844d773dc497cb040f14c1624ffa609294ad8ed8c895e6ba55b29c6e8f4f15 + sha256sums = 56b51c714f8a2d8ed3a0d6efec89b4783210dc1fca314ee193d33cc198c9b365 + sha256sums = 4b8339112920745fe94611dacadd41865fef35349d57f12b347287b54862dab9 + +pkgname = balena + diff --git a/80-balena.rules b/80-balena.rules new file mode 100644 index 000000000000..171d6dea79e1 --- /dev/null +++ b/80-balena.rules @@ -0,0 +1,3 @@ +# hide docker's loopback devices from udisks, and thus from user desktops +SUBSYSTEM=="block", ENV{DM_NAME}=="balena-*", ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1" +SUBSYSTEM=="block", DEVPATH=="/devices/virtual/block/loop*", ATTR{loop/backing_file}=="/var/lib/balena/*", ENV{UDISKS_PRESENTATION_HIDE}="1", ENV{UDISKS_IGNORE}="1" diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e1817bba85a0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# $Id$ +# Maintainer: Gegrely Imreh <imrehg@gmail.com> + +pkgname=balena +pkgver=17.06.rev1 +pkgrel=1 +epoch=1 +pkgdesc='Pack, ship and run any application as a lightweight container' +arch=('x86_64' 'i686') +url='https://www.balena.io/' +license=('Apache') +depends=('glibc' 'bridge-utils' 'iproute2' 'device-mapper' 'sqlite' 'libsystemd' + 'libseccomp' 'libtool') +makedepends=('git' 'go' 'btrfs-progs' 'cmake' 'systemd') +optdepends=('btrfs-progs: btrfs backend support' + 'lxc: lxc backend support') +# don't strip binaries! A sha1 is used to check binary consistency. +options=('!strip' '!buildflags') +# Use exact commit version from Dockerfile for runc and containerd until 1.0.0 +# https://github.com/docker/containerd/issues/299#issuecomment-240745119 +# see commit in hack/dockerfile/binaries-commits +# https://github.com/docker/docker-ce/blob/master/components/engine/hack/dockerfile/binaries-commits +source=("git+https://github.com/resin-os/balena.git#tag=17.06-rev1" + "balena.service" + "balena.socket" + "balena.sysusers" + "80-balena.rules") +sha256sums=('SKIP' + '34297f867f86df0f367539ab361839c41d4a56e28ac04608cd5f4fc79320d119' + '2e844d773dc497cb040f14c1624ffa609294ad8ed8c895e6ba55b29c6e8f4f15' + '56b51c714f8a2d8ed3a0d6efec89b4783210dc1fca314ee193d33cc198c9b365' + '4b8339112920745fe94611dacadd41865fef35349d57f12b347287b54862dab9') + +build() { + cd "${srcdir}/balena/" + echo $(git describe --tags --always) > VERSION + ./build.sh +} + +package() { + install -Dm755 "${srcdir}/balena/bundles/latest/dynbinary-balena/balena" "${pkgdir}/usr/bin/balena" + symlinks=(balenad balena-containerd balena-containerd-ctr balena-containerd-shim balena-proxy balena-runc) + for s in "${symlinks[@]}"; do + ln -s "balena" "${pkgdir}/usr/bin/${s}" + done + + install -Dm644 "${srcdir}/balena.service" \ + "$pkgdir/usr/lib/systemd/system/balena.service" + install -Dm644 "${srcdir}/balena.socket" \ + "$pkgdir/usr/lib/systemd/system/balena.socket" + install -Dm644 "${srcdir}/80-balena.rules" \ + "$pkgdir/usr/lib/udev/rules.d/80-balena.rules" + install -Dm644 "$srcdir/balena.sysusers" \ + "$pkgdir/usr/lib/sysusers.d/balena.conf" +} diff --git a/balena.service b/balena.service new file mode 100644 index 000000000000..7b62dcc5169a --- /dev/null +++ b/balena.service @@ -0,0 +1,34 @@ +[Unit] +Description=Balena Application Container Engine +Documentation=https://www.balena.io +After=network-online.target balena.socket firewalld.service +Wants=network-online.target +Requires=balena.socket + +[Service] +Type=notify +# the default is not to use systemd for cgroups because the delegate issues still +# exists and systemd currently does not support the cgroup feature set required +# for containers run by balena +ExecStart=/usr/bin/balenad -H fd:// +ExecReload=/bin/kill -s HUP $MAINPID +LimitNOFILE=1048576 +# Having non-zero Limit*s causes performance problems due to accounting overhead +# in the kernel. We recommend using cgroups to do container-local accounting. +LimitNPROC=infinity +LimitCORE=infinity +# Uncomment TasksMax if your systemd version supports it. +# Only systemd 226 and above support this version. +#TasksMax=infinity +TimeoutStartSec=0 +# set delegate yes so that systemd does not reset the cgroups of balena containers +Delegate=yes +# kill only the balena process, not all processes in the cgroup +KillMode=process +# restart the balena process if it exits prematurely +Restart=on-failure +StartLimitBurst=3 +StartLimitInterval=60s + +[Install] +WantedBy=multi-user.target diff --git a/balena.socket b/balena.socket new file mode 100644 index 000000000000..690525b6e92c --- /dev/null +++ b/balena.socket @@ -0,0 +1,12 @@ +[Unit] +Description=Balena Socket for the API +PartOf=balena.service + +[Socket] +ListenStream=/var/run/balena.sock +SocketMode=0660 +SocketUser=root +SocketGroup=balena + +[Install] +WantedBy=sockets.target diff --git a/balena.sysusers b/balena.sysusers new file mode 100644 index 000000000000..e43ce1f768be --- /dev/null +++ b/balena.sysusers @@ -0,0 +1,2 @@ +# create balena group (FS#38029, similar to docker) +g balena - - |