Skip to content

Comments

load-fragment: add user and home specifier to user.conf#26675

Merged
bluca merged 1 commit intosystemd:mainfrom
rpigott:home-specifier
Mar 10, 2023
Merged

load-fragment: add user and home specifier to user.conf#26675
bluca merged 1 commit intosystemd:mainfrom
rpigott:home-specifier

Conversation

@rpigott
Copy link
Contributor

@rpigott rpigott commented Mar 5, 2023

This enables the ManagerEnvironment= settings in the user's user.conf to reference the user's home and username for the purpose of setting environment variables derived from these values.


Resubmitted from #26596 as a PR as requested.

I've tested that it works now, at least in the scenario described by the issue. I added

[Manager]
ManagerEnvironment=XDG_CONFIG_DIRS=/etc/xdg:%h/.hostconfig/%H

To my ~/.config/systemd/user.conf and my user manager now searches ~/.hostconfig/$HOST/systemd/user/ for host specific unit files.

@github-actions github-actions bot added the please-review PR is ready for (re-)review by a maintainer label Mar 5, 2023
@yuwata yuwata linked an issue Mar 5, 2023 that may be closed by this pull request
Copy link
Member

@yuwata yuwata left a comment

Choose a reason for hiding this comment

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

If you want them, then why not for also for user id, group name, and so on?

@yuwata yuwata added pid1 needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer please-review PR is ready for (re-)review by a maintainer labels Mar 5, 2023
@github-actions github-actions bot added documentation please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Mar 5, 2023
@rpigott
Copy link
Contributor Author

rpigott commented Mar 5, 2023

Realized the manpage would need updating too so I added these specifiers to the systemd-system.conf manpage.

@yuwata yuwata added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Mar 5, 2023
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Mar 5, 2023
Copy link
Member

@yuwata yuwata left a comment

Choose a reason for hiding this comment

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

Looks superficially good to me. But one minor point.

Let's wait for other reviewers.

@yuwata yuwata added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed please-review PR is ready for (re-)review by a maintainer labels Mar 7, 2023
@yuwata yuwata added good-to-merge/with-minor-suggestions and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Mar 9, 2023
@poettering poettering added the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Mar 9, 2023
This enables the ManagerEnvironment= settings in the user's user.conf to
reference some user data like $HOME for the purpose of setting
environment variables derived from these values.
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Mar 9, 2023
@poettering poettering added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed please-review PR is ready for (re-)review by a maintainer labels Mar 9, 2023
@bluca bluca merged commit 0b40688 into systemd:main Mar 10, 2023
@github-actions github-actions bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Mar 10, 2023
@rpigott rpigott deleted the home-specifier branch March 10, 2023 00:14
@rpigott
Copy link
Contributor Author

rpigott commented Mar 10, 2023

Thanks everyone!

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

Development

Successfully merging this pull request may close these issues.

missing specifiers in user.conf

5 participants