Package Details: nomad 0.12.4-1

Git Clone URL: https://aur.archlinux.org/nomad.git (read-only, click to copy)
Package Base: nomad
Description: A Distributed, Highly Available, Datacenter-Aware Scheduler
Upstream URL: https://nomadproject.io/
Licenses: MPL2
Submitter: mtorromeo
Maintainer: rpodgorny (leothrix)
Last Packager: rpodgorny
Votes: 20
Popularity: 0.41
First Submitted: 2016-02-25 21:45
Last Updated: 2020-09-11 13:16

Dependencies (6)

Required by (0)

Sources (5)

Latest Comments

1 2 3 Next › Last »

teutat3s commented on 2020-08-10 18:49

diff for building the latest nomad version as of now, 0.12.1

diff --git a/PKGBUILD b/PKGBUILD
index 58fd6d9..c196f05 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Radek Podgorny <radek@podgorny.cz>

 pkgname=nomad
-pkgver=0.11.3
+pkgver=0.12.1
 pkgrel=1
 pkgdesc="A Distributed, Highly Available, Datacenter-Aware Scheduler"
 arch=('x86_64' 'aarch64' 'armv7h' 'armv7l')
@@ -16,7 +16,7 @@ optdepends=('docker: enables docker driver'
 backup=(etc/nomad/{server,client}.conf)
 source=(https://github.com/hashicorp/nomad/archive/v$pkgver/$pkgname-$pkgver.tar.gz
         nomad-{server,client}.{service,conf})
-sha256sums=('4ac797fd87a9e24a99e45a5dae91dd1064ab90a9da180ee2d0914a6ded4d3272'
+sha256sums=('02f7b2319d5ab7bab644f51de1c248e534498aefe50bf26291a888a99d993359'
             '52b0a22c3c0c72c642a8728cb48bd8797f4f6a12990e11bbb2342edcc2a9a206'
             'da475bc4aa3b1493eb62f09e7f99dcc171e8ce6d74df3da30514cfdfe72a5714'
             '4c8fb7c18c67ca20e3ee07f25cf2f0c82b66c4c173275ae8d643c91cce3c0ceb'
@@ -32,8 +32,6 @@ prepare() {
    export GOPATH="$srcdir"
    export PATH="$GOPATH/bin:$PATH"

-   go get golang.org/x/sys/cpu
-
    make deps lint-deps
    mkdir -p bin
 }
@@ -44,8 +42,9 @@ build() {
    export PATH="$GOPATH/bin:$PATH"

    CGO_ENABLED=1 \
-       go build -ldflags '-X main.GitCommit=""' \
-                -tags "ui lxc" \
+       go build -trimpath \
+                -ldflags '-X main.GitCommit=""' \
+                -tags "ui release" \
                 -o bin/nomad
 }

Svenstaro commented on 2020-04-28 19:38

You should fix the # Maintainer tags in the PKGBUILD to reflect the current actual maintainers.

rpodgorny commented on 2019-12-27 11:37

hi leothrix! that makes sense. i've added you as co-maintainer so feel free to do edits.

leothrix commented on 2019-12-27 06:07

Hi rpodgorny! Thank you for taking over maintainership. I'm a pretty heavy user of nomad, and actually run it with great success on some additional architectures likes aarch64 and armv7h (these architectures are actually officially supported by Hashicorp, as well). I've manually edited the PKGBUILDs for years, but I propose amending the PKGBUILD to elide the manual GOARCH step and just letting go handle the compilation architecture, which would just leave amending the arch array. I've tested this locally and it continues to compile on x86_64 as well as the arm variants.

diff --git a/PKGBUILD b/PKGBUILD
index [`cecc9fe`](https://aur.archlinux.org/cgit/aur.git/commit/?h=nomad&id=cecc9fe)..e0b45b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgname=nomad
pkgver=0.10.2
pkgrel=1
pkgdesc="A Distributed, Highly Available, Datacenter-Aware Scheduler"
-arch=('x86_64')
+arch=('x86_64' 'aarch64' 'armv7h' 'armv7l')
url="<https://nomadproject.io/>"
license=('MPL2')
#depends=('ethtool' 'lxc')
@@ -32,12 +32,6 @@ prepare() {
        export GOPATH="$srcdir"
        export PATH="$GOPATH/bin:$PATH"

-       if [ $CARCH == "x86_64" ]; then
-               export GOARCH=amd64
-       else
-               export GOARCH=386
-       fi
-
        go get golang.org/x/sys/cpu

        make deps lint-deps
@@ -49,12 +43,6 @@ build() {
        export GOPATH="$srcdir"
        export PATH="$GOPATH/bin:$PATH"

-       if [ $CARCH == "x86_64" ]; then
-               export GOARCH=amd64
-       else
-               export GOARCH=386
-       fi
-
        CGO_ENABLED=1 \
                go build -ldflags '-X main.GitCommit=""' \

rpodgorny commented on 2019-12-13 00:19

edited to match nomad-bin more closely. comments welcome!

WRMSR commented on 2019-09-02 09:29

Hi,

depending on lxc (and setting it as tag in go build) is basically useless, because the lxc driver is an out-of-tree module that must be built or downloaded separately: https://github.com/hashicorp/nomad-driver-lxc https://www.nomadproject.io/docs/drivers/external/lxc.html

Also, depending on ethtool makes no sense, as it's not mentioned anywhere in the docs.

I've built nomad successfully just with '-tags "ui"', no depends and with the same optdepends from the nomad-bin package in the MAKEPKG (there is no java-runtime-headless in the repositories, just java-runtime).

leothrix commented on 2019-07-02 04:51

The recent hook-related build failures are likely due to the fact that this package fetches a release tarball and not the complete repository and related files. I'm currently using the following patch, which permits this to build.

diff --git a/PKGBUILD b/PKGBUILD
index [`e13984b`](https://aur.archlinux.org/cgit/aur.git/commit/?h=nomad&id=e13984b)..f61d309 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -41,7 +41,7 @@ prepare() {

        go get golang.org/x/sys/cpu

-       make bootstrap
+       make deps lint-deps
        mkdir -p bin
 }

xuanwo commented on 2019-06-12 06:51

nomad built failed in recent update:

==> Updating build dependencies...
go get -u github.com/kardianos/govendor
go get -u github.com/hashicorp/go-bindata/go-bindata
go get -u github.com/elazarl/go-bindata-assetfs/go-bindata-assetfs
go get -u github.com/a8m/tree/cmd/tree
go get -u github.com/magiconair/vendorfmt/cmd/vendorfmt
go get -u gotest.tools/gotestsum
Installing codec/codecgen@0053ebfd9d0ee06ccefbfe17072021e1d4acebee ...
fatal: cannot change to '/build/nomad/src/src/github.com/ugorji/go/codec': No such file or directory
Installing protobuf/protoc-gen-go@v1.2.0 ...
fatal: cannot change to '/build/nomad/src/src/github.com/golang/protobuf': No such file or directory
==> Updating linter dependencies...
go get -u github.com/alecthomas/gometalinter
gometalinter --install
Installing:
  deadcode
  dupl
  errcheck
  gochecknoglobals
  gochecknoinits
  goconst
  gocyclo
  goimports
  golint
  gosec
  gotype
  gotypex
  ineffassign
  interfacer
  lll
  maligned
  misspell
  nakedret
  safesql
  staticcheck
  structcheck
  unconvert
  unparam
  varcheck
cp dev/hooks/pre-push /hooks/pre-push
cp: cannot create regular file '/hooks/pre-push': No such file or directory
make: *** [GNUmakefile:160: /hooks/pre-push] Error 1
 [1m [31m==> ERROR: (B [m [1m A failure occurred in prepare(). (B [m
 [1m    Aborting... (B [m
 [1m [31m==> ERROR: (B [m [1m Build failed, check /var/lib/archbuild/extra-x86_64/lilydjwg/build (B [m

bruno.unna commented on 2019-03-15 11:25

I have created a patch that seems to fix the issue I reported yesterday:

diff --git a/PKGBUILD b/PKGBUILD
index 1ef58da..fa12719 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@

 pkgname=nomad
 pkgver=0.8.7
-pkgrel=1
+pkgrel=2
 pkgdesc="A Distributed, Highly Available, Datacenter-Aware Scheduler"
 arch=('i686' 'x86_64')
 url="https://www.nomadproject.io/"
@@ -18,14 +18,16 @@ backup=(etc/nomad/{server,client}.conf)
 source=(https://github.com/hashicorp/nomad/archive/v$pkgver/$pkgname-$pkgver.tar.gz
         nomad-{server,client}.{service,conf}
         lxc-version-check.patch
-               golang-crypto.patch)
+               golang-crypto.patch
+               container.patch)
 sha256sums=('f74eac627de69190e586358b1956573a0ae1a40d0755ecdee163016949f9c7fe'
             '52b0a22c3c0c72c642a8728cb48bd8797f4f6a12990e11bbb2342edcc2a9a206'
             'da475bc4aa3b1493eb62f09e7f99dcc171e8ce6d74df3da30514cfdfe72a5714'
             '4c8fb7c18c67ca20e3ee07f25cf2f0c82b66c4c173275ae8d643c91cce3c0ceb'
             'ba80943ac42e617627c7e14be402078199ddba8d7e4276d67f0c9f6e6842d4a8'
             '740cf838f4489b00fab8329c81ba21b1fae02e584d8fac2b5f88eeec76e4e62f'
-            '75583a195b43d7345449bbac60359bf54661ccbd699386a6e59bb483c6054338')
+            '75583a195b43d7345449bbac60359bf54661ccbd699386a6e59bb483c6054338'
+           'd7f483250456cb7b92a437661999786b7295628fc09e1a3b0769606902d82ef0')

 prepare() {
        mkdir -p src/github.com/hashicorp
@@ -54,6 +56,10 @@ prepare() {

        pushd vendor/golang.org/x/crypto
        patch -p1 -i "$srcdir"/golang-crypto.patch
+       popd
+
+       pushd vendor/gopkg.in/lxc/go-lxc.v2
+       patch -p0 -i "$srcdir"/container.patch
 }

 build() {
diff --git a/container.patch b/container.patch
new file mode 100644
index 0000000..228f3d1
--- /dev/null
+++ b/container.patch
@@ -0,0 +1,11 @@
+--- ../../../../../nomad-0.8.7.orig/vendor/gopkg.in/lxc/go-lxc.v2/container.go 2019-03-15 09:59:16.230241650 +0000
++++ container.go       2019-03-15 10:00:22.343574744 +0000
+@@ -767,7 +767,7 @@
+       c.mu.RLock()
+       defer c.mu.RUnlock()
+ 
+-      var keys *_Ctype_char
++      var keys *C.char
+ 
+       if key != nil && len(key) == 1 {
+               ckey := C.CString(key[0])

Please validate and if it seems correct, feel free to use it.

bruno.unna commented on 2019-03-14 15:44

Hi all. I've built this package in the past (weeks ago, very same version). I'm doing it again, but now it's failing with:

...
patching file blake2b/blake2b_amd64.go
patching file blake2b/blake2b_amd64.s
==> Starting build()...
# github.com/hashicorp/nomad/vendor/gopkg.in/lxc/go-lxc.v2
vendor/gopkg.in/lxc/go-lxc.v2/container.go:770:12: identifier "_Ctype_char" may conflict with identifiers generated by cgo
==> ERROR: A failure occurred in build().
    Aborting...

The machine is newly installed. go was installed as a dependency of this build process. Any logs/versions/output of commands is available on request.

I'm a bit lost, really. Ideas and pointers will be greatly appreciated. Thanks in advance.