tech-pkg archive

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

Re: grafana hits pkgsrc limits again



* On 2024-07-09 at 16:03 BST, Thomas Klausner wrote:

On Tue, Jul 09, 2024 at 01:44:35PM +0100, Jonathan Perkin wrote:
Try these two patches:

  https://github.com/TritonDataCenter/pkgsrc/compare/release/trunk...TritonDataCenter:pkgsrc:feature/parallel-digest/trunk

This implements threaded mode in digest, as well as adding an -F flag which
changes the behaviour of data coming in to be a list of filenames to
checksum.

That's really neat!

The patch is incomplete though:

--- digest ---
gcc -O2 -g -fstack-clash-protection -Wl,-zrelro -Wl,-znow -Wl,-R/usr/pkg/lib -o digest digest.o keccak.o md5c.o md5hl.o rmd160.o  rmd160hl.o sha1.o sha1hl.o sha2.o sha2hl.o sha3.o sha3hl.o  tiger.o whirlpool.o blake2b.o blake2b-hl.o blake2s.o blake2s-hl.o
ld: digest.o: in function `main':
/scratch/pkgtools/digest/work/digest-20220214/digest.c:318: undefined reference to `pthread_create'
*** [digest] Error code 1

Ah I've not tested NetBSD yet, just macOS and SmartOS.

Does adding mk/pthread.buildlink3.mk to digest's Makefile help?

That should avoid having to use temporary files (which could be tricky as we
might not have WRKDIR created), as well as providing a decent performance
improvement on most machines.

For 'make distinfo' we create a file in the pkgsrc directory of the package.

We do, but for 'make checksum' we can't do that (would break read-only source trees) and we don't have a WRKDIR available for temporary files.

I'd do something like replacing:

  if cd ${DISTDIR} && ${_CHECKSUM_CMD} ${DISTINFO_FILE:tA} ${_CKSUMFILES}; then \

with:

  cd ${DISTDIR}; { \
    ${_CKSUMFILES:@f@echo ${f};@} \
  } | ${_CHECKSUM_CMD} ${DISTINFO_FILE:tA}; \

and update checksum.awk to handle files from stdin instead.
--
Jonathan Perkin   -   mnx.io   -   pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index