Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] aws-vault: go build pulls old version of itself
@ 2021-01-05 14:15 vixus0
  2021-01-05 14:31 ` ericonr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: vixus0 @ 2021-01-05 14:15 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 4870 bytes --]

New issue by vixus0 on void-packages repository

https://github.com/void-linux/void-packages/issues/27688

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  Void 5.9.16_1 x86_64 GenuineIntel notuptodate rFF
* package:  aws-vault-6.2.0_1

### Expected behavior

I coincidentally discovered this issue while trying some newer functionality available in recent versions of aws-vault.

Here's the correct output using a manual `go build .` from the archive downloaded into `hostddir/sources`:

```
❯ ./aws-vault --backend=file --debug login sso-dev
2021/01/05 15:00:54 aws-vault dev
2021/01/05 15:00:54 [keyring] Considering backends: [file]
2021/01/05 15:00:54 Loading config file $HOME/.aws/config
2021/01/05 15:00:54 Parsing config file $HOME/.aws/config
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:55 Created new OIDC client (expires at: 2021-04-05 16:00:54 +0200 CEST)
2021/01/05 15:00:55 Created OIDC device code for https://xxxx.awsapps.com/start (expires in: 600s)
2021/01/05 15:00:55 Opening SSO authorization page in browser
Opening the SSO authorization page in your default browser (use Ctrl-C to abort)
https://device.sso.eu-west-1.amazonaws.com/?user_code=XXXX
```

### Actual behavior

Incorrect output from the binary built by the package.

```
❯ /usr/bin/aws-vault --backend=file --debug login sso-dev
2021/01/05 15:04:39 [keyring] Considering backends: [file]
2021/01/05 15:04:39 Loading config file $HOME/.aws/config
2021/01/05 15:04:39 Parsing config file $HOME/.aws/config
2021/01/05 15:04:39 Skipping session token and using master credentials directly
2021/01/05 15:04:39 Looking up keyring for sso-dev
2021/01/05 15:04:39 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:04:39 Error from keyring The specified item could not be found in the keyring
2021/01/05 15:04:39 Failed to find credentials for profile "sso-dev" in keyring
aws-vault: error: Failed to get credentials for sso-dev: The specified item could not be found in the keyring
```

### Steps to reproduce the behavior

It's sufficient to search for the string `Skipping session token` in the resulting aws-vault binary because it was removed from the source in 2019 but shows up in the latest void-packages build:

```sh
grep 'Skipping session token' /usr/bin/aws-vault
grep: /usr/bin/aws-vault: binary file matches # we don't want this
```

### Additional information

I tracked the issue down to the go modules that get populated during the `xbps-src` build.
The output of `go mod graph | grep 99designs/aws-vault` reveals an old v4.5.1 version of the module being pulled in.

```
github.com/99designs/aws-vault/v6 github.com/99designs/aws-vault@v4.5.1+incompatible
github.com/99designs/aws-vault/v6 github.com/99designs/keyring@v1.1.6
github.com/99designs/aws-vault/v6 github.com/alecthomas/kingpin@v0.0.0-20200323085623-b6657d9477a6
github.com/99designs/aws-vault/v6 github.com/alecthomas/template@v0.0.0-20190718012654-fb15b899a751
github.com/99designs/aws-vault/v6 github.com/alecthomas/units@v0.0.0-20190924025748-f65c72e2690d
github.com/99designs/aws-vault/v6 github.com/aws/aws-sdk-go@v1.34.13
github.com/99designs/aws-vault/v6 github.com/danieljoos/wincred@v1.1.0
github.com/99designs/aws-vault/v6 github.com/go-ini/ini@v1.62.0
github.com/99designs/aws-vault/v6 github.com/google/go-cmp@v0.5.2
github.com/99designs/aws-vault/v6 github.com/keybase/go-keychain@v0.0.0-20200502122510-cda31fe0c86d
github.com/99designs/aws-vault/v6 github.com/mitchellh/go-homedir@v1.1.0
github.com/99designs/aws-vault/v6 github.com/mtibben/androiddnsfix@v0.0.0-20200907095054-ff0280446354
github.com/99designs/aws-vault/v6 github.com/skratchdot/open-golang@v0.0.0-20200116055534-eef842397966
github.com/99designs/aws-vault/v6 github.com/smartystreets/goconvey@v1.6.4
github.com/99designs/aws-vault/v6 golang.org/x/crypto@v0.0.0-20200820211705-5c72a883971a
github.com/99designs/aws-vault/v6 golang.org/x/sys@v0.0.0-20200923182605-d9f96fdee20d
github.com/99designs/aws-vault/v6 gopkg.in/alecthomas/kingpin.v2@v2.2.6
github.com/99designs/aws-vault/v6 gopkg.in/ini.v1@v1.60.2
```

This doesn't appear when we just run `go build .` in the source directory, so there must be something in xbps-src's go build method that causes this. I'll do some more investigation and add anything I find here.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: aws-vault: go build pulls old version of itself
  2021-01-05 14:15 [ISSUE] aws-vault: go build pulls old version of itself vixus0
@ 2021-01-05 14:31 ` ericonr
  2021-01-05 15:01 ` vixus0
  2021-01-05 15:07 ` [ISSUE] [CLOSED] " ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2021-01-05 14:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 319 bytes --]

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/issues/27688#issuecomment-754670747

