summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Mackdanz <stasibear@gentoo.org>2016-10-11 04:22:24 +0000
committerErik Mackdanz <stasibear@gentoo.org>2016-10-11 04:22:24 +0000
commit3280f0a52600244c29c9b6b943cb9f3455b387d8 (patch)
tree38070f92f3dd27bf0abc65d7cf148bdba072c86b /app-emulation/lxd/files
parentapp-emulation/lxc: Bump to 2.0.5 (diff)
downloadgentoo-3280f0a52600244c29c9b6b943cb9f3455b387d8.tar.gz
gentoo-3280f0a52600244c29c9b6b943cb9f3455b387d8.tar.bz2
gentoo-3280f0a52600244c29c9b6b943cb9f3455b387d8.zip
app-emulation/lxd: Bump to 2.4.1
Package-Manager: portage-2.3.1
Diffstat (limited to 'app-emulation/lxd/files')
-rw-r--r--app-emulation/lxd/files/lxd-2.4.1-dont-go-get.patch22
-rw-r--r--app-emulation/lxd/files/lxd-2.4.1.confd27
-rw-r--r--app-emulation/lxd/files/lxd-2.4.1.initd50
3 files changed, 99 insertions, 0 deletions
diff --git a/app-emulation/lxd/files/lxd-2.4.1-dont-go-get.patch b/app-emulation/lxd/files/lxd-2.4.1-dont-go-get.patch
new file mode 100644
index 000000000000..9402de57735a
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-2.4.1-dont-go-get.patch
@@ -0,0 +1,22 @@
+--- /Makefile.orig 2016-07-11 23:34:40.299664675 +0000
++++ /Makefile 2016-07-11 23:37:00.816018727 +0000
+@@ -12,19 +12,11 @@
+
+ .PHONY: default
+ default:
+- # Must a few times due to go get race
+- -go get -t -v -d ./...
+- -go get -t -v -d ./...
+- -go get -t -v -d ./...
+ go install -v $(DEBUG) ./...
+ @echo "LXD built successfully"
+
+ .PHONY: client
+ client:
+- # Must a few times due to go get race
+- -go get -t -v -d ./...
+- -go get -t -v -d ./...
+- -go get -t -v -d ./...
+ go install -v $(DEBUG) ./lxc
+ @echo "LXD client built successfully"
+
diff --git a/app-emulation/lxd/files/lxd-2.4.1.confd b/app-emulation/lxd/files/lxd-2.4.1.confd
new file mode 100644
index 000000000000..3d553276a5e3
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-2.4.1.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.4.1.initd b/app-emulation/lxd/files/lxd-2.4.1.initd
new file mode 100644
index 000000000000..c1aef377ab6f
--- /dev/null
+++ b/app-emulation/lxd/files/lxd-2.4.1.initd
@@ -0,0 +1,50 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON=/usr/sbin/lxd
+PIDFILE=/run/lxd.pid
+
+extra_commands="stopall"
+
+depend() {
+ need net
+ use lxcfs
+
+ # remove with 2.0 release
+ need cgmanager
+}
+
+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 $?
+}