]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Add libmount feature
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 5 Jun 2025 09:05:08 +0000 (11:05 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 5 Jun 2025 12:51:03 +0000 (14:51 +0200)
Let's reduce the dependencies required to build just libsystemd by
making libmount optional. The meson disabler feature makes this quite
trivial.

meson.build
meson_options.txt
tools/oss-fuzz.sh

index e062919daa8800013546f00aab8b1666c626e787..78b22fff27d9cfafe85c1c94b7141ec4f1496aa1 100644 (file)
@@ -1125,7 +1125,9 @@ else
 endif
 
 libmount = dependency('mount',
-                      version : fuzzer_build ? '>= 0' : '>= 2.30')
+                      version : fuzzer_build ? '>= 0' : '>= 2.30',
+                      disabler : true,
+                      required : get_option('libmount'))
 
 libfdisk = dependency('fdisk',
                       version : '>= 2.32',
index 8d62f5157cab29599a0e1f5f97fa1dd77761c870..d8dec33ec42e7ffc45330b33dec9b3ffb88ff3d6 100644 (file)
@@ -470,6 +470,8 @@ option('dbus', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'd
        description : 'libdbus support (for tests only)')
 option('libarchive', type : 'feature',
        description : 'libarchive support')
+option('libmount', type : 'feature',
+       description : 'libmount support')
 
 option('bootloader', type : 'feature', deprecated : { 'true' : 'enabled', 'false' : 'disabled' },
        description : 'sd-boot/stub and userspace tools')
index 3cd5cec6703adf0d69f674eaf18e17a41bb702f9..6df95afcfe47b9747af8114fd7e3887646ab09d5 100755 (executable)
@@ -38,7 +38,7 @@ else
     # statically linking isn't viable for us for various reasons, we do a build with most features disabled
     # to link against as few libraries as possible. The libraries we do end up linking against happen (by
     # chance) to be installed in the oss-fuzz execution environment.
-    meson_args+=("-Doss-fuzz=true" "--auto-features=disabled" "-Dnspawn=enabled" "-Dresolve=true")
+    meson_args+=("-Doss-fuzz=true" "--auto-features=disabled" "-Dlibmount=enabled" "-Dnspawn=enabled" "-Dresolve=true")
 
     apt-get update
     apt-get install -y gperf m4 gettext python3-pip \