[cmake-developers] [CMake] What is the current situation for adding %config (no replace)?

jupiter jupiter.hce at gmail.com
Fri Jun 22 07:50:42 EDT 2012


Thanks Eric, please see following embedded comments.

On Thu, Jun 21, 2012 at 10:32 PM, Eric Noulard <eric.noulard at gmail.com>wrote:

> 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.
>
>
It will be great if CMake install command can be extended to support no
replace files as it will not just beneficial for supporting different
packages at least for Linux packages, but it can also be used by running
installation as well.

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


Cheers.

Jupiter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120622/b9a4946f/attachment.html>


More information about the cmake-developers mailing list