#5 Avoid systemd dependency in flatpak build
Closed a year ago by zdohnal. Opened a year ago by yselkowitz.
rpms/ yselkowitz/sane-backends rawhide  into  rawhide

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

  Requires: libpng

  Requires: sane-airscan

  Requires: sane-backends-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

+ %if ! 0%{?flatpak}

  Requires: systemd >= 196

  Requires: systemd-udev >= 196

+ %endif

  

  # workaround for Brother scanners, which drivers are built with old libnsl

  # it is ignored by DNF, but it seems GUI installation apps should offer it

Since systemd is a core system service, either it's already going to be installed by definition (on a booted system) or it will be communicated with through other means (e.g. when a consuming program such as simple-scan is run in a flatpak).

Please also merge into f38 branch, but no revbump or new build is needed.

rebased onto 7957f9a

a year ago

I've added bcond for systemd in sane-backends.spec - I got the same error as with https://src.fedoraproject.org/rpms/sane-airscan/pull-request/1# when building the flatpak, so I guess the sane-backends build itself is fixed.

@yselkowitz please check and do let me know.

The patch is incorrect. Depending on libsystemd is fine. It's not that we don't want to interact with systemd at all, but that flatpak apps use the host systemd. OTOH a Requires: systemd would need to have a systemd inside the app or runtime, which doesn't make sense.

Please revert that change and use mine instead.

Ok - I thought flatpaks work similar as podman containers, where we ran CUPS without systemd, so I thought I can disable the configuration option here as well.

To be honest, systemd configuration option is there only for some support in saned, which I would say you won't use in flatpak, since you are creating simple-scan flatpak, so we could disable that for flatpak.

Otherwise I've rewritten the fix, now it looks closer to your PR, but I would like to use that bcond macro.

Do let me know if it works for you.

Do let me know if it works for you.

Sort of. Because you disabled the bcond by default in flatpak build, I am able to get a build, but the bcond flag itself is broken because (IIUC) hyphens are not valid characters in RPM variables. IOW, while it should have been enough just to provide the %bcond_without and let the flatpak build use that to disable the dependency, that's not possible due to the syntax error. The bcond either needs to be changed from hyphen to underscore, or made into a single word, in order to be usable.

(facepalm) omg, I'm sorry, I'll fix it right away.

Thanks! Closing this one.

Pull-Request has been closed by zdohnal

a year ago
Metadata