diff --git a/cmake-3.20-CPACK_THREADS.patch b/cmake-3.20-CPACK_THREADS.patch new file mode 100755 index 0000000000000000000000000000000000000000..354f58540ba8f7bf217f094a57ddce6f8cfdf295 --- /dev/null +++ b/cmake-3.20-CPACK_THREADS.patch @@ -0,0 +1,11 @@ +diff -up cmake-3.20.0/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake.CPACK_THREADS cmake-3.20.0/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake +--- cmake-3.20.0/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake.CPACK_THREADS 2021-03-23 10:43:17.000000000 -0500 ++++ cmake-3.20.0/Tests/RunCMake/CPack/tests/THREADED_ALL/test.cmake 2021-03-23 13:29:14.539434722 -0500 +@@ -1,6 +1,6 @@ + install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) + +-set(CPACK_THREADS 0) ++set(CPACK_THREADS 4) + + if(PACKAGING_TYPE STREQUAL "COMPONENT") + set(CPACK_COMPONENTS_ALL test) diff --git a/cmake-3.20.2.tar.gz b/cmake-3.20.2.tar.gz new file mode 100755 index 0000000000000000000000000000000000000000..af68804eaf448deec710e7ceb45a720a75c11315 Binary files /dev/null and b/cmake-3.20.2.tar.gz differ diff --git a/cmake-findruby.patch b/cmake-findruby.patch new file mode 100755 index 0000000000000000000000000000000000000000..97ac43a39a9f9b87f2ac3417ce4099d34155a700 --- /dev/null +++ b/cmake-findruby.patch @@ -0,0 +1,20 @@ +diff -Naur cmake-3.18.2.orig/Modules/FindRuby.cmake cmake-3.18.2/Modules/FindRuby.cmake +--- cmake-3.18.2.orig/Modules/FindRuby.cmake 2020-09-08 13:30:51.129086854 +0000 ++++ cmake-3.18.2/Modules/FindRuby.cmake 2020-09-10 07:10:56.679302608 +0000 +@@ -300,14 +300,8 @@ + _RUBY_CONFIG_VAR("sitearchdir" Ruby_SITEARCH_DIR) + _RUBY_CONFIG_VAR("sitelibdir" Ruby_SITELIB_DIR) + +- # vendor_ruby available ? +- execute_process(COMMAND ${Ruby_EXECUTABLE} -r vendor-specific -e "print 'true'" +- OUTPUT_VARIABLE Ruby_HAS_VENDOR_RUBY ERROR_QUIET) +- +- if(Ruby_HAS_VENDOR_RUBY) +- _RUBY_CONFIG_VAR("vendorlibdir" Ruby_VENDORLIB_DIR) +- _RUBY_CONFIG_VAR("vendorarchdir" Ruby_VENDORARCH_DIR) +- endif() ++ _RUBY_CONFIG_VAR("vendorlibdir" RUBY_VENDORLIB_DIR) ++ _RUBY_CONFIG_VAR("vendorarchdir" RUBY_VENDORARCH_DIR) + + # save the results in the cache so we don't have to run ruby the next time again + set(Ruby_VERSION_MAJOR ${Ruby_VERSION_MAJOR} CACHE PATH "The Ruby major version" FORCE) diff --git a/cmake-init.el b/cmake-init.el old mode 100644 new mode 100755 diff --git a/cmake-mingw-dl.patch b/cmake-mingw-dl.patch old mode 100644 new mode 100755 diff --git a/cmake.attr b/cmake.attr old mode 100644 new mode 100755 diff --git a/cmake.prov b/cmake.prov old mode 100644 new mode 100755 diff --git a/cmake.req b/cmake.req old mode 100644 new mode 100755 diff --git a/cmake.spec b/cmake.spec old mode 100644 new mode 100755 index 30b1ec4a1dfec4773724b05b689a366dadd0454d..af1ecd3a4a75df31ad3d144bb13e6f3b4adbcfa5 --- a/cmake.spec +++ b/cmake.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 # Do we add appdata-files? # consider conditional on whether %%_metainfodir is defined or not instead -- rex %if 0%{?fedora} || 0%{?rhel} > 7 @@ -33,15 +32,15 @@ # Enable RPM dependency generators for cmake files written in Python %bcond_without rpm -# Sphinx-build cannot import CMakeLexer on EPEL <= 6 -%if 0%{?rhel} && 0%{?rhel} <= 6 -%bcond_with sphinx -%else %bcond_without sphinx -%endif -%bcond_with bundled_libarchive +%if !0%{?rhel} +%bcond_with bundled_jsoncpp +%bcond_with bundled_rhash +%else %bcond_without bundled_jsoncpp +%bcond_without bundled_rhash +%endif # Run tests %bcond_without test @@ -59,23 +58,22 @@ %{!?_vpath_builddir:%global _vpath_builddir %{_target_platform}} %global major_version 3 -%global minor_version 18 -%global patch_version 2 - -%global baserelease 11 - +%global minor_version 20 # Set to RC version if building RC, else %%{nil} -#global rcsuf rc3 +#global rcsuf rc1 %{?rcsuf:%global relsuf .%{rcsuf}} %{?rcsuf:%global versuf -%{rcsuf}} +# For handling bump release by rpmdev-bumpspec and mass rebuild +%global baserelease 4 + # Uncomment if building for EPEL #global name_suffix %%{major_version} %global orig_name cmake Name: %{orig_name}%{?name_suffix} -Version: %{major_version}.%{minor_version}.%{patch_version} -Release: %{baserelease}%{?relsuf}%{anolis_release}%{?dist} +Version: %{major_version}.%{minor_version}.2 +Release: %{baserelease}%{?relsuf}%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -85,28 +83,37 @@ Summary: Cross-platform make system # exception granting redistribution under terms of your choice License: BSD and MIT and zlib URL: http://www.cmake.org -Source0: https://github.com/Kitware/CMake/archive/v%{version}/cmake-%{version}%{?rcver:%rcver}.tar.gz +Source0: http://www.cmake.org/files/v%{major_version}.%{minor_version}/%{orig_name}-%{version}%{?versuf}.tar.gz Source1: %{name}-init.el Source2: macros.%{name} # See https://bugzilla.redhat.com/show_bug.cgi?id=1202899 Source3: %{name}.attr Source4: %{name}.prov Source5: %{name}.req -Source6: cmake%{?name_suffix}-gui.appdata.xml # Always start regular patches with numbers >= 100. # We need lower numbers for patches in compat package. # And this enables us to use %%autosetup - +# +# Patch to fix RindRuby vendor settings +# http://public.kitware.com/Bug/view.php?id=12965 +# https://bugzilla.redhat.com/show_bug.cgi?id=822796 +Patch100: %{name}-findruby.patch # replace release flag -O3 with -O2 for fedora +%if 0%{?fedora} && 0%{?fedora} < 34 Patch101: %{name}-fedora-flag_release.patch +%endif # Add dl to CMAKE_DL_LIBS on MINGW # https://gitlab.kitware.com/cmake/cmake/issues/17600 Patch102: %{name}-mingw-dl.patch +# memory-hungry tests when building on koji builders with *lots* of cores +# so limit it to some reasonable number (4) +Patch103: cmake-3.20-CPACK_THREADS.patch -# --zstd option requires tar >= 1.31 -Patch103: 0001-Remove-pax-zstd-test.patch - +# Patch for renaming on EPEL +%if 0%{?name_suffix:1} +Patch1: %{name}-rename.patch +%endif BuildRequires: coreutils BuildRequires: findutils @@ -132,18 +139,25 @@ BuildRequires: %{_bindir}/sphinx-build BuildRequires: bzip2-devel BuildRequires: curl-devel BuildRequires: expat-devel -# Needed jsoncpp >= 1.4.1 -%if %{without bundled_jsoncpp} +%if %{with bundled_jsoncpp} +Provides: bundled(jsoncpp) +%else BuildRequires: jsoncpp-devel %endif - -%if %{without bundled_libarchive} -BuildRequires: libarchive-devel >= 3.3.3 +%if 0%{?fedora} || 0%{?rhel} >= 7 +BuildRequires: libarchive-devel >= 3.3.3 +%else +BuildRequires: libarchive3-devel %endif BuildRequires: libuv-devel +%if %{with bundled_rhash} +Provides: bundled(rhash) +%else +BuildRequires: rhash-devel +%endif BuildRequires: xz-devel BuildRequires: zlib-devel -BuildRequires: libzstd-devel +BuildRequires: vim-filesystem %endif %if %{with emacs} BuildRequires: emacs @@ -157,31 +171,31 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python2-devel %endif %endif -#BuildRequires: xmlrpc-c-devel %if %{with gui} %if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: pkgconfig(Qt5Widgets) -BuildRequires: libappstream-glib %else BuildRequires: pkgconfig(QtGui) %endif BuildRequires: desktop-file-utils %endif +BuildRequires: pkgconfig(bash-completion) +%global bash_completionsdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null || echo '%{_datadir}/bash-completion/completions') + %if %{without bootstrap} # Ensure we have our own rpm-macros in place during build. BuildRequires: %{name}-rpm-macros %endif +BuildRequires: make -# FIX bug: https://bugzilla.redhat.com/show_bug.cgi?id=1827927 -# more info: https://access.redhat.com/solutions/6068431 -%if %{without bundled_libarchive} -Requires: libarchive >= 3.3.3 -%endif Requires: %{name}-data = %{version}-%{release} Requires: %{name}-rpm-macros = %{version}-%{release} Requires: %{name}-filesystem%{?_isa} = %{version}-%{release} +# Explicitly require make. (rhbz#1862014) +Requires: make + # Provide the major version name Provides: %{orig_name}%{major_version} = %{version}-%{release} @@ -192,17 +206,6 @@ Provides: bundled(md5-deutsch) # https://fedorahosted.org/fpc/ticket/555 Provides: bundled(kwsys) -%if %{with bundled_libarchive} -Provides: bundled(libarchive) = 0:3.3.3 -%endif -%if %{with bundled_jsoncpp} -Provides: bundled(json-cpp) = 0:1.8.2 -%endif - -%{?name_suffix:Provides: %{orig_name} = %{version}} - -Conflicts: %{name}-doc < %{version} - %description CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates @@ -233,7 +236,9 @@ This package contains common data-files for %{name}. %package doc Summary: Documentation for %{name} BuildArch: noarch -Conflicts: %{name} < %{version} + +# license files moved from the doc package to main package. +Conflicts: %{name} <= 3.20.1 %description doc This package contains documentation for %{name}. @@ -272,8 +277,7 @@ This package contains common RPM macros for %{name}. %prep -%autosetup -n CMake-%{version}%{?versuf} -p1 - +%autosetup -n %{orig_name}-%{version}%{?versuf} -p 1 %if %{with rpm} %if %{with python3} @@ -304,14 +308,13 @@ pushd %{_vpath_builddir} $SRCDIR/bootstrap --prefix=%{_prefix} --datadir=/share/%{name} \ --docdir=/share/doc/%{name} --mandir=/share/man \ --%{?with_bootstrap:no-}system-libs \ + --parallel="$(echo %{?_smp_mflags} | sed -e 's|-j||g')" \ +%if %{with bundled_rhash} --no-system-librhash \ +%endif %if %{with bundled_jsoncpp} --no-system-jsoncpp \ %endif -%if %{with bundled_libarchive} - --no-system-libarchive \ -%endif - --parallel=`/usr/bin/getconf _NPROCESSORS_ONLN` \ %if %{with sphinx} --sphinx-man --sphinx-html \ %else @@ -330,17 +333,17 @@ find %{buildroot}%{_datadir}/%{name}/Modules -type f | xargs chmod -x [ -n "$(find %{buildroot}%{_datadir}/%{name}/Modules -name \*.orig)" ] && echo "Found .orig files in %{_datadir}/%{name}/Modules, rebase patches" && exit 1 - # Install major_version name links %{!?name_suffix:for f in ccmake cmake cpack ctest; do ln -s $f %{buildroot}%{_bindir}/${f}%{major_version}; done} %if %{with emacs} # Install emacs cmake mode -mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name} -install -p -m 0644 Auxiliary/cmake-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el +mkdir -p %{buildroot}%{_emacs_sitelispdir}/%{name} %{buildroot}%{_emacs_sitestartdir} +mv %{buildroot}%{_emacs_sitelispdir}/%{name}-mode.el %{buildroot}%{_emacs_sitelispdir}/%{name} %{_emacs_bytecompile} %{buildroot}%{_emacs_sitelispdir}/%{name}/%{name}-mode.el -mkdir -p %{buildroot}%{_emacs_sitestartdir} install -p -m 0644 %{SOURCE1} %{buildroot}%{_emacs_sitestartdir} +%else +rm -f %{buildroot}%{_emacs_sitelispdir} %endif # RPM macros install -p -m0644 -D %{SOURCE2} %{buildroot}%{rpm_macros_dir}/macros.%{name} @@ -389,8 +392,34 @@ desktop-file-install --delete-original \ # See http://www.freedesktop.org/software/appstream/docs/ for more details. # mkdir -p %{buildroot}%{_metainfodir} -install -pm 644 %{SOURCE6} %{buildroot}%{_metainfodir}/ -appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml +cat > %{buildroot}%{_metainfodir}/cmake-gui.appdata.xml < + + + + cmake-gui.desktop + CC0-1.0 + CMake GUI + Create new CMake projects + +

