fs/common: allow custom user table to override package-defined users
PATCH v2 1/1 fs/common: allow custom user table to override package-defined users
Currently, when a custom user table and a package define the same user, the settings from the package takes precedence over the ones from the custom user table.
However, it makes sense to allow the settings from the custom user table take precedence. For example, it would allow redirecting the user's home directory to an alternate location (e.g. away from tmp and into a partition that is persistent).
The support/scripts/mkusers script will only retain settings from the latest definition it finds.
Thus, by passing the custom user table after the package defined users, it is possible to override the package provided user definitions.
---
Change v1 -> v2
[Yann
- Updated commit message
--- fs/common.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/common.mk +2 -1
@@ -75,10 +75,11 @@ $(ROOTFS_COMMON_TAR): $(ROOTFS_COMMON_DEPENDENCIES) target-finalize echo '#!/bin/sh' > $(FAKEROOT_SCRIPT) echo "set -e" >> $(FAKEROOT_SCRIPT) echo "chown -h -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT) + + $(call PRINTF,$(PACKAGES_USERS)) >> $(USERS_TABLE) ifneq ($(ROOTFS_USERS_TABLES),) cat $(ROOTFS_USERS_TABLES) >> $(USERS_TABLE) endif - $(call PRINTF,$(PACKAGES_USERS)) >> $(USERS_TABLE) PATH=$(BR_PATH) $(TOPDIR)/support/scripts/mkusers $(USERS_TABLE) $(TARGET_DIR) >> $(FAKEROOT_SCRIPT) ifneq ($(ROOTFS_DEVICE_TABLES),) cat $(ROOTFS_DEVICE_TABLES) > $(FULL_DEVICE_TABLE)
Signature · 1 line
1.9.1
Arnout Vandecappelle
AppliedPATCH v2 1/1 fs/common: allow custom user table to override package-defined users
Quoted 9 lines · Matt Weber
Currently, when a custom user table and a package define the same user, the settings from the package takes precedence over the ones from the custom user table.
However, it makes sense to allow the settings from the custom user table take precedence. For example, it would allow redirecting the user's home directory to an alternate location (e.g. away from tmp and into a partition that is persistent).
Quoted 8 lines
The support/scripts/mkusers script will only retain settings from the latest definition it finds.
Thus, by passing the custom user table after the package defined users, it is possible to override the package provided user definitions.
Acked-by "Yann E. MORIN" <[email protected]>Signed-off-by Matthew Weber <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 26 lines
---
Change v1 -> v2
[Yann
- Updated commit message--- fs/common.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/common.mk +2
-1@@ -75,10 +75,11 @@ $(ROOTFS_COMMON_TAR): $(ROOTFS_COMMON_DEPENDENCIES) target-finalize echo '#!/bin/sh' > $(FAKEROOT_SCRIPT) echo "set -e" >> $(FAKEROOT_SCRIPT) echo "chown -h -R 0:0 $(TARGET_DIR)" >> $(FAKEROOT_SCRIPT) + + $(call PRINTF,$(PACKAGES_USERS)) >> $(USERS_TABLE) ifneq ($(ROOTFS_USERS_TABLES),) cat $(ROOTFS_USERS_TABLES) >> $(USERS_TABLE) endif - $(call PRINTF,$(PACKAGES_USERS)) >> $(USERS_TABLE) PATH=$(BR_PATH) $(TOPDIR)/support/scripts/mkusers $(USERS_TABLE) $(TARGET_DIR) >> $(FAKEROOT_SCRIPT) ifneq ($(ROOTFS_DEVICE_TABLES),) cat $(ROOTFS_DEVICE_TABLES) > $(FULL_DEVICE_TABLE)
PATCH v2 1/1 fs/common: allow custom user table to override package-defined users
In reply to Matt WeberQuoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Matt" == Matt Weber <[email protected]> writes:
Currently, when a custom user table and a package define the same user, the settings from the package takes precedence over the ones from the custom user table.
However, it makes sense to allow the settings from the custom user table take precedence. For example, it would allow redirecting the user's home directory to an alternate location (e.g. away from tmp and into a partition that is persistent).
The support/scripts/mkusers script will only retain settings from the latest definition it finds.
Thus, by passing the custom user table after the package defined users, it is possible to override the package provided user definitions.
Quoted 6 lines
Acked-by "Yann E. MORIN" <[email protected]>Signed-off-by Matthew Weber <[email protected]>---
Change v1 -> v2
[Yann
- Updated commit message
Committed to 2018.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard