Skip to content

New package: payload-dumper-go-1.3.0#60047

Open
r0man1an wants to merge 1 commit intovoid-linux:masterfrom
r0man1an:master
Open

New package: payload-dumper-go-1.3.0#60047
r0man1an wants to merge 1 commit intovoid-linux:masterfrom
r0man1an:master

Conversation

@r0man1an
Copy link
Copy Markdown

@r0man1an r0man1an commented Apr 19, 2026

Testing the changes

  • I tested the changes in this PR: YES

New package

Local build testing

  • I built this PR locally for my native architecture, x86_64-glibc

@r0man1an
Copy link
Copy Markdown
Author

Did not expect that. I will have a look into it

Comment thread srcpkgs/payload-dumper-go/template Outdated
pkgname=payload-dumper-go
version=1.3.0
revision=1
archs="x86_64* aarch64*"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt that this is the correct solution.
Looked more like zstd dependency was missing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the used gozstd go module is pretty bad and ships binaries in the repo that are linked into the program. This is why it won't work with musl.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package works around it by dynamically linking system libzstd:

# dynamically link system zstd
vsed -i 's/#cgo LDFLAGS:.*/#cgo LDFLAGS: -lzstd/' \
vendor/github.com/valyala/gozstd/libzstd_*.go
cp vendor/github.com/valyala/gozstd/libzstd_linux_amd64.go \
vendor/github.com/valyala/gozstd/libzstd.go

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, makes sense. I'll apply the same fix from victoria-metrics to link against system libzstd and update the template. Thanks for the help, have a nice evening.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested locally on x86_64 successfully.
The x86_64-musl build fails here due to a broken cross-x86_64-linux-musl toolchain in my local xbps-src env, so I couldn’t validate musl locally.
The change itself is limited to linking against system zstd as suggested

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of cross compiling for x86_64-musl, use ./xbps-src -A x86_64-musl pkg payload-dumper-go.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I will review all failing points and hopefully fix them.

@tranzystorekk tranzystorekk added the new-package This PR adds a new package label Apr 19, 2026
@r0man1an r0man1an requested a review from Duncaen April 19, 2026 21:00
Comment thread srcpkgs/payload-dumper-go/template Outdated

go_build_tags=""

do_prepare() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do_prepare is not a functions that exists. This should be pre_build or something like that.

But I think you also need to run go mod vendor so that the file actually exists for patching.

@r0man1an r0man1an force-pushed the master branch 2 times, most recently from 4d4bc1b to ce26a01 Compare April 19, 2026 22:19
@r0man1an
Copy link
Copy Markdown
Author

All issues on musl that I could test were resolved

@r0man1an r0man1an requested a review from Duncaen April 19, 2026 22:21
Comment thread srcpkgs/payload-dumper-go/template Outdated
makedepends="liblzma-devel libzstd-devel"

pre_build() {
cd ${wrksrc}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrksrc is the default directory.

@r0man1an
Copy link
Copy Markdown
Author

Okay only one build failed and Lint is an easy fix.

@Duncaen
Copy link
Copy Markdown
Member

Duncaen commented Apr 19, 2026

makedepends should be above short_desc, you can use xnew from xtools to create a template with the right order the next time: https://github.com/leahneukirchen/xtools/blob/55cdf10841c128c2ad36a345a37f186b93824d4a/xnew#L42-L63

@Duncaen
Copy link
Copy Markdown
Member

Duncaen commented Apr 19, 2026

xtools also has xlint so you can run that locally.

@r0man1an
Copy link
Copy Markdown
Author

Really appreciate you taking the time to walk me through all of this and being so patient, even when I didn’t get it right the first few times. I’m still new to Void packaging, so it genuinely helped a lot to have it explained properly. Thanks again.

@r0man1an r0man1an force-pushed the master branch 3 times, most recently from 83c1fca to 3de3ac6 Compare April 19, 2026 23:22
@r0man1an
Copy link
Copy Markdown
Author

xlint is happy now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package This PR adds a new package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants