#68676 closed defect (fixed)

totp-cli - Need Help Upgrading to version 1.8.2 - cannot find package "filippo.io/age"

Reported by: RobK88 Owned by: RobK88
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc: manojkarthick (Manoj Karthick), RobK88
Port: totp-cli

Description (last modified by RobK88)

I am not a Go developer. I need some help upgrading the totp-cli port to the latest version 1.8.2.

I have done this so far:

  1. Updated go.setup to point to the latest version of totp-cli which is v1.8.2
  2. Updated the various go packages in go.vendors to the latest versions
  3. Added the following required go packages in go.vendors
github.com/urfave/cli
github.com/cpuguy83/go-md2man
github.com/xrash/smetrics

But I am unable to add the filippo.io/age and filippo.io/age/armor packages.

Apparently, go-vendors does not support packages from filippo.io.

Instead, I added the github.com/FiloSottile/age package which provides the same functionality but the source for totp-cli cannot find this package. I suspect the source may need to be patched.

Here is the output:

Grinchs-MacBook-Pro:~ grinch$ sudo port clean totp-cli
--->  Cleaning totp-cli

Grinchs-MacBook-Pro:~ grinch$ sudo port -vs upgrade totp-cli
--->  Computing dependencies for totp-cli.
--->  Fetching distfiles for totp-cli
--->  Verifying checksums for totp-cli
--->  Checksumming totp-cli-1.8.2.tar.gz
--->  Checksumming go-yaml-yaml-v3.0.1.tar.gz
--->  Checksumming go-yaml-yaml-v2.4.0.tar.gz
--->  Checksumming golang-term-v0.14.0.tar.gz
--->  Checksumming golang-sys-v0.14.0.tar.gz
--->  Checksumming golang-crypto-v0.15.0.tar.gz
--->  Checksumming yitsushi-go-commander-v1.1.0.tar.gz
--->  Checksumming yitsushi-github-release-check-v1.0.2.tar.gz
--->  Checksumming stretchr-testify-v1.8.4.tar.gz
--->  Checksumming stretchr-objx-v0.5.1.tar.gz
--->  Checksumming pmezard-go-difflib-v1.0.0.tar.gz
--->  Checksumming mitchellh-go-homedir-v1.1.0.tar.gz
--->  Checksumming kardianos-osext-2bc1f35cddc0.tar.gz
--->  Checksumming davecgh-go-spew-v1.1.1.tar.gz
--->  Checksumming urfave-cli-v2.25.7.tar.gz
--->  Checksumming cpuguy83-go-md2man-v2.0.3.tar.gz
--->  Checksumming xrash-smetrics-039620a656736e6ad994090895784a7af15e0b80.tar.gz
--->  Checksumming FiloSottile-age-v1.1.1.tar.gz
--->  Extracting totp-cli
--->  Extracting totp-cli-1.8.2.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/totp-cli-1.8.2.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting go-yaml-yaml-v3.0.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/go-yaml-yaml-v3.0.1.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting go-yaml-yaml-v2.4.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/go-yaml-yaml-v2.4.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting golang-term-v0.14.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/golang-term-v0.14.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting golang-sys-v0.14.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/golang-sys-v0.14.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting golang-crypto-v0.15.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/golang-crypto-v0.15.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting yitsushi-go-commander-v1.1.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/yitsushi-go-commander-v1.1.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting yitsushi-github-release-check-v1.0.2.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/yitsushi-github-release-check-v1.0.2.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting stretchr-testify-v1.8.4.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/stretchr-testify-v1.8.4.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting stretchr-objx-v0.5.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/stretchr-objx-v0.5.1.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting pmezard-go-difflib-v1.0.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/pmezard-go-difflib-v1.0.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting mitchellh-go-homedir-v1.1.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/mitchellh-go-homedir-v1.1.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting kardianos-osext-2bc1f35cddc0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/kardianos-osext-2bc1f35cddc0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting davecgh-go-spew-v1.1.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/davecgh-go-spew-v1.1.1.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting urfave-cli-v2.25.7.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/urfave-cli-v2.25.7.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting cpuguy83-go-md2man-v2.0.3.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/cpuguy83-go-md2man-v2.0.3.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting xrash-smetrics-039620a656736e6ad994090895784a7af15e0b80.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/xrash-smetrics-039620a656736e6ad994090895784a7af15e0b80.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting FiloSottile-age-v1.1.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/FiloSottile-age-v1.1.1.tar.gz' | /usr/bin/tar -xf - 
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cc
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cc/usr
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cc/usr/bin
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objc
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objc/usr
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objc/usr/bin
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cxx
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cxx/usr
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cxx/usr/bin
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objcxx
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objcxx/usr
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objcxx/usr/bin
--->  Configuring totp-cli
--->  Building totp-cli
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/gopath/src/github.com/yitsushi/totp-cli" && /opt/local/bin/go build 
internal/storage/storage.go:15:2: cannot find package "filippo.io/age" in any of:
	/opt/local/lib/go/src/filippo.io/age (from $GOROOT)
	/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/gopath/src/filippo.io/age (from $GOPATH)
