Building go packages: Is "__arch_install_post export NO_BRP_STRIP_DEBUG=true" still needed?
Hi all, Fabian and me had a chat about whether the following is actually still needed in a spec file for a go package: %define __arch_install_post export NO_BRP_STRIP_DEBUG=true In some thread a long time ago (that I did not find unfortunately) Jeff pointed me at the hugo package as an up-to-date example for building go packages. And told me not to use the %go_... macros, that were deprecated/outdated/... At least that is what I seem to remember.
https://build.opensuse.org/package/view_file/openSUSE:Factory/hugo/hugo.spec...
That is what I took as a blueprint for the many go packages I packaged for devel:kubic. Question: Is that NO_BRP_STRIP_DEBUG=true thingy actually still needed? Or could it be left out? The wiki page https://en.opensuse.org/openSUSE:Packaging_Go only mentions the go_strip or go_nostrip macros. My remembrance from the conversation with Jeff was that this page was outdated. Not sure if this is still true, last edit was on April 5th. Maybe someone can give recommendations on what to use. I'll be happy to change that in the packages I need to touch anyway... Kind Regards, 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
Hi Johannes, Johannes Kastl <kastl@b1-systems.de> writes:
Hi all,
Fabian and me had a chat about whether the following is actually still needed in a spec file for a go package:
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
I have quickly glanced over the rpm macros and none of the scripts included in %__spec_install_post (which in turn includes %__arch_install_post) reads the environment variable NO_BRP_STRIP_DEBUG. However, it could be that it gets read by something else, so take this with a grain of salt… Have you tried to just remove the %define and see what happens? Cheers, Dan -- Dan Čermák <dcermak@suse.com> Software Engineer Development tools SUSE Software Solutions Germany GmbH Frankenstrasse 146 90461 Nürnberg Germany (HRB 36809, AG Nürnberg) Managing Director/Geschäftsführer: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
Good morning Dan, On 18.04.23 at 08:51 Dan Čermák wrote:
Johannes Kastl <kastl@b1-systems.de> writes:
Fabian and me had a chat about whether the following is actually still needed in a spec file for a go package:
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
I have quickly glanced over the rpm macros and none of the scripts included in %__spec_install_post (which in turn includes %__arch_install_post) reads the environment variable NO_BRP_STRIP_DEBUG.
However, it could be that it gets read by something else, so take this with a grain of salt…
Have you tried to just remove the %define and see what happens?
I have tried removing it for the linkerd-cli package and the package still built without errors. Kind Regards, 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
On Tue, 18 Apr 2023, Johannes Kastl wrote:
Good morning Dan,
On 18.04.23 at 08:51 Dan ?erm?k wrote:
Johannes Kastl <kastl@b1-systems.de> writes:
Fabian and me had a chat about whether the following is actually still needed in a spec file for a go package:
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
I have quickly glanced over the rpm macros and none of the scripts included in %__spec_install_post (which in turn includes %__arch_install_post) reads the environment variable NO_BRP_STRIP_DEBUG.
However, it could be that it gets read by something else, so take this with a grain of salt?
Have you tried to just remove the %define and see what happens?
I have tried removing it for the linkerd-cli package and the package still built without errors.
ISTR that Go requires functional backtrace() for quite some of its functionality (which users expect to work) and without debug info the quality of that is severely degraded. So to check you'd have to actually run built go packages, compiling isn't good enough. A Go expert could chime in here. Richard. -- Richard Biener <rguenther@suse.de> SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg)
Morning Richard, On 18.04.23 at 10:08 Richard Biener wrote:
ISTR that Go requires functional backtrace() for quite some of its functionality (which users expect to work) and without debug info the quality of that is severely degraded. So to check you'd have to actually run built go packages, compiling isn't good enough.
Sorry, I was unclear. I executed the binary, at least the "version" part and it did not crash or segfault. What I wanted to say is that I did not get any rpmlint warnings due to (missing) stripping or similar by removing this %define statement.
A Go expert could chime in here.
That is why I added Jeff in the initial mail. :-) But of course every experienced person can chime in and help us solved this riddle. I would have written to the opensuse-go list, but it looks like only Dan, Jeff and me were active on that list in the last couple of months... Kind Regards, 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 (3)
-
Dan Čermák
-
Johannes Kastl
-
Richard Biener