Bug 1185918 - Broken symlinks in kernel package
Summary: Broken symlinks in kernel package
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 21
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-26 15:59 UTC by Deepu K S
Modified: 2021-12-10 14:27 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-12-02 08:01:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
kernel.spec changes (804 bytes, patch)
2015-06-19 17:32 UTC, Deepu K S
no flags Details | Diff

Description Deepu K S 2015-01-26 15:59:01 UTC
Description of problem:
There are broken symlinks in kernel package.

# symlinks -r / | grep -i dangling | grep fc21
dangling: /usr/lib/modules/3.17.4-301.fc21.x86_64/source -> build
dangling: /usr/lib/modules/3.17.4-301.fc21.x86_64/build -> /usr/src/kernels/3.17.4-301.fc21.x86_64
# rpm -qf /usr/src/kernels/3.17.4-301.fc21.x86_64
error: file /usr/src/kernels/3.17.4-301.fc21.x86_64: No such file or directory

These symlinks need kernel-devel to be installed to complete it.

Version-Release number of selected component (if applicable):
Fedora release 21
kernel-3.17.4-301.fc21.x86_64

How reproducible:
Always

Steps to Reproduce:
# symlinks -r / | grep -i dangling | grep fc21
dangling: /usr/lib/modules/3.17.4-301.fc21.x86_64/source -> build
dangling: /usr/lib/modules/3.17.4-301.fc21.x86_64/build -> /usr/src/kernels/3.17.4-301.fc21.x86_64

Actual results:
# file /usr/lib/modules/3.17.4-301.fc21.x86_64/source 
/usr/lib/modules/3.17.4-301.fc21.x86_64/source: broken symbolic link to `build'
# file /usr/lib/modules/3.17.4-301.fc21.x86_64/build 
/usr/lib/modules/3.17.4-301.fc21.x86_64/build: broken symbolic link to `/usr/src/kernels/3.17.4-301.fc21.x86_64'

Expected results:
Broken symlinks (Dangling) should not be present.

Additional info:

Comment 1 Josh Boyer 2015-01-26 16:14:46 UTC
This has been this way as long as I can remeber.  Why is this a problem?

Comment 2 Deepu K S 2015-01-28 09:45:19 UTC
(In reply to Josh Boyer from comment #1)
> This has been this way as long as I can remeber.  Why is this a problem?

Hello Josh,

Thank you for looking into it.

We had run a simple script which checks for broken symlinks in filesystem, we could see the below dangling symlinks (first two from kernel package).
This can be completed by installing the 'kernel-devel' package.
==================================
/usr/lib/modules/3.17.4-301.fc21.x86_64/source: broken symbolic link to `build'
/usr/lib/modules/3.17.4-301.fc21.x86_64/build: broken symbolic link to `/usr/src/kernels/3.17.4-301.fc21.x86_64'
/usr/lib/debug/bin: broken symbolic link to `usr/bin'
/usr/lib/debug/sbin: broken symbolic link to `usr/sbin'
/usr/lib/debug/lib64: broken symbolic link to `usr/lib64'
/usr/lib/debug/lib: broken symbolic link to `usr/lib'
/usr/lib/debug/usr/.dwz: broken symbolic link to `../.dwz'
==================================

However, without installing kernel-devel, it simply keeps broken links on system. We believe symlinks are the responsibility of the sub-package (kernel-devel), not the "parent" (kernel).

ie. if the sub-package is not installed the symlink should not be there.
That way the system will never have any "BROKEN" links.

Comment 3 Deepu K S 2015-02-17 16:32:31 UTC
Hello,

Can kernel Team please provide an update on this bug?

Thanks.

Comment 4 Josh Boyer 2015-02-17 21:05:41 UTC
This is low priority and as I said it has been this way for years.  While I understand your script detects this, it isn't actually causing a problem and making a change won't happen soon.

Comment 5 John Dodson 2015-03-01 21:20:38 UTC
Can we at least create a "standard" where any symlink a package creates is
at least "owned" by the creating package?

Although this might mean some symlinks have multiple owners (that might introduce
a problem of it's own I'll leave the package management people to worry about
;-) it will at least give consistency & responsibility.

ie. I'm prepared to accept a broken symlink where the link itself actually has
an owner.

Taking responsibility for something you create is, I think, a priority ;-)

Comment 6 Deepu K S 2015-03-19 12:17:25 UTC
Hello Team,

I would appreciate if we could get an answer to comment #5 . 
Thanks in advance.

Comment 7 Josh Boyer 2015-03-19 12:33:36 UTC
The kernel team doesn't create packaging standards in Fedora.  You'll need to discuss that with the FPC.  As for the suggestion to own the symlink, it is already owned.

[jwboyer@vader ~]$ rpm -qf  /usr/lib/modules/3.18.7-200.fc21.x86_64/build
kernel-core-3.18.7-200.fc21.x86_64

Comment 8 Fedora Kernel Team 2015-04-28 18:30:37 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 21 kernel bugs.

Fedora 21 has now been rebased to 3.19.5-200.fc21.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 22, and are still experiencing this issue, please change the version to Fedora 22.

If you experience different issues, please open a new bug report for those.

Comment 9 Deepu K S 2015-06-19 17:31:14 UTC
A discussion thread had been started with FPC, "Subject Line : [Fedora-packaging] Broken Symlinks" . In the thread, it was suggested if someone could provide a patch which move the symlinks to kernel-devel subpackage.

The Fedora Package Guidelines says that package should own all of the files that are installed as part of the %install process.
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#FileAndDirectoryOwnership

[...]
Your package should own all of the files that are installed as part of
the %install process.
[...]

I had made the changes in kernel.spec file through which symlinks are moved to kernel-devel package.
The patch was posted on the FPC thread, Attaching the patch here.

Comment 10 Deepu K S 2015-06-19 17:32:46 UTC
Created attachment 1041034 [details]
kernel.spec changes

Comment 11 Fedora End Of Life 2015-11-04 11:23:38 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2015-12-02 08:01:08 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.