Bug 967558 - qa-test-day: Fix Firefox not showing Test Day web pages
qa-test-day: Fix Firefox not showing Test Day web pages
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: spin-kickstarts (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeroen van Meeuwen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-27 09:08 EDT by Kamil Páral
Modified: 2013-05-28 09:50 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-05-28 09:50:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kamil Páral 2013-05-27 09:08:14 EDT
Description of problem:
A recent Firefox change broke some of our changes in qa-test-day.ks. Please commit the following patch to 'f19' and 'master' branches:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
commit 90ab4eb462a269cc9b8f100059dfbcb97530fcd4
Author: Kamil Páral <kamil.paral@gmail.com>
Date:   Mon May 27 15:02:31 2013 +0200

    qa-test-day: Fix Firefox not showing Test Day web pages
    
    A change in Firefox disabled our homepage override. Fix that.

diff --git a/custom/qa-test-day.ks b/custom/qa-test-day.ks
index 455ea35..f02791d 100644
--- a/custom/qa-test-day.ks
+++ b/custom/qa-test-day.ks
@@ -110,7 +110,9 @@ firefox
 # the installed system. This image is not intended for installation, but you
 # never know what your users might do.
 
-cat >> /etc/rc.d/init.d/livesys << EOF
+# "EOF" is quoted so that variables are not expanded. Search for "here-document"
+# in man bash.
+cat >> /etc/rc.d/init.d/livesys << "EOF"
 
 # Create Test Day welcome screen
 # Note that shebang must be written this way, else it is considered as comment
@@ -135,22 +137,27 @@ ln -s /usr/share/applications/test-day-welcome.desktop /etc/xdg/autostart/
 rm -f /home/liveuser/.config/autostart/fedora-welcome.desktop
 
 # Change Firefox start page to open Test Day wiki and IRC chat
-mkdir -p /tmp/chrome/en-US/locale/branding
-cat << FOE > /tmp/chrome/en-US/locale/branding/browserconfig.properties
+# (and a few more properties)
+mkdir /tmp/firefox
+unzip /usr/lib*/firefox/browser/omni.ja -d /tmp/firefox
+
+cat << FOE > /tmp/firefox/chrome/en-US/locale/branding/browserconfig.properties
 browser.startup.homepage=https://fedoraproject.org/wiki/Test_Day:Current | http://webchat.freenode.net/?channels=fedora-test-day
 FOE
 
-# Set up a few more properties
-unzip /usr/lib*/firefox/omni.ja defaults/preferences/firefox-branding.js -d /tmp
-cat << FOE >> /tmp/defaults/preferences/firefox-branding.js
+cat << FOE >> /tmp/firefox/defaults/preferences/firefox-branding.js
 pref("startup.homepage_welcome_url","");
 pref("startup.homepage_override_url","");
 pref("browser.rights.3.shown", true);
 FOE
 
-(cd /tmp; zip /usr/lib*/firefox/omni.ja chrome/en-US/locale/branding/browserconfig.properties \
-                                        defaults/preferences/firefox-branding.js)
-rm -rf /tmp/chrome /tmp/defaults
+# We need to re-zip the whole archive (instead of just updating files), because
+# the original archive is "Firefox optimized" and updating doesn't work
+# https://bugzilla.mozilla.org/show_bug.cgi?id=605524
+OMNIJA=`ls /usr/lib*/firefox/browser/omni.ja`
+rm -f $OMNIJA
+(cd /tmp/firefox; zip -r -0 $OMNIJA *)
+rm -rf /tmp/firefox
 
 # Adjust launchers in dash using a vendor override. (Adding a profile would
 # be another way to do this.)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thank you.

Version-Release number of selected component (if applicable):
spin-kickstarts git e835795
Comment 1 Kevin Fenzi 2013-05-28 09:50:40 EDT
Committed to f19 and master. Thanks.

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