Skip to content

[Packaging]: Use system-defined location for home directories - #62507

Merged
dmick merged 2 commits into
ceph:mainfrom
NVShawn:main
May 21, 2025
Merged

dmick merged 2 commits into
ceph:mainfrom
NVShawn:main

Conversation

@NVShawn

@NVShawn NVShawn commented Mar 25, 2025

Copy link
Copy Markdown
Contributor

This patch removes the assumption that user home directories always live under /home. If the user has set home directories to live under a different directory by changing /etc/adduser.conf, this will honor that setting.

Signed-off-by: Shawn Edwards [email protected]

This patch removes the assumption that user home directories always live under /home. If the user has set home directories to live under a different directory by changing /etc/adduser.conf, this will honor that setting.

Signed-off-by: Shawn Edwards <[email protected]>
@ceph-jenkins

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

Comment thread debian/cephadm.postinst Resolved
@NVShawn

NVShawn commented Mar 27, 2025 via email

Copy link
Copy Markdown
Contributor Author

@dmick

dmick commented Mar 27, 2025

Copy link
Copy Markdown
Member

It seems that the answer is that "true Bourne shell" just doesn't exist on many (any?) Linux distros; /bin/sh is usually a symlink to either dash or bash, which are both Posix-compliant and support tilde expansion.

@NVShawn

NVShawn commented Mar 31, 2025 •

Copy link
Copy Markdown
Contributor Author

True 'Bourne Shell' hasn't been maintained for some time. The license is hilariously discussed here: https://en.wikipedia.org/wiki/Talk:Bourne_shell#License (BYO flame-retardant undies)

The closest thing I can find to an 'original' Bourne shell is from Schily's tools. One can build a non-POSIX compliant shell (obosh) if one wants to. I know of no distribution or POSIX OS which would inflict this on their users.

@dmick

dmick commented May 3, 2025 •

Copy link
Copy Markdown
Member

I'm sorry to have let this sit for a while. One thing that concerns me is how many different places in the Ceph codebase we might have that are assuming /home; a quick grep finds an obvious one that should be included in this PR, in doc/cephadm/install.rst, but somewhat-surprisingly, not a lot else in src. So this is probably OK if you'll add an update to doc/.

@NVShawn
NVShawn requested a review from a team as a code owner May 5, 2025 15:40
@NVShawn

NVShawn commented May 20, 2025

Copy link
Copy Markdown
Contributor Author

Please let me know if there is anything further you need from me on this pull request. Thanks!

@dmick
dmick self-requested a review May 21, 2025 01:19

@dmick dmick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@dmick
dmick merged commit d9c429f into ceph:main May 21, 2025
@cbodley

cbodley commented Jul 11, 2025

Copy link
Copy Markdown
Contributor

@NVShawn this pr seems to be causing package installation errors against ubuntu 24.04, tracked in https://tracker.ceph.com/issues/72083. there, adduser without --home ends up pointing to /nonexistent so cephadm.postinst fails with:

mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory

from https://manpages.ubuntu.com/manpages/noble/man8/adduser.8.html:

If no home directory is specified, the default home directory for a new system user is /nonexistent. This directory should never exist on any Debian system, and adduser will never create it automatically.

can you help me find a better solution than #64459 which just adds back --home /home/cephadm?

@NVShawn

NVShawn commented Jul 14, 2025

Copy link
Copy Markdown
Contributor Author

Use /var/lib/cephadm for the home directory. /var should be locally writable on all hosts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants