Kurt Mosiejczuk <[email protected]> writes:
> Whenever I update a port or create a new one, to verify the hashes I have
> to run sha256(1) or md5(1) on the distfile. makesum does display our SHA256
> has, but we use base64 format and everywhere else (that I've interacted with)
> uses hexadecimal format.
>
> This diff makes the makesum target spit out hexadecimal formatted MD5 and
> SHA256 hashes for each distfile. I included md5 because, sadly, a number of
> projects still only provide an MD5 hash for verification.
>
> I've tested this with ports with both a single distfile and multiple
> distfiles.
How many is multiple? :D - the Go stuff is gonna get ugly(er?)!
net/go-ipfs for example, the output is useless because it's so big :D
Maybe it can be conditional.. somehow?
>
> ok?
>
> --Kurt
>
> Index: bsd.port.mk
> ===================================================================
> RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
> retrieving revision 1.1555
> diff -u -p -r1.1555 bsd.port.mk
> --- bsd.port.mk 3 May 2021 17:53:15 -0000 1.1555
> +++ bsd.port.mk 3 Sep 2021 17:32:50 -0000
> @@ -2249,6 +2249,8 @@ makesum:
> done; \
> sort -u -o $$ck $$ck; \
> diff -Lold -Lnew -u ${CHECKSUM_FILE} $$ck 2>/dev/null|| true; \
> + md5 ${MAKESUMFILES}; \
> + sha256 ${MAKESUMFILES}; \
> mv -f $$ck ${CHECKSUM_FILE}
> .endif
>