chiark / gitweb /
Prep v236: Update root build files.
authorSven Eden <yamakuzure@gmx.net>
Thu, 15 Mar 2018 05:03:12 +0000 (06:03 +0100)
committerSven Eden <yamakuzure@gmx.net>
Mon, 26 Mar 2018 16:26:00 +0000 (18:26 +0200)
meson.build
meson_options.txt

index dc0e4e63f2977e4d4b035a2d40ff2e87191808a0..38ae4e087de88110bf42ebdda5a85b9644998e08 100644 (file)
@@ -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)
index f0bacde378cafc7bc7615e96e25f256152beeb43..ac18363f4cb38d06bdee1bc9c9dad2078aad0ec2 100644 (file)
@@ -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',