[CMake] Is it a bug that cmake / cpack could not handle directory name with @?

Eric Noulard eric.noulard at gmail.com
Fri Apr 5 03:32:17 EDT 2013


2013/4/5 hce <jupiter.hce at gmail.com>

> Hi,
>
> I have a binary directory contains subdirectories name with "@":
>
> graph3d/@graph3d/@colorbar/colorbar.m
> scribe/@scribe/@colorbar/colorbar.m
>
> When I run cpack -G RPM, it removed @ and put following string name in the
> spec:
>
> graph3d/graph3d/colorbar/colorbar.m
> scribe/scribe/colorbar/colorbar.m
>

Yes for CPack RPM I can see why that is happening.
The spec file generated by CPackRPM is
   1) generated
   2) configured  (with @ONLY)

This is handy for many reason so @ in pathname should be protected otherwise
they will be processed (and removed) by configure_file.

Could you have a look at the difference between

<yourpackage>.spec.in
and
<yourpackage>.spec

file you will find in <buildtree>/_CPack_Packages/<yoursys>/RPM/SPECS

CPackRPM announce the name of the configured spec file:
"CPackRPM: Will use GENERATED spec file: [...]RPM/SPECS/<package>.spec



> That resulted errors of "File not found ...." and could not generate RPM
> package.
>
> It seems cmake / cpack could not handle directory name with @, is there any
> workaround to resolve this issue?
>

I don't think that all generator are hit by this,
did you try alternative CPack generator like TGZ or ZIP ?  Could you try?
cpack -G TGZ

I'll think of a workaround for CPackRPM, the fastest solution would be to
use
CPACK_RPM_USER_BINARY_SPECFILE

see:
cpack --help-variable CPACK_RPM_GENERATE_USER_BINARY_SPECFILE_TEMPLATE
cpack --help-variable CPACK_RPM_USER_BINARY_SPECFILE

That said I'll try a patch to protect filename against '@' in them.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130405/88e1ae94/attachment.htm>


More information about the CMake mailing list