summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVirgil Dupras <hsoft@hardcoded.net>2017-08-14 20:26:33 -0400
committerMichał Górny <mgorny@gentoo.org>2017-08-16 17:20:46 +0200
commit382e1758c94118199246542e219d51aa1fa00603 (patch)
tree0a219c0ccc737ea99012e3e6196fb6d5e9996c32 /app-emulation
parentapp-i18n/libchewing: new upstream release (diff)
downloadgentoo-382e1758c94118199246542e219d51aa1fa00603.tar.gz
gentoo-382e1758c94118199246542e219d51aa1fa00603.tar.bz2
gentoo-382e1758c94118199246542e219d51aa1fa00603.zip
app-emulation/lxd: remove old versions
Closes: https://github.com/gentoo/gentoo/pull/5422 Package-Manager: Portage-2.3.6, Repoman-2.3.1
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/lxd/Manifest3
-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
-rw-r--r--app-emulation/lxd/files/lxd-2.8-dont-go-get.patch22
-rw-r--r--app-emulation/lxd/files/lxd-2.8.confd27
-rw-r--r--app-emulation/lxd/files/lxd-2.8.initd49
-rw-r--r--app-emulation/lxd/files/lxd.service12
-rw-r--r--app-emulation/lxd/lxd-2.11.ebuild217
-rw-r--r--app-emulation/lxd/lxd-2.8.ebuild198
11 files changed, 0 insertions, 627 deletions
diff --git a/app-emulation/lxd/Manifest b/app-emulation/lxd/Manifest
index 48e3e54919b8..f3db60326694 100644
--- a/app-emulation/lxd/Manifest
+++ b/app-emulation/lxd/Manifest
@@ -22,7 +22,4 @@ DIST github.com-olekukonko-tablewriter-febf2d34b54a69ce7530036c7503b1c9fbfdf0bb.
DIST github.com-pborman-uuid-1b00554d822231195d1babd97ff4a781231955c9.tar.gz 12808 SHA256 54da54d54a914e569fb2b31132e0c458ece12d7cd70c14a33adf95731e07afe7 SHA512 c332bd39781e7a3bd7125bbf26e62da2aca24bb89975491a4165a17580f3ffb99587e4620a9c9c17afff5d34865ae0b86065e1516ca325d0edc4dd84be269283 WHIRLPOOL fb245c1056abe69f7e3fa5a4ded80111777af2fdc107dee3fc36faa25bea8394eb30fda6000075cbdf124cb01c4165ed08fb154d70c30c8a1812988e2bd86619
DIST github.com-stretchr-testify-f6abca593680b2315d2075e0f5e2a9751e3f431a.tar.gz 94237 SHA256 91f64ae4d5093511464b5ddce34b88b0134219a0a17d638fe148b6cb9f9e261a SHA512 3aaa245f70dcee49b08e5f677dfa2137b00cc0cbc18cd52d773722b951ec579e3f4e146f951de51973630488a9d9efc7c54462842c6fe5987cc099a44f04a03f WHIRLPOOL 3e55426a5f3086c3e46652da4f5bebf214ae620950556b6659b48cad01e51781d836a3c1ea9c692dc59b4a3d4862e16cec1acffd31a0b4853f97c4f67c22c2c8
DIST github.com-syndtr-gocapability-e7cb7fa329f456b3855136a2642b197bad7366ba.tar.gz 9894 SHA256 1c90570f690a5b753633bce84097942021893f180c9d27c0b83f7a1bddaf59d9 SHA512 ee2de5568b76b87723e80e081e16094093f09a6be68dd0920793e007d4b705808ec1eac7a15b4c0ce7ed20aff04978f4ade264ab5bf5bdc5e2fdc46db2f4116c WHIRLPOOL ce1a13e5374248ffccaa613d399447d619ad94156f6ebf198d9e63019bd698496d67770ef520b802c59451ff9ad95d9fd789e8c9f758d1df553e2432c3b29289
-DIST go-flags-460c7bb0abd6e927f2767cadc91aa6ef776a98b4.tar.gz 54792 SHA256 382dbeca4e436aa1717c9a413fc53197eb3f94fbbb0b2ba3b0d1a405c9262504 SHA512 d8c748a2617d0997ad69d64530289dc53a310381ba101b942d3e7df04ef9fd79e1d26879c485cb6e8e5c710f42411dbe5b4b157cfd36a511a19c88d336f34fea WHIRLPOOL fb23a71928c1d3d1cdbb1fecaadfed843b986d2f76a9ca57b171d80051f81a886ec7d8b292b0e054d69ed9e2fd55c1f544767332334655cd01a6c83633d6e711
-DIST lxd-2.11.tar.bz2 2407968 SHA256 829643811a711c8e3c118274d517091b4fbd4701b760e46d7f53fcc4d356455d SHA512 8269a20e0c0c0f3a3a247af15fcda3aa764cd2353d8a7aa9183646dbf19a080ce09bf31ff91a9faca3eda494460a788deabdb145a59c2aa1861f2df89c43294b WHIRLPOOL ba12b4c41969e17b5f9beaa7908ca7be18d3ce35ae27c762a556fe6d59f48962cf0ccaecc512887d40338e6e26ccdc2cdf6c89d87fd1b2028fb5e04f3a74b639
DIST lxd-2.14.tar.gz 629982 SHA256 0ccf98257482458ff417c8af141a1f726fe7e696b7ab8b089ed1ee741280b2b8 SHA512 a1b6d7eb055a29ba3c28f9184e6dbac5f279332a6445347bbf8f946ab23b0afb353ac146b379f22922fe678ce034c18dc9d5d2f2dd7704b8cce1730c29dfa9c3 WHIRLPOOL 3483b15f7e09e8212fa5b646e5fc6be305b48e6cfcad5538ff9a4967820928b3f87931ca38fc4787ecab67216d2c876476880551ce56e3ed0c080a7b769e2823
-DIST lxd-2.8.tar.bz2 2317466 SHA256 57f08bd3c26ea4f32453aa163b502301ae0a80716d6de56b069eeebb35850011 SHA512 fdf906add25ab0b79ea7669ad569873a256f0cfc220ed816b0dc2c9b1e525a19e2606678d90d50c4f548b4322a2896d4c12069337f9571a9a4f6646fb6f673a5 WHIRLPOOL 049f3664e60e8f6fd98c8403db31db6e1dd5f6efed2e74b9007f9f99a4b337e9f58852253d226fc294c4bc964dd6d5d732a8a386606f206a74d83a32470dc1d3
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
deleted file mode 100644
index 8acd93724a5a..000000000000
--- a/app-emulation/lxd/files/lxd-2.11-dont-go-get.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- /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
deleted file mode 100644
index 3d553276a5e3..000000000000
--- a/app-emulation/lxd/files/lxd-2.11.confd
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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
deleted file mode 100644
index be1fb1670047..000000000000
--- a/app-emulation/lxd/files/lxd-2.11.initd
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/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
deleted file mode 100644
index d00635fbcdd9..000000000000
--- a/app-emulation/lxd/files/lxd-2.11.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=Container hypervisor based on LXC
-
-[Service]
-ExecStart=/usr/sbin/lxd --group lxd
-KillMode=process
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
diff --git a/app-emulation/lxd/files/lxd-2.8-dont-go-get.patch b/app-emulation/lxd/files/lxd-2.8-dont-go-get.patch
deleted file mode 100644
index 9402de57735a..000000000000
--- a/app-emulation/lxd/files/lxd-2.8-dont-go-get.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- /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.8.confd b/app-emulation/lxd/files/lxd-2.8.confd
deleted file mode 100644
index 3d553276a5e3..000000000000
--- a/app-emulation/lxd/files/lxd-2.8.confd
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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.8.initd b/app-emulation/lxd/files/lxd-2.8.initd
deleted file mode 100644
index 42e764aa3f4d..000000000000
--- a/app-emulation/lxd/files/lxd-2.8.initd
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/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
-
- # 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 $?
-}
diff --git a/app-emulation/lxd/files/lxd.service b/app-emulation/lxd/files/lxd.service
deleted file mode 100644
index a40905190a50..000000000000
--- a/app-emulation/lxd/files/lxd.service
+++ /dev/null
@@ -1,12 +0,0 @@
-[Unit]
-Description=Container hypervisor based on LXC
-After=cgmanager.service
-Requires=cgmanager.service
-
-[Service]
-ExecStart=/usr/sbin/lxd --group lxd
-KillMode=process
-Restart=on-failure
-
-[Install]
-WantedBy=multi-user.target
diff --git a/app-emulation/lxd/lxd-2.11.ebuild b/app-emulation/lxd/lxd-2.11.ebuild
deleted file mode 100644
index 16dace1d2ba5..000000000000
--- a/app-emulation/lxd/lxd-2.11.ebuild
+++ /dev/null
@@ -1,217 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Fast, dense and secure container management"
-HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
-EGO_PN_PARENT="github.com/lxc"
-EGO_PN="${EGO_PN_PARENT}/lxd"
-GO_FLAGS_COMMIT="460c7bb0abd6e927f2767cadc91aa6ef776a98b4"
-
-# The source is repackaged using a script at:
-# https://dev.gentoo.org/~stasibear/lxd_repackage.py
-# This is necessary because go's native package management assumes
-# that a build starts with checking out many git repositories, often
-# from HEAD. This provides no way to build the same code repeatably,
-# and anyway portage requires that fetching is only done from SRC_URI.
-# The only sane alternative I've seen is in the consul ebuild, which
-# is more transparent but raises other questions.
-SRC_URI="https://dev.gentoo.org/~stasibear/distfiles/${P}.tar.bz2
- https://github.com/jessevdk/go-flags/archive/${GO_FLAGS_COMMIT}.tar.gz ->
- go-flags-${GO_FLAGS_COMMIT}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-
-PLOCALES="de el fr ja nl ru"
-IUSE="+daemon nls test"
-
-# IUSE and PLOCALES must be defined before l10n inherited
-inherit bash-completion-r1 golang-build l10n linux-info systemd user vcs-snapshot
-
-DEPEND="
- >=dev-lang/go-1.7.1
- dev-go/go-crypto
- dev-go/go-net
- dev-libs/protobuf
- nls? ( sys-devel/gettext )
- test? (
- app-misc/jq
- dev-db/sqlite
- net-misc/curl
- sys-devel/gettext
- )
-"
-
-RDEPEND="
- daemon? (
- app-arch/xz-utils
- app-emulation/lxc[seccomp]
- net-dns/dnsmasq[dhcp,ipv6]
- net-misc/rsync[xattr]
- sys-apps/iproute2[ipv6]
- sys-fs/squashfs-tools
- virtual/acl
- )
-"
-
-CONFIG_CHECK="
- ~BRIDGE
- ~DUMMY
- ~IP6_NF_NAT
- ~IP6_NF_TARGET_MASQUERADE
- ~IPV6
- ~IP_NF_NAT
- ~IP_NF_TARGET_MASQUERADE
- ~MACVLAN
- ~NETFILTER_XT_MATCH_COMMENT
- ~NET_IPGRE
- ~NET_IPGRE_DEMUX
- ~NET_IPIP
- ~NF_NAT_MASQUERADE_IPV4
- ~NF_NAT_MASQUERADE_IPV6
- ~VXLAN
-"
-
-ERROR_BRIDGE="BRIDGE: needed for network commands"
-ERROR_DUMMY="DUMMY: needed for network commands"
-ERROR_IP6_NF_NAT="IP6_NF_NAT: needed for network commands"
-ERROR_IP6_NF_TARGET_MASQUERADE="IP6_NF_TARGET_MASQUERADE: needed for network commands"
-ERROR_IPV6="IPV6: needed for network commands"
-ERROR_IP_NF_NAT="IP_NF_NAT: needed for network commands"
-ERROR_IP_NF_TARGET_MASQUERADE="IP_NF_TARGET_MASQUERADE: needed for network commands"
-ERROR_MACVLAN="MACVLAN: needed for network commands"
-ERROR_NETFILTER_XT_MATCH_COMMENT="NETFILTER_XT_MATCH_COMMENT: needed for network commands"
-ERROR_NET_IPGRE="NET_IPGRE: needed for network commands"
-ERROR_NET_IPGRE_DEMUX="NET_IPGRE_DEMUX: needed for network commands"
-ERROR_NET_IPIP="NET_IPIP: needed for network commands"
-ERROR_NF_NAT_MASQUERADE_IPV4="NF_NAT_MASQUERADE_IPV4: needed for network commands"
-ERROR_NF_NAT_MASQUERADE_IPV6="NF_NAT_MASQUERADE_IPV6: needed for network commands"
-ERROR_VXLAN="VXLAN: needed for network commands"
-
-PATCHES=("${FILESDIR}/${P}-dont-go-get.patch")
-
-# KNOWN ISSUES:
-# - Translations may not work. I've been unsuccessful in forcing
-# localized output. Anyway, upstream (Canonical) doesn't install the
-# message files.
-
-src_prepare() {
- cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
-
- default_src_prepare
-
- tmpgoroot="${T}/goroot"
- mkdir -p "$tmpgoroot" || die "Failed to create temporary GOROOT"
- cp -sR "$(get_golibdir_gopath)"/* "${tmpgoroot}" || die "Failed to copy files to temporary GOROOT"
-
- # Warn on unhandled locale changes
- l10n_find_plocales_changes po "" .po
-
- mkdir -p "${S}/src/${EGO_PN}/vendor/github.com/jessevdk"
- mv "${WORKDIR}/go-flags-${GO_FLAGS_COMMIT}" \
- "${S}/src/${EGO_PN}/vendor/github.com/jessevdk/go-flags" || \
- die "Failed to move go-flags"
-
- # gopkg.in/lxc/go-lxc.v2/examples/clone.go:17: too many errors
- rm -rf "${S}/src/gopkg.in/lxc/go-lxc.v2/examples" || die
-
- while read -r -d ''; do
- [[ -d ${REPLY} ]] || continue # parent moved already
- [[ ${REPLY} =~ ^${S}/src/${EGO_PN%/*}(/|$) ]] && continue
- mkdir -p "$(dirname "${S}/src/${EGO_PN}/vendor/${REPLY#${S}/src}")"
- mv "${REPLY}" "${S}/src/${EGO_PN}/vendor/${REPLY#${S}/src}" || \
- die "Failed to move ${REPLY##*/}"
- done < <(find "${S}/src" -mindepth 2 -maxdepth 3 -type d -print0)
- find "${S}/src" -maxdepth 3 -type d -empty -delete
-}
-
-src_compile() {
- golang-build_src_compile
-
- cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
-
- tmpgoroot="${T}/goroot"
- if use daemon; then
- # Build binaries
- GOPATH="${S}:${tmpgoroot}" emake
- else
- # build client tool
- GOPATH="${S}:${tmpgoroot}" emake client
- fi
-
- use nls && emake build-mo
-}
-
-src_test() {
- if use daemon; then
- # Go native tests should succeed
- golang-build_src_test
- fi
-}
-
-src_install() {
- # Installs all src,pkg to /usr/lib/go-gentoo
- golang-build_src_install
-
- cd "${S}"
- dobin bin/lxc
- if use daemon; then
- dosbin bin/lxd
- dobin bin/fuidshift
- fi
-
- cd "src/${EGO_PN}"
-
- if use nls; then
- for lingua in ${PLOCALES}; do
- if use linguas_${lingua}; then
- domo po/${lingua}.mo
- fi
- done
- fi
-
- if use daemon; then
- newinitd "${FILESDIR}"/${P}.initd lxd
- newconfd "${FILESDIR}"/${P}.confd lxd
-
- systemd_dounit "${FILESDIR}"/${P}.service
- fi
-
- newbashcomp config/bash/lxd-client lxc
-
- dodoc AUTHORS CONTRIBUTING.md README.md doc/*
-}
-
-pkg_postinst() {
- einfo
- einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
- einfo "including a Quick Start."
-
- # The messaging below only applies to daemon installs
- use daemon || return 0
-
- # The control socket will be owned by (and writeable by) this group.
- enewgroup lxd
-
- # Ubuntu also defines an lxd user but it appears unused (the daemon
- # must run as root)
-
- einfo
- einfo "Though not strictly required, some features are enabled at run-time"
- einfo "when the relevant helper programs are detected:"
- einfo "- sys-apps/apparmor"
- einfo "- sys-fs/btrfs-progs"
- einfo "- sys-fs/lvm2"
- einfo "- sys-fs/lxcfs"
- einfo "- sys-fs/zfs"
- einfo "- sys-process/criu"
- einfo
- einfo "Since these features can't be disabled at build-time they are"
- einfo "not USE-conditional."
- einfo
- einfo "Networks with bridge.mode=fan are unsupported due to requiring"
- einfo "a patched kernel and iproute2."
-}
diff --git a/app-emulation/lxd/lxd-2.8.ebuild b/app-emulation/lxd/lxd-2.8.ebuild
deleted file mode 100644
index b3bf035810ff..000000000000
--- a/app-emulation/lxd/lxd-2.8.ebuild
+++ /dev/null
@@ -1,198 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DESCRIPTION="Fast, dense and secure container management"
-HOMEPAGE="https://linuxcontainers.org/lxd/introduction/"
-EGO_PN_PARENT="github.com/lxc"
-EGO_PN="${EGO_PN_PARENT}/lxd"
-
-# The source is repackaged using a script at:
-# https://dev.gentoo.org/~stasibear/lxd_repackage.py
-# This is necessary because go's native package management assumes
-# that a build starts with checking out many git repositories, often
-# from HEAD. This provides no way to build the same code repeatably,
-# and anyway portage requires that fetching is only done from SRC_URI.
-# The only sane alternative I've seen is in the consul ebuild, which
-# is more transparent but raises other questions.
-SRC_URI="https://dev.gentoo.org/~stasibear/distfiles/${P}.tar.bz2"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64"
-
-PLOCALES="de el fr ja"
-IUSE="+daemon nls test"
-
-# IUSE and PLOCALES must be defined before l10n inherited
-inherit bash-completion-r1 golang-build l10n linux-info systemd user vcs-snapshot
-
-DEPEND="
- >=dev-lang/go-1.7.1
- dev-go/go-crypto
- dev-go/go-net
- dev-libs/protobuf
- nls? ( sys-devel/gettext )
- test? (
- app-misc/jq
- dev-db/sqlite
- net-misc/curl
- sys-devel/gettext
- )
-"
-
-RDEPEND="
- daemon? (
- app-admin/cgmanager
- app-arch/xz-utils
- app-emulation/lxc[cgmanager,seccomp]
- net-dns/dnsmasq[dhcp,ipv6]
- net-misc/rsync[xattr]
- sys-apps/iproute2[ipv6]
- sys-fs/squashfs-tools
- virtual/acl
- )
-"
-
-CONFIG_CHECK="
- ~BRIDGE
- ~DUMMY
- ~IP6_NF_NAT
- ~IP6_NF_TARGET_MASQUERADE
- ~IPV6
- ~IP_NF_NAT
- ~IP_NF_TARGET_MASQUERADE
- ~MACVLAN
- ~NETFILTER_XT_MATCH_COMMENT
- ~NET_IPGRE
- ~NET_IPGRE_DEMUX
- ~NET_IPIP
- ~NF_NAT_MASQUERADE_IPV4
- ~NF_NAT_MASQUERADE_IPV6
- ~VXLAN
-"
-
-ERROR_BRIDGE="BRIDGE: needed for network commands"
-ERROR_DUMMY="DUMMY: needed for network commands"
-ERROR_IP6_NF_NAT="IP6_NF_NAT: needed for network commands"
-ERROR_IP6_NF_TARGET_MASQUERADE="IP6_NF_TARGET_MASQUERADE: needed for network commands"
-ERROR_IPV6="IPV6: needed for network commands"
-ERROR_IP_NF_NAT="IP_NF_NAT: needed for network commands"
-ERROR_IP_NF_TARGET_MASQUERADE="IP_NF_TARGET_MASQUERADE: needed for network commands"
-ERROR_MACVLAN="MACVLAN: needed for network commands"
-ERROR_NETFILTER_XT_MATCH_COMMENT="NETFILTER_XT_MATCH_COMMENT: needed for network commands"
-ERROR_NET_IPGRE="NET_IPGRE: needed for network commands"
-ERROR_NET_IPGRE_DEMUX="NET_IPGRE_DEMUX: needed for network commands"
-ERROR_NET_IPIP="NET_IPIP: needed for network commands"
-ERROR_NF_NAT_MASQUERADE_IPV4="NF_NAT_MASQUERADE_IPV4: needed for network commands"
-ERROR_NF_NAT_MASQUERADE_IPV6="NF_NAT_MASQUERADE_IPV6: needed for network commands"
-ERROR_VXLAN="VXLAN: needed for network commands"
-
-PATCHES=("${FILESDIR}/${P}-dont-go-get.patch")
-
-# KNOWN ISSUES:
-# - Translations may not work. I've been unsuccessful in forcing
-# localized output. Anyway, upstream (Canonical) doesn't install the
-# message files.
-
-src_prepare() {
- cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
-
- default_src_prepare
-
- tmpgoroot="${T}/goroot"
- mkdir -p "$tmpgoroot" || die "Failed to create temporary GOROOT"
- cp -sR "$(get_golibdir_gopath)"/* "${tmpgoroot}" || die "Failed to copy files to temporary GOROOT"
-
- # Warn on unhandled locale changes
- l10n_find_plocales_changes po "" .po
-}
-
-src_compile() {
- golang-build_src_compile
-
- cd "${S}/src/${EGO_PN}" || die "Failed to change to deep src dir"
-
- tmpgoroot="${T}/goroot"
- if use daemon; then
- # Build binaries
- GOPATH="${S}:${tmpgoroot}" emake
- else
- # build client tool
- GOPATH="${S}:${tmpgoroot}" emake client
- fi
-
- use nls && emake build-mo
-}
-
-src_test() {
- if use daemon; then
- # Go native tests should succeed
- golang-build_src_test
- fi
-}
-
-src_install() {
- # Installs all src,pkg to /usr/lib/go-gentoo
- golang-build_src_install
-
- cd "${S}"
- dobin bin/lxc
- if use daemon; then
- dosbin bin/lxd
- dobin bin/fuidshift
- fi
-
- cd "src/${EGO_PN}"
-
- if use nls; then
- for lingua in ${PLOCALES}; do
- if use linguas_${lingua}; then
- domo po/${lingua}.mo
- fi
- done
- fi
-
- if use daemon; then
- newinitd "${FILESDIR}"/${P}.initd lxd
- newconfd "${FILESDIR}"/${P}.confd lxd
-
- systemd_dounit "${FILESDIR}"/lxd.service
- fi
-
- newbashcomp config/bash/lxd-client lxc
-
- dodoc AUTHORS CONTRIBUTING.md README.md doc/*
-}
-
-pkg_postinst() {
- einfo
- einfo "Consult https://wiki.gentoo.org/wiki/LXD for more information,"
- einfo "including a Quick Start."
-
- # The messaging below only applies to daemon installs
- use daemon || return 0
-
- # The control socket will be owned by (and writeable by) this group.
- enewgroup lxd
-
- # Ubuntu also defines an lxd user but it appears unused (the daemon
- # must run as root)
-
- einfo
- einfo "Though not strictly required, some features are enabled at run-time"
- einfo "when the relevant helper programs are detected:"
- einfo "- sys-apps/apparmor"
- einfo "- sys-fs/btrfs-progs"
- einfo "- sys-fs/lvm2"
- einfo "- sys-fs/lxcfs"
- einfo "- sys-fs/zfs"
- einfo "- sys-process/criu"
- einfo
- einfo "Since these features can't be disabled at build-time they are"
- einfo "not USE-conditional."
- einfo
- einfo "Networks with bridge.mode=fan are unsupported due to requiring"
- einfo "a patched kernel and iproute2."
-}