Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
using ebuilds like rpms
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Mon May 26, 2003 6:01 pm    Post subject: using ebuilds like rpms Reply with quote

i want to use ebuilds like rpms on my new (mostly workjng) gentoo box. i mean with rpms you have the program and its dependancies all in their own rpms. if your lucky enough not to go threw rpm hell it will be smart enough to install the dependacies from the rpms in the same folder. rpms also have the architecture in their name.

how can i use -b option of portage to do something like this? i want this so i can have a recovery cd for my desktop and laptop. is their a good site to explain this? i know this will take some research for me but im not sure what to look up.

as i see it i need to learn/know : how to make portage seperate programs and dependacies, where all the files will be, which one of the text utils will let me add to a file name (something like kde-i686).

thanks
Back to top
View user's profile Send private message
krusty_ar
Guru
Guru


Joined: 03 Oct 2002
Posts: 560
Location: Rosario, Argentina

PostPosted: Mon May 26, 2003 6:43 pm    Post subject: Reply with quote

You canstart looking here. methinks most of you requisites are covered, further automation depends on how well do you get with bash :twisted:
Code:
*  sys-apps/epm
      Latest version available: 0.8.1
      Latest version installed: 0.8.1
      Size of downloaded files: 6 kB
      Homepage:    http://www.gentoo.org/~agriffis/epm/
      Description: rpm workalike for Gentoo Linux


there's also the buikdpkg FEATURE (make.conf) thas forces emerge to build a package for every installed ebuild
_________________
I am Beta, don't expect correct behaviour from me.
Take part of the adopt an unaswered post initiative
Back to top
View user's profile Send private message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Mon May 26, 2003 7:02 pm    Post subject: Reply with quote

but wouldnt the -b flag put the program and the dependancies in 1 ebuild? thats a waste of space and time. i heard about that package from another thread, ill play with it. but what about the file name part, which one of the text tools do i need to know for it? sed? awk?

thanks
Back to top
View user's profile Send private message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Mon May 26, 2003 10:38 pm    Post subject: Reply with quote

any gentoo guys have a idea? id like to start this tonight.
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Tue May 27, 2003 12:03 pm    Post subject: Reply with quote

Quote:
but wouldnt the -b flag put the program and the dependancies in 1 ebuild?

No, it will generate one *.tbz2 archive per package. So with
Code:
emerge -Be system

you get many handy tiny compiled packages.
They are named like /usr/portage/packages/All/sun-j2sdk-1.4.1.tbz2 There will be a symlink in /usr/portage/packages/dev-java too.
If you then
Code:
emerge -k sun-j2sdk

portage will look for the tbz2 and unpack it.
Note: There is a difference in -b and -B: -B builds the package but does not install it, while -b build the package and does install it. So if you just want packages for another machine, better use -B

Greetz, Björn
Back to top
View user's profile Send private message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Tue May 27, 2003 11:12 pm    Post subject: Reply with quote

i noticed in /usr/portage i still have alot of files. are these the sources or are they compiled. i see alot of ebuilds in a programs dir. could all of them be combined into 1 ebuild?

could i tell emerge how i want a packages to be compiled or do i have to swap make.conf files?

thanks
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Wed May 28, 2003 11:26 am    Post subject: Reply with quote

Most of the dirs in /usr/portage like net-www just contain the .ebuilds e.g. the scripts to build a package. sources are in /usr/portage/distfiles and compiled packages are in /usr/portage/packages (with a standard make.conf).
Quote:
could i tell emerge how i want a packages to be compiled or do i have to swap make.conf files?

You can manually overwrite USE-Flags, see Portage Manual, but not CFLAGS, I think - so happy swapping.
Quote:
could all of them be combined into 1 ebuild?

:?: Why do you want to do that :?:
Although you easily can write a short bash-script like
Code:
#!/bin/bash
emerge -B package1 package2 yadda yadda

save this to a file and
Code:
chmod u+x filename

it and then just
Code:
./filename

