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

Please remove the "absolute symlink" warnings #2419

Closed
voxik opened this issue Mar 8, 2023 · 11 comments
Closed

Please remove the "absolute symlink" warnings #2419

voxik opened this issue Mar 8, 2023 · 11 comments
Assignees

Comments

@voxik
Copy link
Contributor

voxik commented Mar 8, 2023

I have read the #668, but I disagree with the #680. Both relative as well as absolute symlinks has their own issue in the build root and elsewhere. There is not clear winner. Neither Fedora packaging guidelines choose sides. The warnings are just noise. Please remove them.

@voxik voxik changed the title Please remove the Please remove the "absolute symlink" warnings Mar 8, 2023
@voxik
Copy link
Contributor Author

voxik commented Mar 8, 2023

Just for the context, I am working on project to remove bundled assets in generated RDoc documentation:

https://fedorapeople.org/cgit/vondruch/public_git/darkfish.git/

This is going to replace the assets with symlinks and I think the absolute symlinks is the right choice, because it allows users to copy the documentation around while keep it working.

But in turn, that means that every rubygem-*-doc package will spit tens or more symlink warnings:

... snip ...

Processing files: rubygem-gem2rpm-1.0.2-1.fc39.noarch
Provides: rubygem(gem2rpm) = 1.0.2 rubygem-gem2rpm = 1.0.2-1.fc39
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /usr/bin/ruby ruby(rubygems)
Processing files: rubygem-gem2rpm-doc-1.0.2-1.fc39.noarch
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/css/fonts.css -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/css/fonts.css
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/css/rdoc.css -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/css/rdoc.css
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/add.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/add.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/arrow_up.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/arrow_up.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/brick.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/brick.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/brick_link.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/brick_link.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/bug.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/bug.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/bullet_black.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/bullet_black.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/bullet_toggle_minus.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/bullet_toggle_minus.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/bullet_toggle_plus.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/bullet_toggle_plus.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/date.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/date.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/delete.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/delete.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/find.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/find.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/loadingAnimation.gif -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/loadingAnimation.gif
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/macFFBgHack.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/macFFBgHack.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/package.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/package.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/page_green.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/page_green.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/page_white_text.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/page_white_text.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/page_white_width.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/page_white_width.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/plugin.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/plugin.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/ruby.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/ruby.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/tag_blue.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/tag_blue.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/tag_green.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/tag_green.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/transparent.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/transparent.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/wrench.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/wrench.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/wrench_orange.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/wrench_orange.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/zoom.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/zoom.png
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/js/darkfish.js -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/js/darkfish.js
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/js/navigation.js -> /usr/share/rdoc-generator-fedora-darkfish/json_index/js/navigation.js
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/js/search.js -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/js/search.js
warning: absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/js/searcher.js -> /usr/share/rdoc-generator-fedora-darkfish/json_index/js/searcher.js
Provides: rubygem-gem2rpm-doc = 1.0.2-1.fc39
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: rdoc-generator-fedora-darkfish-assets
Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/rubygem-gem2rpm-1.0.2-1.fc39.x86_64
Wrote: /builddir/build/RPMS/rubygem-gem2rpm-1.0.2-1.fc39.noarch.rpm
Wrote: /builddir/build/RPMS/rubygem-gem2rpm-doc-1.0.2-1.fc39.noarch.rpm

RPM build warnings:
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/css/fonts.css -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/css/fonts.css
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/css/rdoc.css -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/css/rdoc.css
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/add.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/add.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/arrow_up.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/arrow_up.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/brick.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/brick.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/brick_link.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/brick_link.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/bug.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/bug.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/bullet_black.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/bullet_black.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/bullet_toggle_minus.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/bullet_toggle_minus.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/bullet_toggle_plus.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/bullet_toggle_plus.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/date.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/date.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/delete.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/delete.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/find.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/find.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/loadingAnimation.gif -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/loadingAnimation.gif
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/macFFBgHack.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/macFFBgHack.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/package.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/package.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/page_green.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/page_green.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/page_white_text.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/page_white_text.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/page_white_width.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/page_white_width.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/plugin.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/plugin.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/ruby.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/ruby.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/tag_blue.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/tag_blue.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/tag_green.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/tag_green.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/transparent.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/transparent.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/wrench.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/wrench.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/wrench_orange.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/wrench_orange.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/images/zoom.png -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/images/zoom.png
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/js/darkfish.js -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/js/darkfish.js
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/js/navigation.js -> /usr/share/rdoc-generator-fedora-darkfish/json_index/js/navigation.js
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/js/search.js -> /usr/share/rdoc-generator-fedora-darkfish/darkfish/js/search.js
    absolute symlink: /usr/share/gems/doc/gem2rpm-1.0.2/rdoc/js/searcher.js -> /usr/share/rdoc-generator-fedora-darkfish/json_index/js/searcher.js
