Author Topic: Newbie question.... Sources is strange {Solved}  (Read 1253 times)

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Newbie question.... Sources is strange {Solved}
« on: June 16, 2011, 12:28:59 AM »
Suddenly I get errors that there is no Source1 (if there are multiple sources (10+)), and if I rearrange so there is a source1 it complains it's not a tar file (and it is a textfile as it has always been)

Is it me or the transform to newer rpm system?

EDIT: Getting my negatives right
« Last Edit: June 22, 2011, 02:45:27 PM by MBantz »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Newbie question.... Sources is strange
« Reply #1 on: June 16, 2011, 12:43:59 AM »
djohnston,
MBantz is one of our packagers.

MBantz,
Can you post the relevant section of your spec file, please?

Offline djohnston

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6227
  • I don't do Windows
Re: Newbie question.... Sources is strange
« Reply #2 on: June 16, 2011, 12:50:35 AM »
Whoah. My apologies. I should have checked what section this is in. I'll remove the post. Thanks, Neal.

Bare metal                           VBox
AMD Athlon 7750 Dual-Core    Single core
4GiB RAM                              1GiB RAM
nVidia GeForce FX 5200          64MB video
LXDE 32bit                            KDE 64bit

Registered Linux User #416378

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Newbie question.... Sources is strange
« Reply #3 on: June 16, 2011, 12:57:58 AM »
Whoah. My apologies. I should have checked what section this is in. I'll remove the post. Thanks, Neal.

 ;D It happens to all of us at times. ;)

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Newbie question.... Sources is strange
« Reply #4 on: June 16, 2011, 01:57:29 AM »
Whoah. My apologies. I should have checked what section this is in. I'll remove the post. Thanks, Neal.

What was it about, now I'm curious :-)

Neal, I'll post the section when I'm back from work later today,

cheers,
MBantz

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Newbie question.... Sources is strange
« Reply #5 on: June 16, 2011, 02:17:00 AM »
What was it about, now I'm curious :-)

djohnston hadn't noticed that this thread is in Packagers. He thought you were asking beginning user questions, rather than packager questions.

Quote
Neal, I'll post the section when I'm back from work later today,

cheers,
MBantz

Okay. I hope it is an excellent day!

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Newbie question.... Sources is strange
« Reply #6 on: June 16, 2011, 02:21:39 PM »
I got it now,

the code was:

Code: [Select]
Source0:   mythtv-%{version}.tar.xz
Source100: PACKAGE-LICENSING
Source101: mythbackend.sysconfig.in
Source102: mythbackend.init.in
Source103: mythbackend.logrotate.in
Source106: mythfrontend.png
Source107: mythfrontend.desktop
Source108: mythtv-setup.png
Source109: mythtv-setup.desktop
Source110: mysql.txt
Source402: PCLinux-build_myth-0.25.sh
Source404: movemyth
Source405: createdb
Source406: setwakeup
Source407: showlogs
Source408: checklogin
Source409: mythtv-setup
Source410: dialog_functions.sh
Source411: mythwelcome-wrap.sh

but this works:

Code: [Select]
Source0:   mythtv-%{version}.tar.xz
Source1: PACKAGE-LICENSING
Source101: mythbackend.sysconfig.in
Source102: mythbackend.init.in
Source103: mythbackend.logrotate.in

but I still wonder why it insists on having Source0 and Source1 as required fields and not only Source0....

well, sorted now, building mythtv 0.25 now :-)

cheers,
MBantz

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: {Figured out, solved?} Newbie question.... Sources is strange
« Reply #7 on: June 16, 2011, 02:27:11 PM »
no, it does not:

Code: [Select]
Executing(%prep): /bin/sh -e /home/mbz/src/tmp/rpm-tmp.73598
+ umask 022
+ cd /home/mbz/src/rpm/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/mbz/src/rpm/BUILD
+ /bin/mkdir -p mythtv-0.25
+ cd mythtv-0.25
+ tar -xf /home/mbz/src/rpm/SOURCES/mythtv-0.25.tar.xz
+ tar -xf /home/mbz/src/rpm/SOURCES/PACKAGE-LICENSING
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
error: Bad exit status from /home/mbz/src/tmp/rpm-tmp.73598 (%prep)


RPM build errors:
    Bad exit status from /home/mbz/src/tmp/rpm-tmp.73598 (%prep)


Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: Newbie question.... Sources is strange
« Reply #8 on: June 16, 2011, 02:36:53 PM »
Why so many source files and not one tar zipped file?

Galen

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Newbie question.... Sources is strange
« Reply #9 on: June 16, 2011, 02:43:16 PM »
Try making the source numbers sequential -
Source0
Source1
Source2

and so on.

Jumping from Source1 to Source101 may be the problem.

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: Newbie question.... Sources is strange
« Reply #10 on: June 16, 2011, 02:50:38 PM »
Quote
+ tar -xf /home/mbz/src/rpm/SOURCES/PACKAGE-LICENSING
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
error: Bad exit status from /home/mbz/src/tmp/rpm-tmp.73598 (%prep)

This may be failing because it is expecting the source to be zipped. ???

Galen



Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Newbie question.... Sources is strange
« Reply #11 on: June 16, 2011, 02:56:21 PM »
As Galen says, create tar.xz archives of your sources and see if that does it.

Offline MBantz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1317
Re: Newbie question.... Sources is strange
« Reply #12 on: June 16, 2011, 11:54:37 PM »
Before I take any measures, I just wonder why this has changed - and what the new syntax/style eventually is.

It has always been possible to refer to these files as %{SOURCE101} and so on - this spec (over 1000 lines long) then need heavy modifications.

I just wonder if it is an error I have made, or this is due to the transition to the updated RPM system?

Online gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3800
Re: Newbie question.... Sources is strange
« Reply #13 on: June 17, 2011, 12:37:52 AM »
My suggestion is just a guess from the error message. It seems there is a lot of trial and error to find what works. I have only built one package since the rpm change and it seemed to work just fine, but it only have one zipped source file, so I don't know.

You can find out very quickly, just by zipping just the next file, and checking to see if the build fails at the same step, or continues and fails on the next file. If it fails on the same spot, then zipping the files will not likely be the solution.

Galen

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15847
  • LXDE! Coffee, Bacon and Cheesecake!
Re: Newbie question.... Sources is strange
« Reply #14 on: June 17, 2011, 01:39:01 AM »
I think it is due to the upgrade to the newer RPM. There seems to be some changes, like using rpmbuild -ba instead of rpm -ba. Any road, we may need to learn some new ways of doing things.