~kennylevinsen/seatd-devel

build: Allow to disable seatd-launcher v1 PROPOSED

Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Haelwenn (lanodan) Monnier: 1
 build: Allow to disable seatd-launcher

 2 files changed, 20 insertions(+), 8 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~kennylevinsen/seatd-devel/patches/29718/mbox | git am -3
Learn more about email & git

[PATCH] build: Allow to disable seatd-launcher Export this patch

Haelwenn (lanodan) Monnier <contact@hacktivis.me>
This is specially related to the recent vulnerabilities and thus allows to
significantly reduce the attack surface of seatd.
---
 meson.build       | 27 +++++++++++++++++++--------
 meson_options.txt |  1 +
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/meson.build b/meson.build
index 960c3b6..b85d26f 100644
--- a/meson.build
+++ b/meson.build
@@ -116,6 +116,7 @@ server_files = [
with_seatd = get_option('libseat-seatd') == 'enabled'
with_builtin = get_option('libseat-builtin') == 'enabled'
with_server = get_option('server') == 'enabled'
with_launcher = with_server and get_option('launcher') == 'enabled'

if with_seatd or with_builtin
	private_files += 'libseat/backend/seatd.c'
@@ -210,13 +211,16 @@ if with_server
		install: true,
		dependencies: [realtime],
	)
	executable(
		'seatd-launch',
		[ 'seatd-launch/seatd-launch.c' ],
		include_directories: [include_directories('.', 'include')],
		install: true,
		dependencies: [realtime],
	)

	if with_launcher
		executable(
			'seatd-launch',
			[ 'seatd-launch/seatd-launch.c' ],
			include_directories: [include_directories('.', 'include')],
			install: true,
			dependencies: [realtime],
		)
	endif
endif

if get_option('examples') == 'enabled'
@@ -251,7 +255,13 @@ endif
if scdoc.found()
	mandir = get_option('mandir')

	foreach src : ['seatd.1.scd', 'seatd-launch.1.scd']
	manpages = ['seatd.1.scd']

	if with_launcher
		manpages += 'seatd-launch.1.scd'
	endif

	foreach src : manpages
		topic = src.split('.')[0]
		section = src.split('.')[1]
		output = '@0@.@1@'.format(topic, section)
@@ -275,4 +285,5 @@ summary({
	'libseat-systemd': logind.found() and logind.name() == 'libsystemd',
	'libseat-elogind': logind.found() and logind.name() == 'libelogind',
	'server': with_server,
	'launcher': with_launcher,
}, bool_yn: true)
diff --git a/meson_options.txt b/meson_options.txt
index 0731ac4..7a9f45b 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,6 +2,7 @@ option('libseat-logind', type: 'combo', choices: ['auto', 'disabled', 'elogind',
option('libseat-seatd', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd support for libseat')
option('libseat-builtin', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'built-in seatd server for libseat')
option('server', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled', description: 'seatd server')
option('launcher', type: 'combo', choices: ['enabled', 'disabled'], value: 'enabled',  description: 'build and install seatd-launch')
option('examples', type: 'combo', choices: ['enabled', 'disabled'], value: 'disabled', description: 'libseat example programs')
option('man-pages', type: 'feature', value: 'auto', description: 'Generate and install man pages')
option('defaultpath', type: 'string', value: '', description: 'Default location for seatd socket (empty for default)')
-- 
2.34.1