Hi all, kubescape (https://github.com/kubescape/kubescape) is using a git submodule to "include" git2go. This is being built in a separate step and needs its own dependencies. Is there a way to vendor the "main" program and the one in the subdirectory using the go-modules service? Adding a second stanza to the service file and using "subdir" results in a vendor.tar.gz only containing the files for the subdirectory. Or do I need to build the subdirectory separately and pull it in via BuildRequires? Thanks in advance, Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Johannes Kastl
Hi all,
kubescape (https://github.com/kubescape/kubescape) is using a git submodule to "include" git2go. This is being built in a separate step and needs its own dependencies.
Is there a way to vendor the "main" program and the one in the subdirectory using the go-modules service?
Adding a second stanza to the service file and using "subdir" results in a vendor.tar.gz only containing the files for the subdirectory.
It looks like the archive name is hard coded after quickly glancing over the source code [1]. So probably your second vendoring overwrites the first one. You could try to use different compression algorithms, then the file names would be different and it might work again.
Or do I need to build the subdirectory separately and pull it in via BuildRequires?
That's another option as well and probably a cleaner approach.
Cheers,
Dan
Footnotes:
[1] https://github.com/openSUSE/obs-service-go_modules/blob/2ed7720102f866a1e186...
--
Dan Čermák
Hi Dan, long time no see... ;-) On 14.03.23 at 08:51 Dan Čermák wrote:
Johannes Kastl
writes:
Is there a way to vendor the "main" program and the one in the subdirectory using the go-modules service?
Adding a second stanza to the service file and using "subdir" results in a vendor.tar.gz only containing the files for the subdirectory.
It looks like the archive name is hard coded after quickly glancing over the source code [1]. So probably your second vendoring overwrites the first one.
Yes, that was what I found.
You could try to use different compression algorithms, then the file names would be different and it might work again.
Hmmm.
Or do I need to build the subdirectory separately and pull it in via BuildRequires?
That's another option as well and probably a cleaner approach.
I tried that, but apparently they are using an older git2go version that is not compatible with the libgit2 version that is present in Tumbleweed. I packaged v34, but they are using v33 that only works with v1.3.x of libgit2. I am not sure if it is really needed, maybe I can See the question in my next mail. :-) Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
participants (2)
-
Dan Čermák
-
Johannes Kastl