Bug 1003691

Summary: firefox pretrans scriptlet issues
Product: [Fedora] Fedora Reporter: Kevin Fenzi <kevin>
Component: firefoxAssignee: Jan Horak <jhorak>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: amcnabb, dan.mashal, dwmw2, elad, fedora, gecko-bugs-nobody, kparal, madsen, robatino, samuel-rhbugs, stransky, tflink
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: firefox-23.0.1-4.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-06 05:23:20 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:
Bug Depends On:    
Bug Blocks: 980649    

Description Kevin Fenzi 2013-09-02 18:36:34 UTC
In ec429e944715fe7a0471a68f225b35e267fe8d67 a pretrans scriptlet was added to firefox. 

+%pretrans
+# Moves defaults/preferences to browser/defaults/preferences in Fedora 19+
+%if 0%{?fedora} >= 19
+if [ -L %{mozappdir}/browser/defaults/preferences ]; then
+  rm %{mozappdir}/browser/defaults/preferences
+  mkdir -p %{mozappdir}/browser/defaults/preferences
+  if [ -d %{mozappdir}/defaults/preferences ]; then
+    mv %{mozappdir}/defaults/preferences/* %{mozappdir}/browser/defaults/preferences
+    rm -f %{mozappdir}/defaults/preferences/*
+    echo "Content of this directory has been moved to %{mozappdir}/browser/defaults/preferences." >
+  fi
+fi
+%endif

This causes any composes that use firefox to fail, because rpm can't be sure and have bash before the transaction since it's a new install. 

See: 
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#The_.25pretrans_scriptlet

So, at the very least you need to re-write this in lua so it can use the rpm copy of lua. Bash will never work here on new/fresh installs.

Comment 1 Elad Alfassa 2013-09-02 18:38:42 UTC
I would suggest moving it to firefox.sh, seems more reasonable

Comment 2 Martin Stransky 2013-09-03 05:28:47 UTC
Hm, looks more complicated than we expected.

Comment 3 Martin Stransky 2013-09-03 05:31:52 UTC
IMHO We can also run it from some other rpm script where the bash can be used, like %post or so.

Comment 4 Martin Stransky 2013-09-03 05:33:37 UTC
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Scriptlets seems to provide useful guide.

Comment 5 Tim Flink 2013-09-03 14:40:08 UTC
*** Bug 1003230 has been marked as a duplicate of this bug. ***

Comment 6 Tim Flink 2013-09-03 14:50:07 UTC
Can we get this fixed soon? It's causing a lot of problems with f20 alpha as you can't really do an installation without de-selecting firefox

Comment 7 Tim Flink 2013-09-03 14:52:42 UTC
This was already proposed as a F20 alpha blocker, but it does violate the following F20 alpha release criterion [1]:

There must be no errors in any package on the release-blocking images which cause the package to fail to install.

[1] http://fedoraproject.org/wiki/Fedora_20_Alpha_Release_Criteria#No_broken_packages

It does break the installation process but this criterion is more accurate since it's a broken package issue

Comment 8 Jan Horak 2013-09-03 15:37:54 UTC
This is actually fix for bug 976420. It can't be fixed in firefox.sh nor %post section because symlink must be removed before installation. Otherwise it fails. I will have to rewrite it to lua then.

Comment 9 Tim Flink 2013-09-03 15:51:36 UTC
(In reply to Jan Horak from comment #8)
> This is actually fix for bug 976420. It can't be fixed in firefox.sh nor
> %post section because symlink must be removed before installation. Otherwise
> it fails. I will have to rewrite it to lua then.

Any idea when we can expect a rewritten script? I'd really like to get this taken care of for the next f20 alpha TC (in the next day or two).

Comment 10 Jan Horak 2013-09-03 16:24:05 UTC
Firefox-23.0.1-4 is fixing this issue. Builds should be finished in koji soon. You don't need update in bodhi for F20, do you?

Comment 11 Tim Flink 2013-09-03 17:29:19 UTC
(In reply to Jan Horak from comment #10)
> Firefox-23.0.1-4 is fixing this issue. Builds should be finished in koji
> soon. You don't need update in bodhi for F20, do you?

As long as the build is done before alpha freeze later today, I don't think an update is needed.

Comment 12 Tim Flink 2013-09-04 01:06:20 UTC
http://koji.fedoraproject.org/koji/buildinfo?buildID=461257 has been built as a fix for this bug and it will be included in F20 alpha TC3. Moving to ON_QA

Comment 13 Dan Mashal 2013-09-04 02:19:53 UTC
Thanks.

Comment 14 Dethlef Madsen 2013-09-04 16:29:13 UTC
*** Bug 1003587 has been marked as a duplicate of this bug. ***

Comment 15 Kamil Páral 2013-09-04 16:56:31 UTC
Discussed at 2013-09-04 blocker review meeting [1]. This is accepted as an Alpha blocker, because it violates the following F20 alpha release criterion for firefox, which is part of the default gnome install: "There must be no errors in any package on the release-blocking images which cause the package to fail to install." [2]

[1] http://meetbot.fedoraproject.org/fedora-blocker-review/2013-09-04/
[2] https://fedoraproject.org/wiki/Fedora_20_Alpha_Release_Criteria#No_broken_packages

Comment 16 Andrew McNabb 2013-09-04 22:47:32 UTC
I'm also seeing this error ("script error with package firefox") in a Fedora 19 netinstall. Is the fix going to be backported to Fedora 19 as well?

Comment 17 Chris Smart 2013-09-05 00:05:43 UTC
Thank you, this was breaking my livecd-creator builds with:

Error creating Live CD : Dependency check failed : (('firefox', '23.0.1', '3.fc19'), ('/bin/sh', ''), 0, 0, None)

Works fine when I pull in koji's firefox-23.0.1-4.

-c

Comment 18 Samuel Sieb 2013-09-05 05:31:09 UTC
Please submit an update for F19 as well. This breaks the installer when updates are enabled.

Comment 19 Fedora Update System 2013-09-05 09:11:45 UTC
firefox-23.0.1-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/firefox-23.0.1-4.fc18

Comment 20 Fedora Update System 2013-09-05 09:12:08 UTC
firefox-23.0.1-4.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/firefox-23.0.1-4.fc19

Comment 21 David Woodhouse 2013-09-05 12:41:55 UTC
*** Bug 1004766 has been marked as a duplicate of this bug. ***

Comment 22 Fedora Update System 2013-09-06 05:16:23 UTC
Package firefox-23.0.1-4.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing firefox-23.0.1-4.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15912/firefox-23.0.1-4.fc18
then log in and leave karma (feedback).

Comment 23 Fedora Update System 2013-09-06 05:23:20 UTC
firefox-23.0.1-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.