From 9ee86228fb287d93b79c83bd684614eb988cd8f2 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 7 Jun 2022 15:38:20 -0400 Subject: ffs: major rewrite of spec for el8 and fc --- freefilesync/freefilesync.spec | 140 +++++++++++++++++++++++++---------------- 1 file changed, 87 insertions(+), 53 deletions(-) (limited to 'freefilesync/freefilesync.spec') 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 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 - 11.21-2 +- rewrite spec for easier cross-distro support +- fix builds for el8 + * Wed May 25 2022 B. Stack - 11.21-1 - version bump - add ffs_no_gcc12 patch -- cgit From 5dd2803c5b290bf1eadbc931255f84982769f7e9 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 7 Jun 2022 17:16:35 -0400 Subject: fix scl variable quoting --- freefilesync/freefilesync.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 8fa7e2e..b23c605 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -138,11 +138,12 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \ %patch40 -p1 %endif # Determine if g++ < 12 +g__version="$( %if "%{?scl_env}" != "" - g__version="$( scl enable %{scl_env} /bin/bash <<'EOFSCL' | awk 'NR==1{if($2>=12){print "12"}else{print"11"}}' - %endif + scl enable %{scl_env} /bin/bash <<'EOFSCL' | awk 'NR==1{if($2>=12){print "12"}else{print"11"}}' +%endif g++ --version - %if "%{?scl_env}" != "" +%if "%{?scl_env}" != "" EOFSCL %endif )" -- cgit From 601b90c96c10e6b9b719d5cbe5c967081a2365e3 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 7 Jun 2022 19:10:42 -0400 Subject: ffs: fix g__version again --- freefilesync/freefilesync.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index b23c605..4daea5c 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -140,13 +140,14 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \ # Determine if g++ < 12 g__version="$( %if "%{?scl_env}" != "" - scl enable %{scl_env} /bin/bash <<'EOFSCL' | awk 'NR==1{if($2>=12){print "12"}else{print"11"}}' + scl enable %{scl_env} /bin/bash <<'EOFSCL' %endif g++ --version %if "%{?scl_env}" != "" EOFSCL %endif )" +g__version="$( echo "${g__version}" | awk 'NR==1{if($2>=12){print "12"}else{print"11"}}' )" echo "G__version=${g_version}" if test ${g__version} -lt 12 ; then -- cgit From 8eed8c99bbe25376ee7575e14b7e6a7c6b80dd31 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 7 Jun 2022 19:27:29 -0400 Subject: ffs: fix g__version awk field checked --- freefilesync/freefilesync.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 4daea5c..de8c72d 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -147,7 +147,7 @@ g__version="$( EOFSCL %endif )" -g__version="$( echo "${g__version}" | awk 'NR==1{if($2>=12){print "12"}else{print"11"}}' )" +g__version="$( echo "${g__version}" | awk 'NR==1{if($3>=12){print "12"}else{print"11"}}' )" echo "G__version=${g_version}" if test ${g__version} -lt 12 ; then -- cgit From 4fc68d23a2fee33ec68f4d7c14b69a6f74b0f183 Mon Sep 17 00:00:00 2001 From: B Stack Date: Tue, 7 Jun 2022 21:47:38 -0400 Subject: ffs: add openssl to BR --- freefilesync/freefilesync.spec | 2 ++ 1 file changed, 2 insertions(+) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index de8c72d..ece8ac0 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -87,6 +87,8 @@ BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(zlib) %if 0%{?el6}%{?el7} BuildRequires: %{scl_buildreq} +# We need the binary so we can check version number +BuildRequires: openssl %if "%{?min_openssl}" != "" BuildRequires: openssl-%{name}-devel %{min_openssl} %else -- cgit From 03c1fe9e03a15d9892749d6fdd7f42db68ddb85c Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 8 Jun 2022 08:24:30 -0400 Subject: ffs: switch openssl check to sh instead of rpm macro --- freefilesync/freefilesync.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index ece8ac0..4355071 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -135,10 +135,11 @@ find . ! -type d \( -name '*.c' -o -name '*.cpp' -o -name '*.h' \) \ %patch20 -p1 %endif # Determine if openssl < 3.0.0 -%define opensslver %( openssl version | awk '{if($2>=3){print "3"}else{print"1"}}' ) -%if 0%{opensslver} < 3 +opensslver="$( openssl version | awk '{if($2>=3){print "3"}else{print"1"}}' )" +if test ${opensslver} -lt 3 ; +then %patch40 -p1 -%endif +fi # Determine if g++ < 12 g__version="$( %if "%{?scl_env}" != "" -- cgit From a123fe4a199e4dd2061d77192a5d47b092c47dc5 Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 8 Jun 2022 09:07:05 -0400 Subject: ffs: use libssh2-ffs on el8 --- freefilesync/freefilesync.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 4355071..af2bad0 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -22,6 +22,10 @@ %define min_openssl >= 1.1.1k %endif %define libssh2_name libssh2 +# EL8 copr has some dnf module weirdness with libssh2, not a version problem. +%if 0%{?el6}%{?el7}%{?el8} +%define libssh2_name libssh2-freefilesync +%endif %if 0%{?fedora} >= 36 # https://www.spinics.net/lists/fedora-devel/msg296646.html # https://fedoraproject.org/wiki/Changes/Package_information_on_ELF_objects @@ -85,10 +89,10 @@ BuildRequires: pkgconfig(giomm-2.4) BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(zlib) -%if 0%{?el6}%{?el7} -BuildRequires: %{scl_buildreq} # We need the binary so we can check version number BuildRequires: openssl +%if 0%{?el6}%{?el7} +BuildRequires: %{scl_buildreq} %if "%{?min_openssl}" != "" BuildRequires: openssl-%{name}-devel %{min_openssl} %else -- cgit From fe62344023593aa016b1b821cd3874ee37bea9a4 Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 8 Jun 2022 11:08:01 -0400 Subject: ffs: disable el8 libssh2-freefilesync BR by adding 'virt:rhel' module to the epel-8 repo on copr, you can now install libssh2 --- freefilesync/freefilesync.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index af2bad0..e1f5114 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -23,7 +23,7 @@ %endif %define libssh2_name libssh2 # EL8 copr has some dnf module weirdness with libssh2, not a version problem. -%if 0%{?el6}%{?el7}%{?el8} +%if 0%{?el6}%{?el7} %define libssh2_name libssh2-freefilesync %endif %if 0%{?fedora} >= 36 -- cgit From 459bbe4010243bb2fed902f790917ff987068f3b Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 8 Jun 2022 11:14:16 -0400 Subject: ffs: parameterize openssl BR name --- freefilesync/freefilesync.spec | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index e1f5114..1aab5bb 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -6,7 +6,7 @@ %define min_libssh2 %{nil} %define min_openssl %{nil} %define scl_env %{nil} -%define scl_buildreq coreutils +%define scl_buildreq %{nil} %if 0%{?el6}%{?el7} %define scl_env devtoolset-7 %define scl_buildreq devtoolset-7-toolchain @@ -22,9 +22,12 @@ %define min_openssl >= 1.1.1k %endif %define libssh2_name libssh2 +%define openssl_name openssl # EL8 copr has some dnf module weirdness with libssh2, not a version problem. %if 0%{?el6}%{?el7} %define libssh2_name libssh2-freefilesync +%define openssl_name openssl-freefilesync +%define %endif %if 0%{?fedora} >= 36 # https://www.spinics.net/lists/fedora-devel/msg296646.html @@ -90,20 +93,18 @@ BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(zlib) # We need the binary so we can check version number -BuildRequires: openssl -%if 0%{?el6}%{?el7} +BuildRequires: %{openssl_name} +%if "%{?scl_buildreq}" != "" BuildRequires: %{scl_buildreq} +%endif %if "%{?min_openssl}" != "" -BuildRequires: openssl-%{name}-devel %{min_openssl} +BuildRequires: %{openssl_name}-devel %{min_openssl} %else -BuildRequires: openssl-%{name}-devel +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 Requires: hicolor-icon-theme Requires: xdg-utils Provides: mimehandler(application/x-freefilesync-ffs) -- cgit From fa2df1b985873665bb5179c9dc2317372e5f111c Mon Sep 17 00:00:00 2001 From: B Stack Date: Wed, 8 Jun 2022 12:33:14 -0400 Subject: ffs: readd el8 libssh2-freefilesync BR --- freefilesync/freefilesync.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 1aab5bb..83012d8 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -24,10 +24,11 @@ %define libssh2_name libssh2 %define openssl_name openssl # EL8 copr has some dnf module weirdness with libssh2, not a version problem. -%if 0%{?el6}%{?el7} +%if 0%{?el6}%{?el7}%{?el8} %define libssh2_name libssh2-freefilesync +%endif +%if 0%{?el6}%{?el7} %define openssl_name openssl-freefilesync -%define %endif %if 0%{?fedora} >= 36 # https://www.spinics.net/lists/fedora-devel/msg296646.html -- cgit From 83c49830d173c2f763960417221d9826ec4add94 Mon Sep 17 00:00:00 2001 From: "B. Stack" Date: Mon, 27 Jun 2022 11:13:49 -0400 Subject: ffs 11.22 rpm rc1 --- freefilesync/freefilesync.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'freefilesync/freefilesync.spec') diff --git a/freefilesync/freefilesync.spec b/freefilesync/freefilesync.spec index 83012d8..1beec2a 100644 --- a/freefilesync/freefilesync.spec +++ b/freefilesync/freefilesync.spec @@ -36,7 +36,7 @@ %undefine _package_note_file %endif Name: freefilesync -Version: 11.21 +Version: 11.22 Release: 1%{?dist} Summary: A file synchronization utility @@ -71,6 +71,7 @@ Patch41: ffs_no_gcc12.patch Patch60: ffs_desktop_notifications.patch Patch70: ffs_libcurl_7.61.1.patch Patch71: ffs_libcurl_7.71.1.patch +Patch72: ffs_libcurl_7.79.1.patch Packager: B. Stack BuildRequires: brotli-devel @@ -170,6 +171,9 @@ case "%{libcurl_ver}" in 7.61.1) %patch70 -p1 ;; + 7.79.1) +%patch72 -p1 + ;; *) %patch71 -p1 ;; @@ -265,6 +269,9 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & : %ghost %config %attr(666, -, -) %{_datadir}/%{name}/GlobalSettings.xml %changelog +* Mon Jun 27 2022 B. Stack - 11.22-1 +- version bump + * Tue Jun 07 2022 B. Stack - 11.21-2 - rewrite spec for easier cross-distro support - fix builds for el8 -- cgit