Comment:
The only relevant command is likely to be

```
		go install -p "$XBPS_MAKEJOBS" -mod="${go_mod_mode}" -x -tags "${go_build_tags}" -ldflags "${go_ldflags}" ${go_package}
```

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: aws-vault: go build pulls old version of itself
  2021-01-05 14:15 [ISSUE] aws-vault: go build pulls old version of itself vixus0
  2021-01-05 14:31 ` ericonr
@ 2021-01-05 15:01 ` vixus0
  2021-01-05 15:07 ` [ISSUE] [CLOSED] " ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: vixus0 @ 2021-01-05 15:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 210 bytes --]

New comment by vixus0 on void-packages repository

https://github.com/void-linux/void-packages/issues/27688#issuecomment-754689287

Comment:
Figured out the issue, looks like the root package name had changed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ISSUE] [CLOSED] aws-vault: go build pulls old version of itself
  2021-01-05 14:15 [ISSUE] aws-vault: go build pulls old version of itself vixus0
  2021-01-05 14:31 ` ericonr
  2021-01-05 15:01 ` vixus0
@ 2021-01-05 15:07 ` ericonr
  2 siblings, 0 replies; 4+ messages in thread
From: ericonr @ 2021-01-05 15:07 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 4873 bytes --]

Closed issue by vixus0 on void-packages repository

https://github.com/void-linux/void-packages/issues/27688

Description:
<!-- Don't request update of package. We have a script for that. https://alpha.de.repo.voidlinux.org/void-updates/void-updates.txt . However, a quality pull request may help. -->
### System

* xuname:  Void 5.9.16_1 x86_64 GenuineIntel notuptodate rFF
* package:  aws-vault-6.2.0_1

### Expected behavior

I coincidentally discovered this issue while trying some newer functionality available in recent versions of aws-vault.

Here's the correct output using a manual `go build .` from the archive downloaded into `hostddir/sources`:

```
❯ ./aws-vault --backend=file --debug login sso-dev
2021/01/05 15:00:54 aws-vault dev
2021/01/05 15:00:54 [keyring] Considering backends: [file]
2021/01/05 15:00:54 Loading config file $HOME/.aws/config
2021/01/05 15:00:54 Parsing config file $HOME/.aws/config
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:54 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:00:55 Created new OIDC client (expires at: 2021-04-05 16:00:54 +0200 CEST)
2021/01/05 15:00:55 Created OIDC device code for https://xxxx.awsapps.com/start (expires in: 600s)
2021/01/05 15:00:55 Opening SSO authorization page in browser
Opening the SSO authorization page in your default browser (use Ctrl-C to abort)
https://device.sso.eu-west-1.amazonaws.com/?user_code=XXXX
```

