#Build with system provided openssl %define SSL 1 %define dotests 1 %define name curl %define version 7.86.0 %define release 1 %define _libdir64 %{_prefix}/lib64 %define curlroot %{_builddir}/%{name}-%{version} Summary: get a file from a FTP or HTTP server. Name: %{name} Version: %{version} Release: %{release} License: MIT/X derivate Group: Applications/Internet Source: https://curl.se/download/%{name}-%{version}.tar.gz URL: http://curl.haxx.se/ Prefix: %{_prefix} Patch0: curl-7.64.0-aix-poll.patch Patch1: curl-7.79.1-krb5-config.patch Patch2: curl-hardcode_libs_krb5_openldap.patch BuildRequires: ca-certificates >= 2021.2.52 BuildRequires: libssh2-devel >= 1.10.0 BuildRequires: libgcc >= 10.3.0 BuildRequires: openldap-devel >= 2.5.12 BuildRequires: krb5-libs >= 1.18.4 BuildRequires: krb5-devel >= 1.18.4 BuildRequires: libnghttp2-devel >= 1.46.0 Requires: libssh2 >= 1.10.0 Requires: ca-certificates >= 2021.2.52 Requires: libgcc >= 10.3.0 Requires: openldap >= 2.5.12 Requires: krb5-libs >= 1.18.4 Requires: zlib >= 1.2.12 Requires: libnghttp2 >= 1.46.0 %description curl is a client to get documents/files from servers, using any of the supported protocols. The command is designed to work without user interaction or any kind of interactivity. curl offers many useful tricks like proxy support, user authentication, ftp upload, HTTP post, file transfer resume and more. %if %{SSL} == 1 Note: this version is compiled with SSL support. %else Note: this version is compiled without SSL support. %endif %package devel Summary: Development files for the curl libary Group: Development/Libraries Requires: libssh2-devel >= 1.9.0 Requires: curl = %{version} %description devel libcurl is the core engine of curl; this packages contains all the libs, headers, and manual pages to develop applications using libcurl. %define DEFCC cc %prep rm -rf %{curlroot} %setup -q %patch2 %patch0 -p0 rm -rf /tmp/%{name}-%{version}-32bit cp -pr . /tmp/%{name}-%{version}-32bit rm -fr * mv /tmp/%{name}-%{version}-32bit 32bit cp -pr 32bit 64bit cd 32bit %patch1 -p0 cd .. %build export AR="/usr/bin/ar -X32_64" # build on 64bit mode cd %{curlroot}/64bit && (if [ -f configure.in ]; then mv -f configure.in configure.in. rpm; fi) export CC="gcc -O2" export OBJECT_MODE=64 export CFLAGS="-maix64 -I/opt/freeware/include" export CPPFLAGS="-maix64 -I/opt/freeware/include" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" ./configure --prefix=%{prefix} \ --with-gssapi=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared \ --enable-static \ --enable-manual \ --enable-ldap \ --with-libssh2 \ --without-zstd \ --with-nghttp2 \ %if %{SSL} == 1 --with-ssl \ --with-ca-path=/var/ssl/certs/ %else --without-ssl %endif gmake V=1 LDFLAGS="-L%{curlroot}/64bit/lib/.libs ${LDFLAGS}" if [ "%{dotests}" == 1 ] then ( gmake -k check || true ) /usr/sbin/slibclean fi # build on 32bit mode cd %{curlroot}/32bit && (if [ -f configure.in ]; then mv -f configure.in configure.in. rpm; fi) export CC="gcc -O2" export OBJECT_MODE=32 export CFLAGS="-maix32 -D_LARGE_FILES -I/opt/freeware/include" export CPPFLAGS="-maix32 -D_LARGE_FILES -I/opt/freeware/include" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure --prefix=%{prefix} \ --with-gssapi=%{_prefix} \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --enable-shared \ --enable-static \ --enable-manual \ --with-libssh2 \ --enable-ldap \ --without-zstd \ --with-nghttp2 \ %if %{SSL} == 1 --with-ssl \ --with-ca-path=/var/ssl/certs/ %else --without-ssl %endif gmake V=1 LDFLAGS="-L%{curlroot}/32bit/lib/.libs ${LDFLAGS}" if [ "%{dotests}" == 1 ] then ( gmake -k check || true ) /usr/sbin/slibclean fi %install [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} # install on 64bit mode cd 64bit export OBJECT_MODE=64 make DESTDIR=%{buildroot} install-strip ( cd ${RPM_BUILD_ROOT}/%{_bindir} for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_64 done ) # install on 32bit mode cd ../32bit export OBJECT_MODE=32 make DESTDIR=%{buildroot} install-strip ( cd ${RPM_BUILD_ROOT}/%{_bindir} for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_32 ln -sf "$fic"_64 $fic done ) /usr/bin/ar -X64 -x ${RPM_BUILD_ROOT}%{_libdir64}/libcurl.a /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/libcurl.a libcurl.so.4 %clean [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} %files %defattr(-,root,system) %doc 32bit/CHANGES 32bit/README* 32bit/COPYING %doc 32bit/docs/BUGS.md 32bit/docs/FAQ 32bit/docs/FEATURES.md #%doc 32bit/docs/RESOURCES %doc 32bit/docs/TheArtOfHttpScripting.md 32bit/docs/TODO %attr(0755,root,system) %{_bindir}/curl %attr(0755,root,system) %{_bindir}/curl_64 %attr(0755,root,system) %{_bindir}/curl_32 %attr(0644,root,system) %{_mandir}/man1/curl.1* %{_libdir}/libcurl.a %{_libdir64}/libcurl.a %if %{SSL} == 1 %doc 32bit/docs/SSLCERTS.md %endif %files devel %defattr(-,root,system) %doc 32bit/docs/examples/*.c 32bit/docs/examples/Makefile.example %doc 32bit/docs/BINDINGS.md 32bit/docs/INTERNALS.md #%doc 32bit/docs/LICENSE-MIXING.md %attr(0755,root,system) %{_bindir}/curl-config %attr(0755,root,system) %{_bindir}/curl-config_32 %attr(0755,root,system) %{_bindir}/curl-config_64 %attr(0644,root,system) %{_mandir}/man1/curl-config.1* %attr(0644,root,system) %{_mandir}/man3/* %attr(0644,root,system) %{_includedir}/curl/* %{_datadir}/aclocal/libcurl.m4 %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc %changelog * Thu Dec 29 2022 Sangeetha Bandi - 7.86.0-1 - Update to fix CVE-2022-32221,CVE-2022-42915 & CVE-2022-42916 - Rebuilt with libgcc10(10.3.0) & openldap(2.5.12) * Thu Dec 15 2022 Ayappan P - 7.85.0-2 - Remove python requires as it breaks yum * Tue Nov 22 2022 Ayappan P - 7.85.0-1 - Update to version 7.85.0 to fix CVEs - Add requires on python 3.7.15 if dnf present * Thu Aug 04 2022 Neha Jain - 7.84.0-1 - Update to fix security vulnerabilities * Fri May 13 2022 Neha Jain - 7.83.1-1 - Update to fix security vulnerabilities * Tue Oct 05 2021 Rishita Saha - 7.79.1-1 - Update to fix security vulnerabilities * Tue May 04 2021 Rishita Saha - 7.76.1-1 - Update to fix CVE-2021-22890 and CVE-2021-22876 *Mon Dec 21 2020 Megha Khedekar - 7.74.0 -Updated to version 7.74.0-1 to fix following CVEs -CVE-2020-8284 -CVE-2020-8286 -CVE-2020-8285 * Wed Aug 26 2020 Baanu Tumma - 7.72.0-1 - Updated to version 7.72.0-1 to fix CVE-2020-8231 - no longer shipping files from /usr directory * Wed Jul 29 2020 Baanu Tumma - 7.71.1-1 - Updated to version 7.71.1-1 to fix CVE-2020-8169 CVE-2020-8177 * Mon Apr 13 2020 Reshma V Kumar - 7.67.0-2 - Rebuild with krb5 1.16.1-4 to fix blibpath * Fri Dec 20 2019 Ashwini Chandrappa - 7.67.0-1 - Updated due to following security vulnerability - CVE-2019-5481 - CVE-2019-5482 * Mon May 27 2019 Ravi Hirekurabar - 7.65.1-1 - Updated due to following security vulnerability - CVE-2019-5436 - CVE-2019-5435 - Built with GSS-Negotiate Support * Tue Mar 05 2019 Ravi Hirekurabar - 7.64.0-1 - Updated to 7.64.0 to fix following CVEs - CVE-2019-3823 - CVE-2019-3822 - CVE-2018-16890 * Mon Dec 10 2018 Ravi Hirekurabar - 7.62.0-1 - Updated to 7.62.0 to fix following CVEs - CVE-2018-16842 - CVE-2018-16840 - CVE-2018-16839 * Sun Oct 28 2018 Ravi Hirekurabar - 7.61.1-2 - Updated to 7.61.1 due to security vulnerability * Fri Sep 21 2018 Ravi Hirekurabar - 7.61.0-2 - Rebuilt with ldap adding --enable-ldap to configure * Tue Aug 07 2018 Ravi Hirekurabar - 7.61.0-1 - Updated to 7.61.0 to fix security vulnerability. - Added Requires: libgcc >= 6.3.0-1 * Fri Jun 15 2018 Ravi Hirekurabar - 7.60.0-1 - Updated to 7.60.0 to fix security vulnerability Following - CVE's are fixed - CVE-2018-1000300 - CVE-2018-1000301 - CVE-2018-1000120 - CVE-2018-1000121 - CVE-2018-1000122 * Tue Jun 12 2018 Ravi Hirekurabar - 7.58.0-2 - Rebuilt adding Requires: gcc >= 6.3.0 - Added tests. - Removed Provides = curl field - Added buildlog * Thu Mar 15 2018 Ravi Hirekurabar 7.58.0-1 - Updated to 7.58.0. Includes CVE fix CVE-2018-1000007 * Tue Jan 23 2018 Ravi Hirekurabar 7.56.1-2 - Built with ssh2 for sftp support and 64bit version * Fri Nov 03 2017 Ravi Hirekurabar 7.56.1-1 - Updated to 7.56.1 * Fri Sep 15 2017 Ravi Hirekurabar 7.55.1-1 - Updated to 7.55.1 built with patch: curl-7.55.1-aix-poll.patch * Fri Mar 17 2017 Sangamesh Mallayya 7.53.1-1 - Update to 7.53. Includes CVE fix CVE-2017-2629. * Tue Jan 25 2017 Ravi Hirekurabar 7.52.1-1 - Update to 7.52.1 to fix security vulnerability * Tue Jan 24 2017 Ravi Hirekurabar 7.51.0-2 - Rebuilt with ca-certificate package. * Thu Nov 03 2016 Nitish K Mishra 7.51.0-1 - Updated to latest version due to security vulnerability * Tue Jun 28 2016 Ravi Hirekurabar 7.44.0-2 - Built with certificate bundle ca-bundle.crt * Thu Mar 21 2016 Sangamesh Mallayya 7.44.0-1 - Update to 7.44.0-1.