+ CMake is an open source, cross platform build system that can build, test, + and package software. CMake GUI is a graphical user interface that can + create and edit CMake projects. +

+
+ http://www.cmake.org + + https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/CMake/a.png + + +
+EOF %endif %endif @@ -409,51 +438,32 @@ find %{buildroot}%{_bindir} -type f -or -type l -or -xtype l | \ %if %{with test} %check -%if 0%{?rhel} && 0%{?rhel} <= 6 -mv -f Modules/FindLibArchive.cmake Modules/FindLibArchive.disabled -%endif pushd %{_vpath_builddir} # CTestTestUpload require internet access # CPackComponentsForAll-RPM-IgnoreGroup failing wih rpm 4.15 - https://gitlab.kitware.com/cmake/cmake/issues/19983 -NO_TEST="CTestTestUpload|CPackComponentsForAll-RPM-IgnoreGroup" +NO_TEST="CTestTestUpload|CPackComponentsForAll-RPM-IgnoreGroup|CPack_RPM.DEBUGINFO" # kwsys.testProcess-{4,5} are flaky on s390x. %ifarch s390x NO_TEST="$NO_TEST|kwsys.testProcess-4|kwsys.testProcess-5" %endif + # RunCMake.PrecompileHeaders test uses precompiled file presumably compiled with different compiler # that one of RHEL8 (GCC-8.3.1). See https://bugzilla.redhat.com/show_bug.cgi?id=1721553#c4 %if 0%{?rhel} && 0%{?rhel} > 7 NO_TEST="$NO_TEST|RunCMake.PrecompileHeaders" %endif +# curl test may fail during bootstrap +%if %{with bootstrap} +NO_TEST="$NO_TEST|curl" +%endif bin/ctest%{?name_suffix} %{?_smp_mflags} -V -E "$NO_TEST" --output-on-failure +## do this only periodically, not for every build -- rdieter 20210429 # Keep an eye on failing tests -bin/ctest%{?name_suffix} %{?_smp_mflags} -V -R "$NO_TEST" --output-on-failure || : +#bin/ctest%{?name_suffix} %{?_smp_mflags} -V -R "$NO_TEST" --output-on-failure || : popd -%if 0%{?rhel} && 0%{?rhel} <= 6 -mv -f Modules/FindLibArchive.disabled Modules/FindLibArchive.cmake -%endif %endif -%if %{with gui} -%post gui -update-desktop-database &> /dev/null || : -/bin/touch --no-create %{_datadir}/mime || : -/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - -%postun gui -update-desktop-database &> /dev/null || : -if [ $1 -eq 0 ] ; then - /bin/touch --no-create %{_datadir}/mime || : - update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : - /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : - /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -fi - -%posttrans gui -update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : -/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : -%endif %files -f lib_files.mf %doc %dir %{_pkgdocdir} @@ -470,23 +480,24 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %files data -f data_files.mf %{_datadir}/aclocal/%{name}.m4 -%{_datadir}/bash-completion +%{bash_completionsdir}/c* %if %{with emacs} %if 0%{?fedora} || 0%{?rhel} >= 7 %{_emacs_sitelispdir}/%{name} -%{_emacs_sitelispdir}/%{name}-mode.el %{_emacs_sitestartdir}/%{name}-init.el %else %{_emacs_sitelispdir} %{_emacs_sitestartdir} %endif %endif -%{_datadir}/vim/vimfiles/indent/cmake.vim -%{_datadir}/vim/vimfiles/syntax/cmake.vim +%{vimfiles_root}/indent/%{name}.vim +%{vimfiles_root}/syntax/%{name}.vim %files doc -%license %{_datadir}/licenses/%{name}* +# Pickup license-files from main-pkg's license-dir +# If there's no license-dir they are picked up by %%doc previously +%{?_licensedir:%license %{_datadir}/licenses/%{name}*} %doc %{_pkgdocdir} @@ -518,14 +529,17 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog -* Thu Nov 18 2021 Weitao Zhou - 3.18.2-11.0.1 -- Require libarchive >= 3.3.3 to fix crash by libarchive incompatible abi +* Fri Jul 09 2021 sguelton@redhat.com - 3.20.2-4 +- Fix update (rhbz#1964407) + +* Thu Jun 17 2021 sguelton@redhat.com - 3.20.2-3 +- Fix rhbz#1964392 and rhbz#1964407 -* Thu Jun 03 2021 sguelton@redhat.com - 3.18.2-11 -- Minimal libarchive req (#1965373) +* Fri Jun 04 2021 sguelton@redhat.com - 3.20.2-2 +- Minimal libarchive req -* Fri May 28 2021 sguelton@redhat.com - 3.18.2-10 -- Restore major version symlinks +* Thu May 20 2021 sguelton@redhat.com - 3.20.2-1 +- Sync with Fedora rawhide. (#1957947) * Mon Jan 25 2021 Tom Stellard - 3.18.2-9 - Sync macros from Fedora diff --git a/macros.cmake b/macros.cmake old mode 100644 new mode 100755