diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | lxc-version-check.patch | 41 |
3 files changed, 53 insertions, 5 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Thu Jun 14 15:53:00 UTC 2018 +# Wed Jul 11 11:24:23 UTC 2018 pkgbase = nomad pkgdesc = A Distributed, Highly Available, Datacenter-Aware Scheduler pkgver = 0.8.4 - pkgrel = 1 + pkgrel = 2 url = https://www.nomadproject.io/ arch = i686 arch = x86_64 @@ -22,11 +22,13 @@ pkgbase = nomad source = nomad-server.conf source = nomad-client.service source = nomad-client.conf + source = lxc-version-check.patch sha256sums = 8dfacd578f2be1ae6cc7af6b2749952f1646344cb95bde17f35eeb78faacd616 sha256sums = 52b0a22c3c0c72c642a8728cb48bd8797f4f6a12990e11bbb2342edcc2a9a206 sha256sums = da475bc4aa3b1493eb62f09e7f99dcc171e8ce6d74df3da30514cfdfe72a5714 sha256sums = 4c8fb7c18c67ca20e3ee07f25cf2f0c82b66c4c173275ae8d643c91cce3c0ceb sha256sums = ba80943ac42e617627c7e14be402078199ddba8d7e4276d67f0c9f6e6842d4a8 + sha256sums = 740cf838f4489b00fab8329c81ba21b1fae02e584d8fac2b5f88eeec76e4e62f pkgname = nomad @@ -2,7 +2,7 @@ pkgname=nomad pkgver=0.8.4 -pkgrel=1 +pkgrel=2 pkgdesc="A Distributed, Highly Available, Datacenter-Aware Scheduler" arch=('i686' 'x86_64') url="https://www.nomadproject.io/" @@ -16,18 +16,23 @@ optdepends=( ) backup=(etc/nomad/{server,client}.conf) source=(https://github.com/hashicorp/nomad/archive/v$pkgver/$pkgname-$pkgver.tar.gz - nomad-{server,client}.{service,conf}) + nomad-{server,client}.{service,conf} + lxc-version-check.patch) sha256sums=('8dfacd578f2be1ae6cc7af6b2749952f1646344cb95bde17f35eeb78faacd616' '52b0a22c3c0c72c642a8728cb48bd8797f4f6a12990e11bbb2342edcc2a9a206' 'da475bc4aa3b1493eb62f09e7f99dcc171e8ce6d74df3da30514cfdfe72a5714' '4c8fb7c18c67ca20e3ee07f25cf2f0c82b66c4c173275ae8d643c91cce3c0ceb' - 'ba80943ac42e617627c7e14be402078199ddba8d7e4276d67f0c9f6e6842d4a8') + 'ba80943ac42e617627c7e14be402078199ddba8d7e4276d67f0c9f6e6842d4a8' + '740cf838f4489b00fab8329c81ba21b1fae02e584d8fac2b5f88eeec76e4e62f') prepare() { mkdir -p src/github.com/hashicorp cd src/github.com/hashicorp rm -rf nomad mv ../../../$pkgname-$pkgver nomad + + cd nomad/vendor/gopkg.in/lxc/go-lxc.v2 + patch -p1 -i "$srcdir"/lxc-version-check.patch } build() { diff --git a/lxc-version-check.patch b/lxc-version-check.patch new file mode 100644 index 000000000000..b190b04bf719 --- /dev/null +++ b/lxc-version-check.patch @@ -0,0 +1,41 @@ +diff --git a/lxc-binding.c b/lxc-binding.c +index 4592b68..d26b9ef 100644 +--- a/lxc-binding.c ++++ b/lxc-binding.c +@@ -15,11 +15,6 @@ + + #include "lxc-binding.h" + +-#define VERSION_AT_LEAST(major, minor, micro) \ +- (!(major > LXC_VERSION_MAJOR || \ +- major == LXC_VERSION_MAJOR && minor > LXC_VERSION_MINOR || \ +- major == LXC_VERSION_MAJOR && minor == LXC_VERSION_MINOR && micro > LXC_VERSION_MICRO)) +- + bool go_lxc_defined(struct lxc_container *c) { + return c->is_defined(c); + } +diff --git a/lxc-binding.h b/lxc-binding.h +index f7ccd84..ed1829a 100644 +--- a/lxc-binding.h ++++ b/lxc-binding.h +@@ -2,6 +2,11 @@ + // Use of this source code is governed by a LGPLv2.1 + // license that can be found in the LICENSE file. + ++#define VERSION_AT_LEAST(major, minor, micro) \ ++ ((LXC_DEVEL == 1) || (!(major > LXC_VERSION_MAJOR || \ ++ major == LXC_VERSION_MAJOR && minor > LXC_VERSION_MINOR || \ ++ major == LXC_VERSION_MAJOR && minor == LXC_VERSION_MINOR && micro > LXC_VERSION_MICRO))) ++ + extern bool go_lxc_add_device_node(struct lxc_container *c, const char *src_path, const char *dest_path); + extern void go_lxc_clear_config(struct lxc_container *c); + extern bool go_lxc_clear_config_item(struct lxc_container *c, const char *key); +@@ -72,7 +77,7 @@ extern bool go_lxc_restore(struct lxc_container *c, char *directory, bool verbos + * we don't want to have to pass all the arguments in to let conditional + * compilation handle things, but the call will still fail + */ +-#if LXC_VERSION_MAJOR != 2 ++#if !VERSION_AT_LEAST(2, 0, 0) + struct migrate_opts { + char *directory; + bool verbose; |