diff options
author | Erik Mackdanz <stasibear@gentoo.org> | 2015-11-12 09:55:51 -0600 |
---|---|---|
committer | Erik Mackdanz <stasibear@gentoo.org> | 2015-11-12 09:55:51 -0600 |
commit | 66f68e3f3714d92799ca86f72c61ac75e39991fb (patch) | |
tree | 446a597d8da15f39a29f00cf93078c6a37c175b4 /app-emulation/lxd/files | |
parent | net-analyzer/net-snmp: Add a hack to ensure /etc/mtab is found (bug #565136). (diff) | |
download | gentoo-66f68e3f3714d92799ca86f72c61ac75e39991fb.tar.gz gentoo-66f68e3f3714d92799ca86f72c61ac75e39991fb.tar.bz2 gentoo-66f68e3f3714d92799ca86f72c61ac75e39991fb.zip |
app-emulation/lxd: bump to 0.22
init script adds shutdown action (stop daemon + containers)
Package-Manager: portage-2.2.24
Diffstat (limited to 'app-emulation/lxd/files')
-rw-r--r-- | app-emulation/lxd/files/lxd-0.22-dont-go-get.patch | 18 | ||||
-rw-r--r-- | app-emulation/lxd/files/lxd-0.22-nc-binary-name.patch | 11 | ||||
-rw-r--r-- | app-emulation/lxd/files/lxd-0.22.confd | 27 | ||||
-rw-r--r-- | app-emulation/lxd/files/lxd-0.22.initd | 43 |
4 files changed, 99 insertions, 0 deletions
diff --git a/app-emulation/lxd/files/lxd-0.22-dont-go-get.patch b/app-emulation/lxd/files/lxd-0.22-dont-go-get.patch new file mode 100644 index 000000000000..1b229ea99cd5 --- /dev/null +++ b/app-emulation/lxd/files/lxd-0.22-dont-go-get.patch @@ -0,0 +1,18 @@ +--- Makefile.orig 2015-09-17 20:37:16.481867339 -0500 ++++ Makefile 2015-09-17 20:53:27.715800926 -0500 +@@ -12,15 +12,11 @@ + + .PHONY: default + default: +- -go get -t -v -d ./... +- -go get -t -v -d ./... + go install -v ./... + @echo "LXD built succesfuly" + + .PHONY: client + client: +- -go get -t -v -d ./... +- -go get -t -v -d ./... + go install -v ./lxc + @echo "LXD client built succesfuly" + diff --git a/app-emulation/lxd/files/lxd-0.22-nc-binary-name.patch b/app-emulation/lxd/files/lxd-0.22-nc-binary-name.patch new file mode 100644 index 000000000000..7373b66969b7 --- /dev/null +++ b/app-emulation/lxd/files/lxd-0.22-nc-binary-name.patch @@ -0,0 +1,11 @@ +--- lxd/rsync.go.orig 2015-11-11 20:54:37.402700202 -0600 ++++ lxd/rsync.go 2015-11-11 20:55:06.704698199 -0600 +@@ -91,7 +91,7 @@ + * command (i.e. the command to run on --server). However, we're + * hardcoding that at the other end, so we can just ignore it. + */ +- rsyncCmd := fmt.Sprintf("sh -c \"nc -U %s\"", f.Name()) ++ rsyncCmd := fmt.Sprintf("sh -c \"nc.openbsd -U %s\"", f.Name()) + cmd := exec.Command( + "rsync", + "-arvP", diff --git a/app-emulation/lxd/files/lxd-0.22.confd b/app-emulation/lxd/files/lxd-0.22.confd new file mode 100644 index 000000000000..3d553276a5e3 --- /dev/null +++ b/app-emulation/lxd/files/lxd-0.22.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-0.22.initd b/app-emulation/lxd/files/lxd-0.22.initd new file mode 100644 index 000000000000..65915f0ae516 --- /dev/null +++ b/app-emulation/lxd/files/lxd-0.22.initd @@ -0,0 +1,43 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DAEMON=/usr/sbin/lxd +PIDFILE=/run/lxd.pid + +extra_commands="shutdown" + +depend() { + need cgmanager + need net +} + +start() { + ebegin "Starting lxd server" + + start-stop-daemon --start \ + --pidfile ${PIDFILE} \ + --exec ${DAEMON} \ + --background \ + --make-pidfile \ + -- \ + ${LXD_OPTIONS} + + eend $? +} + +stop() { + ebegin "Stopping lxd server" + start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} + eend $? +} + +shutdown() { + ebegin "Stopping lxd server and containers" + if ${DAEMON} shutdown; then + /etc/init.d/lxd zap + rm -f ${PIDFILE} + fi + eend $? +} |