#6 Define %_localstatedir
Merged 10 months ago by otaylor. Opened 10 months ago by yselkowitz.
rpms/ yselkowitz/flatpak-rpm-macros rawhide  into  rawhide

file modified
+4 -1
@@ -1,6 +1,6 @@ 

  Name:           flatpak-rpm-macros

  Version:        39

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Macros for building RPMS for flatpaks

  Source0:        macros.flatpak.in

  Source1:        distutils.cfg
@@ -45,6 +45,9 @@ 

  %{_rpmconfigdir}/fontconfig-flatpak.prov

  

  %changelog

+ * Thu Aug 24 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 39-2

+ - Define %%_localstatedir and %%__git

+ 

  * Mon Aug 7 2023 Owen Taylor <otaylor@redhat.com> - 39-1

  - Set %%dist to f%%{fedora}app - this is for building without modules

  

file modified
+2
@@ -2,8 +2,10 @@ 

  %dist           .fc%{fedora}app

  %_prefix	/app

  %_sysconfdir	%{_prefix}/etc

+ %_localstatedir %{_prefix}/var

  %build_ldflags -Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags} %{_annotation_ldflags} %[ "%{toolchain}" == "clang" ? "%{?_clang_extra_ldflags}" : "" ] %{_build_id_flags} %{?_package_note_flags} -L%{_prefix}/__LIB__

  %__brp_compress		%{_usr}/lib/rpm/brp-compress /app

+ %__git			%{_bindir}/git

  %__perl			%{_usr}/bin/perl

  %__python2		%{_bindir}/python2

  %python2_sitelib	%{_prefix}/lib/python2.7/site-packages

Otherwise, programs will try to use /var and fail.

1 new commit added

  • Define %__git
10 months ago

Pull-Request has been merged by otaylor

10 months ago
%__git          %{_bindir}/git

So thinking about this, this is going to cause problems when we start f40-flatpak-app, since there will be a point where git isn't built yet. Luckily git.spec itself doesn't use %autosetup -S git, so building git first would work, but :

%__git          git

Should be fine. There's nothing wrong about relying on $PATH in a spec file.

I can't be 100% sure that changing a file location for a $PATH search is always going to be compatible. AFAICS right now, there are going to be some packages that will need to be built first when "bootstrapping" a new version.