Package Details: go-yq 4.6.3-1

Git Clone URL: https://aur.archlinux.org/go-yq.git (read-only, click to copy)
Package Base: go-yq
Description: portable command-line YAML processor
Upstream URL: https://github.com/mikefarah/yq
Licenses: MIT
Conflicts: yq
Submitter: supermario
Maintainer: supermario
Last Packager: supermario
Votes: 3
Popularity: 0.169485
First Submitted: 2020-09-25 14:50
Last Updated: 2021-03-25 20:08

Latest Comments

languitar commented on 2021-03-26 09:30

Any chance to include the proposed permission fix? This is also failing constantly for me.

StephanX commented on 2021-03-03 20:17

As is, this installation always fails for me. The package it downloads contains directories with 0555 permissions, meaning that yay fails with multiple 'rm: cannot remove {file}' during build phase. I recommend adding

find . -type d -exec chmod 0770 {} \;

to line 40 of the PKGBUILD file.

matthias.lisin commented on 2020-12-26 23:41

Hi, two more things I forgot:
1. You can use go get -d if you're overriding GOPATH anyway, same outcome but skips copy to vendor/ directory.
2. shell completions for all the shells

diff --git a/PKGBUILD b/PKGBUILD
index 868d963..ce7ae1c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,7 @@ sha256sums=('2ff35db36b2d8226d181deb02b8e80ea7f6d4fbe04b7942fc5de2470e91b66d5')
 prepare() {
   cd yq-$pkgver
   export GOPATH="$srcdir/gopath"
-  go mod vendor
+  go get -d
 }

 check() {
@@ -37,6 +37,9 @@ build() {

 package() {
   cd yq-$pkgver
+  ./yq shell-completion bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/yq"
+  ./yq shell-completion zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_yq"
+  ./yq shell-completion fish | install -Dm644 /dev/stdin "$pkgdir/usr/share/fish/vendor_completions.d/yq.fish"
   install -Dm0755 yq "$pkgdir/usr/bin/yq"
   install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
   install -Dm0644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"

matthias.lisin commented on 2020-12-15 21:02

Hi @supermario, thanks for maintaining this package. Can I suggest a few small changes to the package?

diff --git a/PKGBUILD b/PKGBUILD
index 2f8a818..fa024e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,8 +8,9 @@ arch=(x86_64)
 url=https://github.com/mikefarah/yq
 license=(MIT)
 makedepends=(go)
+depends=(glibc)
 conflicts=(yq)
-source=(https://github.com/mikefarah/yq/archive/${pkgver}.tar.gz)
+source=(https://github.com/mikefarah/yq/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz)
 sha256sums=('73259f808d589d11ea7a18e4cd38a2e98b518a6c2c178d1ec57d9c5942277cb1')

 prepare() {

This will shut up namcap:

$ namcap PKGBUILD
PKGBUILD (go-yq) W: Non-unique source name (3.4.1.tar.gz). Use a unique filename.
$ namcap go-yq-3.4.1-1-x86_64.pkg.tar.zst
go-yq E: Dependency glibc detected and not included (libraries ['usr/lib/libc.so.6', 'usr/lib/libpthread.so.0'] needed in files ['usr/bin/yq'])