Bug 840119

Summary: Spec file creates broken symlink
Product: [Fedora] Fedora Reporter: John Eckersberg <jeckersb>
Component: rubygem-actionpackAssignee: Mo Morsi <mmorsi>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkabrda, mastahnke, mmorsi, sseago, vanmeeuwen+fedora, vondruch
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-01 06:28:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to remove unneeded symlink logic none

Description John Eckersberg 2012-07-13 19:06:10 UTC
Created attachment 598151 [details]
Patch to remove unneeded symlink logic

Description of problem:

File usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/test/fixtures/symlink_parent/symlink_parent is a dangling symlink (to ../../symlink_parent/)

Version-Release number of selected component (if applicable):
rubygem-actionpack-3.0.15-1.fc18.noarch

How reproducible:
Always

Steps to Reproduce:
1. wget http://kojipkgs.fedoraproject.org//packages/rubygem-actionpack/3.0.15/1.fc18/noarch/rubygem-actionpack-3.0.15-1.fc18.noarch.rpm
2. rpmdev-extract rubygem-actionpack-3.0.15-1.fc18.noarch.rpm
3. ls -l rubygem-actionpack-3.0.15-1.fc18.noarch/usr/share/gems/gems/actionpack-3.0.15/test/fixtures/symlink_parent/symlink_parent
  
Actual results:
Broken symlink

Expected results:
No broken symlink

Additional info:
It looks like the original symlink was probably absent at some point in the past (test/fixtures/layout_tests/layouts/symlinked) which caused it to get added to the RPM spec.  But when the link got fixed upstream, it caused the spec file to *follow* the corrected symlink and create the broken link inside of the *target* of the original.

End result, it looks like the symlink can just go away from the spec and everything is fine.  Attaching a patch for that.

Comment 1 Bohuslav "Slavek" Kabrda 2012-07-31 10:09:15 UTC
This file is needed for a unit test (note that it's present in the "test/fixtures" directory), that tests behaviour when using broken symlinks. The symlink is therefore broken on purpose, this is expected.

I'm closing this as NOTABUG.

Comment 2 John Eckersberg 2012-07-31 14:19:52 UTC
What unit test are you referring to?

I see tests that verify a valid symlink is correctly followed (LayoutSymlinkedTest/LayoutSymlinkedIsRenderedTest).

I do not see any tests that check for broken symlinks.

If you apply the attached patch and run the tests, all of the tests still pass.

Comment 3 Bohuslav "Slavek" Kabrda 2012-08-01 06:12:48 UTC
Ah, sorry you are right. It seems that the symlink was added to the specfile when actionpack was being updated to 2.3.4 (dist-git commit hash f3870f6).

As you say, the symlink is not needed, I will fix this in Rawhide, I don't think it's necessary to fix this issue in lower Fedoras, as it doesn't cause any problems.