Repository navigation
How to use different bindir depending on package format? #659
Replies: 2 comments
contents:
- src: './dist/foo_{{ .Os }}_{{ .Arch }}' # check your ./dist to see the paths et al
dst: /usr/lib/wireshark/extcap/foo
packager: apk
- src: './dist/foo_{{ .Os }}_{{ .Arch }}' # check your ./dist to see the paths et al
dst: /usr/lib/x86_64-linux-gnu/wireshark/extcap/foo
packager: deb
- src: './dist/foo_{{ .Os }}_{{ .Arch }}' # check your ./dist to see the paths et al
dst: /usr/lib/wireshark/extcap/foo
packager: rpm |
0 replies
Answer selected by
caarlos0
|
@djgilcrease Thank you very much! That set me on the right track. Below is what I've successfully in use now: this correctly handles the deb odd cpu architecture in the lib paths. Fortunately, my Wireshark extcap plugin only supports 64bit and only Intel/AMD and ARM. Maybe RISC-V in the future, we'll wait and see. formats:
- apk
- deb
- rpm
meta: true
contents:
- packager: apk
src: 'dist/default_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Amd64 }}_{{ . }}{{ end }}/fooextcap'
dst: /usr/lib/wireshark/extcap/
file_info:
mode: 0755
- packager: deb
src: 'dist/default_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Amd64 }}_{{ . }}{{ end }}/fooextcap'
dst: /usr/lib/{{ if eq .Arch "amd64"}}x86_64{{ end }}{{ if eq .Arch "arm64"}}aarch64{{ end }}-linux-gnu/wireshark/extcap/
file_info:
mode: 0755
- packager: rpm
src: 'dist/default_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Amd64 }}_{{ . }}{{ end }}/fooextcap'
dst: /usr/lib64/wireshark/extcap/
file_info:
mode: 0755 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I want to package a Wireshark external capture plugin binary using goreleaser/nfpm (this is a larger project about to go OpenSource on Github in the next weeks). Wireshark external capture plugins are ordinary stand-alone executables. However, they are not installed into
/usr/binor similar. Instead, they need to be installed in a distro-specific path because Wireshark will look only into a few specific "extcap" directories -- and the distro packagers usually have different opinions about where extcap binaries should go. 😞For instance:
/usr/lib/wireshark/extcap//usr/lib/x86_64-linux-gnu/wireshark/extcapusr/lib64/wireshark/extcapIs this a situation that can and should be handled using the
bindirproperty?Bonus question: how to deal with the CPU arch-specific part? Is there a template variable for this?
Please forgive me if I missed things in the official documentation; I've finally found https://github.com/orgs/goreleaser/discussions/2879#discussioncomment-2111573 but am unsure how to make use of the
metastuff, so help is greatly appreciated!All reactions