bdist_rpm: spec file: %config
I've been looking at the spec file that 'bdist_rpm' generates and I do not see a %config or %config(noreplace) section. Is there a way to generate a %config section and specify a list of files? This is important so that config files do not get overwritten when using 'rpm -U'.
On Sun, Feb 15, 2009 at 11:56 PM, Gerry Reno <greno@verizon.net> wrote:
I've been looking at the spec file that 'bdist_rpm' generates and I do not see a %config or %config(noreplace) section. Is there a way to generate a %config section and specify a list of files? This is important so that config files do not get overwritten when using 'rpm -U'.
Looking at the code, I don't see such option, please fill a feature request in http://bugs.python.org/ selecting 'Distutils' as a component, (with a sample of such a spec file if possible) Thanks
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Tarek Ziadé | Association AfPy | www.afpy.org Blog FR | http://programmation-python.org Blog EN | http://tarekziade.wordpress.com/
Tarek Ziadé wrote:
On Sun, Feb 15, 2009 at 11:56 PM, Gerry Reno <greno@verizon.net> wrote:
I've been looking at the spec file that 'bdist_rpm' generates and I do not see a %config or %config(noreplace) section. Is there a way to generate a %config section and specify a list of files? This is important so that config files do not get overwritten when using 'rpm -U'.
Looking at the code, I don't see such option,
please fill a feature request in http://bugs.python.org/ selecting 'Distutils' as a component,
(with a sample of such a spec file if possible)
Thanks
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
Ok, I found a way to use %config like this: In setup.cfg define a line: install_script=install.txt In the file 'install.txt' I put this: --------------------------------------------------- CONFIGFILES="\ %config(noreplace) /etc/myconfigfile.cfg" echo "$CONFIGFILES" | cat INSTALLED_FILES - > INSTALLED_FILES.new mv INSTALLED_FILES.new INSTALLED_FILES --------------------------------------------------- Make sure your config file is added to the filelist fed to 'setup()' by setup.py And this works.
participants (2)
-
Gerry Reno
-
Tarek Ziadé