FS#79614 : [fwupd] make libpassim.so optional

Comment by Toolybird (Toolybird) - Thursday, 07 September 2023, 23:40 GMT

As currently built, it's not optional.

$ readelf -d /usr/lib/fwupd-1.9.5/libfwupdengine.so | grep passim
0x0000000000000001 (NEEDED) Shared library: [libpassim.so.1]

$ fwupdtool -h
fwupdtool: error while loading shared libraries: libpassim.so.1: cannot open shared object file: No such file or directory

Comment by CS (JMP64i) - Thursday, 07 September 2023, 23:46 GMT

Hmm... It's inconvenient because I don't want to install avahi and passim, which I actually don't need either. Passim can't start without avahi and my monitoring always gives an error for this. Is there a way to make it optional?

Comment by Toolybird (Toolybird) - Friday, 08 September 2023, 00:18 GMT

> Is there a way to make it optional?

Dunno. Maybe if passim libs were split out? Someone would need to test it. But is it worth it? Maybe there's another way to prevent the service fail?

Comment by Liganic (liganic) - Friday, 08 September 2023, 15:40 GMT

It is optional, but since it's a build-time decision there would need to be two packages (e.g. fwupd and fwupd-nopassim).
Up to the package owners if they want to build without it (IMHO preferable, passim depending on avahi isn't great as evidenced by this request).

FWIW the required changes are:

--- PKGBUILD
+++ PKGBUILD
@@ -26,7 +26,6 @@
libjcat
libjson-glib-1.0.so
libmm-glib.so
- libpassim.so
libprotobuf-c.so
libqmi-glib.so
libsmbios
@@ -78,7 +77,8 @@
-D docs=enabled \
-D plugin_intel_spi=true \
-D supported_build=enabled \
- -D efi_binary=false
+ -D efi_binary=false \
+ -D passim=disabled
meson compile -C build
}

Comment by freswa (frederik) - Friday, 08 September 2023, 16:03 GMT

Could you report this upstream and check with them if they could make libpassim an optional runtime dependency? I think this would be the best way for everyone.

Comment by Liganic (liganic) - Friday, 08 September 2023, 16:08 GMT

It already is an optional dependency (see the release notes https://github.com/fwupd/fwupd/releases/tag/1.9.5), hence that flag existing.
You as the packager need to decide if you want to build without it or not. With will force Arch users to have passim and its dependencies (the current way), without will prevent Arch users from using the new passim cache (unless they build it themselves or make an aur version with passim enabled).

Comment by freswa (frederik) - Friday, 08 September 2023, 16:25 GMT

There are dlopen() and dlsym() to be able to depend on shared objects at runtime optionally.

Comment by Liganic (liganic) - Friday, 08 September 2023, 16:32 GMT

Feel free to suggest this to upstream, for now they seem to have decided to go for the easier option.
Please note that tons of packages and projects have build-time-only decisions about what is and isn't optional, fwupd isn't being weird here.

Comment by Pascal Ernster (hardfalcon) - Tuesday, 19 September 2023, 20:26 GMT

  • Field changed: Percent Complete (100% → 0%)

Comment by Toolybird (Toolybird) - Tuesday, 19 September 2023, 20:27 GMT

That was already suggested above...

Loading...