From 70a9bc24e5140f3cbbc6f8e8cea8d61773391fae Mon Sep 17 00:00:00 2001 From: iaroki Date: Mon, 11 Dec 2017 14:37:40 +0200 Subject: [PATCH] New package: lxd-2.20 Closes: #9915 [via git-merge-pr] --- srcpkgs/lxd/INSTALL.msg | 15 +++++++++++++++ srcpkgs/lxd/files/lxd/run | 7 +++++++ srcpkgs/lxd/template | 23 +++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 srcpkgs/lxd/INSTALL.msg create mode 100755 srcpkgs/lxd/files/lxd/run create mode 100644 srcpkgs/lxd/template diff --git a/srcpkgs/lxd/INSTALL.msg b/srcpkgs/lxd/INSTALL.msg new file mode 100644 index 00000000000..082eea4c78a --- /dev/null +++ b/srcpkgs/lxd/INSTALL.msg @@ -0,0 +1,15 @@ +Add sub{u,g}ids for root to create unprivileged containers: + + $ echo "root:1000000:65536" | sudo tee -a /etc/subuid /etc/subgid + +Start lxd service: + + $ sudo ln -s /etc/sv/lxd /var/service + +Run LXD initialization: + + $ sudo lxd init + +To use lxd client your user must be added to the 'lxd' group: + + $ sudo usermod -aG lxd diff --git a/srcpkgs/lxd/files/lxd/run b/srcpkgs/lxd/files/lxd/run new file mode 100755 index 00000000000..6419fa0375a --- /dev/null +++ b/srcpkgs/lxd/files/lxd/run @@ -0,0 +1,7 @@ +#!/bin/sh +_systemd_cgrp="/sys/fs/cgroup/systemd" +if [ ! -d ${_systemd_cgrp} ]; then + mkdir ${_systemd_cgrp} +fi +mount -t cgroup -o none,name=systemd cgroup ${_systemd_cgrp} +exec lxd --group lxd 2>&1 diff --git a/srcpkgs/lxd/template b/srcpkgs/lxd/template new file mode 100644 index 00000000000..7319364939b --- /dev/null +++ b/srcpkgs/lxd/template @@ -0,0 +1,23 @@ +# Template file for 'lxd' +pkgname=lxd +version=2.20 +revision=1 +build_style=go +go_import_path="github.com/lxc/lxd" +go_package="${go_import_path}/lxd ${go_import_path}/lxc" +hostmakedepends="git bzr pkg-config" +makedepends="lxc-devel acl-devel" +depends="lxc liblxc acl acl-progs rsync squashfs-tools xz dnsmasq iptables" +short_desc="LXD is a next generation system container manager" +maintainer="iaroki " +license="Apache-2.0" +homepage="https://linuxcontainers.org/lxd" +distfiles="https://github.com/lxc/lxd/releases/download/lxd-${version}/lxd-${version}.tar.gz" +checksum=0b715c65787d256213cf7e1576f502383bf267fc4d06476fcce016ef3df89cac +system_groups="lxd" + +post_install() { + vinstall config/bash/lxd-client 644 /usr/share/bash-completion/completions lxd + vlicense COPYING LICENSE + vsv lxd +}