From b393e7d50e88c33118ec43118d5e16a03c89007f Mon Sep 17 00:00:00 2001 From: wang--ge Date: Tue, 14 Feb 2023 16:34:01 +0800 Subject: [PATCH] fix build faulure due to arc4random feature activated (cherry picked from commit a2672f60da3f72235fe3edc4c18e82717121c5cc) --- ...-due-to-arc4random-feature-activated.patch | 51 +++++++++++++++++++ firefox.spec | 7 ++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 0003-fix-build-failure-due-to-arc4random-feature-activated.patch diff --git a/0003-fix-build-failure-due-to-arc4random-feature-activated.patch b/0003-fix-build-failure-due-to-arc4random-feature-activated.patch new file mode 100644 index 0000000..2f0adc5 --- /dev/null +++ b/0003-fix-build-failure-due-to-arc4random-feature-activated.patch @@ -0,0 +1,51 @@ +From 782e0bd5d5b00a95833a1f187b856f9632331e84 Mon Sep 17 00:00:00 2001 +From: wang--ge +Date: Tue, 14 Feb 2023 16:19:03 +0800 +Subject: [PATCH] fix build failure due to arc4random feature activated + +--- + ipc/chromium/src/third_party/libevent/arc4random.c | 2 +- + old-configure | 7 ++++++- + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/ipc/chromium/src/third_party/libevent/arc4random.c b/ipc/chromium/src/third_party/libevent/arc4random.c +index a2338e6..0dee5b4 100644 +--- a/ipc/chromium/src/third_party/libevent/arc4random.c ++++ b/ipc/chromium/src/third_party/libevent/arc4random.c +@@ -494,7 +494,7 @@ arc4random(void) + } + #endif + +-ARC4RANDOM_EXPORT void ++void + arc4random_buf(void *buf_, size_t n) + { + unsigned char *buf = buf_; +diff --git a/old-configure b/old-configure +index d37324e..a175081 100644 +--- a/old-configure ++++ b/old-configure +@@ -6504,6 +6504,11 @@ fi + + for ac_func in stat64 lstat64 truncate64 statvfs64 statvfs statfs64 statfs getpagesize gmtime_r localtime_r arc4random arc4random_buf mallinfo gettid lchown setpriority strerror syscall + do ++if [ "$ac_func" == "arc4random" ] || [ "$ac_func" == "arc4random_buf" ];then ++ ac_exeext_addend=t ++else ++ ac_exeext_addend= ++fi + echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 + echo "configure:6509: checking for $ac_func" >&5 + if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then +@@ -6537,7 +6542,7 @@ $ac_func(); + + ; return 0; } + EOF +-if { (eval echo configure:6541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ++if { (eval echo configure:6541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}${ac_exeext_addend}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" + else +-- +2.27.0 + diff --git a/firefox.spec b/firefox.spec index 80913a4..73cf8e8 100644 --- a/firefox.spec +++ b/firefox.spec @@ -88,7 +88,7 @@ Summary: Mozilla Firefox Web browser Name: firefox Version: 79.0 -Release: 13 +Release: 14 URL: https://www.mozilla.org/firefox/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz @@ -189,6 +189,7 @@ Patch644: Deny-clone3-to-force-glibc-fallback.patch Patch645: 0001-fix-wl_proxy_marshal_flags.patch Patch646: 0002-fix-from-collections-import-Iterable.patch Patch647: fix-attribute-error-module-distutils-has-no-attribute-sysconfig.patch +Patch648: 0003-fix-build-failure-due-to-arc4random-feature-activated.patch %if %{?system_nss} BuildRequires: pkgconfig(nspr) >= %{nspr_version} pkgconfig(nss) >= %{nss_version} @@ -371,6 +372,7 @@ tar -xf %{SOURCE3} %patch645 -p1 %patch646 -p1 %patch647 -p1 +%patch648 -p1 %{__rm} -f .mozconfig %{__cp} %{SOURCE10} .mozconfig @@ -813,6 +815,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Tue Feb 14 2023 Ge Wang - 79.0-14 +- Fix build failure due to arc4random feature activated + * Thu Jul 21 2022 xu_ping - 79.0-13 - Fix attribute error module distutils has no attribute sysconfig -- Gitee