1

Here is my spec file: http://pastebin.com/MtzxC1kv

When I try to run rpmbuild -ba myfile.spec, I get the following errors:

+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: PA_Connector-1.0-1.0
error: File must begin with "/": %{_initddir}/pa_connector
error: File must begin with "/": attr(755,impulse,impulse)
error: File must begin with "/": attr(644,impulse,impulse)
error: File must begin with "/": attr(644,impulse,impulse)
error: File must begin with "/": attr(644,impulse,impulse)
error: File must begin with "/": attr(644,impulse,impulse)
error: File must begin with "/": attr(644,impulse,impulse)
error: File must begin with "/": attr(644,impulse,impulse)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/PA_Connector-1.0-1.0-root
error: Installed (but unpackaged) file(s) found:
   /%{_initddir}/pa_connector
   /opt/pa_connector/config.xml
   /opt/pa_connector/lib/commons-logging-1.1.1.jar
   /opt/pa_connector/lib/log4j-1.2.17.jar
   /opt/pa_connector/lib/pa_connector.jar
   /opt/pa_connector/log4j.properties
   /opt/pa_connector/pa_connector.sh


RPM build errors:
    File must begin with "/": %{_initddir}/pa_connector
    File must begin with "/": attr(755,impulse,impulse)
    File must begin with "/": attr(644,impulse,impulse)
    File must begin with "/": attr(644,impulse,impulse)
    File must begin with "/": attr(644,impulse,impulse)
    File must begin with "/": attr(644,impulse,impulse)
    File must begin with "/": attr(644,impulse,impulse)
    File must begin with "/": attr(644,impulse,impulse)
    Installed (but unpackaged) file(s) found:
   /%{_initddir}/pa_connector
   /opt/pa_connector/config.xml
   /opt/pa_connector/lib/commons-logging-1.1.1.jar
   /opt/pa_connector/lib/log4j-1.2.17.jar
   /opt/pa_connector/lib/pa_connector.jar
   /opt/pa_connector/log4j.properties
   /opt/pa_connector/pa_connector.sh

I've read a few posts on SO about correct what BuildRoot should be, and fixed it, but it still doesn't work.

4

1 回答 1

2

看起来_initddir没有定义,或者它会在最终文件名中展开,并且您似乎有一个名为 " /%{_initddir}/pa_connector" 的文件。

此外,您需要%在前面attr使用%attr宏。

于 2013-04-11T00:26:43.163 回答