Author Topic: My first time  (Read 2289 times)

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
My first time
« on: July 29, 2011, 03:47:16 PM »
I thought I'd start a new thread to help me through my first packaging experience. Any help would be much appreciated.

I'm trying to extract an srpm but get this error.

Code: [Select]
1:TaskCoach              warning: user jerome does not exist - using root
warning: group jerome does not exist - using root
########################################### [100%]
error: unpacking of archive failed on file /home/src/rpm/SOURCES/TaskCoach-1.2.24.tar.gz;4e33233e: cpio: open failed - Permission denied
error: /home/tim/Desktop/TaskCoach-1.2.24-1.src.rpm cannot be installed


Seems to be a permissions error but I checked the permissions and I'm the owner  ???

@Neal - if you read this, I'm using my KDE for this one since I set up the packaging environment quite a while ago. I will eventually be using my LXDE for packaging when I have it set up.  
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: My first time
« Reply #1 on: July 29, 2011, 03:59:30 PM »
Quote
TaskCoach-1.2.24.tar.gz;4e33233e: cpio: open failed - Permission denied


It looks like the permissions problem is related to the tar.gz file.

Try to open the SRPM with file roller or ark. You should be able to extract the files with file roller.

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #2 on: July 29, 2011, 04:37:52 PM »
Thanks Neal. I tried to open the srpm with Ark but the RPM option doesn't work. Funny thing is, I tried again but accidentally clicked on the SV4 CPIO Archive option to extract the files and it worked.

So, my next question is, after extracting and changing the permissions, do I need to create it as a  xxx.src.rpm  file again so I can then extract it into the correct build files? And if so, how would I go about doing that?
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: My first time
« Reply #3 on: July 29, 2011, 04:47:42 PM »
Thanks Neal. I tried to open the srpm with Ark but the RPM option doesn't work. Funny thing is, I tried again but accidentally clicked on the SV4 CPIO Archive option to extract the files and it worked.

So, my next question is, after extracting and changing the permissions, do I need to create it as a  xxx.src.rpm  file again so I can then extract it into the correct build files? And if so, how would I go about doing that?

If you extracted the entire SRPM, you can move the files to your SOURCES and SPECS folders. Be sure to convert the tar.gz to tar.xz. The right click > convert to option is the easy way.

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #4 on: July 29, 2011, 05:15:57 PM »
After I extracted the srpm, there are two files. The spec file and the tar.gz file which contains all the source files. I guess I should extract the tar.gz and then move the source files to the SOURCES folder?  OR just convert it to .xz and put it into the SOURCES folder without extracting it?
« Last Edit: July 29, 2011, 05:20:24 PM by timeth »
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: My first time
« Reply #5 on: July 29, 2011, 05:51:04 PM »
After I extracted the srpm, there are two files. The spec file and the tar.gz file which contains all the source files. I guess I should extract the tar.gz and then move the source files to the SOURCES folder?  OR just convert it to .xz and put it into the SOURCES folder without extracting it?

There is no need to extract it.

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #6 on: July 29, 2011, 07:29:41 PM »
Thanks Neal, sorry for all these noobie questions.

Next question  ::)  :D

Reading from the manual, when I try to run    rpm -ba nameofspecfile.spec   in the SPECS directory I get this error >

Code: [Select]
-ba: unknown option
I also get the same error when I right click on the spec file and choose   build all   from the menu.
Do you know what the issue might be there?
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • Aurum nostrum non est aurum vulgi.
Re: My first time
« Reply #7 on: July 29, 2011, 08:31:28 PM »
The command had now been changed to rpmbuild -ba <name_of_>.spec.

BTW, when I saw your subject, I thought Tim finally got a date! ;D
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #8 on: July 29, 2011, 09:18:57 PM »
The command had now been changed to rpmbuild -ba <name_of_>.spec.

Thanks Archie. That worked for me but I got more errors.

It seemed to get right through the build process but then errored out just at the end >

Code: [Select]
cd TaskCoach-1.2.24
/home/tim/src/tmp/: line 36: cd: TaskCoach-1.2.24: No such file or directory
error: Bad exit status from /home/tim/src/tmp/rpm-tmp.e4Wwqo (%prep)

I had a look at the file    rpm-tmp.e4Wwqo    at line 36 >

Code: [Select]
36   cd 'TaskCoach-1.2.24'
37
38   exit 0

I'll clean it all up and try again.


BTW, when I saw your subject, I thought Tim finally got a date! ;D

I wish!!  :'(   ;D
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline Sproggy

  • Hero Member
  • *****
  • Posts: 1484
