Package Details: gotop 3.0.0-3

Git Clone URL: https://aur.archlinux.org/gotop.git (read-only)
Package Base: gotop
Description: A terminal based graphical activity monitor inspired by gtop and vtop
Upstream URL: https://github.com/cjbassi/gotop
Licenses: AGPL3
Conflicts: gotop
Provides: gotop
Submitter: FabioLolix
Maintainer: FabioLolix (cjbassi)
Last Packager: cjbassi
Votes: 5
Popularity: 1.506396
First Submitted: 2018-11-13 17:46
Last Updated: 2019-02-25 21:09

Dependencies (2)

Required by (0)

Sources (1)

Latest Comments

1 2 Next › Last »

willemw commented on 2019-03-24 07:57

provides=(gotop)
conflicts=(gotop)

are redundant.

egrupled commented on 2019-02-25 21:42

Great. Thank you.

cjbassi commented on 2019-02-25 21:25

@egrupled Thanks for pointing out the issues. The PKGBUILD has been updated and fixed. To fix the GOPATH issue, I added -mod vendor to the build flags instead of modifying the GOPATH env variable, since gotop vendors all of its dependencies. I was under the impression that go build defaulted to using the vendor directory, but apparently you have to explicit opt into that at least when using go modules.

egrupled commented on 2019-02-25 20:03

There are couple issues with the current PKGBUILD:

  1. It creates persistent ~/go dir (with default GOPATH) and download all dependencies there. Moreover files in that dir are set as read-only.

  2. It doesn't honor LDFLAGS

Below is example which fixes this issue:

  1. It sets GOPATH to temporary directory under build dir.

  2. It take LDFLAGS into account, also strips build path for reproducibility[1].

  3. It makes temporary GOPATH writable which allows for clean up.

[1] https://wiki.archlinux.org/index.php/Go_package_guidelines#Flags_and_build_options

Please consider adopting those changes.

build() {
  cd "${srcdir}"/${pkgname}-${pkgver}
  export GOPATH="$srcdir/gopath"
  go build \
  -gcflags "all=-trimpath=${PWD}" \
  -asmflags "all=-trimpath=${PWD}" \
  -ldflags "-extldflags ${LDFLAGS}"
}

package() {
  export GOPATH="$srcdir/gopath"
  install -Dm755 "${srcdir}"/${pkgname}-${pkgver}/gotop "${pkgdir}"/usr/bin/gotop
  chmod -R 644 "$GOPATH"
}

cjbassi commented on 2019-02-22 22:12

@The999eagle Building should be fixed now.

@dude Added git to makedepends.

@egrupled Removed Go version.

Sorry about the delay. Forgot to enable notifications :doh:

egrupled commented on 2019-02-20 12:20

Please change "go>=1.11.0" to "go" in depends otherwise it break building with go-pie. Versioned deps doesn't make sense in Arch as there is only one "go" version in repos and partial upgrades aren't supported

dude commented on 2019-02-13 03:54

Can you add the git package to makedepends please? If it's not installed, the build will fail:

-> Extracting gotop-2.0.1.tar.gz with bsdtar
==> Starting build()...
go: github.com/stretchr/testify@v1.2.2: git init --bare in /build/go/pkg/mod/cache/vcs/ed2f58bca3966d01dc4666baa48276a4fab360938a8d941050d58e371e2bba77: exec: "git": executable file not found in $PATH

The999eagle commented on 2019-02-04 11:39

Building currently fails with

go: github.com/cjbassi/drawille-go@v0.0.0-20180329221028-ad535d0f92cd: unknown revision ad535d0f92cd
go: github.com/gizak/termui@v0.0.0-20190114080300-043950fed066: unknown revision 043950fed066
go: error loading module requirements

It seems like those two commits don't exist in the source repos anymore

cjbassi commented on 2019-01-08 18:21

Hi, gotop maintainer here. Could you change the makedepend from go-pie to go? Thanks!

willemw commented on 2018-12-12 19:15

Please change go-pie to go. Now we are forced to uninstall go and install go-pie.

Environment variable GOPATH needs to be set to point somewhere inside $srcdir. Now go files are being downloaded globally in ~/go or in $GOPATH if set.

Only x86_64 needs to be listed in arch=(). $pkgdir should be double-quoted.