internal/storage/storage.go:16:2: cannot find package "filippo.io/age/armor" in any of:
	/opt/local/lib/go/src/filippo.io/age/armor (from $GOROOT)
	/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/gopath/src/filippo.io/age/armor (from $GOPATH)
Command failed:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/gopath/src/github.com/yitsushi/totp-cli" && /opt/local/bin/go build 
Exit code: 1
Error: Failed to build totp-cli: command execution failed
Error: See /opt/local/var/macports/logs/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Any ideas?

Attachments (6)

Portfile (6.2 KB) - added by RobK88 10 months ago.
Portfile.2 (6.4 KB) - added by RobK88 10 months ago.
Portfile Fixed
main.log (60.5 KB) - added by RobK88 10 months ago.
Portfile.3 (6.7 KB) - added by RobK88 10 months ago.
Portfile v3
Portfile.4 (6.7 KB) - added by RobK88 10 months ago.
Portfile v4 -- This Portfile actually works!!
Portfile.5 (4.1 KB) - added by RobK88 10 months ago.
Portfile v5 - Streamlined. This also works!

Download all attachments as: .zip

Change History (20)

Changed 10 months ago by RobK88

Attachment: Portfile added

comment:1 Changed 10 months ago by RobK88

P.S. If it helps, I can submit a draft Pull Request containing the bug.

comment:2 Changed 10 months ago by RobK88

Description: modified (diff)

comment:3 Changed 10 months ago by RobK88

Description: modified (diff)

comment:4 Changed 10 months ago by RobK88

I think the solution is either

  1. patching the source; or,
  2. adding statments to the Portfile creating symlinks from the executables in the github.com/FiloSottile/age package to /opt/local/lib/go/src/filippo.io/age and /opt/local/lib/go/src/filippo.io/age/armor

Thoughts?

Version 0, edited 10 months ago by RobK88 (next)

comment:5 Changed 10 months ago by RobK88

Summary: totp-cli - Need Help Upgrading to version 1.8.2totp-cli - Need Help Upgrading to version 1.8.2 - cannot find package "filippo.io/age"

comment:6 Changed 10 months ago by RobK88

I tried adding the following to the Portfile but MacPorts will not create the directory or symlink. Permission denied.

post-extract {
                   file  mkdir /opt/local/lib/go/src/filippo.io/
                   ln -s ${workpath}/gopath/src/github.com/FiloSottile/age  /opt/local/lib/go/src/filippo.io/age
}

I also tried without success:

pre-build {
                   xinstall -d ${prefix}/lib/go/src/filippo.io
                   ln -s ${workpath}/gopath/src/github.com/FiloSottile/age/  /opt/local/lib/go/src/filippo.io/age/
}
Last edited 10 months ago by RobK88 (previous) (diff)

