building rpm fails

Bug #1784418 reported by fizikz on 2018-07-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Caffeine
Undecided
Unassigned

Bug Description

"python3 setup.py bdist_rpm" fails on Fedora 28. Have I missed something?

The tarball from https://bazaar.launchpad.net/~caffeine-developers/caffeine/main/revision/666?start_revid=666 was downloaded, and extracted, and the above command was run in "[DIR]/~caffeine-developers/caffeine/main/".

The build seems to fail due to a missing VERSION file in the nested "build" directory, even though the file exist in the parent "main" directory. Perhaps it was meant to be created in the building process?

Below is the output with the errors:

Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.tnl3IZ
+ umask 022
+ cd [DIR]/~caffeine-developers/caffeine/main/build/bdist.linux-x86_64/rpm/BUILD
+ cd caffeine-2.9.4
+ python3 setup.py build
Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    VERSION = open(join(ROOT_DIR, "VERSION")).read().strip()
FileNotFoundError: [Errno 2] No such file or directory: '[DIR]/~caffeine-developers/caffeine/main/build/bdist.linux-x86_64/rpm/BUILD/caffeine-2.9.4/VERSION'
error: Bad exit status from /var/tmp/rpm-tmp.tnl3IZ (%build)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.tnl3IZ (%build)
error: command 'rpmbuild' failed with exit status 1

Reuben Thomas (rrt) wrote :

I don't know much about building RPMs, and last tried nearly fifteen years ago. If there's a problem in caffeine's build system, I'll happily accept patches.

fizikz (fizikz) wrote :

Unfortunately I'm not familiar with building packages or setup.py. I used "python3 setup.py --help-commands" to find that setup.py provides options for building binary distributions, including RPM distributions with the bdist_rpm option.

The attached image shows that the build directory created by the building process duplicates many of the files/directories from the caffeine source, but is missing the VERSION file.

I don't mind testing if there are suggestions for a solution.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers