Issue644744
Created on 2002-11-27 14:30 by calvin, last changed 2010-01-09 03:24 by jjulian.
|
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
|
|
msg95616 - (view) |
Author: Thomas Vander Stichele (thomasvs) |
Date: 2009-11-23 09:42 |
|
Attaching a reworked patch of the patch attached in
http://bugs.python.org/issue1169193
This worked for me on f-11, with python 2.6
|
|
msg95619 - (view) |
Author: Tarek Ziadé (tarek) |
Date: 2009-11-23 11:53 |
|
I'd rather see sed called from within Distutils. But I am not sure how
to handle it after install has been called.
Do you know if sed is *always* present on a fresh Fedora ?
(I am nosying Toshio as well)
|
|
msg95643 - (view) |
Author: Toshio Kuratomi (a.badger) |
Date: 2009-11-23 18:42 |
|
sed is one of the programs we assume is always present when we build
packages in Fedora which is probably also what is wanted here. (A
default install of Fedora will include sed but someone might be able to
create a minimal install that did not include it.) Note that within
Fedora we usually use a wildcard with man pages. For example::
%{_mandir}/man1/foo.1*
I'd suggest doing this rather than hardcoding ".gz". Automatic
compression of manpages could be disabled on other distros, set to
bzip2, compress, or xz instead. Wildcarding the suffix will catch all
of these cases and be more future-proof.
|
|
msg95648 - (view) |
Author: Thomas Vander Stichele (thomasvs) |
Date: 2009-11-23 19:25 |
|
Hi Toshio,
I'd probably also go for the wildcarding, but you'd still need to
'change' the INSTALLED_FILES file to do so, so you'd still use the same
mechanism.
|
|
msg95654 - (view) |
Author: Toshio Kuratomi (a.badger) |
Date: 2009-11-23 20:12 |
|
Agreed. The substitution is still needed.
|
|
msg95795 - (view) |
Author: Thomas Vander Stichele (thomasvs) |
Date: 2009-11-28 17:01 |
|
Ok, so this patch can go in as is except for changing .gz to * ?
|
|
| Date |
User |
Action |
Args |
| 2010-01-09 03:24:00 | jjulian | set | nosy:
+ jjulian
|
| 2009-11-28 17:01:33 | thomasvs | set | messages:
+ msg95795 |
| 2009-11-23 20:12:16 | a.badger | set | messages:
+ msg95654 |
| 2009-11-23 19:25:43 | thomasvs | set | messages:
+ msg95648 |
| 2009-11-23 18:42:32 | a.badger | set | messages:
+ msg95643 |
| 2009-11-23 11:53:40 | tarek | set | nosy:
+ a.badger versions:
+ Python 2.6, Python 3.1, Python 2.7, Python 3.2 messages:
+ msg95619
assignee: tarek type: behavior |
| 2009-11-23 09:42:42 | thomasvs | set | files:
+ distutils.bdist_rpm.patch
nosy:
+ thomasvs messages:
+ msg95616
keywords:
+ patch |
| 2009-04-05 18:41:36 | georg.brandl | link | issue1169193 superseder |
| 2009-02-10 16:49:13 | akitada | set | nosy:
+ akitada, tarek messages:
+ msg81561 |
| 2002-11-27 14:30:55 | calvin | create | |
|