bdist_rpm fails when installing man pages
See original GitHub issueHello I noticed that this issue has not been fixed yet? The reason for this failure is
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
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.
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 proposed solution seems to work.
diff --git a/setuptools/command/bdist_rpm.py b/setuptools/command/bdist_rpm.py
index 70730927..eee85795 100755
--- a/setuptools/command/bdist_rpm.py
+++ b/setuptools/command/bdist_rpm.py
@@ -31,6 +31,9 @@ class bdist_rpm(orig.bdist_rpm):
).replace(
"setup.py install ",
"setup.py install --single-version-externally-managed "
+ ).replace(
+ "--record=INSTALLED_FILES",
+ "--record=INSTALLED_FILES;sed -i -e 's:\\.gz$:\\.gz:;t;s:\\(/man/man.*/.*\):\\1.gz:' INSTALLED_FILES"
).replace(
"%setup",
"%setup -n %{name}-%{unmangled_version}"
Any thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Issue 644744: bdist_rpm fails when installing man pages
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...
Read more >Bug #175839 “`python setup.py bdist_rpm` fails” : Bugs : Bazaar
I ran `python setup.py bdist_rpm` (standard python distutils action) but it fails due missing manpage file. This bug directly related to ...
Read more >setup.py bdist_rpm fails with "Installed (but unpackaged) file(s ...
Description of problem: setup.py fails to build rpm. How reproducible: Always Steps to Reproduce: 1. Create dir "foo" with these files: ...
Read more >setuptools 3.5 - PyPI
setuptools-x.x$ python setup.py install --prefix=/opt/setuptools. Use --help to get a full options list, but we recommend consulting the EasyInstall manual ...
Read more >Untitled
Install diff.1, since it's no longer in man-pages. ... build on ppc64 - Disable make check on s390 as well - test-thread failing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any chance to get this fixed? We’re impacted…
Sorry you’re impacted. What’s needed is a viable solution and we can roll it into a release. I’m uneasy about the proposed patch, which seems to be injecting a command around an option. Already, the line-by-line hack is kinda ugly, but this adds a second-order hack on that hack. If that’s the best hack available, I guess that’s acceptable, but in that case, I’d like at least for there to be a comment explaining what the hack is doing. I don’t know if it’s possible, but I’d rather see a patch that doesn’t interleave so many concerns… even just inserting another line for the sed command would be substantially better than injecting it into another command and relying on
;
to split those into two.