Author Topic: First package  (Read 1271 times)

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: First package -ba unkown
« Reply #15 on: November 03, 2011, 05:44:11 PM »
Ah ha! I didn't put the image in the folder, I had just left it in sources. I will try recompiling when I get back to my computer.

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: First package -ba unkown
« Reply #16 on: November 03, 2011, 09:58:52 PM »
Still getting the problem, here is what it looks like:

>SOURCES
>>repair-database-0.1.tar.xz
>>>dbrepair.png
>>>repair-database

>SPECS
>>repair-database.spec

I also tried it like this:

>SOURCES
>>dbrepair.png
>>repair-database-0.1.tar.xz
>>>repair-database

>SPECS
>>repair-database.spec

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: First package -ba unkown
« Reply #17 on: November 03, 2011, 11:53:47 PM »
glamdring,
If you create a folder, name it repair-database-0.1, put your repair-database script and dbrepair.png in it, then create your tar.xz file from the folder, you will only one source to list; i.e. your SOURCE: will be repair-database-0.1.tar.xz.     

With all the files in one tar file, you have one SOURCE: with all the components (%files) in one place.     

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: First package -ba unkown
« Reply #18 on: November 04, 2011, 12:03:37 AM »
glamdring,
If you create a folder, name it repair-database-0.1, put your repair-database script and dbrepair.png in it, then create your tar.xz file from the folder, you will only one source to list; i.e. your SOURCE: will be repair-database-0.1.tar.xz.    

With all the files in one tar file, you have one SOURCE: with all the components (%files) in one place.    

Are you saying I should remove:

%{_datadir}/icons/dbrepair.png
%{_datadir}/applications/%{name}.desktop

I tried removing them and I still get the error. I even tried removing the .sh from %{_bindir}/%{name}.sh or switching it to .tar.xz and I still get the error.

Here is what I see in my BUILDROOT after trying to build:
BUILDROOT/repair-database-0.1-1glamdring2011.i386/usr/bin

But nothing is inside and it doesn't make the directory for the icons.

I updated the first post to include more information on the problem.
« Last Edit: November 04, 2011, 12:13:44 AM by glamdring »

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: First package -ba unkown
« Reply #19 on: November 04, 2011, 12:21:58 AM »
Are you saying I should remove:

%{_datadir}/icons/dbrepair.png
%{_datadir}/applications/%{name}.desktop
   
I responded to your listing of 3 sources, not to the %files you have.    
From pclos-legacy-gdm-theme-RetroBlue.spec:
Quote
%define base_name RetroBlue
%define name gdm-theme-%{base_name}
%define version 0.1
%define release %mkrel 1
   
..................................................
Source0:    legacy-%{name}-%{version}.tar.xz    
..................................................
%files
%defattr(-,root,root)
%{_datadir}/gdm/themes/*
   
Note that Source and files are separate entries.    

Quote
I tried removing them and I still get the error. I even tried removing the .sh from %{_bindir}/%{name}.sh or switching it to .tar.xz and I still get the error.

Here is what I see in my BUILDROOT after trying to build:
BUILDROOT/repair-database-0.1-1glamdring2011.i386/usr/bin

But nothing is inside and it doesn't make the directory for the icons.
   
You have need of another entry for %files for your repair-database script. If you have only your .desktop file (menu entry) and your icon listed, your build won't complete.    
Code: [Select]
%{_bindir}/repair-database - Assuming you are putting it in /usr/bin.    

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: First package error
« Reply #20 on: November 04, 2011, 10:21:36 AM »
I fixed the error by changing the install line for the shell script to this:
Code: [Select]
install -m 755 %{name} %{buildroot}%{_bindir}/%{name}

I also removed the .sh from the script file which now allows it to find the script, but it still can't find my image:

Code: [Select]
Processing files: repair-database-0.1-1glamdring2011.i586
error: File not found: /home/glamdring/src/rpm/BUILDROOT/repair-database-0.1-1glamdring2011.i386/usr/share/icons/dbrepair


RPM build errors:
    File not found: /home/glamdring/src/rpm/BUILDROOT/repair-database-0.1-1glamdring2011.i386/usr/share/icons/dbrepair

My files looks like this now:

Code: [Select]
%files
%defattr(-,root,root)
%{_bindir}/%{name}
%{_datadir}/icons/dbrepair.png
%{_datadir}/applications/%{name}.desktop

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: First package error
« Reply #21 on: November 04, 2011, 10:47:20 AM »
I fixed it, the image permission couldn't be 644 so I changed it to 655!

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: First package
« Reply #22 on: November 04, 2011, 11:13:20 AM »
Okay, so trying to test this in Synaptic but can't get it to load. I'm missing the pkglist, which I tried looking up but I can't figure out how to make one or circumvent it. I tried taking apart one of the ones provided in the pclos repos, but Kwrite just got gibberish.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: First package
« Reply #23 on: November 04, 2011, 12:09:48 PM »
Okay, so trying to test this in Synaptic but can't get it to load. I'm missing the pkglist, which I tried looking up but I can't figure out how to make one or circumvent it. I tried taking apart one of the ones provided in the pclos repos, but Kwrite just got gibberish.
     
You're over thinking this. ;) Install RPM-Installer. You will then have it in your right click menu. You may need to reboot or log out/log in first.     

Otherwise, use genbasedir (from pkgutils).     
Code: [Select]
genbasedir --help     

Offline glamdring

  • Hero Member
  • *****
  • Posts: 552
Re: First package
« Reply #24 on: November 04, 2011, 12:27:52 PM »
Okay, so trying to test this in Synaptic but can't get it to load. I'm missing the pkglist, which I tried looking up but I can't figure out how to make one or circumvent it. I tried taking apart one of the ones provided in the pclos repos, but Kwrite just got gibberish.
     
You're over thinking this. ;) Install RPM-Installer. You will then have it in your right click menu. You may need to reboot or log out/log in first.     

Otherwise, use genbasedir (from pkgutils).     
Code: [Select]
genbasedir --help     

What would I do without you guys? That is so easy! Well I have finished my first script all the way to packaging it woohoo!

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15845
  • LXDE! Coffee, Bacon and Cheesecake!
Re: First package
« Reply #25 on: November 04, 2011, 12:44:35 PM »
 :D :D Woohoo! ;)     

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3730
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: First package
« Reply #26 on: November 04, 2011, 12:54:48 PM »