comment:7 Changed 10 months ago by RobK88

One step foward. The following added to the Portfile appears to resolve the missing package issue.

pre-build {
                   file mkdir ${workpath}/gopath/src/filippo.io
                   ln -s ${workpath}/gopath/src/github.com/FiloSottile/age ${workpath}/gopath/src/filippo.io/age
}

But the port does not build. And I do not see an error. See below and the attached main.log

Grinchs-MacBook-Pro:~ grinch$ sudo port clean totp-cli
--->  Cleaning totp-cli
Grinchs-MacBook-Pro:~ grinch$ 
Grinchs-MacBook-Pro:~ grinch$ sudo port -vs install totp-cli
--->  Computing dependencies for totp-cli.
--->  Fetching distfiles for totp-cli
--->  Verifying checksums for totp-cli
--->  Checksumming totp-cli-1.8.2.tar.gz
--->  Checksumming go-yaml-yaml-v3.0.1.tar.gz
--->  Checksumming go-yaml-yaml-v2.4.0.tar.gz
--->  Checksumming golang-term-v0.14.0.tar.gz
--->  Checksumming golang-sys-v0.14.0.tar.gz
--->  Checksumming golang-crypto-v0.15.0.tar.gz
--->  Checksumming yitsushi-go-commander-v1.1.0.tar.gz
--->  Checksumming yitsushi-github-release-check-v1.0.2.tar.gz
--->  Checksumming stretchr-testify-v1.8.4.tar.gz
--->  Checksumming stretchr-objx-v0.5.1.tar.gz
--->  Checksumming pmezard-go-difflib-v1.0.0.tar.gz
--->  Checksumming mitchellh-go-homedir-v1.1.0.tar.gz
--->  Checksumming kardianos-osext-2bc1f35cddc0.tar.gz
--->  Checksumming davecgh-go-spew-v1.1.1.tar.gz
--->  Checksumming urfave-cli-v2.25.7.tar.gz
--->  Checksumming cpuguy83-go-md2man-v2.0.3.tar.gz
--->  Checksumming xrash-smetrics-039620a656736e6ad994090895784a7af15e0b80.tar.gz
--->  Checksumming FiloSottile-age-v1.1.1.tar.gz
--->  Extracting totp-cli
--->  Extracting totp-cli-1.8.2.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/totp-cli-1.8.2.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting go-yaml-yaml-v3.0.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/go-yaml-yaml-v3.0.1.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting go-yaml-yaml-v2.4.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/go-yaml-yaml-v2.4.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting golang-term-v0.14.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/golang-term-v0.14.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting golang-sys-v0.14.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/golang-sys-v0.14.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting golang-crypto-v0.15.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/golang-crypto-v0.15.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting yitsushi-go-commander-v1.1.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/yitsushi-go-commander-v1.1.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting yitsushi-github-release-check-v1.0.2.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/yitsushi-github-release-check-v1.0.2.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting stretchr-testify-v1.8.4.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/stretchr-testify-v1.8.4.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting stretchr-objx-v0.5.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/stretchr-objx-v0.5.1.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting pmezard-go-difflib-v1.0.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/pmezard-go-difflib-v1.0.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting mitchellh-go-homedir-v1.1.0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/mitchellh-go-homedir-v1.1.0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting kardianos-osext-2bc1f35cddc0.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/kardianos-osext-2bc1f35cddc0.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting davecgh-go-spew-v1.1.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/davecgh-go-spew-v1.1.1.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting urfave-cli-v2.25.7.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/urfave-cli-v2.25.7.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting cpuguy83-go-md2man-v2.0.3.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/cpuguy83-go-md2man-v2.0.3.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting xrash-smetrics-039620a656736e6ad994090895784a7af15e0b80.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/xrash-smetrics-039620a656736e6ad994090895784a7af15e0b80.tar.gz' | /usr/bin/tar -xf - 
--->  Extracting FiloSottile-age-v1.1.1.tar.gz
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work" && /usr/bin/gzip -dc '/opt/local/var/macports/distfiles/go/FiloSottile-age-v1.1.1.tar.gz' | /usr/bin/tar -xf - 
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cc
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cc/usr
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cc/usr/bin
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objc
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objc/usr
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objc/usr/bin
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cxx
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cxx/usr
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/cxx/usr/bin
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objcxx
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objcxx/usr
xinstall: mkdir /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/compwrap/objcxx/usr/bin
--->  Configuring totp-cli
--->  Building totp-cli
Executing:  cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/gopath/src/github.com/yitsushi/totp-cli" && /opt/local/bin/go build 
--->  Staging totp-cli into destroot
./usr missing (created)
. missing (directory not created: File exists)
./Applications missing (created)
./Developer missing (created)
./Library missing (created)
./bin missing (created)
./etc missing (created)
./include missing (created)
./lib missing (created)
./lib/pkgconfig missing (created)
./libexec missing (created)
./sbin missing (created)
./share missing (created)
./share/doc missing (created)
./share/info missing (created)
./share/man missing (created)
./share/man/cat1 missing (created)
./share/man/cat2 missing (created)
./share/man/cat3 missing (created)
./share/man/cat4 missing (created)
./share/man/cat5 missing (created)
./share/man/cat6 missing (created)
./share/man/cat7 missing (created)
./share/man/cat8 missing (created)
./share/man/cat9 missing (created)
./share/man/catl missing (created)
./share/man/catn missing (created)
./share/man/man1 missing (created)
./share/man/man2 missing (created)
./share/man/man3 missing (created)
./share/man/man4 missing (created)
./share/man/man5 missing (created)
./share/man/man6 missing (created)
./share/man/man7 missing (created)
./share/man/man8 missing (created)
./share/man/man9 missing (created)
./share/man/manl missing (created)
./share/man/mann missing (created)
./share/nls missing (created)
./share/nls/C missing (created)
./share/nls/af_ZA.ISO8859-1 missing (created)
./share/nls/af_ZA.ISO8859-15 missing (created)
./share/nls/bg_BG.CP1251 missing (created)
./share/nls/cs_CZ.ISO8859-2 missing (created)
./share/nls/da_DK.ISO8859-1 missing (created)
./share/nls/da_DK.ISO8859-15 missing (created)
./share/nls/de_AT.ISO8859-1 missing (created)
./share/nls/de_AT.ISO8859-15 missing (created)
./share/nls/de_CH.ISO8859-1 missing (created)
./share/nls/de_CH.ISO8859-15 missing (created)
./share/nls/de_DE.ISO8859-1 missing (created)
./share/nls/de_DE.ISO8859-15 missing (created)
./share/nls/el_GR.ISO8859-7 missing (created)
./share/nls/en_AU.ISO8859-1 missing (created)
./share/nls/en_AU.ISO8859-15 missing (created)
./share/nls/en_AU.US-ASCII missing (created)
./share/nls/en_CA.ISO8859-1 missing (created)
./share/nls/en_CA.ISO8859-15 missing (created)
./share/nls/en_CA.US-ASCII missing (created)
./share/nls/en_GB.ISO8859-1 missing (created)
./share/nls/en_GB.ISO8859-15 missing (created)
./share/nls/en_GB.US-ASCII missing (created)
./share/nls/en_NZ.ISO8859-1 missing (created)
./share/nls/en_NZ.ISO8859-15 missing (created)
./share/nls/en_NZ.US-ASCII missing (created)
./share/nls/en_US.ISO8859-1 missing (created)
./share/nls/en_US.ISO8859-15 missing (created)
./share/nls/es_ES.ISO8859-1 missing (created)
./share/nls/es_ES.ISO8859-15 missing (created)
./share/nls/et_EE.ISO8859-15 missing (created)
./share/nls/fi_FI.ISO8859-1 missing (created)
./share/nls/fi_FI.ISO8859-15 missing (created)
./share/nls/fr_BE.ISO8859-1 missing (created)
./share/nls/fr_BE.ISO8859-15 missing (created)
./share/nls/fr_CA.ISO8859-1 missing (created)
./share/nls/fr_CA.ISO8859-15 missing (created)
./share/nls/fr_CH.ISO8859-1 missing (created)
./share/nls/fr_CH.ISO8859-15 missing (created)
./share/nls/fr_FR.ISO8859-1 missing (created)
./share/nls/fr_FR.ISO8859-15 missing (created)
./share/nls/hi_IN.ISCII-DEV missing (created)
./share/nls/hr_HR.ISO8859-2 missing (created)
./share/nls/hu_HU.ISO8859-2 missing (created)
./share/nls/is_IS.ISO8859-1 missing (created)
./share/nls/is_IS.ISO8859-15 missing (created)
./share/nls/it_CH.ISO8859-1 missing (created)
./share/nls/it_CH.ISO8859-15 missing (created)
./share/nls/it_IT.ISO8859-1 missing (created)
./share/nls/it_IT.ISO8859-15 missing (created)
./share/nls/ja_JP.SJIS missing (created)
./share/nls/ja_JP.eucJP missing (created)
./share/nls/ko_KR.eucKR missing (created)
./share/nls/la_LN.ISO8859-1 missing (created)
./share/nls/la_LN.ISO8859-15 missing (created)
./share/nls/la_LN.ISO8859-2 missing (created)
./share/nls/la_LN.ISO8859-4 missing (created)
./share/nls/la_LN.US-ASCII missing (created)
./share/nls/lt_LT.ISO8859-4 missing (created)
./share/nls/nl_BE.ISO8859-1 missing (created)
./share/nls/nl_BE.ISO8859-15 missing (created)
./share/nls/nl_NL.ISO8859-1 missing (created)
./share/nls/nl_NL.ISO8859-15 missing (created)
./share/nls/no_NO.ISO8859-1 missing (created)
./share/nls/no_NO.ISO8859-15 missing (created)
./share/nls/pl_PL.ISO8859-2 missing (created)
./share/nls/pt_BR.ISO8859-1 missing (created)
./share/nls/pt_PT.ISO8859-1 missing (created)
./share/nls/pt_PT.ISO8859-15 missing (created)
./share/nls/ro_RO.ISO8859-2 missing (created)
./share/nls/ru_RU.CP866 missing (created)
./share/nls/ru_RU.ISO8859-5 missing (created)
./share/nls/ru_RU.KOI8-R missing (created)
./share/nls/sk_SK.ISO8859-2 missing (created)
./share/nls/sl_SI.ISO8859-2 missing (created)
./share/nls/sv_SE.ISO8859-1 missing (created)
./share/nls/sv_SE.ISO8859-15 missing (created)
./share/nls/tr_TR.ISO8859-9 missing (created)
./share/nls/uk_UA.ISO8859-5 missing (created)
./share/nls/uk_UA.KOI8-U missing (created)
./share/nls/zh_CN.eucCN missing (created)
./share/nls/zh_TW.Big5 missing (created)
./share/skel missing (created)
./var missing (created)
./var/cache missing (created)
./var/db missing (created)
./var/log missing (created)
./var/run missing (created)
./var/spool missing (created)
./www missing (created)
Error: Failed to destroot totp-cli: xinstall: Cannot stat: /opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/totp-cli, No such file or directory
Error: See /opt/local/var/macports/logs/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port totp-cli failed

