[CMake] What is the current situation for adding %config (no replace)?
Eric Noulard
eric.noulard at gmail.com
Thu Jun 21 08:32:03 EDT 2012
2012/6/21 hce <jupiter.hce at gmail.com>:
> Hi,
>
> There were some discussions to fix %config at
> http://public.kitware.com/Bug/view.php?id=10294. But I tried to use
> CPACK_RPM_SPEC_IGNORE_FILES in 2.8.8, it does not seem work. What is current
> situation to use %config?
This should definitely work in 2.8.8 for RPM, however the variable you
must use is,
CPACK_RPM_USER_FILELIST. CPACK_RPM_SPEC_IGNORE_FILES was
a too specific name.
cpack --help-variable CPACK_RPM_USER_FILELIST
cpack version 2.8.8.20120619-g5443
CPACK_RPM_USER_FILELIST
CPACK_RPM_<COMPONENT>_USER_FILELIST
Mandatory : NO
Default : -
May be used to explicitly specify %(<directive>) file line
in the spec file. Like %config(noreplace) or any other directive
that be found in the %files section. Since CPackRPM is generating
the list of files (and directories) the user specified files of
the CPACK_RPM_<COMPONENT>_USER_FILELIST list will be
removed from the generated list.
so
set(CPACK_RPM_USER_FILELIST "%config(noreplace)/etc/myconf")
will make /etc/myconf a config + noreplace file in the RPM and remove
that file from the "automatic" handling machinery of CPackRPM.
> Even if the RPM variable works for %config, how
> can the no replace files work for other package such as debian? Is there a
> generic solution for no replace files?
Currently there is no generic solution.
At least some CPack generators like Archive Generators (ZIP, TGZ, ...)
won't be able
to support such feature but we can try to design a generic interface
(may be extending CMake install command) knowing that not all CPack generators
will be able to support the feature.
We can try to discuss the need and the possible solutions on
cmake-developer mailing list if you want.
--
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org
More information about the CMake
mailing list