%global perl_vendorarch_32 %(eval "`%{_bindir}/perl_32 -V:installvendorarch`"; echo $installvendorarch) %global perl_vendorarch_64 %(eval "`%{_bindir}/perl_64 -V:installvendorarch`"; echo $installvendorarch) %define perl_version %(eval "`perl -V:version`"; echo $version) # Tests by default. No tests: rpm -ba --define 'dotests 0' subversion*.spec %{!?dotests: %define dotests 1} %define httpd_version 2.4.37 %define neon_version 0.29 %define apr_version 1.5.2 %define apr_util_version 1.5.4 %define sqlite_version 3.23.0 %define swig_version 2.0.10 %define db_version 4.8.24 %define pyver 3.7 %define file_version 5.36 %define openssl_version 1.0.1 %define expat_version 2.2.6 # If you don't want to take time for the tests then set make_*_check to 0. %define make_ra_local_bdb_check 0 %define make_ra_svn_bdb_check 0 %define make_ra_dav_bdb_check 0 %define make_ra_local_fsfs_check 0 %define make_ra_svn_fsfs_check 0 %define make_ra_dav_fsfs_check 0 Summary: A Concurrent Versioning system similar to but better than CVS. Name: subversion Version: 1.10.7 Release: 1 License: ASL 2.0 Group: Utilities/System URL: https://subversion.apache.org/ Source0: https://downloads.apache.org/subversion/subversion-%{version}.tar.bz2 Source1: https://downloads.apache.org/subversion/%{name}-%{version}.tar.bz2.asc #Source2: http://subversion.tigris.org/tarballs/%{name}-%{version}.tar.bz2.sha1 Source3: httpd-subversion.conf Source5: httpd-subversion.conf_64 Patch0: %{name}-%{version}-sqlite3.patch Source4: subversion-Makefile.patch Patch3: %{name}-%{version}-io.patch #Requires: apr >= %{apr_version} #Requires: apr-util >= %{apr_util_version} #Requires: neon >= %{neon_version} #Requires: db >= %{db_version} Requires: sqlite >= %{sqlite_version} Requires: expat >= %{expat_version} #Requires: openssl >= %{openssl_version} Requires: sqlite >= %{sqlite_version} Requires: file >= %{file_version} #Requires: zlib #BuildPreReq: gettext-devel >= 0.19.8.1-3 #BuildPreReq: apr-devel >= %{apr_version} #BuildPreReq: apr-util-devel >= %{apr_version} #BuildPreReq: neon-devel >= %{neon_version} BuildPreReq: sqlite-devel >= %{sqlite_version} BuildPreReq: expat-devel >= %{expat_version} #BuildPreReq: openssl-devel >= %{openssl_version} BuildPreReq: sqlite-devel >= %{sqlite_version} BuildPreReq: file-devel >= %{file_version} #BuildPreReq: httpd-devel >= %{httpd_version} #BuildPreReq: swig >= %{swig_version} BuildPreReq: zlib-devel BuildPreReq: perl BuildPreReq: python BuildPreReq: python-devel Requires: libgcc >= 8.3.0 Requires: gettext >= 0.19.8.1-3 Requires: serf >= 1.3.9-2 Requires: cyrus-sasl >= 2.1.26-2 Requires: zlib >= 1.2.11-1 Requires: apr >= 1.5.2 Requires: apr-util >= 1.5.4 %description Subversion is a concurrent version control system which enables one or more users to collaborate in developing and maintaining a hierarchy of files and directories while keeping a history of all changes. Subversion only stores the differences between versions, instead of every complete file. Subversion also keeps a log of who, when, and why changes occurred. As such it basically does the same thing CVS does (Concurrent Versioning System) but has major enhancements compared to CVS and fixes a lot of the annoyances that CVS users face. *** Note: This is a relocatable package; it can be installed anywhere you like with the "rpm -Uvh --prefix /your/favorite/path" command. This is useful if you don't have root access on your machine but would like to use this package. %package devel Group: Development/Tools Summary: Development package for the Subversion libraries Requires: apr-devel >= 1.5.2 Requires: apr-util-devel >= 1.5.4 Requires: subversion = %{version}-%{release} %description devel The subversion-devel package includes the static libraries and include files for developers interacting with the subversion package. %package -n mod_dav_svn Group: System Environment/Daemons Summary: Apache server module for Subversion server Requires: httpd >= 2.4.37-2 Requires: libgcc >= 8.3.0 Requires: sqlite >= 3.23.0-1 Requires: apr >= 1.5.2 Requires: apr-util >= 1.5.4 Requires: expat >= %{expat_version} Requires: subversion = %{version}-%{release} Requires: file >= %{file_version} #BuildRequires: httpd-devel >= 2.2.6 %description -n mod_dav_svn The mod_dav_svn package allows access to a Subversion repository using HTTP, via the Apache httpd server. %package tools Group: Utilities/System Summary: Tools for Subversion Requires: subversion = %{version}-%{release} Requires: apr >= 1.5.2 Requires: apr-util >= 1.5.4 Requires: expat >= %{expat_version} Requires: gettext >= 0.19.8.1-3 Requires: file >= %{file_version} Requires: libgcc >= 8.3.0 Requires: sqlite >= 3.23.0-1 Requires: serf >= 1.3.9-2 Requires: cyrus-sasl >= 2.1.26-2 Requires: python3 >= 3.7.9 Requires: perl >= %{perl_version} %description tools Tools for Subversion. %package python Group: Development/Libraries Summary: Python bindings for Subversion Version Control system BuildRequires: python-devel >= 2.7.15 Requires: python >= 2.7.15 %description python The subversion-python package includes the Python bindings to the Subversion libraries. %prep %setup -q %patch0 -p1 -b .sqlite3 %patch3 -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 %build export PATH=/opt/freeware/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/vac/bin:. export RM="rm -f" #export PATH="$PATH:/usr/vac/bin" export CONFIG_SHELL=/usr/bin/ksh export CONFIG_ENV_ARGS=/usr/bin/ksh export MKDIR="/usr/bin/mkdir -p" export CC="/opt/freeware/bin/gcc" export CXX="/opt/freeware/bin/g++" #build on 64 bit mode cd 64bit export OBJECT_MODE=64 export sh_libtool="/home/reshma/rpmbuild/BUILD/subversion-1.9.5/64bit/libtool" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-brtl -lz -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export CPPFLAGS=" -DSVN_NEON_0_28 -DSVN_NEON_0_27 -DSVN_NEON_0_26 -DSVN_NEON_0_25 -I/opt/freeware/include -O2" export CFLAGS="-maix64 -I/opt/freeware/include -O2" export PERL="/opt/freeware/bin/perl" export PYTHON="/opt/freeware/bin/python3" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --libdir=%{_libdir}64 \ --libexecdir=%{_libexecdir}64 \ --enable-shared --disable-static \ --disable-neon-version-check \ --disable-mod-activation \ --with-sqlite=%{_prefix} \ --with-zlib=%{_prefix} \ --with-apxs \ --with-ssl \ --with-openssl \ --with-serf=%{_prefix} \ --with-lz4=internal \ --with-utf8proc=internal # Due to configure issue sed "s;-L%{_liddir}64;-L/opt/freeware/lib64;" Makefile >Makefile.tmp [ -s Makefile.tmp ] && mv -f Makefile.tmp Makefile patch -p0 < %{SOURCE4} make # Build python bindings make swig-py CFLAGS="$CFLAGS" # Build PERL bindings make swig-pl DESTDIR=$RPM_BUILD_ROOT CC="$CC" CCFLAGS="$CFLAGS" %if %{make_ra_local_bdb_check} echo "*** Running regression tests on RA_LOCAL (FILE SYSTEM) layer ***" make check CLEANUP=true FS_TYPE=bdb echo "*** Finished regression tests on RA_LOCAL (FILE SYSTEM) layer ***" %endif %if %{make_ra_svn_bdb_check} echo "*** Running regression tests on RA_SVN (SVN method) layer ***" make svnserveautocheck CLEANUP=true FS_TYPE=bdb echo "*** Finished regression tests on RA_SVN (SVN method) layer ***" %endif %if %{make_ra_dav_bdb_check} echo "*** Running regression tests on RA_DAV (HTTP method) layer ***" make davautocheck CLEANUP=true FS_TYPE=bdb echo "*** Finished regression tests on RA_DAV (HTTP method) layer ***" %endif %if %{make_ra_local_fsfs_check} echo "*** Running regression tests on RA_LOCAL (FILE SYSTEM) layer ***" make check CLEANUP=true FS_TYPE=fsfs echo "*** Finished regression tests on RA_LOCAL (FILE SYSTEM) layer ***" %endif %if %{make_ra_svn_fsfs_check} echo "*** Running regression tests on RA_SVN (SVN method) layer ***" make svnserveautocheck CLEANUP=true FS_TYPE=fsfs "*** Finished regression tests on RA_SVN (SVN method) layer ***" %endif %if %{make_ra_dav_fsfs_check} echo "*** Running regression tests on RA_DAV (HTTP method) layer ***" make davautocheck CLEANUP=true FS_TYPE=fsfs echo "*** Finished regression tests on RA_DAV (HTTP method) layer ***" %endif #make check 2>&1 | tee /tmp/%{name}-%{version}.MakeCheck.log if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi #build on 32 bit mode cd ../32bit export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-bmaxdata:0x80000000 -Wl,-brtl -lz -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib" export PERL="/opt/freeware/bin/perl_32" export PYTHON="/opt/freeware/bin/python3_32" export CFLAGS=" -maix32 -D_LARGE_FILES -O2" export CPPFLAGS=" -DSVN_NEON_0_28 -DSVN_NEON_0_27 -DSVN_NEON_0_26 -DSVN_NEON_0_25 -O2" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --libexecdir=%{_libexecdir} \ --enable-shared --disable-static \ --disable-neon-version-check \ --disable-mod-activation \ --with-sqlite=%{_prefix} \ --with-zlib=%{_prefix} \ --with-apxs \ --with-ssl \ --with-openssl \ --with-serf=%{_prefix} \ --with-lz4=internal \ --with-utf8proc=internal # Due to configure issue sed "s;-L%{_liddir};-L/opt/freeware/lib;" Makefile >Makefile.tmp [ -s Makefile.tmp ] && mv -f Makefile.tmp Makefile patch -p0 < %{SOURCE4} make # Build python bindings make swig-py CFLAGS="$CFLAGS" # Build PERL bindings make swig-pl DESTDIR=$RPM_BUILD_ROOT CC="$CC" CCFLAGS="$CFLAGS" %if %{make_ra_local_bdb_check} echo "*** Running regression tests on RA_LOCAL (FILE SYSTEM) layer ***" make check CLEANUP=true FS_TYPE=bdb echo "*** Finished regression tests on RA_LOCAL (FILE SYSTEM) layer ***" %endif %if %{make_ra_svn_bdb_check} echo "*** Running regression tests on RA_SVN (SVN method) layer ***" make svnserveautocheck CLEANUP=true FS_TYPE=bdb echo "*** Finished regression tests on RA_SVN (SVN method) layer ***" %endif %if %{make_ra_dav_bdb_check} echo "*** Running regression tests on RA_DAV (HTTP method) layer ***" make davautocheck CLEANUP=true FS_TYPE=bdb echo "*** Finished regression tests on RA_DAV (HTTP method) layer ***" %endif %if %{make_ra_local_fsfs_check} echo "*** Running regression tests on RA_LOCAL (FILE SYSTEM) layer ***" make check CLEANUP=true FS_TYPE=fsfs echo "*** Finished regression tests on RA_LOCAL (FILE SYSTEM) layer ***" %endif %if %{make_ra_svn_fsfs_check} echo "*** Running regression tests on RA_SVN (SVN method) layer ***" make svnserveautocheck CLEANUP=true FS_TYPE=fsfs "*** Finished regression tests on RA_SVN (SVN method) layer ***" %endif %if %{make_ra_dav_fsfs_check} echo "*** Running regression tests on RA_DAV (HTTP method) layer ***" make davautocheck CLEANUP=true FS_TYPE=fsfs echo "*** Finished regression tests on RA_DAV (HTTP method) layer ***" %endif #make check 2>&1 | tee /tmp/%{name}-%{version}.MakeCheck.log if [ "%{dotests}" == 1 ] then (gmake -k check || true) fi %install export PATH="$PATH:/usr/vac/bin" export RM="rm -f" [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} #Install on 64bit mode cd 64bit export OBJECT_MODE=64 export CC=/opt/freeware/bin/gcc export CFLAGS="-maix64 -I/opt/freeware/include" make install DESTDIR=$RPM_BUILD_ROOT # Install Python SWIG bindings. make install-swig-py DESTDIR=$RPM_BUILD_ROOT DISTUTIL_PARAM=--prefix=$RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}%{_libdir}64/python%{pyver}/site-packages mv ${RPM_BUILD_ROOT}%{_libdir}64/svn-python/* ${RPM_BUILD_ROOT}%{_libdir}64/python%{pyver}/site-packages rmdir ${RPM_BUILD_ROOT}%{_libdir}64/svn-python # Install PERL SWIG bindings. make install-swig-pl DESTDIR=$RPM_BUILD_ROOT CC="$CC" CCFLAGS="$CFLAGS" gmake pure_vendor_install -C subversion/bindings/swig/perl/native \ PERL_INSTALL_ROOT=$RPM_BUILD_ROOT ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin 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 export CFLAGS="-maix32 -D_LARGE_FILES -I/opt/freeware/include" make install DESTDIR=$RPM_BUILD_ROOT /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra chmod 755 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra cp %{SOURCE5} ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra chmod 644 ${RPM_BUILD_ROOT}%{_sysconfdir}/httpd/conf/extra/* # Install Python SWIG bindings. make install-swig-py DESTDIR=$RPM_BUILD_ROOT DISTUTIL_PARAM=--prefix=$RPM_BUILD_ROOT mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/python%{pyver}/site-packages mv ${RPM_BUILD_ROOT}%{_libdir}/svn-python/* ${RPM_BUILD_ROOT}%{_libdir}/python%{pyver}/site-packages rmdir ${RPM_BUILD_ROOT}%{_libdir}/svn-python # Install PERL SWIG bindings. make install-swig-pl DESTDIR=$RPM_BUILD_ROOT CC="$CC" CCFLAGS="$CFLAGS" gmake pure_vendor_install -C subversion/bindings/swig/perl/native \ PERL_INSTALL_ROOT=$RPM_BUILD_ROOT # Rename authz_svn INSTALL doc for docdir ln -f subversion/mod_authz_svn/INSTALL mod_authz_svn-INSTALL ( cd ${RPM_BUILD_ROOT}/%{_prefix}/bin for fic in $(ls -1| grep -v -e _32 -e _64) do mv $fic "$fic"_32 ln -sf "$fic"_64 $fic done ) rm -rf tools/dist/backport/merger.py rm -rf tools/dist/backport/status.py rm -rf tools/dist/backport_tests_py.py rm -rf tools/dist/detect-conflicting-backports.py rm -rf tools/dist/merge-approved-backports.py rm -rf tools/client-side/svn-vendor.py sed -i "s;#!/usr/local/bin/python;#!/opt/freeware/bin/python3;" tools/server-side/svnpubsub/commit-hook.py sed -i "s;#!/usr/local/bin/python;#!/opt/freeware/bin/python3;" tools/server-side/svnpubsub/revprop-change-hook.py find . -name "*.py" -exec sed -i "s;#!/usr/bin/python$;#!/opt/freeware/bin/python3;g" {} \; sed -i "s;#!/usr/bin/python$;#!/opt/freeware/bin/python3;g" tools/examples/SvnCLBrowse grep -rl "\/usr\/bin\/perl" | xargs sed -i 's|#!/usr/bin/perl|#!/opt/freeware/bin/perl|g' # Set up contrib and tools package files. #mkdir -p $RPM_BUILD_ROOT%{_libdir}/subversion #cp -r tools $RPM_BUILD_ROOT%{_libdir}/subversion #cp -r contrib $RPM_BUILD_ROOT%{_libdir}/subversion %post -n mod_dav_svn if [ -f %{_prefix}/etc/httpd/conf/httpd.conf ]; then cat %{_prefix}/etc/httpd/conf/httpd.conf | \ grep -v "# Subversion settings" | \ grep -v "Include conf/extra/httpd-subversion.conf" \ > %{_prefix}/etc/httpd/conf/tmp_httpd.conf mv -f %{_prefix}/etc/httpd/conf/tmp_httpd.conf %{_prefix}/etc/httpd/conf/httpd.conf fi echo "# Subversion settings" >> %{_prefix}/etc/httpd/conf/httpd.conf echo "Include conf/extra/httpd-subversion.conf" >> %{_prefix}/etc/httpd/conf/httpd.conf if [ -f %{_prefix}/etc/httpd/conf/httpd.conf_64 ]; then cat %{_prefix}/etc/httpd/conf/httpd.conf_64 | \ grep -v "# Subversion settings" | \ grep -v "Include conf/extra/httpd-subversion.conf_64" \ > %{_prefix}/etc/httpd/conf/tmp_httpd.conf_64 mv -f %{_prefix}/etc/httpd/conf/tmp_httpd.conf_64 %{_prefix}/etc/httpd/conf/httpd.conf_64 fi echo "# Subversion settings" >> %{_prefix}/etc/httpd/conf/httpd.conf_64 echo "Include conf/extra/httpd-subversion.conf_64" >> %{_prefix}/etc/httpd/conf/httpd.conf_64 echo "Please restart your web server using: '/opt/freeware/sbin/apachectl restart'" %preun -n mod_dav_svn if [ "$1" = 0 ]; then cat %{_prefix}/etc/httpd/conf/httpd.conf | \ grep -v "# Subversion settings" | \ grep -v "Include conf/extra/httpd-subversion.conf" \ > %{_prefix}/etc/httpd/conf/tmp_httpd.conf mv -f %{_prefix}/etc/httpd/conf/tmp_httpd.conf %{_prefix}/etc/httpd/conf/httpd.conf cat %{_prefix}/etc/httpd/conf/httpd.conf_64 | \ grep -v "# Subversion settings" | \ grep -v "Include conf/extra/httpd-subversion.conf_64" \ > %{_prefix}/etc/httpd/conf/tmp_httpd.conf_64 mv -f %{_prefix}/etc/httpd/conf/tmp_httpd.conf_64 %{_prefix}/etc/httpd/conf/httpd.conf_64 echo "Please restart your web server using: '/opt/freeware/sbin/apachectl restart'" fi %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system) %doc 32bit/BUGS 32bit/CHANGES 32bit/COMMITTERS 32bit/INSTALL 32bit/README %doc 32bit/LICENSE 32bit/mod_authz_svn-INSTALL %{_bindir}/* %{_libdir}/libsvn_*.so* %{_libdir}64/libsvn_*.so* %{_mandir}/man*/* %{_datadir}/locale/*/LC_MESSAGES/* %files devel %defattr(-,root,system) %{_includedir}/subversion-1/* %{_libdir}/libsvn*.*a %{_libdir}64/libsvn*.*a %files -n mod_dav_svn %defattr(-,root,system) %config(noreplace) %{_prefix}/etc/httpd/conf/extra/httpd-subversion.conf %config(noreplace) %{_prefix}/etc/httpd/conf/extra/httpd-subversion.conf_64 %{_prefix}/libexec/mod_dav_svn.so %{_prefix}/libexec/mod_authz_svn.so %{_prefix}/libexec64/mod_dav_svn.so %{_prefix}/libexec64/mod_authz_svn.so %files tools %defattr(-,root,system) %doc 32bit/tools %{_libdir}/python%{pyver}/* %{_libdir}64/python%{pyver}/* %{perl_vendorarch_32}/auto/SVN %{perl_vendorarch_32}/SVN %{perl_vendorarch_64}/auto/SVN %{perl_vendorarch_64}/SVN %{_prefix}/share/man/man3/* %changelog * Tue May 04 2021 Reshma V Kumar - 1.10.7-1 - Update to fix CVE-2020-17525 - Stop shipping files in /usr directory - Build with python3 * Mon Jul 6 2020 Reshma V Kumar 1.10.6-2 - Build with perl 5.30.2 * Wed Sep 11 2019 Reshma V Kumar 1.10.6-1 - Update to fix CVE-2019-0203,CVE-2018-11782 * Thu Feb 07 2019 Reshma V Kumar 1.10.4-1 - Update to fix CVE-2018-11803 * Wed Jan 30 2019 Reshma V Kumar 1.10.3-1 - Update to 1.10.3 * Thu Jan 10 2019 Reshma V Kumar 1.10.2-1 - Updated to latest version * Tue Dec 27 2016 Reshma V Kumar 1.9.5-1 - Update to 1.9.5 to fix security vulnerability * Mon Oct 20 2016 Ravi Hirekurabar 1.9.4-1 - Update to version 1.9.4 to fix security vulnerability * Fri Jul 12 2013 Gerard Visiedo 1.7.9-1 - Update to version 17.9. Build on Aix6.1 * Mon Jul 08 2013 Gerard Visiedo 1.6.23-1 - Update to version 1.6.23 . Build on Aix5.3 * Fri Jun 30 2011 Gerard Visiedo 1.6.17-1 - Update to version 1.6.17 * Thu Oct 7 2010 Jean Noel Cordenner 1.6.9-1 - Update to version 1.6.9 - debug mod_dav_svn * Wed Sep 30 2010 Jean Noel Cordenner 1.6.6-2 - add mod_dav_svn and mod_authz_svn modules to subversion * Wed Mar 3 2010 Jean Noel Cordenner 1.6.6-1 - Initial port for AIX