Bug 836504

Summary: Symlink of ../../bin/gawk overrides original binary
Product: [Fedora] Fedora Reporter: Takanori MATSUURA <t.matsuu>
Component: preupgradeAssignee: Richard Hughes <hughsient>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 17CC: hughsient, mbriza, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-01 00:45:11 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:

Description Takanori MATSUURA 2012-06-29 09:58:28 UTC
/usr/bin/gawk is installed as a symlink to ../../bin/gawk (=/bin/gawk).
This overrides the binary file of /bin/gawk during installation of gawk package because /bin is the symlink of /usr/bin scince Fedora 16.

These symlinkes are generated manually in the spec file and should be wrapped by %if like the following
--- gawk.spec.orig	2012-06-07 20:58:14.000000000 +0900
+++ gawk.spec	2012-06-29 18:49:03.831448178 +0900
@@ -37,8 +37,10 @@
 
 mkdir -p $RPM_BUILD_ROOT%{_bindir}
 ln -sf gawk.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/awk.1.gz
+%if 0%{?fedora} <= 15
 ln -sf ../../bin/gawk $RPM_BUILD_ROOT%{_bindir}/awk
 ln -sf ../../bin/gawk $RPM_BUILD_ROOT%{_bindir}/gawk
+%endif
 mv $RPM_BUILD_ROOT/bin/{p,i}gawk $RPM_BUILD_ROOT%{_bindir}
 # remove %{version}* , when we are building a snapshot...
 rm -f $RPM_BUILD_ROOT/bin/{,p}gawk-%{version}* $RPM_BUILD_ROOT%{_infodir}/dir

Comment 1 Takanori MATSUURA 2012-06-29 10:02:35 UTC
This bug affects Fedora 17 and 16.

Comment 2 Ondrej Vasik 2012-06-29 15:10:58 UTC
Thanks for report, but I don't think this bug description is true... In F17 spec file of gawk-4.0.1-1.fc17 there is just
ln -sf gawk $RPM_BUILD_ROOT%{_bindir}/awk

And this update is already in stable repository. You probably did something wrong in your F16->F17 migration.

Comment 3 G. Michael Carter 2012-06-29 16:08:29 UTC
I have the same issue.  I upgraded three machines, and it only seems to have happened on the x86_64.  The other two are i386.

Comment 4 Martin Bříza 2012-07-03 07:28:58 UTC
These links in .spec files are correct. If you are using fedpkg to view them, just switch-branch to f16 and f17 to see the difference.
There are two possible reasons to this behavior I can think of:
 1) Installation of f16 packages into f17 (or the other way around)
 2) Bad update progress

Comment 5 Takanori MATSUURA 2012-07-03 09:49:59 UTC
I still use F16 because of the bug 827654.

I now found that /bin is the symlink to /usr/bin on my machine though it is F16. According to the timestamp of the symlink, it may be time when I was trying to upgrade or preupgrade from F16 to F17 (I'm not sure because it was over a month ago).

If my guess is correct, it's a bug on the installer because it changed the directory structure prior to the real upgrade process running.

I don't know the case of comment #3.

Comment 6 Ondrej Vasik 2012-07-03 11:28:16 UTC
Probably the preupgrade is the culprit... but still, this is not a fault of gawk - and I don't think this is solvable in preupgrade. IMHO notabug for gawk and likely cantfix in preupgrade ... anyway - moving to preupgrade component.

Comment 7 Fedora End Of Life 2013-07-03 22:41:42 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. 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 WONTFIX if it remains open with a Fedora 
'version' of '17'.

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 prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 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 to Fedora 17's end of life.

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 8 Fedora End Of Life 2013-08-01 00:45:15 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 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.

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