Bug 629401

Summary: emacs package has /usr/bin/emacs as an empty file
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: emacsAssignee: Karel Klíč <kklic>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: jan.kratochvil, jonathan.underwood, kklic, rvokal, sangu.fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: emacs-23.2-19.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-26 21:55:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michal Jaegermann 2010-09-01 21:42:50 UTC
Description of problem:

Running 'rpm -qlvf /usr/bin/emacs-23.2 | grep /bin/' reveals the following:

-rwxr-xr-x    1 root    root                        0 Aug 19 09:05 /usr/bin/emacs
-rwxr-xr-t    1 root    root                 10794944 Aug 19 09:05 /usr/bin/emacs-23.2

Quite likely that is why after the last update I ended entirely without /usr/bin/emacs.

Re-running suitable '/usr/sbin/update-alternatives/ ...' from emacs package postinstall scriptlet restored missing symlink but "by itself" it was not there.

Version-Release number of selected component (if applicable):
emacs-23.2-12.fc15.x86_64

Additional info:
Effects of 'rpm -qlvf /usr/bin/emacs-23.2 | grep /bin/' on a Fedora 13 installation are quite different.  Namely:

-rwxr-xr-t    1 root    root                 10799040 Jun  3 06:40 /usr/bin/emacs-23.2
-rwxr-xr-x    1 root    root                       58 May 20 08:02 /usr/bin/emacs-terminal

Yes, I realize that /usr/bin/emacs-terminal for F15 is in a separate package.

Comment 1 Karel Klíč 2010-09-06 12:02:35 UTC
This bug is related to the changes introduced by fixing #614935.

However, I tried to install and run Emacs on Rawhide and it worked fine here.

That zero-length /usr/bin/emacs is in the rpm to make `yum whatprovides /usr/bin/emacs` work.

Could you try to run `yum remove emacs && yum add emacs` to see if it works for you, please?

Comment 2 Jan Kratochvil 2010-09-06 12:47:42 UTC
%ghost should be enough to make whatprovides work, shouldn't it?
If it does not, isn't it rather a rpm/yum bug?

Comment 3 Michal Jaegermann 2010-09-06 18:25:54 UTC
(In reply to comment #1)
> This bug is related to the changes introduced by fixing #614935.

I am not convinced that this is the rigth fix to bug 614935
 
> However, I tried to install and run Emacs on Rawhide and it worked fine here.

> That zero-length /usr/bin/emacs is in the rpm to make `yum whatprovides
> /usr/bin/emacs` work.

If you will look, say, at cups-1.4.4-9.fc15 package then you may notice that
it owns /usr/bin/lpr, and 'yum whatprovides /usr/bin/lpr' works just fine but there is no empty file /usr/bin/lpr on that package listing.  That is quite normal for stuff which goes through "alternatives"; although I have admit that a random check on such thing revealed a zero length file /usr/sbin/sendmail
owned by sendmail-8.14.4-12.fc15 and that does not seem to cause any ill-effects. Still 'cups' package appears to do that better.

I am not sure that this zero-length file was a reason why I lost /usr/bin/emacs
after an _update_.  I was looking at possible irregularities in the package, as package scripts seem to look ok, and that what came up.

> Could you try to run `yum remove emacs && yum add emacs` to see if it works for
> you, please?

That does work fine but this is a wrong test.  The issue is an update
and yum does that first by installing a new package and later running cleanup.
Something apparently "ate" /usr/bin/emacs in the later phase.

This bug returns quite regularly and for some reasons emacs is unlucky.  Maybe looking how it was resolved in the past would be of help?  See bug 154326, bug 239745, bug 394131, bug 437599 and bug 474578.  Hopefuly some of that will fit.

Comment 4 Karel Klíč 2010-09-07 15:42:04 UTC
> If you will look, say, at cups-1.4.4-9.fc15 package then you may notice that
> it owns /usr/bin/lpr, and 'yum whatprovides /usr/bin/lpr' works just fine but
> there is no empty file /usr/bin/lpr on that package listing.  That is quite
> normal for stuff which goes through "alternatives"; although I have admit that
> a random check on such thing revealed a zero length file /usr/sbin/sendmail
> owned by sendmail-8.14.4-12.fc15 and that does not seem to cause any
> ill-effects. Still 'cups' package appears to do that better.

You might be right, I need to investigate it more. However, I have followed 
https://fedoraproject.org/wiki/Packaging:Alternatives
and that page says that the "touch %{buildroot}%{_bindir}/emacs" should be in the spec file. And if you touch and then add %ghost entry of the same file, you get the 0-length file in the rpm.

Comment 5 Michal Jaegermann 2010-09-07 18:00:51 UTC
After an update from emacs-23.2-12.fc15.x86_64 to emacs-23.2-13.fc15.x86_64 I do have /usr/bin/emacs link so I am not sure what was responsible for a "disappearing act" on 23.2-10.fc15->23.2-12.fc15 transition.  Problems in 23.2-10.fc15 package scripts?  I did not look there.

Comment 6 Fedora Update System 2011-05-23 14:37:18 UTC
emacs-23.2-10.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/emacs-23.2-10.fc14

Comment 7 Fedora Update System 2011-05-23 14:37:31 UTC
emacs-23.2-19.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/emacs-23.2-19.fc15

Comment 8 Fedora Update System 2011-05-25 02:29:18 UTC
Package emacs-23.2-10.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing emacs-23.2-10.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/emacs-23.2-10.fc14
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2011-05-26 15:42:52 UTC
emacs-23.2-11.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/emacs-23.2-11.fc14

Comment 10 Fedora Update System 2011-05-26 21:54:54 UTC
emacs-23.2-19.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.