From 5d785354d653774d28d022ea41a3fb9b0da8a87e Mon Sep 17 00:00:00 2001 From: madonuko Date: Sat, 12 Jul 2025 18:30:40 +0800 Subject: [PATCH] fix(curl-impersonate-chrome): rm patches --- .../curl-impersonate-chrome.spec | 15 +++++++++------ .../install-sh-scripts-to-buildroot.patch | 13 ------------- .../remove-werror-in-boringssl-build.patch | 18 ------------------ anda/tools/curl-impersonate/update.rhai | 1 + 4 files changed, 10 insertions(+), 37 deletions(-) delete mode 100644 anda/tools/curl-impersonate/install-sh-scripts-to-buildroot.patch delete mode 100644 anda/tools/curl-impersonate/remove-werror-in-boringssl-build.patch create mode 100644 anda/tools/curl-impersonate/update.rhai diff --git a/anda/tools/curl-impersonate/curl-impersonate-chrome.spec b/anda/tools/curl-impersonate/curl-impersonate-chrome.spec index 981d34621b..b94f80b976 100644 --- a/anda/tools/curl-impersonate/curl-impersonate-chrome.spec +++ b/anda/tools/curl-impersonate/curl-impersonate-chrome.spec @@ -1,15 +1,14 @@ %global build_cxxflags %(echo "%{__build_flags_lang_cxx} %{?_distro_extra_cxxflags}" | sed 's@-Werror=format-security@@') Name: curl-impersonate-chrome -Version: 0.7.0 +Version: 1.1.1 Release: 1%{?dist} Summary: A series of patches that make curl requests look like Chrome License: MIT URL: https://github.com/lexiforest/curl-impersonate Source0: %{url}/archive/v%{version}.tar.gz -Patch0: remove-werror-in-boringssl-build.patch -Patch1: install-sh-scripts-to-buildroot.patch +# Patch0: remove-werror-in-boringssl-build.patch Packager: sadlerm @@ -49,16 +48,20 @@ This package contains the object files necessary to develop %{name}. %prep %autosetup -n curl-impersonate-%{version} -p1 +sed -i '/^install:$/,/^$/{s/@bindir@/$(DESTDIR)@bindir@/}' Makefile.in %build %configure -%{__make} chrome-build +%make_build `sed -nE 's@^CURL_VERSION := (.+)$@\1@p' Makefile.in`.tar.gz & +%make_build boringssl-`sed -nE 's@^BORING_SSL_COMMIT := (.+)$@\1@p' Makefile.in`.zip & +wait +%make_build build || true %check -%{__make} chrome-checkbuild +%{__make} checkbuild %install -%{__make} DESTDIR=%{buildroot} chrome-install +%make_install %files %license LICENSE diff --git a/anda/tools/curl-impersonate/install-sh-scripts-to-buildroot.patch b/anda/tools/curl-impersonate/install-sh-scripts-to-buildroot.patch deleted file mode 100644 index c8caf6151e..0000000000 --- a/anda/tools/curl-impersonate/install-sh-scripts-to-buildroot.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile.in b/Makefile.in -index 41d7324..56a029e 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -83,7 +83,7 @@ chrome-install: ## Install the Chrome version of curl-impersonate after build - cd $(CURL_VERSION) - $(MAKE) install-exec MAKEFLAGS= - # Wrapper scripts for the Chrome version (e.g. 'curl_chrome99') -- install $(srcdir)/chrome/curl_* @bindir@ -+ install $(srcdir)/chrome/curl_* $(DESTDIR)@bindir@ - .PHONY: chrome-install - - chrome-install-strip: ## Like 'chrome-install', but strip binaries for smaller size diff --git a/anda/tools/curl-impersonate/remove-werror-in-boringssl-build.patch b/anda/tools/curl-impersonate/remove-werror-in-boringssl-build.patch deleted file mode 100644 index 094143afe0..0000000000 --- a/anda/tools/curl-impersonate/remove-werror-in-boringssl-build.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/chrome/patches/boringssl.patch b/chrome/patches/boringssl.patch -index d3adf2d..a7cf3a6 100644 ---- a/chrome/patches/boringssl.patch -+++ b/chrome/patches/boringssl.patch -@@ -8,6 +8,13 @@ index 000000000..678d1ca41 - + - +git diff d24a382 > boringssl.patch - +mv boringssl.patch ../curl-impersonate/chrome/patches/boringssl.patch -+diff --git a/CMakeLists.txt b/CMakeLists.txt -+index ee5cc0466..32d1c8cca 100644 -+--- a/CMakeLists.txt -++++ b/CMakeLists.txt -+@@ -143 +143 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CLANG) -+- set(C_CXX_FLAGS "-Werror -Wformat=2 -Wsign-compare -Wwrite-strings -Wvla -Wshadow -Wtype-limits") -++ set(C_CXX_FLAGS "-Wformat=2 -Wsign-compare -Wwrite-strings -Wvla -Wshadow -Wtype-limits") - diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h - index e500dd76e..e75bca26b 100644 - --- a/include/openssl/ssl.h diff --git a/anda/tools/curl-impersonate/update.rhai b/anda/tools/curl-impersonate/update.rhai new file mode 100644 index 0000000000..7f2c88062a --- /dev/null +++ b/anda/tools/curl-impersonate/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("lexiforest/curl-impersonate"));