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

Attached to Project: Arch Linux
Opened by CS (JMP64i) - Thursday, 07 September 2023, 22:42 GMT
Last edited by freswa (frederik) - Tuesday, 19 September 2023, 21:32 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Bruno Pagani (ArchangeGabriel)
freswa (frederik)
Filipe Laíns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
libpassim.so is an optional dependency:
https://github.com/fwupd/fwupd/blob/9f085f137c4f8d5b209eaad7e5d83311f58c6b48/docs/fwupd.conf.md?plain=1#L192

As I have not installed avahi, passim service fails to start. I don't need passim or avahi.
This task depends upon

Closed by  freswa (frederik)
Tuesday, 19 September 2023, 21:32 GMT
Reason for closing:  Won't fix
Additional comments about closing:  We don't do split packages for libs.
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%)
Upstream suggests splitting the passim package into a "passim" and a "libpassim" package:
https://github.com/fwupd/fwupd/issues/6179#issuecomment-1717299772
Comment by Toolybird (Toolybird) - Tuesday, 19 September 2023, 20:27 GMT
That was already suggested above...

Loading...