summaryrefslogtreecommitdiff
path: root/app-emulation/lxd/files
diff options
context:
space:
mode:
authorErik Mackdanz <stasibear@gentoo.org>2017-03-19 23:35:03 -0500
committerErik Mackdanz <stasibear@gentoo.org>2017-03-19 23:35:03 -0500
commit2f378df458a5f692fdee3e2c0a47f69fa7dd8376 (patch)
tree741c5262c87624785deafe51934a10d3dbf813e9 /app-emulation/lxd/files
parent9f80fde4a6f74ab738174bc77931b35ca9b9f28f (diff)
downloadgentoo-2f378df458a5f692fdee3e2c0a47f69fa7dd8376.tar.gz
gentoo-2f378df458a5f692fdee3e2c0a47f69fa7dd8376.tar.xz
app-emulation/lxd: version bump to 2.11
Gentoo-Bug: 612170 Gentoo-Bug: 610718 Gentoo-Bug: 609146 Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'app-emulation/lxd/files')
-rw-r--r--app-emulation/lxd/files/lxd-2.11-dont-go-get.patch16
-rw-r--r--app-emulation/lxd/files/lxd-2.11.confd27
-rw-r--r--app-emulation/lxd/files/lxd-2.11.initd46
-rw-r--r--app-emulation/lxd/files/lxd-2.11.service10
4 files changed, 99 insertions, 0 deletions
diff --git a/app-emulation/lxd/files/lxd-2.11-dont-go-get.patch b/app-emulation/lxd/files/lxd-2.11-dont-go-get.patch
new file mode 100644
index 00000000000..8acd93724a5
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-2.11-dont-go-get.patch
@@ -0,0 +1,16 @@
+--- /Makefile.orig 2016-07-11 23:34:40.299664675 +0000
++++ /Makefile 2016-07-11 23:37:00.816018727 +0000
+@@ -13,13 +13,11 @@
+
+ .PHONY: default
+ default:
+- go get -t -v -d ./...
+ go install -v $(TAGS) $(DEBUG) ./...
+ @echo "LXD built successfully"
+
+ .PHONY: client
+ client:
+- go get -t -v -d ./...
+ go install -v $(TAGS) $(DEBUG) ./lxc
+ @echo "LXD client built successfully"
+
diff --git a/app-emulation/lxd/files/lxd-2.11.confd b/app-emulation/lxd/files/lxd-2.11.confd
new file mode 100644
index 00000000000..3d553276a5e
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-2.11.confd
@@ -0,0 +1,27 @@
+# Group which owns the shared socket
+LXD_OPTIONS+=" --group lxd"
+
+
+
+# Enable cpu profiling into the specified file
+#LXD_OPTIONS+=" --cpuprofile /tmp/lxc_cpu_profile"
+
+# Enable memory profiling into the specified file
+#LXD_OPTIONS+=" --memprofile /tmp/lxc_mem_profile"
+
+
+
+# Enables debug mode
+#LXD_OPTIONS+=" --debug"
+
+# For debugging, print a complete stack trace every n seconds
+#LXD_OPTIONS+=" --print-goroutines-every 5"
+
+# Enables verbose mode
+#LXD_OPTIONS+=" -v"
+
+# Logfile to log to
+#LXD_OPTIONS+=" --logfile /var/log/lxd/lxd.log"
+
+# Enables syslog logging
+#LXD_OPTIONS+=" --syslog"
diff --git a/app-emulation/lxd/files/lxd-2.11.initd b/app-emulation/lxd/files/lxd-2.11.initd
new file mode 100644
index 00000000000..be1fb167004
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-2.11.initd
@@ -0,0 +1,46 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=/usr/sbin/lxd
+PIDFILE=/run/lxd.pid
+
+extra_commands="stopall"
+
+depend() {
+ need net
+ use lxcfs
+}
+
+start() {
+ ebegin "Starting lxd server"
+
+ start-stop-daemon --start \
+ --pidfile ${PIDFILE} \
+ --exec ${DAEMON} \
+ --background \
+ --make-pidfile \
+ -- \
+ ${LXD_OPTIONS}
+
+ eend $?
+}
+
+stop() {
+ if [ $RC_GOINGDOWN = YES ] || [ $RC_REBOOT = YES ]; then
+ stopall
+ else
+ ebegin "Stopping lxd service (but not containers)"
+ start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+ eend $?
+ fi
+}
+
+stopall() {
+ ebegin "Stopping lxd service and containers"
+ if "${DAEMON}" shutdown; then
+ /etc/init.d/lxd zap
+ rm -f ${PIDFILE}
+ fi
+ eend $?
+}
diff --git a/app-emulation/lxd/files/lxd-2.11.service b/app-emulation/lxd/files/lxd-2.11.service
new file mode 100644
index 00000000000..d00635fbcdd
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-2.11.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Container hypervisor based on LXC
+
+[Service]
+ExecStart=/usr/sbin/lxd --group lxd
+KillMode=process
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target