#1 Exclude systemd unit files for Flatpak builds
Merged 2 months ago by mcrha. Opened 2 months ago by feborges.
rpms/ feborges/evolution-data-server flatpak  into  master

@@ -70,7 +70,9 @@ 

  BuildRequires: perl-generators

  BuildRequires: vala

  BuildRequires: sendmail

+ %if 0%{?flatpak}

  BuildRequires: systemd

+ %endif

  

  BuildRequires: pkgconfig(gcr-3)  >= %{gcr_version}

  BuildRequires: pkgconfig(gcr-base-3)  >= %{gcr_version}

@@ -236,6 +238,9 @@ 

  	-DENABLE_INTROSPECTION=ON \

  	-DENABLE_VALA_BINDINGS=ON \

  	-DENABLE_INSTALLED_TESTS=ON \

+         %if 0%{?flatpak}

+         -DWITH_SYSTEMDUSERUNITDIR=OFF \

+         %endif

  	%ldap_flags %krb5_flags %ssl_flags \

  	%largefile_flags %gtkdoc_flags \

  	..

@@ -325,10 +330,12 @@ 

  %{_datadir}/dbus-1/services/org.gnome.evolution.dataserver.UserPrompter.service

  %{_datadir}/pixmaps/evolution-data-server

  

+ %if ! 0%{?flatpak}

  %{_userunitdir}/evolution-addressbook-factory.service

  %{_userunitdir}/evolution-calendar-factory.service

  %{_userunitdir}/evolution-source-registry.service

  %{_userunitdir}/evolution-user-prompter.service

+ %endif

  

  %dir %{_libdir}/evolution-data-server

  %dir %{credential_modules_dir}

While building gnome-maps RPM to construct Flatpak[0], we came
across evolution-data-server installing systemd unit files. That
isn't supported by Flatpak at the moment[1].

The {?flatpak} macro is provided by flatpak-rpm-macros[2].

Similar patches have been applied to other GNOME components that
are being converted, such as:
https://src.fedoraproject.org/rpms/spice-gtk/c/a6a6e6cd1e

[0] https://docs.fedoraproject.org/en-US/flatpak/tutorial/
[1] https://github.com/flatpak/flatpak/issues/2787
[2] https://src.fedoraproject.org/rpms/flatpak-rpm-macros

Thanks. I've a very similar change done locally, but I didn't get that far yet (building the rpm2flatpak is very bad experience, subpackages often fail with a curl error about failed download of a package, which I'm currently trying to workaround locally).

My change also avoids BuildRequires: systemd under flatpak. Could you do that as well, please?

Thanks. I've a very similar change done locally, but I didn't get that far yet (building the rpm2flatpak is very bad experience, subpackages often fail with a curl error about failed download of a package, which I'm currently trying to workaround locally).

I have been using the fedora-packager-container for those builds, with rawhide the curl issue is already fixed. https://github.com/owtaylor/fedora-packager-container

My change also avoids BuildRequires: systemd under flatpak. Could you do that as well, please?

If some module is already part of the runtime, we don't need to exclude it. See https://src.fedoraproject.org/modules/flatpak-runtime/blob/f30/f/flatpak-runtime.yaml

If some module is already part of the runtime, we don't need to exclude it

Maybe, but it's cleaner to not BuildRequire something what is not used.

rebased onto 2829cb8

2 months ago

Thanks for updating it. One odd thing I just noticed, when I created the evolution.yaml with rpm2flatpak it also included:

  systemd:
    rationale: Runtime dependency
    ref: f30

in the 'components/rpms' section. That feels odd to me, especially with your comment about the runtime (when it's there, then why to rebuild it), but it's a side thing, unrelated to your proposal. I'm committing it and I'll also cherry-pick it to the f30 branch.

Pull-Request has been merged by mcrha

2 months ago

Thanks for updating it. One odd thing I just noticed, when I created the evolution.yaml with rpm2flatpak it also included:
systemd:
rationale: Runtime dependency
ref: f30

in the 'components/rpms' section. That feels odd to me, especially with your comment about the runtime (when it's there, then why to rebuild it),

The dependency resolution is far from great. Most of the times I end up writing the application.yaml file by hand. The components suggested there are usually not accurate at all.