Re: My first time
« Reply #9 on: July 29, 2011, 09:25:22 PM »
The command had now been changed to rpmbuild -ba <name_of_>.spec.

Thanks Archie. That worked for me but I got more errors.

It seemed to get right through the build process but then errored out just at the end >

Code: [Select]
cd TaskCoach-1.2.24
/home/tim/src/tmp/: line 36: cd: TaskCoach-1.2.24: No such file or directory
error: Bad exit status from /home/tim/src/tmp/rpm-tmp.e4Wwqo (%prep)

I had a look at the file    rpm-tmp.e4Wwqo    at line 36 >

Code: [Select]
36   cd 'TaskCoach-1.2.24'
37
38   exit 0

I'll clean it all up and try again.


BTW, when I saw your subject, I thought Tim finally got a date! ;D

I wish!!  :'(   ;D

Hi Timeth ...

thise probably relates to your %setup section ... could be that you have something like %setup -n %{name}-%{version} and within the archive there is no folder with the %{name}-%{version} probably just %{name}

Kori

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #10 on: July 29, 2011, 09:47:48 PM »
Hey Kori, thanks mate.

It looks like this >


Code: [Select]
%prep
%setup -n %{name}-%{unmangled_version}

%build
python make.py build

%install
python make.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES
%defattr(-,root,root)

The define section at the top is this >

Code: [Select]
%define name TaskCoach
%define version 1.2.24
%define unmangled_version 1.2.24
%define release 1

...and this from a bit further down the spec file >

Code: [Select]
Source0: %{name}-%{unmangled_version}.tar.xz
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline Archie

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • Aurum nostrum non est aurum vulgi.
Re: My first time
« Reply #11 on: July 29, 2011, 10:09:06 PM »
Hey Tim,

Maybe a reference can help sort out your issue.

http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/TaskCoach-1.2.24-1.src.rpm
Since 2006 | LiCo 401868 | Bare Metal | What is necessary is never unwise. --Sarek, 2258.42


Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #12 on: July 29, 2011, 10:32:57 PM »
Thanks Archie, I'll try that, although it has a patch file in it so I'll have to get into the manual again and learn how to handle that.
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: My first time
« Reply #13 on: July 29, 2011, 11:57:56 PM »
Thanks Neal, sorry for all these noobie questions.

Next question  ::)  :D

Reading from the manual, when I try to run    rpm -ba nameofspecfile.spec   in the SPECS directory I get this error >

Code: [Select]
-ba: unknown option
I also get the same error when I right click on the spec file and choose   build all   from the menu.
Do you know what the issue might be there?

That was changed back in June. It sounds like your build system may be not up to date. As I'm not using a KDE build system, I can't tell you where to look for the config files. I'd guess it would be in your .kde4 folder. Probably in a folder named Dolphin. Which file, I don't know. Here the file is ~/.config/Thunar/uca.xml.
Any road, rpmbuild -ba is the build command used now. 

Offline timeth

  • Hero Member
  • *****
  • Posts: 829
  • G'day mate-Link for big GIF^ http://db.tt/SUIL4CtK
Re: My first time
« Reply #14 on: July 30, 2011, 06:20:37 AM »
That was changed back in June. It sounds like your build system may be not up to date. As I'm not using a KDE build system, I can't tell you where to look for the config files. I'd guess it would be in your .kde4 folder. Probably in a folder named Dolphin. Which file, I don't know. Here the file is ~/.config/Thunar/uca.xml.
Any road, rpmbuild -ba is the build command used now. 


I'm just using the command line for now. Hopefully when the rpm build packages are working again in synaptic, I can set up my build environment properly.

I've tried building different srpm's but I keep getting different errors every time relating to permissions or missing dependencies or the error in post #9. 

These are the ones I've tried. 

These two >  http://rpm.pbone.net/index.php3/stat/3/srodzaj/2/search/TaskCoach-1.2.24-1.src.rpm

and these two > http://sourceforge.net/projects/taskcoach/files/taskcoach/Release-1.2.24/

I got very close to it building all the way with this one > (this was the one I tried and got the error in post #9)
http://cdnetworks-kr-2.dl.sourceforge.net/project/taskcoach/taskcoach/Release-1.2.24/TaskCoach-1.2.24-1.src.rpm

Thank you for all your help people. I think I'm just about at my limit of packaging knowledge and how to troubleshoot problems and errors with this particular package. If anyone would like to try please go ahead. I'll keep trying but if someone can do it, I'd be grateful to have the rpm to install as soon as I can. If someone is successful, please tell me how you got it to work. I'd like to try  :)   
宜しくお願いします > Yoroshiku Onegaishimasu > I humbly and respectfully ask for your kindness.  |   My graphics blog