Skip to content
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

(#2138081) More chase_symlinks*() shenanigans #124

Merged

Conversation

mrc0mmand
Copy link
Member

This reverts & backports the new set of patches for the recent chase_symlinks*() without /proc/ issue.

For RHEL we either want to backport systemd/systemd#25661 as well once it's merged, or drop the warning completely/lower it to debug, hence opening this as a draft for now.

/cc @msekletar

mrc0mmand and others added 6 commits December 8, 2022 10:56
… when /proc is not mounted"

This reverts commit 47c0c51.

Related: #2138081
(cherry picked from commit 03c16b9)

Related: #2138081
…bother with /proc/

Replaces: #25581
(cherry picked from commit 2075b6d)

Related: #2138081
…proc/

(cherry picked from commit 0f958c8)

Related: #2138081
This verifies the fix in 2075b6d.

(cherry picked from commit a7eed3e)

Related: #2138081
It's a bashism, but we use other bash features anyway, and it's cleaner
and much less verbose.

(cherry picked from commit 1f9caf2)

Related: #2138081
@mrc0mmand mrc0mmand changed the title More symlink shenanigans More chase_symlinks*() shenanigans Dec 8, 2022
@mergify mergify bot added the pr/needs-ci Formerly needs-ci label Dec 8, 2022
@systemd-rhel-bot systemd-rhel-bot added the pr/needs-review Formerly needs-review label Dec 8, 2022
@systemd-rhel-bot systemd-rhel-bot changed the title More chase_symlinks*() shenanigans (#2138081) More chase_symlinks*() shenanigans Dec 8, 2022
@jamacku jamacku added this to the v252 rebase milestone Dec 8, 2022
@msekletar
Copy link
Member

@jamacku we need to wait with this one until systemd/systemd#25661 is sorted out. On top of that we will need to change rpm macros and add --no-warn to systemctl invocations.

@mergify mergify bot removed the pr/needs-ci Formerly needs-ci label Dec 8, 2022
@systemd-rhel-bot systemd-rhel-bot changed the title (#2138081) More chase_symlinks*() shenanigans (#2138081) (#2138081) More chase_symlinks*() shenanigans Dec 27, 2022
@jamacku jamacku changed the title (#2138081) (#2138081) More chase_symlinks*() shenanigans (#2138081) More chase_symlinks*() shenanigans Jan 6, 2023
YHNdnzj and others added 5 commits January 12, 2023 11:34
Trying to disable a unit with no install info is mostly useless, so
adding a warning like we do for enable (with the new dbus method
'DisableUnitFilesWithFlagsAndInstallInfo()'). Note that it would
still find and remove symlinks to the unit in /etc, regardless of
whether it has install info or not, just like before. And if there are
actually files to remove, we suppress the warning.

Fixes #17689

(cherry picked from commit bf1bea4)

Related: #2141979
In cases like packaging scripts, it might be desired to use
enable/disable on units without install info. So, adding an
option '--no-warn' to suppress the warning.

(cherry picked from commit 108d35a)

Related: #2141979
Suppress the "empty [Install] section" warning (see #25437).

(cherry picked from commit 0acb145)

Related: #2141979
Follow-up for 0f958c8.

systemctl is called many times by dnf or so, and missing /proc/ is not
a user's fault, but package manager's issue.
With this commit, we can suppress the warning by updating rpm macros if
necessary.

(cherry picked from commit 91dfb74)

Related: #2141979
(cherry picked from commit 93b0ec8)

Related: #2141979
@mergify mergify bot added the pr/needs-ci Formerly needs-ci label Jan 12, 2023
@mrc0mmand mrc0mmand marked this pull request as ready for review January 12, 2023 10:37
Copy link
Member

@msekletar msekletar left a comment

Choose a reason for hiding this comment

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

@mrc0mmand thanks for following up on this, much appreciated!

LGTM

@systemd-rhel-bot systemd-rhel-bot removed the pr/needs-review Formerly needs-review label Jan 12, 2023
@mergify mergify bot removed the pr/needs-ci Formerly needs-ci label Jan 12, 2023
@systemd-rhel-bot systemd-rhel-bot merged commit 282bb5b into redhat-plumbers:main Jan 12, 2023
@mrc0mmand mrc0mmand deleted the more-symlink-shenanigans branch January 13, 2023 11:10
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.

8 participants