Browse Source

meson: Always define `USE_INITGROUPS` and make that option as boolean

Signed-off-by: Mobin "Hojjat" Aydinfar <mobin@mobintestserver.ir>
Mobin 11 months ago
parent
commit
e8b0a3a993
3 changed files with 5 additions and 9 deletions
  1. 2 2
      BUILD_MESON
  2. 1 5
      meson.build
  3. 2 2
      meson_options.txt

+ 2 - 2
BUILD_MESON

@@ -124,8 +124,8 @@ Custom options:
                              supplementary groups, only their primary group. However,
                              some systems may not implement the initgroups API, so
                              it may be necessary to disable it on those.
-                             Available vlaues : enabled, disabled, auto
-                             Default value : auto
+                             Available values : true, false
+                             Default value : true
 
  dinit-sbindir             : Default full path to the dinit executables.
                              For some reasons Dinit dont follow Meson's default

+ 1 - 5
meson.build

@@ -65,6 +65,7 @@ mconfig_data.set('SHUTDOWN_PREFIX', '"' + shutdown_prefix + '"')
 mconfig_data.set('DEFAULT_AUTO_RESTART', default_auto_restart)
 mconfig_data.set('DEFAULT_START_TIMEOUT', default_start_timeout)
 mconfig_data.set('DEFAULT_STOP_TIMEOUT', default_stop_timeout)
+mconfig_data.set10('USE_INITGROUPS', use_initgroups)
 if support_cgroups.auto() and platform == 'linux' or support_cgroups.enabled()
     mconfig_data.set('SUPPORT_CGROUPS', '1') 
 endif
@@ -73,11 +74,6 @@ if use_utmpx.enabled()
 elif use_utmpx.disabled()
     mconfig_data.set('USE_UTMPX', '0')
 endif
-if use_initgroups.enabled()
-    mconfig_data.set('USE_INITGROUPS', '1')
-elif use_initgroups.disabled()
-    mconfig_data.set('USE_INITGROUPS', '0')
-endif
 
 ## Outputs
 subdir('src')

+ 2 - 2
meson_options.txt

@@ -42,8 +42,8 @@ option(
 )
 option(
     'use-initgroups',
-    type : 'feature',
-    value : 'auto',
+    type : 'boolean',
+    value : true,
     description : 'Whether to use initgroups to initialize supplementary groups for run-as services.'
 )
 option(