[ python-Bugs-644744 ] bdist_rpm fails when installing man pages

SourceForge.net noreply at sourceforge.net
Fri Sep 10 14:10:39 CEST 2004


Bugs item #644744, was opened at 2002-11-27 15:30
Message generated for change (Comment added) made by calvin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=644744&group_id=5470

Category: Distutils
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Wummel (calvin)
Assigned to: Nobody/Anonymous (nobody)
Summary: bdist_rpm fails when installing man pages

Initial Comment:
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

----------------------------------------------------------------------

>Comment By: Wummel (calvin)
Date: 2004-09-10 14:10

Message:
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.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=644744&group_id=5470


More information about the Python-bugs-list mailing list