Opened 4 years ago

Closed 5 months ago

#62591 closed defect (fixed)

golang portgroup sets checksums incorrectly for go.vendors

Reported by: gpanders (Gregory Anders) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kurthindenburg (Kurt Hindenburg)
Port:

Description (last modified by kurthindenburg (Kurt Hindenburg))

Consider the cloudflared Portfile (I just picked this one at random, but the result is the same for any port using go.vendors). If you run 'port lint' on this port, you get the following:

--->  Verifying Portfile for cloudflared
Warning: capnproto-go-capnproto2-v2.18.0.tar.gz - missing recommended checksum type: sha256
Warning: capnproto-go-capnproto2-v2.18.0.tar.gz - missing recommended checksum type: size

Even though the go.vendors field in the Portfile does in fact contain all of the recommended checksum types for each entry.

Change History (3)

comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

port lint is not very smart. It just reads a portfile line by line and tries to inform of common pitfalls. It does not know Tcl. The way that it looks for checksums is to analyze the checksums line only. Ports using go.vendors define their checksums not in the checksums line but in the go.vendors line, hence port lint does not know about them.

comment:2 Changed 4 years ago by kurthindenburg (Kurt Hindenburg)

Cc: kurthindenburg added
Description: modified (diff)
Summary: port lint incorrectly warns about missing checksums in go.vendorsport lint incorrectly warns about missing checksums in go.vendors and cargo.crates

For reference from https://github.com/macports/macports-ports/pull/10573

This is a known issue for Go ports which use go.vendors and Rust ports which use cargo.crates.

go.vendors and cargo.crates are mechanisms implemented within the Go and cargo portgroups that aren't native MacPorts keywords - they in turn make modifications to distnames, checksums, etc., but I guess not in a way that satisfies port lint.

comment:3 Changed 5 months ago by jmroot (Joshua Root)

Component: baseports
Resolution: fixed
Status: newclosed
Summary: port lint incorrectly warns about missing checksums in go.vendors and cargo.cratesgolang portgroup sets checksums incorrectly for go.vendors

Lint was right, the checksums weren't set correctly. Fixed in [0f40d5544026499bddb517bdc3b2ff0abee64483/macports-ports].

The rust portgroup doesn't appear to support setting anything other than sha256 with cargo.crates, so lint is also right about that.

Note: See TracTickets for help on using tickets.