-
Notifications
You must be signed in to change notification settings - Fork 254
Add Global Config Option for creating User BTRFS Subvolumes in $HOME #1418
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
Conversation
|
Can you squash this into a single commit? And format the commit message properly? Something like |
|
Please add a |
Done. |
|
This needs squashing again. 😄 |
|
It looks like this project requires DCO signoffs, so you'll want to amend the commit with Also, can you please update the co-authored-by to: |
|
@alejandro-colomar |
alejandro-colomar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM.
Reviewed-by: Alejandro Colomar <alx@kernel.org>
Since it's a new feature, I'd like @hallyn or @ikerexxe to also review this.
Also, we're currently in a freeze, as we'll release in a week. We won't apply the patch until after the release. (I'll open an issue in a random line to make sure it blocks accidentally merging.)
|
Thanks for your time and help with polishing and reviewing the PR :) |
Wouldn't that require the thing running the test to be on BTRFS and /tmp which I have seen in the test being the Home Directory also being tmpfs and not BTRFS. Technically I could do an BTRFS Loopdevice Image and use that but that seems to be exetremly complex in contrast to other tests. |
Being so complex, I'd say just test it on your own computer, and if it passes, that's fine. Please include in the commit message the shell session with which you tested it, so that one can reproduce the test in their computer. Be aware that we might accidentally break something eventually, since we don't have regression tests, so it would be good if you (plural you, the users of this feature), report when it breaks. I don't use this feature myself, so can't know if it breaks. If you eventually want to write a test, that would of course be fine too. |
Ahhh I will probably figure something out. |
57f5b22 to
87aab19
Compare
Well we want to use it in a Distro and Fedora has an proposal etc. So eventually there will be enough Users that will show up when something breaks. |
That sounds good. Thanks! |
Closes: shadow-maint#1162 Co-authored-by: Neal Gompa <ngompa@velocitylimitless.com> Signed-off-by: Hadi Chokr <hadichokr@icloud.com> Signed-off-by: Neal Gompa <ngompa@velocitylimitless.com> Reviewed-by: Alejandro Colomar <alx@kernel.org>
ikerexxe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update in the documentation. Now I see why we can't create a specific file for this option.
As a last note, you should guard the code with #ifdef WITH_BTRFS, just like with the command-line option
Would that change anything in observable behavior? |
I think this code could be fine without wrapping in cpp(1) conditionals. Please revise, as I'm not 100% sure, though. |
Pretty sure having the variable set to true will have zero effects. The Code in this PR only adds the ability to define it in /etc/default/useradd instead of only an cdmline argument. If with BTRFS is disabled the config has zero effect, no? |
|
@ikerexxe @alejandro-colomar |
|
To avoid giving users the false impression that btrfs subvolumes are being created, we should conditionally compile the section. If the feature is compiled out, the associated help text and logic won't be visible to the user |
|
That's probably out of scope for this PR, since it was never like that before. |
On the other hand, there's https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation, which recommends avoiding conditional compilation as much as possible.
By visible text you mean with strings(1)? |
|
Also, if it's not on btrfs, it's going to do nothing anyway. So I'm not sure conditional compilation is really warranted? |
ikerexxe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disregard my previous comment, it's based on a wrong assumption. I'm fine with the changes as they are, but as Alejandro already mentioned let's merge this after 4.19 is out
|
Now that 4.19 is released, can we get this merged? @ikerexxe, it'd be great to get this backported into Fedora as well. |
alejandro-colomar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reminder! I confirm my approval.
|
Unfortunately, the next release will be after Fedora Linux 44 Final Freeze, so I'd rather have it backported now so we'd have it available for development in Fedora Linux 44. |
Fixes #1162