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

fowners, fperms: Fix handling of relative pathnames #1027

Merged
merged 3 commits into from
Apr 30, 2023

Conversation

ulm
Copy link
Member

@ulm ulm commented Apr 28, 2023

PMS section 12.3.9 specifies that fowners and fperms "[take] paths relative to the image directory."

Currently, these helpers interpret any pathnames not beginning with a slash as relative to the current working directory (after printing a QA warning). This contradicts the spec.

It is also inconsistent with other helpers like insinto or dostrip, which expand their pathnames relative to ${ED}.

Closes: https://bugs.gentoo.org/905223

@ulm ulm requested a review from mgorny April 28, 2023 09:31
@ulm
Copy link
Member Author

ulm commented Apr 28, 2023

See also #364.

ulm added a commit to ulm/portage that referenced this pull request Apr 28, 2023
PMS section 12.3.9 specifies that fowners and fperms "[take] paths
relative to the image directory."

Currently, these helpers interpret any pathnames not beginning with a
slash as relative to the current working directory (after printing a
QA warning). This contradicts the spec.

It is also inconsistent with other helpers like insinto or dostrip,
which expand their pathnames relative to ${ED}.

Bug: https://bugs.gentoo.org/905223
Closes: gentoo#1027
Signed-off-by: Ulrich Müller <[email protected]>
ulm added a commit to ulm/portage that referenced this pull request Apr 29, 2023
PMS section 12.3.9 specifies that fowners and fperms "[take] paths
relative to the image directory."

Currently, these helpers interpret any pathnames not beginning with a
slash as relative to the current working directory (after printing a
QA warning). This contradicts the spec.

It is also inconsistent with other helpers like insinto or dostrip,
which expand their pathnames relative to ${ED}.

Bug: https://bugs.gentoo.org/905223
Closes: gentoo#1027
Signed-off-by: Ulrich Müller <[email protected]>
@mgorny
Copy link
Member

mgorny commented Apr 30, 2023

I don't mind changing the behavior but I'd prefer if you left The QA warning in (and we wouldn't rely on either behavior, at least for some time).

@ulm
Copy link
Member Author

ulm commented Apr 30, 2023

I don't mind changing the behavior but I'd prefer if you left The QA warning in (and we wouldn't rely on either behavior, at least for some time).

Re-added QA warnings, with slightly different wording. Is is o.k. to remove them by the end of 2024?

ulm added 2 commits April 30, 2023 09:54
PMS section 12.3.9 specifies that fowners and fperms "[take] paths
relative to the image directory."

Currently, these helpers interpret any pathnames not beginning with a
slash as relative to the current working directory (after printing a
QA warning). This contradicts the spec.

It is also inconsistent with other helpers like insinto or dostrip,
which expand their pathnames relative to ${ED}.

Bug: https://bugs.gentoo.org/905223
Closes: gentoo#1027
Signed-off-by: Ulrich Müller <[email protected]>
@mgorny
Copy link
Member

mgorny commented Apr 30, 2023

Well, now it suggests that it's fine to use it, except it isn't because people may still be using old Portage versions that exhibit the old behavior. The QA warning should make it clear "don't use it until because old Portage doesn't handle it".

Suggested-by: Michał Górny <[email protected]>
Signed-off-by: Ulrich Müller <[email protected]>
@ulm
Copy link
Member Author

ulm commented Apr 30, 2023

Better now?

Copy link
Member

@mgorny mgorny left a comment

Choose a reason for hiding this comment

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

LGTM (untested).

@gentoo-bot gentoo-bot merged commit f979b31 into gentoo:master Apr 30, 2023
15 of 16 checks passed
@ulm ulm deleted the fowners branch April 30, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants