From 86797b8024388b1d63dd191674a10ba3899d08a4 Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Mon, 17 May 2010 00:48:53 +0300 Subject: [PATCH] Add cpack_installed_size.diff to fix generation of Installed-Size field for deb packages. Thanks to Simone Rossetto for heads up and initial patch. --- debian/changelog | 2 ++ debian/patches/cpack_installed_size.diff | 22 ++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 25 insertions(+) create mode 100644 debian/patches/cpack_installed_size.diff diff --git a/debian/changelog b/debian/changelog index cd50bb477..8bd75ffd8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ cmake (2.8.1-4) UNRELEASED; urgency=low * Further improve FinJNI.cmake. This should fix some inconsistencies on s390. + * Add cpack_installed_size.diff to fix generation of Installed-Size field for + deb packages. Thanks to Simone Rossetto for heads up and initial patch. -- Modestas Vainius Sun, 16 May 2010 16:14:33 +0300 diff --git a/debian/patches/cpack_installed_size.diff b/debian/patches/cpack_installed_size.diff new file mode 100644 index 000000000..b824f0cda --- /dev/null +++ b/debian/patches/cpack_installed_size.diff @@ -0,0 +1,22 @@ +Description: CPack: units of the deb Installed-Size field are rounded up bytes / 1024 + Units of the Installed-Size field in debs are estimated installed size in + bytes, divided by 1024 and rounded up. See Debian Polucy 5.6.20 for more + information: + http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Installed-Size +Author: Simone Rossetto +Author: Modestas Vainius +Bug: http://public.kitware.com/Bug/view.php?id=10296 +Forwarded: yes +Last-Update: 2010-05-17 + +--- a/Source/CPack/cmCPackDebGenerator.cxx ++++ b/Source/CPack/cmCPackDebGenerator.cxx +@@ -121,7 +121,7 @@ int cmCPackDebGenerator::CompressFiles(c + totalSize += cmSystemTools::FileLength(fileIt->c_str()); + } + } +- out << "Installed-Size: " << totalSize << "\n"; ++ out << "Installed-Size: " << (totalSize + 1023) / 1024 << "\n"; + out << "Maintainer: " << maintainer << "\n"; + out << "Description: " << desc << "\n"; + out << std::endl; diff --git a/debian/patches/series b/debian/patches/series index 165ac2ed2..bfbf848ee 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ hurd_platform.diff kFreeBSD_Hurd_fixes.diff FindGTK2_pangommconfig.diff FindJNI_fix_libarch_determination.diff +cpack_installed_size.diff