www.smartbusinesschoices.com

Leading Business and Technology,
News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

[gentoo-user] Nots and bolts of creating an ebuild
   Smart Linux Business Choices! - the Best of UseNet Postings! Forum Index -> Linux - Gentoo Forum  
View previous topic :: View next topic  
Author Message
Harry Putnam
Guest






PostPosted: Mon Nov 17, 2008 7:20 am    Post subject: [gentoo-user] Nots and bolts of creating an ebuild Reply with quote

After looking at:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1#doc_chap2

[ Ebuild HOWTO ]

Reading only partially so far but this looks really complicated. I
thought I remembered a more nuts and bolts howto somewhere more
appropriate for someone getting started who is ..er intellectually
challenged.

I really just want to add an epatch line to an existing ebuild but it
appears some protocols need to be followed to generate the manifest
and probably lots of other stuff.

Can anyone point me to something?

I've see it said here a few times that creating an overlay and a
custom ebuild is `easy' but I suspect that only applies if you already
know how its done.
Back to top
David Relson
Guest






PostPosted: Mon Nov 17, 2008 7:40 am    Post subject: Re: [gentoo-user] Nots and bolts of creating an ebuild Reply with quote

On Sun, 16 Nov 2008 19:16:26 -0600
Harry Putnam wrote:

Quote:
After looking at:
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml?part=2&chap=1#doc_chap2

[ Ebuild HOWTO ]

Reading only partially so far but this looks really complicated. I
thought I remembered a more nuts and bolts howto somewhere more
appropriate for someone getting started who is ..er intellectually
challenged.

I really just want to add an epatch line to an existing ebuild but it
appears some protocols need to be followed to generate the manifest
and probably lots of other stuff.

Can anyone point me to something?

I've see it said here a few times that creating an overlay and a
custom ebuild is `easy' but I suspect that only applies if you already
know how its done.


I've created a couple of patch ebuilds, so can provide some
(non-expert) info. I don't recall all the steps I took to get
"educated" in this process, but I remember looking at a variety of
ebuilds, the patterns in their names (what's legal), and the commands
used within them.

For "system/package" (for example mail-filter/bogofilter) one would

1) create directory /usr/local/portage/system/package and
copy /usr/portage/system/package/* to it.

2) put the patch file in /usr/local/portage/system/package/files/

3) create a new ebuild (with updated version) and an epatch line in
src_install()

4) update the manifest file with

ebuild system/package/package-version.ebuild digest

Obviously these instructions are somewhat minimal. You'll likely need
to run "emerge package" more than once to get the details right.

HTH,

David
Back to top
Harry Putnam
Guest






PostPosted: Mon Nov 17, 2008 8:36 am    Post subject: [gentoo-user] Re: Nots and bolts of creating an ebuild Reply with quote

David Relson <relson@osagesoftware.com> writes:

Quote:
On Sun, 16 Nov 2008 19:16:26 -0600
Harry Putnam wrote:


[ Ebuild HOWTO ]

Reading only partially so far but this looks really complicated. I
thought I remembered a more nuts and bolts howto somewhere more
appropriate for someone getting started who is ..er intellectually
challenged.

I really just want to add an epatch line to an existing ebuild but it
appears some protocols need to be followed to generate the manifest
and probably lots of other stuff.

Can anyone point me to something?

I've see it said here a few times that creating an overlay and a
custom ebuild is `easy' but I suspect that only applies if you already
know how its done.


I've created a couple of patch ebuilds, so can provide some
(non-expert) info. I don't recall all the steps I took to get
"educated" in this process, but I remember looking at a variety of
ebuilds, the patterns in their names (what's legal), and the commands
used within them.

For "system/package" (for example mail-filter/bogofilter) one would

1) create directory /usr/local/portage/system/package and
copy /usr/portage/system/package/* to it.

2) put the patch file in /usr/local/portage/system/package/files/

3) create a new ebuild (with updated version) and an epatch line in
src_install()

4) update the manifest file with

ebuild system/package/package-version.ebuild digest

Obviously these instructions are somewhat minimal. You'll likely need
to run "emerge package" more than once to get the details right.

Thanks, it was a lot of help. However I never did get the pieces
right. My patch (really a gentoo@bug contributors) fails once I
finally did get enough of it lined up to process that far.

After some 40-50 or so attempts I just went ahead and pre patched the
main ebuild, ran digest on that... and emerge worked, at least its
compiling right now.

I realize that way will miss the good side of emerge in the future and
get overwritten. But I want to try this package out so maybe I'll get
it right later.
Back to top
Daniel Pielmeier
Guest






PostPosted: Mon Nov 17, 2008 6:20 pm    Post subject: Re: [gentoo-user] Nots and bolts of creating an ebuild Reply with quote

2008/11/17 Harry Putnam <reader@newsguy.com>:
Quote:
I really just want to add an epatch line to an existing ebuild but it
appears some protocols need to be followed to generate the manifest
and probably lots of other stuff.

Can anyone point me to something?

Create an overlay and within that use the same structure as in the
portage tree like /path/to/overlay/category/yourpackage/

Make the overlay known to portage by editing /etc/make.conf
PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /path/to/overlay"

Copy the ebuild you want to patch to the created directory. Create a
"files" directory within that directory and put your patch there. Note
that if the previous ebuild already needed this directory because of
other patches and files you need to copy them to that files directory
too.

Edit the ebuild by adding the epatch line to src_unpack (patches go to
src_unpack and not src_install) or add the src_unpack function if it
is not already there like below.

src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/your.patch
}

Then execute "ebuild yourpackage.ebuild manifest". Now you can try
"ebuild yourpackage.ebuild unpack" to run the unpack phase of the
ebuild to see if everything works.

--
Regards,
Daniel
Back to top
Harry Putnam
Guest






PostPosted: Tue Nov 18, 2008 3:30 am    Post subject: [gentoo-user] Re: Nots and bolts of creating an ebuild Reply with quote

"Daniel Pielmeier" <daniel.pielmeier@googlemail.com> writes:

[...]

Quote:
Create an overlay and within that use the same structure as in the
portage tree like /path/to/overlay/category/yourpackage/

[...]

Nice walkthru... and just what I needed...
Thanks to you and other posters who have provide some of the details.
Back to top
Display posts from previous:   
   Smart Linux Business Choices! - the Best of UseNet Postings! Forum Index -> Linux - Gentoo Forum  
Page 1 of 1
All times are GMT

 
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