firefox-45 套件實例

  1. 緣由:firefox v38.6 某些網頁還是會當掉。
  2. v45 firefox hello 視訊 (video+audio) 包含文字聊天室,但文字有部分遺漏待處理。
  3. v38 facebook 中文輸入有問題,v45 已解決此問題。
  4. v45 必須修改字型設定,註解以下部分,否則網頁細明體字不够清楚。
    [dywang@dywnb ~]$ tail -29 .fonts.conf
    <!--處理楷體>
    <match target="font">
            <test qual="any" name="family" compare="eq">
                    <string>AR PL UKai TW</string>
                    <string>AR PL UKai CN</string>
           </test>
           <test name="pixelsize" compare="more_eq">
                  <double>12</double>
           </test>
           <test name="pixelsize" compare="less_eq">
                  <double>16</double>
           </test>
           <edit name="antialias" mode="assign">
                  <bool>ture</bool>
           </edit>
    </match>
    
    <match target="pattern">
           <test name="family" compare="eq">
                  <string>AR PL UMing TW</string>
                  <string>AR PL UMing CN</string>
                  <string>AR PL UKai TW</string>
                  <string>AR PL UKai CN</string>
           </test>
           <edit name="family" mode="prepend" binding="strong">
                  <string>DejaVu Sans</string>
           </edit>
    </match-->
    </fontconfig>
    

  5. 下載 SRPM 套件
    [dywang@dywnb ~]$ cd rpmbuild
    [dywang@dywnb rpmbuild]$ wget ftp://bo.mirror.garr.it/2/scientific/6x/\
    SRPMS/vendor/firefox-45.1.0-1.el6_7.src.rpm
    
  6. 安裝 SRPM 套件
    [dywang@dywnb rpmbuild]$ rpm -ivh firefox-45.1.0-1.el6_7.src.rpm 
    warning: firefox-45.1.0-1.el6_7.src.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
       1:firefox                ########################################### [100%]
    
  7. 查看安裝的所有檔案。
    [dywang@dywnb rpmbuild]$ cd SOURCES/
    [dywang@dywnb SOURCES]$  rpm -qpl ../firefox-45.1.0-1.el6_7.src.rpm 
    warning: ../firefox-45.1.0-1.el6_7.src.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
    Python-2.7.8.tgz
    aarch64-fix-skia.patch
    build-el5-build-id.patch
    build-el5-fontconfig.patch
    build-el5-gtk2-2.10.patch
    build-el5-nss.patch
    build-el5-rapl.patch
    build-el5-rt-tgsigqueueinfo.patch
    build-el5-sandbox.patch
    build-el5-stdint.patch
    build-el5-xlib-header.patch
    build-nss.patch
    devtoolset-2-binutils-2.23.52.0.1-10.el5.src.rpm
    find-external-requires
    firefox-45.1.0esr.source.tar.xz
    firefox-default.patch
    firefox-enable-addons.patch
    firefox-enable-plugins.patch
    firefox-install-dir.patch
    firefox-langpacks-45.1.0esr-20160421.tar.xz
    firefox-mozconfig
    firefox-ppc64le.patch
    firefox-redhat-default-bookmarks.html
    firefox-redhat-default-prefs.js
    firefox.1
    firefox.desktop
    firefox.sh.in.rhel5
    firefox.sh.in.rhel6
    firefox.sh.in.rhel7
    firefox.spec
    gcc48-4.8.2-16.el5.src.rpm
    mozilla-1005535.patch
    mozilla-1152515.patch
    mozilla-1170092-etc-conf.patch
    mozilla-1253216-disable-ion.patch
    mozilla-1266366-branch64.patch
    mozilla-api-key
    rhbz-966424.patch
    webrtc-arch-cpu.patch
    xulrunner-24.0-jemalloc-ppc.patch
    yasm-1.2.0-3.el5.src.rpm
    
  8. 查看程式主要的打包壓縮檔。
    [dywang@dywnb SOURCES]$ ls firefox-45.1.0esr.source.tar.xz 
    firefox-45.1.0esr.source.tar.xz
    
  9. 解壓縮原始碼 tarball,產生 firefox-45.1.0esr 目錄,存放原始碼。
    [dywang@dywnb SOURCES]$ tar xJvf firefox-45.1.0esr.source.tar.xz
    
  10. 查看 firefox-45.1.0esr 目錄內的檔案。
    [dywang@dywnb SOURCES]$ ls firefox-45.1.0esr
    accessible    devtools           LICENSE              README.txt
    aclocal.m4    docshell           mach                 release
    addon-sdk     dom                Makefile.in          security
    Android.mk    editor             media                services
    AUTHORS       embedding          memory               settings.gradle
    b2g           extensions         mfbt                 startupcache
    browser       gfx                mobile               storage
    build         GNUmakefile        modules              testing
    build.gradle  gradle             moz.build            test.mozbuild
    caps          gradle.properties  mozglue              toolkit
    chrome        gradlew            mozilla-config.h.in  tools
    client.mk     hal                netwerk              uriloader
    client.py     image              nsprpub              view
    CLOBBER       intl               other-licenses       webapprt
    config        ipc                parser               widget
    configure     js                 probes               xpcom
    configure.in  layout             python               xpfe
    db            LEGAL              rdf                  xulrunner
    
  11. 進入暫存目錄 tmp,解開原始 src.rpm,方便做修改的比對。
    [dywang@dywnb SOURCES]$ cd ../tmp/
    [dywang@dywnb tmp]$ rm ./* -rf
    [dywang@dywnb tmp]$ rpm2cpio ../firefox-45.1.0-1.el6_7.src.rpm | cpio -idvm
    Python-2.7.8.tgz
    aarch64-fix-skia.patch
    build-el5-build-id.patch
    build-el5-fontconfig.patch
    build-el5-gtk2-2.10.patch
    build-el5-nss.patch
    build-el5-rapl.patch
    build-el5-rt-tgsigqueueinfo.patch
    build-el5-sandbox.patch
    build-el5-stdint.patch
    build-el5-xlib-header.patch
    build-nss.patch
    devtoolset-2-binutils-2.23.52.0.1-10.el5.src.rpm
    find-external-requires
    firefox-45.1.0esr.source.tar.xz
    firefox-default.patch
    firefox-enable-addons.patch
    firefox-enable-plugins.patch
    firefox-install-dir.patch
    firefox-langpacks-45.1.0esr-20160421.tar.xz
    firefox-mozconfig
    firefox-ppc64le.patch
    firefox-redhat-default-bookmarks.html
    firefox-redhat-default-prefs.js
    firefox.1
    firefox.desktop
    firefox.sh.in.rhel5
    firefox.sh.in.rhel6
    firefox.sh.in.rhel7
    firefox.spec
    gcc48-4.8.2-16.el5.src.rpm
    mozilla-1005535.patch
    mozilla-1152515.patch
    mozilla-1170092-etc-conf.patch
    mozilla-1253216-disable-ion.patch
    mozilla-1266366-branch64.patch
    mozilla-api-key
    rhbz-966424.patch
    webrtc-arch-cpu.patch
    xulrunner-24.0-jemalloc-ppc.patch
    yasm-1.2.0-3.el5.src.rpm
    690576 blocks
    
  12. 暫存目錄下解開 firefox-45.1.0esr.source.tar.xz。
    [dywang@dywnb tmp]$ tar Jxvf firefox-45.1.0esr.source.tar.xz
    
  13. 修改 RPM spec 規格檔,版本加入 dyw。
    [dywang@dywnb SOURCES]$ vim ../SPECS/firefox.spec
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox.spec ../SPECS/firefox.spec
    --- ../tmp/firefox.spec	2016-04-22 02:43:16.000000000 +0800
    +++ ../SPECS/firefox.spec	2016-05-30 10:29:19.324178457 +0800
    @@ -90,7 +90,7 @@
     Summary:        Mozilla Firefox Web browser
     Name:           firefox
     Version:        45.1.0
    -Release:        1%{?dist}
    +Release:        1%{?dist}.dyw
     URL:            http://www.mozilla.org/projects/firefox/
     License:        MPLv1.1 or GPLv2+ or LGPLv2+
     Group:          Applications/Internet
    
  14. 修改其他編碼為 UTF-8。
    [dywang@dywnb SOURCES]$ vim firefox-45.1.0esr/browser/components/preferences/fonts.xul 
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-45.1.0esr/browser/components/preferences/fonts.xul firefox-45.1.0esr/browser/components/preferences/fonts.xul
    --- ../tmp/firefox-45.1.0esr/browser/components/preferences/fonts.xul	2016-04-21 05:32:52.000000000 +0800
    +++ firefox-45.1.0esr/browser/components/preferences/fonts.xul	2016-05-30 10:31:37.550181549 +0800
    @@ -270,7 +270,7 @@
                 <menuitem label="&languages.customize.Fallback.thai;"        value="windows-874"/>
                 <menuitem label="&languages.customize.Fallback.turkish;"     value="windows-1254"/>
                 <menuitem label="&languages.customize.Fallback.vietnamese;"  value="windows-1258"/>
    -            <menuitem label="&languages.customize.Fallback.other;"       value="windows-1252"/>
    +            <menuitem label="&languages.customize.Fallback.other;"       value="UTF-8"/>
               </menupopup>
             </menulist>
           </hbox>
    
  15. 增加瀏覽器語系 en-US。
    [dywang@dywnb SOURCES]$ vim firefox-45.1.0esr/browser/locales/all-locales 
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-45.1.0esr/browser/locales/all-locales firefox-45.1.0esr/browser/locales/all-locales
    --- ../tmp/firefox-45.1.0esr/browser/locales/all-locales	2016-04-21 05:32:53.000000000 +0800
    +++ firefox-45.1.0esr/browser/locales/all-locales	2016-05-30 10:34:01.635184773 +0800
    @@ -19,6 +19,7 @@
     de
     dsb
     el
    +en-US
     en-GB
     en-ZA
     eo
    
  16. 當找不到編碼時預設使用 UTF-8。
    [dywang@dywnb SOURCES]$ vim firefox-45.1.0esr/dom/encoding/FallbackEncoding.cpp 
    [dywang@dywnb SOURCES]$ sed -i 's/windows-1252/UTF-8/g' firefox-45.1.0esr/dom/encoding/FallbackEncoding.cpp
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-45.1.0esr/dom/encoding/FallbackEncoding.cpp firefox-45.1.0esr/dom/encoding/FallbackEncoding.cpp
    --- ../tmp/firefox-45.1.0esr/dom/encoding/FallbackEncoding.cpp	2016-04-21 05:33:00.000000000 +0800
    +++ firefox-45.1.0esr/dom/encoding/FallbackEncoding.cpp	2016-05-30 10:37:15.329189105 +0800
    @@ -97,7 +97,7 @@
     
       if (NS_FAILED(nsUConvPropertySearch::SearchPropertyValue(
           localesFallbacks, ArrayLength(localesFallbacks), locale, mFallback))) {
    -    mFallback.AssignLiteral("windows-1252");
    +    mFallback.AssignLiteral("UTF-8");
       }
     
       aFallback = mFallback;
    @@ -162,7 +162,7 @@
     {
       if (NS_FAILED(nsUConvPropertySearch::SearchPropertyValue(
           domainsFallbacks, ArrayLength(domainsFallbacks), aTLD, aFallback))) {
    -    aFallback.AssignLiteral("windows-1252");
    +    aFallback.AssignLiteral("UTF-8");
       }
     }
    
  17. unix 系統預設使用 UTF-8 編碼。
    [dywang@dywnb SOURCES]$ vim firefox-45.1.0esr/intl/locale/unix/nsDateTimeFormatUnix.cpp 
    [dywang@dywnb SOURCES]$ sed -i 's/windows-1252/UTF-8/g' \
    firefox-45.1.0esr/intl/locale/unix/nsDateTimeFormatUnix.cpp
    
  18. 預設等寬字 monospace,實際使用時不會等寬,故修改成 DejaVu Sans Mono,並修改預設字型大小等寬字為 14。
    [dywang@dywnb SOURCES]$ vim firefox-45.1.0esr/modules//libpref/init/all.js 
    [dywang@dywnb SOURCES]$ sed -i 's/windows-1252/UTF-8/g' \
    firefox-45.1.0esr/modules//libpref/init/all.js 
    [dywang@dywnb SOURCES]$ sed -i 's/\(font.size.fixed.*\)1[0-9]/\114/g' \
    firefox-45.1.0esr/modules//libpref/init/all.js
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-45.1.0esr/modules//\
    libpref/init/all.js \
    firefox-45.1.0esr/modules//libpref/init/all.js
    --- ../tmp/firefox-45.1.0esr/modules//libpref/init/all.js	2016-04-21 05:33:05.000000000 +0800
    +++ firefox-45.1.0esr/modules//libpref/init/all.js	2016-05-30 10:41:22.165194627 +0800
    @@ -1889,7 +1889,7 @@
     // fallback charset list for Unicode conversion (converting from Unicode)
     // currently used for mail send only to handle symbol characters (e.g Euro, trademark, smartquotes)
     // for ISO-8859-1
    -pref("intl.fallbackCharsetList.ISO-8859-1", "windows-1252");
    +pref("intl.fallbackCharsetList.ISO-8859-1", "UTF-8");
     pref("font.language.group",                 "chrome://global/locale/intl.properties");
     
     // Android-specific pref to use key-events-only mode for IME-unaware webapps.
    @@ -2633,149 +2633,149 @@
     pref("font.default.ar", "sans-serif");
     pref("font.minimum-size.ar", 0);
     pref("font.size.variable.ar", 16);
    -pref("font.size.fixed.ar", 13);
    +pref("font.size.fixed.ar", 14);
     
     pref("font.default.el", "serif");
     pref("font.minimum-size.el", 0);
     pref("font.size.variable.el", 16);
    -pref("font.size.fixed.el", 13);
    +pref("font.size.fixed.el", 14);
     
     pref("font.default.he", "sans-serif");
     pref("font.minimum-size.he", 0);
     pref("font.size.variable.he", 16);
    -pref("font.size.fixed.he", 13);
    +pref("font.size.fixed.he", 14);
     
     pref("font.default.ja", "sans-serif");
     pref("font.minimum-size.ja", 0);
     pref("font.size.variable.ja", 16);
    -pref("font.size.fixed.ja", 16);
    +pref("font.size.fixed.ja", 14);
     
     pref("font.default.ko", "sans-serif");
     pref("font.minimum-size.ko", 0);
     pref("font.size.variable.ko", 16);
    -pref("font.size.fixed.ko", 16);
    +pref("font.size.fixed.ko", 14);
     
     pref("font.default.th", "sans-serif");
     pref("font.minimum-size.th", 0);
     pref("font.size.variable.th", 16);
    -pref("font.size.fixed.th", 13);
    +pref("font.size.fixed.th", 14);
     
     pref("font.default.x-cyrillic", "serif");
     pref("font.minimum-size.x-cyrillic", 0);
     pref("font.size.variable.x-cyrillic", 16);
    -pref("font.size.fixed.x-cyrillic", 13);
    +pref("font.size.fixed.x-cyrillic", 14);
     
     pref("font.default.x-devanagari", "serif");
     pref("font.minimum-size.x-devanagari", 0);
     pref("font.size.variable.x-devanagari", 16);
    -pref("font.size.fixed.x-devanagari", 13);
    +pref("font.size.fixed.x-devanagari", 14);
     
     pref("font.default.x-tamil", "serif");
     pref("font.minimum-size.x-tamil", 0);
     pref("font.size.variable.x-tamil", 16);
    -pref("font.size.fixed.x-tamil", 13);
    +pref("font.size.fixed.x-tamil", 14);
     
     pref("font.default.x-armn", "serif");
     pref("font.minimum-size.x-armn", 0);
     pref("font.size.variable.x-armn", 16);
    -pref("font.size.fixed.x-armn", 13);
    +pref("font.size.fixed.x-armn", 14);
     
     pref("font.default.x-beng", "serif");
     pref("font.minimum-size.x-beng", 0);
     pref("font.size.variable.x-beng", 16);
    -pref("font.size.fixed.x-beng", 13);
    +pref("font.size.fixed.x-beng", 14);
     
     pref("font.default.x-cans", "serif");
     pref("font.minimum-size.x-cans", 0);
     pref("font.size.variable.x-cans", 16);
    -pref("font.size.fixed.x-cans", 13);
    +pref("font.size.fixed.x-cans", 14);
     
     pref("font.default.x-ethi", "serif");
     pref("font.minimum-size.x-ethi", 0);
     pref("font.size.variable.x-ethi", 16);
    -pref("font.size.fixed.x-ethi", 13);
    +pref("font.size.fixed.x-ethi", 14);
     
     pref("font.default.x-geor", "serif");
     pref("font.minimum-size.x-geor", 0);
     pref("font.size.variable.x-geor", 16);
    -pref("font.size.fixed.x-geor", 13);
    +pref("font.size.fixed.x-geor", 14);
     
     pref("font.default.x-gujr", "serif");
     pref("font.minimum-size.x-gujr", 0);
     pref("font.size.variable.x-gujr", 16);
    -pref("font.size.fixed.x-gujr", 13);
    +pref("font.size.fixed.x-gujr", 14);
     
     pref("font.default.x-guru", "serif");
     pref("font.minimum-size.x-guru", 0);
     pref("font.size.variable.x-guru", 16);
    -pref("font.size.fixed.x-guru", 13);
    +pref("font.size.fixed.x-guru", 14);
     
     pref("font.default.x-khmr", "serif");
     pref("font.minimum-size.x-khmr", 0);
     pref("font.size.variable.x-khmr", 16);
    -pref("font.size.fixed.x-khmr", 13);
    +pref("font.size.fixed.x-khmr", 14);
     
     pref("font.default.x-mlym", "serif");
     pref("font.minimum-size.x-mlym", 0);
     pref("font.size.variable.x-mlym", 16);
    -pref("font.size.fixed.x-mlym", 13);
    +pref("font.size.fixed.x-mlym", 14);
     
     pref("font.default.x-orya", "serif");
     pref("font.minimum-size.x-orya", 0);
     pref("font.size.variable.x-orya", 16);
    -pref("font.size.fixed.x-orya", 13);
    +pref("font.size.fixed.x-orya", 14);
     
     pref("font.default.x-telu", "serif");
     pref("font.minimum-size.x-telu", 0);
     pref("font.size.variable.x-telu", 16);
    -pref("font.size.fixed.x-telu", 13);
    +pref("font.size.fixed.x-telu", 14);
     
     pref("font.default.x-knda", "serif");
     pref("font.minimum-size.x-knda", 0);
     pref("font.size.variable.x-knda", 16);
    -pref("font.size.fixed.x-knda", 13);
    +pref("font.size.fixed.x-knda", 14);
     
     pref("font.default.x-sinh", "serif");
     pref("font.minimum-size.x-sinh", 0);
     pref("font.size.variable.x-sinh", 16);
    -pref("font.size.fixed.x-sinh", 13);
    +pref("font.size.fixed.x-sinh", 14);
     
     pref("font.default.x-tibt", "serif");
     pref("font.minimum-size.x-tibt", 0);
     pref("font.size.variable.x-tibt", 16);
    -pref("font.size.fixed.x-tibt", 13);
    +pref("font.size.fixed.x-tibt", 14);
     
     pref("font.default.x-unicode", "serif");
     pref("font.minimum-size.x-unicode", 0);
     pref("font.size.variable.x-unicode", 16);
    -pref("font.size.fixed.x-unicode", 13);
    +pref("font.size.fixed.x-unicode", 14);
     
     pref("font.default.x-western", "serif");
     pref("font.minimum-size.x-western", 0);
     pref("font.size.variable.x-western", 16);
    -pref("font.size.fixed.x-western", 13);
    +pref("font.size.fixed.x-western", 14);
     
     pref("font.default.zh-CN", "sans-serif");
     pref("font.minimum-size.zh-CN", 0);
     pref("font.size.variable.zh-CN", 16);
    -pref("font.size.fixed.zh-CN", 16);
    +pref("font.size.fixed.zh-CN", 14);
     
     pref("font.default.zh-HK", "sans-serif");
     pref("font.minimum-size.zh-HK", 0);
     pref("font.size.variable.zh-HK", 16);
    -pref("font.size.fixed.zh-HK", 16);
    +pref("font.size.fixed.zh-HK", 14);
     
     pref("font.default.zh-TW", "sans-serif");
     pref("font.minimum-size.zh-TW", 0);
     pref("font.size.variable.zh-TW", 16);
    -pref("font.size.fixed.zh-TW", 16);
    +pref("font.size.fixed.zh-TW", 14);
     
     // mathml.css sets font-size to "inherit" and font-family to "serif" so only
     // font.name.*.x-math and font.minimum-size.x-math are really relevant.
     pref("font.default.x-math", "serif");
     pref("font.minimum-size.x-math", 0);
     pref("font.size.variable.x-math", 16);
    -pref("font.size.fixed.x-math", 13);
    +pref("font.size.fixed.x-math", 14);
     
     /*
      * A value greater than zero enables font size inflation for
    @@ -3751,17 +3751,17 @@
     pref("font.name.serif.ar", "serif");
     pref("font.name.sans-serif.ar", "sans-serif");
     pref("font.name.monospace.ar", "monospace");
    -pref("font.size.fixed.ar", 12);
    +pref("font.size.fixed.ar", 14);
     
     pref("font.name.serif.el", "serif");
     pref("font.name.sans-serif.el", "sans-serif");
     pref("font.name.monospace.el", "monospace");
    -pref("font.size.fixed.el", 12);
    +pref("font.size.fixed.el", 14);
     
     pref("font.name.serif.he", "serif");
     pref("font.name.sans-serif.he", "sans-serif");
     pref("font.name.monospace.he", "monospace");
    -pref("font.size.fixed.he", 12);
    +pref("font.size.fixed.he", 14);
     
     pref("font.name.serif.ja", "serif");
     pref("font.name.sans-serif.ja", "sans-serif");
    @@ -3791,7 +3791,7 @@
     pref("font.name.serif.x-cyrillic", "serif");
     pref("font.name.sans-serif.x-cyrillic", "sans-serif");
     pref("font.name.monospace.x-cyrillic", "monospace");
    -pref("font.size.fixed.x-cyrillic", 12);
    +pref("font.size.fixed.x-cyrillic", 14);
     
     pref("font.name.serif.x-devanagari", "serif");
     pref("font.name.sans-serif.x-devanagari", "sans-serif");
    @@ -3848,12 +3848,12 @@
     pref("font.name.serif.x-unicode", "serif");
     pref("font.name.sans-serif.x-unicode", "sans-serif");
     pref("font.name.monospace.x-unicode", "monospace");
    -pref("font.size.fixed.x-unicode", 12);
    +pref("font.size.fixed.x-unicode", 14);
     
     pref("font.name.serif.x-western", "serif");
     pref("font.name.sans-serif.x-western", "sans-serif");
     pref("font.name.monospace.x-western", "monospace");
    -pref("font.size.fixed.x-western", 12);
    +pref("font.size.fixed.x-western", 14);
     
     pref("font.name.serif.zh-CN", "serif");
     pref("font.name.sans-serif.zh-CN", "sans-serif");
    @@ -3907,21 +3907,21 @@
     
     #if defined(ANDROID) || defined(MOZ_B2G)
     
    -pref("font.size.fixed.ar", 12);
    +pref("font.size.fixed.ar", 14);
     
     pref("font.default.el", "sans-serif");
    -pref("font.size.fixed.el", 12);
    +pref("font.size.fixed.el", 14);
     
    -pref("font.size.fixed.he", 12);
    +pref("font.size.fixed.he", 14);
     
     pref("font.default.x-cyrillic", "sans-serif");
    -pref("font.size.fixed.x-cyrillic", 12);
    +pref("font.size.fixed.x-cyrillic", 14);
     
     pref("font.default.x-unicode", "sans-serif");
    -pref("font.size.fixed.x-unicode", 12);
    +pref("font.size.fixed.x-unicode", 14);
     
     pref("font.default.x-western", "sans-serif");
    -pref("font.size.fixed.x-western", 12);
    +pref("font.size.fixed.x-western", 14);
     
     # ANDROID || MOZ_B2G
     #endif
    
  19. toolkit 語系增加 en-US。
    [dywang@dywnb SOURCES]$ vim firefox-45.1.0esr/toolkit/locales/all-locales 
    [dywang@dywnb SOURCES]$ echo en-US >> firefox-45.1.0esr/toolkit/\
    locales/all-locales
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-45.1.0esr/toolkit/\
    locales/all-locales \
    firefox-45.1.0esr/toolkit/locales/all-locales
    --- ../tmp/firefox-45.1.0esr/toolkit/locales/all-locales	2016-04-21 05:33:08.000000000 +0800
    +++ firefox-45.1.0esr/toolkit/locales/all-locales	2016-05-30 10:45:30.235200177 +0800
    @@ -12,3 +12,4 @@
     ro
     sv-SE
     ru
    +en-US
    
  20. 增加 zh-TW 可用語系。
    [dywang@dywnb SOURCES]$ vim firefox-45.1.0esr/toolkit/locales/en-US/\
    chrome/global/intl.properties 
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-45.1.0esr/toolkit/\
    locales/en-US/chrome/global/intl.properties \
    firefox-45.1.0esr/toolkit/locales/en-US/chrome/global/intl.properties
    --- ../tmp/firefox-45.1.0esr/toolkit/locales/en-US/chrome/global/intl.properties2016-04-21 05:33:08.000000000 +0800
    +++ firefox-45.1.0esr/toolkit/locales/en-US/chrome/global/intl.properties	2016-05-30 10:47:40.303203086 +0800
    @@ -30,7 +30,7 @@
     # British English in their list, since those languages are commonly spoken in
     # the same area as Breton:
     # intl.accept_languages=br, fr-FR, fr, en-GB, en
    -intl.accept_languages=en-US, en
    +intl.accept_languages=en-US, en, zh-TW
     
     # LOCALIZATION NOTE (font.language.group):
     # This preference controls the initial setting of the language drop-down menu
    
  21. 系統預設使用 UTF-8 編碼。
    [dywang@dywnb SOURCES]$ vim firefox-45.1.0esr/toolkit/locales/en-US/\
    chrome/global-platform/unix/intl.properties 
    [dywang@dywnb SOURCES]$ echo 'intl.charset.default=UTF-8' >> \
    firefox-45.1.0esr/toolkit/locales/en-US/chrome/global-platform/unix/intl.properties
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-45.1.0esr/toolkit/locales/\
    en-US/chrome/global-platform/unix/intl.properties \
    firefox-45.1.0esr/toolkit/locales/en-US/chrome/global-platform/unix/intl.properties
    --- ../tmp/firefox-45.1.0esr/toolkit/locales/en-US/chrome/global-platform/unix/intl.properties	2016-04-21 05:33:08.000000000 +0800
    +++ firefox-45.1.0esr/toolkit/locales/en-US/chrome/global-platform/unix/intl.properties	2016-05-30 10:51:45.661208575 +0800
    @@ -5,3 +5,4 @@
     # LOCALIZATION NOTE (intl.ellipsis): Use the unicode ellipsis char, \u2026,
     # or use "..." if \u2026 doesn't suit traditions in your locale.
     intl.ellipsis=…
    +intl.charset.default=UTF-8
    
  22. 修改預設首頁到個人網頁。
    [dywang@dywnb SOURCES]$ vim firefox-redhat-default-prefs.js 
    [dywang@dywnb SOURCES]$ sed -i 's|\(startup.homepage.*\",\ *\"\).*\"|\1http://dy.csie.cyut.edu.tw\"|g' \
    firefox-redhat-default-prefs.js | grep homepage
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-redhat-default-prefs.js \
    firefox-redhat-default-prefs.js 
    --- ../tmp/firefox-redhat-default-prefs.js	2016-04-22 02:42:53.000000000 +0800
    +++ firefox-redhat-default-prefs.js	2016-05-30 10:54:59.577212913 +0800
    @@ -14,10 +14,10 @@
     pref("dom.ipc.plugins.enabled.nswrapper*",  false);
     pref("network.manage-offline-status",       true);
     pref("toolkit.networkmanager.disable",      false);
    -pref("browser.startup.homepage",            "data:text/plain,browser.startup.homepage=file:///usr/share/doc/HTML/index.html");
    +pref("browser.startup.homepage",            "http://dy.csie.cyut.edu.tw");
     pref("toolkit.storage.synchronous",         0);
    -pref("startup.homepage_override_url",       "http://www.redhat.com");
    -pref("startup.homepage_welcome_url",        "http://www.redhat.com");
    +pref("startup.homepage_override_url",       "http://dy.csie.cyut.edu.tw");
    +pref("startup.homepage_welcome_url",        "http://dy.csie.cyut.edu.tw");
     pref("extensions.shownSelectionUI",         true);
     /* Workaround for rhbz#1110291 */
     pref("network.negotiate-auth.allow-insecure-ntlm-v1", true);
    
  23. 修改 firefox hello 底色。
    grep '#00a9dc' -R firefox-45.1.0esr/browser/extensions/loop/ -l | sort -u | xargs sed -i 's/#00a9dc/#7C9C90/g'
    
  24. firefox hello 綱頁分享提示 bar 高度由 40px 降低為 20px。
    [dywang@dywnb SOURCES]$ diff -uN ../tmp/firefox-45.1.0esr/browser/extensions/loop/chrome/skin/shared/loop.css \
    firefox-45.1.0esr/browser/extensions/loop/chrome/skin/shared/loop.css
    --- ../tmp/firefox-45.1.0esr/browser/extensions/loop/chrome/skin/shared/loop.css	2016-04-21 05:32:52.000000000 +0800
    +++ firefox-45.1.0esr/browser/extensions/loop/chrome/skin/shared/loop.css	2016-07-04 11:31:26.358234729 +0800
    @@ -171,8 +171,8 @@
     
       notification[value="loop-sharing-notification"] {
         -moz-appearance: none;
    -    height: 40px;
    -    background-color: #00a9dc;
    +    height: 20px;
    +    background-color: #7C9C90;
         box-shadow: 0 -1px 1px rgba(0,0,0,.4) inset;
       }
     
    @@ -186,7 +186,7 @@
       }
     
       notification[value="loop-sharing-notification"].paused .notification-inner {
    -    color: #00a9dc;
    +    color: #7C9C90;
       }
     
       notification[value="loop-sharing-notification"] .notification-inner description {
    @@ -199,7 +199,7 @@
         background-color: #fff;
         border: 0;
         padding: .2rem 1rem .4rem;
    -    height: 40px;
    +    height: 20px;
         margin: 0;
         list-style-image: url(chrome://loop/content/shared/img/pause-12x12.svg);
         box-shadow: 0 -1px 1px rgba(0,0,0,.5) inset;
    @@ -252,8 +252,8 @@
       }
     
       chatbox[src^="about:loopconversation#"] > .chat-titlebar {
    -    background-color: #00a9dc;
    -    border-color: #00a9dc;
    +    background-color: #7C9C90;
    +    border-color: #7C9C90;
       }
     
       chatbox[src^="about:loopconversation#"] .chat-title {
    @@ -274,7 +274,7 @@
         border: 1px solid #d13f1a;
         border-top-right-radius: 4px;
         width: 32px;
    -    height: 26px;
    +    height: 20px;
         margin-top: -6px;
         margin-bottom: -5px;
         -moz-margin-start: 6px;
    
  25. 重新打包壓縮 firefox-45.1.0esr 目錄。
    [dywang@dywnb SOURCES]$ tar Jcvf firefox-45.1.0esr.source.tar.xz firefox-45.1.0esr
    
  26. 再同時建立 RPM 及 SRPM 二進位檔字,firefox RPM 建立要 1 小時以上,要耐心等候。成功建立的訊息最後幾行,看到產生 firefox firefox-debuginfo 二個 RPM 檔及一個 firefox SRPM 檔。
    [dywang@dywnb SOURCES]$ rpmbuild -ba --clean --target=$(uname -m) ../SPECS/firefox.spec
    .....................
    Conflicts: firefox < 38.0
    Obsoletes: mozilla <= 37:1.7.13 firefox < 38.0
    Processing files: firefox-debuginfo-45.1.0-1.el6.dyw.x86_64
    Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/dywang/rpmbuild/BUILDROOT/firefox-45.1.0-1.el6.dyw.x86_64
    Wrote: /home/dywang/rpmbuild/SRPMS/firefox-45.1.0-1.el6.dyw.src.rpm
    Wrote: /home/dywang/rpmbuild/RPMS/x86_64/firefox-45.1.0-1.el6.dyw.x86_64.rpm
    Wrote: /home/dywang/rpmbuild/RPMS/x86_64/firefox-debuginfo-45.1.0-1.el6.dyw.x86_64.rpm
    Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.2TpIMH
    + umask 022
    + cd /home/dywang/rpmbuild/BUILD
    + cd firefox-45.1.0
    + /bin/rm -rf /home/dywang/rpmbuild/BUILDROOT/firefox-45.1.0-1.el6.dyw.x86_64
    + exit 0
    Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.GaruLg
    + umask 022
    + cd /home/dywang/rpmbuild/BUILD
    + rm -rf firefox-45.1.0
    + exit 0