### Actual behavior

Incorrect output from the binary built by the package.

```
❯ /usr/bin/aws-vault --backend=file --debug login sso-dev
2021/01/05 15:04:39 [keyring] Considering backends: [file]
2021/01/05 15:04:39 Loading config file $HOME/.aws/config
2021/01/05 15:04:39 Parsing config file $HOME/.aws/config
2021/01/05 15:04:39 Skipping session token and using master credentials directly
2021/01/05 15:04:39 Looking up keyring for sso-dev
2021/01/05 15:04:39 [keyring] Expanded file dir to $HOME/.awsvault/keys/
2021/01/05 15:04:39 Error from keyring The specified item could not be found in the keyring
2021/01/05 15:04:39 Failed to find credentials for profile "sso-dev" in keyring
aws-vault: error: Failed to get credentials for sso-dev: The specified item could not be found in the keyring
```

### Steps to reproduce the behavior

It's sufficient to search for the string `Skipping session token` in the resulting aws-vault binary because it was removed from the source in 2019 but shows up in the latest void-packages build:

```sh
grep 'Skipping session token' /usr/bin/aws-vault
grep: /usr/bin/aws-vault: binary file matches # we don't want this
```

### Additional information

I tracked the issue down to the go modules that get populated during the `xbps-src` build.
The output of `go mod graph | grep 99designs/aws-vault` reveals an old v4.5.1 version of the module being pulled in.

```
github.com/99designs/aws-vault/v6 github.com/99designs/aws-vault@v4.5.1+incompatible
github.com/99designs/aws-vault/v6 github.com/99designs/keyring@v1.1.6
github.com/99designs/aws-vault/v6 github.com/alecthomas/kingpin@v0.0.0-20200323085623-b6657d9477a6
github.com/99designs/aws-vault/v6 github.com/alecthomas/template@v0.0.0-20190718012654-fb15b899a751
github.com/99designs/aws-vault/v6 github.com/alecthomas/units@v0.0.0-20190924025748-f65c72e2690d
github.com/99designs/aws-vault/v6 github.com/aws/aws-sdk-go@v1.34.13
github.com/99designs/aws-vault/v6 github.com/danieljoos/wincred@v1.1.0
github.com/99designs/aws-vault/v6 github.com/go-ini/ini@v1.62.0
github.com/99designs/aws-vault/v6 github.com/google/go-cmp@v0.5.2
github.com/99designs/aws-vault/v6 github.com/keybase/go-keychain@v0.0.0-20200502122510-cda31fe0c86d
github.com/99designs/aws-vault/v6 github.com/mitchellh/go-homedir@v1.1.0
github.com/99designs/aws-vault/v6 github.com/mtibben/androiddnsfix@v0.0.0-20200907095054-ff0280446354
github.com/99designs/aws-vault/v6 github.com/skratchdot/open-golang@v0.0.0-20200116055534-eef842397966
github.com/99designs/aws-vault/v6 github.com/smartystreets/goconvey@v1.6.4
github.com/99designs/aws-vault/v6 golang.org/x/crypto@v0.0.0-20200820211705-5c72a883971a
github.com/99designs/aws-vault/v6 golang.org/x/sys@v0.0.0-20200923182605-d9f96fdee20d
github.com/99designs/aws-vault/v6 gopkg.in/alecthomas/kingpin.v2@v2.2.6
github.com/99designs/aws-vault/v6 gopkg.in/ini.v1@v1.60.2
```

This doesn't appear when we just run `go build .` in the source directory, so there must be something in xbps-src's go build method that causes this. I'll do some more investigation and add anything I find here.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-05 15:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 14:15 [ISSUE] aws-vault: go build pulls old version of itself vixus0
2021-01-05 14:31 ` ericonr
2021-01-05 15:01 ` vixus0
2021-01-05 15:07 ` [ISSUE] [CLOSED] " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).