Architecture specific change in rpms/grubby.git
by githook-noreply@fedoraproject.org
The package rpms/grubby.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/grubby.git/commit/?id=c5aefcde03e....
Change:
-%ifarch %{arm}
Thanks.
Full change:
============
commit c5aefcde03e38b76506c26bf8a262fc303c0d928
Author: Peter Robinson <pbrobinson(a)gmail.com>
Date: Wed Jan 24 08:53:33 2018 +0000
Drop u-boot uImage generation on ARMv7, Minor cleanups
diff --git a/0001-Don-t-go-past-the-last-element-of-indexVars-in-findE.patch b/0001-Don-t-go-past-the-last-element-of-indexVars-in-findE.patch
deleted file mode 100644
index 616371c..0000000
--- a/0001-Don-t-go-past-the-last-element-of-indexVars-in-findE.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 639b9ab2462d4dddd8b8cff04e8db352cb6dc5d5 Mon Sep 17 00:00:00 2001
-From: Yannick Brosseau <scientist(a)fb.com>
-Date: Thu, 3 Jul 2014 13:55:19 -0700
-Subject: [PATCH 01/10] Don't go past the last element of indexVars in
- findEntryByPath
-
-We add a chance of creating an infinite loop, because we
-were reading memory past the last element of indexVars set to -1.
-
-This issue was only apparent with -O2, probably because the way the
-memory was initialized.
-
-Signed-off-by: Yannick Brosseau <scientist(a)fb.com>
----
- grubby.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/grubby.c b/grubby.c
-index 88a1f08..db91364 100644
---- a/grubby.c
-+++ b/grubby.c
-@@ -1959,11 +1959,13 @@ struct singleEntry * findEntryByPath(struct grubConfig * config,
- }
-
- indexVars[i + 1] = -1;
--
-+
- i = 0;
- if (index) {
-- while (i < *index) i++;
-- if (indexVars[i] == -1) return NULL;
-+ while (i < *index) {
-+ i++;
-+ if (indexVars[i] == -1) return NULL;
-+ }
- }
-
- entry = findEntryByIndex(config, indexVars[i]);
---
-1.9.3
-
diff --git a/0001-Treat-kernel-and-kernel-core-as-identical-in-terms-o.patch b/0001-Treat-kernel-and-kernel-core-as-identical-in-terms-o.patch
deleted file mode 100644
index e959dd4..0000000
--- a/0001-Treat-kernel-and-kernel-core-as-identical-in-terms-o.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 15d36a8f27c5b14b290da99c4be8880bc35dc41b Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones(a)redhat.com>
-Date: Mon, 27 Oct 2014 18:10:00 -0400
-Subject: [PATCH] Treat kernel and kernel-core as identical in terms of
- --make-default
-
-Depending on which kernel version, we'll either get kernel or
-kernel-core as --package. Since we're unlikely to call something
-kernel-core-core, just treat them the same.
-
-Resolves: rhbz#1141414
-
-Signed-off-by: Peter Jones <pjones(a)redhat.com>
----
- new-kernel-pkg | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/new-kernel-pkg b/new-kernel-pkg
-index 70f6118..9f3b192 100755
---- a/new-kernel-pkg
-+++ b/new-kernel-pkg
-@@ -797,9 +797,11 @@ if [ -n "$dracut" -o -n "$adddracutargs" ]; then
- fi
-
- # set this as the default if we have the package and it matches
--if [ "$mode" == "--install" -a "$UPDATEDEFAULT" == "yes" -a -n "$package" -a -n "$DEFAULTKERNEL" -a "$package" == "$DEFAULTKERNEL" ]; then
-- makedefault="--make-default"
-- [ -n "$verbose" ] && echo "making it the default based on config"
-+if [ "$mode" == "--install" -a "$UPDATEDEFAULT" == "yes" -a -n "$package" -a -n "$DEFAULTKERNEL" ]; then
-+ if [ "$package" == "$DEFAULTKERNEL" -o "${package}-core" == "$DEFAULTKERNEL" ]; then
-+ makedefault="--make-default"
-+ [ -n "$verbose" ] && echo "making it the default based on config"
-+ fi
- fi
-
- if [ "$moddep" == "make" ]; then
---
-1.9.3
-
diff --git a/0002-Add-bls-test-harness-bits.patch b/0002-Add-bls-test-harness-bits.patch
deleted file mode 100644
index e129e93..0000000
--- a/0002-Add-bls-test-harness-bits.patch
+++ /dev/null
@@ -1,452 +0,0 @@
-From 0e5c50b8dff5208b915391e3b592790bdf174cf4 Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones(a)redhat.com>
-Date: Tue, 8 Jul 2014 14:37:21 -0400
-Subject: [PATCH 02/10] Add bls test harness bits.
-
-This expects that there are bls config files and that grubby knows how
-to deal with them, which isn't at all true, and so the test case
-currently fails because test/grub2.15 doesn't provide any kernel stanzas
-whatsoever.
-
-Maybe I should add a dummy there, but... I'd rather leave this failing
-here.
-
-Signed-off-by: Peter Jones <pjones(a)redhat.com>
----
- test.sh | 105 +++++++++++++++++++
- ...724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf | 8 ++
- ...724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf | 8 ++
- ...981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf | 10 ++
- ...981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf | 10 ++
- test/grub2.15 | 112 +++++++++++++++++++++
- test/results/grub2.15 | 112 +++++++++++++++++++++
- 7 files changed, 365 insertions(+)
- create mode 100644 test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
- create mode 100644 test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf
- create mode 100644 test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf
- create mode 100644 test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf
- create mode 100644 test/grub2.15
- create mode 100644 test/results/grub2.15
-
-diff --git a/test.sh b/test.sh
-index 864a8ce..e7be15f 100755
---- a/test.sh
-+++ b/test.sh
-@@ -163,6 +163,102 @@ for b in $(./grubby --help | \
- eval "${b}DisplayTest() { [[ \"$b\" == \$opt_bootloader ]] && oneDisplayTest --$b \"\$@\"; }"
- done
-
-+grub2BlsTest() {
-+ declare blsdir=$(mktemp -d) cmpdir=$(mktemp -d)
-+
-+ declare blspairs=""
-+ while [ -n "$1" ]; do
-+ if [ "$1" == "--blspair" ]; then
-+ blsin=$(echo $2 | sed 's/\(.*\),.*/\1/')
-+ blsout=$(echo $2 | sed 's/[^,]*,\(.*\)/\1/')
-+ [ -n "$blsin" ] && cp "test/grub2-support_files/$blsin" ${blsdir}/
-+ [ -n "$blsout" ] && cp "test/grub2-support_files/$blsout" ${cmpdir}/
-+ blspairs="${blspairs} $2"
-+ shift 2
-+ else
-+ break
-+ fi
-+ done
-+
-+ typeset mode=$1 cfg=test/$2 correct=test/results/$3
-+ shift 3
-+
-+ local ENV_FILE=""
-+ if [ "$mode" == "--grub2" ]; then
-+ ENV_FILE="test/grub2-support_files/env_temp"
-+ if [ "$1" == "--env" ]; then
-+ cp "test/grub2-support_files/$2" "$ENV_FILE"
-+ shift 2
-+ else
-+ cp "test/grub2-support_files/grubenv.0" "$ENV_FILE"
-+ fi
-+ ENV_FILE="--env=$ENV_FILE"
-+ fi
-+
-+ declare outfile=$(mktemp)
-+ echo "$testing ... $mode bls $cfg $correct"
-+ runme=( ./grubby "$mode" --bad-image-okay $ENV_FILE -c "$cfg" -o - --blsdir="${blsdir}" "$@" )
-+ declare -i old_fail=$fail
-+ if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then
-+ (( pass++ ))
-+ if $opt_verbose; then
-+ echo -------------------------------------------------------------
-+ echo -n "PASS: "
-+ printf "%q " "${runme[@]}"; echo
-+ "${runme[@]}" 2>&1 | diff -U30 "$cfg" -
-+ echo
-+ fi
-+ else
-+ (( fail++ ))
-+ echo -------------------------------------------------------------
-+ echo -n "FAIL: "
-+ printf "%q " "${runme[@]}"; echo
-+ "${runme[@]}" 2>&1 | diff -U30 "$correct" -
-+ echo
-+ fi
-+
-+ for pair in ${blspairs} ; do
-+ blsin=$(echo $pair | sed 's/\(.*\),.*/\1/')
-+ blsout=$(echo $pair | sed 's/[^,]*,\(.*\)/\1/')
-+
-+ if [ -z "${blsout}" -a -f ${blsdir}/${blsin} ]; then
-+ (( fail++ ))
-+ echo -------------------------------------------------------------
-+ echo -n "FAIL: "
-+ printf "%q " "${runme[@]}"; echo
-+ diff -U30 /dev/null ${blsdir}/${blsin}
-+ elif [ -n "${blsout}" ] && ! cmp ${blsdir}/${blsout} ${cmpdir}/${blsout} >/dev/null ; then
-+ (( fail++ ))
-+ echo -------------------------------------------------------------
-+ echo -n "FAIL: "
-+ printf "%q " "${runme[@]}"; echo
-+ diff -U30 "${cmpdir}/${blsout}" "${blsdir}/${blsout}"
-+ else
-+ (( pass++ ))
-+ if $opt_verbose; then
-+ echo -------------------------------------------------------------
-+ echo -n "PASS: "
-+ printf "%q " "${runme[@]}"; echo
-+ diff -U30 "${cmpdir}/${blsout}" "${blsdir}/${blsout}"
-+ fi
-+ fi
-+ done
-+
-+ if [ $old_fail -eq $fail ]; then
-+ (( pass++ ))
-+ if $opt_verbose; then
-+ echo -------------------------------------------------------------
-+ echo -n "PASS: "
-+ printf "%q " "${runme[@]}"; echo
-+ "${runme[@]}" 2>&1 | diff -U30 "$cfg" -
-+ echo
-+ fi
-+ fi
-+
-+ rm -rvf ${blsdir}/ ${cmpdir}/
-+}
-+
-+
- #----------------------------------------------------------------------
- # Main
- #----------------------------------------------------------------------
-@@ -533,6 +629,15 @@ if [ "$testgrub2" == "y" ]; then
- grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
- --initrd=/boot/new-initrd --boot-filesystem=/boot/
-
-+ testing="GRUB2 add bls kernel+initrd"
-+ grub2BlsTest \
-+ --blspair 6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf,6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf \
-+ --blspair ,6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf \
-+ --grub2 grub2.15 grub2.15 \
-+ --add-kernel=/boot/new-kernel.img \
-+ --title=title --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
-+ --copy-default
-+
- testing="GRUB2 display default index"
- grub2DisplayTest grub2.1 defaultindex/0 --default-index
- grub2DisplayTest grub2.2 defaultindex/0 --default-index
-diff --git a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
-new file mode 100644
-index 0000000..84b2bdf
---- /dev/null
-+++ b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
-@@ -0,0 +1,8 @@
-+# /boot/org/freedesktop/bls/entries/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
-+title Fedora 19 (Rawhide)
-+version 3.8.0-2.fc19.x86_64
-+machine-id 6a9857a393724b7a981ebb5b8495b9ea
-+filesystem 6d3376e4-fc93-4509-95ec-a21d68011da2
-+linux /boot/vmlinux-3.8.0-2.fc19.x86_64
-+options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
-+initrd /boot/initrd-3.8.0-2.fc19.x86_64
-diff --git a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf
-new file mode 100644
-index 0000000..e1c61a8
---- /dev/null
-+++ b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf
-@@ -0,0 +1,8 @@
-+# /boot/org/freedesktop/bls/entries/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf
-+title Fedora 19 (Rawhide)
-+version 3.8.1-2.fc19.x86_64
-+machine-id 6a9857a393724b7a981ebb5b8495b9ea
-+filesystem 6d3376e4-fc93-4509-95ec-a21d68011da2
-+linux /boot/vmlinux-3.8.1-2.fc19.x86_64
-+options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
-+initrd /boot/initrd-3.8.1-2.fc19.x86_64
-diff --git a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf
-new file mode 100644
-index 0000000..4a60fbc
---- /dev/null
-+++ b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf
-@@ -0,0 +1,10 @@
-+# /boot/org/freedesktop/bls/entries/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf
-+title Fedora 19 (tboot) (Rawhide)
-+version 3.8.0-2.fc19.x86_64
-+machine-id 6a9857a393724b7a981ebb5b8495b9ea
-+filesystem 6d3376e4-fc93-4509-95ec-a21d68011da2
-+multiboot /boot/tboot.gz
-+ options logging=serial,vga,memory
-+linux /boot/vmlinux-3.8.0-2.fc19.x86_64
-+options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
-+initrd /boot/initrd-3.8.0-2.fc19.x86_64
-diff --git a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf
-new file mode 100644
-index 0000000..34c0e09
---- /dev/null
-+++ b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf
-@@ -0,0 +1,10 @@
-+# /boot/org/freedesktop/bls/entries/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf
-+title Fedora 19 (tboot) (Rawhide)
-+version 3.8.1-2.fc19.x86_64
-+machine-id 6a9857a393724b7a981ebb5b8495b9ea
-+filesystem 6d3376e4-fc93-4509-95ec-a21d68011da2
-+multiboot /boot/tboot.gz
-+ options logging=serial,vga,memory
-+linux /boot/vmlinux-3.8.1-2.fc19.x86_64
-+options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
-+initrd /boot/initrd-3.8.1-2.fc19.x86_64
-diff --git a/test/grub2.15 b/test/grub2.15
-new file mode 100644
-index 0000000..0be2d74
---- /dev/null
-+++ b/test/grub2.15
-@@ -0,0 +1,112 @@
-+#
-+# DO NOT EDIT THIS FILE
-+#
-+# It is automatically generated by grub2-mkconfig using templates
-+# from /etc/grub.d and settings from /etc/default/grub
-+#
-+
-+### BEGIN /etc/grub.d/00_header ###
-+if [ -s $prefix/grubenv ]; then
-+ load_env
-+fi
-+if [ "${next_entry}" ] ; then
-+ set default="${next_entry}"
-+ set next_entry=
-+ save_env next_entry
-+ set boot_once=true
-+else
-+ set default="${saved_entry}"
-+fi
-+
-+if [ x"${feature_menuentry_id}" = xy ]; then
-+ menuentry_id_option="--id"
-+else
-+ menuentry_id_option=""
-+fi
-+
-+export menuentry_id_option
-+
-+if [ "${prev_saved_entry}" ]; then
-+ set saved_entry="${prev_saved_entry}"
-+ save_env saved_entry
-+ set prev_saved_entry=
-+ save_env prev_saved_entry
-+ set boot_once=true
-+fi
-+
-+function savedefault {
-+ if [ -z "${boot_once}" ]; then
-+ saved_entry="${chosen}"
-+ save_env saved_entry
-+ fi
-+}
-+
-+function load_video {
-+ if [ x$feature_all_video_module = xy ]; then
-+ insmod all_video
-+ else
-+ insmod efi_gop
-+ insmod efi_uga
-+ insmod ieee1275_fb
-+ insmod vbe
-+ insmod vga
-+ insmod video_bochs
-+ insmod video_cirrus
-+ fi
-+}
-+
-+if [ x$feature_default_font_path = xy ] ; then
-+ font=unicode
-+else
-+insmod part_gpt
-+insmod btrfs
-+set root='hd0,gpt4'
-+if [ x$feature_platform_search_hint = xy ]; then
-+ search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 5a2ca487-30f7-4fa5-96bd-abe38b68ceb3
-+else
-+ search --no-floppy --fs-uuid --set=root 5a2ca487-30f7-4fa5-96bd-abe38b68ceb3
-+fi
-+ font="/root/usr/share/grub/unicode.pf2"
-+fi
-+
-+if loadfont $font ; then
-+ set gfxmode=auto
-+ load_video
-+ insmod gfxterm
-+ set locale_dir=$prefix/locale
-+ set lang=en_US
-+ insmod gettext
-+fi
-+terminal_output gfxterm
-+set timeout=5
-+### END /etc/grub.d/00_header ###
-+
-+### BEGIN /etc/grub.d/10_blscfg ###
-+
-+bls_import
-+
-+### END /etc/grub.d/10_blscfg ###
-+
-+### BEGIN /etc/grub.d/20_linux_xen ###
-+
-+### END /etc/grub.d/20_linux_xen ###
-+
-+### BEGIN /etc/grub.d/20_ppc_terminfo ###
-+### END /etc/grub.d/20_ppc_terminfo ###
-+
-+### BEGIN /etc/grub.d/30_os-prober ###
-+### END /etc/grub.d/30_os-prober ###
-+
-+### BEGIN /etc/grub.d/40_custom ###
-+# This file provides an easy way to add custom menu entries. Simply type the
-+# menu entries you want to add after this comment. Be careful not to change
-+# the 'exec tail' line above.
-+### END /etc/grub.d/40_custom ###
-+
-+### BEGIN /etc/grub.d/41_custom ###
-+if [ -f ${config_directory}/custom.cfg ]; then
-+ source ${config_directory}/custom.cfg
-+elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
-+ source $prefix/custom.cfg;
-+fi
-+### END /etc/grub.d/41_custom ###
-diff --git a/test/results/grub2.15 b/test/results/grub2.15
-new file mode 100644
-index 0000000..0be2d74
---- /dev/null
-+++ b/test/results/grub2.15
-@@ -0,0 +1,112 @@
-+#
-+# DO NOT EDIT THIS FILE
-+#
-+# It is automatically generated by grub2-mkconfig using templates
-+# from /etc/grub.d and settings from /etc/default/grub
-+#
-+
-+### BEGIN /etc/grub.d/00_header ###
-+if [ -s $prefix/grubenv ]; then
-+ load_env
-+fi
-+if [ "${next_entry}" ] ; then
-+ set default="${next_entry}"
-+ set next_entry=
-+ save_env next_entry
-+ set boot_once=true
-+else
-+ set default="${saved_entry}"
-+fi
-+
-+if [ x"${feature_menuentry_id}" = xy ]; then
-+ menuentry_id_option="--id"
-+else
-+ menuentry_id_option=""
-+fi
-+
-+export menuentry_id_option
-+
-+if [ "${prev_saved_entry}" ]; then
-+ set saved_entry="${prev_saved_entry}"
-+ save_env saved_entry
-+ set prev_saved_entry=
-+ save_env prev_saved_entry
-+ set boot_once=true
-+fi
-+
-+function savedefault {
-+ if [ -z "${boot_once}" ]; then
-+ saved_entry="${chosen}"
-+ save_env saved_entry
-+ fi
-+}
-+
-+function load_video {
-+ if [ x$feature_all_video_module = xy ]; then
-+ insmod all_video
-+ else
-+ insmod efi_gop
-+ insmod efi_uga
-+ insmod ieee1275_fb
-+ insmod vbe
-+ insmod vga
-+ insmod video_bochs
-+ insmod video_cirrus
-+ fi
-+}
-+
-+if [ x$feature_default_font_path = xy ] ; then
-+ font=unicode
-+else
-+insmod part_gpt
-+insmod btrfs
-+set root='hd0,gpt4'
-+if [ x$feature_platform_search_hint = xy ]; then
-+ search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 5a2ca487-30f7-4fa5-96bd-abe38b68ceb3
-+else
-+ search --no-floppy --fs-uuid --set=root 5a2ca487-30f7-4fa5-96bd-abe38b68ceb3
-+fi
-+ font="/root/usr/share/grub/unicode.pf2"
-+fi
-+
-+if loadfont $font ; then
-+ set gfxmode=auto
-+ load_video
-+ insmod gfxterm
-+ set locale_dir=$prefix/locale
-+ set lang=en_US
-+ insmod gettext
-+fi
-+terminal_output gfxterm
-+set timeout=5
-+### END /etc/grub.d/00_header ###
-+
-+### BEGIN /etc/grub.d/10_blscfg ###
-+
-+bls_import
-+
-+### END /etc/grub.d/10_blscfg ###
-+
-+### BEGIN /etc/grub.d/20_linux_xen ###
-+
-+### END /etc/grub.d/20_linux_xen ###
-+
-+### BEGIN /etc/grub.d/20_ppc_terminfo ###
-+### END /etc/grub.d/20_ppc_terminfo ###
-+
-+### BEGIN /etc/grub.d/30_os-prober ###
-+### END /etc/grub.d/30_os-prober ###
-+
-+### BEGIN /etc/grub.d/40_custom ###
-+# This file provides an easy way to add custom menu entries. Simply type the
-+# menu entries you want to add after this comment. Be careful not to change
-+# the 'exec tail' line above.
-+### END /etc/grub.d/40_custom ###
-+
-+### BEGIN /etc/grub.d/41_custom ###
-+if [ -f ${config_directory}/custom.cfg ]; then
-+ source ${config_directory}/custom.cfg
-+elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
-+ source $prefix/custom.cfg;
-+fi
-+### END /etc/grub.d/41_custom ###
---
-1.9.3
-
diff --git a/0003-grubby-fix-initrd-updating-when-multiboot-exist.patch b/0003-grubby-fix-initrd-updating-when-multiboot-exist.patch
deleted file mode 100644
index 2560743..0000000
--- a/0003-grubby-fix-initrd-updating-when-multiboot-exist.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From e91855ce14df65d12f681c15dfba5b22a2b4a061 Mon Sep 17 00:00:00 2001
-From: Junxiao Bi <junxiao.bi(a)oracle.com>
-Date: Wed, 14 May 2014 16:44:21 +0800
-Subject: [PATCH 03/10] grubby: fix initrd updating when multiboot exist
-
-When using the following command to add an initrd for the kernel.
-grubby --update-kernel=/boot/vmlinuz-2.6.32-431.17.1.el6.x86_64.debug
- --initrd /boot/initramfs-2.6.32-431.17.1.el6.x86_64.debug.img
- --add-multiboot=/boot/tboot.gz
-The multiboot image /boot/tboot.gz is used as the key to search the
-configure entry in grub.conf, this is wrong. There may be other kernels
-also configure multiboot with the same name tboot.gz, if there index are
-smaller than the target one, then that will make the initrd added to the
-wrong kernel. Fix it to use kernel name as the search key.
-
-Signed-off-by: Junxiao Bi <junxiao.bi(a)oracle.com>
-Reviewed-by: John Haxby <john.haxby(a)oracle.com>
----
- grubby.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grubby.c b/grubby.c
-index db91364..118cb84 100644
---- a/grubby.c
-+++ b/grubby.c
-@@ -3311,7 +3311,7 @@ int addMBInitrd(struct grubConfig * cfg, const char *newMBKernel,
-
- if (!image) return 0;
-
-- for (; (entry = findEntryByPath(cfg, newMBKernel, prefix, &index)); index++) {
-+ for (; (entry = findEntryByPath(cfg, image, prefix, &index)); index++) {
- kernelLine = getLineByType(LT_MBMODULE, entry->lines);
- if (!kernelLine) continue;
-
---
-1.9.3
-
diff --git a/0004-Tell-a-slightly-better-fib-about-default-bootloader-.patch b/0004-Tell-a-slightly-better-fib-about-default-bootloader-.patch
deleted file mode 100644
index 6c0e91f..0000000
--- a/0004-Tell-a-slightly-better-fib-about-default-bootloader-.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From dbd5b06ce590ca638e3c44746183f6f2379e820f Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones(a)redhat.com>
-Date: Fri, 12 Sep 2014 15:50:05 -0400
-Subject: [PATCH 04/10] Tell a slightly better fib about default bootloader
- config paths.
-
-It's not going to be right everywhere, but... whatever.
-
-Resolves: rhbz#1001664
-Signed-off-by: Peter Jones <pjones(a)redhat.com>
----
- grubby.8 | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/grubby.8 b/grubby.8
-index c2b0155..bd5ccb8 100644
---- a/grubby.8
-+++ b/grubby.8
-@@ -19,16 +19,18 @@ grubby \- command line tool for configuring grub, lilo, elilo, yaboot and zipl
-
- .SH DESCRIPTION
- \fBgrubby\fR is a command line tool for updating and displaying information
--about the configuration files for the \fBgrub\fR, \fBlilo\fR, \fBelilo\fR
-+about the configuration files for the \fBgrub\fR, \fBlilo\fR, \fBelilo\fR
- (ia64), \fByaboot\fR (powerpc) and \fBzipl\fR (s390) boot loaders. It
- is primarily designed to be used from scripts which install new
- kernels and need to find information about the current boot environment.
-
--On Intel x86 platforms, \fBgrub\fR is the default bootloader and the
--configuration file is in \fB/boot/grub/grub.conf\fR. On Intel ia64 platforms,
--\fBelilo\fR mode is used and the default location for the configuration file
--is \fB/boot/grub/grub.conf\fR. On PowerPC platforms, \fByaboot\fR parsing
--is used and the configuration file should be in \fB/etc/yaboot.conf\fR.
-+On BIOS-based Intel x86 platforms, \fBgrub2\fR is the default bootloader and
-+the configuration file is in \fB/boot/grub2/grub.cfg\fR. On UEFI-based Intel
-+x86 platforms, \fBgrub2\fR is the default bootloader, and the configuration
-+file is in \fB/boot/efi/EFI/redhat/grub.cfg\fR. On Intel ia64 platforms,
-+\fBelilo\fR mode is used and the default location for the configuration file
-+is \fB/boot/efi/EFI/redhat/elilo.conf\fR. On PowerPC platforms, \fByaboot\fR
-+parsing is used and the configuration file should be in \fB/etc/yaboot.conf\fR.
-
- There are a number of ways to specify the kernel used for \fB-\-info\fR,
- \fB-\-remove-kernel\fR, and \fB-\-update-kernel\fR. Specificying \fBDEFAULT\fR
---
-1.9.3
-
diff --git a/0005-Make-findTemplate-actually-return-the-saved-default.patch b/0005-Make-findTemplate-actually-return-the-saved-default.patch
deleted file mode 100644
index ffa23c1..0000000
--- a/0005-Make-findTemplate-actually-return-the-saved-default.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 629922b6dc32e4209980d7198b7d2aabb722033a Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones(a)redhat.com>
-Date: Mon, 15 Sep 2014 14:31:01 -0400
-Subject: [PATCH 05/10] Make findTemplate actually return the saved default.
-
-Really not sure why this wasn't returning here before; going into the
-loop below is just going to clobber all that it's done.
-
-Related: rhbz#957681
-Signed-off-by: Peter Jones <pjones(a)redhat.com>
----
- grubby.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/grubby.c b/grubby.c
-index 118cb84..baf646b 100644
---- a/grubby.c
-+++ b/grubby.c
-@@ -2119,8 +2119,12 @@ struct singleEntry * findTemplate(struct grubConfig * cfg, const char * prefix,
- } else {
- entry = findEntryByTitle(cfg, defTitle, &index);
- }
-- if (entry)
-+ if (entry && suitableImage(entry, prefix, skipRemoved, flags)) {
- cfg->defaultImage = index;
-+ if (indexPtr)
-+ *indexPtr = index;
-+ return entry;
-+ }
- }
- }
- } else if (cfg->defaultImage > -1) {
---
-1.9.3
-
diff --git a/0006-Revert-Add-bls-test-harness-bits.patch b/0006-Revert-Add-bls-test-harness-bits.patch
deleted file mode 100644
index 57aa733..0000000
--- a/0006-Revert-Add-bls-test-harness-bits.patch
+++ /dev/null
@@ -1,446 +0,0 @@
-From 0950d2e8693339a36f59c966dc8558263331665c Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones(a)redhat.com>
-Date: Mon, 15 Sep 2014 16:49:26 -0400
-Subject: [PATCH 06/10] Revert "Add bls test harness bits."
-
-This wasn't supposed to be pushed to master yet. woops.
-
-This reverts commit 98cab84501f86bd98f12653c11f4ecc632139399.
----
- test.sh | 105 -------------------
- ...724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf | 8 --
- ...724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf | 8 --
- ...981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf | 10 --
- ...981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf | 10 --
- test/grub2.15 | 112 ---------------------
- test/results/grub2.15 | 112 ---------------------
- 7 files changed, 365 deletions(-)
- delete mode 100644 test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
- delete mode 100644 test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf
- delete mode 100644 test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf
- delete mode 100644 test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf
- delete mode 100644 test/grub2.15
- delete mode 100644 test/results/grub2.15
-
-diff --git a/test.sh b/test.sh
-index e7be15f..864a8ce 100755
---- a/test.sh
-+++ b/test.sh
-@@ -163,102 +163,6 @@ for b in $(./grubby --help | \
- eval "${b}DisplayTest() { [[ \"$b\" == \$opt_bootloader ]] && oneDisplayTest --$b \"\$@\"; }"
- done
-
--grub2BlsTest() {
-- declare blsdir=$(mktemp -d) cmpdir=$(mktemp -d)
--
-- declare blspairs=""
-- while [ -n "$1" ]; do
-- if [ "$1" == "--blspair" ]; then
-- blsin=$(echo $2 | sed 's/\(.*\),.*/\1/')
-- blsout=$(echo $2 | sed 's/[^,]*,\(.*\)/\1/')
-- [ -n "$blsin" ] && cp "test/grub2-support_files/$blsin" ${blsdir}/
-- [ -n "$blsout" ] && cp "test/grub2-support_files/$blsout" ${cmpdir}/
-- blspairs="${blspairs} $2"
-- shift 2
-- else
-- break
-- fi
-- done
--
-- typeset mode=$1 cfg=test/$2 correct=test/results/$3
-- shift 3
--
-- local ENV_FILE=""
-- if [ "$mode" == "--grub2" ]; then
-- ENV_FILE="test/grub2-support_files/env_temp"
-- if [ "$1" == "--env" ]; then
-- cp "test/grub2-support_files/$2" "$ENV_FILE"
-- shift 2
-- else
-- cp "test/grub2-support_files/grubenv.0" "$ENV_FILE"
-- fi
-- ENV_FILE="--env=$ENV_FILE"
-- fi
--
-- declare outfile=$(mktemp)
-- echo "$testing ... $mode bls $cfg $correct"
-- runme=( ./grubby "$mode" --bad-image-okay $ENV_FILE -c "$cfg" -o - --blsdir="${blsdir}" "$@" )
-- declare -i old_fail=$fail
-- if "${runme[@]}" 2>&1 | cmp "$correct" > /dev/null; then
-- (( pass++ ))
-- if $opt_verbose; then
-- echo -------------------------------------------------------------
-- echo -n "PASS: "
-- printf "%q " "${runme[@]}"; echo
-- "${runme[@]}" 2>&1 | diff -U30 "$cfg" -
-- echo
-- fi
-- else
-- (( fail++ ))
-- echo -------------------------------------------------------------
-- echo -n "FAIL: "
-- printf "%q " "${runme[@]}"; echo
-- "${runme[@]}" 2>&1 | diff -U30 "$correct" -
-- echo
-- fi
--
-- for pair in ${blspairs} ; do
-- blsin=$(echo $pair | sed 's/\(.*\),.*/\1/')
-- blsout=$(echo $pair | sed 's/[^,]*,\(.*\)/\1/')
--
-- if [ -z "${blsout}" -a -f ${blsdir}/${blsin} ]; then
-- (( fail++ ))
-- echo -------------------------------------------------------------
-- echo -n "FAIL: "
-- printf "%q " "${runme[@]}"; echo
-- diff -U30 /dev/null ${blsdir}/${blsin}
-- elif [ -n "${blsout}" ] && ! cmp ${blsdir}/${blsout} ${cmpdir}/${blsout} >/dev/null ; then
-- (( fail++ ))
-- echo -------------------------------------------------------------
-- echo -n "FAIL: "
-- printf "%q " "${runme[@]}"; echo
-- diff -U30 "${cmpdir}/${blsout}" "${blsdir}/${blsout}"
-- else
-- (( pass++ ))
-- if $opt_verbose; then
-- echo -------------------------------------------------------------
-- echo -n "PASS: "
-- printf "%q " "${runme[@]}"; echo
-- diff -U30 "${cmpdir}/${blsout}" "${blsdir}/${blsout}"
-- fi
-- fi
-- done
--
-- if [ $old_fail -eq $fail ]; then
-- (( pass++ ))
-- if $opt_verbose; then
-- echo -------------------------------------------------------------
-- echo -n "PASS: "
-- printf "%q " "${runme[@]}"; echo
-- "${runme[@]}" 2>&1 | diff -U30 "$cfg" -
-- echo
-- fi
-- fi
--
-- rm -rvf ${blsdir}/ ${cmpdir}/
--}
--
--
- #----------------------------------------------------------------------
- # Main
- #----------------------------------------------------------------------
-@@ -629,15 +533,6 @@ if [ "$testgrub2" == "y" ]; then
- grub2Test grub2.2 add/g2-1.4 --update-kernel=/boot/new-kernel.img \
- --initrd=/boot/new-initrd --boot-filesystem=/boot/
-
-- testing="GRUB2 add bls kernel+initrd"
-- grub2BlsTest \
-- --blspair 6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf,6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf \
-- --blspair ,6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf \
-- --grub2 grub2.15 grub2.15 \
-- --add-kernel=/boot/new-kernel.img \
-- --title=title --initrd=/boot/new-initrd --boot-filesystem=/boot/ \
-- --copy-default
--
- testing="GRUB2 display default index"
- grub2DisplayTest grub2.1 defaultindex/0 --default-index
- grub2DisplayTest grub2.2 defaultindex/0 --default-index
-diff --git a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
-deleted file mode 100644
-index 84b2bdf..0000000
---- a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
-+++ /dev/null
-@@ -1,8 +0,0 @@
--# /boot/org/freedesktop/bls/entries/6a9857a393724b7a981ebb5b8495b9ea-3.8.0-2.fc19.x86_64.conf
--title Fedora 19 (Rawhide)
--version 3.8.0-2.fc19.x86_64
--machine-id 6a9857a393724b7a981ebb5b8495b9ea
--filesystem 6d3376e4-fc93-4509-95ec-a21d68011da2
--linux /boot/vmlinux-3.8.0-2.fc19.x86_64
--options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
--initrd /boot/initrd-3.8.0-2.fc19.x86_64
-diff --git a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf
-deleted file mode 100644
-index e1c61a8..0000000
---- a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf
-+++ /dev/null
-@@ -1,8 +0,0 @@
--# /boot/org/freedesktop/bls/entries/6a9857a393724b7a981ebb5b8495b9ea-3.8.1-2.fc19.x86_64.conf
--title Fedora 19 (Rawhide)
--version 3.8.1-2.fc19.x86_64
--machine-id 6a9857a393724b7a981ebb5b8495b9ea
--filesystem 6d3376e4-fc93-4509-95ec-a21d68011da2
--linux /boot/vmlinux-3.8.1-2.fc19.x86_64
--options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
--initrd /boot/initrd-3.8.1-2.fc19.x86_64
-diff --git a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf
-deleted file mode 100644
-index 4a60fbc..0000000
---- a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf
-+++ /dev/null
-@@ -1,10 +0,0 @@
--# /boot/org/freedesktop/bls/entries/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.0-2.fc19.x86_64.conf
--title Fedora 19 (tboot) (Rawhide)
--version 3.8.0-2.fc19.x86_64
--machine-id 6a9857a393724b7a981ebb5b8495b9ea
--filesystem 6d3376e4-fc93-4509-95ec-a21d68011da2
--multiboot /boot/tboot.gz
-- options logging=serial,vga,memory
--linux /boot/vmlinux-3.8.0-2.fc19.x86_64
--options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
--initrd /boot/initrd-3.8.0-2.fc19.x86_64
-diff --git a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf b/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf
-deleted file mode 100644
-index 34c0e09..0000000
---- a/test/grub2-support_files/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf
-+++ /dev/null
-@@ -1,10 +0,0 @@
--# /boot/org/freedesktop/bls/entries/6a9857a393724b7a981ebb5b8495b9ea-tboot-3.8.1-2.fc19.x86_64.conf
--title Fedora 19 (tboot) (Rawhide)
--version 3.8.1-2.fc19.x86_64
--machine-id 6a9857a393724b7a981ebb5b8495b9ea
--filesystem 6d3376e4-fc93-4509-95ec-a21d68011da2
--multiboot /boot/tboot.gz
-- options logging=serial,vga,memory
--linux /boot/vmlinux-3.8.1-2.fc19.x86_64
--options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2
--initrd /boot/initrd-3.8.1-2.fc19.x86_64
-diff --git a/test/grub2.15 b/test/grub2.15
-deleted file mode 100644
-index 0be2d74..0000000
---- a/test/grub2.15
-+++ /dev/null
-@@ -1,112 +0,0 @@
--#
--# DO NOT EDIT THIS FILE
--#
--# It is automatically generated by grub2-mkconfig using templates
--# from /etc/grub.d and settings from /etc/default/grub
--#
--
--### BEGIN /etc/grub.d/00_header ###
--if [ -s $prefix/grubenv ]; then
-- load_env
--fi
--if [ "${next_entry}" ] ; then
-- set default="${next_entry}"
-- set next_entry=
-- save_env next_entry
-- set boot_once=true
--else
-- set default="${saved_entry}"
--fi
--
--if [ x"${feature_menuentry_id}" = xy ]; then
-- menuentry_id_option="--id"
--else
-- menuentry_id_option=""
--fi
--
--export menuentry_id_option
--
--if [ "${prev_saved_entry}" ]; then
-- set saved_entry="${prev_saved_entry}"
-- save_env saved_entry
-- set prev_saved_entry=
-- save_env prev_saved_entry
-- set boot_once=true
--fi
--
--function savedefault {
-- if [ -z "${boot_once}" ]; then
-- saved_entry="${chosen}"
-- save_env saved_entry
-- fi
--}
--
--function load_video {
-- if [ x$feature_all_video_module = xy ]; then
-- insmod all_video
-- else
-- insmod efi_gop
-- insmod efi_uga
-- insmod ieee1275_fb
-- insmod vbe
-- insmod vga
-- insmod video_bochs
-- insmod video_cirrus
-- fi
--}
--
--if [ x$feature_default_font_path = xy ] ; then
-- font=unicode
--else
--insmod part_gpt
--insmod btrfs
--set root='hd0,gpt4'
--if [ x$feature_platform_search_hint = xy ]; then
-- search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 5a2ca487-30f7-4fa5-96bd-abe38b68ceb3
--else
-- search --no-floppy --fs-uuid --set=root 5a2ca487-30f7-4fa5-96bd-abe38b68ceb3
--fi
-- font="/root/usr/share/grub/unicode.pf2"
--fi
--
--if loadfont $font ; then
-- set gfxmode=auto
-- load_video
-- insmod gfxterm
-- set locale_dir=$prefix/locale
-- set lang=en_US
-- insmod gettext
--fi
--terminal_output gfxterm
--set timeout=5
--### END /etc/grub.d/00_header ###
--
--### BEGIN /etc/grub.d/10_blscfg ###
--
--bls_import
--
--### END /etc/grub.d/10_blscfg ###
--
--### BEGIN /etc/grub.d/20_linux_xen ###
--
--### END /etc/grub.d/20_linux_xen ###
--
--### BEGIN /etc/grub.d/20_ppc_terminfo ###
--### END /etc/grub.d/20_ppc_terminfo ###
--
--### BEGIN /etc/grub.d/30_os-prober ###
--### END /etc/grub.d/30_os-prober ###
--
--### BEGIN /etc/grub.d/40_custom ###
--# This file provides an easy way to add custom menu entries. Simply type the
--# menu entries you want to add after this comment. Be careful not to change
--# the 'exec tail' line above.
--### END /etc/grub.d/40_custom ###
--
--### BEGIN /etc/grub.d/41_custom ###
--if [ -f ${config_directory}/custom.cfg ]; then
-- source ${config_directory}/custom.cfg
--elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
-- source $prefix/custom.cfg;
--fi
--### END /etc/grub.d/41_custom ###
-diff --git a/test/results/grub2.15 b/test/results/grub2.15
-deleted file mode 100644
-index 0be2d74..0000000
---- a/test/results/grub2.15
-+++ /dev/null
-@@ -1,112 +0,0 @@
--#
--# DO NOT EDIT THIS FILE
--#
--# It is automatically generated by grub2-mkconfig using templates
--# from /etc/grub.d and settings from /etc/default/grub
--#
--
--### BEGIN /etc/grub.d/00_header ###
--if [ -s $prefix/grubenv ]; then
-- load_env
--fi
--if [ "${next_entry}" ] ; then
-- set default="${next_entry}"
-- set next_entry=
-- save_env next_entry
-- set boot_once=true
--else
-- set default="${saved_entry}"
--fi
--
--if [ x"${feature_menuentry_id}" = xy ]; then
-- menuentry_id_option="--id"
--else
-- menuentry_id_option=""
--fi
--
--export menuentry_id_option
--
--if [ "${prev_saved_entry}" ]; then
-- set saved_entry="${prev_saved_entry}"
-- save_env saved_entry
-- set prev_saved_entry=
-- save_env prev_saved_entry
-- set boot_once=true
--fi
--
--function savedefault {
-- if [ -z "${boot_once}" ]; then
-- saved_entry="${chosen}"
-- save_env saved_entry
-- fi
--}
--
--function load_video {
-- if [ x$feature_all_video_module = xy ]; then
-- insmod all_video
-- else
-- insmod efi_gop
-- insmod efi_uga
-- insmod ieee1275_fb
-- insmod vbe
-- insmod vga
-- insmod video_bochs
-- insmod video_cirrus
-- fi
--}
--
--if [ x$feature_default_font_path = xy ] ; then
-- font=unicode
--else
--insmod part_gpt
--insmod btrfs
--set root='hd0,gpt4'
--if [ x$feature_platform_search_hint = xy ]; then
-- search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 5a2ca487-30f7-4fa5-96bd-abe38b68ceb3
--else
-- search --no-floppy --fs-uuid --set=root 5a2ca487-30f7-4fa5-96bd-abe38b68ceb3
--fi
-- font="/root/usr/share/grub/unicode.pf2"
--fi
--
--if loadfont $font ; then
-- set gfxmode=auto
-- load_video
-- insmod gfxterm
-- set locale_dir=$prefix/locale
-- set lang=en_US
-- insmod gettext
--fi
--terminal_output gfxterm
--set timeout=5
--### END /etc/grub.d/00_header ###
--
--### BEGIN /etc/grub.d/10_blscfg ###
--
--bls_import
--
--### END /etc/grub.d/10_blscfg ###
--
--### BEGIN /etc/grub.d/20_linux_xen ###
--
--### END /etc/grub.d/20_linux_xen ###
--
--### BEGIN /etc/grub.d/20_ppc_terminfo ###
--### END /etc/grub.d/20_ppc_terminfo ###
--
--### BEGIN /etc/grub.d/30_os-prober ###
--### END /etc/grub.d/30_os-prober ###
--
--### BEGIN /etc/grub.d/40_custom ###
--# This file provides an easy way to add custom menu entries. Simply type the
--# menu entries you want to add after this comment. Be careful not to change
--# the 'exec tail' line above.
--### END /etc/grub.d/40_custom ###
--
--### BEGIN /etc/grub.d/41_custom ###
--if [ -f ${config_directory}/custom.cfg ]; then
-- source ${config_directory}/custom.cfg
--elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
-- source $prefix/custom.cfg;
--fi
--### END /etc/grub.d/41_custom ###
---
-1.9.3
-
diff --git a/0007-Always-error-check-getLineByType.patch b/0007-Always-error-check-getLineByType.patch
deleted file mode 100644
index 2ca4f7a..0000000
--- a/0007-Always-error-check-getLineByType.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e3a293332591f44a190775a3b4dceefe2e5118a1 Mon Sep 17 00:00:00 2001
-From: Peter Jones <pjones(a)redhat.com>
-Date: Thu, 25 Sep 2014 13:24:15 -0400
-Subject: [PATCH 07/10] Always error check getLineByType()
-
-Signed-off-by: Peter Jones <pjones(a)redhat.com>
----
- grubby.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/grubby.c b/grubby.c
-index baf646b..b202b6e 100644
---- a/grubby.c
-+++ b/grubby.c
-@@ -2369,9 +2369,11 @@ void displayEntry(struct singleEntry * entry, const char * prefix, int index) {
- } else {
- char * title;
- line = getLineByType(LT_MENUENTRY, entry->lines);
-- title = grub2ExtractTitle(line);
-- if (title)
-- printf("title=%s\n", title);
-+ if (line) {
-+ title = grub2ExtractTitle(line);
-+ if (title)
-+ printf("title=%s\n", title);
-+ }
- }
-
- for (j = 0, line = entry->lines; line; line = line->next) {
---
-1.9.3
-
diff --git a/0008-Add-devtree-support-to-extlinux-1088933.patch b/0008-Add-devtree-support-to-extlinux-1088933.patch
deleted file mode 100644
index 1dd7ed3..0000000
--- a/0008-Add-devtree-support-to-extlinux-1088933.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From eb141563832f803abdfc1fde83fbfcc9031794b3 Mon Sep 17 00:00:00 2001
-From: Dennis Gilmore <dennis(a)ausil.us>
-Date: Fri, 10 Oct 2014 02:06:52 -0500
-Subject: [PATCH 08/10] Add --devtree support to extlinux (#1088933)
-
-On 32 bit arm it needs the path to the dtb. This adds support for the
-fdt command to the extlinux handling. If --devtree /path/to/dtb/file.dtb
-is passed grubby will add or updated it.
----
- grubby.c | 1 +
- new-kernel-pkg | 20 ++++++++++++++++++--
- test.sh | 5 +++++
- test/extlinux.5 | 21 +++++++++++++++++++++
- test/results/add/extlinux5.1 | 21 +++++++++++++++++++++
- 5 files changed, 66 insertions(+), 2 deletions(-)
- create mode 100644 test/extlinux.5
- create mode 100644 test/results/add/extlinux5.1
-
-diff --git a/grubby.c b/grubby.c
-index b202b6e..cbb1cca 100644
---- a/grubby.c
-+++ b/grubby.c
-@@ -581,6 +581,7 @@ struct keywordTypes extlinuxKeywords[] = {
- { "initrd", LT_INITRD, ' ', ',' },
- { "append", LT_KERNELARGS, ' ' },
- { "prompt", LT_UNKNOWN, ' ' },
-+ { "fdt", LT_DEVTREE, ' ' },
- { NULL, 0, 0 },
- };
- int useextlinuxmenu;
-diff --git a/new-kernel-pkg b/new-kernel-pkg
-index d9a9b67..0f21e39 100755
---- a/new-kernel-pkg
-+++ b/new-kernel-pkg
-@@ -265,7 +265,7 @@ install() {
-
- $grubby --extlinux -c $extlinuxConfig \
- --add-kernel=$kernelImage \
-- $INITRD --copy-default $makedefault --title "$title" \
-+ $DEVTREE $INITRD --copy-default $makedefault --title "$title" \
- ${mbkernel:+--add-multiboot="$mbkernel"} ${mbargs:+--mbargs="$mbargs"} \
- --args="root=$rootdevice $kernargs" --remove-kernel="TITLE=$title"
- else
-@@ -411,6 +411,12 @@ update() {
- fi
- fi
-
-+ DEVTREE=""
-+ if [ "x$devtreefile" != "x" -a -f "$devtreefile" ]; then
-+ [ -n "$verbose" ] && echo "found $devtreefile and using it with grubby"
-+ DEVTREE="--devtree $devtreefile"
-+ fi
-+
- if [ -n "$cfgGrub" ]; then
- [ -n "$verbose" ] && echo "updating $version from $grubConfig"
- $grubby --grub -c $grubConfig \
-@@ -499,7 +505,7 @@ update() {
- [ -n "$verbose" ] && echo "updating $version from $extlinuxConfig"
- $grubby --extlinux -c $extlinuxConfig \
- --update-kernel=$kernelImage \
-- $INITRD \
-+ $DEVTREE $INITRD \
- ${kernargs:+--args="$kernargs"} \
- ${removeargs:+--remove-args="$removeargs"}
- else
-@@ -724,6 +730,16 @@ if [ -z "$initrdfile" ]; then
- fi
- [ -n "$verbose" ] && echo "initrdfile is $initrdfile"
-
-+if [[ ${ARCH} =~ armv[5|7].*l ]]; then
-+ if [ -d "$bootPrefix/dtb-$version/" ]; then
-+ devtreedir="$bootPrefix/dtb-$version/"
-+ if [ -n "$dtbfile" -a -f "$devtreedir/$dtbfile" ]; then
-+ devtreefile="$devtreedir/$dtbfile"
-+ fi
-+ fi
-+fi
-+[ -n "$verbose" ] && echo "devtreedir is $devtreedir"
-+
- # add dracut i18n, keyboard and plymouth kernel args if requested
- if [ -n "$dracut" -o -n "$adddracutargs" ]; then
- if [ -r /etc/vconsole.conf ]; then
-diff --git a/test.sh b/test.sh
-index 864a8ce..67b932d 100755
---- a/test.sh
-+++ b/test.sh
-@@ -647,6 +647,11 @@ extlinuxTest extlinux.2 add/extlinux2.1 --add-kernel=/boot/vmlinuz-3.12.0-2.fc21
- --initrd=/boot/initrd-3.12.0-2.fc21.i686-new.img --boot-filesystem=/boot --copy-default \
- --title="Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)" \
- --remove-kernel="TITLE=Fedora (3.12.0-2.fc21.i686) 20 (Heisenbug)"
-+extlinuxTest extlinux.5 add/extlinux5.1 --add-kernel=/boot/vmlinuz-3.15.0-0.rc1.git4.1.fc21.armv7hl \
-+ --devtree='/boot/dtb-3.15.0-0.rc1.git4.1.fc21.armv7hl/imx6q-cubox-i.dtb' \
-+ --initrd=/boot/initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img --boot-filesystem=/boot --copy-default \
-+ --title="Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)" \
-+ --remove-kernel="TITLE=Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)"
-
- testing="LILO long titles"
- liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \
-diff --git a/test/extlinux.5 b/test/extlinux.5
-new file mode 100644
-index 0000000..30e7572
---- /dev/null
-+++ b/test/extlinux.5
-@@ -0,0 +1,21 @@
-+ui menu.c32
-+
-+menu hidden
-+timeout 50
-+totaltimeout 9000
-+
-+prompt 10
-+default Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)
-+
-+label Fedora (3.15.0-0.rc1.git0.1.fc21.armv7hl) 21 (Rawhide)
-+kernel /vmlinuz-3.15.0-0.rc1.git0.1.fc21.armv7hl
-+fdt /dtb-3.15.0-0.rc1.git0.1.fc21.armv7hl/imx6q-cubox-i.dtb
-+append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
-+initrd /initramfs-3.15.0-0.rc1.git0.1.fc21.armv7hl.img
-+
-+label Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)
-+kernel /vmlinuz-3.12.0-0.fc21.armv7hl
-+fdt /dtb-3.12.0-0.fc21.armv7hl/imx6q-cubox-i.dtb
-+append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
-+initrd /initramfs-3.12.0-0.fc21.armv7hl.img
-+
-diff --git a/test/results/add/extlinux5.1 b/test/results/add/extlinux5.1
-new file mode 100644
-index 0000000..5e97883
---- /dev/null
-+++ b/test/results/add/extlinux5.1
-@@ -0,0 +1,21 @@
-+ui menu.c32
-+
-+menu hidden
-+timeout 50
-+totaltimeout 9000
-+
-+prompt 10
-+default Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)
-+
-+label Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)
-+kernel /vmlinuz-3.15.0-0.rc1.git4.1.fc21.armv7hl
-+fdt /dtb-3.15.0-0.rc1.git4.1.fc21.armv7hl/imx6q-cubox-i.dtb
-+append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
-+initrd /initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img
-+
-+label Fedora (3.15.0-0.rc1.git0.1.fc21.armv7hl) 21 (Rawhide)
-+kernel /vmlinuz-3.15.0-0.rc1.git0.1.fc21.armv7hl
-+fdt /dtb-3.15.0-0.rc1.git0.1.fc21.armv7hl/imx6q-cubox-i.dtb
-+append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
-+initrd /initramfs-3.15.0-0.rc1.git0.1.fc21.armv7hl.img
-+
---
-1.9.3
-
diff --git a/0009-add-support-for-devicetree-directories-for-use-on-ar.patch b/0009-add-support-for-devicetree-directories-for-use-on-ar.patch
deleted file mode 100644
index 0c64014..0000000
--- a/0009-add-support-for-devicetree-directories-for-use-on-ar.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From 69dbfdc99ce993d541984f7305bb1206858f4bcf Mon Sep 17 00:00:00 2001
-From: Dennis Gilmore <dennis(a)ausil.us>
-Date: Fri, 10 Oct 2014 01:38:27 -0500
-Subject: [PATCH 09/10] add support for devicetree directories for use on arm
-
----
- grubby.c | 3 +++
- new-kernel-pkg | 31 ++++++++++++++++++++++++++-----
- test.sh | 5 +++++
- test/extlinux.6 | 21 +++++++++++++++++++++
- test/results/add/extlinux6.1 | 21 +++++++++++++++++++++
- 5 files changed, 76 insertions(+), 5 deletions(-)
- create mode 100644 test/extlinux.6
- create mode 100644 test/results/add/extlinux6.1
-
-diff --git a/grubby.c b/grubby.c
-index cbb1cca..a4a9811 100644
---- a/grubby.c
-+++ b/grubby.c
-@@ -582,6 +582,7 @@ struct keywordTypes extlinuxKeywords[] = {
- { "append", LT_KERNELARGS, ' ' },
- { "prompt", LT_UNKNOWN, ' ' },
- { "fdt", LT_DEVTREE, ' ' },
-+ { "fdtdir", LT_DEVTREE, ' ' },
- { NULL, 0, 0 },
- };
- int useextlinuxmenu;
-@@ -4232,6 +4233,8 @@ int main(int argc, const char ** argv) {
- _("display the title of the default kernel") },
- { "devtree", 0, POPT_ARG_STRING, &newDevTreePath, 0,
- _("device tree file for new stanza"), _("dtb-path") },
-+ { "devtreedir", 0, POPT_ARG_STRING, &newDevTreePath, 0,
-+ _("device tree directory for new stanza"), _("dtb-path") },
- { "elilo", 0, POPT_ARG_NONE, &configureELilo, 0,
- _("configure elilo bootloader") },
- { "efi", 0, POPT_ARG_NONE, &isEfi, 0,
-diff --git a/new-kernel-pkg b/new-kernel-pkg
-index 0f21e39..31976a7 100755
---- a/new-kernel-pkg
-+++ b/new-kernel-pkg
-@@ -128,7 +128,7 @@ usage() {
- echo " [--banner=<banner>] [--multiboot=multiboot]" >&2
- echo " [--mbargs=mbargs] [--make-default] [--add-dracut-args]" >&2
- echo " [--add-plymouth-initrd]" >&2
-- echo " [--host-only] [--devtree=<devicetree.dtb>]" >&2
-+ echo " [--host-only] [--devtree=<devicetree.dtb>] [--devtreedir=</devicetree/path/>]" >&2
- echo " <--install | --remove | --update | --rpmposttrans> <kernel-version>" >&2
- echo " (ex: `basename $0` --mkinitrd --depmod --install 2.4.7-2)" >&2
- exit 1
-@@ -153,11 +153,17 @@ install() {
- fi
-
- DEVTREE=""
-- if [ "x$devtreefile" != "x" -a -f "$devtreefile" ]; then
-+ if [ -n "$devtreefile" -a -f "$devtreefile" ]; then
- [ -n "$verbose" ] && echo "found $devtreefile and using it with grubby"
- DEVTREE="--devtree $devtreefile"
- fi
-
-+ DEVTREEDIR=""
-+ if [ -n "$devtreedir" -a -d "$devtreedir" ]; then
-+ [ -n "$verbose" ] && echo "found $devtreedir and using it with grubby"
-+ DEVTREEDIR="--devtreedir $devtreedir"
-+ fi
-+
- # FIXME: is this a good heuristic to find out if we're on iSeries?
- if [ -d /proc/iSeries ]; then
- [ -n "$verbose" ] && echo "On an iSeries, just making img file"
-@@ -264,7 +270,7 @@ install() {
- [ -n "$verbose" ] && echo "adding $version to $extlinuxConfig"
-
- $grubby --extlinux -c $extlinuxConfig \
-- --add-kernel=$kernelImage \
-+ --add-kernel=$kernelImage $DEVTREEDIR \
- $DEVTREE $INITRD --copy-default $makedefault --title "$title" \
- ${mbkernel:+--add-multiboot="$mbkernel"} ${mbargs:+--mbargs="$mbargs"} \
- --args="root=$rootdevice $kernargs" --remove-kernel="TITLE=$title"
-@@ -412,11 +418,17 @@ update() {
- fi
-
- DEVTREE=""
-- if [ "x$devtreefile" != "x" -a -f "$devtreefile" ]; then
-+ if [ -n "$devtreefile" -a -f "$devtreefile" ]; then
- [ -n "$verbose" ] && echo "found $devtreefile and using it with grubby"
- DEVTREE="--devtree $devtreefile"
- fi
-
-+ DEVTREEDIR=""
-+ if [ -n "$devtreedir" -a -d "$devtreedir" ]; then
-+ [ -n "$verbose" ] && echo "found $devtreedir and using it with grubby"
-+ DEVTREEDIR="--devtreedir $devtreedir"
-+ fi
-+
- if [ -n "$cfgGrub" ]; then
- [ -n "$verbose" ] && echo "updating $version from $grubConfig"
- $grubby --grub -c $grubConfig \
-@@ -505,7 +517,7 @@ update() {
- [ -n "$verbose" ] && echo "updating $version from $extlinuxConfig"
- $grubby --extlinux -c $extlinuxConfig \
- --update-kernel=$kernelImage \
-- $DEVTREE $INITRD \
-+ $DEVTREE $DEVTREEDIR $INITRD \
- ${kernargs:+--args="$kernargs"} \
- ${removeargs:+--remove-args="$removeargs"}
- else
-@@ -566,6 +578,15 @@ while [ $# -gt 0 ]; do
- fi
- ;;
-
-+ --devtreedir*)
-+ if [[ $1 == --devtreedir\=* ]]; then
-+ devtreedir=${1#--devtreedir=}
-+ else
-+ devtreedir=$2
-+ shift
-+ fi
-+ ;;
-+
- --dracut)
- dracut=--dracut
- ;;
-diff --git a/test.sh b/test.sh
-index 67b932d..fe574c3 100755
---- a/test.sh
-+++ b/test.sh
-@@ -652,6 +652,11 @@ extlinuxTest extlinux.5 add/extlinux5.1 --add-kernel=/boot/vmlinuz-3.15.0-0.rc1.
- --initrd=/boot/initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img --boot-filesystem=/boot --copy-default \
- --title="Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)" \
- --remove-kernel="TITLE=Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)"
-+extlinuxTest extlinux.6 add/extlinux6.1 --add-kernel=/boot/vmlinuz-3.15.0-0.rc1.git4.1.fc21.armv7hl \
-+ --devtreedir='/boot/dtb-3.15.0-0.rc1.git4.1.fc21.armv7hl/' \
-+ --initrd=/boot/initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img --boot-filesystem=/boot --copy-default \
-+ --title="Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)" \
-+ --remove-kernel="TITLE=Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)"
-
- testing="LILO long titles"
- liloTest lilo.1 longtitle/l1.1 --add-kernel=/boot/new-kernel.img \
-diff --git a/test/extlinux.6 b/test/extlinux.6
-new file mode 100644
-index 0000000..c28a4a8
---- /dev/null
-+++ b/test/extlinux.6
-@@ -0,0 +1,21 @@
-+ui menu.c32
-+
-+menu hidden
-+timeout 50
-+totaltimeout 9000
-+
-+prompt 10
-+default Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)
-+
-+label Fedora (3.15.0-0.rc1.git0.1.fc21.armv7hl) 21 (Rawhide)
-+kernel /vmlinuz-3.15.0-0.rc1.git0.1.fc21.armv7hl
-+fdtdir /dtb-3.15.0-0.rc1.git0.1.fc21.armv7hl/
-+append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
-+initrd /initramfs-3.15.0-0.rc1.git0.1.fc21.armv7hl.img
-+
-+label Fedora (3.12.0-0.fc21.armv7hl) 21 (Rawhide)
-+kernel /vmlinuz-3.12.0-0.fc21.armv7hl
-+fdtdir /dtb-3.12.0-0.fc21.armv7hl/
-+append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
-+initrd /initramfs-3.12.0-0.fc21.armv7hl.img
-+
-diff --git a/test/results/add/extlinux6.1 b/test/results/add/extlinux6.1
-new file mode 100644
-index 0000000..ec2a2ea
---- /dev/null
-+++ b/test/results/add/extlinux6.1
-@@ -0,0 +1,21 @@
-+ui menu.c32
-+
-+menu hidden
-+timeout 50
-+totaltimeout 9000
-+
-+prompt 10
-+default Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)
-+
-+label Fedora (3.15.0-0.rc1.git4.1.fc21.armv7hl) 21 (Rawhide)
-+kernel /vmlinuz-3.15.0-0.rc1.git4.1.fc21.armv7hl
-+fdtdir /dtb-3.15.0-0.rc1.git4.1.fc21.armv7hl/
-+append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
-+initrd /initramfs-3.15.0-0.rc1.git4.1.fc21.armv7hl.img
-+
-+label Fedora (3.15.0-0.rc1.git0.1.fc21.armv7hl) 21 (Rawhide)
-+kernel /vmlinuz-3.15.0-0.rc1.git0.1.fc21.armv7hl
-+fdtdir /dtb-3.15.0-0.rc1.git0.1.fc21.armv7hl/
-+append console=ttymxc0,115200 root=UUID=7ee85ed8-de4a-4779-8658-2daed0d35e97 ro rhgb quiet LANG=en_US.UTF-8
-+initrd /initramfs-3.15.0-0.rc1.git0.1.fc21.armv7hl.img
-+
---
-1.9.3
-
diff --git a/0010-cleanup-dtb-handling-to-work-in-the-supported-usecas.patch b/0010-cleanup-dtb-handling-to-work-in-the-supported-usecas.patch
deleted file mode 100644
index 1dd031f..0000000
--- a/0010-cleanup-dtb-handling-to-work-in-the-supported-usecas.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 354c873f633db124d214da8a1258e32fe210c7cb Mon Sep 17 00:00:00 2001
-From: Dennis Gilmore <dennis(a)ausil.us>
-Date: Thu, 9 Oct 2014 01:42:03 -0500
-Subject: [PATCH 10/10] cleanup dtb handling to work in the supported usecases
-
-add SHIPSDTB variable in the uboot defaults file that needs to be set to yes for
-platforms like the calxeda highbank that ship a dtb in u-boot that we want to use.
-if the user defines a dtbfile in /etc/sysconfig/uboot update the extlinux.conf
-with an fdt entry otherwise update a fdtdir entry unless SHIPSDTB is set to yes.
----
- new-kernel-pkg | 12 +++++++-----
- uboot | 5 +++++
- 2 files changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/new-kernel-pkg b/new-kernel-pkg
-index 31976a7..311deda 100755
---- a/new-kernel-pkg
-+++ b/new-kernel-pkg
-@@ -752,14 +752,16 @@ fi
- [ -n "$verbose" ] && echo "initrdfile is $initrdfile"
-
- if [[ ${ARCH} =~ armv[5|7].*l ]]; then
-- if [ -d "$bootPrefix/dtb-$version/" ]; then
-- devtreedir="$bootPrefix/dtb-$version/"
-- if [ -n "$dtbfile" -a -f "$devtreedir/$dtbfile" ]; then
-- devtreefile="$devtreedir/$dtbfile"
-+ if [ -z "$SHIPSDTB" -o "$SHIPSDTB" != "yes" ]; then
-+ if [ -n "$dtbfile" -a -f "$bootPrefix/dtb-$version/$dtbfile" ]; then
-+ devtreefile="$bootPrefix/dtb-$version/$dtbfile"
-+ [ -n "$verbose" ] && echo "devtreefile is $devtreefile"
-+ elif [ -d "$bootPrefix/dtb-$version/" ]; then
-+ devtreedir="$bootPrefix/dtb-$version/"
-+ [ -n "$verbose" ] && echo "devtreedir is $devtreedir"
- fi
- fi
- fi
--[ -n "$verbose" ] && echo "devtreedir is $devtreedir"
-
- # add dracut i18n, keyboard and plymouth kernel args if requested
- if [ -n "$dracut" -o -n "$adddracutargs" ]; then
-diff --git a/uboot b/uboot
-index aa663ad..07d8671 100644
---- a/uboot
-+++ b/uboot
-@@ -36,3 +36,8 @@
- # default initrd uInitrd file name
- #UBOOT_UINITRD=uInitrd
-
-+# defualt for platform shipping an onboard dtb.
-+#SHIPSDTB=no
-+
-+# option to tell new-kernel-pkg a specific dtb file to load in extlinux.conf
-+#dtbfile=foo.dtb
---
-1.9.3
-
diff --git a/drop-uboot-uImage-creation.patch b/drop-uboot-uImage-creation.patch
new file mode 100644
index 0000000..ee611f9
--- /dev/null
+++ b/drop-uboot-uImage-creation.patch
@@ -0,0 +1,232 @@
+From 3689d4cebedf115e41c192bf034b6f86fcb80acb Mon Sep 17 00:00:00 2001
+From: Dennis Gilmore <dennis(a)ausil.us>
+Date: Wed, 30 Aug 2017 14:03:45 -0500
+Subject: [PATCH] remove the old crufty u-boot support
+
+Fedora has only supported extlinux.conf for a few releases now
+as a result it should be the only way we boot systems. Remove
+the no longer needed uboot file
+
+Signed-off-by: Dennis Gilmore <dennis(a)ausil.us>
+---
+ new-kernel-pkg | 116 ---------------------------------------------------------
+ uboot | 43 ---------------------
+ 2 files changed, 159 deletions(-)
+ delete mode 100644 uboot
+
+diff --git a/new-kernel-pkg b/new-kernel-pkg
+index 64225de..0fe6caa 100755
+--- a/new-kernel-pkg
++++ b/new-kernel-pkg
+@@ -37,7 +37,6 @@ else
+ fi
+
+ [ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
+-[ -f /etc/sysconfig/uboot ] && . /etc/sysconfig/uboot
+
+ cfgGrub2=""
+ cfgGrub2Efi=""
+@@ -50,7 +49,6 @@ grubConfig=""
+ grub2Config=""
+ grub2EfiConfig=""
+ extlinuxConfig=""
+-ubootScript="/boot/boot.scr"
+
+ ARCH=$(uname -m)
+
+@@ -84,13 +82,6 @@ elif [[ ${ARCH} =~ armv[5|7].*l ]] ; then
+ liloConfig=""
+ bootPrefix=/boot
+ extlinuxConfig=$(readlink -f /etc/extlinux.conf 2>/dev/null)
+- ubootDir=${UBOOT_DIR:-"/boot"}
+- ubootScript=$ubootDir/${UBOOT_SCR:-"boot.scr"}
+- ubootKList=${UBOOT_KLIST:-"klist.txt"}
+- ubootDevice=/dev/${UBOOT_DEVICE:-"mmcblk0p1"}
+- ubootDefaultImage=${UBOOT_UIMAGE:-"uImage"}
+- ubootDefaultInitrd=${UBOOT_UINITRD:-"uInitrd"}
+- ubootAddress=${UBOOT_IMGADDR:-"0x00008000"}
+ mounted=""
+ liloFlag=""
+ isx86=""
+@@ -386,53 +377,6 @@ remove() {
+ [ -n "$verbose" ] && echo "$liloConfig does not exist, not running grubby"
+ fi
+
+- if [ -n "$cfguBoot" ]; then
+- [ -n "$verbose" ] && echo "removing $version from $ubootDir..."
+-
+- if [ -f $ubootDir/$ubootKList ]; then
+- tmpKList=`mktemp $ubootDir/$ubootKList.XXXX`
+- curversion=`tail -n1 $ubootDir/$ubootKList`
+- sed "/$version$/d" $ubootDir/$ubootKList > $tmpKList
+- newversion=`tail -n1 $tmpKList`
+- if [ -f $ubootDir/uImage-$newversion ] && [ -f $ubootDir/uInitrd-$newversion ]; then
+- if [ "$curversion" != "$newversion" ]; then
+- cp -fp $ubootDir/uImage-$newversion $ubootDir/${ubootDefaultImage}
+- if [ $? -ne 0 ]; then
+- [ -n "$verbose" ] && echo "copy uImage-$newversion error, default kernel not replaced!" && exit
+- fi
+- cp -fp $ubootDir/uInitrd-$newversion $ubootDir/${ubootDefaultInitrd}
+- if [ $? -ne 0 ]; then
+- [ -n "$verbose" ] && echo "copy uInitrd-$newversion error, default Initrd not replaced!" && exit
+- fi
+- fi
+-
+- [ -n "$verbose" ] && echo "removing uImage-$version"
+- if [ -f $ubootDir/uImage-$version ]; then
+- rm -f $ubootDir/uImage-$version
+- else
+- [ -n "$verbose" ] && echo "uImage-$version did not exist!"
+- fi
+-
+- [ -n "$verbose" ] && echo "removing uInitrd-$version"
+- if [ -f $ubootDir/uInitrd-$version ]; then
+- rm -f $ubootDir/uInitrd-$version
+- else
+- [ -n "$verbose" ] && echo "uInitrd-$version did not exist!"
+- fi
+-
+- mv $tmpKList $ubootDir/$ubootKList
+- [ -x /sbin/a-b-c ] && /sbin/a-b-c
+- else
+- [ -n "$verbose" ] && echo "uImage $newversion does not exist!"
+- [ -f $tmpKList ] && rm -f $tmpKList
+- fi
+- else
+- [ -n "$verbose" ] && echo "No previous kernel version. U-Boot images not removed!"
+- fi
+- else
+- [ -n "$verbose" ] && echo "$ubootScript does not exist, not modifying $ubootDir"
+- fi
+-
+ if [ -n "$cfgExtlinux" ]; then
+ [ -n "$verbose" ] && echo "removing $version from $extlinuxConfig"
+ $grubby --extlinux -c $extlinuxConfig \
+@@ -534,36 +478,6 @@ update() {
+ [ -n "$verbose" ] && echo "$liloConfig does not exist, not running grubby"
+ fi
+
+- if [ -n "$cfguBoot" ]; then
+- [ -n "$verbose" ] && echo "adding $version to $ubootDir..."
+-
+- [ -n "$verbose" ] && echo "creating uImage-$version"
+- mkimage -A arm -O linux -T kernel -C none -a $ubootAddress \
+- -e $ubootAddress -n $version \
+- -d $kernelImage $ubootDir/uImage-$version
+-
+- [ -n "$verbose" ] && echo "creating uInitrd-$version"
+- mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 \
+- -n initramfs -d $initrdfile $ubootDir/uInitrd-$version
+-
+- if [ -f $ubootDir/uImage-$version ] && [ -f $ubootDir/uInitrd-$version ]; then
+- cp -fp $ubootDir/uImage-$version $ubootDir/${ubootDefaultImage}
+- if [ $? -ne 0 ]; then
+- [ -n "$verbose" ] && echo "copy uImage-$version error, kernel not installed!" && exit
+- fi
+- cp -fp $ubootDir/uInitrd-$version $ubootDir/${ubootDefaultInitrd}
+- if [ $? -ne 0 ]; then
+- [ -n "$verbose" ] && echo "copy uInitrd-$version error, kernel not installed!" && exit
+- fi
+- echo $version >> $ubootDir/$ubootKList
+- [ -x /sbin/a-b-c ] && /sbin/a-b-c
+- else
+- [ -n "$verbose" ] && echo "cannot make $version the default"
+- fi
+- else
+- [ -n "$verbose" ] && echo "$ubootScript does not exist, not setting up $ubootDir"
+- fi
+-
+ if [ -n "$cfgExtlinux" ]; then
+ [ -n "$verbose" ] && echo "updating $version from $extlinuxConfig"
+ ARGS="--extlinux -c $extlinuxConfig --update-kernel=$kernelImage \
+@@ -874,33 +788,6 @@ fi
+ [ -n "$liloConfig" ] && [ -f "$liloConfig" ] && cfgLilo=1;
+ [ -n "$extlinuxConfig" ] && [ -f "$extlinuxConfig" ] && cfgExtlinux=1;
+
+-# if we have a U-Boot directory, but no boot script, check if the directory
+-# is mounted. If not, mount it, and then check if a boot script exists.
+-if [ -n "$ubootDir" ]; then
+- if [ -f "$ubootScript" ]; then
+- cfguBoot=1
+- else
+- mountEntry=`mount | grep $ubootDir`
+- if [ -z "$mountEntry" ]; then
+- mount $ubootDevice $ubootDir
+- mounted=1
+- fi
+- [ -f "$ubootScript" ] && cfguBoot=1;
+- fi
+-fi
+-
+-# if we're using U-Boot, check if the default load address should change
+-if [ -n "$cfguBoot" -a -z "$UBOOT_IMGADDR" ]; then
+- [[ $version =~ .([^.]*)$ ]]
+- platform=${BASH_REMATCH[1]}
+- # A few platforms use an alternate kernel load address
+- if [ "$platform" = "omap" ]; then
+- ubootAddress=0x80008000
+- elif [ "$platform" = "imx" ]; then
+- ubootAddress=0x90008000
+- fi
+-fi
+-
+ # if we have a lilo config on an x86 box, see if the default boot loader
+ # is lilo to determine if it should be run
+ if [ -n "$cfgLilo" -a -n "$isx86" ]; then
+@@ -920,7 +807,4 @@ elif [ "$mode" == "--rpmposttrans" ]; then
+ rpmposttrans
+ fi
+
+-# if we mounted the U-Boot directory, unmount it.
+-[ -n "$mounted" ] && umount $ubootDir
+-
+ exit 0
+diff --git a/uboot b/uboot
+deleted file mode 100644
+index 07d8671..0000000
+--- a/uboot
++++ /dev/null
+@@ -1,43 +0,0 @@
+-# Settings for uBoot setup in /sbin/new-kernel-pkg
+-#
+-# Default values are provided below (as comments)
+-#
+-# WARNING: These values affect where grubby installs and removes
+-# uBoot kernel images. Changing these _after_ kernels have
+-# been installed may cause removing a kernel image to fail.
+-
+-# directory where uBoot images and scripts are found
+-#UBOOT_DIR=/boot
+-
+-# Override the load address when running mkimage on the kernel.
+-# OMAP such as Beagleboard and Pandaboard: Use 0x80008000
+-# Tegra such as Trimslice: Use 0x00008000
+-# IMX such as Efika mx51 smarttop: Use 0x90008000
+-# Kirkwood such as Dreamplug, Guruplug, Sheevaplug: Use 0x00008000
+-# If left undefined grubby will use defults for Tegra or OMAP depending
+-# upon the contents of /proc/cpuinfo.
+-#UBOOT_IMGADDR=0x0x00008000
+-
+-# name of the text file containing the list of installed kernel versions
+-# NOTE: The versions are in order of installation. The last entry should
+-# always be the default boot kernel version.
+-#UBOOT_KLIST=klist.txt
+-
+-# device partition where uBoot images reside; mounted on $UBOOT_DIR
+-#UBOOT_DEVICE=mmcblk0p1
+-
+-
+-# NOTE: Both of the following files are automatically overwritte
+-# when a kernel package is installed or removed.
+-
+-# default kernel uImage file name
+-#UBOOT_UIMAGE=uImage
+-
+-# default initrd uInitrd file name
+-#UBOOT_UINITRD=uInitrd
+-
+-# defualt for platform shipping an onboard dtb.
+-#SHIPSDTB=no
+-
+-# option to tell new-kernel-pkg a specific dtb file to load in extlinux.conf
+-#dtbfile=foo.dtb
diff --git a/grubby.spec b/grubby.spec
index 924eacd..128d537 100644
--- a/grubby.spec
+++ b/grubby.spec
@@ -1,8 +1,7 @@
Name: grubby
Version: 8.40
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Command line tool for updating bootloader configs
-Group: System Environment/Base
License: GPLv2+
URL: https://github.com/rhinstaller/grubby
# we only pull git snaps at the moment
@@ -10,22 +9,19 @@ URL: https://github.com/rhinstaller/grubby
# git archive --format=tar --prefix=grubby-%%{version}/ HEAD |bzip2 > grubby-%%{version}.tar.bz2
# Source0: %%{name}-%%{version}.tar.bz2
Source0: https://github.com/rhboot/grubby/archive/%{version}-1.tar.gz
+Patch1: drop-uboot-uImage-creation.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig glib2-devel popt-devel
-BuildRequires: libblkid-devel git
+BuildRequires: libblkid-devel git-core
# for make test / getopt:
BuildRequires: util-linux-ng
-%ifarch aarch64 i686 x86_64 ppc ppc64
+%ifarch aarch64 i686 x86_64 %{power64}
BuildRequires: grub2-tools-minimal
Requires: grub2-tools-minimal
%endif
%ifarch s390 s390x
Requires: s390utils-base
%endif
-%ifarch %{arm}
-Requires: uboot-tools
-%endif
%description
grubby is a command line tool for updating and displaying information about
@@ -55,32 +51,21 @@ make test
%endif
%install
-rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT mandir=%{_mandir}
-%ifarch %{arm}
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/
-install -p uboot $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/uboot
-mkdir -p $RPM_BUILD_ROOT/boot
-echo " " >> $RPM_BUILD_ROOT/boot/boot.scr
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license COPYING
/sbin/installkernel
/sbin/new-kernel-pkg
/sbin/grubby
%{_mandir}/man8/*.8*
-%ifarch %{arm}
-%config(noreplace) %{_sysconfdir}/sysconfig/uboot
-%config(noreplace) /boot/boot.scr
-%endif
%changelog
+* Wed Jan 24 2018 Peter Robinson <pbrobinson(a)fedoraproject.org> 8.40-8
+- Drop u-boot uImage generation on ARMv7
+- Minor cleanups
+
* Tue Sep 12 2017 Peter Jones <pjones(a)redhat.com> - 8.40-7
- Explicitly require grub2-tools on platforms that need grub2-editenv
- Minor packaging cleanups
6 years, 2 months
Architecture specific change in rpms/ghc.git
by githook-noreply@fedoraproject.org
The package rpms/ghc.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/ghc.git/commit/?id=f54dabd8b34b1d....
Change:
+%ifnarch s390 s390x %{mips}
Thanks.
Full change:
============
commit f54dabd8b34b1d7367de5a415cc46a72cece192f
Author: Jens Petersen <petersen(a)redhat.com>
Date: Wed Jan 24 00:12:56 2018 +0100
update to 8.2.2: backport from fedora-haskell/ghc
bootstrap build
diff --git a/.gitignore b/.gitignore
index bd8cf43..71eaaa4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@ testsuite-6.12.3.tar.bz2
/ghc-8.0.2-testsuite.tar.xz
/ghc-8.0.2-src.tar.xz
/ghc-8.0.2/
+/ghc-8.2.2-src.tar.xz
diff --git a/ghc-7.8.3-Cabal-install-PATH-warning.patch b/ghc-7.8.3-Cabal-install-PATH-warning.patch
deleted file mode 100644
index e7ef6e1..0000000
--- a/ghc-7.8.3-Cabal-install-PATH-warning.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- ghc-7.8.3/libraries/Cabal/Cabal/Distribution/Simple/Install.hs~ 2014-07-10 13:34:21.000000000 +0900
-+++ ghc-7.8.3/libraries/Cabal/Cabal/Distribution/Simple/Install.hs 2014-08-29 16:48:12.621694879 +0900
-@@ -148,8 +148,7 @@
- notice verbosity ("Installing executable(s) in " ++ binPref)
- inPath <- isInSearchPath binPref
- when (not inPath) $
-- warn verbosity ("The directory " ++ binPref
-- ++ " is not in the system search path.")
-+ warn verbosity ("Executable installed in " ++ binPref)
-
- -- install include files for all compilers - they may be needed to compile
- -- haskell files (using the CPP extension)
diff --git a/ghc-8.0.2-Cabal-dynlibdir.patch b/ghc-8.0.2-Cabal-dynlibdir.patch
deleted file mode 100644
index 3f55fa3..0000000
--- a/ghc-8.0.2-Cabal-dynlibdir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- ghc-8.0.1.20161117/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs~ 2016-11-18 07:08:46.000000000 +0900
-+++ ghc-8.0.1.20161117/libraries/Cabal/Cabal/Distribution/Simple/InstallDirs.hs 2016-12-07 18:19:02.670468156 +0900
-@@ -186,7 +186,7 @@
- JHC -> "$compiler"
- LHC -> "$compiler"
- UHC -> "$pkgid"
-- _other -> "$abi",
-+ _other -> "$compiler/$pkgkey",
- libexecdir = case buildOS of
- Windows -> "$prefix" </> "$libname"
- _other -> "$prefix" </> "libexec",
diff --git a/ghc-Cabal-install-PATH-warning.patch b/ghc-Cabal-install-PATH-warning.patch
new file mode 100644
index 0000000..5081fa1
--- /dev/null
+++ b/ghc-Cabal-install-PATH-warning.patch
@@ -0,0 +1,20 @@
+--- ghc-8.2.2/libraries/Cabal/Cabal/Distribution/Simple/Install.hs~ 2017-05-05 16:51:43.000000000 +0200
++++ ghc-8.2.2/libraries/Cabal/Cabal/Distribution/Simple/Install.hs 2018-01-23 23:05:47.047081056 +0100
+@@ -36,7 +36,7 @@
+ import Distribution.Simple.Utils
+ ( createDirectoryIfMissingVerbose
+ , installDirectoryContents, installOrdinaryFile, isInSearchPath
+- , die', info, noticeNoWrap, warn, matchDirFileGlob )
++ , die', info, noticeNoWrap, warn, matchDirFileGlob, debug )
+ import Distribution.Simple.Compiler
+ ( CompilerFlavor(..), compilerFlavor )
+ import Distribution.Simple.Setup
+@@ -215,7 +215,7 @@
+ ++ " in " ++ binPref)
+ inPath <- isInSearchPath binPref
+ when (not inPath) $
+- warn verbosity ("The directory " ++ binPref
++ debug verbosity ("The directory " ++ binPref
+ ++ " is not in the system search path.")
+ case compilerFlavor (compiler lbi) of
+ GHC -> GHC.installExe verbosity lbi binPref buildPref progFix pkg_descr exe
diff --git a/ghc-Debian-osdecommitmemory-compat.patch b/ghc-Debian-osdecommitmemory-compat.patch
deleted file mode 100644
index 2c84d94..0000000
--- a/ghc-Debian-osdecommitmemory-compat.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Description: rts: Ensure we always give MADV_DONTNEED a chance in osDecommitMemory
-Author: Ben Gamari <bgamari.foss(a)gmail.com>
-Origin: upstream, https://phabricator.haskell.org/D2780
-Bug: https://ghc.haskell.org/trac/ghc/ticket/12865
-Bug-Debian: https://bugs.debian.org/847677
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
-Index: ghc-8.0.2/rts/posix/OSMem.c
-===================================================================
---- ghc-8.0.2.orig/rts/posix/OSMem.c
-+++ ghc-8.0.2/rts/posix/OSMem.c
-@@ -522,11 +522,24 @@
-
- #ifdef MADV_FREE
- // Try MADV_FREE first, FreeBSD has both and MADV_DONTNEED
-- // just swaps memory out
-+ // just swaps memory out. Linux >= 4.5 has both DONTNEED and FREE; either
-+ // will work as they both allow the system to free anonymous pages.
-+ // It is important that we try both methods as the kernel which we were
-+ // built on may differ from the kernel we are now running on.
- r = madvise(at, size, MADV_FREE);
--#else
-- r = madvise(at, size, MADV_DONTNEED);
-+ if(r < 0) {
-+ if (errno == EINVAL) {
-+ // Perhaps the system doesn't support MADV_FREE; fall-through and
-+ // try MADV_DONTNEED.
-+ } else {
-+ sysErrorBelch("unable to decommit memory");
-+ }
-+ } else {
-+ return;
-+ }
- #endif
-+
-+ r = madvise(at, size, MADV_DONTNEED);
- if(r < 0)
- sysErrorBelch("unable to decommit memory");
- }
diff --git a/ghc.spec b/ghc.spec
index be3e7e2..91e2c66 100644
--- a/ghc.spec
+++ b/ghc.spec
@@ -1,61 +1,67 @@
-# To bootstrap build a new version of ghc, uncomment the following:
-#%%global ghc_bootstrapping 1
+# To bootstrap build a new version of ghc, comment out this line:
+#%%global perf_build 1
-%if %{defined ghc_bootstrapping}
-%global without_testsuite 1
-%global without_prof 1
+# to handle RCs
+%global ghc_release 8.2.2
+
+%if %{undefined perf_build}
+%bcond_with testsuite
+%bcond_with prof
%{?ghc_bootstrap}
### uncomment to generate haddocks for bootstrap
#%%undefine without_haddock
+%else
+%bcond_without testsuite
+%bcond_without prof
%endif
Name: ghc
# ghc must be rebuilt after a version bump to avoid ABI change problems
-Version: 8.0.2
+Version: 8.2.2
# Since library subpackages are versioned:
# - release can only be reset if *all* library versions get bumped simultaneously
# (sometimes after a major release)
# - minor release numbers for a branch should be incremented monotonically
-# xhtml has not had a new release for some years
-Release: 60%{?dist}
+Release: 61%{?dist}
Summary: Glasgow Haskell Compiler
License: BSD and HaskellReport
URL: https://haskell.org/ghc/
-Source0: https://downloads.haskell.org/~ghc/%{version}/ghc-%{version}-src.tar.xz
-%if %{undefined without_testsuite}
-Source1: https://downloads.haskell.org/~ghc/%{version}/ghc-%{version}-testsuite.ta...
+Source0: https://downloads.haskell.org/~ghc/%{ghc_release}/ghc-%{version}-src.tar.xz
+%if %{with testsuite}
+Source1: https://downloads.haskell.org/~ghc/%{ghc_release}/ghc-%{version}-testsuit...
%endif
Source3: ghc-doc-index.cron
Source4: ghc-doc-index
# absolute haddock path (was for html/libraries -> libraries)
Patch1: ghc-gen_contents_index-haddock-path.patch
-Patch2: ghc-7.8.3-Cabal-install-PATH-warning.patch
-Patch3: ghc-8.0.2-Cabal-dynlibdir.patch
+Patch2: ghc-Cabal-install-PATH-warning.patch
+# https://github.com/haskell/cabal/issues/4728
+Patch4: https://gist.githubusercontent.com/expipiplus1/6720ebc3db90f36031d651ca2e...
Patch12: ghc-armv7-VFPv3D16--NEON.patch
# Debian patches:
-Patch24: ghc-Debian-buildpath-abi-stability.patch
+# doesn't apply to 8.2
+#Patch24: ghc-Debian-buildpath-abi-stability.patch
Patch26: ghc-Debian-no-missing-haddock-file-warning.patch
Patch27: ghc-Debian-reproducible-tmp-names.patch
Patch28: ghc-Debian-x32-use-native-x86_64-insn.patch
-Patch29: ghc-Debian-osdecommitmemory-compat.patch
-# 8.0 needs llvm-3.7
-%global llvm_major 3.7
+# 8.2 needs llvm-3.9
+%global llvm_major 3.9
# fedora ghc has been bootstrapped on
# %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64
# and retired arches: alpha sparcv9 armv5tel
# see also deprecated ghc_arches defined in /etc/rpm/macros.ghc-srpm by redhat-rpm-macros
-%if %{undefined ghc_bootstrapping}
+%if %{defined perf_build}
BuildRequires: ghc-compiler = %{version}
# for ABI hash checking
BuildRequires: ghc = %{version}
%endif
-BuildRequires: ghc-rpm-macros-extra >= 1.6.15
+BuildRequires: ghc-rpm-macros-extra >= 1.8
BuildRequires: ghc-binary-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
@@ -68,11 +74,11 @@ BuildRequires: libffi-devel
BuildRequires: ncurses-devel
# for man and docs
BuildRequires: perl-interpreter
-%if %{undefined without_testsuite}
-BuildRequires: python2
+%if %{with testsuite}
+BuildRequires: python3
%endif
%if %{undefined without_manual}
-BuildRequires: python2-sphinx
+BuildRequires: python3-sphinx
%endif
%ifarch armv7hl aarch64
BuildRequires: llvm%{llvm_major}
@@ -166,34 +172,35 @@ documention.
# use "./libraries-versions.sh" to check versions
%if %{defined ghclibdir}
-%ghc_lib_subpackage -d -l BSD Cabal-1.24.2.0
-%ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.1.1
-%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-4.9.1.0
-%ghc_lib_subpackage -d -l BSD binary-0.8.3.0
-%ghc_lib_subpackage -d -l BSD bytestring-0.10.8.1
-%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.5.7.1
-%ghc_lib_subpackage -d -l %BSDHaskellReport deepseq-1.4.2.0
-%ghc_lib_subpackage -d -l %BSDHaskellReport directory-1.3.0.0
-%ghc_lib_subpackage -d -l BSD filepath-1.4.1.1
+%ghc_lib_subpackage -d -l BSD Cabal-2.0.1.0
+%ghc_lib_subpackage -d -l %BSDHaskellReport array-0.5.2.0
+%ghc_lib_subpackage -d -l %BSDHaskellReport -c gmp-devel%{?_isa},libffi-devel%{?_isa} base-4.10.1.0
+%ghc_lib_subpackage -d -l BSD binary-0.8.5.1
+%ghc_lib_subpackage -d -l BSD bytestring-0.10.8.2
+%ghc_lib_subpackage -d -l %BSDHaskellReport containers-0.5.10.2
+%ghc_lib_subpackage -d -l %BSDHaskellReport deepseq-1.4.3.0
+%ghc_lib_subpackage -d -l %BSDHaskellReport directory-1.3.0.2
+%ghc_lib_subpackage -d -l BSD filepath-1.4.1.2
%define ghc_pkg_obsoletes ghc-bin-package-db-devel < 0.0.0.0-12
# in ghc not ghc-libraries:
%ghc_lib_subpackage -d -x ghc-%{ghc_version_override}
%undefine ghc_pkg_obsoletes
%ghc_lib_subpackage -d -x -l BSD ghc-boot-%{ghc_version_override}
%ghc_lib_subpackage -d -l BSD ghc-boot-th-%{ghc_version_override}
-%ghc_lib_subpackage -d -x -l BSD ghci-%{ghc_version_override}
-%ghc_lib_subpackage -d -l BSD haskeline-0.7.3.0
-%ghc_lib_subpackage -d -l BSD hoopl-3.10.2.1
+%ghc_lib_subpackage -d -l BSD ghc-compact-0.1.0.0
+%ghc_lib_subpackage -d -l BSD -x ghci-%{ghc_version_override}
+%ghc_lib_subpackage -d -l BSD haskeline-0.7.4.0
+%ghc_lib_subpackage -d -l BSD hoopl-3.10.2.2
%ghc_lib_subpackage -d -l BSD hpc-0.6.0.3
%ghc_lib_subpackage -d -l BSD pretty-1.1.3.3
-%ghc_lib_subpackage -d -l %BSDHaskellReport process-1.4.3.0
-%ghc_lib_subpackage -d -l BSD template-haskell-2.11.1.0
-%ghc_lib_subpackage -d -l BSD -c ncurses-devel%{?_isa} terminfo-0.4.0.2
-%ghc_lib_subpackage -d -l BSD time-1.6.0.1
+%ghc_lib_subpackage -d -l %BSDHaskellReport process-1.6.1.0
+%ghc_lib_subpackage -d -l BSD template-haskell-2.12.0.0
+%ghc_lib_subpackage -d -l BSD -c ncurses-devel%{?_isa} terminfo-0.4.1.0
+%ghc_lib_subpackage -d -l BSD time-1.8.0.2
%ghc_lib_subpackage -d -l BSD transformers-0.5.2.0
-%ghc_lib_subpackage -d -l BSD unix-2.7.2.1
+%ghc_lib_subpackage -d -l BSD unix-2.7.2.2
%if %{undefined without_haddock}
-%ghc_lib_subpackage -d -l BSD xhtml-3000.2.1
+%ghc_lib_subpackage -d -l BSD xhtml-3000.2.2
%endif
%endif
@@ -217,12 +224,12 @@ except the ghc library, which is installed by the toplevel ghc metapackage.
%prep
-%setup -q -n %{name}-%{version} %{!?without_testsuite:-b1}
+%setup -q -n %{name}-%{version} %{?with_testsuite:-b1}
%patch1 -p1 -b .orig
%patch2 -p1 -b .orig
-%patch3 -p1 -b .orig
+%patch4 -p1 -b .orig
%if 0%{?fedora} || 0%{?rhel} > 6
rm -r libffi-tarballs
@@ -232,11 +239,10 @@ rm -r libffi-tarballs
%patch12 -p1 -b .orig
%endif
-%patch24 -p1 -b .orig
+#%%patch24 -p1 -b .orig
%patch26 -p1 -b .orig
%patch27 -p1 -b .orig
%patch28 -p1 -b .orig
-%patch29 -p1 -b .orig
%global gen_contents_index gen_contents_index.orig
%if %{undefined without_haddock}
@@ -251,7 +257,7 @@ fi
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
# cf https://github.com/gentoo-haskell/gentoo-haskell/tree/master/dev-lang/ghc
cat > mk/build.mk << EOF
-%if %{undefined ghc_bootstrapping}
+%if %{defined perf_build}
%ifarch armv7hl aarch64
BuildFlavour = perf-llvm
%else
@@ -264,7 +270,7 @@ BuildFlavour = quick-llvm
BuildFlavour = quick
%endif
%endif
-GhcLibWays = v dyn %{!?without_prof:p}
+GhcLibWays = v dyn %{?with_prof:p}
%if %{defined without_haddock}
HADDOCK_DOCS = NO
%endif
@@ -286,29 +292,27 @@ EOF
autoreconf
%endif
-# still happens when bootstrapping 8.0 with 7.10:
-# x86_64: /usr/bin/ld: utils/ghc-pwd/dist-boot/Main.o: relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
-# aarch64: /usr/bin/ld: /usr/lib64/ghc-7.6.3/libHSrts.a(RtsFlags.o)(.text+0x578): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stdout@(a)GLIBC_2.17'
-%ifarch x86_64 armv7hl aarch64 s390x ppc64 ppc64le
-%global _hardened_ldflags %{nil}
-%endif
-
-%ifnarch aarch64 ppc64 ppc64le
-export CFLAGS="${CFLAGS:-%optflags}"
+%if 0%{?fedora} > 28
+%ghc_set_cflags
%else
-%if %{undefined ghc_bootstrapping}
-export CFLAGS="${CFLAGS:-%optflags}"
+# -Wunused-label is extremely noisy
+%ifarch aarch64 s390x
+CFLAGS="${CFLAGS:-$(echo %optflags | sed -e 's/-Wall -Werror=format-security //')}"
+%else
+CFLAGS="${CFLAGS:-%optflags}"
%endif
+export CFLAGS
%endif
export LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"
+# for ghc-8.2
+export CC=%{_bindir}/gcc
# * %%configure induces cross-build due to different target/host/build platform names
-# * --with-gcc=%{_bindir}/gcc is to avoid ccache hardcoding problem when bootstrapping
./configure --prefix=%{_prefix} --exec-prefix=%{_exec_prefix} \
--bindir=%{_bindir} --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir} --includedir=%{_includedir} --libdir=%{_libdir} \
--libexecdir=%{_libexecdir} --localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \
- --with-gcc=%{_bindir}/gcc --docdir=%{_docdir}/ghc \
+ --docdir=%{_docdir}/ghc \
--with-llc=%{_bindir}/llc-%{llvm_major} --with-opt=%{_bindir}/opt-%{llvm_major} \
%if 0%{?fedora} || 0%{?rhel} > 6
--with-system-libffi \
@@ -323,41 +327,59 @@ make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install
+mv %{buildroot}%{ghclibdir}/*/libHS*ghc%{ghc_version}.so %{buildroot}%{_libdir}/
+for i in $(find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \; -print); do
+ chrpath -d $i
+done
+
+for i in %{buildroot}%{ghclibdir}/package.conf.d/*.conf; do
+ sed -i -e 's!^dynamic-library-dirs: .*!dynamic-library-dirs: %{_libdir}!' $i
+done
+
for i in %{ghc_packages_list}; do
name=$(echo $i | sed -e "s/\(.*\)-.*/\1/")
ver=$(echo $i | sed -e "s/.*-\(.*\)/\1/")
%ghc_gen_filelists $name $ver
+%if 0%{?rhel} && 0%{?rhel} < 8
+echo "%%doc libraries/$name/LICENSE" >> ghc-$name.files
+%else
echo "%%license libraries/$name/LICENSE" >> ghc-$name.files
+%endif
done
# ghc-base should own ghclibdir
-echo "%%dir %{ghclibdir}" >> ghc-base.files
+echo "%%dir %{ghclibdir}" >> ghc-base-devel.files
%ghc_gen_filelists ghc-boot %{ghc_version_override}
%ghc_gen_filelists ghc %{ghc_version_override}
%ghc_gen_filelists ghci %{ghc_version_override}
-%ghc_gen_filelists ghc-prim 0.5.0.0
-%ghc_gen_filelists integer-gmp 1.0.0.1
+%ghc_gen_filelists ghc-prim 0.5.1.1
+%ghc_gen_filelists integer-gmp 1.0.1.0
%define merge_filelist()\
cat ghc-%1.files >> ghc-%2.files\
cat ghc-%1-devel.files >> ghc-%2-devel.files\
cp -p libraries/%1/LICENSE libraries/LICENSE.%1\
-echo "%%license libraries/LICENSE.%1" >> ghc-%2.files
+%if 0%{?rhel} && 0%{?rhel} < 8\
+echo "%%doc libraries/LICENSE.%1" >> ghc-%2.files\
+%else\
+echo "%%license libraries/LICENSE.%1" >> ghc-%2.files\
+%endif
%merge_filelist integer-gmp base
%merge_filelist ghc-prim base
# add rts libs
-echo "%%dir %{ghclibdir}/rts" >> ghc-base.files
-ls %{buildroot}%{ghclibdir}/rts/libHS*.so >> ghc-base.files
+echo "%{ghclibdir}/rts" >> ghc-base-devel.files
+ls %{buildroot}%{_libdir}/libHSrts*.so >> ghc-base.files
%if 0%{?rhel} && 0%{?rhel} < 7
ls %{buildroot}%{ghclibdir}/rts/libffi.so.* >> ghc-base.files
%endif
+sed -i -e 's!^library-dirs: %{ghclibdir}/rts!&\ndynamic-library-dirs: %{_libdir}!' %{buildroot}%{ghclibdir}/package.conf.d/rts.conf
sed -i -e "s|^%{buildroot}||g" ghc-base.files
-ls -d %{buildroot}%{ghclibdir}/rts/lib*.a %{buildroot}%{ghclibdir}/package.conf.d/rts.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.files
+ls -d %{buildroot}%{ghclibdir}/package.conf.d/rts.conf %{buildroot}%{ghclibdir}/include >> ghc-base-devel.files
%if 0%{?rhel} && 0%{?rhel} < 7
ls %{buildroot}%{ghclibdir}/rts/libffi.so >> ghc-base-devel.files
%endif
@@ -413,12 +435,12 @@ echo 'main = putStrLn "Foo"' > testghc/foo.hs
$GHC testghc/foo.hs -o testghc/foo -dynamic
[ "$(testghc/foo)" = "Foo" ]
rm testghc/*
-%if %{undefined without_testsuite}
+%if %{with testsuite}
make test
%endif
# check the ABI hashes
-%if %{undefined ghc_bootstrapping}
+%if %{defined perf_build}
echo "Checking package ABI hashes:"
for i in %{ghc_packages_list}; do
old=$(ghc-pkg field $i id --simple-output || :)
@@ -492,18 +514,20 @@ fi
%{ghclibdir}/bin/hsc2hs
%{ghclibdir}/bin/ghc-iserv
%{ghclibdir}/bin/ghc-iserv-dyn
-%if %{undefined without_prof}
+%if %{with prof}
%{ghclibdir}/bin/ghc-iserv-prof
%endif
%{ghclibdir}/bin/runghc
-%ifnarch s390 s390x aarch64 %{mips}
+%ifnarch s390 s390x %{mips}
%{ghclibdir}/bin/ghc-split
%endif
+%{ghclibdir}/bin/hp2ps
%{ghclibdir}/bin/unlit
%{ghclibdir}/ghc-usage.txt
%{ghclibdir}/ghci-usage.txt
%dir %{ghclibdir}/package.conf.d
%ghost %{ghclibdir}/package.conf.d/package.cache
+%{ghclibdir}/package.conf.d/package.cache.lock
%{ghclibdir}/platformConstants
%{ghclibdir}/settings
%{ghclibdir}/template-hsc.h
@@ -548,6 +572,13 @@ fi
%changelog
+* Wed Jan 24 2018 Jens Petersen <petersen(a)redhat.com> - 8.2.2-61
+- 8.2.2 bootstrap build
+- install ghc libs in libdir and remove RUNPATHs
+- add shadowed-deps.patch (haskell/cabal#4728)
+- new ghc-compact library
+- exclude ghc-boot for ghc-libraries
+
* Thu Oct 26 2017 Jens Petersen <petersen(a)redhat.com> - 8.0.2-60
- fix space in BSDHaskellReport license macro for rpm-4.14
- mark other subpackages correctly as BSD license
diff --git a/shadowed-deps.patch b/shadowed-deps.patch
new file mode 100644
index 0000000..faa5db0
--- /dev/null
+++ b/shadowed-deps.patch
@@ -0,0 +1,13 @@
+diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs
+index 949cc0f231..408794e078 100644
+--- a/compiler/main/Packages.hs
++++ b/compiler/main/Packages.hs
+@@ -1339,7 +1339,7 @@ validateDatabase dflags pkg_map1 =
+ unusable = directly_ignored `Map.union` unusable_ignored
+ `Map.union` unusable_broken
+ `Map.union` unusable_cyclic
+- `Map.union` unusable_shadowed
++ -- `Map.union` unusable_shadowed
+
+ -- -----------------------------------------------------------------------------
+ -- When all the command-line options are in, we can process our package
diff --git a/sources b/sources
index 219f0fc..9fd240d 100644
--- a/sources
+++ b/sources
@@ -1,2 +1 @@
-SHA512 (ghc-8.0.2-src.tar.xz) = 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
-SHA512 (ghc-8.0.2-testsuite.tar.xz) = 1b35fc6a5f482dc1e33f21ddf4c4fe17591990f16a4105c787225980a5f4dbaa42205204faf547f8e1b53f6356aefde9d3ff50cc416c9bf1a9ac08feadd74a99
+SHA512 (ghc-8.2.2-src.tar.xz) = 6549416f470b599973d409fa45f59c25b07e6a94798cef1a19ad432547dc225338cf4dbc4a4793114b4a417798a3b59b122b92b020251074405c5302b7ffe799
6 years, 2 months
Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/firefox.git/commit/?id=02ba603ad7....
Change:
+ExcludeArch: ppc64 ppc64le aarch64 armv7hl s390x
Thanks.
Full change:
============
commit 8c23764435fbde6369a2da26c61e46048dc00315
Merge: e391593 02ba603
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:44:31 2018 +0100
Merge branch 'master' into f25
commit 02ba603ad73ebbb4dc3594947ba9e2d95b88f248
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:44:20 2018 +0100
Temporary disable second arches to build something at least
diff --git a/firefox.spec b/firefox.spec
index c75923d..f5d8a13 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -1,3 +1,6 @@
+# Temporary disable
+ExcludeArch: ppc64 ppc64le aarch64 armv7hl s390x
+
# Use system nspr/nss?
%global system_nss 1
6 years, 2 months
Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/firefox.git/commit/?id=02ba603ad7....
Change:
+ExcludeArch: ppc64 ppc64le aarch64 armv7hl s390x
Thanks.
Full change:
============
commit e3c23e4763725c0dace32d7f2ffadfaeb85a01c7
Merge: 2547099 02ba603
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:44:38 2018 +0100
Merge branch 'master' into f26
commit 02ba603ad73ebbb4dc3594947ba9e2d95b88f248
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:44:20 2018 +0100
Temporary disable second arches to build something at least
diff --git a/firefox.spec b/firefox.spec
index c75923d..f5d8a13 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -1,3 +1,6 @@
+# Temporary disable
+ExcludeArch: ppc64 ppc64le aarch64 armv7hl s390x
+
# Use system nspr/nss?
%global system_nss 1
6 years, 2 months
Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/firefox.git/commit/?id=02ba603ad7....
Change:
+ExcludeArch: ppc64 ppc64le aarch64 armv7hl s390x
Thanks.
Full change:
============
commit 02ba603ad73ebbb4dc3594947ba9e2d95b88f248
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:44:20 2018 +0100
Temporary disable second arches to build something at least
diff --git a/firefox.spec b/firefox.spec
index c75923d..f5d8a13 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -1,3 +1,6 @@
+# Temporary disable
+ExcludeArch: ppc64 ppc64le aarch64 armv7hl s390x
+
# Use system nspr/nss?
%global system_nss 1
6 years, 2 months
Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/firefox.git/commit/?id=02ba603ad7....
Change:
+ExcludeArch: ppc64 ppc64le aarch64 armv7hl s390x
Thanks.
Full change:
============
commit 02ba603ad73ebbb4dc3594947ba9e2d95b88f248
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:44:20 2018 +0100
Temporary disable second arches to build something at least
diff --git a/firefox.spec b/firefox.spec
index c75923d..f5d8a13 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -1,3 +1,6 @@
+# Temporary disable
+ExcludeArch: ppc64 ppc64le aarch64 armv7hl s390x
+
# Use system nspr/nss?
%global system_nss 1
6 years, 2 months
Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/firefox.git/commit/?id=5d35b83763....
Change:
-%ifarch %{arm}
Thanks.
Full change:
============
commit e3915939e246ae87881f83b51ae85295d2d14933
Merge: d1bbdd9 5d35b83
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:26:12 2018 +0100
Merge branch 'master' into f25
commit 5d35b83763bfa9d6fa1e45800ffefe0401556a59
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:25:55 2018 +0100
Update to Firefox 58
diff --git a/.gitignore b/.gitignore
index c6c5efe..738876b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -274,3 +274,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-langpacks-57.0.3-20180102.tar.xz
/firefox-57.0.4.source.tar.xz
/firefox-langpacks-57.0.4-20180104.tar.xz
+/firefox-58.0.source.tar.xz
+/firefox-langpacks-58.0-20180123.tar.xz
diff --git a/build-with-nss-3.34.0.patch b/build-with-nss-3.34.0.patch
new file mode 100644
index 0000000..68bc141
--- /dev/null
+++ b/build-with-nss-3.34.0.patch
@@ -0,0 +1,14 @@
+diff -up firefox-58.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-58.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium
+diff -up firefox-58.0/media/webrtc/trunk/Makefile.old firefox-58.0/media/webrtc/trunk/Makefile
+diff -up firefox-58.0/old-configure.in.old firefox-58.0/old-configure.in
+--- firefox-58.0/old-configure.in.old 2018-01-23 14:49:51.771309172 +0100
++++ firefox-58.0/old-configure.in 2018-01-23 14:50:04.091265876 +0100
+@@ -1915,7 +1915,7 @@ MOZ_ARG_WITH_BOOL(system-nss,
+ _USE_SYSTEM_NSS=1 )
+
+ if test -n "$_USE_SYSTEM_NSS"; then
+- AM_PATH_NSS(3.34.1, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
++ AM_PATH_NSS(3.34.0, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
+ fi
+
+ if test -n "$MOZ_SYSTEM_NSS"; then
diff --git a/firefox-fedora-rhbz-1537287-v2.patch b/firefox-fedora-rhbz-1537287-v2.patch
new file mode 100644
index 0000000..e7d314e
--- /dev/null
+++ b/firefox-fedora-rhbz-1537287-v2.patch
@@ -0,0 +1,52 @@
+diff --git a/security/certverifier/NSSCertDBTrustDomain.cpp b/security/certverifier/NSSCertDBTrustDomain.cpp
+--- a/security/certverifier/NSSCertDBTrustDomain.cpp
++++ b/security/certverifier/NSSCertDBTrustDomain.cpp
+@@ -1059,26 +1059,17 @@ InitializeNSS(const nsACString& dir, boo
+ // "/usr/lib/nss/libnssckbi.so".
+ uint32_t flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
+ if (readOnly) {
+ flags |= NSS_INIT_READONLY;
+ }
+ if (!loadPKCS11Modules) {
+ flags |= NSS_INIT_NOMODDB;
+ }
+- // At the moment, sqldb does not work with non-ASCII file paths on Windows.
+- bool useSQLDB = Preferences::GetBool("security.use_sqldb", false) &&
+- (NS_IsNativeUTF8() || NS_IsAscii(PromiseFlatCString(dir).get()));
+ nsAutoCString dbTypeAndDirectory;
+- // Don't change any behavior if the user has specified an alternative database
+- // location with MOZPSM_NSSDBDIR_OVERRIDE.
+- const char* dbDirOverride = getenv("MOZPSM_NSSDBDIR_OVERRIDE");
+- if (useSQLDB && (!dbDirOverride || strlen(dbDirOverride) == 0)) {
+- dbTypeAndDirectory.Append("sql:");
+- }
+ dbTypeAndDirectory.Append(dir);
+ MOZ_LOG(gCertVerifierLog, LogLevel::Debug,
+ ("InitializeNSS(%s, %d, %d)", dbTypeAndDirectory.get(), readOnly,
+ loadPKCS11Modules));
+ SECStatus srv = NSS_Initialize(dbTypeAndDirectory.get(), "", "",
+ SECMOD_DB, flags);
+ if (srv != SECSuccess) {
+ return srv;
+diff --git a/security/manager/ssl/security-prefs.js b/security/manager/ssl/security-prefs.js
+--- a/security/manager/ssl/security-prefs.js
++++ b/security/manager/ssl/security-prefs.js
+@@ -39,17 +39,17 @@ pref("security.ask_for_password",
+ pref("security.password_lifetime", 30);
+
+ // If true, use the modern sqlite-backed certificate and key databases in NSS.
+ // If false, use the default format. Currently the default in NSS is the old
+ // BerkeleyDB format, but this will change in bug 1377940.
+ // Changing this requires a restart to take effect.
+ // Note that the environment variable MOZPSM_NSSDBDIR_OVERRIDE can override both
+ // the behavior of this preference and the NSS default.
+-pref("security.use_sqldb", true);
++pref("security.use_sqldb", false);
+
+ // The supported values of this pref are:
+ // 0: disable detecting Family Safety mode and importing the root
+ // 1: only attempt to detect Family Safety mode (don't import the root)
+ // 2: detect Family Safety mode and import the root
+ // (This is only relevant to Windows 8.1)
+ pref("security.family_safety.mode", 2);
+
diff --git a/firefox.spec b/firefox.spec
index 8b7831d..c75923d 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -94,13 +94,13 @@
Summary: Mozilla Firefox Web browser
Name: firefox
-Version: 57.0.4
-Release: 2%{?pre_tag}%{?dist}
+Version: 58.0
+Release: 1%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version...
%if %{build_langpacks}
-Source1: firefox-langpacks-%{version}%{?pre_version}-20180104.tar.xz
+Source1: firefox-langpacks-%{version}%{?pre_version}-20180123.tar.xz
%endif
Source10: firefox-mozconfig
Source12: firefox-redhat-default-prefs.js
@@ -141,6 +141,8 @@ Patch225: mozilla-1005640-accept-lang.patch
#ARM run-time patch
Patch226: rhbz-1354671.patch
Patch229: firefox-nss-version.patch
+Patch230: firefox-fedora-rhbz-1537287-v2.patch
+Patch231: build-with-nss-3.34.0.patch
# Upstream patches
Patch402: mozilla-1196777.patch
@@ -152,9 +154,6 @@ Patch412: mozilla-1337988.patch
Patch413: mozilla-1353817.patch
Patch416: mozilla-1399611.patch
-# Better compatibility with NSS sql database format, rhbz#1496563
-Patch481: sqlcompat-ff57-1-backport-730495
-
# Debian patches
Patch500: mozilla-440908.patch
@@ -300,10 +299,11 @@ This package contains results of tests executed during build.
%endif
%patch29 -p1 -b .big-endian
%patch31 -p1 -b .ppc64-s390x-curl
-%patch32 -p1 -b .rust-ppc64le
-%ifarch ppc ppc64 ppc64le
-%patch35 -p1 -b .ppc-jit
-%endif
+# Second arch patches - do we still need them?
+#%patch32 -p1 -b .rust-ppc64le
+#%ifarch ppc ppc64 ppc64le
+#%patch35 -p1 -b .ppc-jit
+#%endif
%patch37 -p1 -b .jit-atomic-lucky
%patch3 -p1 -b .arm
@@ -318,25 +318,29 @@ This package contains results of tests executed during build.
%ifarch aarch64
%patch226 -p1 -b .1354671
%endif
+%if 0%{?fedora} < 28
+%patch230 -p1 -b .rhbz-1537287
+%endif
+%patch231 -p1
%patch402 -p1 -b .1196777
%patch406 -p1 -b .256180
-%ifarch %{arm}
-%if 0%{?fedora} < 26
+# Does not apply
+#%ifarch %{arm}
+#%if 0%{?fedora} < 26
# Workaround for mozbz#1337988
-%patch412 -p1 -b .1337988
-%endif
-%endif
+#%patch412 -p1 -b .1337988
+#%endif
+#%endif
%patch413 -p1 -b .1353817
-%patch416 -p1 -b .1399611
-
-%if 0%{?fedora} > 27
-%patch481 -p1 -b .sqlcompat-1
-%endif
+# CSD - Disabled now
+#%patch416 -p1 -b .1399611
# Debian extension patch
-%patch500 -p1 -b .440908
+# Disabled due to new pref module, see
+# https://bugzilla.mozilla.org/show_bug.cgi?id=440908
+#%patch500 -p1 -b .440908
# Patch for big endian platforms only
%if 0%{?big_endian}
@@ -534,7 +538,11 @@ MOZ_SMP_FLAGS=-j1
[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8
%endif
-make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
+#make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
+export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
+export MOZ_SERVICES_SYNC="1"
+export STRIP=/bin/true
+./mach build
# create debuginfo for crash-stats.mozilla.com
%if %{enable_mozilla_crashreporter}
@@ -816,7 +824,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{mozappdir}/browser/omni.ja
%{mozappdir}/browser/icons
%{mozappdir}/chrome.manifest
-%{mozappdir}/run-mozilla.sh
+#%{mozappdir}/run-mozilla.sh
%{mozappdir}/application.ini
%{mozappdir}/pingsender
%exclude %{mozappdir}/removed-files
@@ -857,6 +865,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Tue Jan 23 2018 Martin Stransky <stransky(a)redhat.com> - 58.0-1
+- Update to 58.0
+
* Tue Jan 9 2018 Martin Stransky <stransky(a)redhat.com> - 57.0.4-2
- Try to disable rust debuginfo on arm to have arm builds again (rhbz#1523912)
diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch
index 761fb9e..9e8906f 100644
--- a/mozilla-1170092.patch
+++ b/mozilla-1170092.patch
@@ -1,7 +1,7 @@
-diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
---- firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2017-09-25 10:28:35.413675532 +0200
-+++ firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2017-09-25 10:31:06.394196960 +0200
-@@ -243,9 +243,20 @@ nsresult nsReadConfig::openAndEvaluateJS
+diff -up firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
+--- firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2018-01-11 21:17:03.000000000 +0100
++++ firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2018-01-23 13:59:45.446495820 +0100
+@@ -239,9 +239,20 @@ nsresult nsReadConfig::openAndEvaluateJS
return rv;
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
@@ -24,22 +24,22 @@ diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 fi
} else {
nsAutoCString location("resource://gre/defaults/autoconfig/");
location += aFileName;
-diff -up firefox-56.0/modules/libpref/Preferences.cpp.1170092 firefox-56.0/modules/libpref/Preferences.cpp
---- firefox-56.0/modules/libpref/Preferences.cpp.1170092 2017-09-14 22:15:52.000000000 +0200
-+++ firefox-56.0/modules/libpref/Preferences.cpp 2017-09-25 10:28:35.413675532 +0200
-@@ -1514,6 +1514,8 @@ pref_InitInitialObjects()
- // - jar:$gre/omni.jar!/defaults/preferences/*.js
- // Thus, in omni.jar case, we always load app-specific default preferences
- // from omni.jar, whether or not $app == $gre.
+diff -up firefox-58.0/modules/libpref/Preferences.cpp.1170092 firefox-58.0/modules/libpref/Preferences.cpp
+--- firefox-58.0/modules/libpref/Preferences.cpp.1170092 2018-01-23 13:59:45.447495817 +0100
++++ firefox-58.0/modules/libpref/Preferences.cpp 2018-01-23 14:02:51.456987774 +0100
+@@ -4402,6 +4402,8 @@ pref_InitInitialObjects()
+ //
+ // Thus, in the omni.jar case, we always load app-specific default
+ // preferences from omni.jar, whether or not `$app == $gre`.
+ // At very end load configuration from system config location:
+ // - /etc/firefox/pref/*.js
- nsZipFind *findPtr;
- nsAutoPtr<nsZipFind> find;
-diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/toolkit/xre/nsXREDirProvider.cpp
---- firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2017-09-14 22:16:02.000000000 +0200
-+++ firefox-56.0/toolkit/xre/nsXREDirProvider.cpp 2017-09-25 10:28:35.414675529 +0200
-@@ -58,6 +58,7 @@
+ nsresult rv;
+ nsZipFind* findPtr;
+diff -up firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-58.0/toolkit/xre/nsXREDirProvider.cpp
+--- firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2018-01-11 21:17:06.000000000 +0100
++++ firefox-58.0/toolkit/xre/nsXREDirProvider.cpp 2018-01-23 13:59:45.447495817 +0100
+@@ -59,6 +59,7 @@
#endif
#ifdef XP_UNIX
#include <ctype.h>
@@ -47,7 +47,7 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
#endif
#ifdef XP_IOS
#include "UIKitDirProvider.h"
-@@ -570,6 +571,20 @@ nsXREDirProvider::GetFile(const char* aP
+@@ -554,6 +555,20 @@ nsXREDirProvider::GetFile(const char* aP
}
}
}
@@ -68,7 +68,7 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
if (NS_FAILED(rv) || !file)
return NS_ERROR_FAILURE;
-@@ -935,6 +950,14 @@ nsXREDirProvider::GetFilesInternal(const
+@@ -887,6 +902,14 @@ nsXREDirProvider::GetFilesInternal(const
LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
LoadDirsIntoArray(mAppBundleDirectories,
kAppendPrefDir, directories);
@@ -83,12 +83,12 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
rv = NS_NewArrayEnumerator(aResult, directories);
}
-diff -up firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h
---- firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2017-09-14 22:16:02.000000000 +0200
-+++ firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h 2017-09-25 10:28:35.414675529 +0200
-@@ -62,6 +62,7 @@
+diff -up firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h
+--- firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2018-01-23 13:59:45.447495817 +0100
++++ firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h 2018-01-23 14:02:02.871120476 +0100
+@@ -59,6 +59,7 @@
+ #define NS_APP_PREFS_50_FILE "PrefF"
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL"
- #define NS_EXT_PREFS_DEFAULTS_DIR_LIST "ExtPrefDL"
#define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults
+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration
diff --git a/sources b/sources
index c832d3a..2cd26a2 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (firefox-57.0.4.source.tar.xz) = 58846037aebbf14b85e6b3a46dbe617c780c6916e437ea4ee32a2502a6b55e3689921a0be28b920dedf2f966195df04ac8e45411caeb2601a168ec08b4827cf0
-SHA512 (firefox-langpacks-57.0.4-20180104.tar.xz) = 361b652a0089c4437e8e135f6499b93b875e6c4b6d24118e07e3a8c287f1f045855fb8de36af57baf8ff84f319a0eeba285f50a3ced27bf6c20093ed95f303d0
+SHA512 (firefox-58.0.source.tar.xz) = 17a2c520973c68c5dd130bcb27407b1c20b03f74c97aeb486e86d422ab5c012e549787ae53275d6840b9d324f261ae282b98f61764ee5e0a6df1cc3e3c9e2632
+SHA512 (firefox-langpacks-58.0-20180123.tar.xz) = 6781bf0a5d68bdaa513f85404b8d9111bef8d2aa6d12e1b5fa8db2e4f44fce2d2642b9b5a70a6fc92f0cb96167f6895e17505bdc212aea987240cfb018f340f5
diff --git a/sqlcompat-ff57-1-backport-730495 b/sqlcompat-ff57-1-backport-730495
deleted file mode 100644
index 05b0eaa..0000000
--- a/sqlcompat-ff57-1-backport-730495
+++ /dev/null
@@ -1,524 +0,0 @@
-# HG changeset patch
-# Parent 5de7eafc3ceca2196d84d5b6106e01046efda034
-
-diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp
---- a/security/manager/ssl/nsNSSComponent.cpp
-+++ b/security/manager/ssl/nsNSSComponent.cpp
-@@ -13,7 +13,6 @@
- #include "SharedSSLState.h"
- #include "cert.h"
- #include "certdb.h"
--#include "mozStorageCID.h"
- #include "mozilla/ArrayUtils.h"
- #include "mozilla/Assertions.h"
- #include "mozilla/Casting.h"
-@@ -2038,14 +2037,6 @@ nsNSSComponent::Init()
- return NS_ERROR_NOT_AVAILABLE;
- }
-
-- // To avoid a sqlite3_config race in NSS init, as a workaround for
-- // bug 730495, we require the storage service to get initialized first.
-- nsCOMPtr<nsISupports> storageService =
-- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
-- if (!storageService) {
-- return NS_ERROR_NOT_AVAILABLE;
-- }
--
- MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Beginning NSS initialization\n"));
-
- nsresult rv = InitializePIPNSSBundle();
-diff --git a/storage/TelemetryVFS.cpp b/storage/TelemetryVFS.cpp
---- a/storage/TelemetryVFS.cpp
-+++ b/storage/TelemetryVFS.cpp
-@@ -834,6 +834,11 @@ xNextSystemCall(sqlite3_vfs *vfs, const
- namespace mozilla {
- namespace storage {
-
-+const char *GetVFSName()
-+{
-+ return "telemetry-vfs";
-+}
-+
- sqlite3_vfs* ConstructTelemetryVFS()
- {
- #if defined(XP_WIN)
-@@ -867,7 +872,7 @@ sqlite3_vfs* ConstructTelemetryVFS()
- MOZ_ASSERT(vfs->iVersion <= LAST_KNOWN_VFS_VERSION);
- tvfs->szOsFile = sizeof(telemetry_file) - sizeof(sqlite3_file) + vfs->szOsFile;
- tvfs->mxPathname = vfs->mxPathname;
-- tvfs->zName = "telemetry-vfs";
-+ tvfs->zName = GetVFSName();
- tvfs->pAppData = vfs;
- tvfs->xOpen = xOpen;
- tvfs->xDelete = xDelete;
-diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp
---- a/storage/mozStorageConnection.cpp
-+++ b/storage/mozStorageConnection.cpp
-@@ -73,6 +73,8 @@ namespace storage {
-
- using mozilla::dom::quota::QuotaObject;
-
-+const char *GetVFSName();
-+
- namespace {
-
- int
-@@ -627,7 +629,7 @@ Connection::initialize()
- AUTO_PROFILER_LABEL("Connection::initialize", STORAGE);
-
- // in memory database requested, sqlite uses a magic file name
-- int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, nullptr);
-+ int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, GetVFSName());
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
-@@ -660,7 +662,7 @@ Connection::initialize(nsIFile *aDatabas
- #else
- static const char* sIgnoreLockingVFS = "unix-none";
- #endif
-- const char* vfs = mIgnoreLockingMode ? sIgnoreLockingVFS : nullptr;
-+ const char* vfs = mIgnoreLockingMode ? sIgnoreLockingVFS : GetVFSName();
-
- int srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn,
- mFlags, vfs);
-@@ -694,7 +696,7 @@ Connection::initialize(nsIFileURL *aFile
- rv = aFileURL->GetSpec(spec);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, nullptr);
-+ int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, GetVFSName());
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
-diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
---- a/storage/mozStorageService.cpp
-+++ b/storage/mozStorageService.cpp
-@@ -24,6 +24,7 @@
- #include "mozIStoragePendingStatement.h"
-
- #include "sqlite3.h"
-+#include "mozilla/AutoSQLiteLifetime.h"
-
- #ifdef SQLITE_OS_WIN
- // "windows.h" was included and it can #define lots of things we care about...
-@@ -32,13 +33,6 @@
-
- #include "nsIPromptService.h"
-
--#ifdef MOZ_STORAGE_MEMORY
--# include "mozmemory.h"
--# ifdef MOZ_DMD
--# include "DMD.h"
--# endif
--#endif
--
- ////////////////////////////////////////////////////////////////////////////////
- //// Defines
-
-@@ -282,12 +276,6 @@ Service::~Service()
- if (rc != SQLITE_OK)
- NS_WARNING("Failed to unregister sqlite vfs wrapper.");
-
-- // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
-- // there is nothing actionable we can do in that case.
-- rc = ::sqlite3_shutdown();
-- if (rc != SQLITE_OK)
-- NS_WARNING("sqlite3 did not shutdown cleanly.");
--
- shutdown(); // To release sXPConnect.
-
- gService = nullptr;
-@@ -400,121 +388,7 @@ Service::shutdown()
- }
-
- sqlite3_vfs *ConstructTelemetryVFS();
--
--#ifdef MOZ_STORAGE_MEMORY
--
--namespace {
--
--// By default, SQLite tracks the size of all its heap blocks by adding an extra
--// 8 bytes at the start of the block to hold the size. Unfortunately, this
--// causes a lot of 2^N-sized allocations to be rounded up by jemalloc
--// allocator, wasting memory. For example, a request for 1024 bytes has 8
--// bytes added, becoming a request for 1032 bytes, and jemalloc rounds this up
--// to 2048 bytes, wasting 1012 bytes. (See bug 676189 for more details.)
--//
--// So we register jemalloc as the malloc implementation, which avoids this
--// 8-byte overhead, and thus a lot of waste. This requires us to provide a
--// function, sqliteMemRoundup(), which computes the actual size that will be
--// allocated for a given request. SQLite uses this function before all
--// allocations, and may be able to use any excess bytes caused by the rounding.
--//
--// Note: the wrappers for malloc, realloc and moz_malloc_usable_size are
--// necessary because the sqlite_mem_methods type signatures differ slightly
--// from the standard ones -- they use int instead of size_t. But we don't need
--// a wrapper for free.
--
--#ifdef MOZ_DMD
--
--// sqlite does its own memory accounting, and we use its numbers in our memory
--// reporters. But we don't want sqlite's heap blocks to show up in DMD's
--// output as unreported, so we mark them as reported when they're allocated and
--// mark them as unreported when they are freed.
--//
--// In other words, we are marking all sqlite heap blocks as reported even
--// though we're not reporting them ourselves. Instead we're trusting that
--// sqlite is fully and correctly accounting for all of its heap blocks via its
--// own memory accounting. Well, we don't have to trust it entirely, because
--// it's easy to keep track (while doing this DMD-specific marking) of exactly
--// how much memory SQLite is using. And we can compare that against what
--// SQLite reports it is using.
--
--MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
--MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
--
--#endif
--
--static void *sqliteMemMalloc(int n)
--{
-- void* p = ::malloc(n);
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
--#endif
-- return p;
--}
--
--static void sqliteMemFree(void *p)
--{
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
--#endif
-- ::free(p);
--}
--
--static void *sqliteMemRealloc(void *p, int n)
--{
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-- void *pnew = ::realloc(p, n);
-- if (pnew) {
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
-- } else {
-- // realloc failed; undo the SqliteMallocSizeOfOnFree from above
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-- }
-- return pnew;
--#else
-- return ::realloc(p, n);
--#endif
--}
--
--static int sqliteMemSize(void *p)
--{
-- return ::moz_malloc_usable_size(p);
--}
--
--static int sqliteMemRoundup(int n)
--{
-- n = malloc_good_size(n);
--
-- // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
-- // allocations be 8-aligned. So we round up sub-8 requests to 8. This
-- // wastes a small amount of memory but is obviously safe.
-- return n <= 8 ? 8 : n;
--}
--
--static int sqliteMemInit(void *p)
--{
-- return 0;
--}
--
--static void sqliteMemShutdown(void *p)
--{
--}
--
--const sqlite3_mem_methods memMethods = {
-- &sqliteMemMalloc,
-- &sqliteMemFree,
-- &sqliteMemRealloc,
-- &sqliteMemSize,
-- &sqliteMemRoundup,
-- &sqliteMemInit,
-- &sqliteMemShutdown,
-- nullptr
--};
--
--} // namespace
--
--#endif // MOZ_STORAGE_MEMORY
-+const char *GetVFSName();
-
- static const char* sObserverTopics[] = {
- "memory-pressure",
-@@ -527,28 +401,13 @@ Service::initialize()
- {
- MOZ_ASSERT(NS_IsMainThread(), "Must be initialized on the main thread");
-
-- int rc;
--
--#ifdef MOZ_STORAGE_MEMORY
-- rc = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
-- if (rc != SQLITE_OK)
-- return convertResultCode(rc);
--#endif
--
-- // TODO (bug 1191405): do not preallocate the connections caches until we
-- // have figured the impact on our consumers and memory.
-- sqlite3_config(SQLITE_CONFIG_PAGECACHE, NULL, 0, 0);
--
-- // Explicitly initialize sqlite3. Although this is implicitly called by
-- // various sqlite3 functions (and the sqlite3_open calls in our case),
-- // the documentation suggests calling this directly. So we do.
-- rc = ::sqlite3_initialize();
-+ int rc = AutoSQLiteLifetime::getInitResult();
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
-
- mSqliteVFS = ConstructTelemetryVFS();
- if (mSqliteVFS) {
-- rc = sqlite3_vfs_register(mSqliteVFS, 1);
-+ rc = sqlite3_vfs_register(mSqliteVFS, 0);
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
- } else {
-diff --git a/toolkit/xre/Bootstrap.cpp b/toolkit/xre/Bootstrap.cpp
---- a/toolkit/xre/Bootstrap.cpp
-+++ b/toolkit/xre/Bootstrap.cpp
-@@ -6,11 +6,15 @@
- #include "mozilla/Bootstrap.h"
- #include "nsXPCOM.h"
-
-+#include "AutoSQLiteLifetime.h"
-+
- namespace mozilla {
-
- class BootstrapImpl final : public Bootstrap
- {
- protected:
-+ AutoSQLiteLifetime mSQLLT;
-+
- virtual void Dispose() override
- {
- delete this;
-diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
---- a/toolkit/xre/moz.build
-+++ b/toolkit/xre/moz.build
-@@ -30,7 +30,7 @@ EXPORTS += [
- 'nsIAppStartupNotifier.h',
- ]
-
--EXPORTS.mozilla += ['Bootstrap.h']
-+EXPORTS.mozilla += ['AutoSQLiteLifetime.h', 'Bootstrap.h']
-
- if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
- EXPORTS += ['EventTracer.h']
-@@ -91,6 +91,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
- ]
-
- UNIFIED_SOURCES += [
-+ 'AutoSQLiteLifetime.cpp',
- 'Bootstrap.cpp',
- 'CreateAppData.cpp',
- 'nsAppStartupNotifier.cpp',
-diff --git a/toolkit/xre/AutoSQLiteLifetime.cpp b/toolkit/xre/AutoSQLiteLifetime.cpp
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/AutoSQLiteLifetime.cpp
-@@ -0,0 +1,167 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "nsDebug.h"
-+#include "AutoSQLiteLifetime.h"
-+#include "sqlite3.h"
-+
-+#ifdef MOZ_STORAGE_MEMORY
-+# include "mozmemory.h"
-+# ifdef MOZ_DMD
-+# include "DMD.h"
-+# endif
-+
-+namespace {
-+
-+// By default, SQLite tracks the size of all its heap blocks by adding an extra
-+// 8 bytes at the start of the block to hold the size. Unfortunately, this
-+// causes a lot of 2^N-sized allocations to be rounded up by jemalloc
-+// allocator, wasting memory. For example, a request for 1024 bytes has 8
-+// bytes added, becoming a request for 1032 bytes, and jemalloc rounds this up
-+// to 2048 bytes, wasting 1012 bytes. (See bug 676189 for more details.)
-+//
-+// So we register jemalloc as the malloc implementation, which avoids this
-+// 8-byte overhead, and thus a lot of waste. This requires us to provide a
-+// function, sqliteMemRoundup(), which computes the actual size that will be
-+// allocated for a given request. SQLite uses this function before all
-+// allocations, and may be able to use any excess bytes caused by the rounding.
-+//
-+// Note: the wrappers for malloc, realloc and moz_malloc_usable_size are
-+// necessary because the sqlite_mem_methods type signatures differ slightly
-+// from the standard ones -- they use int instead of size_t. But we don't need
-+// a wrapper for free.
-+
-+#ifdef MOZ_DMD
-+
-+// sqlite does its own memory accounting, and we use its numbers in our memory
-+// reporters. But we don't want sqlite's heap blocks to show up in DMD's
-+// output as unreported, so we mark them as reported when they're allocated and
-+// mark them as unreported when they are freed.
-+//
-+// In other words, we are marking all sqlite heap blocks as reported even
-+// though we're not reporting them ourselves. Instead we're trusting that
-+// sqlite is fully and correctly accounting for all of its heap blocks via its
-+// own memory accounting. Well, we don't have to trust it entirely, because
-+// it's easy to keep track (while doing this DMD-specific marking) of exactly
-+// how much memory SQLite is using. And we can compare that against what
-+// SQLite reports it is using.
-+
-+MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
-+MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
-+
-+#endif
-+
-+static void *sqliteMemMalloc(int n)
-+{
-+ void* p = ::malloc(n);
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-+#endif
-+ return p;
-+}
-+
-+static void sqliteMemFree(void *p)
-+{
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-+#endif
-+ ::free(p);
-+}
-+
-+static void *sqliteMemRealloc(void *p, int n)
-+{
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-+ void *pnew = ::realloc(p, n);
-+ if (pnew) {
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
-+ } else {
-+ // realloc failed; undo the SqliteMallocSizeOfOnFree from above
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-+ }
-+ return pnew;
-+#else
-+ return ::realloc(p, n);
-+#endif
-+}
-+
-+static int sqliteMemSize(void *p)
-+{
-+ return ::moz_malloc_usable_size(p);
-+}
-+
-+static int sqliteMemRoundup(int n)
-+{
-+ n = malloc_good_size(n);
-+
-+ // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
-+ // allocations be 8-aligned. So we round up sub-8 requests to 8. This
-+ // wastes a small amount of memory but is obviously safe.
-+ return n <= 8 ? 8 : n;
-+}
-+
-+static int sqliteMemInit(void *p)
-+{
-+ return 0;
-+}
-+
-+static void sqliteMemShutdown(void *p)
-+{
-+}
-+
-+const sqlite3_mem_methods memMethods = {
-+ &sqliteMemMalloc,
-+ &sqliteMemFree,
-+ &sqliteMemRealloc,
-+ &sqliteMemSize,
-+ &sqliteMemRoundup,
-+ &sqliteMemInit,
-+ &sqliteMemShutdown,
-+ nullptr
-+};
-+
-+} // namespace
-+
-+#endif // MOZ_STORAGE_MEMORY
-+
-+namespace mozilla {
-+
-+AutoSQLiteLifetime::AutoSQLiteLifetime()
-+{
-+ if (++AutoSQLiteLifetime::sSingletonEnforcer != 1) {
-+ NS_RUNTIMEABORT("multiple instances of AutoSQLiteLifetime constructed!");
-+ }
-+
-+#ifdef MOZ_STORAGE_MEMORY
-+ sResult = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
-+#else
-+ sResult = SQLITE_OK;
-+#endif
-+
-+ if (sResult == SQLITE_OK) {
-+ // TODO (bug 1191405): do not preallocate the connections caches until we
-+ // have figured the impact on our consumers and memory.
-+ sqlite3_config(SQLITE_CONFIG_PAGECACHE, NULL, 0, 0);
-+
-+ // Explicitly initialize sqlite3. Although this is implicitly called by
-+ // various sqlite3 functions (and the sqlite3_open calls in our case),
-+ // the documentation suggests calling this directly. So we do.
-+ sResult = ::sqlite3_initialize();
-+ }
-+}
-+
-+AutoSQLiteLifetime::~AutoSQLiteLifetime()
-+{
-+ // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
-+ // there is nothing actionable we can do in that case.
-+ sResult = ::sqlite3_shutdown();
-+ NS_WARNING_ASSERTION(sResult == SQLITE_OK,
-+ "sqlite3 did not shutdown cleanly.");
-+}
-+
-+int AutoSQLiteLifetime::sSingletonEnforcer = 0;
-+int AutoSQLiteLifetime::sResult = SQLITE_MISUSE;
-+
-+} // namespace mozilla
-diff --git a/toolkit/xre/AutoSQLiteLifetime.h b/toolkit/xre/AutoSQLiteLifetime.h
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/AutoSQLiteLifetime.h
-@@ -0,0 +1,24 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_AutoSQLiteLifetime_h
-+#define mozilla_AutoSQLiteLifetime_h
-+
-+namespace mozilla {
-+
-+class AutoSQLiteLifetime final
-+{
-+private:
-+ static int sSingletonEnforcer;
-+ static int sResult;
-+public:
-+ AutoSQLiteLifetime();
-+ ~AutoSQLiteLifetime();
-+ static int getInitResult() { return AutoSQLiteLifetime::sResult; }
-+};
-+
-+} // namespace mozilla
-+
-+#endif
diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch
index 840fca2..2e72a6d 100644
--- a/xulrunner-24.0-jemalloc-ppc.patch
+++ b/xulrunner-24.0-jemalloc-ppc.patch
@@ -1,12 +1,12 @@
-diff -up firefox-57.0b5/memory/build/mozjemalloc.cpp.old firefox-57.0b5/memory/build/mozjemalloc.cpp
---- firefox-57.0b5/memory/build/mozjemalloc.cpp.old 2017-10-06 12:00:27.938687498 +0200
-+++ firefox-57.0b5/memory/build/mozjemalloc.cpp 2017-10-06 12:02:45.232151309 +0200
-@@ -780,7 +780,7 @@ struct arena_t {
- * controlling the malloc behavior are defined as compile-time constants
- * for best performance and cannot be altered at runtime.
- */
--#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__)
-+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !(defined(__powerpc__))
- #define MALLOC_STATIC_SIZES 1
+diff -up firefox-58.0/memory/build/mozjemalloc.cpp.jemalloc-ppc firefox-58.0/memory/build/mozjemalloc.cpp
+--- firefox-58.0/memory/build/mozjemalloc.cpp.jemalloc-ppc 2018-01-23 13:12:28.618164403 +0100
++++ firefox-58.0/memory/build/mozjemalloc.cpp 2018-01-23 13:18:26.638212523 +0100
+@@ -180,7 +180,7 @@ using namespace mozilla;
+ // Debug builds are opted out too, for test coverage.
+ #ifndef MOZ_DEBUG
+ #if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && \
+- !defined(__aarch64__)
++ !defined(__aarch64__) && !defined(__powerpc__)
+ #define MALLOC_STATIC_PAGESIZE 1
+ #endif
#endif
-
6 years, 2 months
Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/firefox.git/commit/?id=5d35b83763....
Change:
-%ifarch %{arm}
Thanks.
Full change:
============
commit 25470993af5bb82b326577432daeae6a10f13a76
Merge: 3beb38e 5d35b83
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:26:18 2018 +0100
Merge branch 'master' into f26
commit 5d35b83763bfa9d6fa1e45800ffefe0401556a59
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:25:55 2018 +0100
Update to Firefox 58
diff --git a/.gitignore b/.gitignore
index c6c5efe..738876b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -274,3 +274,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-langpacks-57.0.3-20180102.tar.xz
/firefox-57.0.4.source.tar.xz
/firefox-langpacks-57.0.4-20180104.tar.xz
+/firefox-58.0.source.tar.xz
+/firefox-langpacks-58.0-20180123.tar.xz
diff --git a/build-with-nss-3.34.0.patch b/build-with-nss-3.34.0.patch
new file mode 100644
index 0000000..68bc141
--- /dev/null
+++ b/build-with-nss-3.34.0.patch
@@ -0,0 +1,14 @@
+diff -up firefox-58.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-58.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium
+diff -up firefox-58.0/media/webrtc/trunk/Makefile.old firefox-58.0/media/webrtc/trunk/Makefile
+diff -up firefox-58.0/old-configure.in.old firefox-58.0/old-configure.in
+--- firefox-58.0/old-configure.in.old 2018-01-23 14:49:51.771309172 +0100
++++ firefox-58.0/old-configure.in 2018-01-23 14:50:04.091265876 +0100
+@@ -1915,7 +1915,7 @@ MOZ_ARG_WITH_BOOL(system-nss,
+ _USE_SYSTEM_NSS=1 )
+
+ if test -n "$_USE_SYSTEM_NSS"; then
+- AM_PATH_NSS(3.34.1, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
++ AM_PATH_NSS(3.34.0, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
+ fi
+
+ if test -n "$MOZ_SYSTEM_NSS"; then
diff --git a/firefox-fedora-rhbz-1537287-v2.patch b/firefox-fedora-rhbz-1537287-v2.patch
new file mode 100644
index 0000000..e7d314e
--- /dev/null
+++ b/firefox-fedora-rhbz-1537287-v2.patch
@@ -0,0 +1,52 @@
+diff --git a/security/certverifier/NSSCertDBTrustDomain.cpp b/security/certverifier/NSSCertDBTrustDomain.cpp
+--- a/security/certverifier/NSSCertDBTrustDomain.cpp
++++ b/security/certverifier/NSSCertDBTrustDomain.cpp
+@@ -1059,26 +1059,17 @@ InitializeNSS(const nsACString& dir, boo
+ // "/usr/lib/nss/libnssckbi.so".
+ uint32_t flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
+ if (readOnly) {
+ flags |= NSS_INIT_READONLY;
+ }
+ if (!loadPKCS11Modules) {
+ flags |= NSS_INIT_NOMODDB;
+ }
+- // At the moment, sqldb does not work with non-ASCII file paths on Windows.
+- bool useSQLDB = Preferences::GetBool("security.use_sqldb", false) &&
+- (NS_IsNativeUTF8() || NS_IsAscii(PromiseFlatCString(dir).get()));
+ nsAutoCString dbTypeAndDirectory;
+- // Don't change any behavior if the user has specified an alternative database
+- // location with MOZPSM_NSSDBDIR_OVERRIDE.
+- const char* dbDirOverride = getenv("MOZPSM_NSSDBDIR_OVERRIDE");
+- if (useSQLDB && (!dbDirOverride || strlen(dbDirOverride) == 0)) {
+- dbTypeAndDirectory.Append("sql:");
+- }
+ dbTypeAndDirectory.Append(dir);
+ MOZ_LOG(gCertVerifierLog, LogLevel::Debug,
+ ("InitializeNSS(%s, %d, %d)", dbTypeAndDirectory.get(), readOnly,
+ loadPKCS11Modules));
+ SECStatus srv = NSS_Initialize(dbTypeAndDirectory.get(), "", "",
+ SECMOD_DB, flags);
+ if (srv != SECSuccess) {
+ return srv;
+diff --git a/security/manager/ssl/security-prefs.js b/security/manager/ssl/security-prefs.js
+--- a/security/manager/ssl/security-prefs.js
++++ b/security/manager/ssl/security-prefs.js
+@@ -39,17 +39,17 @@ pref("security.ask_for_password",
+ pref("security.password_lifetime", 30);
+
+ // If true, use the modern sqlite-backed certificate and key databases in NSS.
+ // If false, use the default format. Currently the default in NSS is the old
+ // BerkeleyDB format, but this will change in bug 1377940.
+ // Changing this requires a restart to take effect.
+ // Note that the environment variable MOZPSM_NSSDBDIR_OVERRIDE can override both
+ // the behavior of this preference and the NSS default.
+-pref("security.use_sqldb", true);
++pref("security.use_sqldb", false);
+
+ // The supported values of this pref are:
+ // 0: disable detecting Family Safety mode and importing the root
+ // 1: only attempt to detect Family Safety mode (don't import the root)
+ // 2: detect Family Safety mode and import the root
+ // (This is only relevant to Windows 8.1)
+ pref("security.family_safety.mode", 2);
+
diff --git a/firefox.spec b/firefox.spec
index 8b7831d..c75923d 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -94,13 +94,13 @@
Summary: Mozilla Firefox Web browser
Name: firefox
-Version: 57.0.4
-Release: 2%{?pre_tag}%{?dist}
+Version: 58.0
+Release: 1%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version...
%if %{build_langpacks}
-Source1: firefox-langpacks-%{version}%{?pre_version}-20180104.tar.xz
+Source1: firefox-langpacks-%{version}%{?pre_version}-20180123.tar.xz
%endif
Source10: firefox-mozconfig
Source12: firefox-redhat-default-prefs.js
@@ -141,6 +141,8 @@ Patch225: mozilla-1005640-accept-lang.patch
#ARM run-time patch
Patch226: rhbz-1354671.patch
Patch229: firefox-nss-version.patch
+Patch230: firefox-fedora-rhbz-1537287-v2.patch
+Patch231: build-with-nss-3.34.0.patch
# Upstream patches
Patch402: mozilla-1196777.patch
@@ -152,9 +154,6 @@ Patch412: mozilla-1337988.patch
Patch413: mozilla-1353817.patch
Patch416: mozilla-1399611.patch
-# Better compatibility with NSS sql database format, rhbz#1496563
-Patch481: sqlcompat-ff57-1-backport-730495
-
# Debian patches
Patch500: mozilla-440908.patch
@@ -300,10 +299,11 @@ This package contains results of tests executed during build.
%endif
%patch29 -p1 -b .big-endian
%patch31 -p1 -b .ppc64-s390x-curl
-%patch32 -p1 -b .rust-ppc64le
-%ifarch ppc ppc64 ppc64le
-%patch35 -p1 -b .ppc-jit
-%endif
+# Second arch patches - do we still need them?
+#%patch32 -p1 -b .rust-ppc64le
+#%ifarch ppc ppc64 ppc64le
+#%patch35 -p1 -b .ppc-jit
+#%endif
%patch37 -p1 -b .jit-atomic-lucky
%patch3 -p1 -b .arm
@@ -318,25 +318,29 @@ This package contains results of tests executed during build.
%ifarch aarch64
%patch226 -p1 -b .1354671
%endif
+%if 0%{?fedora} < 28
+%patch230 -p1 -b .rhbz-1537287
+%endif
+%patch231 -p1
%patch402 -p1 -b .1196777
%patch406 -p1 -b .256180
-%ifarch %{arm}
-%if 0%{?fedora} < 26
+# Does not apply
+#%ifarch %{arm}
+#%if 0%{?fedora} < 26
# Workaround for mozbz#1337988
-%patch412 -p1 -b .1337988
-%endif
-%endif
+#%patch412 -p1 -b .1337988
+#%endif
+#%endif
%patch413 -p1 -b .1353817
-%patch416 -p1 -b .1399611
-
-%if 0%{?fedora} > 27
-%patch481 -p1 -b .sqlcompat-1
-%endif
+# CSD - Disabled now
+#%patch416 -p1 -b .1399611
# Debian extension patch
-%patch500 -p1 -b .440908
+# Disabled due to new pref module, see
+# https://bugzilla.mozilla.org/show_bug.cgi?id=440908
+#%patch500 -p1 -b .440908
# Patch for big endian platforms only
%if 0%{?big_endian}
@@ -534,7 +538,11 @@ MOZ_SMP_FLAGS=-j1
[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8
%endif
-make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
+#make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
+export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
+export MOZ_SERVICES_SYNC="1"
+export STRIP=/bin/true
+./mach build
# create debuginfo for crash-stats.mozilla.com
%if %{enable_mozilla_crashreporter}
@@ -816,7 +824,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{mozappdir}/browser/omni.ja
%{mozappdir}/browser/icons
%{mozappdir}/chrome.manifest
-%{mozappdir}/run-mozilla.sh
+#%{mozappdir}/run-mozilla.sh
%{mozappdir}/application.ini
%{mozappdir}/pingsender
%exclude %{mozappdir}/removed-files
@@ -857,6 +865,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Tue Jan 23 2018 Martin Stransky <stransky(a)redhat.com> - 58.0-1
+- Update to 58.0
+
* Tue Jan 9 2018 Martin Stransky <stransky(a)redhat.com> - 57.0.4-2
- Try to disable rust debuginfo on arm to have arm builds again (rhbz#1523912)
diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch
index 761fb9e..9e8906f 100644
--- a/mozilla-1170092.patch
+++ b/mozilla-1170092.patch
@@ -1,7 +1,7 @@
-diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
---- firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2017-09-25 10:28:35.413675532 +0200
-+++ firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2017-09-25 10:31:06.394196960 +0200
-@@ -243,9 +243,20 @@ nsresult nsReadConfig::openAndEvaluateJS
+diff -up firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
+--- firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2018-01-11 21:17:03.000000000 +0100
++++ firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2018-01-23 13:59:45.446495820 +0100
+@@ -239,9 +239,20 @@ nsresult nsReadConfig::openAndEvaluateJS
return rv;
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
@@ -24,22 +24,22 @@ diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 fi
} else {
nsAutoCString location("resource://gre/defaults/autoconfig/");
location += aFileName;
-diff -up firefox-56.0/modules/libpref/Preferences.cpp.1170092 firefox-56.0/modules/libpref/Preferences.cpp
---- firefox-56.0/modules/libpref/Preferences.cpp.1170092 2017-09-14 22:15:52.000000000 +0200
-+++ firefox-56.0/modules/libpref/Preferences.cpp 2017-09-25 10:28:35.413675532 +0200
-@@ -1514,6 +1514,8 @@ pref_InitInitialObjects()
- // - jar:$gre/omni.jar!/defaults/preferences/*.js
- // Thus, in omni.jar case, we always load app-specific default preferences
- // from omni.jar, whether or not $app == $gre.
+diff -up firefox-58.0/modules/libpref/Preferences.cpp.1170092 firefox-58.0/modules/libpref/Preferences.cpp
+--- firefox-58.0/modules/libpref/Preferences.cpp.1170092 2018-01-23 13:59:45.447495817 +0100
++++ firefox-58.0/modules/libpref/Preferences.cpp 2018-01-23 14:02:51.456987774 +0100
+@@ -4402,6 +4402,8 @@ pref_InitInitialObjects()
+ //
+ // Thus, in the omni.jar case, we always load app-specific default
+ // preferences from omni.jar, whether or not `$app == $gre`.
+ // At very end load configuration from system config location:
+ // - /etc/firefox/pref/*.js
- nsZipFind *findPtr;
- nsAutoPtr<nsZipFind> find;
-diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/toolkit/xre/nsXREDirProvider.cpp
---- firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2017-09-14 22:16:02.000000000 +0200
-+++ firefox-56.0/toolkit/xre/nsXREDirProvider.cpp 2017-09-25 10:28:35.414675529 +0200
-@@ -58,6 +58,7 @@
+ nsresult rv;
+ nsZipFind* findPtr;
+diff -up firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-58.0/toolkit/xre/nsXREDirProvider.cpp
+--- firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2018-01-11 21:17:06.000000000 +0100
++++ firefox-58.0/toolkit/xre/nsXREDirProvider.cpp 2018-01-23 13:59:45.447495817 +0100
+@@ -59,6 +59,7 @@
#endif
#ifdef XP_UNIX
#include <ctype.h>
@@ -47,7 +47,7 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
#endif
#ifdef XP_IOS
#include "UIKitDirProvider.h"
-@@ -570,6 +571,20 @@ nsXREDirProvider::GetFile(const char* aP
+@@ -554,6 +555,20 @@ nsXREDirProvider::GetFile(const char* aP
}
}
}
@@ -68,7 +68,7 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
if (NS_FAILED(rv) || !file)
return NS_ERROR_FAILURE;
-@@ -935,6 +950,14 @@ nsXREDirProvider::GetFilesInternal(const
+@@ -887,6 +902,14 @@ nsXREDirProvider::GetFilesInternal(const
LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
LoadDirsIntoArray(mAppBundleDirectories,
kAppendPrefDir, directories);
@@ -83,12 +83,12 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
rv = NS_NewArrayEnumerator(aResult, directories);
}
-diff -up firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h
---- firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2017-09-14 22:16:02.000000000 +0200
-+++ firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h 2017-09-25 10:28:35.414675529 +0200
-@@ -62,6 +62,7 @@
+diff -up firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h
+--- firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2018-01-23 13:59:45.447495817 +0100
++++ firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h 2018-01-23 14:02:02.871120476 +0100
+@@ -59,6 +59,7 @@
+ #define NS_APP_PREFS_50_FILE "PrefF"
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL"
- #define NS_EXT_PREFS_DEFAULTS_DIR_LIST "ExtPrefDL"
#define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults
+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration
diff --git a/sources b/sources
index c832d3a..2cd26a2 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (firefox-57.0.4.source.tar.xz) = 58846037aebbf14b85e6b3a46dbe617c780c6916e437ea4ee32a2502a6b55e3689921a0be28b920dedf2f966195df04ac8e45411caeb2601a168ec08b4827cf0
-SHA512 (firefox-langpacks-57.0.4-20180104.tar.xz) = 361b652a0089c4437e8e135f6499b93b875e6c4b6d24118e07e3a8c287f1f045855fb8de36af57baf8ff84f319a0eeba285f50a3ced27bf6c20093ed95f303d0
+SHA512 (firefox-58.0.source.tar.xz) = 17a2c520973c68c5dd130bcb27407b1c20b03f74c97aeb486e86d422ab5c012e549787ae53275d6840b9d324f261ae282b98f61764ee5e0a6df1cc3e3c9e2632
+SHA512 (firefox-langpacks-58.0-20180123.tar.xz) = 6781bf0a5d68bdaa513f85404b8d9111bef8d2aa6d12e1b5fa8db2e4f44fce2d2642b9b5a70a6fc92f0cb96167f6895e17505bdc212aea987240cfb018f340f5
diff --git a/sqlcompat-ff57-1-backport-730495 b/sqlcompat-ff57-1-backport-730495
deleted file mode 100644
index 05b0eaa..0000000
--- a/sqlcompat-ff57-1-backport-730495
+++ /dev/null
@@ -1,524 +0,0 @@
-# HG changeset patch
-# Parent 5de7eafc3ceca2196d84d5b6106e01046efda034
-
-diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp
---- a/security/manager/ssl/nsNSSComponent.cpp
-+++ b/security/manager/ssl/nsNSSComponent.cpp
-@@ -13,7 +13,6 @@
- #include "SharedSSLState.h"
- #include "cert.h"
- #include "certdb.h"
--#include "mozStorageCID.h"
- #include "mozilla/ArrayUtils.h"
- #include "mozilla/Assertions.h"
- #include "mozilla/Casting.h"
-@@ -2038,14 +2037,6 @@ nsNSSComponent::Init()
- return NS_ERROR_NOT_AVAILABLE;
- }
-
-- // To avoid a sqlite3_config race in NSS init, as a workaround for
-- // bug 730495, we require the storage service to get initialized first.
-- nsCOMPtr<nsISupports> storageService =
-- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
-- if (!storageService) {
-- return NS_ERROR_NOT_AVAILABLE;
-- }
--
- MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Beginning NSS initialization\n"));
-
- nsresult rv = InitializePIPNSSBundle();
-diff --git a/storage/TelemetryVFS.cpp b/storage/TelemetryVFS.cpp
---- a/storage/TelemetryVFS.cpp
-+++ b/storage/TelemetryVFS.cpp
-@@ -834,6 +834,11 @@ xNextSystemCall(sqlite3_vfs *vfs, const
- namespace mozilla {
- namespace storage {
-
-+const char *GetVFSName()
-+{
-+ return "telemetry-vfs";
-+}
-+
- sqlite3_vfs* ConstructTelemetryVFS()
- {
- #if defined(XP_WIN)
-@@ -867,7 +872,7 @@ sqlite3_vfs* ConstructTelemetryVFS()
- MOZ_ASSERT(vfs->iVersion <= LAST_KNOWN_VFS_VERSION);
- tvfs->szOsFile = sizeof(telemetry_file) - sizeof(sqlite3_file) + vfs->szOsFile;
- tvfs->mxPathname = vfs->mxPathname;
-- tvfs->zName = "telemetry-vfs";
-+ tvfs->zName = GetVFSName();
- tvfs->pAppData = vfs;
- tvfs->xOpen = xOpen;
- tvfs->xDelete = xDelete;
-diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp
---- a/storage/mozStorageConnection.cpp
-+++ b/storage/mozStorageConnection.cpp
-@@ -73,6 +73,8 @@ namespace storage {
-
- using mozilla::dom::quota::QuotaObject;
-
-+const char *GetVFSName();
-+
- namespace {
-
- int
-@@ -627,7 +629,7 @@ Connection::initialize()
- AUTO_PROFILER_LABEL("Connection::initialize", STORAGE);
-
- // in memory database requested, sqlite uses a magic file name
-- int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, nullptr);
-+ int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, GetVFSName());
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
-@@ -660,7 +662,7 @@ Connection::initialize(nsIFile *aDatabas
- #else
- static const char* sIgnoreLockingVFS = "unix-none";
- #endif
-- const char* vfs = mIgnoreLockingMode ? sIgnoreLockingVFS : nullptr;
-+ const char* vfs = mIgnoreLockingMode ? sIgnoreLockingVFS : GetVFSName();
-
- int srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn,
- mFlags, vfs);
-@@ -694,7 +696,7 @@ Connection::initialize(nsIFileURL *aFile
- rv = aFileURL->GetSpec(spec);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, nullptr);
-+ int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, GetVFSName());
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
-diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
---- a/storage/mozStorageService.cpp
-+++ b/storage/mozStorageService.cpp
-@@ -24,6 +24,7 @@
- #include "mozIStoragePendingStatement.h"
-
- #include "sqlite3.h"
-+#include "mozilla/AutoSQLiteLifetime.h"
-
- #ifdef SQLITE_OS_WIN
- // "windows.h" was included and it can #define lots of things we care about...
-@@ -32,13 +33,6 @@
-
- #include "nsIPromptService.h"
-
--#ifdef MOZ_STORAGE_MEMORY
--# include "mozmemory.h"
--# ifdef MOZ_DMD
--# include "DMD.h"
--# endif
--#endif
--
- ////////////////////////////////////////////////////////////////////////////////
- //// Defines
-
-@@ -282,12 +276,6 @@ Service::~Service()
- if (rc != SQLITE_OK)
- NS_WARNING("Failed to unregister sqlite vfs wrapper.");
-
-- // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
-- // there is nothing actionable we can do in that case.
-- rc = ::sqlite3_shutdown();
-- if (rc != SQLITE_OK)
-- NS_WARNING("sqlite3 did not shutdown cleanly.");
--
- shutdown(); // To release sXPConnect.
-
- gService = nullptr;
-@@ -400,121 +388,7 @@ Service::shutdown()
- }
-
- sqlite3_vfs *ConstructTelemetryVFS();
--
--#ifdef MOZ_STORAGE_MEMORY
--
--namespace {
--
--// By default, SQLite tracks the size of all its heap blocks by adding an extra
--// 8 bytes at the start of the block to hold the size. Unfortunately, this
--// causes a lot of 2^N-sized allocations to be rounded up by jemalloc
--// allocator, wasting memory. For example, a request for 1024 bytes has 8
--// bytes added, becoming a request for 1032 bytes, and jemalloc rounds this up
--// to 2048 bytes, wasting 1012 bytes. (See bug 676189 for more details.)
--//
--// So we register jemalloc as the malloc implementation, which avoids this
--// 8-byte overhead, and thus a lot of waste. This requires us to provide a
--// function, sqliteMemRoundup(), which computes the actual size that will be
--// allocated for a given request. SQLite uses this function before all
--// allocations, and may be able to use any excess bytes caused by the rounding.
--//
--// Note: the wrappers for malloc, realloc and moz_malloc_usable_size are
--// necessary because the sqlite_mem_methods type signatures differ slightly
--// from the standard ones -- they use int instead of size_t. But we don't need
--// a wrapper for free.
--
--#ifdef MOZ_DMD
--
--// sqlite does its own memory accounting, and we use its numbers in our memory
--// reporters. But we don't want sqlite's heap blocks to show up in DMD's
--// output as unreported, so we mark them as reported when they're allocated and
--// mark them as unreported when they are freed.
--//
--// In other words, we are marking all sqlite heap blocks as reported even
--// though we're not reporting them ourselves. Instead we're trusting that
--// sqlite is fully and correctly accounting for all of its heap blocks via its
--// own memory accounting. Well, we don't have to trust it entirely, because
--// it's easy to keep track (while doing this DMD-specific marking) of exactly
--// how much memory SQLite is using. And we can compare that against what
--// SQLite reports it is using.
--
--MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
--MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
--
--#endif
--
--static void *sqliteMemMalloc(int n)
--{
-- void* p = ::malloc(n);
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
--#endif
-- return p;
--}
--
--static void sqliteMemFree(void *p)
--{
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
--#endif
-- ::free(p);
--}
--
--static void *sqliteMemRealloc(void *p, int n)
--{
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-- void *pnew = ::realloc(p, n);
-- if (pnew) {
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
-- } else {
-- // realloc failed; undo the SqliteMallocSizeOfOnFree from above
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-- }
-- return pnew;
--#else
-- return ::realloc(p, n);
--#endif
--}
--
--static int sqliteMemSize(void *p)
--{
-- return ::moz_malloc_usable_size(p);
--}
--
--static int sqliteMemRoundup(int n)
--{
-- n = malloc_good_size(n);
--
-- // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
-- // allocations be 8-aligned. So we round up sub-8 requests to 8. This
-- // wastes a small amount of memory but is obviously safe.
-- return n <= 8 ? 8 : n;
--}
--
--static int sqliteMemInit(void *p)
--{
-- return 0;
--}
--
--static void sqliteMemShutdown(void *p)
--{
--}
--
--const sqlite3_mem_methods memMethods = {
-- &sqliteMemMalloc,
-- &sqliteMemFree,
-- &sqliteMemRealloc,
-- &sqliteMemSize,
-- &sqliteMemRoundup,
-- &sqliteMemInit,
-- &sqliteMemShutdown,
-- nullptr
--};
--
--} // namespace
--
--#endif // MOZ_STORAGE_MEMORY
-+const char *GetVFSName();
-
- static const char* sObserverTopics[] = {
- "memory-pressure",
-@@ -527,28 +401,13 @@ Service::initialize()
- {
- MOZ_ASSERT(NS_IsMainThread(), "Must be initialized on the main thread");
-
-- int rc;
--
--#ifdef MOZ_STORAGE_MEMORY
-- rc = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
-- if (rc != SQLITE_OK)
-- return convertResultCode(rc);
--#endif
--
-- // TODO (bug 1191405): do not preallocate the connections caches until we
-- // have figured the impact on our consumers and memory.
-- sqlite3_config(SQLITE_CONFIG_PAGECACHE, NULL, 0, 0);
--
-- // Explicitly initialize sqlite3. Although this is implicitly called by
-- // various sqlite3 functions (and the sqlite3_open calls in our case),
-- // the documentation suggests calling this directly. So we do.
-- rc = ::sqlite3_initialize();
-+ int rc = AutoSQLiteLifetime::getInitResult();
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
-
- mSqliteVFS = ConstructTelemetryVFS();
- if (mSqliteVFS) {
-- rc = sqlite3_vfs_register(mSqliteVFS, 1);
-+ rc = sqlite3_vfs_register(mSqliteVFS, 0);
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
- } else {
-diff --git a/toolkit/xre/Bootstrap.cpp b/toolkit/xre/Bootstrap.cpp
---- a/toolkit/xre/Bootstrap.cpp
-+++ b/toolkit/xre/Bootstrap.cpp
-@@ -6,11 +6,15 @@
- #include "mozilla/Bootstrap.h"
- #include "nsXPCOM.h"
-
-+#include "AutoSQLiteLifetime.h"
-+
- namespace mozilla {
-
- class BootstrapImpl final : public Bootstrap
- {
- protected:
-+ AutoSQLiteLifetime mSQLLT;
-+
- virtual void Dispose() override
- {
- delete this;
-diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
---- a/toolkit/xre/moz.build
-+++ b/toolkit/xre/moz.build
-@@ -30,7 +30,7 @@ EXPORTS += [
- 'nsIAppStartupNotifier.h',
- ]
-
--EXPORTS.mozilla += ['Bootstrap.h']
-+EXPORTS.mozilla += ['AutoSQLiteLifetime.h', 'Bootstrap.h']
-
- if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
- EXPORTS += ['EventTracer.h']
-@@ -91,6 +91,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
- ]
-
- UNIFIED_SOURCES += [
-+ 'AutoSQLiteLifetime.cpp',
- 'Bootstrap.cpp',
- 'CreateAppData.cpp',
- 'nsAppStartupNotifier.cpp',
-diff --git a/toolkit/xre/AutoSQLiteLifetime.cpp b/toolkit/xre/AutoSQLiteLifetime.cpp
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/AutoSQLiteLifetime.cpp
-@@ -0,0 +1,167 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "nsDebug.h"
-+#include "AutoSQLiteLifetime.h"
-+#include "sqlite3.h"
-+
-+#ifdef MOZ_STORAGE_MEMORY
-+# include "mozmemory.h"
-+# ifdef MOZ_DMD
-+# include "DMD.h"
-+# endif
-+
-+namespace {
-+
-+// By default, SQLite tracks the size of all its heap blocks by adding an extra
-+// 8 bytes at the start of the block to hold the size. Unfortunately, this
-+// causes a lot of 2^N-sized allocations to be rounded up by jemalloc
-+// allocator, wasting memory. For example, a request for 1024 bytes has 8
-+// bytes added, becoming a request for 1032 bytes, and jemalloc rounds this up
-+// to 2048 bytes, wasting 1012 bytes. (See bug 676189 for more details.)
-+//
-+// So we register jemalloc as the malloc implementation, which avoids this
-+// 8-byte overhead, and thus a lot of waste. This requires us to provide a
-+// function, sqliteMemRoundup(), which computes the actual size that will be
-+// allocated for a given request. SQLite uses this function before all
-+// allocations, and may be able to use any excess bytes caused by the rounding.
-+//
-+// Note: the wrappers for malloc, realloc and moz_malloc_usable_size are
-+// necessary because the sqlite_mem_methods type signatures differ slightly
-+// from the standard ones -- they use int instead of size_t. But we don't need
-+// a wrapper for free.
-+
-+#ifdef MOZ_DMD
-+
-+// sqlite does its own memory accounting, and we use its numbers in our memory
-+// reporters. But we don't want sqlite's heap blocks to show up in DMD's
-+// output as unreported, so we mark them as reported when they're allocated and
-+// mark them as unreported when they are freed.
-+//
-+// In other words, we are marking all sqlite heap blocks as reported even
-+// though we're not reporting them ourselves. Instead we're trusting that
-+// sqlite is fully and correctly accounting for all of its heap blocks via its
-+// own memory accounting. Well, we don't have to trust it entirely, because
-+// it's easy to keep track (while doing this DMD-specific marking) of exactly
-+// how much memory SQLite is using. And we can compare that against what
-+// SQLite reports it is using.
-+
-+MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
-+MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
-+
-+#endif
-+
-+static void *sqliteMemMalloc(int n)
-+{
-+ void* p = ::malloc(n);
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-+#endif
-+ return p;
-+}
-+
-+static void sqliteMemFree(void *p)
-+{
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-+#endif
-+ ::free(p);
-+}
-+
-+static void *sqliteMemRealloc(void *p, int n)
-+{
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-+ void *pnew = ::realloc(p, n);
-+ if (pnew) {
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
-+ } else {
-+ // realloc failed; undo the SqliteMallocSizeOfOnFree from above
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-+ }
-+ return pnew;
-+#else
-+ return ::realloc(p, n);
-+#endif
-+}
-+
-+static int sqliteMemSize(void *p)
-+{
-+ return ::moz_malloc_usable_size(p);
-+}
-+
-+static int sqliteMemRoundup(int n)
-+{
-+ n = malloc_good_size(n);
-+
-+ // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
-+ // allocations be 8-aligned. So we round up sub-8 requests to 8. This
-+ // wastes a small amount of memory but is obviously safe.
-+ return n <= 8 ? 8 : n;
-+}
-+
-+static int sqliteMemInit(void *p)
-+{
-+ return 0;
-+}
-+
-+static void sqliteMemShutdown(void *p)
-+{
-+}
-+
-+const sqlite3_mem_methods memMethods = {
-+ &sqliteMemMalloc,
-+ &sqliteMemFree,
-+ &sqliteMemRealloc,
-+ &sqliteMemSize,
-+ &sqliteMemRoundup,
-+ &sqliteMemInit,
-+ &sqliteMemShutdown,
-+ nullptr
-+};
-+
-+} // namespace
-+
-+#endif // MOZ_STORAGE_MEMORY
-+
-+namespace mozilla {
-+
-+AutoSQLiteLifetime::AutoSQLiteLifetime()
-+{
-+ if (++AutoSQLiteLifetime::sSingletonEnforcer != 1) {
-+ NS_RUNTIMEABORT("multiple instances of AutoSQLiteLifetime constructed!");
-+ }
-+
-+#ifdef MOZ_STORAGE_MEMORY
-+ sResult = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
-+#else
-+ sResult = SQLITE_OK;
-+#endif
-+
-+ if (sResult == SQLITE_OK) {
-+ // TODO (bug 1191405): do not preallocate the connections caches until we
-+ // have figured the impact on our consumers and memory.
-+ sqlite3_config(SQLITE_CONFIG_PAGECACHE, NULL, 0, 0);
-+
-+ // Explicitly initialize sqlite3. Although this is implicitly called by
-+ // various sqlite3 functions (and the sqlite3_open calls in our case),
-+ // the documentation suggests calling this directly. So we do.
-+ sResult = ::sqlite3_initialize();
-+ }
-+}
-+
-+AutoSQLiteLifetime::~AutoSQLiteLifetime()
-+{
-+ // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
-+ // there is nothing actionable we can do in that case.
-+ sResult = ::sqlite3_shutdown();
-+ NS_WARNING_ASSERTION(sResult == SQLITE_OK,
-+ "sqlite3 did not shutdown cleanly.");
-+}
-+
-+int AutoSQLiteLifetime::sSingletonEnforcer = 0;
-+int AutoSQLiteLifetime::sResult = SQLITE_MISUSE;
-+
-+} // namespace mozilla
-diff --git a/toolkit/xre/AutoSQLiteLifetime.h b/toolkit/xre/AutoSQLiteLifetime.h
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/AutoSQLiteLifetime.h
-@@ -0,0 +1,24 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_AutoSQLiteLifetime_h
-+#define mozilla_AutoSQLiteLifetime_h
-+
-+namespace mozilla {
-+
-+class AutoSQLiteLifetime final
-+{
-+private:
-+ static int sSingletonEnforcer;
-+ static int sResult;
-+public:
-+ AutoSQLiteLifetime();
-+ ~AutoSQLiteLifetime();
-+ static int getInitResult() { return AutoSQLiteLifetime::sResult; }
-+};
-+
-+} // namespace mozilla
-+
-+#endif
diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch
index 840fca2..2e72a6d 100644
--- a/xulrunner-24.0-jemalloc-ppc.patch
+++ b/xulrunner-24.0-jemalloc-ppc.patch
@@ -1,12 +1,12 @@
-diff -up firefox-57.0b5/memory/build/mozjemalloc.cpp.old firefox-57.0b5/memory/build/mozjemalloc.cpp
---- firefox-57.0b5/memory/build/mozjemalloc.cpp.old 2017-10-06 12:00:27.938687498 +0200
-+++ firefox-57.0b5/memory/build/mozjemalloc.cpp 2017-10-06 12:02:45.232151309 +0200
-@@ -780,7 +780,7 @@ struct arena_t {
- * controlling the malloc behavior are defined as compile-time constants
- * for best performance and cannot be altered at runtime.
- */
--#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__)
-+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !(defined(__powerpc__))
- #define MALLOC_STATIC_SIZES 1
+diff -up firefox-58.0/memory/build/mozjemalloc.cpp.jemalloc-ppc firefox-58.0/memory/build/mozjemalloc.cpp
+--- firefox-58.0/memory/build/mozjemalloc.cpp.jemalloc-ppc 2018-01-23 13:12:28.618164403 +0100
++++ firefox-58.0/memory/build/mozjemalloc.cpp 2018-01-23 13:18:26.638212523 +0100
+@@ -180,7 +180,7 @@ using namespace mozilla;
+ // Debug builds are opted out too, for test coverage.
+ #ifndef MOZ_DEBUG
+ #if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && \
+- !defined(__aarch64__)
++ !defined(__aarch64__) && !defined(__powerpc__)
+ #define MALLOC_STATIC_PAGESIZE 1
+ #endif
#endif
-
6 years, 2 months
Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/firefox.git/commit/?id=5d35b83763....
Change:
-%ifarch %{arm}
Thanks.
Full change:
============
commit 5d35b83763bfa9d6fa1e45800ffefe0401556a59
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:25:55 2018 +0100
Update to Firefox 58
diff --git a/.gitignore b/.gitignore
index c6c5efe..738876b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -274,3 +274,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-langpacks-57.0.3-20180102.tar.xz
/firefox-57.0.4.source.tar.xz
/firefox-langpacks-57.0.4-20180104.tar.xz
+/firefox-58.0.source.tar.xz
+/firefox-langpacks-58.0-20180123.tar.xz
diff --git a/build-with-nss-3.34.0.patch b/build-with-nss-3.34.0.patch
new file mode 100644
index 0000000..68bc141
--- /dev/null
+++ b/build-with-nss-3.34.0.patch
@@ -0,0 +1,14 @@
+diff -up firefox-58.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-58.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium
+diff -up firefox-58.0/media/webrtc/trunk/Makefile.old firefox-58.0/media/webrtc/trunk/Makefile
+diff -up firefox-58.0/old-configure.in.old firefox-58.0/old-configure.in
+--- firefox-58.0/old-configure.in.old 2018-01-23 14:49:51.771309172 +0100
++++ firefox-58.0/old-configure.in 2018-01-23 14:50:04.091265876 +0100
+@@ -1915,7 +1915,7 @@ MOZ_ARG_WITH_BOOL(system-nss,
+ _USE_SYSTEM_NSS=1 )
+
+ if test -n "$_USE_SYSTEM_NSS"; then
+- AM_PATH_NSS(3.34.1, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
++ AM_PATH_NSS(3.34.0, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
+ fi
+
+ if test -n "$MOZ_SYSTEM_NSS"; then
diff --git a/firefox-fedora-rhbz-1537287-v2.patch b/firefox-fedora-rhbz-1537287-v2.patch
new file mode 100644
index 0000000..e7d314e
--- /dev/null
+++ b/firefox-fedora-rhbz-1537287-v2.patch
@@ -0,0 +1,52 @@
+diff --git a/security/certverifier/NSSCertDBTrustDomain.cpp b/security/certverifier/NSSCertDBTrustDomain.cpp
+--- a/security/certverifier/NSSCertDBTrustDomain.cpp
++++ b/security/certverifier/NSSCertDBTrustDomain.cpp
+@@ -1059,26 +1059,17 @@ InitializeNSS(const nsACString& dir, boo
+ // "/usr/lib/nss/libnssckbi.so".
+ uint32_t flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
+ if (readOnly) {
+ flags |= NSS_INIT_READONLY;
+ }
+ if (!loadPKCS11Modules) {
+ flags |= NSS_INIT_NOMODDB;
+ }
+- // At the moment, sqldb does not work with non-ASCII file paths on Windows.
+- bool useSQLDB = Preferences::GetBool("security.use_sqldb", false) &&
+- (NS_IsNativeUTF8() || NS_IsAscii(PromiseFlatCString(dir).get()));
+ nsAutoCString dbTypeAndDirectory;
+- // Don't change any behavior if the user has specified an alternative database
+- // location with MOZPSM_NSSDBDIR_OVERRIDE.
+- const char* dbDirOverride = getenv("MOZPSM_NSSDBDIR_OVERRIDE");
+- if (useSQLDB && (!dbDirOverride || strlen(dbDirOverride) == 0)) {
+- dbTypeAndDirectory.Append("sql:");
+- }
+ dbTypeAndDirectory.Append(dir);
+ MOZ_LOG(gCertVerifierLog, LogLevel::Debug,
+ ("InitializeNSS(%s, %d, %d)", dbTypeAndDirectory.get(), readOnly,
+ loadPKCS11Modules));
+ SECStatus srv = NSS_Initialize(dbTypeAndDirectory.get(), "", "",
+ SECMOD_DB, flags);
+ if (srv != SECSuccess) {
+ return srv;
+diff --git a/security/manager/ssl/security-prefs.js b/security/manager/ssl/security-prefs.js
+--- a/security/manager/ssl/security-prefs.js
++++ b/security/manager/ssl/security-prefs.js
+@@ -39,17 +39,17 @@ pref("security.ask_for_password",
+ pref("security.password_lifetime", 30);
+
+ // If true, use the modern sqlite-backed certificate and key databases in NSS.
+ // If false, use the default format. Currently the default in NSS is the old
+ // BerkeleyDB format, but this will change in bug 1377940.
+ // Changing this requires a restart to take effect.
+ // Note that the environment variable MOZPSM_NSSDBDIR_OVERRIDE can override both
+ // the behavior of this preference and the NSS default.
+-pref("security.use_sqldb", true);
++pref("security.use_sqldb", false);
+
+ // The supported values of this pref are:
+ // 0: disable detecting Family Safety mode and importing the root
+ // 1: only attempt to detect Family Safety mode (don't import the root)
+ // 2: detect Family Safety mode and import the root
+ // (This is only relevant to Windows 8.1)
+ pref("security.family_safety.mode", 2);
+
diff --git a/firefox.spec b/firefox.spec
index 8b7831d..c75923d 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -94,13 +94,13 @@
Summary: Mozilla Firefox Web browser
Name: firefox
-Version: 57.0.4
-Release: 2%{?pre_tag}%{?dist}
+Version: 58.0
+Release: 1%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version...
%if %{build_langpacks}
-Source1: firefox-langpacks-%{version}%{?pre_version}-20180104.tar.xz
+Source1: firefox-langpacks-%{version}%{?pre_version}-20180123.tar.xz
%endif
Source10: firefox-mozconfig
Source12: firefox-redhat-default-prefs.js
@@ -141,6 +141,8 @@ Patch225: mozilla-1005640-accept-lang.patch
#ARM run-time patch
Patch226: rhbz-1354671.patch
Patch229: firefox-nss-version.patch
+Patch230: firefox-fedora-rhbz-1537287-v2.patch
+Patch231: build-with-nss-3.34.0.patch
# Upstream patches
Patch402: mozilla-1196777.patch
@@ -152,9 +154,6 @@ Patch412: mozilla-1337988.patch
Patch413: mozilla-1353817.patch
Patch416: mozilla-1399611.patch
-# Better compatibility with NSS sql database format, rhbz#1496563
-Patch481: sqlcompat-ff57-1-backport-730495
-
# Debian patches
Patch500: mozilla-440908.patch
@@ -300,10 +299,11 @@ This package contains results of tests executed during build.
%endif
%patch29 -p1 -b .big-endian
%patch31 -p1 -b .ppc64-s390x-curl
-%patch32 -p1 -b .rust-ppc64le
-%ifarch ppc ppc64 ppc64le
-%patch35 -p1 -b .ppc-jit
-%endif
+# Second arch patches - do we still need them?
+#%patch32 -p1 -b .rust-ppc64le
+#%ifarch ppc ppc64 ppc64le
+#%patch35 -p1 -b .ppc-jit
+#%endif
%patch37 -p1 -b .jit-atomic-lucky
%patch3 -p1 -b .arm
@@ -318,25 +318,29 @@ This package contains results of tests executed during build.
%ifarch aarch64
%patch226 -p1 -b .1354671
%endif
+%if 0%{?fedora} < 28
+%patch230 -p1 -b .rhbz-1537287
+%endif
+%patch231 -p1
%patch402 -p1 -b .1196777
%patch406 -p1 -b .256180
-%ifarch %{arm}
-%if 0%{?fedora} < 26
+# Does not apply
+#%ifarch %{arm}
+#%if 0%{?fedora} < 26
# Workaround for mozbz#1337988
-%patch412 -p1 -b .1337988
-%endif
-%endif
+#%patch412 -p1 -b .1337988
+#%endif
+#%endif
%patch413 -p1 -b .1353817
-%patch416 -p1 -b .1399611
-
-%if 0%{?fedora} > 27
-%patch481 -p1 -b .sqlcompat-1
-%endif
+# CSD - Disabled now
+#%patch416 -p1 -b .1399611
# Debian extension patch
-%patch500 -p1 -b .440908
+# Disabled due to new pref module, see
+# https://bugzilla.mozilla.org/show_bug.cgi?id=440908
+#%patch500 -p1 -b .440908
# Patch for big endian platforms only
%if 0%{?big_endian}
@@ -534,7 +538,11 @@ MOZ_SMP_FLAGS=-j1
[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8
%endif
-make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
+#make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
+export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
+export MOZ_SERVICES_SYNC="1"
+export STRIP=/bin/true
+./mach build
# create debuginfo for crash-stats.mozilla.com
%if %{enable_mozilla_crashreporter}
@@ -816,7 +824,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{mozappdir}/browser/omni.ja
%{mozappdir}/browser/icons
%{mozappdir}/chrome.manifest
-%{mozappdir}/run-mozilla.sh
+#%{mozappdir}/run-mozilla.sh
%{mozappdir}/application.ini
%{mozappdir}/pingsender
%exclude %{mozappdir}/removed-files
@@ -857,6 +865,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Tue Jan 23 2018 Martin Stransky <stransky(a)redhat.com> - 58.0-1
+- Update to 58.0
+
* Tue Jan 9 2018 Martin Stransky <stransky(a)redhat.com> - 57.0.4-2
- Try to disable rust debuginfo on arm to have arm builds again (rhbz#1523912)
diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch
index 761fb9e..9e8906f 100644
--- a/mozilla-1170092.patch
+++ b/mozilla-1170092.patch
@@ -1,7 +1,7 @@
-diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
---- firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2017-09-25 10:28:35.413675532 +0200
-+++ firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2017-09-25 10:31:06.394196960 +0200
-@@ -243,9 +243,20 @@ nsresult nsReadConfig::openAndEvaluateJS
+diff -up firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
+--- firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2018-01-11 21:17:03.000000000 +0100
++++ firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2018-01-23 13:59:45.446495820 +0100
+@@ -239,9 +239,20 @@ nsresult nsReadConfig::openAndEvaluateJS
return rv;
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
@@ -24,22 +24,22 @@ diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 fi
} else {
nsAutoCString location("resource://gre/defaults/autoconfig/");
location += aFileName;
-diff -up firefox-56.0/modules/libpref/Preferences.cpp.1170092 firefox-56.0/modules/libpref/Preferences.cpp
---- firefox-56.0/modules/libpref/Preferences.cpp.1170092 2017-09-14 22:15:52.000000000 +0200
-+++ firefox-56.0/modules/libpref/Preferences.cpp 2017-09-25 10:28:35.413675532 +0200
-@@ -1514,6 +1514,8 @@ pref_InitInitialObjects()
- // - jar:$gre/omni.jar!/defaults/preferences/*.js
- // Thus, in omni.jar case, we always load app-specific default preferences
- // from omni.jar, whether or not $app == $gre.
+diff -up firefox-58.0/modules/libpref/Preferences.cpp.1170092 firefox-58.0/modules/libpref/Preferences.cpp
+--- firefox-58.0/modules/libpref/Preferences.cpp.1170092 2018-01-23 13:59:45.447495817 +0100
++++ firefox-58.0/modules/libpref/Preferences.cpp 2018-01-23 14:02:51.456987774 +0100
+@@ -4402,6 +4402,8 @@ pref_InitInitialObjects()
+ //
+ // Thus, in the omni.jar case, we always load app-specific default
+ // preferences from omni.jar, whether or not `$app == $gre`.
+ // At very end load configuration from system config location:
+ // - /etc/firefox/pref/*.js
- nsZipFind *findPtr;
- nsAutoPtr<nsZipFind> find;
-diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/toolkit/xre/nsXREDirProvider.cpp
---- firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2017-09-14 22:16:02.000000000 +0200
-+++ firefox-56.0/toolkit/xre/nsXREDirProvider.cpp 2017-09-25 10:28:35.414675529 +0200
-@@ -58,6 +58,7 @@
+ nsresult rv;
+ nsZipFind* findPtr;
+diff -up firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-58.0/toolkit/xre/nsXREDirProvider.cpp
+--- firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2018-01-11 21:17:06.000000000 +0100
++++ firefox-58.0/toolkit/xre/nsXREDirProvider.cpp 2018-01-23 13:59:45.447495817 +0100
+@@ -59,6 +59,7 @@
#endif
#ifdef XP_UNIX
#include <ctype.h>
@@ -47,7 +47,7 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
#endif
#ifdef XP_IOS
#include "UIKitDirProvider.h"
-@@ -570,6 +571,20 @@ nsXREDirProvider::GetFile(const char* aP
+@@ -554,6 +555,20 @@ nsXREDirProvider::GetFile(const char* aP
}
}
}
@@ -68,7 +68,7 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
if (NS_FAILED(rv) || !file)
return NS_ERROR_FAILURE;
-@@ -935,6 +950,14 @@ nsXREDirProvider::GetFilesInternal(const
+@@ -887,6 +902,14 @@ nsXREDirProvider::GetFilesInternal(const
LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
LoadDirsIntoArray(mAppBundleDirectories,
kAppendPrefDir, directories);
@@ -83,12 +83,12 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
rv = NS_NewArrayEnumerator(aResult, directories);
}
-diff -up firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h
---- firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2017-09-14 22:16:02.000000000 +0200
-+++ firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h 2017-09-25 10:28:35.414675529 +0200
-@@ -62,6 +62,7 @@
+diff -up firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h
+--- firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2018-01-23 13:59:45.447495817 +0100
++++ firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h 2018-01-23 14:02:02.871120476 +0100
+@@ -59,6 +59,7 @@
+ #define NS_APP_PREFS_50_FILE "PrefF"
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL"
- #define NS_EXT_PREFS_DEFAULTS_DIR_LIST "ExtPrefDL"
#define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults
+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration
diff --git a/sources b/sources
index c832d3a..2cd26a2 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (firefox-57.0.4.source.tar.xz) = 58846037aebbf14b85e6b3a46dbe617c780c6916e437ea4ee32a2502a6b55e3689921a0be28b920dedf2f966195df04ac8e45411caeb2601a168ec08b4827cf0
-SHA512 (firefox-langpacks-57.0.4-20180104.tar.xz) = 361b652a0089c4437e8e135f6499b93b875e6c4b6d24118e07e3a8c287f1f045855fb8de36af57baf8ff84f319a0eeba285f50a3ced27bf6c20093ed95f303d0
+SHA512 (firefox-58.0.source.tar.xz) = 17a2c520973c68c5dd130bcb27407b1c20b03f74c97aeb486e86d422ab5c012e549787ae53275d6840b9d324f261ae282b98f61764ee5e0a6df1cc3e3c9e2632
+SHA512 (firefox-langpacks-58.0-20180123.tar.xz) = 6781bf0a5d68bdaa513f85404b8d9111bef8d2aa6d12e1b5fa8db2e4f44fce2d2642b9b5a70a6fc92f0cb96167f6895e17505bdc212aea987240cfb018f340f5
diff --git a/sqlcompat-ff57-1-backport-730495 b/sqlcompat-ff57-1-backport-730495
deleted file mode 100644
index 05b0eaa..0000000
--- a/sqlcompat-ff57-1-backport-730495
+++ /dev/null
@@ -1,524 +0,0 @@
-# HG changeset patch
-# Parent 5de7eafc3ceca2196d84d5b6106e01046efda034
-
-diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp
---- a/security/manager/ssl/nsNSSComponent.cpp
-+++ b/security/manager/ssl/nsNSSComponent.cpp
-@@ -13,7 +13,6 @@
- #include "SharedSSLState.h"
- #include "cert.h"
- #include "certdb.h"
--#include "mozStorageCID.h"
- #include "mozilla/ArrayUtils.h"
- #include "mozilla/Assertions.h"
- #include "mozilla/Casting.h"
-@@ -2038,14 +2037,6 @@ nsNSSComponent::Init()
- return NS_ERROR_NOT_AVAILABLE;
- }
-
-- // To avoid a sqlite3_config race in NSS init, as a workaround for
-- // bug 730495, we require the storage service to get initialized first.
-- nsCOMPtr<nsISupports> storageService =
-- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
-- if (!storageService) {
-- return NS_ERROR_NOT_AVAILABLE;
-- }
--
- MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Beginning NSS initialization\n"));
-
- nsresult rv = InitializePIPNSSBundle();
-diff --git a/storage/TelemetryVFS.cpp b/storage/TelemetryVFS.cpp
---- a/storage/TelemetryVFS.cpp
-+++ b/storage/TelemetryVFS.cpp
-@@ -834,6 +834,11 @@ xNextSystemCall(sqlite3_vfs *vfs, const
- namespace mozilla {
- namespace storage {
-
-+const char *GetVFSName()
-+{
-+ return "telemetry-vfs";
-+}
-+
- sqlite3_vfs* ConstructTelemetryVFS()
- {
- #if defined(XP_WIN)
-@@ -867,7 +872,7 @@ sqlite3_vfs* ConstructTelemetryVFS()
- MOZ_ASSERT(vfs->iVersion <= LAST_KNOWN_VFS_VERSION);
- tvfs->szOsFile = sizeof(telemetry_file) - sizeof(sqlite3_file) + vfs->szOsFile;
- tvfs->mxPathname = vfs->mxPathname;
-- tvfs->zName = "telemetry-vfs";
-+ tvfs->zName = GetVFSName();
- tvfs->pAppData = vfs;
- tvfs->xOpen = xOpen;
- tvfs->xDelete = xDelete;
-diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp
---- a/storage/mozStorageConnection.cpp
-+++ b/storage/mozStorageConnection.cpp
-@@ -73,6 +73,8 @@ namespace storage {
-
- using mozilla::dom::quota::QuotaObject;
-
-+const char *GetVFSName();
-+
- namespace {
-
- int
-@@ -627,7 +629,7 @@ Connection::initialize()
- AUTO_PROFILER_LABEL("Connection::initialize", STORAGE);
-
- // in memory database requested, sqlite uses a magic file name
-- int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, nullptr);
-+ int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, GetVFSName());
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
-@@ -660,7 +662,7 @@ Connection::initialize(nsIFile *aDatabas
- #else
- static const char* sIgnoreLockingVFS = "unix-none";
- #endif
-- const char* vfs = mIgnoreLockingMode ? sIgnoreLockingVFS : nullptr;
-+ const char* vfs = mIgnoreLockingMode ? sIgnoreLockingVFS : GetVFSName();
-
- int srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn,
- mFlags, vfs);
-@@ -694,7 +696,7 @@ Connection::initialize(nsIFileURL *aFile
- rv = aFileURL->GetSpec(spec);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, nullptr);
-+ int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, GetVFSName());
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
-diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
---- a/storage/mozStorageService.cpp
-+++ b/storage/mozStorageService.cpp
-@@ -24,6 +24,7 @@
- #include "mozIStoragePendingStatement.h"
-
- #include "sqlite3.h"
-+#include "mozilla/AutoSQLiteLifetime.h"
-
- #ifdef SQLITE_OS_WIN
- // "windows.h" was included and it can #define lots of things we care about...
-@@ -32,13 +33,6 @@
-
- #include "nsIPromptService.h"
-
--#ifdef MOZ_STORAGE_MEMORY
--# include "mozmemory.h"
--# ifdef MOZ_DMD
--# include "DMD.h"
--# endif
--#endif
--
- ////////////////////////////////////////////////////////////////////////////////
- //// Defines
-
-@@ -282,12 +276,6 @@ Service::~Service()
- if (rc != SQLITE_OK)
- NS_WARNING("Failed to unregister sqlite vfs wrapper.");
-
-- // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
-- // there is nothing actionable we can do in that case.
-- rc = ::sqlite3_shutdown();
-- if (rc != SQLITE_OK)
-- NS_WARNING("sqlite3 did not shutdown cleanly.");
--
- shutdown(); // To release sXPConnect.
-
- gService = nullptr;
-@@ -400,121 +388,7 @@ Service::shutdown()
- }
-
- sqlite3_vfs *ConstructTelemetryVFS();
--
--#ifdef MOZ_STORAGE_MEMORY
--
--namespace {
--
--// By default, SQLite tracks the size of all its heap blocks by adding an extra
--// 8 bytes at the start of the block to hold the size. Unfortunately, this
--// causes a lot of 2^N-sized allocations to be rounded up by jemalloc
--// allocator, wasting memory. For example, a request for 1024 bytes has 8
--// bytes added, becoming a request for 1032 bytes, and jemalloc rounds this up
--// to 2048 bytes, wasting 1012 bytes. (See bug 676189 for more details.)
--//
--// So we register jemalloc as the malloc implementation, which avoids this
--// 8-byte overhead, and thus a lot of waste. This requires us to provide a
--// function, sqliteMemRoundup(), which computes the actual size that will be
--// allocated for a given request. SQLite uses this function before all
--// allocations, and may be able to use any excess bytes caused by the rounding.
--//
--// Note: the wrappers for malloc, realloc and moz_malloc_usable_size are
--// necessary because the sqlite_mem_methods type signatures differ slightly
--// from the standard ones -- they use int instead of size_t. But we don't need
--// a wrapper for free.
--
--#ifdef MOZ_DMD
--
--// sqlite does its own memory accounting, and we use its numbers in our memory
--// reporters. But we don't want sqlite's heap blocks to show up in DMD's
--// output as unreported, so we mark them as reported when they're allocated and
--// mark them as unreported when they are freed.
--//
--// In other words, we are marking all sqlite heap blocks as reported even
--// though we're not reporting them ourselves. Instead we're trusting that
--// sqlite is fully and correctly accounting for all of its heap blocks via its
--// own memory accounting. Well, we don't have to trust it entirely, because
--// it's easy to keep track (while doing this DMD-specific marking) of exactly
--// how much memory SQLite is using. And we can compare that against what
--// SQLite reports it is using.
--
--MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
--MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
--
--#endif
--
--static void *sqliteMemMalloc(int n)
--{
-- void* p = ::malloc(n);
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
--#endif
-- return p;
--}
--
--static void sqliteMemFree(void *p)
--{
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
--#endif
-- ::free(p);
--}
--
--static void *sqliteMemRealloc(void *p, int n)
--{
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-- void *pnew = ::realloc(p, n);
-- if (pnew) {
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
-- } else {
-- // realloc failed; undo the SqliteMallocSizeOfOnFree from above
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-- }
-- return pnew;
--#else
-- return ::realloc(p, n);
--#endif
--}
--
--static int sqliteMemSize(void *p)
--{
-- return ::moz_malloc_usable_size(p);
--}
--
--static int sqliteMemRoundup(int n)
--{
-- n = malloc_good_size(n);
--
-- // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
-- // allocations be 8-aligned. So we round up sub-8 requests to 8. This
-- // wastes a small amount of memory but is obviously safe.
-- return n <= 8 ? 8 : n;
--}
--
--static int sqliteMemInit(void *p)
--{
-- return 0;
--}
--
--static void sqliteMemShutdown(void *p)
--{
--}
--
--const sqlite3_mem_methods memMethods = {
-- &sqliteMemMalloc,
-- &sqliteMemFree,
-- &sqliteMemRealloc,
-- &sqliteMemSize,
-- &sqliteMemRoundup,
-- &sqliteMemInit,
-- &sqliteMemShutdown,
-- nullptr
--};
--
--} // namespace
--
--#endif // MOZ_STORAGE_MEMORY
-+const char *GetVFSName();
-
- static const char* sObserverTopics[] = {
- "memory-pressure",
-@@ -527,28 +401,13 @@ Service::initialize()
- {
- MOZ_ASSERT(NS_IsMainThread(), "Must be initialized on the main thread");
-
-- int rc;
--
--#ifdef MOZ_STORAGE_MEMORY
-- rc = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
-- if (rc != SQLITE_OK)
-- return convertResultCode(rc);
--#endif
--
-- // TODO (bug 1191405): do not preallocate the connections caches until we
-- // have figured the impact on our consumers and memory.
-- sqlite3_config(SQLITE_CONFIG_PAGECACHE, NULL, 0, 0);
--
-- // Explicitly initialize sqlite3. Although this is implicitly called by
-- // various sqlite3 functions (and the sqlite3_open calls in our case),
-- // the documentation suggests calling this directly. So we do.
-- rc = ::sqlite3_initialize();
-+ int rc = AutoSQLiteLifetime::getInitResult();
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
-
- mSqliteVFS = ConstructTelemetryVFS();
- if (mSqliteVFS) {
-- rc = sqlite3_vfs_register(mSqliteVFS, 1);
-+ rc = sqlite3_vfs_register(mSqliteVFS, 0);
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
- } else {
-diff --git a/toolkit/xre/Bootstrap.cpp b/toolkit/xre/Bootstrap.cpp
---- a/toolkit/xre/Bootstrap.cpp
-+++ b/toolkit/xre/Bootstrap.cpp
-@@ -6,11 +6,15 @@
- #include "mozilla/Bootstrap.h"
- #include "nsXPCOM.h"
-
-+#include "AutoSQLiteLifetime.h"
-+
- namespace mozilla {
-
- class BootstrapImpl final : public Bootstrap
- {
- protected:
-+ AutoSQLiteLifetime mSQLLT;
-+
- virtual void Dispose() override
- {
- delete this;
-diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
---- a/toolkit/xre/moz.build
-+++ b/toolkit/xre/moz.build
-@@ -30,7 +30,7 @@ EXPORTS += [
- 'nsIAppStartupNotifier.h',
- ]
-
--EXPORTS.mozilla += ['Bootstrap.h']
-+EXPORTS.mozilla += ['AutoSQLiteLifetime.h', 'Bootstrap.h']
-
- if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
- EXPORTS += ['EventTracer.h']
-@@ -91,6 +91,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
- ]
-
- UNIFIED_SOURCES += [
-+ 'AutoSQLiteLifetime.cpp',
- 'Bootstrap.cpp',
- 'CreateAppData.cpp',
- 'nsAppStartupNotifier.cpp',
-diff --git a/toolkit/xre/AutoSQLiteLifetime.cpp b/toolkit/xre/AutoSQLiteLifetime.cpp
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/AutoSQLiteLifetime.cpp
-@@ -0,0 +1,167 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "nsDebug.h"
-+#include "AutoSQLiteLifetime.h"
-+#include "sqlite3.h"
-+
-+#ifdef MOZ_STORAGE_MEMORY
-+# include "mozmemory.h"
-+# ifdef MOZ_DMD
-+# include "DMD.h"
-+# endif
-+
-+namespace {
-+
-+// By default, SQLite tracks the size of all its heap blocks by adding an extra
-+// 8 bytes at the start of the block to hold the size. Unfortunately, this
-+// causes a lot of 2^N-sized allocations to be rounded up by jemalloc
-+// allocator, wasting memory. For example, a request for 1024 bytes has 8
-+// bytes added, becoming a request for 1032 bytes, and jemalloc rounds this up
-+// to 2048 bytes, wasting 1012 bytes. (See bug 676189 for more details.)
-+//
-+// So we register jemalloc as the malloc implementation, which avoids this
-+// 8-byte overhead, and thus a lot of waste. This requires us to provide a
-+// function, sqliteMemRoundup(), which computes the actual size that will be
-+// allocated for a given request. SQLite uses this function before all
-+// allocations, and may be able to use any excess bytes caused by the rounding.
-+//
-+// Note: the wrappers for malloc, realloc and moz_malloc_usable_size are
-+// necessary because the sqlite_mem_methods type signatures differ slightly
-+// from the standard ones -- they use int instead of size_t. But we don't need
-+// a wrapper for free.
-+
-+#ifdef MOZ_DMD
-+
-+// sqlite does its own memory accounting, and we use its numbers in our memory
-+// reporters. But we don't want sqlite's heap blocks to show up in DMD's
-+// output as unreported, so we mark them as reported when they're allocated and
-+// mark them as unreported when they are freed.
-+//
-+// In other words, we are marking all sqlite heap blocks as reported even
-+// though we're not reporting them ourselves. Instead we're trusting that
-+// sqlite is fully and correctly accounting for all of its heap blocks via its
-+// own memory accounting. Well, we don't have to trust it entirely, because
-+// it's easy to keep track (while doing this DMD-specific marking) of exactly
-+// how much memory SQLite is using. And we can compare that against what
-+// SQLite reports it is using.
-+
-+MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
-+MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
-+
-+#endif
-+
-+static void *sqliteMemMalloc(int n)
-+{
-+ void* p = ::malloc(n);
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-+#endif
-+ return p;
-+}
-+
-+static void sqliteMemFree(void *p)
-+{
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-+#endif
-+ ::free(p);
-+}
-+
-+static void *sqliteMemRealloc(void *p, int n)
-+{
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-+ void *pnew = ::realloc(p, n);
-+ if (pnew) {
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
-+ } else {
-+ // realloc failed; undo the SqliteMallocSizeOfOnFree from above
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-+ }
-+ return pnew;
-+#else
-+ return ::realloc(p, n);
-+#endif
-+}
-+
-+static int sqliteMemSize(void *p)
-+{
-+ return ::moz_malloc_usable_size(p);
-+}
-+
-+static int sqliteMemRoundup(int n)
-+{
-+ n = malloc_good_size(n);
-+
-+ // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
-+ // allocations be 8-aligned. So we round up sub-8 requests to 8. This
-+ // wastes a small amount of memory but is obviously safe.
-+ return n <= 8 ? 8 : n;
-+}
-+
-+static int sqliteMemInit(void *p)
-+{
-+ return 0;
-+}
-+
-+static void sqliteMemShutdown(void *p)
-+{
-+}
-+
-+const sqlite3_mem_methods memMethods = {
-+ &sqliteMemMalloc,
-+ &sqliteMemFree,
-+ &sqliteMemRealloc,
-+ &sqliteMemSize,
-+ &sqliteMemRoundup,
-+ &sqliteMemInit,
-+ &sqliteMemShutdown,
-+ nullptr
-+};
-+
-+} // namespace
-+
-+#endif // MOZ_STORAGE_MEMORY
-+
-+namespace mozilla {
-+
-+AutoSQLiteLifetime::AutoSQLiteLifetime()
-+{
-+ if (++AutoSQLiteLifetime::sSingletonEnforcer != 1) {
-+ NS_RUNTIMEABORT("multiple instances of AutoSQLiteLifetime constructed!");
-+ }
-+
-+#ifdef MOZ_STORAGE_MEMORY
-+ sResult = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
-+#else
-+ sResult = SQLITE_OK;
-+#endif
-+
-+ if (sResult == SQLITE_OK) {
-+ // TODO (bug 1191405): do not preallocate the connections caches until we
-+ // have figured the impact on our consumers and memory.
-+ sqlite3_config(SQLITE_CONFIG_PAGECACHE, NULL, 0, 0);
-+
-+ // Explicitly initialize sqlite3. Although this is implicitly called by
-+ // various sqlite3 functions (and the sqlite3_open calls in our case),
-+ // the documentation suggests calling this directly. So we do.
-+ sResult = ::sqlite3_initialize();
-+ }
-+}
-+
-+AutoSQLiteLifetime::~AutoSQLiteLifetime()
-+{
-+ // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
-+ // there is nothing actionable we can do in that case.
-+ sResult = ::sqlite3_shutdown();
-+ NS_WARNING_ASSERTION(sResult == SQLITE_OK,
-+ "sqlite3 did not shutdown cleanly.");
-+}
-+
-+int AutoSQLiteLifetime::sSingletonEnforcer = 0;
-+int AutoSQLiteLifetime::sResult = SQLITE_MISUSE;
-+
-+} // namespace mozilla
-diff --git a/toolkit/xre/AutoSQLiteLifetime.h b/toolkit/xre/AutoSQLiteLifetime.h
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/AutoSQLiteLifetime.h
-@@ -0,0 +1,24 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_AutoSQLiteLifetime_h
-+#define mozilla_AutoSQLiteLifetime_h
-+
-+namespace mozilla {
-+
-+class AutoSQLiteLifetime final
-+{
-+private:
-+ static int sSingletonEnforcer;
-+ static int sResult;
-+public:
-+ AutoSQLiteLifetime();
-+ ~AutoSQLiteLifetime();
-+ static int getInitResult() { return AutoSQLiteLifetime::sResult; }
-+};
-+
-+} // namespace mozilla
-+
-+#endif
diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch
index 840fca2..2e72a6d 100644
--- a/xulrunner-24.0-jemalloc-ppc.patch
+++ b/xulrunner-24.0-jemalloc-ppc.patch
@@ -1,12 +1,12 @@
-diff -up firefox-57.0b5/memory/build/mozjemalloc.cpp.old firefox-57.0b5/memory/build/mozjemalloc.cpp
---- firefox-57.0b5/memory/build/mozjemalloc.cpp.old 2017-10-06 12:00:27.938687498 +0200
-+++ firefox-57.0b5/memory/build/mozjemalloc.cpp 2017-10-06 12:02:45.232151309 +0200
-@@ -780,7 +780,7 @@ struct arena_t {
- * controlling the malloc behavior are defined as compile-time constants
- * for best performance and cannot be altered at runtime.
- */
--#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__)
-+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !(defined(__powerpc__))
- #define MALLOC_STATIC_SIZES 1
+diff -up firefox-58.0/memory/build/mozjemalloc.cpp.jemalloc-ppc firefox-58.0/memory/build/mozjemalloc.cpp
+--- firefox-58.0/memory/build/mozjemalloc.cpp.jemalloc-ppc 2018-01-23 13:12:28.618164403 +0100
++++ firefox-58.0/memory/build/mozjemalloc.cpp 2018-01-23 13:18:26.638212523 +0100
+@@ -180,7 +180,7 @@ using namespace mozilla;
+ // Debug builds are opted out too, for test coverage.
+ #ifndef MOZ_DEBUG
+ #if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && \
+- !defined(__aarch64__)
++ !defined(__aarch64__) && !defined(__powerpc__)
+ #define MALLOC_STATIC_PAGESIZE 1
+ #endif
#endif
-
6 years, 2 months
Architecture specific change in rpms/firefox.git
by githook-noreply@fedoraproject.org
The package rpms/firefox.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/firefox.git/commit/?id=5d35b83763....
Change:
-%ifarch %{arm}
Thanks.
Full change:
============
commit 5d35b83763bfa9d6fa1e45800ffefe0401556a59
Author: Martin Stransky <stransky(a)redhat.com>
Date: Tue Jan 23 20:25:55 2018 +0100
Update to Firefox 58
diff --git a/.gitignore b/.gitignore
index c6c5efe..738876b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -274,3 +274,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-langpacks-57.0.3-20180102.tar.xz
/firefox-57.0.4.source.tar.xz
/firefox-langpacks-57.0.4-20180104.tar.xz
+/firefox-58.0.source.tar.xz
+/firefox-langpacks-58.0-20180123.tar.xz
diff --git a/build-with-nss-3.34.0.patch b/build-with-nss-3.34.0.patch
new file mode 100644
index 0000000..68bc141
--- /dev/null
+++ b/build-with-nss-3.34.0.patch
@@ -0,0 +1,14 @@
+diff -up firefox-58.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium.old firefox-58.0/media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS.chromium
+diff -up firefox-58.0/media/webrtc/trunk/Makefile.old firefox-58.0/media/webrtc/trunk/Makefile
+diff -up firefox-58.0/old-configure.in.old firefox-58.0/old-configure.in
+--- firefox-58.0/old-configure.in.old 2018-01-23 14:49:51.771309172 +0100
++++ firefox-58.0/old-configure.in 2018-01-23 14:50:04.091265876 +0100
+@@ -1915,7 +1915,7 @@ MOZ_ARG_WITH_BOOL(system-nss,
+ _USE_SYSTEM_NSS=1 )
+
+ if test -n "$_USE_SYSTEM_NSS"; then
+- AM_PATH_NSS(3.34.1, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
++ AM_PATH_NSS(3.34.0, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
+ fi
+
+ if test -n "$MOZ_SYSTEM_NSS"; then
diff --git a/firefox-fedora-rhbz-1537287-v2.patch b/firefox-fedora-rhbz-1537287-v2.patch
new file mode 100644
index 0000000..e7d314e
--- /dev/null
+++ b/firefox-fedora-rhbz-1537287-v2.patch
@@ -0,0 +1,52 @@
+diff --git a/security/certverifier/NSSCertDBTrustDomain.cpp b/security/certverifier/NSSCertDBTrustDomain.cpp
+--- a/security/certverifier/NSSCertDBTrustDomain.cpp
++++ b/security/certverifier/NSSCertDBTrustDomain.cpp
+@@ -1059,26 +1059,17 @@ InitializeNSS(const nsACString& dir, boo
+ // "/usr/lib/nss/libnssckbi.so".
+ uint32_t flags = NSS_INIT_NOROOTINIT | NSS_INIT_OPTIMIZESPACE;
+ if (readOnly) {
+ flags |= NSS_INIT_READONLY;
+ }
+ if (!loadPKCS11Modules) {
+ flags |= NSS_INIT_NOMODDB;
+ }
+- // At the moment, sqldb does not work with non-ASCII file paths on Windows.
+- bool useSQLDB = Preferences::GetBool("security.use_sqldb", false) &&
+- (NS_IsNativeUTF8() || NS_IsAscii(PromiseFlatCString(dir).get()));
+ nsAutoCString dbTypeAndDirectory;
+- // Don't change any behavior if the user has specified an alternative database
+- // location with MOZPSM_NSSDBDIR_OVERRIDE.
+- const char* dbDirOverride = getenv("MOZPSM_NSSDBDIR_OVERRIDE");
+- if (useSQLDB && (!dbDirOverride || strlen(dbDirOverride) == 0)) {
+- dbTypeAndDirectory.Append("sql:");
+- }
+ dbTypeAndDirectory.Append(dir);
+ MOZ_LOG(gCertVerifierLog, LogLevel::Debug,
+ ("InitializeNSS(%s, %d, %d)", dbTypeAndDirectory.get(), readOnly,
+ loadPKCS11Modules));
+ SECStatus srv = NSS_Initialize(dbTypeAndDirectory.get(), "", "",
+ SECMOD_DB, flags);
+ if (srv != SECSuccess) {
+ return srv;
+diff --git a/security/manager/ssl/security-prefs.js b/security/manager/ssl/security-prefs.js
+--- a/security/manager/ssl/security-prefs.js
++++ b/security/manager/ssl/security-prefs.js
+@@ -39,17 +39,17 @@ pref("security.ask_for_password",
+ pref("security.password_lifetime", 30);
+
+ // If true, use the modern sqlite-backed certificate and key databases in NSS.
+ // If false, use the default format. Currently the default in NSS is the old
+ // BerkeleyDB format, but this will change in bug 1377940.
+ // Changing this requires a restart to take effect.
+ // Note that the environment variable MOZPSM_NSSDBDIR_OVERRIDE can override both
+ // the behavior of this preference and the NSS default.
+-pref("security.use_sqldb", true);
++pref("security.use_sqldb", false);
+
+ // The supported values of this pref are:
+ // 0: disable detecting Family Safety mode and importing the root
+ // 1: only attempt to detect Family Safety mode (don't import the root)
+ // 2: detect Family Safety mode and import the root
+ // (This is only relevant to Windows 8.1)
+ pref("security.family_safety.mode", 2);
+
diff --git a/firefox.spec b/firefox.spec
index 8b7831d..c75923d 100644
--- a/firefox.spec
+++ b/firefox.spec
@@ -94,13 +94,13 @@
Summary: Mozilla Firefox Web browser
Name: firefox
-Version: 57.0.4
-Release: 2%{?pre_tag}%{?dist}
+Version: 58.0
+Release: 1%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version...
%if %{build_langpacks}
-Source1: firefox-langpacks-%{version}%{?pre_version}-20180104.tar.xz
+Source1: firefox-langpacks-%{version}%{?pre_version}-20180123.tar.xz
%endif
Source10: firefox-mozconfig
Source12: firefox-redhat-default-prefs.js
@@ -141,6 +141,8 @@ Patch225: mozilla-1005640-accept-lang.patch
#ARM run-time patch
Patch226: rhbz-1354671.patch
Patch229: firefox-nss-version.patch
+Patch230: firefox-fedora-rhbz-1537287-v2.patch
+Patch231: build-with-nss-3.34.0.patch
# Upstream patches
Patch402: mozilla-1196777.patch
@@ -152,9 +154,6 @@ Patch412: mozilla-1337988.patch
Patch413: mozilla-1353817.patch
Patch416: mozilla-1399611.patch
-# Better compatibility with NSS sql database format, rhbz#1496563
-Patch481: sqlcompat-ff57-1-backport-730495
-
# Debian patches
Patch500: mozilla-440908.patch
@@ -300,10 +299,11 @@ This package contains results of tests executed during build.
%endif
%patch29 -p1 -b .big-endian
%patch31 -p1 -b .ppc64-s390x-curl
-%patch32 -p1 -b .rust-ppc64le
-%ifarch ppc ppc64 ppc64le
-%patch35 -p1 -b .ppc-jit
-%endif
+# Second arch patches - do we still need them?
+#%patch32 -p1 -b .rust-ppc64le
+#%ifarch ppc ppc64 ppc64le
+#%patch35 -p1 -b .ppc-jit
+#%endif
%patch37 -p1 -b .jit-atomic-lucky
%patch3 -p1 -b .arm
@@ -318,25 +318,29 @@ This package contains results of tests executed during build.
%ifarch aarch64
%patch226 -p1 -b .1354671
%endif
+%if 0%{?fedora} < 28
+%patch230 -p1 -b .rhbz-1537287
+%endif
+%patch231 -p1
%patch402 -p1 -b .1196777
%patch406 -p1 -b .256180
-%ifarch %{arm}
-%if 0%{?fedora} < 26
+# Does not apply
+#%ifarch %{arm}
+#%if 0%{?fedora} < 26
# Workaround for mozbz#1337988
-%patch412 -p1 -b .1337988
-%endif
-%endif
+#%patch412 -p1 -b .1337988
+#%endif
+#%endif
%patch413 -p1 -b .1353817
-%patch416 -p1 -b .1399611
-
-%if 0%{?fedora} > 27
-%patch481 -p1 -b .sqlcompat-1
-%endif
+# CSD - Disabled now
+#%patch416 -p1 -b .1399611
# Debian extension patch
-%patch500 -p1 -b .440908
+# Disabled due to new pref module, see
+# https://bugzilla.mozilla.org/show_bug.cgi?id=440908
+#%patch500 -p1 -b .440908
# Patch for big endian platforms only
%if 0%{?big_endian}
@@ -534,7 +538,11 @@ MOZ_SMP_FLAGS=-j1
[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8
%endif
-make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
+#make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS" MOZ_SERVICES_SYNC="1"
+export MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
+export MOZ_SERVICES_SYNC="1"
+export STRIP=/bin/true
+./mach build
# create debuginfo for crash-stats.mozilla.com
%if %{enable_mozilla_crashreporter}
@@ -816,7 +824,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{mozappdir}/browser/omni.ja
%{mozappdir}/browser/icons
%{mozappdir}/chrome.manifest
-%{mozappdir}/run-mozilla.sh
+#%{mozappdir}/run-mozilla.sh
%{mozappdir}/application.ini
%{mozappdir}/pingsender
%exclude %{mozappdir}/removed-files
@@ -857,6 +865,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#---------------------------------------------------------------------
%changelog
+* Tue Jan 23 2018 Martin Stransky <stransky(a)redhat.com> - 58.0-1
+- Update to 58.0
+
* Tue Jan 9 2018 Martin Stransky <stransky(a)redhat.com> - 57.0.4-2
- Try to disable rust debuginfo on arm to have arm builds again (rhbz#1523912)
diff --git a/mozilla-1170092.patch b/mozilla-1170092.patch
index 761fb9e..9e8906f 100644
--- a/mozilla-1170092.patch
+++ b/mozilla-1170092.patch
@@ -1,7 +1,7 @@
-diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
---- firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2017-09-25 10:28:35.413675532 +0200
-+++ firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2017-09-25 10:31:06.394196960 +0200
-@@ -243,9 +243,20 @@ nsresult nsReadConfig::openAndEvaluateJS
+diff -up firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp
+--- firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 2018-01-11 21:17:03.000000000 +0100
++++ firefox-58.0/extensions/pref/autoconfig/src/nsReadConfig.cpp 2018-01-23 13:59:45.446495820 +0100
+@@ -239,9 +239,20 @@ nsresult nsReadConfig::openAndEvaluateJS
return rv;
rv = NS_NewLocalFileInputStream(getter_AddRefs(inStr), jsFile);
@@ -24,22 +24,22 @@ diff -up firefox-56.0/extensions/pref/autoconfig/src/nsReadConfig.cpp.1170092 fi
} else {
nsAutoCString location("resource://gre/defaults/autoconfig/");
location += aFileName;
-diff -up firefox-56.0/modules/libpref/Preferences.cpp.1170092 firefox-56.0/modules/libpref/Preferences.cpp
---- firefox-56.0/modules/libpref/Preferences.cpp.1170092 2017-09-14 22:15:52.000000000 +0200
-+++ firefox-56.0/modules/libpref/Preferences.cpp 2017-09-25 10:28:35.413675532 +0200
-@@ -1514,6 +1514,8 @@ pref_InitInitialObjects()
- // - jar:$gre/omni.jar!/defaults/preferences/*.js
- // Thus, in omni.jar case, we always load app-specific default preferences
- // from omni.jar, whether or not $app == $gre.
+diff -up firefox-58.0/modules/libpref/Preferences.cpp.1170092 firefox-58.0/modules/libpref/Preferences.cpp
+--- firefox-58.0/modules/libpref/Preferences.cpp.1170092 2018-01-23 13:59:45.447495817 +0100
++++ firefox-58.0/modules/libpref/Preferences.cpp 2018-01-23 14:02:51.456987774 +0100
+@@ -4402,6 +4402,8 @@ pref_InitInitialObjects()
+ //
+ // Thus, in the omni.jar case, we always load app-specific default
+ // preferences from omni.jar, whether or not `$app == $gre`.
+ // At very end load configuration from system config location:
+ // - /etc/firefox/pref/*.js
- nsZipFind *findPtr;
- nsAutoPtr<nsZipFind> find;
-diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/toolkit/xre/nsXREDirProvider.cpp
---- firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2017-09-14 22:16:02.000000000 +0200
-+++ firefox-56.0/toolkit/xre/nsXREDirProvider.cpp 2017-09-25 10:28:35.414675529 +0200
-@@ -58,6 +58,7 @@
+ nsresult rv;
+ nsZipFind* findPtr;
+diff -up firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-58.0/toolkit/xre/nsXREDirProvider.cpp
+--- firefox-58.0/toolkit/xre/nsXREDirProvider.cpp.1170092 2018-01-11 21:17:06.000000000 +0100
++++ firefox-58.0/toolkit/xre/nsXREDirProvider.cpp 2018-01-23 13:59:45.447495817 +0100
+@@ -59,6 +59,7 @@
#endif
#ifdef XP_UNIX
#include <ctype.h>
@@ -47,7 +47,7 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
#endif
#ifdef XP_IOS
#include "UIKitDirProvider.h"
-@@ -570,6 +571,20 @@ nsXREDirProvider::GetFile(const char* aP
+@@ -554,6 +555,20 @@ nsXREDirProvider::GetFile(const char* aP
}
}
}
@@ -68,7 +68,7 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
if (NS_FAILED(rv) || !file)
return NS_ERROR_FAILURE;
-@@ -935,6 +950,14 @@ nsXREDirProvider::GetFilesInternal(const
+@@ -887,6 +902,14 @@ nsXREDirProvider::GetFilesInternal(const
LoadDirIntoArray(mXULAppDir, kAppendPrefDir, directories);
LoadDirsIntoArray(mAppBundleDirectories,
kAppendPrefDir, directories);
@@ -83,12 +83,12 @@ diff -up firefox-56.0/toolkit/xre/nsXREDirProvider.cpp.1170092 firefox-56.0/tool
rv = NS_NewArrayEnumerator(aResult, directories);
}
-diff -up firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h
---- firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2017-09-14 22:16:02.000000000 +0200
-+++ firefox-56.0/xpcom/io/nsAppDirectoryServiceDefs.h 2017-09-25 10:28:35.414675529 +0200
-@@ -62,6 +62,7 @@
+diff -up firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h
+--- firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h.1170092 2018-01-23 13:59:45.447495817 +0100
++++ firefox-58.0/xpcom/io/nsAppDirectoryServiceDefs.h 2018-01-23 14:02:02.871120476 +0100
+@@ -59,6 +59,7 @@
+ #define NS_APP_PREFS_50_FILE "PrefF"
#define NS_APP_PREFS_DEFAULTS_DIR_LIST "PrefDL"
- #define NS_EXT_PREFS_DEFAULTS_DIR_LIST "ExtPrefDL"
#define NS_APP_PREFS_OVERRIDE_DIR "PrefDOverride" // Directory for per-profile defaults
+#define NS_APP_PREFS_SYSTEM_CONFIG_DIR "PrefSysConf" // Directory with system-wide configuration
diff --git a/sources b/sources
index c832d3a..2cd26a2 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (firefox-57.0.4.source.tar.xz) = 58846037aebbf14b85e6b3a46dbe617c780c6916e437ea4ee32a2502a6b55e3689921a0be28b920dedf2f966195df04ac8e45411caeb2601a168ec08b4827cf0
-SHA512 (firefox-langpacks-57.0.4-20180104.tar.xz) = 361b652a0089c4437e8e135f6499b93b875e6c4b6d24118e07e3a8c287f1f045855fb8de36af57baf8ff84f319a0eeba285f50a3ced27bf6c20093ed95f303d0
+SHA512 (firefox-58.0.source.tar.xz) = 17a2c520973c68c5dd130bcb27407b1c20b03f74c97aeb486e86d422ab5c012e549787ae53275d6840b9d324f261ae282b98f61764ee5e0a6df1cc3e3c9e2632
+SHA512 (firefox-langpacks-58.0-20180123.tar.xz) = 6781bf0a5d68bdaa513f85404b8d9111bef8d2aa6d12e1b5fa8db2e4f44fce2d2642b9b5a70a6fc92f0cb96167f6895e17505bdc212aea987240cfb018f340f5
diff --git a/sqlcompat-ff57-1-backport-730495 b/sqlcompat-ff57-1-backport-730495
deleted file mode 100644
index 05b0eaa..0000000
--- a/sqlcompat-ff57-1-backport-730495
+++ /dev/null
@@ -1,524 +0,0 @@
-# HG changeset patch
-# Parent 5de7eafc3ceca2196d84d5b6106e01046efda034
-
-diff --git a/security/manager/ssl/nsNSSComponent.cpp b/security/manager/ssl/nsNSSComponent.cpp
---- a/security/manager/ssl/nsNSSComponent.cpp
-+++ b/security/manager/ssl/nsNSSComponent.cpp
-@@ -13,7 +13,6 @@
- #include "SharedSSLState.h"
- #include "cert.h"
- #include "certdb.h"
--#include "mozStorageCID.h"
- #include "mozilla/ArrayUtils.h"
- #include "mozilla/Assertions.h"
- #include "mozilla/Casting.h"
-@@ -2038,14 +2037,6 @@ nsNSSComponent::Init()
- return NS_ERROR_NOT_AVAILABLE;
- }
-
-- // To avoid a sqlite3_config race in NSS init, as a workaround for
-- // bug 730495, we require the storage service to get initialized first.
-- nsCOMPtr<nsISupports> storageService =
-- do_GetService(MOZ_STORAGE_SERVICE_CONTRACTID);
-- if (!storageService) {
-- return NS_ERROR_NOT_AVAILABLE;
-- }
--
- MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("Beginning NSS initialization\n"));
-
- nsresult rv = InitializePIPNSSBundle();
-diff --git a/storage/TelemetryVFS.cpp b/storage/TelemetryVFS.cpp
---- a/storage/TelemetryVFS.cpp
-+++ b/storage/TelemetryVFS.cpp
-@@ -834,6 +834,11 @@ xNextSystemCall(sqlite3_vfs *vfs, const
- namespace mozilla {
- namespace storage {
-
-+const char *GetVFSName()
-+{
-+ return "telemetry-vfs";
-+}
-+
- sqlite3_vfs* ConstructTelemetryVFS()
- {
- #if defined(XP_WIN)
-@@ -867,7 +872,7 @@ sqlite3_vfs* ConstructTelemetryVFS()
- MOZ_ASSERT(vfs->iVersion <= LAST_KNOWN_VFS_VERSION);
- tvfs->szOsFile = sizeof(telemetry_file) - sizeof(sqlite3_file) + vfs->szOsFile;
- tvfs->mxPathname = vfs->mxPathname;
-- tvfs->zName = "telemetry-vfs";
-+ tvfs->zName = GetVFSName();
- tvfs->pAppData = vfs;
- tvfs->xOpen = xOpen;
- tvfs->xDelete = xDelete;
-diff --git a/storage/mozStorageConnection.cpp b/storage/mozStorageConnection.cpp
---- a/storage/mozStorageConnection.cpp
-+++ b/storage/mozStorageConnection.cpp
-@@ -73,6 +73,8 @@ namespace storage {
-
- using mozilla::dom::quota::QuotaObject;
-
-+const char *GetVFSName();
-+
- namespace {
-
- int
-@@ -627,7 +629,7 @@ Connection::initialize()
- AUTO_PROFILER_LABEL("Connection::initialize", STORAGE);
-
- // in memory database requested, sqlite uses a magic file name
-- int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, nullptr);
-+ int srv = ::sqlite3_open_v2(":memory:", &mDBConn, mFlags, GetVFSName());
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
-@@ -660,7 +662,7 @@ Connection::initialize(nsIFile *aDatabas
- #else
- static const char* sIgnoreLockingVFS = "unix-none";
- #endif
-- const char* vfs = mIgnoreLockingMode ? sIgnoreLockingVFS : nullptr;
-+ const char* vfs = mIgnoreLockingMode ? sIgnoreLockingVFS : GetVFSName();
-
- int srv = ::sqlite3_open_v2(NS_ConvertUTF16toUTF8(path).get(), &mDBConn,
- mFlags, vfs);
-@@ -694,7 +696,7 @@ Connection::initialize(nsIFileURL *aFile
- rv = aFileURL->GetSpec(spec);
- NS_ENSURE_SUCCESS(rv, rv);
-
-- int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, nullptr);
-+ int srv = ::sqlite3_open_v2(spec.get(), &mDBConn, mFlags, GetVFSName());
- if (srv != SQLITE_OK) {
- mDBConn = nullptr;
- return convertResultCode(srv);
-diff --git a/storage/mozStorageService.cpp b/storage/mozStorageService.cpp
---- a/storage/mozStorageService.cpp
-+++ b/storage/mozStorageService.cpp
-@@ -24,6 +24,7 @@
- #include "mozIStoragePendingStatement.h"
-
- #include "sqlite3.h"
-+#include "mozilla/AutoSQLiteLifetime.h"
-
- #ifdef SQLITE_OS_WIN
- // "windows.h" was included and it can #define lots of things we care about...
-@@ -32,13 +33,6 @@
-
- #include "nsIPromptService.h"
-
--#ifdef MOZ_STORAGE_MEMORY
--# include "mozmemory.h"
--# ifdef MOZ_DMD
--# include "DMD.h"
--# endif
--#endif
--
- ////////////////////////////////////////////////////////////////////////////////
- //// Defines
-
-@@ -282,12 +276,6 @@ Service::~Service()
- if (rc != SQLITE_OK)
- NS_WARNING("Failed to unregister sqlite vfs wrapper.");
-
-- // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
-- // there is nothing actionable we can do in that case.
-- rc = ::sqlite3_shutdown();
-- if (rc != SQLITE_OK)
-- NS_WARNING("sqlite3 did not shutdown cleanly.");
--
- shutdown(); // To release sXPConnect.
-
- gService = nullptr;
-@@ -400,121 +388,7 @@ Service::shutdown()
- }
-
- sqlite3_vfs *ConstructTelemetryVFS();
--
--#ifdef MOZ_STORAGE_MEMORY
--
--namespace {
--
--// By default, SQLite tracks the size of all its heap blocks by adding an extra
--// 8 bytes at the start of the block to hold the size. Unfortunately, this
--// causes a lot of 2^N-sized allocations to be rounded up by jemalloc
--// allocator, wasting memory. For example, a request for 1024 bytes has 8
--// bytes added, becoming a request for 1032 bytes, and jemalloc rounds this up
--// to 2048 bytes, wasting 1012 bytes. (See bug 676189 for more details.)
--//
--// So we register jemalloc as the malloc implementation, which avoids this
--// 8-byte overhead, and thus a lot of waste. This requires us to provide a
--// function, sqliteMemRoundup(), which computes the actual size that will be
--// allocated for a given request. SQLite uses this function before all
--// allocations, and may be able to use any excess bytes caused by the rounding.
--//
--// Note: the wrappers for malloc, realloc and moz_malloc_usable_size are
--// necessary because the sqlite_mem_methods type signatures differ slightly
--// from the standard ones -- they use int instead of size_t. But we don't need
--// a wrapper for free.
--
--#ifdef MOZ_DMD
--
--// sqlite does its own memory accounting, and we use its numbers in our memory
--// reporters. But we don't want sqlite's heap blocks to show up in DMD's
--// output as unreported, so we mark them as reported when they're allocated and
--// mark them as unreported when they are freed.
--//
--// In other words, we are marking all sqlite heap blocks as reported even
--// though we're not reporting them ourselves. Instead we're trusting that
--// sqlite is fully and correctly accounting for all of its heap blocks via its
--// own memory accounting. Well, we don't have to trust it entirely, because
--// it's easy to keep track (while doing this DMD-specific marking) of exactly
--// how much memory SQLite is using. And we can compare that against what
--// SQLite reports it is using.
--
--MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
--MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
--
--#endif
--
--static void *sqliteMemMalloc(int n)
--{
-- void* p = ::malloc(n);
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
--#endif
-- return p;
--}
--
--static void sqliteMemFree(void *p)
--{
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
--#endif
-- ::free(p);
--}
--
--static void *sqliteMemRealloc(void *p, int n)
--{
--#ifdef MOZ_DMD
-- gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-- void *pnew = ::realloc(p, n);
-- if (pnew) {
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
-- } else {
-- // realloc failed; undo the SqliteMallocSizeOfOnFree from above
-- gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-- }
-- return pnew;
--#else
-- return ::realloc(p, n);
--#endif
--}
--
--static int sqliteMemSize(void *p)
--{
-- return ::moz_malloc_usable_size(p);
--}
--
--static int sqliteMemRoundup(int n)
--{
-- n = malloc_good_size(n);
--
-- // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
-- // allocations be 8-aligned. So we round up sub-8 requests to 8. This
-- // wastes a small amount of memory but is obviously safe.
-- return n <= 8 ? 8 : n;
--}
--
--static int sqliteMemInit(void *p)
--{
-- return 0;
--}
--
--static void sqliteMemShutdown(void *p)
--{
--}
--
--const sqlite3_mem_methods memMethods = {
-- &sqliteMemMalloc,
-- &sqliteMemFree,
-- &sqliteMemRealloc,
-- &sqliteMemSize,
-- &sqliteMemRoundup,
-- &sqliteMemInit,
-- &sqliteMemShutdown,
-- nullptr
--};
--
--} // namespace
--
--#endif // MOZ_STORAGE_MEMORY
-+const char *GetVFSName();
-
- static const char* sObserverTopics[] = {
- "memory-pressure",
-@@ -527,28 +401,13 @@ Service::initialize()
- {
- MOZ_ASSERT(NS_IsMainThread(), "Must be initialized on the main thread");
-
-- int rc;
--
--#ifdef MOZ_STORAGE_MEMORY
-- rc = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
-- if (rc != SQLITE_OK)
-- return convertResultCode(rc);
--#endif
--
-- // TODO (bug 1191405): do not preallocate the connections caches until we
-- // have figured the impact on our consumers and memory.
-- sqlite3_config(SQLITE_CONFIG_PAGECACHE, NULL, 0, 0);
--
-- // Explicitly initialize sqlite3. Although this is implicitly called by
-- // various sqlite3 functions (and the sqlite3_open calls in our case),
-- // the documentation suggests calling this directly. So we do.
-- rc = ::sqlite3_initialize();
-+ int rc = AutoSQLiteLifetime::getInitResult();
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
-
- mSqliteVFS = ConstructTelemetryVFS();
- if (mSqliteVFS) {
-- rc = sqlite3_vfs_register(mSqliteVFS, 1);
-+ rc = sqlite3_vfs_register(mSqliteVFS, 0);
- if (rc != SQLITE_OK)
- return convertResultCode(rc);
- } else {
-diff --git a/toolkit/xre/Bootstrap.cpp b/toolkit/xre/Bootstrap.cpp
---- a/toolkit/xre/Bootstrap.cpp
-+++ b/toolkit/xre/Bootstrap.cpp
-@@ -6,11 +6,15 @@
- #include "mozilla/Bootstrap.h"
- #include "nsXPCOM.h"
-
-+#include "AutoSQLiteLifetime.h"
-+
- namespace mozilla {
-
- class BootstrapImpl final : public Bootstrap
- {
- protected:
-+ AutoSQLiteLifetime mSQLLT;
-+
- virtual void Dispose() override
- {
- delete this;
-diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
---- a/toolkit/xre/moz.build
-+++ b/toolkit/xre/moz.build
-@@ -30,7 +30,7 @@ EXPORTS += [
- 'nsIAppStartupNotifier.h',
- ]
-
--EXPORTS.mozilla += ['Bootstrap.h']
-+EXPORTS.mozilla += ['AutoSQLiteLifetime.h', 'Bootstrap.h']
-
- if CONFIG['MOZ_INSTRUMENT_EVENT_LOOP']:
- EXPORTS += ['EventTracer.h']
-@@ -91,6 +91,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
- ]
-
- UNIFIED_SOURCES += [
-+ 'AutoSQLiteLifetime.cpp',
- 'Bootstrap.cpp',
- 'CreateAppData.cpp',
- 'nsAppStartupNotifier.cpp',
-diff --git a/toolkit/xre/AutoSQLiteLifetime.cpp b/toolkit/xre/AutoSQLiteLifetime.cpp
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/AutoSQLiteLifetime.cpp
-@@ -0,0 +1,167 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#include "nsDebug.h"
-+#include "AutoSQLiteLifetime.h"
-+#include "sqlite3.h"
-+
-+#ifdef MOZ_STORAGE_MEMORY
-+# include "mozmemory.h"
-+# ifdef MOZ_DMD
-+# include "DMD.h"
-+# endif
-+
-+namespace {
-+
-+// By default, SQLite tracks the size of all its heap blocks by adding an extra
-+// 8 bytes at the start of the block to hold the size. Unfortunately, this
-+// causes a lot of 2^N-sized allocations to be rounded up by jemalloc
-+// allocator, wasting memory. For example, a request for 1024 bytes has 8
-+// bytes added, becoming a request for 1032 bytes, and jemalloc rounds this up
-+// to 2048 bytes, wasting 1012 bytes. (See bug 676189 for more details.)
-+//
-+// So we register jemalloc as the malloc implementation, which avoids this
-+// 8-byte overhead, and thus a lot of waste. This requires us to provide a
-+// function, sqliteMemRoundup(), which computes the actual size that will be
-+// allocated for a given request. SQLite uses this function before all
-+// allocations, and may be able to use any excess bytes caused by the rounding.
-+//
-+// Note: the wrappers for malloc, realloc and moz_malloc_usable_size are
-+// necessary because the sqlite_mem_methods type signatures differ slightly
-+// from the standard ones -- they use int instead of size_t. But we don't need
-+// a wrapper for free.
-+
-+#ifdef MOZ_DMD
-+
-+// sqlite does its own memory accounting, and we use its numbers in our memory
-+// reporters. But we don't want sqlite's heap blocks to show up in DMD's
-+// output as unreported, so we mark them as reported when they're allocated and
-+// mark them as unreported when they are freed.
-+//
-+// In other words, we are marking all sqlite heap blocks as reported even
-+// though we're not reporting them ourselves. Instead we're trusting that
-+// sqlite is fully and correctly accounting for all of its heap blocks via its
-+// own memory accounting. Well, we don't have to trust it entirely, because
-+// it's easy to keep track (while doing this DMD-specific marking) of exactly
-+// how much memory SQLite is using. And we can compare that against what
-+// SQLite reports it is using.
-+
-+MOZ_DEFINE_MALLOC_SIZE_OF_ON_ALLOC(SqliteMallocSizeOfOnAlloc)
-+MOZ_DEFINE_MALLOC_SIZE_OF_ON_FREE(SqliteMallocSizeOfOnFree)
-+
-+#endif
-+
-+static void *sqliteMemMalloc(int n)
-+{
-+ void* p = ::malloc(n);
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-+#endif
-+ return p;
-+}
-+
-+static void sqliteMemFree(void *p)
-+{
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-+#endif
-+ ::free(p);
-+}
-+
-+static void *sqliteMemRealloc(void *p, int n)
-+{
-+#ifdef MOZ_DMD
-+ gSqliteMemoryUsed -= SqliteMallocSizeOfOnFree(p);
-+ void *pnew = ::realloc(p, n);
-+ if (pnew) {
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(pnew);
-+ } else {
-+ // realloc failed; undo the SqliteMallocSizeOfOnFree from above
-+ gSqliteMemoryUsed += SqliteMallocSizeOfOnAlloc(p);
-+ }
-+ return pnew;
-+#else
-+ return ::realloc(p, n);
-+#endif
-+}
-+
-+static int sqliteMemSize(void *p)
-+{
-+ return ::moz_malloc_usable_size(p);
-+}
-+
-+static int sqliteMemRoundup(int n)
-+{
-+ n = malloc_good_size(n);
-+
-+ // jemalloc can return blocks of size 2 and 4, but SQLite requires that all
-+ // allocations be 8-aligned. So we round up sub-8 requests to 8. This
-+ // wastes a small amount of memory but is obviously safe.
-+ return n <= 8 ? 8 : n;
-+}
-+
-+static int sqliteMemInit(void *p)
-+{
-+ return 0;
-+}
-+
-+static void sqliteMemShutdown(void *p)
-+{
-+}
-+
-+const sqlite3_mem_methods memMethods = {
-+ &sqliteMemMalloc,
-+ &sqliteMemFree,
-+ &sqliteMemRealloc,
-+ &sqliteMemSize,
-+ &sqliteMemRoundup,
-+ &sqliteMemInit,
-+ &sqliteMemShutdown,
-+ nullptr
-+};
-+
-+} // namespace
-+
-+#endif // MOZ_STORAGE_MEMORY
-+
-+namespace mozilla {
-+
-+AutoSQLiteLifetime::AutoSQLiteLifetime()
-+{
-+ if (++AutoSQLiteLifetime::sSingletonEnforcer != 1) {
-+ NS_RUNTIMEABORT("multiple instances of AutoSQLiteLifetime constructed!");
-+ }
-+
-+#ifdef MOZ_STORAGE_MEMORY
-+ sResult = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
-+#else
-+ sResult = SQLITE_OK;
-+#endif
-+
-+ if (sResult == SQLITE_OK) {
-+ // TODO (bug 1191405): do not preallocate the connections caches until we
-+ // have figured the impact on our consumers and memory.
-+ sqlite3_config(SQLITE_CONFIG_PAGECACHE, NULL, 0, 0);
-+
-+ // Explicitly initialize sqlite3. Although this is implicitly called by
-+ // various sqlite3 functions (and the sqlite3_open calls in our case),
-+ // the documentation suggests calling this directly. So we do.
-+ sResult = ::sqlite3_initialize();
-+ }
-+}
-+
-+AutoSQLiteLifetime::~AutoSQLiteLifetime()
-+{
-+ // Shutdown the sqlite3 API. Warn if shutdown did not turn out okay, but
-+ // there is nothing actionable we can do in that case.
-+ sResult = ::sqlite3_shutdown();
-+ NS_WARNING_ASSERTION(sResult == SQLITE_OK,
-+ "sqlite3 did not shutdown cleanly.");
-+}
-+
-+int AutoSQLiteLifetime::sSingletonEnforcer = 0;
-+int AutoSQLiteLifetime::sResult = SQLITE_MISUSE;
-+
-+} // namespace mozilla
-diff --git a/toolkit/xre/AutoSQLiteLifetime.h b/toolkit/xre/AutoSQLiteLifetime.h
-new file mode 100644
---- /dev/null
-+++ b/toolkit/xre/AutoSQLiteLifetime.h
-@@ -0,0 +1,24 @@
-+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-+/* This Source Code Form is subject to the terms of the Mozilla Public
-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-+
-+#ifndef mozilla_AutoSQLiteLifetime_h
-+#define mozilla_AutoSQLiteLifetime_h
-+
-+namespace mozilla {
-+
-+class AutoSQLiteLifetime final
-+{
-+private:
-+ static int sSingletonEnforcer;
-+ static int sResult;
-+public:
-+ AutoSQLiteLifetime();
-+ ~AutoSQLiteLifetime();
-+ static int getInitResult() { return AutoSQLiteLifetime::sResult; }
-+};
-+
-+} // namespace mozilla
-+
-+#endif
diff --git a/xulrunner-24.0-jemalloc-ppc.patch b/xulrunner-24.0-jemalloc-ppc.patch
index 840fca2..2e72a6d 100644
--- a/xulrunner-24.0-jemalloc-ppc.patch
+++ b/xulrunner-24.0-jemalloc-ppc.patch
@@ -1,12 +1,12 @@
-diff -up firefox-57.0b5/memory/build/mozjemalloc.cpp.old firefox-57.0b5/memory/build/mozjemalloc.cpp
---- firefox-57.0b5/memory/build/mozjemalloc.cpp.old 2017-10-06 12:00:27.938687498 +0200
-+++ firefox-57.0b5/memory/build/mozjemalloc.cpp 2017-10-06 12:02:45.232151309 +0200
-@@ -780,7 +780,7 @@ struct arena_t {
- * controlling the malloc behavior are defined as compile-time constants
- * for best performance and cannot be altered at runtime.
- */
--#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__)
-+#if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && !defined(__aarch64__) && !(defined(__powerpc__))
- #define MALLOC_STATIC_SIZES 1
+diff -up firefox-58.0/memory/build/mozjemalloc.cpp.jemalloc-ppc firefox-58.0/memory/build/mozjemalloc.cpp
+--- firefox-58.0/memory/build/mozjemalloc.cpp.jemalloc-ppc 2018-01-23 13:12:28.618164403 +0100
++++ firefox-58.0/memory/build/mozjemalloc.cpp 2018-01-23 13:18:26.638212523 +0100
+@@ -180,7 +180,7 @@ using namespace mozilla;
+ // Debug builds are opted out too, for test coverage.
+ #ifndef MOZ_DEBUG
+ #if !defined(__ia64__) && !defined(__sparc__) && !defined(__mips__) && \
+- !defined(__aarch64__)
++ !defined(__aarch64__) && !defined(__powerpc__)
+ #define MALLOC_STATIC_PAGESIZE 1
+ #endif
#endif
-
6 years, 2 months