Changed 10 months ago by RobK88

Attachment: Portfile.2 added

Portfile Fixed

Changed 10 months ago by RobK88

Attachment: main.log added

comment:8 Changed 10 months ago by RobK88

Here is what is happening when I try to build manually:

Grinchs-MacBook-Pro:~ grinch$ cd "/opt/local/var/macports/build/_Users_grinch_Development_MacPorts_local-repo_ports_security_totp-cli/totp-cli/work/gopath/src/github.com/yitsushi/totp-cli"

Grinchs-MacBook-Pro:totp-cli grinch$ /opt/local/bin/go build
go: downloading github.com/urfave/cli/v2 v2.25.7
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading filippo.io/age v1.1.1
go: downloading golang.org/x/term v0.11.0
go: downloading golang.org/x/crypto v0.12.0
go: downloading golang.org/x/sys v0.11.0
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
go: downloading github.com/russross/blackfriday/v2 v2.1.0
github.com/yitsushi/totp-cli: go build github.com/yitsushi/totp-cli: copying /var/folders/lh/w8n_hz2d4tqdvlpdkjkh63tc0000gp/T/go-build1536402953/b001/exe/a.out: open totp-cli: permission denied

Any ideas?

comment:9 Changed 10 months ago by RobK88

I added the github.com/russross/blackfriday/v2 v2.1.0 package to the Portfile since it appears that it is being used. See the attached Portfile v3. But still no luck building.

