-
Notifications
You must be signed in to change notification settings - Fork 495
feat: add ALT Linux compatibility improvements #1989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Use mkdir -p in setup_aptrpm() to prevent command failure if /etc/tcb/$user already exists.
Private tmp directory is not needed as /tmp is mounted from host system. Using pam_mktemp would break the PAM stack. Signed-off-by: Andrey Limachko <[email protected]>
Add new --container-runuser/-R option that allows using runuser instead of su inside container when unshare_groups is enabled. This can be configured via: - Command line: --container-runuser or -R - Environment variable: DBX_CONTAINER_RUNUSER=1/true - Config file: distrobox_container_runuser=1/true The option defaults to disabled (0) to maintain backward compatibility.
|
Hi @liannnix is |
Hi, In ALT Linux The actual problem is that That’s why the opt-in |
|
Got it now it's more clear I'm open to find a way to make it work that does not involve additional options, env variables, or flags. ALT Linux has a dedicated setup section in the init (about line 967) you can use that to put in some logic in order to make it compliant. Had this problem before with Alpine and Chimera where |
Thanks for the detailed explanation, that makes your concerns much clearer. I agree that a per-distro flag is not ideal, and it’s better to handle ALT Linux specifics in its dedicated init section instead. I’ll rework the PR to move the |
This PR adds ALT Linux support to distrobox, addressing compatibility issues with ALT Linux containers. The changes include:
What was done
Added
--container-runuseroption (-R) to userunuserinstead ofsuinside containers whenunshare_groupsis enabledDBX_CONTAINER_RUNUSER, and configuration fileAdded ALT Linux setup hooks in
distrobox-init:pam_mktempfor AltLinux PAM stack compatibilityFixed directory creation using
mkdir -pto prevent errors when/etc/tcb/$useralready existsWhy this is needed
ALT Linux has specific requirements for user management and authentication:
Critical incompatibility: ALT Linux uses a different
suimplementation that is incompatible with the standardsufrom util-linux package. The ALT Linuxsuhas different command-line options and behavior.Alternative solution:
runuserprovides compatible functionality and integrates better with ALT Linux security systems.Additional requirements:
pam_mktempconflicts with container environments (private/tmpdirectory is unnecessary since/tmpis mounted from host)