kumquat-buildroot/support/scripts
Norbert Lange 41ea61d59c support/scripts/mkusers: allow option for system uid/gid
Some software decides based on uid/gid whether a user is a system or
normal (human) user, with different behaviour for those flavors (example
journald [2]).

So adding logic to create system-users is necessary, we take the now
common ranges from [1].

This extends the mkusers script to allow -2 for uid/gid, this argument
will take an identifier from the user range. All identifiers used up to
now should have been from the system range, so -1 is now interpreted as
a system user/group.

Note that after this commit, all the UIDs and GIDs that are created
automatically (with -1) will change. That means if there is peristent
data on an existing system that was created by such an automatic user,
it will suddenly belong to a different user. However, this could already
happen before: if a USERS line is added to a package, then other UIDs
may change as well.

Add system/user ranges as variables, and the argument for user/system
uid variable as well. Thus some magic constants could be removed, some
further occurences of -1 were replaced with equivalent logic. For
consistency, the existing MIN/MAX_UID/GID variables are renamed to
FIRST/LAST_USER_UID/GID.

Update the documentation with the new automatic ranges.

[1] - https://systemd.io/UIDS-GIDS/
[2] - https://www.freedesktop.org/software/systemd/man/journald.conf.html

Signed-off-by: Norbert Lange <nolange79@gmail.com>
[Arnout: use -1 for system users; refactor the changes a bit]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-05 23:09:31 +01:00
..
apply-patches.sh support/scripts/: remove -E flag from patch call 2022-01-03 21:14:32 +01:00
boot-qemu-image.py support: fix flake8 error E741 ambiguous variable name 2021-10-18 22:31:11 +02:00
br2-external system: support br2-external init systems 2020-10-14 22:48:42 +02:00
brpkgutil.py support/scripts: use show-info to extract dependency graph 2019-05-07 23:03:41 +02:00
check-bin-arch package/guile: bump to version 3.0.4 2020-08-08 18:59:19 +02:00
check-dotconfig.py support: fix flake8 error E741 ambiguous variable name 2021-10-18 22:31:11 +02:00
check-host-rpath core: implement per-package SDK and target 2019-11-29 14:24:05 +01:00
check-kernel-headers.sh support/scripts/check-kernel-headers.sh: do not print error for loose checks 2020-03-21 15:47:03 +01:00
check-merged-usr.sh skeleton-custom: use a script to check merged usr structure 2019-02-06 17:03:30 +01:00
cpedb.py support/scripts/cpedb.py: remove import pickle 2021-02-16 21:16:55 +01:00
cve.py support: utils: use python3 explicitly 2021-09-22 21:30:24 +02:00
eclipse-register-toolchain eclipse-register-toolchain: toolchain is no longer installed in $(HOST_DIR)/usr 2017-07-05 16:06:27 +02:00
expunge-gconv-modules
fix-configure-powerpc64.sh support/scripts: fix shebang with bash 2017-06-08 21:43:05 +02:00
fix-rpath package/pkg-generic.mk, support/scripts/fix-rpath: fix per-package regexp 2019-12-12 08:27:54 +01:00
gen-bootlin-toolchains support/scripts/gen-bootlin-toolchains: add missing BR2_X86_CPU_HAS_AVX512 condition for x86-64-v4 2022-01-25 08:41:19 +01:00
gen-missing-cpe support/scripts/gen-missing-cpe: add new script 2021-05-16 13:57:38 +02:00
generate-gitlab-ci-yml support/scripts/generate-gitlab-ci-yml: ignore branch name prefix <foo> containing a single hyphen 2022-01-08 15:48:48 +01:00
genimage.sh support/scripts/genimage.sh: pass an empty rootpath to genimage 2019-10-27 12:19:32 +01:00
graph-build-time support: utils: use python3 explicitly 2021-09-22 21:30:24 +02:00
graph-depends support: utils: use python3 explicitly 2021-09-22 21:30:24 +02:00
hardlink-or-copy support/scripts: fix shebang with bash 2017-06-08 21:43:05 +02:00
mkmakefile support/scripts/mkmakefile: make wrapper silent by default 2018-11-02 21:23:02 +01:00
mkusers support/scripts/mkusers: allow option for system uid/gid 2022-02-05 23:09:31 +01:00
pkg-stats support/scripts/pkg-stats: fix flake8 errors 2022-01-09 21:00:56 +01:00
pycompile.py support: utils: use python3 explicitly 2021-09-22 21:30:24 +02:00
setlocalversion support/scripts/setlocalversion: fix/improve Mercurial output 2020-10-03 09:11:03 +02:00
size-stats support: fix flake8 error E741 ambiguous variable name 2021-10-18 22:31:11 +02:00