From 1ab37655cd44110d0d910168d9ba7b80115c3759 Mon Sep 17 00:00:00 2001 From: Erik Mackdanz Date: Sun, 28 Feb 2016 12:03:18 -0600 Subject: app-emulation/lxd: Version bump to beta 4 Removes dep on bridge-utils (uses iproute2 instead) Package-Manager: portage-2.2.27 --- .../lxd/files/lxd-2.0.0_beta4-dont-go-get.patch | 20 +++++++++ .../lxd/files/lxd-2.0.0_beta4-nc-binary-name.patch | 11 +++++ app-emulation/lxd/files/lxd-2.0.0_beta4.confd | 27 ++++++++++++ app-emulation/lxd/files/lxd-2.0.0_beta4.initd | 50 ++++++++++++++++++++++ 4 files changed, 108 insertions(+) create mode 100644 app-emulation/lxd/files/lxd-2.0.0_beta4-dont-go-get.patch create mode 100644 app-emulation/lxd/files/lxd-2.0.0_beta4-nc-binary-name.patch create mode 100644 app-emulation/lxd/files/lxd-2.0.0_beta4.confd create mode 100644 app-emulation/lxd/files/lxd-2.0.0_beta4.initd (limited to 'app-emulation/lxd/files') diff --git a/app-emulation/lxd/files/lxd-2.0.0_beta4-dont-go-get.patch b/app-emulation/lxd/files/lxd-2.0.0_beta4-dont-go-get.patch new file mode 100644 index 000000000000..d2e622ec73b7 --- /dev/null +++ b/app-emulation/lxd/files/lxd-2.0.0_beta4-dont-go-get.patch @@ -0,0 +1,20 @@ +--- Makefile.orig 2016-02-19 00:16:40.720102639 +0000 ++++ Makefile 2016-02-19 00:18:10.886096473 +0000 +@@ -12,17 +12,11 @@ + + .PHONY: default + default: +- # Must run twice due to go get race +- -go get -t -v -d ./... +- -go get -t -v -d ./... + go install -v $(DEBUG) ./... + @echo "LXD built successfully" + + .PHONY: client + client: +- # Must run twice due to go get race +- -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.0.0_beta4-nc-binary-name.patch b/app-emulation/lxd/files/lxd-2.0.0_beta4-nc-binary-name.patch new file mode 100644 index 000000000000..7373b66969b7 --- /dev/null +++ b/app-emulation/lxd/files/lxd-2.0.0_beta4-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-2.0.0_beta4.confd b/app-emulation/lxd/files/lxd-2.0.0_beta4.confd new file mode 100644 index 000000000000..3d553276a5e3 --- /dev/null +++ b/app-emulation/lxd/files/lxd-2.0.0_beta4.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.0.0_beta4.initd b/app-emulation/lxd/files/lxd-2.0.0_beta4.initd new file mode 100644 index 000000000000..ec23258c19d1 --- /dev/null +++ b/app-emulation/lxd/files/lxd-2.0.0_beta4.initd @@ -0,0 +1,50 @@ +#!/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="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 $? +} -- cgit v1.2.3