canonical / snapcraft-rocks

Sources for Snapcraft as OCI images, maintained by the Starcraft team
GNU General Public License v3.0
4 stars 3 forks source link

Snapcraft cannot authenticate proxy.golang.org #34

Open zyga opened 5 months ago

zyga commented 5 months ago

I was trying to build my toy snap with this but along the way this failed with:

2024-04-10T16:01:51.966Z [snapcraft] :: go: golang.org/x/exp@v0.0.0-20231006140011-7918f672742d: Get "https://proxy.golang.org/golang.org/x/exp/@v/v0.0.0-20231006140011-7918f672742d.info": x509: certificate signed by unknown authority

I bet this is related to ca-certificates that are in the container.

lengau commented 5 months ago

Thanks for the report! Which base did you get this on? (I presume core22?)

zyga commented 5 months ago

Yes, this was on core22

tigarmo commented 5 months ago

Which image exactly is this? Is it 7_core22? If so, can you try with 8_core22?

zyga commented 5 months ago

yes, this was with 7_core22, trying 8_core22 now:

zyga@Hobbes netota % vim snap/snapcraft.yaml 
zyga@Hobbes netota % docker run -it -v `pwd`:/project ghcr.io/canonical/snapcraft:7_core22 
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
2024-04-16T16:07:00.271Z [pebble] Started daemon.
2024-04-16T16:07:00.295Z [pebble] POST /v1/services 4.480125ms 202
2024-04-16T16:07:00.298Z [pebble] Started default services with change 1.
2024-04-16T16:07:00.298Z [pebble] Service "snapcraft" starting: /bin/run-snapcraft.sh [ pack ]
2024-04-16T16:07:00.341Z [snapcraft] 
2024-04-16T16:07:00.341Z [snapcraft] WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
2024-04-16T16:07:00.341Z [snapcraft] 
2024-04-16T16:07:00.647Z [snapcraft] Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
2024-04-16T16:07:00.661Z [snapcraft] Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
2024-04-16T16:07:01.279Z [snapcraft] Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
2024-04-16T16:07:01.421Z [snapcraft] Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
2024-04-16T16:07:01.429Z [snapcraft] Get:5 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [2135 kB]
2024-04-16T16:07:01.853Z [snapcraft] Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1695 kB]
2024-04-16T16:07:02.000Z [snapcraft] Get:7 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1082 kB]
2024-04-16T16:07:02.007Z [snapcraft] Get:8 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.7 kB]
2024-04-16T16:07:02.057Z [snapcraft] Get:9 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
2024-04-16T16:07:02.821Z [snapcraft] Get:10 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
2024-04-16T16:07:02.851Z [snapcraft] Get:11 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
2024-04-16T16:07:03.982Z [snapcraft] Get:12 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
2024-04-16T16:07:03.984Z [snapcraft] Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [2176 kB]
2024-04-16T16:07:04.104Z [snapcraft] Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1375 kB]
2024-04-16T16:07:04.154Z [snapcraft] Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [61.3 kB]
2024-04-16T16:07:04.155Z [snapcraft] Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1975 kB]
2024-04-16T16:07:04.368Z [snapcraft] Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [33.3 kB]
2024-04-16T16:07:04.368Z [snapcraft] Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [80.9 kB]
2024-04-16T16:07:04.986Z [snapcraft] Fetched 31.0 MB in 5s (6764 kB/s)
2024-04-16T16:07:04.986Z [snapcraft] Reading package lists...
2024-04-16T16:07:05.542Z [snapcraft] Building dependency tree...
2024-04-16T16:07:05.638Z [snapcraft] Reading state information...
2024-04-16T16:07:05.647Z [snapcraft] 13 packages can be upgraded. Run 'apt list --upgradable' to see them.
2024-04-16T16:07:06.752Z [snapcraft] Starting Snapcraft 7.5.5
2024-04-16T16:07:06.752Z [snapcraft] Logging execution to '/root/.local/state/snapcraft/log/snapcraft-20240416-160706.748947.log'
2024-04-16T16:07:06.767Z [snapcraft] Running on amd64 for amd64
2024-04-16T16:07:06.773Z [snapcraft] The 'snap' directory is meant specifically for snapcraft, but it contains
2024-04-16T16:07:06.773Z [snapcraft] the following non-snapcraft-related paths:
2024-04-16T16:07:06.773Z [snapcraft] - README.md
2024-04-16T16:07:06.773Z [snapcraft] 
2024-04-16T16:07:06.773Z [snapcraft] This is unsupported and may cause unexpected behavior. If you must store
2024-04-16T16:07:06.773Z [snapcraft] these files within the 'snap' directory, move them to 'snap/local'
2024-04-16T16:07:06.773Z [snapcraft] which is ignored by snapcraft.
2024-04-16T16:07:06.774Z [snapcraft] Initializing parts lifecycle
2024-04-16T16:07:06.778Z [snapcraft] Executing parts lifecycle...
2024-04-16T16:07:25.781Z [snapcraft] The following snaps are required but not installed as the application is running inside docker or podman container: core22.
2024-04-16T16:07:25.781Z [snapcraft] Please ensure the environment is properly setup before continuing.
2024-04-16T16:07:25.781Z [snapcraft] Ignore this message if the appropriate measures have already been taken.
2024-04-16T16:07:25.844Z [snapcraft] Executing parts lifecycle: pull netota
2024-04-16T16:07:25.844Z [snapcraft] Executing action
2024-04-16T16:07:25.872Z [snapcraft] :: + craftctl default
2024-04-16T16:07:26.369Z [snapcraft] :: + grade=devel
2024-04-16T16:07:26.371Z [snapcraft] :: ++ git describe --tags --abbrev=0
2024-04-16T16:07:26.407Z [snapcraft] :: + tag=v0.3.3
2024-04-16T16:07:26.408Z [snapcraft] :: ++ git rev-parse --short HEAD
2024-04-16T16:07:26.434Z [snapcraft] :: + hash=8ee3aeb
2024-04-16T16:07:26.434Z [snapcraft] :: + '[' -n v0.3.3 ']'
2024-04-16T16:07:26.435Z [snapcraft] :: ++ git rev-list v0.3.3.. --count
2024-04-16T16:07:26.471Z [snapcraft] :: + count=0
2024-04-16T16:07:26.471Z [snapcraft] :: + '[' 0 -eq 0 ']'
2024-04-16T16:07:26.472Z [snapcraft] :: + version=v0.3.3
2024-04-16T16:07:26.472Z [snapcraft] :: + grade=stable
2024-04-16T16:07:26.472Z [snapcraft] :: + craftctl set grade=stable
2024-04-16T16:07:26.888Z [snapcraft] :: + craftctl set version=v0.3.3
2024-04-16T16:07:27.497Z [snapcraft] Executed: pull netota
2024-04-16T16:07:27.497Z [snapcraft] Executing parts lifecycle: build netota
2024-04-16T16:07:27.497Z [snapcraft] Executing action
2024-04-16T16:07:27.749Z [snapcraft] :: + craftctl default
2024-04-16T16:07:28.161Z [snapcraft] :: + go mod download all
2024-04-16T16:07:29.150Z [snapcraft] :: go: gitlab.com/zygoon/go-cmdr@v1.9.0: Get "https://proxy.golang.org/gitlab.com/zygoon/go-cmdr/@v/v1.9.0.info": x509: certificate signed by unknown authority
2024-04-16T16:07:29.150Z [snapcraft] :: go: gitlab.com/zygoon/go-ini@v1.2.0: Get "https://proxy.golang.org/gitlab.com/zygoon/go-ini/@v/v1.2.0.info": x509: certificate signed by unknown authority
2024-04-16T16:07:29.150Z [snapcraft] :: go: golang.org/x/sys@v0.19.0: Get "https://proxy.golang.org/golang.org/x/sys/@v/v0.19.0.info": x509: certificate signed by unknown authority
2024-04-16T16:07:29.150Z [snapcraft] :: go: gopkg.in/yaml.v3@v3.0.1: Get "https://proxy.golang.org/gopkg.in/yaml.v3/@v/v3.0.1.info": x509: certificate signed by unknown authority
2024-04-16T16:07:29.161Z [snapcraft] :: error: Failed to run the build script for part 'netota'.
2024-04-16T16:07:29.364Z [snapcraft] 'override-build' in part 'netota' failed with code 1.
2024-04-16T16:07:29.364Z [snapcraft] Review the scriptlet and make sure it's correct.
2024-04-16T16:07:29.373Z [snapcraft] Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20240416-160706.748947.log'
2024-04-16T16:07:29.494Z [pebble] Service "snapcraft" stopped unexpectedly with code 1
2024-04-16T16:07:29.494Z [pebble] Service "snapcraft" on-failure action is "shutdown", triggering failure shutdown
2024-04-16T16:07:29.494Z [pebble] Server exiting!

Same failure mode.