Changed 10 months ago by RobK88

Attachment: Portfile.3 added

Portfile v3

comment:10 Changed 10 months ago by RobK88

Success. I got it to build with the attached Portfile v4.

P.S. You will notice that the program reports the wrong version number. I have reported the bug upstream. See https://github.com/yitsushi/totp-cli/issues/98

Grinchs-MacBook-Pro:~ grinch$ sudo port clean totp-cli
--->  Cleaning totp-cli

Grinchs-MacBook-Pro:~ grinch$ sudo port install  totp-cli
--->  Computing dependencies for totp-cli
--->  Fetching distfiles for totp-cli
--->  Verifying checksums for totp-cli
--->  Extracting totp-cli
--->  Configuring totp-cli
--->  Building totp-cli
--->  Staging totp-cli into destroot
--->  Installing totp-cli @1.8.2_0
--->  Activating totp-cli @1.8.2_0
--->  Cleaning totp-cli
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.

Grinchs-MacBook-Pro:~ grinch$ totp-cli --version
totp-cli version v1.8.0

Changed 10 months ago by RobK88

Attachment: Portfile.4 added

Portfile v4 -- This Portfile actually works!!

comment:11 Changed 10 months ago by RobK88

Time for bed. Tomorrow I will submit a Pull Request for the updated version.

