The following issue has been SUBMITTED. ====================================================================== http://www.itk.org/Bug/view.php?id=12448 ====================================================================== Reported By: Andreas Mohr Assigned To: ====================================================================== Project: CMake Issue ID: 12448 Category: CMake Reproducibility: always Severity: major Priority: high Status: new ====================================================================== Date Submitted: 2011-09-06 04:28 EDT Last Modified: 2011-09-06 04:28 EDT ====================================================================== Summary: install_manifest.txt syntax incompatible with RPM white space requirements --> easy/concise packaging handling mode not usable Description: Hi,
I'm using the RPM .spec %files -f files.list syntax (see http://www.rpm.org/max-rpm-snapshot/s1-rpm-specref-files-list.html ), (via a set(SPECFILE_INSTALL_MANIFEST_FILE_template "${CMAKE_BINARY_DIR}/install_manifest.txt") to have rpmbuild successfully reach the packaging-tree-external manifest file). Unfortunately, with my awfully Windows-tainted source tree, this fails horribly due to many files with embedded whitespace. For the result, see "Re: spaces in file names." http://www.redhat.com/archives/rpm-list/2001-November/msg00051.html "Filenames with blanks" http://www.redhat.com/archives/rpm-list/2001-November/msg00051.html Note that it does not seem to be an issue on the RPM .spec side - since they support multiple files per line, they use spaces as separators, and since that is a conflict with embedded-space files, they do seem to support the usual quoting convention to properly indicate this. One could argue that specifying an install manifest in %files line is exactly the way that packaging _should_ always be done - it's a manifest file as precisely created by the build/install tree, with all permissions declared via install() statements, and RPM .spec then simply adopting that compiled list and packaging it up. Thus no need to have any hassle whatsoever with manual, bit-rotting and maintenance-prone individual custom lines. Thus it's rather shocking that such a precise way is the one that fails. The question now would be how to fix it. One could add a CMake variable (e.g. CMAKE_INSTALL_MANIFEST_WHITESPACE_QUOTING_MODE) which may support values such as 0 (never quote), 1 (quote intelligently, only for files with embedded whitespace), 2 (always quote). And perhaps one should switch to having quoting activated by _default_ (although I'm sure some UNIX users will violently disagree :). And perhaps this new handling needs to be governed by a new CMake policy. Observed on CMake 2.6.4 (sorry), but from grepping git tree it doesn't seem like there's improved handling in this area. Thanks! Steps to Reproduce: - have a project with files containing spaces - have install() statements for such files - create RPM .spec template - add line %files -f @SPEC_INSTALL_MANIFEST_template@ - set(SPEC_INSTALL_MANIFEST_template "${CMAKE_BINARY_DIR}/install_manifest.txt") - observe rpmbuild failure on cpack -G RPM ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2011-09-06 04:28 Andreas Mohr New Issue ====================================================================== _______________________________________________ cmake-developers mailing list [email protected] http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
