diff --git a/MozillaFirefox.changes b/MozillaFirefox.changes
index 9163548..71e5499 100644
--- a/MozillaFirefox.changes
+++ b/MozillaFirefox.changes
@@ -1,3 +1,59 @@
+-------------------------------------------------------------------
+Fri Aug 7 07:49:49 UTC 2015 - wr@rosenauer.org
+
+- update to Firefox 40.0 (bnc#940806)
+ * Added protection against unwanted software downloads
+ * Suggested Tiles show sites of interest, based on categories
+ from your recent browsing history
+ * Hello allows adding a link to conversations to provide context
+ on what the conversation will be about
+ * New style for add-on manager based on the in-content
+ preferences style
+ * Improved scrolling, graphics, and video playback performance
+ with off main thread compositing (GNU/Linux only)
+ * Graphic blocklist mechanism improved: Firefox version ranges
+ can be specified, limiting the number of devices blocked
+ security fixes:
+ * MFSA 2015-79/CVE-2015-4473/CVE-2015-4474
+ Miscellaneous memory safety hazards
+ * MFSA 2015-80/CVE-2015-4475 (bmo#1175396)
+ Out-of-bounds read with malformed MP3 file
+ * MFSA 2015-81/CVE-2015-4477 (bmo#1179484)
+ Use-after-free in MediaStream playback
+ * MFSA 2015-82/CVE-2015-4478 (bmo#1105914)
+ Redefinition of non-configurable JavaScript object properties
+ * MFSA 2015-83/CVE-2015-4479/CVE-2015-4480/CVE-2015-4493
+ Overflow issues in libstagefright
+ * MFSA 2015-84/CVE-2015-4481 (bmo1171518)
+ Arbitrary file overwriting through Mozilla Maintenance Service
+ with hard links (only affected Windows)
+ * MFSA 2015-85/CVE-2015-4482 (bmo#1184500)
+ Out-of-bounds write with Updater and malicious MAR file
+ (does not affect openSUSE RPM packages which do not ship the
+ updater)
+ * MFSA 2015-86/CVE-2015-4483 (bmo#1148732)
+ Feed protocol with POST bypasses mixed content protections
+ * MFSA 2015-87/CVE-2015-4484 (bmo#1171540)
+ Crash when using shared memory in JavaScript
+ * MFSA 2015-88/CVE-2015-4491 (bmo#1184009)
+ Heap overflow in gdk-pixbuf when scaling bitmap images
+ * MFSA 2015-89/CVE-2015-4485/CVE-2015-4486 (bmo#1177948, bmo#1178148)
+ Buffer overflows on Libvpx when decoding WebM video
+ * MFSA 2015-90/CVE-2015-4487/CVE-2015-4488/CVE-2015-4489
+ Vulnerabilities found through code inspection
+ * MFSA 2015-91/CVE-2015-4490 (bmo#1086999)
+ Mozilla Content Security Policy allows for asterisk wildcards
+ in violation of CSP specification
+ * MFSA 2015-92/CVE-2015-4492 (bmo#1185820)
+ Use-after-free in XMLHttpRequest with shared workers
+- added mozilla-no-stdcxx-check.patch
+- removed obsolete patches
+ * mozilla-add-glibcxx_use_cxx11_abi.patch
+ * firefox-multilocale-chrome.patch
+- rebased patches
+- requires version 40 of the branding package
+- removed browser/searchplugins/ location as it's not valid anymore
+
-------------------------------------------------------------------
Fri Aug 7 07:09:39 UTC 2015 - wr@rosenauer.org
diff --git a/MozillaFirefox.spec b/MozillaFirefox.spec
index ec2bff2..07de05b 100644
--- a/MozillaFirefox.spec
+++ b/MozillaFirefox.spec
@@ -18,10 +18,10 @@
# changed with every update
-%define major 39
-%define mainver %major.0.3
+%define major 40
+%define mainver %major.0
%define update_channel release
-%define releasedate 2015080600
+%define releasedate 2015080700
# general build definitions
%if "%{update_channel}" != "aurora"
@@ -146,18 +146,17 @@ Patch11: mozilla-arm-disable-edsp.patch
Patch12: mozilla-openaes-decl.patch
Patch14: mozilla-skia-be-le.patch
Patch15: mozilla-bmo1005535.patch
-Patch16: mozilla-add-glibcxx_use_cxx11_abi.patch
-Patch17: mozilla-arm64-libjpeg-turbo.patch
+Patch16: mozilla-arm64-libjpeg-turbo.patch
+Patch17: mozilla-no-stdcxx-check.patch
# Firefox/browser
Patch101: firefox-kde.patch
Patch102: firefox-no-default-ualocale.patch
-Patch103: firefox-multilocale-chrome.patch
-Patch104: firefox-branded-icons.patch
+Patch103: firefox-branded-icons.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): coreutils shared-mime-info desktop-file-utils
Requires(postun): shared-mime-info desktop-file-utils
%if %branding
-Requires: %{name}-branding > 20.0
+Requires: %{name}-branding > 39.0
%endif
Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr)
Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss)
@@ -225,7 +224,7 @@ Supplements: packageand(%{name}:branding-upstream)
#BRAND: It's also possible to create a file
#BRAND: /usr/lib/firefox/defaults/preferences/firefox-$vendor.js to set
#BRAND: custom preference overrides.
-#BRAND: It's also possible to drop files in /usr/lib/firefox/searchplugins
+#BRAND: It's also possible to drop files in /usr/lib/firefox/distribution/searchplugins/common/
%description branding-upstream
This package provides upstream look and feel for %{appname}.
@@ -267,7 +266,6 @@ cd $RPM_BUILD_DIR/mozilla
%patch101 -p1
%patch102 -p1
%patch103 -p1
-%patch104 -p1
%build
# no need to add build time to binaries
@@ -380,7 +378,6 @@ grep amazondotcom dist/firefox/browser/omni.ja
mkdir -p %{buildroot}%{progdir}
cp -rf $RPM_BUILD_DIR/obj/dist/firefox/* %{buildroot}%{progdir}
mkdir -p %{buildroot}%{progdir}/distribution/extensions
-mkdir -p %{buildroot}%{progdir}/browser/searchplugins
mkdir -p %{buildroot}%{progdir}/browser/defaults/preferences/
# install gre prefs
install -m 644 %{SOURCE13} %{buildroot}%{progdir}/defaults/pref/
@@ -558,7 +555,6 @@ exit 0
%{progdir}/browser/icons/
%{progdir}/browser/chrome/icons
%{progdir}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
-%{progdir}/browser/searchplugins/
%{progdir}/browser/blocklist.xml
%{progdir}/browser/chrome.manifest
%{progdir}/browser/omni.ja
diff --git a/compare-locales.tar.xz b/compare-locales.tar.xz
index 7de0057..1b436e8 100644
--- a/compare-locales.tar.xz
+++ b/compare-locales.tar.xz
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:6eada9b700cdd5780fa86b19a687aa8329b073ea0468338c884fa2431e787b62
-size 28400
+oid sha256:23d6c858a354e2572035208778ac8a4577e32326eebfa35833f9e0ffaec2fdb1
+size 28416
diff --git a/create-tar.sh b/create-tar.sh
index 53371fb..d914506 100644
--- a/create-tar.sh
+++ b/create-tar.sh
@@ -2,8 +2,8 @@
CHANNEL="release"
BRANCH="releases/mozilla-$CHANNEL"
-RELEASE_TAG="FIREFOX_39_0_3_RELEASE"
-VERSION="39.0.3"
+RELEASE_TAG="FIREFOX_40_0_RELEASE"
+VERSION="40.0"
# mozilla
if [ -d mozilla ]; then
diff --git a/firefox-39.0.3-source.tar.xz b/firefox-39.0.3-source.tar.xz
deleted file mode 100644
index f0da077..0000000
--- a/firefox-39.0.3-source.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4115f51076f7e109a3b7958e735da2e741c26bcec862f1a92e8fd7404d841b64
-size 157090912
diff --git a/firefox-40.0-source.tar.xz b/firefox-40.0-source.tar.xz
new file mode 100644
index 0000000..d0d0651
--- /dev/null
+++ b/firefox-40.0-source.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:880094ee192cc1e0e456c9aa8fda0268f438fb9b9562a92d009e76cad0ef9e5d
+size 153271696
diff --git a/firefox-branded-icons.patch b/firefox-branded-icons.patch
index ccc392e..508c3dc 100644
--- a/firefox-branded-icons.patch
+++ b/firefox-branded-icons.patch
@@ -1,10 +1,11 @@
# HG changeset patch
# Parent e0751ad74e835e80041a61ea00c2a63bf6fbe2de
+# Parent dbca8a673de340999f67eb321169b44cc4109faf
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
-@@ -62,16 +62,21 @@ GARBAGE += $(addprefix $(FINAL_TARGET)/d
+@@ -55,16 +55,21 @@ GARBAGE += $(addprefix $(FINAL_TARGET)/d
endif
ifdef MOZ_WIDGET_GTK
@@ -26,37 +27,31 @@ diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
$(NSINSTALL) -D $(DIST)/bin/defaults/pref
$(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js)
endif
-diff --git a/browser/branding/official/Makefile.in b/browser/branding/official/Makefile.in
---- a/browser/branding/official/Makefile.in
-+++ b/browser/branding/official/Makefile.in
-@@ -35,18 +35,21 @@ BRANDING_FILES := \
- document.icns \
- dsstore \
- $(NULL)
- endif
-
- ifdef MOZ_WIDGET_GTK
- BRANDING_FILES := \
- default16.png \
-+ default22.png \
-+ default24.png \
- default32.png \
- default48.png \
-+ default256.png \
- mozicon128.png \
- $(NULL)
- endif
-
- BRANDING_DEST := $(DIST)/branding
- BRANDING_TARGET := export
- INSTALL_TARGETS += BRANDING
-
+diff --git a/browser/branding/branding-common.mozbuild b/browser/branding/branding-common.mozbuild
+--- a/browser/branding/branding-common.mozbuild
++++ b/browser/branding/branding-common.mozbuild
+@@ -32,12 +32,15 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
+ 'disk.icns',
+ 'document.icns',
+ 'dsstore',
+ 'firefox.icns',
+ ]
+ elif CONFIG['MOZ_WIDGET_GTK']:
+ BRANDING_FILES += [
+ 'default16.png',
++ 'default22.png',
++ 'default24.png',
++ 'default256.png',
+ 'default32.png',
+ 'default48.png',
+ 'mozicon128.png',
+ ]
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
-@@ -654,18 +654,21 @@
- @RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
+@@ -669,18 +669,21 @@
@RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
+ @RESPATH@/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
@RESPATH@/chrome/toolkit@JAREXT@
@RESPATH@/chrome/toolkit.manifest
@RESPATH@/chrome/recording.manifest
diff --git a/firefox-kde.patch b/firefox-kde.patch
index daa88ea..a3273b4 100644
--- a/firefox-kde.patch
+++ b/firefox-kde.patch
@@ -1,11 +1,11 @@
# HG changeset patch
-# Parent cd94ee18bd0cdda7f5eb5503d8d072efe02a8033
+# Parent c6048238765dab77cd0c9a45e7afb1157316938b
diff --git a/browser/base/content/browser-kde.xul b/browser/base/content/browser-kde.xul
new file mode 100644
--- /dev/null
+++ b/browser/base/content/browser-kde.xul
-@@ -0,0 +1,1308 @@
+@@ -0,0 +1,1314 @@
+#filter substitution
+
+# -*- Mode: HTML -*-
@@ -788,6 +788,7 @@ new file mode 100644
+
+
+
++
+
+
+
@@ -838,7 +839,7 @@ new file mode 100644
+
++ onclick="ReadingListUI.buttonClick(event);"/>
+
+#include tab-shape.inc.svg
-+
++
+#ifndef XP_MACOSX
-+
++
+#else
+
+#endif
+
++#ifdef XP_WIN
++
++
++
++#endif
+
+
+
@@ -1336,7 +1342,7 @@ diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul