classification
Title: bdist_rpm fails when installing man pages
Type: Stage:
Components: Distutils Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: akitada, calvin, tarek (3)
Priority: normal Keywords

Created on 2002-11-27 14:30 by calvin, last changed 2009-02-10 16:49 by akitada.

Files
File name Uploaded Description Edit Remove
rpm_patch_for_setup_py calvin, 2002-11-27 14:30 patch for setup.py to enable man pages with bdist_rpm
install-rpm.sh calvin, 2004-09-10 12:10
Messages (3)
msg13472 - (view) Author: Bastian Kleineidam (calvin) Date: 2002-11-27 14:30
When a man page is in data_files, the rpm installer
compresses it with gzip (done by the brp-compress
script). I attached a little hack for
install_data command to add a ".gz" to such man pages.
Then it works for me.

Of course, the proper fix would be to detect if
brp-compress is run and what files were compressed by
the script. But I am not an rpm guru, so its up to you
how you want to fix it.

I am using a Debian Linux unstable boxen with Python
2.2.2-2, and rpm 4.0.4-11
msg13473 - (view) Author: Bastian Kleineidam (calvin) Date: 2004-09-10 12:10
Logged In: YES 
user_id=9205

Finally I got around to investigate this a little more. What
essentially happens is this:
1) bdist_rpm generates a .spec file with the following
install command:
python setup.py install --root=$RPM_BUILD_ROOT
--record=INSTALLED_FILES
.. and the following files section
%files -f INSTALLED_FILES

2) if the setup.py installed any man pages, then after
%install and before %files rpm runs brp-compress (usually
found in /usr/lib/rpm/brp-compress) which compresses all man
pages with gzip.

3) Now the man pages have a '.gz' suffix, but the
INSTALLED_FILES file lists them still without the suffix.
The %files section of the rpm .spec file will fail.

The solution in my case was to use a custom rpm-install
script configured with setup.cfg:
[bdist_rpm]
install_script = install-rpm.sh
The install-rpm.sh file is attached.

The solution is not very generic - brp-compress compresses a
lot more files than the install-rpm.sh detects. But at least
there should be a documentation somewhere about the
brp-compress pitfall.
msg81561 - (view) Author: Akira Kitada (akitada) Date: 2009-02-10 16:49
Duplicate of issue1169193
History
Date User Action Args
2009-04-05 18:41:36georg.brandllinkissue1169193 superseder
2009-02-10 16:49:13akitadasetnosy: + akitada, tarek
messages: + msg81561
2002-11-27 14:30:55calvincreate