diff --git a/cmake-CPackRPM_rpm_4_14_old_debuginfo.patch b/cmake-CPackRPM_rpm_4_14_old_debuginfo.patch new file mode 100644 index 0000000..b5ceda8 --- /dev/null +++ b/cmake-CPackRPM_rpm_4_14_old_debuginfo.patch @@ -0,0 +1,42 @@ +From 0d1e152ef9c622b1f6203822b1c88cc3c48857ac Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Mon, 31 Jul 2017 16:10:34 +0200 +Subject: [PATCH] Restore old style debuginfo creation for rpm >= 4.14 + +--- + Modules/CPackRPM.cmake | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake +index fa2a6e409..391349494 100644 +--- a/Modules/CPackRPM.cmake ++++ b/Modules/CPackRPM.cmake +@@ -2422,7 +2422,11 @@ mv *.rpm %_rpmdir" + set(RPMBUILD_FLAGS "-bs") + + file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in +- "# -*- rpm-spec -*- ++ "# Restore old style debuginfo creation for rpm >= 4.14. ++%undefine _debugsource_packages ++%undefine _debuginfo_subpackages ++ ++# -*- rpm-spec -*- + BuildRoot: %_topdir/\@CPACK_PACKAGE_FILE_NAME\@ + Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@ + Name: \@CPACK_RPM_PACKAGE_NAME\@ +@@ -2527,7 +2531,11 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ + if(CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE OR NOT CPACK_RPM_USER_BINARY_SPECFILE) + + file(WRITE ${CPACK_RPM_BINARY_SPECFILE}.in +- "# -*- rpm-spec -*- ++ "# Restore old style debuginfo creation for rpm >= 4.14. ++%undefine _debugsource_packages ++%undefine _debuginfo_subpackages ++ ++# -*- rpm-spec -*- + BuildRoot: %_topdir/\@CPACK_PACKAGE_FILE_NAME\@\@CPACK_RPM_PACKAGE_COMPONENT_PART_PATH\@ + Summary: \@CPACK_RPM_PACKAGE_SUMMARY\@ + Name: \@CPACK_RPM_PACKAGE_NAME\@ +-- +2.13.4 + diff --git a/cmake.spec b/cmake.spec index 0e68694..3ef25d5 100644 --- a/cmake.spec +++ b/cmake.spec @@ -41,7 +41,7 @@ Name: %{orig_name}%{?name_suffix} Version: %{major_version}.%{minor_version}.1 -Release: 1%{?relsuf}%{?dist} +Release: 2%{?relsuf}%{?dist} Summary: Cross-platform make system # most sources are BSD @@ -69,6 +69,9 @@ Source5: %{name}.req Patch100: %{name}-findruby.patch # replace release flag -O3 with -O2 for fedora Patch101: %{name}-fedora-flag_release.patch +# restore old style debuginfo creation for rpm >= 4.14 in CPackRPM +# https://gitlab.kitware.com/cmake/cmake/merge_requests/1099 +Patch102: https://gitlab.kitware.com/cmake/cmake/merge_requests/1099.patch#/%{name}-CPackRPM_rpm_4_14_old_debuginfo.patch # Patch for renaming on EPEL %if 0%{?name_suffix:1} @@ -344,10 +347,6 @@ mv -f Modules/FindLibArchive.cmake Modules/FindLibArchive.disabled pushd build #CMake.FileDownload, and CTestTestUpload require internet access NO_TEST="CMake.FileDownload|CTestTestUpload" -# RunCMake.CPack_RPM fails for the new way RPM handles debug-stuff -%if 0%{?fedora} >= 27 -NO_TEST="$NO_TEST|RunCMake.CPack_RPM" -%endif # RunCMake.File_Generate fails on S390X %ifarch s390x NO_TEST="$NO_TEST|RunCMake.File_Generate" @@ -445,6 +444,10 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : %changelog +* Sun Aug 13 2017 Björn Esser - 3.9.1-2 +- Add patch to restore old style debuginfo creation for rpm >= 4.14 + in CPackRPM + * Sat Aug 12 2017 Pete Walter - 3.9.1-1 - Update to 3.9.1