What is the current situation for adding %config (no replace)?
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? 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?
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 184.108.40.20620619-g5443
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.
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.