Package Details: k6 0.50.0-1

Git Clone URL: https://aur.archlinux.org/k6.git (read-only, click to copy)
Package Base: k6
Description: A modern load testing tool, using Go and JavaScript
Upstream URL: https://github.com/grafana/k6
Licenses: AGPL3
Submitter: billkaguru
Maintainer: jhenson
Last Packager: jhenson
Votes: 8
Popularity: 0.115516
First Submitted: 2018-06-07 18:06 (UTC)
Last Updated: 2024-03-25 16:06 (UTC)

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

jhenson commented on 2021-10-27 14:29 (UTC)

Any chance of getting this package updated? I can help or take over maintenance as well if that's needed.

Here's a patch that updates the package to the latest version and gets it up to par with the go packaging guidelines: https://paste.sr.ht/~jhenson/6cfc51c65ddd28f4379e81b9fee74e6d122379a5

thirk_voluntary commented on 2020-11-23 00:18 (UTC)

Updated to 0.29.0 (thanks teutat3s for the nudges!)

Shouldn't need mercurial anymore, so that dep has been removed as well.

teutat3s commented on 2020-11-13 15:04 (UTC) (edited on 2020-11-13 15:10 (UTC) by teutat3s)

Diff for update to 0.29.0

diff --git a/PKGBUILD b/PKGBUILD
index 3d5362e..ac047f8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Andy Nicholson <andrew@anicholson.net>

 pkgname=k6
-pkgver=0.27.0
+pkgver=0.29.0
 pkgrel=1
 pkgdesc="A modern load testing tool, using Go and JavaScript"
 arch=('x86_64' 'i686')
@@ -13,25 +13,19 @@ options=('!strip' '!emptydirs')
 _gourl=github.com/loadimpact/k6

 build() {
-  GOPATH="$srcdir" go get -v -x ${_gourl}/...
-  GOPATH="$srcdir" go get -fix -v -x ${_gourl}/...
-}
-
-check() {
-  GOPATH="$GOPATH:$srcdir" go test -v -x ${_gourl}/...
+  export GO111MODULE=on
+  export GOFLAGS="-trimpath"
+  go get ${_gourl}@v$pkgver
 }

 package() {
   mkdir -p "$pkgdir/usr/bin"
-  install -p -m755 "$srcdir/bin/"* "$pkgdir/usr/bin"
-
-  mkdir -p "$pkgdir/$GOPATH"
-  cp -Rv --preserve=timestamps "$srcdir/"{src,pkg} "$pkgdir/$GOPATH"
+  install -p -m755 "$GOPATH/bin/k6" "$pkgdir/usr/bin"

   # Package license (if available)
   for f in LICENSE COPYING LICENSE.* COPYING.*; do
-    if [ -e "$srcdir/src/$_gourl/$f" ]; then
-      install -Dm644 "$srcdir/src/$_gourl/$f" \
+    if [ -e "$GOPATH/pkg/mod/${_gourl}@v${pkgver}/$f" ]; then
+      install -Dm644 "$GOPATH/pkg/mod/${_gourl}@v${pkgver}/$f" \
         "$pkgdir/usr/share/licenses/$pkgname/$f"
     fi
   done

teutat3s commented on 2020-09-24 12:32 (UTC)

Diff for update to 0.28.0

diff --git a/PKGBUILD b/PKGBUILD
index 3d5362e..14e4014 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Andy Nicholson <andrew@anicholson.net>

 pkgname=k6
-pkgver=0.27.0
+pkgver=0.28.0
 pkgrel=1
 pkgdesc="A modern load testing tool, using Go and JavaScript"
 arch=('x86_64' 'i686')
@@ -13,25 +13,27 @@ options=('!strip' '!emptydirs')
 _gourl=github.com/loadimpact/k6

 build() {
-  GOPATH="$srcdir" go get -v -x ${_gourl}/...
-  GOPATH="$srcdir" go get -fix -v -x ${_gourl}/...
+  go get -d ${_gourl}
+  cd $GOPATH/src/${_gourl}
+  git checkout v$pkgver
+  export GOFLAGS="-trimpath"
+  export CGO_ENABLED=0
+  go build -v -o $GOPATH/bin/
 }

thirk_voluntary commented on 2020-03-02 02:23 (UTC) (edited on 2020-03-02 02:24 (UTC) by thirk_voluntary)

@billkaguru the fix turns out to be pretty simple:

diff --git a/.SRCINFO b/.SRCINFO
index ca00543..9341112 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
 pkgbase = k6
    pkgdesc = A modern load testing tool, using Go and JavaScript
-   pkgver = 0.21.1
+   pkgver = 0.26.0
    pkgrel = 1
    url = https://github.com/loadimpact/k6
    arch = x86_64
diff --git a/PKGBUILD b/PKGBUILD
index 7930dd5..84e0d3f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Bill Kaguru Wanjohi <bill@ka.guru>

 pkgname=k6
-pkgver=0.21.1
+pkgver=0.26.0
 pkgrel=1
 pkgdesc="A modern load testing tool, using Go and JavaScript"
 arch=('x86_64' 'i686')
@@ -13,6 +13,7 @@ options=('!strip' '!emptydirs')
 _gourl=github.com/loadimpact/k6

 build() {
+  GOPATH="$srcdir" go get -v -x ${_gourl}/...
   GOPATH="$srcdir" go get -fix -v -x ${_gourl}/...
 }

^ this issues two commands to go get -- because it's already downloaded all the deps it doesn't have to do any network stuff the second time around.

I also bumped the version to latest (0.26.0)

Cheers!

Andy>

a216 commented on 2018-12-05 13:33 (UTC)

Fails for me too, virtually the exact same error as @pyriand3r. I wish I knew more about Golang's building process :/

pyriand3r commented on 2018-11-19 14:09 (UTC) (edited on 2018-11-19 14:11 (UTC) by pyriand3r)

For me too, here's the log output of the fail. Important is, that you do not close the install process but answers the retry with yes to stay in the same process.
Seems to have problems fetching the git submodules on first run:

==> Starting build()...
github.com/loadimpact/k6 (download)
cd .
git clone https://github.com/loadimpact/k6 /tmp/yaourt-tmp-gabriel/aur-k6/src/src/github.com/loadimpact/k6
cd /tmp/yaourt-tmp-gabriel/aur-k6/src/src/github.com/loadimpact/k6 git submodule update --init --recursive
cd /tmp/yaourt-tmp-gabriel/aur-k6/src/src/github.com/loadimpact/k6 git show-ref
cd /tmp/yaourt-tmp-gabriel/aur-k6/src/src/github.com/loadimpact/k6 git submodule update --init --recursive
/usr/lib/go/pkg/tool/linux_amd64/fix src/github.com/loadimpact/k6/main.go package github.com/loadimpact/k6/...: cannot find package "github.com/loadimpact/k6/..." in any of:
/usr/lib/go/src/github.com/loadimpact/k6/... (from $GOROOT)
/tmp/yaourt-tmp-gabriel/aur-k6/src/src/github.com/loadimpact/k6/... (from $GOPATH)
==> ERROR: A failure occurred in build().
Aborting...
==> ERROR: Makepkg was unable to build k6.

billkaguru commented on 2018-06-07 21:09 (UTC)

For reasons I don't understand, this failed the first time but succeeds with another run.