Package Details: elvish-git r1760.f363571-1

Git Clone URL: https://aur.archlinux.org/elvish-git.git (read-only)
Package Base: elvish-git
Description: A novel Unix shell.
Upstream URL: https://github.com/elves/elvish
Licenses: custom:2-clause BSD
Conflicts: elvish
Provides: elvish
Submitter: hexchain
Maintainer: hexchain (xiaq)
Last Packager: hexchain
Votes: 5
Popularity: 0.267356
First Submitted: 2016-02-15 14:06
Last Updated: 2016-03-30 05:01

Latest Comments

vendion commented on 2016-03-02 14:12

@xiaq: I typically I define GOROOT, GOPATH, and GOBIN on all my machines, and in almost every case GOBIN is set to be $GOPATH/bin anyways. This is just a habit I got from working with Go in its early days, even though I think GOBIN is completely optional by now and GOROOT is optional if certain conditions are met (not built from source, installed as /usr/local/go etc).

I didn't think of the fakeroot environment inheriting my environment variables, I'll setup a chroot and test building in that to see if that is the case.

EDIT: just did a build inside a chroot and it worked just fine without editing, so is the fact that I explicitly set GOBIN, and that variable is inherited in the fakeroot environment.

xiaq commented on 2016-03-02 05:27

@vendion Weird, since `go get .` is supposed to install the binary to $GOPATH/bin and normally you are not supposed to change $GOBIN to achieve that behavior.

Do you have $GOBIN set in your exterior environment?

vendion commented on 2016-03-01 20:03

@xiaq: here is what I get when I run it on my test box:

[vendion@fail1][~/packages/elvish-git]% ls
PKGBUILD
[vendion@fail1][~/packages/elvish-git]% makepkg -s
==> Making package: elvish-git r1536.22be6e2-1 (Tue Mar 1 14:55:19 EST 2016)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Cloning elvish git repo...
Cloning into bare repository '/home/vendion/packages/elvish-git/elvish'...
remote: Counting objects: 8547, done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 8547 (delta 20), reused 0 (delta 0), pack-reused 8503
Receiving objects: 100% (8547/8547), 1.71 MiB | 0 bytes/s, done.
Resolving deltas: 100% (6012/6012), done.
Checking connectivity... done.
==> Validating source files with md5sums...
elvish ... Skipped
==> Extracting sources...
-> Creating working copy of elvish git repo...
Cloning into 'elvish'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: elvish-git r1646.1bdb21d-1
==> Starting build()...
go get .
test -n /home/vendion/packages/elvish-git/src/build
mkdir -p /home/vendion/packages/elvish-git/src/build/bin
cc ./stubimpl/main.c -o /home/vendion/packages/elvish-git/src/build/bin/elvish-stub
==> Starting check()...
go test ./...
? github.com/elves/elvish [no test files]
ok github.com/elves/elvish/edit 0.103s
ok github.com/elves/elvish/eval 0.778s
ok github.com/elves/elvish/glob 0.007s
ok github.com/elves/elvish/parse 0.006s
? github.com/elves/elvish/run [no test files]
ok github.com/elves/elvish/store 1.536s
ok github.com/elves/elvish/stub 0.003s
ok github.com/elves/elvish/sys 0.003s
ok github.com/elves/elvish/util 0.155s
: ./stubimpl/test.sh
==> Entering fakeroot environment...
==> Starting package()...
install: cannot stat '/home/vendion/packages/elvish-git/src/build/bin/elvish': No such file or directory
==> ERROR: A failure occurred in package().
Aborting...
[vendion@fail1][~/packages/elvish-git]% ls pkg/elvish-git/usr/bin
elvish-stub*

If I set GOBIN in either the prepare() or build() to be $GOPATH/bin and rebuild the package then everything works as expected.

[vendion@fail1][~/packages/elvish-git]% ls pkg/elvish-git/usr/bin
elvish* elvish-stub*

This was tested on a VM that has base, base-devel, and minimal custom packages installed and gets restored from a snapshot after use.

xiaq commented on 2016-02-23 00:22

@vendion It builds the main executable for me. Are you still seeing this problem?

vendion commented on 2016-02-22 23:32

The latest change to the PKGBUILD only builds the elvish-stub executable, not the main executable. Moving the GOPATH export to the build function and defining GOBIN to be $GOPATH/bin then the main elvish executable gets built. See my modified PKGBUILD here http://sprunge.us/WPTQ?bash