Finish: rpmbuild rubygem-gem2rpm-1.0.2-1.fc36.src.rpm
Finish: build phase for rubygem-gem2rpm-1.0.2-1.fc36.src.rpm
INFO: Done(rubygem-gem2rpm-1.0.2-1.fc36.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 17 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
Finish: run

I don't think RPM should judge this.

@dmnks
Copy link
Contributor

dmnks commented Mar 8, 2023

Hmm, this looks like a good candidate for a treatment similar to #2383, i.e. suppressing these warnings into a single one with a count.

@pmatilai
Copy link
Member

pmatilai commented Mar 9, 2023

Absolute symlinks are downright dangerous in combination with chrooted content. The absolute link okay inside the chroot of course, but have you never, ever looked at eg /var/lib/mock/ stuff without chrooting into it?

The reason rpm complains about absolute symlinks is that they are problematic (for the user!) in the rpm context where chrooted installations is bread-and-butter daily business.

@pmatilai
Copy link
Member

pmatilai commented Mar 9, 2023

@dmnks , in reality these warnings are not the same because the filename differs. The %patch case is similar: it really should print out the line number + line, it was only made the way it is to allow us to squeeze it into 4.18.

We shouldn't get into a habit of producing bad warning messages for the purpose of suppressing them 😆

@voxik
Copy link
Contributor Author

voxik commented Mar 9, 2023

Absolute symlinks are downright dangerous in combination with chrooted content. The absolute link okay inside the chroot of course, but have you never, ever looked at eg /var/lib/mock/ stuff without chrooting into it?

You mean that outside of chroot, they point to system locations? What is wrong with it? That is fine by me and if I am "lucky", they might point to useful location. Or is the problem that some might edit e.g. system configuration instead of the chroot configuration? I don't see this as a problem.

Again, if this is so problematic, then this should be probably reflected in Fedora guidelines, but not judged by RPM. RPM on itself has not any use of chroot.

@pmatilai
Copy link
Member

pmatilai commented Oct 12, 2023

Rpm chroot installations and the associated problems (yes, content pointing to system locations with a non-trivial risk of breaking things badly) with absolute links are not specific to Fedora in any way. The warning is there for a reason and the way to avoid it is to convert to relative links, whether automatically as suggested in #668 or manually.

@voxik
Copy link
Contributor Author

voxik commented Oct 12, 2023

Then could you please do me a favor and propose update to Fedora packaging guidelines? I won't do it myself, because I disagree with this and consider the current guidelines to be correct. But they should be in line with what RPM thinks if RPM changes its mind.

@voxik
Copy link
Contributor Author

voxik commented Oct 12, 2023

Or this should be configurable and Fedora should be able to choose to configure RPM in a way that it is consistent with their guidelines.

@pmatilai
Copy link
Member

Sorry but I don't go around lecturing distros what they should or shouldn't do. That's what the warning is for.

@voxik
Copy link
Contributor Author

voxik commented Oct 12, 2023

The guideline is in Fedora at least as long as the Git history goes, which is 5 years. The warning landed in RPM ~3.5 years ago. So if the RPM was pushed into Fedora by the RPM team, it would be just fair to make sure that the guidelines are aligned with what RPM does.

In this case, RPM is certainly lecturing distros and it would be just fair if RPM team would taken the additional step and made sure the distros guideline does not result in warnings.

@pmatilai
Copy link
Member

Yes, like I said, the warning is a piece of education from the upstream.

I see no reason why distros should make a special statement about this whatsoever. If you feel so, then you go file a request about it. By all means.

@rpm-software-management rpm-software-management locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants