summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-03-15 06:03:12 +0100
committerSven Eden <yamakuzure@gmx.net>2018-03-26 18:26:00 +0200
commit475eceed45caa75cfed3f5ca5dd7be8fc26f9494 (patch)
treec264f1d5eaaabef76ee74fc1016dcf719c2a53a4
parent6051292c03632cfa486da965be6a7bf0a4c1c508 (diff)
Prep v236: Update root build files.
-rw-r--r--meson.build102
-rw-r--r--meson_options.txt14
2 files changed, 59 insertions, 57 deletions
diff --git a/meson.build b/meson.build
index dc0e4e63f..38ae4e087 100644
--- a/meson.build
+++ b/meson.build
@@ -744,59 +744,59 @@ message('maximum system GID is @0@'.format(system_gid_max))
# conf.set('CONTAINER_UID_BASE_MAX', container_uid_base_max)
# substs.set('containeruidbasemin', container_uid_base_min)
# substs.set('containeruidbasemax', container_uid_base_max)
-#
-# nobody_user = get_option('nobody-user')
-# nobody_group = get_option('nobody-group')
-#
-# getent_result = run_command('getent', 'passwd', '65534')
-# if getent_result.returncode() == 0
-# name = getent_result.stdout().split(':')[0]
-# if name != nobody_user
-# message('WARNING:\n' +
-# ' The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
-# ' Your build will result in an user table setup that is incompatible with the local system.')
-# endif
-# endif
-# id_result = run_command('id', '-u', nobody_user)
-# if id_result.returncode() == 0
-# id = id_result.stdout().to_int()
-# if id != 65534
-# message('WARNING:\n' +
-# ' The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
-# ' Your build will result in an user table setup that is incompatible with the local system.')
-# endif
-# endif
-#
-# getent_result = run_command('getent', 'group', '65534')
-# if getent_result.returncode() == 0
-# name = getent_result.stdout().split(':')[0]
-# if name != nobody_group
-# message('WARNING:\n' +
-# ' The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
-# ' Your build will result in an group table setup that is incompatible with the local system.')
-# endif
-# endif
-# id_result = run_command('id', '-g', nobody_group)
-# if id_result.returncode() == 0
-# id = id_result.stdout().to_int()
-# if id != 65534
-# message('WARNING:\n' +
-# ' The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) +
-# ' Your build will result in an group table setup that is incompatible with the local system.')
-# endif
-# endif
-# if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup')
-# message('WARNING:\n' +
-# ' The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) +
-# ' Please re-check that both "nobody-user" and "nobody-group" options are correctly set.')
-# endif
-#
-# conf.set_quoted('NOBODY_USER_NAME', nobody_user)
-# conf.set_quoted('NOBODY_GROUP_NAME', nobody_group)
-# substs.set('NOBODY_USER_NAME', nobody_user)
-# substs.set('NOBODY_GROUP_NAME', nobody_group)
#endif // 0
+nobody_user = get_option('nobody-user')
+nobody_group = get_option('nobody-group')
+
+getent_result = run_command('getent', 'passwd', '65534')
+if getent_result.returncode() == 0
+ name = getent_result.stdout().split(':')[0]
+ if name != nobody_user
+ message('WARNING:\n' +
+ ' The local user with the UID 65534 does not match the configured user name "@0@" of the nobody user (its name is @1@).\n'.format(nobody_user, name) +
+ ' Your build will result in an user table setup that is incompatible with the local system.')
+ endif
+endif
+id_result = run_command('id', '-u', nobody_user)
+if id_result.returncode() == 0
+ id = id_result.stdout().to_int()
+ if id != 65534
+ message('WARNING:\n' +
+ ' The local user with the configured user name "@0@" of the nobody user does not have UID 65534 (it has @1@).\n'.format(nobody_user, id) +
+ ' Your build will result in an user table setup that is incompatible with the local system.')
+ endif
+endif
+
+getent_result = run_command('getent', 'group', '65534')
+if getent_result.returncode() == 0
+ name = getent_result.stdout().split(':')[0]
+ if name != nobody_group
+ message('WARNING:\n' +
+ ' The local group with the GID 65534 does not match the configured group name "@0@" of the nobody group (its name is @1@).\n'.format(nobody_group, name) +
+ ' Your build will result in an group table setup that is incompatible with the local system.')
+ endif
+endif
+id_result = run_command('id', '-g', nobody_group)
+if id_result.returncode() == 0
+ id = id_result.stdout().to_int()
+ if id != 65534
+ message('WARNING:\n' +
+ ' The local group with the configured group name "@0@" of the nobody group does not have UID 65534 (it has @1@).\n'.format(nobody_group, id) +
+ ' Your build will result in an group table setup that is incompatible with the local system.')
+ endif
+endif
+if nobody_user != nobody_group and not (nobody_user == 'nobody' and nobody_group == 'nogroup')
+ message('WARNING:\n' +
+ ' The configured user name "@0@" and group name "@0@" of the nobody user/group are not equivalent.\n'.format(nobody_user, nobody_group) +
+ ' Please re-check that both "nobody-user" and "nobody-group" options are correctly set.')
+endif
+
+conf.set_quoted('NOBODY_USER_NAME', nobody_user)
+conf.set_quoted('NOBODY_GROUP_NAME', nobody_group)
+substs.set('NOBODY_USER_NAME', nobody_user)
+substs.set('NOBODY_GROUP_NAME', nobody_group)
+
tty_gid = get_option('tty-gid')
conf.set('TTY_GID', tty_gid)
substs.set('TTY_GID', tty_gid)
diff --git a/meson_options.txt b/meson_options.txt
index f0bacde37..ac18363f4 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -212,12 +212,14 @@ option('tty-gid', type : 'string',
# description : 'the ACL for adm group should be added')
# option('wheel-group', type : 'boolean',
# description : 'the ACL for wheel group should be added')
-# option('nobody-user', type : 'string',
-# description : 'The name of the nobody user (the one with UID 65534)',
-# value : 'nobody')
-# option('nobody-group', type : 'string',
-# description : 'The name of the nobody group (the one with GID 65534)',
-# value : 'nobody')
+#endif // 0
+option('nobody-user', type : 'string',
+ description : 'The name of the nobody user (the one with UID 65534)',
+ value : 'nobody')
+option('nobody-group', type : 'string',
+ description : 'The name of the nobody group (the one with GID 65534)',
+ value : 'nobody')
+#if 0 /// UNNEEDED by elogind
# option('dev-kvm-mode', type : 'string', value : '0666',
# description : '/dev/kvm access mode')
# option('group-render-mode', type : 'string', value : '0666',