From 1f939db3c4c8ff39759683dba8cfb0ece1c76d55 Mon Sep 17 00:00:00 2001 From: Alex Turbov Date: Sun, 8 Mar 2026 03:52:21 +0400 Subject: [PATCH] CPack/RPM: Remove superfluous `%clean` section from generated spec file According to [this] commit message in the `rpmlint` codebase, a %clean section is not necessary since `rpm` 4.8.0 (2010) and nowadays `rpmlint` at least issues a warning about it, and (seems) in some distros it's even considered as an error. [this]: https://github.com/rpm-software-management/rpmlint/commit/b1a8a422 --- Modules/Internal/CPack/CPackRPM.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index f3950ebc54..c2b9f42072 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -1747,8 +1747,6 @@ Vendor: \@CPACK_RPM_PACKAGE_VENDOR\@ %install \@TMP_RPM_INSTALL\@ -%clean - %changelog \@CPACK_RPM_SPEC_CHANGELOG\@ " @@ -1890,8 +1888,6 @@ mv %_topdir/tmpBBroot $RPM_BUILD_ROOT \@TMP_RPM_DEBUGINFO_INSTALL\@ -%clean - \@post_\@ \@posttrans_\@ \@postun_\@