comment:12 Changed 10 months ago by RobK88

Attached is version 5 of the Portfile. I got rid of some unneeded go packages.

Changed 10 months ago by RobK88

Attachment: Portfile.5 added

Portfile v5 - Streamlined. This also works!

comment:13 Changed 10 months ago by RobK88

Pull Request (PR) has been submitted!

See https://github.com/macports/macports-ports/pull/21342

Last edited 10 months ago by RobK88 (previous) (diff)

comment:14 Changed 10 months ago by RobK88

Owner: set to RobK88
Resolution: fixed
Status: newclosed

In 65f29ed62fc26c358a907de133e8239537514ba9/macports-ports (master):

totp-cli: update to version 1.8.2

  • Update go.setup in Portfile to version 1.8.2
  • Update the go packages in go.vendors in the Portfile to the latest versions
  • Remove unneeded go packages in go.vendors in the Portfile
  • Add the "gitHub.com/urfave/cli" go package to go.vendors in the Portfile
  • Add the "github.com/cpuguy83/go-md2man" go package to go.vendors in the Portfile
  • Add the "github.com/xrash/smetrics" go package to go.vendors in the Portfile
  • Add the "github.com/russross/blackfriday" go package to go.vendors in the Portfile
  • Add the "github.com/FiloSottile/age" go package to go.vendors in the Portfile
  • Add post-extract code block to the Portfile with a symlink for the "filippo.io/age" go package pointing to the "github.com/FiloSottile/age" go package (since go-vendors cannot handle packages from filippo.io)

CLOSES: #68676

Note: See TracTickets for help on using tickets.