#2 Do not generate debug and valgrind-supression files when building flatpak
Closed 4 years ago by xberry. Opened 4 years ago by xberry.
rpms/ xberry/NetworkManager master  into  master

file modified
+5 -2
@@ -9,7 +9,7 @@ 

  %global epoch_version 1

  %global rpm_version 1.20.2

  %global real_version 1.20.2

- %global release_version 3

+ %global release_version 4

  %global snapshot %{nil}

  %global git_sha %{nil}

  
@@ -733,7 +733,7 @@ 

  # Ensure the documentation timestamps are constant to avoid multilib conflicts

  find %{buildroot}%{_datadir}/gtk-doc -exec touch --reference configure.ac '{}' \+

  

- %if 0%{?__debug_package}

+ %if 0%{?__debug_package} && !0%{?flatpak}

  mkdir -p %{buildroot}%{_prefix}/src/debug/NetworkManager-%{real_version}

  cp valgrind.suppressions %{buildroot}%{_prefix}/src/debug/NetworkManager-%{real_version}

  %endif
@@ -977,6 +977,9 @@ 

  

  

  %changelog

+ * Mon Sep 09 2019 Jan Beran <jaberan@redhat.com> - 1:1.20.2-4

+ - Do not make debug and valgrind-supression file

+ 

  * Sat Sep 07 2019 Lubomir Rintel <lkundrak@v3.sk> - 1:1.20.2-3

  - Actually fix the boolean dep for the wireless daemon

  

Changes condition when to generate debug and valgrind-supression files.
When building flatpak, files are never generated, even when __debug_package is set to 1.
When flatpak macro is not set or set to 0, there is no change in functionality.

Thanks for the patch. However, it doesn't look correct to me.

It seems to me that RPM or whichever package ships with those macros should be fixed instead, making sure that %__debug_package is not set when a debug package is not desired -- regardless of whether it's with flatpak or anywhere else.

What's the value of %_enable_debug_packages and %debug_package within flatpak builds?

In principle I agree with you and it was my first thought, but I was enable to realize it.
Here are the macros.
%__debug_package (the one used in NetworkManager specfile) is not set
%_enable_debug_packages is set to 1
%debug_package is set to this:

%ifnarch noarch
%package debuginfo
Summary: Debug information for package %{name}
Group: Development/Debug
AutoReq: 0
AutoProv: 1
%description debuginfo
This package provides debug information for package %{name}.
Debug information is useful when developing applications that use this
package or when debugging this package.
%files debuginfo -f debugfiles.list
%package debugsource
Summary: Debug sources for package %{name}
Group: Development/Debug
AutoReqProv: 0
%description debugsource
This package provides debug sources for package %{name}.
Debug sources are useful when developing applications that use this
package or when debugging this package.
%files debugsource -f debugsourcefiles.list
%endif

We made another way how to solve that, so this PR is no longer needed. Closing.

Pull-Request has been closed by xberry

4 years ago