diff options
author | B Stack <bgstack15@gmail.com> | 2022-06-07 15:38:20 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2022-06-07 15:38:20 -0400 |
commit | 9ee86228fb287d93b79c83bd684614eb988cd8f2 (patch) | |
tree | bc52fa511ab8ec63a8ac24b537fed38e3af17016 /freefilesync | |
parent | Merge branch 'scite-bump' into 'master' (diff) | |
download | stackrpms-9ee86228fb287d93b79c83bd684614eb988cd8f2.tar.gz stackrpms-9ee86228fb287d93b79c83bd684614eb988cd8f2.tar.bz2 stackrpms-9ee86228fb287d93b79c83bd684614eb988cd8f2.zip |
ffs: major rewrite of spec for el8 and fc
Diffstat (limited to 'freefilesync')
-rw-r--r-- | freefilesync/00_allow_parallel_ops.patch (renamed from freefilesync/ffs_allow_parallel_ops.patch) | 0 | ||||
-rw-r--r-- | freefilesync/01_no_check_updates.patch (renamed from freefilesync/ffs_no_check_updates.patch) | 0 | ||||
-rw-r--r-- | freefilesync/02_no_wx311.patch (renamed from freefilesync/ffs_no_wx311.patch) | 0 | ||||
-rw-r--r-- | freefilesync/03_sftp.patch (renamed from freefilesync/ffs_sftp.patch) | 0 | ||||
-rw-r--r-- | freefilesync/04_revert_zenju_aggressive_upstreamisms.patch (renamed from freefilesync/revert_zenju_aggressive_upstreamisms.patch) | 0 | ||||
-rw-r--r-- | freefilesync/05_traditional_view.patch (renamed from freefilesync/ffs_traditional_view.patch) | 0 | ||||
-rw-r--r-- | freefilesync/06_icon_loader.patch (renamed from freefilesync/ffs_icon_loader.patch) | 0 | ||||
-rw-r--r-- | freefilesync/07_libssh2.patch (renamed from freefilesync/ffs_libssh2.patch) | 0 | ||||
-rw-r--r-- | freefilesync/ffs_distro_el6_el7.patch (renamed from freefilesync/ffs_el.patch) | 0 | ||||
-rw-r--r-- | freefilesync/ffs_distro_fedora.patch (renamed from freefilesync/ffs_fedora.patch) | 0 | ||||
-rw-r--r-- | freefilesync/ffs_el6_el7_bit.patch (renamed from freefilesync/ffs_bit.patch) | 0 | ||||
-rw-r--r-- | freefilesync/ffs_el6_el7_no_eraseif.patch (renamed from freefilesync/ffs_no_eraseif.patch) | 0 | ||||
-rw-r--r-- | freefilesync/ffs_libcurl_7.61.1.patch | 79 | ||||
-rw-r--r-- | freefilesync/ffs_libcurl_7.71.1.patch (renamed from freefilesync/ffs_curl.patch) | 0 | ||||
-rw-r--r-- | freefilesync/ffs_no_gcc12.patch | 2 | ||||
-rw-r--r-- | freefilesync/ffs_openssl.patch | 4 | ||||
-rw-r--r-- | freefilesync/freefilesync.spec | 140 |
17 files changed, 170 insertions, 55 deletions
diff --git a/freefilesync/ffs_allow_parallel_ops.patch b/freefilesync/00_allow_parallel_ops.patch index 473ae46..473ae46 100644 --- a/freefilesync/ffs_allow_parallel_ops.patch +++ b/freefilesync/00_allow_parallel_ops.patch diff --git a/freefilesync/ffs_no_check_updates.patch b/freefilesync/01_no_check_updates.patch index eececed..eececed 100644 --- a/freefilesync/ffs_no_check_updates.patch +++ b/freefilesync/01_no_check_updates.patch diff --git a/freefilesync/ffs_no_wx311.patch b/freefilesync/02_no_wx311.patch index e74da90..e74da90 100644 --- a/freefilesync/ffs_no_wx311.patch +++ b/freefilesync/02_no_wx311.patch diff --git a/freefilesync/ffs_sftp.patch b/freefilesync/03_sftp.patch index a51acc8..a51acc8 100644 --- a/freefilesync/ffs_sftp.patch +++ b/freefilesync/03_sftp.patch diff --git a/freefilesync/revert_zenju_aggressive_upstreamisms.patch b/freefilesync/04_revert_zenju_aggressive_upstreamisms.patch index 43fec48..43fec48 100644 --- a/freefilesync/revert_zenju_aggressive_upstreamisms.patch +++ b/freefilesync/04_revert_zenju_aggressive_upstreamisms.patch diff --git a/freefilesync/ffs_traditional_view.patch b/freefilesync/05_traditional_view.patch index e0cf0d2..e0cf0d2 100644 --- a/freefilesync/ffs_traditional_view.patch +++ b/freefilesync/05_traditional_view.patch diff --git a/freefilesync/ffs_icon_loader.patch b/freefilesync/06_icon_loader.patch index 14035d5..14035d5 100644 --- a/freefilesync/ffs_icon_loader.patch +++ b/freefilesync/06_icon_loader.patch diff --git a/freefilesync/ffs_libssh2.patch b/freefilesync/07_libssh2.patch index 022914b..022914b 100644 --- a/freefilesync/ffs_libssh2.patch +++ b/freefilesync/07_libssh2.patch diff --git a/freefilesync/ffs_el.patch b/freefilesync/ffs_distro_el6_el7.patch index ad9ae15..ad9ae15 100644 --- a/freefilesync/ffs_el.patch +++ b/freefilesync/ffs_distro_el6_el7.patch diff --git a/freefilesync/ffs_fedora.patch b/freefilesync/ffs_distro_fedora.patch index d54110b..d54110b 100644 --- a/freefilesync/ffs_fedora.patch +++ b/freefilesync/ffs_distro_fedora.patch diff --git a/freefilesync/ffs_bit.patch b/freefilesync/ffs_el6_el7_bit.patch index 3cc6ccc..3cc6ccc 100644 --- a/freefilesync/ffs_bit.patch +++ b/freefilesync/ffs_el6_el7_bit.patch diff --git a/freefilesync/ffs_no_eraseif.patch b/freefilesync/ffs_el6_el7_no_eraseif.patch index 71239e4..71239e4 100644 --- a/freefilesync/ffs_no_eraseif.patch +++ b/freefilesync/ffs_el6_el7_no_eraseif.patch diff --git a/freefilesync/ffs_libcurl_7.61.1.patch b/freefilesync/ffs_libcurl_7.61.1.patch new file mode 100644 index 0000000..a6b8532 --- /dev/null +++ b/freefilesync/ffs_libcurl_7.61.1.patch @@ -0,0 +1,79 @@ +Author: Brulhart, bgstack15 +Date: 2022-06-07 +Message: remove assertion for libcurl version >1.61 for EL8 +Version: FreeFileSync 11.21 +Message: We have to omit checking for certain definitions. +Distro: AlmaLinux 8. File ffs_curl.patch is different between all distros! +diff -r -u 10.17-0/FreeFileSync/Source/afs/ftp.cpp 10.17-1/FreeFileSync/Source/afs/ftp.cpp +--- 10.21-0/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 08:56:08.608066350 -0400 ++++ 10.21-1/FreeFileSync/Source/afs/ftp.cpp 2020-03-18 09:23:46.882110499 -0400 +@@ -635,7 +635,7 @@ + curlRelPath += compFmt; + } + +- static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 67)); ++ static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 61 )); + /* 1. CURLFTPMETHOD_NOCWD requires absolute paths to unconditionally skip CWDs: https://github.com/curl/curl/pull/4382 + 2. CURLFTPMETHOD_SINGLECWD requires absolute paths to skip one needless "CWD entry path": https://github.com/curl/curl/pull/4332 + => https://curl.haxx.se/docs/faq.html#How_do_I_list_the_root_dir_of_an +diff -aur 11.21-{0,1}/libcurl/curl_wrap.h +--- FreeFileSync-11.21-0/libcurl/curl_wrap.h 2022-05-22 17:09:26.000000000 -0400 ++++ FreeFileSync-11.21-1/libcurl/curl_wrap.h 2022-06-07 13:27:43.530380754 -0400 +@@ -17,10 +17,6 @@ + #include <curl/curl.h> + //------------------------------------------------- + +-#ifndef CURLINC_CURL_H +- #error curl.h header guard changed +-#endif +- + namespace zen + { + void libcurlInit(); +diff -aur 11.21-{0,1}/libcurl/curl_wrap.cpp +--- FreeFileSync-11.21/libcurl/curl_wrap.cpp 2022-05-22 17:09:26.000000000 -0400 ++++ FreeFileSync-11.21-2/libcurl/curl_wrap.cpp 2022-06-07 13:34:11.216294490 -0400 +@@ -331,9 +331,8 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE46); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TOO_MANY_REDIRECTS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SETOPT_OPTION_SYNTAX); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_SETFAILED); +@@ -344,7 +343,7 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CIPHER); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_BAD_CONTENT_ENCODING); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE62); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_LDAP_INVALID_URL); // < libcurl 7.82.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FILESIZE_EXCEEDED); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_USE_SSL_FAILED); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SEND_FAIL_REWIND); +@@ -358,7 +357,7 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_EXISTS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TFTP_NOSUCHUSER); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_FAILED); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE76); ++ ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_REQD); // < libcurl 7.82.0 + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CACERT_BADFILE); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_NOT_FOUND); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSH); +@@ -376,14 +375,8 @@ + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_INVALIDCERTSTATUS); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP2_STREAM); + ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_RECURSIVE_API_CALL); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY); +- ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CLIENTCERT); + ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST); + } +- static_assert(CURL_LAST == CURLE_SSL_CLIENTCERT + 1); + + return replaceCpy<std::wstring>(L"Curl status %x", L"%x", numberTo<std::wstring>(static_cast<int>(sc))); + } diff --git a/freefilesync/ffs_curl.patch b/freefilesync/ffs_libcurl_7.71.1.patch index bd0354a..bd0354a 100644 --- a/freefilesync/ffs_curl.patch +++ b/freefilesync/ffs_libcurl_7.71.1.patch diff --git a/freefilesync/ffs_no_gcc12.patch b/freefilesync/ffs_no_gcc12.patch index 88b0d27..666036d 100644 --- a/freefilesync/ffs_no_gcc12.patch +++ b/freefilesync/ffs_no_gcc12.patch @@ -2,6 +2,8 @@ Message: Because we do not use gcc 12, we have an error with unordered_map and s Author: zensubz Date-Modified: 2022-05-24 Version: 11.21 +Source: https://freefilesync.org/forum/viewtopic.php?t=9376&p=34044#p34044 +Distro: any distro with g++ < 12 --- a/FreeFileSync/Source/base/db_file.cpp +++ b/FreeFileSync/Source/base/db_file.cpp @@ -642,7 +642,7 @@ diff --git a/freefilesync/ffs_openssl.patch b/freefilesync/ffs_openssl.patch index 7097d33..b77d8ac 100644 --- a/freefilesync/ffs_openssl.patch +++ b/freefilesync/ffs_openssl.patch @@ -1,8 +1,8 @@ Summary: Compile for libss-dev 1.1.1m Author: bgstack15 -Date: 2022-01-04 +Date: 2022-06-07 Version: 11.16 -Message: Compile on Devuan Ceres with libssl-dev_1.1.1m-1 +Message: Compile on any distro with openssl < 3.0.0 diff -aur 11.13/zen/open_ssl.cpp 11.14/zen/open_ssl.cpp --- 11.16-0/zen/open_ssl.cpp 2022-01-04 10:04:34.135914294 -0500 +++ 11.16-1/zen/open_ssl.cpp 2022-01-04 10:29:12.544451067 -0500 diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 76d9c4b..8fa7e2e 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -10,14 +10,18 @@ %if 0%{?el6}%{?el7} %define scl_env devtoolset-7 %define scl_buildreq devtoolset-7-toolchain - %define min_libcurl >= 7.64.0 + %define min_libcurl >= 7.61.0 %define min_libssh2 >= 1.8.0 %define min_openssl >= 1.1.1c %endif -%define libssh2_name libssh2 -%if 0%{?rhel} >= 8 -%define libssh2_name libssh2-%{name} +%if 0%{?el8} + %define scl_env gcc-toolset-11 + %define scl_buildreq gcc-toolset-11-gcc-c++, gcc-toolset-11-annobin-plugin-gcc + %define min_libcurl >= 7.61.0 + %define min_libssh2 >= 1.9.0 + %define min_openssl >= 1.1.1k %endif +%define libssh2_name libssh2 %if 0%{?fedora} >= 36 # https://www.spinics.net/lists/fedora-devel/msg296646.html # https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects @@ -37,22 +41,28 @@ Source0: https://gitlab.com/opensource-tracking/%{pkgname}/-/archive/%{versio Source1: %{pkgname}.desktop Source2: %{prog2name}.desktop Source3: %{name}.xml -Patch0: ffs_allow_parallel_ops.patch -Patch1: ffs_no_check_updates.patch -Patch2: ffs_no_wx311.patch -Patch3: ffs_sftp.patch -Patch4: ffs_fedora.patch -Patch5: ffs_el.patch -Patch6: ffs_libssh2.patch -Patch7: ffs_curl.patch -Patch8: ffs_bit.patch -Patch9: ffs_no_eraseif.patch -Patch10: revert_zenju_aggressive_upstreamisms.patch -Patch11: ffs_traditional_view.patch -Patch12: ffs_desktop_notifications.patch -Patch13: ffs_openssl.patch -Patch14: ffs_icon_loader.patch -Patch15: ffs_no_gcc12.patch +# all rpm distros use these +Patch0: 00_allow_parallel_ops.patch +Patch1: 01_no_check_updates.patch +Patch2: 02_no_wx311.patch +Patch3: 03_sftp.patch +Patch4: 04_revert_zenju_aggressive_upstreamisms.patch +Patch5: 05_traditional_view.patch +Patch6: 06_icon_loader.patch +Patch7: 07_libssh2.patch +# distro specific patches +## Fedora and EL8 +Patch20: ffs_distro_fedora.patch +## EL6 and EL7 +Patch30: ffs_distro_el6_el7.patch +Patch31: ffs_el6_el7_bit.patch +Patch32: ffs_el6_el7_no_eraseif.patch +# dependency specific +Patch40: ffs_openssl.patch +Patch41: ffs_no_gcc12.patch +Patch60: ffs_desktop_notifications.patch +Patch70: ffs_libcurl_7.61.1.patch +Patch71: ffs_libcurl_7.71.1.patch Packager: B. Stack <bgstack15@gmail.com> BuildRequires: brotli-devel @@ -60,8 +70,16 @@ BuildRequires: wxGTK3-devel BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: ImageMagick +%if "%{?min_libcurl}" != "" BuildRequires: libcurl-devel %{min_libcurl} +%else +BuildRequires: libcurl-devel +%endif +%if "%{?min_libssh2}" != "" BuildRequires: %{libssh2_name}-devel %{min_libssh2} +%else +BuildRequires: %{libssh2_name}-devel +%endif BuildRequires: patch BuildRequires: pkgconfig(giomm-2.4) BuildRequires: pkgconfig(gtk+-2.0) @@ -69,10 +87,14 @@ BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(zlib) %if 0%{?el6}%{?el7} BuildRequires: %{scl_buildreq} +%if "%{?min_openssl}" != "" BuildRequires: openssl-%{name}-devel %{min_openssl} -Requires: libcurl %{min_libcurl} -Requires: %{libssh2_name} %{min_libssh2} -Requires: openssl-%{name}-libs %{min_openssl} +%else +BuildRequires: openssl-%{name}-devel +%endif +#Requires: libcurl %%{?min_libcurl} +#Requires: %%{libssh2_name} %%{?min_libssh2} +#Requires: openssl-%%{name}-libs %%{?min_openssl} %else BuildRequires: openssl-devel %endif @@ -90,37 +112,57 @@ having nice visual feedback along the way. %prep %setup -n %{pkgname}-%{version} - # fix text file line endings and permissions to unix find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \ -exec %{__sed} -i -r -e 's/\r$//' {} + - %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 %if 0%{?el6}%{?el7} # use the el patch -%patch5 -p1 +%patch30 -p1 +%patch31 -p1 +%patch32 -p1 %else # use the fedora patch, even for el8 -%patch4 -p1 +%patch20 -p1 %endif -%patch6 -p1 -%patch7 -p1 -%if 0%{?el6}%{?el7}%{?el8}%{?fc29} -%patch8 -p1 -%patch9 -p1 +# Determine if openssl < 3.0.0 +%define opensslver %( openssl version | awk '{if($2>=3){print "3"}else{print"1"}}' ) +%if 0%{opensslver} < 3 +%patch40 -p1 %endif -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%if 0%{?fedora} < 36 -# Patch13 openssl is only for openssl < 3.0.0 -%patch13 -p1 +# Determine if g++ < 12 +%if "%{?scl_env}" != "" + g__version="$( scl enable %{scl_env} /bin/bash <<'EOFSCL' | awk 'NR==1{if($2>=12){print "12"}else{print"11"}}' + %endif + g++ --version + %if "%{?scl_env}" != "" +EOFSCL %endif -%patch14 -p1 -%patch15 -p1 +)" +echo "G__version=${g_version}" +if test ${g__version} -lt 12 ; +then +%patch41 -p1 +fi +# desktop notifications merely has to happen after distro patch +%patch60 -p1 +# Determine version of libcurl +%define libcurl_ver %( rpm -q libcurl-devel --queryformat '%%{version}' ) +case "%{libcurl_ver}" in + 7.61.1) +%patch70 -p1 + ;; + *) +%patch71 -p1 + ;; +esac # custom build parameters for packaging application in rpm # fedora provides build_cxxflags, which is really just optflags @@ -144,7 +186,7 @@ EOFSCL %install %if !%{dummy_package} -# removed by upstream! +# removed by upstream around version 11 #%%make_install -C %%{pkgname}/Source #%%make_install -C %%{pkgname}/Source/%%{prog2name} pushd %{pkgname}/Build @@ -162,12 +204,6 @@ mkdir -p %{buildroot}%{_datadir}/applications desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE1} desktop-file-install --dir %{buildroot}%{_datadir}/applications %{SOURCE2} -# application start script -# none - -# man pages -# none - # mimetypes install -d %{buildroot}%{_datadir}/mime/packages install -Dm 0644 -t %{buildroot}%{_datadir}/mime/packages %{SOURCE3} @@ -195,12 +231,6 @@ done %post touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : -%preun -# is it a final removal? -#if test "$1" = "0" ; -#then -#fi - %postun if test "$1" = "0" ; then @@ -224,6 +254,10 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & : %ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml %changelog +* Tue Jun 07 2022 B. Stack <bgstack15@gmail.com> - 11.21-2 +- rewrite spec for easier cross-distro support +- fix builds for el8 + * Wed May 25 2022 B. Stack <bgstack15@gmail.com> - 11.21-1 - version bump - add ffs_no_gcc12 patch |