Author Topic: rpm build failing in %prep macro  (Read 2120 times)

escapingsummer

  • Guest
rpm build failing in %prep macro
« on: March 29, 2011, 09:40:14 PM »
I have been working on building jupiter from www.jupiterapplet.org and I keep getting a failure in the %prep part of my .spec file. I keep getting this message, RPM build errors: Bad exit status from ~/rpm/tmp/rpm-tmp.99158 (%prep) which I have encounter in the past, however I can't seem to resolve this one. Any help would be appreciated.

The issue seems to be the CD command issued...at least from what I can figure out.

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: rpm build failing in %prep macro
« Reply #1 on: March 29, 2011, 10:04:08 PM »
Do you have a spec file from another distro as a starting point?

Galen

escapingsummer

  • Guest
Re: rpm build failing in %prep macro
« Reply #2 on: March 29, 2011, 10:14:07 PM »
I have two actually, one from Fedora which came with jupiter, and the other is the mandriva .spec file from some arbitrary package I am using a reference as to the formating. I think I will download a pclos src rpm and get the spec from one of those and have a look as well.

escapingsummer

  • Guest
Re: rpm build failing in %prep macro
« Reply #3 on: March 29, 2011, 10:35:18 PM »
Here is another section of the error...

+ cd Jupiter-0.0.49
/home/brock/rpm/tmp/rpm-tmp.94118: line 39: cd: Jupiter-0.0.49: No such file or directory
error: Bad exit status from /home/brock/rpm/tmp/rpm-tmp.94118 (%prep)


RPM build errors:
    Bad exit status from /home/brock/rpm/tmp/rpm-tmp.94118 (%prep)


I noticed that part of the file was naming things wrong...and had to correct it on more than one occasion, I am wondering if that is what could be causing this...

Offline Texstar

  • Administrator
  • Super Villain
  • *****
  • Posts: 12534
Re: rpm build failing in %prep macro
« Reply #4 on: March 29, 2011, 11:37:09 PM »
Here is another section of the error...

+ cd Jupiter-0.0.49
/home/brock/rpm/tmp/rpm-tmp.94118: line 39: cd: Jupiter-0.0.49: No such file or directory
error: Bad exit status from /home/brock/rpm/tmp/rpm-tmp.94118 (%prep)


RPM build errors:
    Bad exit status from /home/brock/rpm/tmp/rpm-tmp.94118 (%prep)


I noticed that part of the file was naming things wrong...and had to correct it on more than one occasion, I am wondering if that is what could be causing this...

You need to set the %setup -qn to match the name of the folder in the build directory.

If you compress uranus folder into uranus-1.50.tar.xz then your %setup would be %setup -qn uranus. Normally most source packages folder match their %name-%version so if you compress uranus-1.50 folder to uranus-1.50.tar.xz then all you need for %setup would be %setup -q


Thanks to everyone who donates. You keep the servers running.