There is a way to avoid make.conf-swapping discribed by hgomersall here and by jingo here and I have to admit it has some charme. Building packages with emerge -B might be the way to go if you want to help a friend to have a fast gentoo install. The NFS approch is not so handy here since both computers have to stay connected while compiling. emerge -B might also be handy if you have no NFS in your kernel *cough* /me *cough*


Choose your poison ...

Greetz, Björn
Back to top
View user's profile Send private message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Wed May 28, 2003 9:20 pm    Post subject: Reply with quote

Quote:
Why do you want to do that

having the program and its patches in one file just seems easier. but i dont want dependacies since they can be compiled once and then shared.

so ebuilds are just scripts? not like a rpm?

id actually like to do pre-compiled packages and nfs. then i could upgrade my laptop(which will get 802.11g someday, i cant believe im actually thinky about a apple product!) and have a backup. id like to just setup 2 folders and burn them each regualry and have the folders be shared, it would be alot easier.
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Wed May 28, 2003 10:37 pm    Post subject: Reply with quote

yes ebuilds are not really like rpms.
If you
Code:
emerge -B

you get someting rpm-like in /usr/portage/packages, tbz2 files with the completely patched binaries (compiling and patching etc. has been done already by emerge - infos for that are in the .ebuild file) . No dependencies since every package has its own tbz2.
Greetz, Björn
Back to top
View user's profile Send private message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Wed May 28, 2003 11:58 pm    Post subject: Reply with quote

so i need to par up the ebuild script and the tbz files? or is it inside the tbz? would portage look inside the tbz?

doesnt seem like i can do what i wanted. now id like to keep gentoo but fix rpm dependancy hell and throw that in.

id like to try this myself, but im going to be stuck in windows for a couple more hours. sorry for the questions, id like to get this started soon.

thanks
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Sat May 31, 2003 3:57 am    Post subject: Reply with quote

the .ebuild files are not big. and BTW they get automatically updated with every emerge rsync. so after a emerge rsync, you just need the tbz2 s.

Greetz,Björn
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9522
Location: beyond the rim

PostPosted: Sat May 31, 2003 5:29 pm    Post subject: Reply with quote

ebuilds are like the spec files for source-rpms, they control the compilation and installation process. If you use "emerge -b" you create .tbz2 packages that correspond to the rpm binary packages and can be handled like them with "emerge -k". Please note that the -B switch can make some problems if not all dependencies for the requested package are installed on the compile machine as this is a requirement to compile a package.
Back to top
View user's profile Send private message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Tue Jun 03, 2003 10:51 pm    Post subject: Reply with quote

when i did emerge -B kde it only did what need to be upgraded, not the whole thing like i want.

sorry for bring up a old thread, i just now got a chance to try it.
Back to top
View user's profile Send private message
bmichaelsen
Veteran
Veteran


Joined: 17 Nov 2002
Posts: 1277
Location: Hamburg, Germany

PostPosted: Wed Jun 04, 2003 3:06 pm    Post subject: Reply with quote

Quote:
emerge -B kde it only did what need to be upgraded

well, use --emptytree/-e to compile all dependencies existent or not on this system...
[/code]emerge -Be kde
Code:

Back to top
View user's profile Send private message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Wed Jun 04, 2003 9:04 pm    Post subject: Reply with quote

Quote:

root # emerge -emptytree -B kdevelop
!!! Error: -m is an invalid short action or option.
root #
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9522
Location: beyond the rim

PostPosted: Wed Jun 04, 2003 9:17 pm    Post subject: Reply with quote

use --emptytree (2 -) or -e
Back to top
View user's profile Send private message
mart_man00
Apprentice
Apprentice


Joined: 29 Jan 2003
Posts: 245

PostPosted: Wed Jun 04, 2003 9:23 pm    Post subject: Reply with quote

Quote:

emerge -eB kdevelop
Calculating dependencies ...done!

!!! --buildpkgonly requires all dependancies to be merged.
!!! Cannot merge requested packages. Merge deps and try again.


i thought portage take care of all the dependancies?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum