#7 Define JAVA_HOME
Merged 6 months ago by yselkowitz. Opened 7 months ago by yselkowitz.
rpms/ yselkowitz/flatpak-rpm-macros f39  into  f39

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

  Name:           flatpak-rpm-macros

  Version:        39

- Release:        4%{?dist}

+ Release:        5%{?dist}

  Summary:        Macros for building RPMS for flatpaks

  Source0:        macros.flatpak.in

  Source1:        distutils.cfg
@@ -30,8 +30,8 @@ 

      mkdir -p $RPM_BUILD_ROOT%{_libdir}/python$v/distutils/

      install -t $RPM_BUILD_ROOT%{_libdir}/python$v/distutils/ %{SOURCE1}

  done

- mkdir -p $RPM_BUILD_ROOT%{_datadir}/xmvn/config.d

- install -t $RPM_BUILD_ROOT%{_datadir}/xmvn/config.d -m 644 %{SOURCE2}

+ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xdg/xmvn/config.d

+ install -t $RPM_BUILD_ROOT%{_sysconfdir}/xdg/xmvn/config.d -m 644 %{SOURCE2}

  mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}

  install -t $RPM_BUILD_ROOT%{_rpmconfigdir} -m 755 %{SOURCE3}

  
@@ -41,10 +41,14 @@ 

  # but I believe is necessary to properly override macros that are otherwise set.

  %{_sysconfdir}/rpm/

  %{_libdir}/python*/distutils/distutils.cfg

- %{_datadir}/xmvn/config.d/flatpak.xml

+ %{_sysconfdir}/xdg/xmvn/config.d/flatpak.xml

  %{_rpmconfigdir}/fontconfig-flatpak.prov

  

  %changelog

+ * Mon Nov 20 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 39-5

+ - Define JAVA_HOME

+ - Change xmvn configuration location

+ 

  * Mon Aug 28 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 39-4

  - Define %%_localstatedir and %%__git

  

file modified
+2
@@ -65,6 +65,8 @@ 

    export XDG_DATA_DIRS\

    GVFS_REMOTE_VOLUME_MONITOR_IGNORE="1"\

    export GVFS_REMOTE_VOLUME_MONITOR_IGNORE\

+   JAVA_HOME="%{_prefix}/lib/jvm/java"\

+   export JAVA_HOME\

    \

    %[%{verbose}?"set -x":""]\

    umask 022\

While some uses of JAVA_HOME are covered by javapackages-tools configuration, others are not.

1 new commit added

  • Change xmvn configuration location
7 months ago

Makes sense to me. Thanks for figuring it out!

Or hm, actually, I wonder if JAVA_HOME should be set in flatpak-runtime-config package instead? I see that libreoffice flatpak is overriding it in https://src.fedoraproject.org/flatpaks/libreoffice/blob/stable/f/container.yaml#_16 - should it be automatically set to the correct value for all flatpaks so that libreoffice (and other java app flatpaks in the future) wouldn't have to override it?

Right now, we only have libreoffice using java at runtime, and flatpak-runtime-config doesn't set environment variables, only the runtime itself does, and that doesn't affect flatpak builds. I suggest we go with this for now, and if/when more java-based apps are created, then we'll have a better picture as to what more may be needed.

Pull-Request has been merged by yselkowitz

6 months ago