Quantcast

What is the current situation for adding %config (no replace)?

classic Classic list List threaded Threaded
2 messages Options
hce
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What is the current situation for adding %config (no replace)?

hce
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? 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?

Thank you.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What is the current situation for adding %config (no replace)?

Eric Noulard
2012/6/21 hce <[hidden email]>:
> 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
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
Loading...