FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-30-2009, 11:17 AM
Frank Schwidom
 
Default Recompiling already installed packages with modification

Hi

as i noticed the directory /usr/portage/distfiles holds all installed
sources. What i want to do is modifying the code and reinstalling the
package. What is the simplest way? Is it possible without modifying the
ebuild? (i dont want to use make and 'make install' directly)

Regards
 
Old 12-30-2009, 12:02 PM
Volker Armin Hemmann
 
Default Recompiling already installed packages with modification

On Mittwoch 30 Dezember 2009, Willie Wong wrote:
> On Wed, Dec 30, 2009 at 01:17:52PM +0100, Penguin Lover Frank Schwidom
squawked:
> > as i noticed the directory /usr/portage/distfiles holds all installed
> > sources. What i want to do is modifying the code and reinstalling the
> > package. What is the simplest way? Is it possible without modifying the
> > ebuild? (i dont want to use make and 'make install' directly)
>
> Well, one way is to run the portage commands manually. And pause after
> unpacking to put in your changes. Read 'man ebuild' for how this
> can go.
>
> But if you want everything automated: say you want to modify the
> source, repackage, and just emerge <pkgname>, then I think you will
> have to at least re-manifest the distfile to get the checksum to
> match, else emerge won't proceed.
>
> Someone else should be able to give a better response as to what the
> standard practice is with patches. I think one of the simplest ways to
> do what you want to do is to
>
> *) Make your own overlay
> *) create the appropriate <cat>/<pkg> directory
> *) Copy over the ebuild. create a files/ subdirectory
> *) Put your patch in the files/ subdirectory
> *) Add 'epatch "${FILESDIR}"/<patchname>.patch' in the src_unpack
> function of the ebuild.
> *) digest/manifest... run?
>
> (I hope I didn't forget any step in the above.)
>
> Cheers,
>
> W
>

you can make it even easier:
create:
/etc/portage/env/PKG_CATEGORY
put patch in that directory
create file:
/etc/portage/PKG_CATEGORY/PKGNAME
with this:

post_src_prepare() {
epatch "/etc/portage/env/PKG_CATEGORY/NAMEOF:PATCH"
}

and you are done. remerge the pkg.
 
Old 12-30-2009, 12:34 PM
Volker Armin Hemmann
 
Default Recompiling already installed packages with modification

On Mittwoch 30 Dezember 2009, Willie Wong wrote:
> On Wed, Dec 30, 2009 at 02:02:56PM +0100, Penguin Lover Volker Armin Hemmann
squawked:
> > you can make it even easier:
> > create:
> > /etc/portage/env/PKG_CATEGORY
> > put patch in that directory
> > create file:
> > /etc/portage/PKG_CATEGORY/PKGNAME
> > with this:
> >
> > post_src_prepare() {
> > epatch "/etc/portage/env/PKG_CATEGORY/NAMEOF:PATCH"
> > }
>
> Ooh, I didn't know that. I've gotta go write it down somewhere.
> Thanks.

learned that from Nicos (RealNC)
 
Old 12-31-2009, 05:22 AM
David Relson
 
Default Recompiling already installed packages with modification

On Wed, 30 Dec 2009 14:34:42 +0100
Volker Armin Hemmann wrote:

> On Mittwoch 30 Dezember 2009, Willie Wong wrote:
> > On Wed, Dec 30, 2009 at 02:02:56PM +0100, Penguin Lover Volker
> > Armin Hemmann
> squawked:
> > > you can make it even easier:
> > > create:
> > > /etc/portage/env/PKG_CATEGORY
> > > put patch in that directory
> > > create file:
> > > /etc/portage/PKG_CATEGORY/PKGNAME
> > > with this:
> > >
> > > post_src_prepare() {
> > > epatch "/etc/portage/env/PKG_CATEGORY/NAMEOF:PATCH"
> > > }
> >
> > Ooh, I didn't know that. I've gotta go write it down somewhere.
> > Thanks.
>
> learned that from Nicos (RealNC)

Similar, but slightly different:

I have a patch in file /etc/portage/patches/chkrootkit.patch

and in file /etc/portage/env/app-forensics/chkrootkit is

post_src_unpack() {
epatch /etc/portage/patches/chkrootkit.patch
}

Portage automagically finds the script in .../env/... and applies the
patch!
 

Thread Tools




All times are GMT. The time now is 07:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org