0

I am trying to build RPM package for python setuptools-12.0.3 but getting wired error,

Its look like related to SPEC file %files -f INSTALLED_FILES but how to fix it? or is it a bug? I can see two files path in single line, how do i fix it?

+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump

This is the command i am using python2.7 setup.py bdist_rpm to build RPM

+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
Bytecompiling .py files below /root/rpmbuild/SOURCES/setuptools-12.0.3/build/bdist.linux-x86_64/rpm/BUILDROOT/setuptools-12.0.3-1.x86_64/usr/lib/python2.6 using /usr/bin/python2.6
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: setuptools-12.0.3-1.noarch
error: Two files on one line: /usr/lib/python2.6/site-packages/setuptools/script
error: File must begin with "/": (dev).tmpl


RPM build errors:
    Two files on one line: /usr/lib/python2.6/site-packages/setuptools/script
    File must begin with "/": (dev).tmpl
error: command 'rpmbuild' failed with exit status 1

1 Answer 1

3

Solution

After spending couple hours i figure out what was wrong:

copy setuptools.spec file in my own rpmbuild environment at /root/rpmbuild/SPECS/

Change %files -f INSTALLED_FILES to %files

Run rpmbuild -ba setuptools.spec

It generate list of files which need to add in %files section, But in that list there was one file which space in filename Ouch!!

script (dev).tmpl

I have used wildcard to match all files and problem solved. somehow rpmbuild doesn't understand escap character ( Don't know if there is a better way)

%files
%defattr(-,root,root)
...
...
/usr/local/lib/python2.7/site-packages/setuptools/script*

...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.