Index: general.ent
===================================================================
--- general.ent	(revision 7887b22fbf98464fae7dc4dca473f54f4985892c)
+++ general.ent	(revision 8d0bc7613b8102395c45d1735cac674cfdafe077)
@@ -1,5 +1,5 @@
 <!-- $LastChangedBy$ $Date$ -->
 
-<!ENTITY day          "12">                   <!-- Always 2 digits -->
+<!ENTITY day          "13">                   <!-- Always 2 digits -->
 <!ENTITY month        "03">                   <!-- Always 2 digits -->
 <!ENTITY year         "2018">
@@ -7,5 +7,5 @@
 <!ENTITY copyholder   "The BLFS Development Team">
 <!ENTITY version      "&year;-&month;-&day;">
-<!ENTITY releasedate  "March 12th, &year;">
+<!ENTITY releasedate  "March 13th, &year;">
 <!ENTITY pubdate      "&year;-&month;-&day;"> <!-- metadata req. by TLDP -->
 <!ENTITY blfs-version "svn">                  <!-- svn|[release #] -->
@@ -48,4 +48,5 @@
 <!ENTITY kernel-dl            "https://www.kernel.org/pub">
 <!ENTITY mozilla-http         "https://archive.mozilla.org/pub">
+<!ENTITY mozilla-hg           "https://hg.mozilla.org/releases/mozilla-release/archive/">
 <!ENTITY pymodules-dl         "https://files.pythonhosted.org/packages/source">
 <!ENTITY sourceforge-dl       "https://downloads.sourceforge.net">
Index: introduction/welcome/changelog.xml
===================================================================
--- introduction/welcome/changelog.xml	(revision 7887b22fbf98464fae7dc4dca473f54f4985892c)
+++ introduction/welcome/changelog.xml	(revision 8d0bc7613b8102395c45d1735cac674cfdafe077)
@@ -43,4 +43,17 @@
 -->
     <listitem>
+      <para>March 13th, 2018</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken] - Update to firefox-59.0 (security fix). Fixes
+          <ulink url="&blfs-ticket-root;10507">#10507</ulink>. Please
+          note that the libraries are now installed in an unversioned
+          <filename class="directory">/usr/lib/firefox/</filename>
+          directory.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>March 12th, 2018</para>
       <itemizedlist>
Index: packages.ent
===================================================================
--- packages.ent	(revision 7887b22fbf98464fae7dc4dca473f54f4985892c)
+++ packages.ent	(revision 8d0bc7613b8102395c45d1735cac674cfdafe077)
@@ -731,5 +731,5 @@
 <!ENTITY chromium-version             "64.0.3282.186">
 <!ENTITY epiphany-version             "3.26.6">
-<!ENTITY firefox-version              "58.0.2">
+<!ENTITY firefox-version              "59.0">
 <!ENTITY flashplayer-version          "27.0.0.187">
 <!ENTITY qupzilla-version             "2.2.5">
Index: xsoft/graphweb/firefox.xml
===================================================================
--- xsoft/graphweb/firefox.xml	(revision 7887b22fbf98464fae7dc4dca473f54f4985892c)
+++ xsoft/graphweb/firefox.xml	(revision 8d0bc7613b8102395c45d1735cac674cfdafe077)
@@ -5,12 +5,18 @@
   %general-entities;
 
+<!--
   <!ENTITY firefox-download-http "&mozilla-http;/firefox/releases/&firefox-version;/source/firefox-&firefox-version;.source.tar.xz">
+-->
+   <!ENTITY firefox-hgversion "c61f5f5ead48c78a80c80db5c489bdc7cfaf8175">
+  <!-- use tinyurl to get a much shorter link for the wget example -->
+  <!ENTITY firefox-tiny "https://tinyurl.com/firefox-59-0-tar-bz2">
+  <!ENTITY firefox-download-http "&mozilla-hg;&firefox-hgversion;.tar.bz2">
   <!ENTITY firefox-download-ftp  " ">
-  <!ENTITY firefox-md5sum        "a64c6cd4785ba1ae094faae16105dbf2">
-  <!ENTITY firefox-size          "237 MB">
+  <!ENTITY firefox-md5sum        "2dfc59e6adccea41b5fb87c2d9456d4e">
+  <!ENTITY firefox-size          "291 MB">
   <!-- NB with stylo, much of the build uses rust, and therefore cargo files.
     But when building 58.0 on rustc-1.22.1 the extra files, if any, seem to be minimal -->
-  <!ENTITY firefox-buildsize     "7.4 GB (152 MB installed) without tests">
-  <!ENTITY firefox-time          "20 SBU (with parallelism=4) without tests">
+  <!ENTITY firefox-buildsize     "7.5 GB (157 MB installed) without tests">
+  <!ENTITY firefox-time          "21 SBU (with parallelism=4) without tests">
 ]>
 
@@ -75,15 +81,15 @@
     <note>
       <para>
-        The build times for this version of firefox (using stylo, the new CSS
-        rendering code) seem to vary widely between different machines. On one
-        old Intel i3 the build took considerably longer. The reason for this is
-        not understood. A build with stylo disabled is typically 1 or 2 SBU
-        quicker and needs 0.8GB less disk space.
-      </para>
-
-      <para>
-        Although upstream prefer to use <application>PulseAudio</application>,
-        for the moment <application>Alsa</application> can still be used. Both
-        may need runtime configuration to get sound working.
+        Upstream now only provide tarballs named with 40-character mercurial
+        commit hashes.
+        <!--
+        This will untar to <emphasis>mozilla-release-&firefox-hgversion;/</emphasis>,
+        but it will build firefox-&firefox-version; - you may prefer to rename the
+        -->
+        You may prefer to rename the
+        downloaded tarball, either to firefox-&firefox-version;.tar.bz2 or to
+        mozilla-release-&firefox-hgversion;.tar.bz2, or to use wget, e.g.
+<screen><userinput>wget -c &firefox-tiny; \
+     -O mozilla-release-&firefox-hgversion;.tar.bz2</userinput></screen>
       </para>
     </note>
@@ -102,7 +108,6 @@
     <note>
       <para>
-        The tarball <emphasis>firefox-&firefox-version;.source.tar.xz</emphasis>
-        will untar to <emphasis>firefox-&firefox-version;</emphasis> directory.
-        It will also reset the permissions of the current directory to 0755 if you
+        Extracting the tarball
+        will reset the permissions of the current directory to 0755 if you
         have permission to do that. If you do this in a directory where
         the sticky bit is set, such
@@ -121,4 +126,19 @@
         Do not untar as the <systemitem class="username">root</systemitem> user
         in a directory where the sticky bit is set - that will unset it.
+      </para>
+
+      <para>
+        The build times for this version of firefox (using stylo, the new CSS
+        rendering code) seem to vary widely between different machines. On one
+        old Intel i3 with only 4GB of RAM the build took
+        <emphasis>considerably</emphasis> longer. The reason for this is
+        not understood. A build with stylo disabled is typically 1 or 2 SBU
+        quicker and needs 0.8GB less disk space.
+      </para>
+
+      <para>
+        Although upstream prefer to use <application>PulseAudio</application>,
+        for the moment <application>Alsa</application> can still be used. Both
+        may need runtime configuration to get sound working.
       </para>
     </note>
@@ -160,21 +180,5 @@
       </para>
     </note>
-<!--
-    <note>
-      <para>
-        With <application>Firefox-31.0</application> and later versions, you
-        must have installed <application>Openssl</application> before
-        <application>Python 2</application> or the build system will quickly
-        fail with output including "ImportError: cannot import name
-        HTTPSHandler". If you are in any doubt about this (e.g. upgrading from
-        an older version of Firefox), check if
-        <filename>/usr/lib/python&python2-majorver;/lib-dynload/_ssl.so</filename>
-        exists.  If it does not, reinstall <xref linkend="python2"/> (after
-        installing <xref linkend="openssl"/>).  The latest version of any
-        <emphasis>currently maintained</emphasis> version of Openssl should be
-        satisfactory if already installed.
-      </para>
-    </note>
--->
+
     <bridgehead renderas="sect4">Optional</bridgehead>
     <para role="optional">
@@ -222,5 +226,5 @@
 # You can change the number of non-rust jobs by setting a valid number
 # of cores in this option, but when rust crates are being compiled
-# jobs will be scheduled for all the online CPU cores.
+# jobs will be scheduled for all the available CPU cores.
 #mk_add_options MOZ_MAKE_FLAGS="-j1"
 
@@ -292,8 +296,6 @@
 ac_add_options --enable-official-branding
 
-# From firefox-40, using system cairo caused firefox to crash
-# frequently when it was doing background rendering in a tab.
-# This appears to again work in firefox-56
-ac_add_options --enable-system-cairo
+# In firefox-59.0 system cairo breaks the build, so comment it.
+#ac_add_options --enable-system-cairo
 ac_add_options --enable-system-ffi
 ac_add_options --enable-system-pixman
@@ -377,5 +379,5 @@
 
 mkdir -pv  /usr/lib/mozilla/plugins                             &amp;&amp;
-ln    -sfv ../../mozilla/plugins /usr/lib/firefox-&firefox-version;/browser</userinput></screen>
+ln    -sfv ../../mozilla/plugins /usr/lib/firefox/browser/</userinput></screen>
 <!--
     <para>
@@ -406,11 +408,11 @@
 
     <para>
-      <command>mkdir -p /usr/lib/mozilla/plugins</command>: This checks
-      that <filename class="directory">/usr/lib/mozilla/plugins</filename>
+      <command>mkdir -pv /usr/lib/mozilla/plugins</command>: This ensures
+      that <filename class="directory">/usr/lib/mozilla/plugins/</filename>
       exists.
     </para>
 
     <para>
-      <command>ln -sv ... /usr/lib/firefox-&firefox-version;/browser</command>:
+      <command>ln -sv ... /usr/lib/firefox/browser</command>:
       This command creates a symbolic link to <filename
       class="directory">/usr/lib/mozilla/plugins</filename>. It's not really
@@ -533,5 +535,5 @@
         <seg>
           Numerous libraries, browser components, plugins, extensions, and
-          helper modules installed in /usr/lib/firefox-&firefox-version;
+          helper modules installed in /usr/lib/firefox
         </seg>
         <seg>
