void-packages/srcpkgs/fwupd/patches/fix-systemd-breakage.patch

83 lines
2.4 KiB
Diff

Souce: maxice8
Upstream: not upstreamable
Reason: force meson to build org.freedesktop dbus entry regardless if systemd
option is on or not. not generating it causes the package to break.
--- data/meson.build
+++ data/meson.build
@@ -30,59 +30,18 @@ if get_option('daemon')
)
endif
-if get_option('systemd')
- con2 = configuration_data()
- con2.set('libexecdir', libexecdir)
- con2.set('bindir', bindir)
- con2.set('datadir', datadir)
-
- rw_directories = []
- rw_directories += join_paths (localstatedir, 'lib', 'fwupd')
- rw_directories += join_paths (default_sysconfdir, 'fwupd', 'remotes.d')
- if get_option('plugin_uefi')
- rw_directories += ['-/boot/efi', '-/boot', '-/efi']
- endif
-
- dynamic_options = []
- if systemd.version().version_compare('>= 232')
- dynamic_options += 'ProtectControlGroups=yes'
- dynamic_options += 'ProtectKernelModules=yes'
- endif
- if systemd.version().version_compare('>= 231')
- dynamic_options += 'RestrictRealtime=yes'
- dynamic_options += 'MemoryDenyWriteExecute=yes'
- dynamic_options += ['ReadWritePaths=' + ' '.join(rw_directories)]
- else
- dynamic_options += ['ReadWriteDirectories=' + ' '.join(rw_directories)]
- endif
- con2.set('dynamic_options', '\n'.join(dynamic_options))
-
- # replace @libexecdir@
- configure_file(
- input : 'org.freedesktop.fwupd.service.in',
- output : 'org.freedesktop.fwupd.service',
- configuration : con2,
- install: true,
- install_dir: join_paths(datadir,
- 'dbus-1',
- 'system-services'),
- )
-
- # replace @bindir@
- configure_file(
- input : 'fwupd-offline-update.service.in',
- output : 'fwupd-offline-update.service',
- configuration : con2,
- install: true,
- install_dir: systemdunitdir,
- )
-
- # replace @dynamic_options@
- configure_file(
- input : 'fwupd.service.in',
- output : 'fwupd.service',
- configuration : con2,
- install: true,
- install_dir: systemdunitdir,
- )
-endif
+con2 = configuration_data()
+con2.set('libexecdir', libexecdir)
+con2.set('bindir', bindir)
+con2.set('datadir', datadir)
+
+# replace @libexecdir@
+configure_file(
+ input : 'org.freedesktop.fwupd.service.in',
+ output : 'org.freedesktop.fwupd.service',
+ configuration : con2,
+ install: true,
+ install_dir: join_paths(datadir,
+ 'dbus-1',
+ 'system-services'),
+)