From 75a0037a3b061cb84689da455f5466f9b6a705d7 Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: May 26 2015 06:15:19 +0000 Subject: Merge branch 'master' into f20 --- diff --git a/firefox.spec b/firefox.spec index d671d2a..b93f23f 100644 --- a/firefox.spec +++ b/firefox.spec @@ -107,7 +107,7 @@ Summary: Mozilla Firefox Web browser Name: firefox Version: 38.0.1 -Release: 1%{?pre_tag}%{?dist} +Release: 3%{?pre_tag}%{?dist} URL: http://www.mozilla.org/projects/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -279,7 +279,7 @@ This package contains results of tests executed during build. cd %{tarballdir} # Build patches, can't change backup suffix from default because during build -# there is a compare of config and js/config directories and .orig suffix is +# there is a compare of config and js/config directories and .orig suffix is # ignored during this compare. %patch0 -p1 %patch1 -p2 -b .build @@ -463,7 +463,13 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-Wall//') #rhbz#1037063 # -Werror=format-security causes build failures when -Wno-format is explicitly given # for some sources +# Explicitly force the hardening flags for Firefox so it passes the checksec test; +# See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -Wformat-security -Wformat -Werror=format-security" +# Use hardened build? +%if 0%{?fedora} > 22 +MOZ_OPT_FLAGS="$MOZ_OPT_FLAGS -fPIC -pie -Wl,-z,relro -Wl,-z,now" +%endif %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif @@ -491,7 +497,6 @@ MOZ_SMP_FLAGS=-j1 [ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8 %endif -#export LDFLAGS="-Wl,-rpath,%{mozappdir}" make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1" # create debuginfo for crash-stats.mozilla.com @@ -535,15 +540,6 @@ rm -f objdir/dist/bin/pk12util %install cd %{tarballdir} -# set up our prefs and add it to the package manifest file, so it gets pulled in -# to omni.jar which gets created during make install -%{__cp} %{SOURCE12} objdir/dist/bin/browser/defaults/preferences/all-redhat.js -# This sed call "replaces" firefox.js with all-redhat.js, newline, and itself (&) -# having the net effect of prepending all-redhat.js above firefox.js -#%{__sed} -i -e\ -# 's|@BINPATH@/browser/@PREF_DIR@/firefox.js|@BINPATH@/browser/@PREF_DIR@/all-redhat.js\n&|' \ -# browser/installer/package-manifest.in - # set up our default bookmarks %{__cp} -p %{default_bookmarks_file} objdir/dist/bin/browser/defaults/profile/bookmarks.html @@ -556,10 +552,8 @@ DESTDIR=$RPM_BUILD_ROOT make -C objdir install %{__mkdir_p} $RPM_BUILD_ROOT{%{_libdir},%{_bindir},%{_datadir}/applications} - desktop-file-install --dir $RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE20} - # set up the firefox start script %{__rm} -rf $RPM_BUILD_ROOT%{_bindir}/firefox %{__cat} %{SOURCE21} > $RPM_BUILD_ROOT%{_bindir}/firefox @@ -693,11 +687,11 @@ sed -i -e "s/\[Crash Reporter\]/[Crash Reporter]\nEnabled=1/" $RPM_BUILD_ROOT/%{ %{__cp} test_results/* $RPM_BUILD_ROOT/test_results %endif -# Default +# Default %{__cp} %{SOURCE12} ${RPM_BUILD_ROOT}%{mozappdir}/browser/defaults/preferences # Remove copied libraries to speed up build -rm -f ${RPM_BUILD_ROOT}%{mozappdirdev}/sdk/lib/libmozjs.so +rm -f ${RPM_BUILD_ROOT}%{mozappdirdev}/sdk/lib/libmozjs.so rm -f ${RPM_BUILD_ROOT}%{mozappdirdev}/sdk/lib/libmozalloc.so rm -f ${RPM_BUILD_ROOT}%{mozappdirdev}/sdk/lib/libxul.so #--------------------------------------------------------------------- @@ -710,7 +704,7 @@ if (posix.stat("%{mozappdir}/browser/defaults/preferences", "type") == "link") t posix.unlink("%{mozappdir}/browser/defaults/preferences") posix.mkdir("%{mozappdir}/browser/defaults/preferences") if (posix.stat("%{mozappdir}/defaults/preferences", "type") == "directory") then - for i,filename in pairs(posix.dir("%{mozappdir}/defaults/preferences")) do + for i,filename in pairs(posix.dir("%{mozappdir}/defaults/preferences")) do os.rename("%{mozappdir}/defaults/preferences/"..filename, "%{mozappdir}/browser/defaults/preferences/"..filename) end f = io.open("%{mozappdir}/defaults/preferences/README","w") @@ -814,6 +808,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : #--------------------------------------------------------------------- %changelog +* Tue May 26 2015 Martin Stransky - 38.0.1-3 +- spec clean up + +* Fri May 22 2015 Moez Roy - 38.0.1-2 +- Rebuilt with hardening flags so it passes the checksec test; +- See also https://fedoraproject.org/wiki/Changes/Harden_All_Packages + * Mon May 18 2015 Martin Stransky - 38.0.1-1 - Update to 38.0.1 @@ -1168,7 +1169,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : - Updated xulrunner check * Thu Apr 18 2013 Martin Stransky - 20.0-3 -- Added a workaround for rhbz#907424 - textarea redrawn wrongly +- Added a workaround for rhbz#907424 - textarea redrawn wrongly during edit * Thu Apr 18 2013 Jan Horak - 20.0-2