question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bdist_rpm fails when installing man pages

See original GitHub issue

Hello I noticed that this issue has not been fixed yet? The reason for this failure is

  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 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:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
ericzolfcommented, Aug 17, 2019

Any chance to get this fixed? We’re impacted…

0reactions
jaracocommented, Oct 26, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found