pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/60796 (pkgsrc: distinfo.awk writes a corrupt distinfo when a tool produces no output)



Hi Taylor,

I'm sorry for taking up your time with this.  You're right that
TOOLS_DIGEST=true is not a real scenario, and I should not have made
it the whole report.

What I actually hit was in CI, in freshly bootstrapped pkgsrc on
FreeBSD 14.4 and NetBSD 11.0 amd64 VMs.  After replacing one patch
in security/polkit, makepatchsum left distinfo with lines run
together,

  SHA1 (patch-src_polkitagent_polkitagenthelper-pam.c) = SHA1 (patch-src_polkit_polkitunixprocess.c) = ...

and make returned 0.  The next build skipped the patch as "invalid
checksum" and failed with the very errors the patch fixes.  The logs
are here:

  https://github.com/zakinko/pkgsrc-zakinko/actions/runs/35798846904  (FreeBSD)
  https://github.com/zakinko/pkgsrc-zakinko/actions/runs/35799000991  (NetBSD)

The same steps on my own NetBSD machine worked, and I never found
out why digest printed nothing in those VMs; I had discarded
makepatchsum's stderr.  So it is the XY situation you describe: I
worked around it there and reported the symptom without finding the
cause.  TOOLS_DIGEST=true was only my way of reproducing the
symptom.

For some context, I left my job in April and start a new one in
October, and with the deadline for setting up my new work machines
close, I was sloppier with the reproduction than I should have been.
Again, I'm sorry for the trouble.

Best,
Showta

> 2026/09/30 6:57、riastradh%netbsd.org@localhost <riastradh%NetBSD.org@localhost>のメール:
> 
> Synopsis: pkgsrc: distinfo.awk writes a corrupt distinfo when a tool produces no output
> 
> State-Changed-From-To: open->closed
> State-Changed-By: riastradh%NetBSD.org@localhost
> State-Changed-When: Tue, 29 Sep 2026 21:57:52 +0000
> State-Changed-Why:
>> 	  DIGEST=true ...:  8 lines, "SHA1 (" 15 times, 4 lines damaged,
>> 	                    the SHA512 lines gone, exit 1
>> 	  WC=true ...:      "Size (a.tar.gz) = $NetBSD$ bytes" twice, exit 1
>> 
>> 	In a package directory the patch case is
>> 
>> 	  make TOOLS_DIGEST=true makepatchsum
> 
> Yes, if you set the variables for internal tools to point at programs
> that...are not those tools, and do not behave like those tools, the
> results will not be sensible.  I bet your packages will get built wrong
> if you also set CC=true, RM=true, MV=true, and LN=true!
> 
> Solution: don't set TOOLS_DIGEST=true.
> 
> Why did you file this bug?  Did you somehow come upon a scenario where
> TOOLS_DIGEST gets set to true?  If so, this is what we call an `XY
> problem': you stumbled upon a problem X (TOOLS_DIGEST got set to true),
> you observed symptom Y (digest is silently built wrong), and you asked
> for help with putting a band-aid on symptom Y instead of figuring out
> why X is happening.
> 
> Or did you prompt an LLM to find bugs in pkgsrc and just copy & paste
> its hallucinations for NetBSD and pkgsrc developers to waste their time
> on?  If you did that, please don't.
> 
> 
> 



Home | Main Index | Thread Index | Old Index