Re: [gentoo-user] Recompiling already installed packages with modification

2009-12-31 Thread David Relson
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!



[gentoo-user] Recompiling already installed packages with modification

2009-12-30 Thread Frank Schwidom
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



Re: [gentoo-user] Recompiling already installed packages with modification

2009-12-30 Thread Willie Wong
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

-- 
Faye: I am glad that such a foolish man is not around, for I would
surely defenestrate him with great rapidity.
Sortir en Pantoufles: up 1118 days, 10:32



Re: [gentoo-user] Recompiling already installed packages with modification

2009-12-30 Thread Volker Armin Hemmann
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. 



Re: [gentoo-user] Recompiling already installed packages with modification

2009-12-30 Thread Willie Wong
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. 

W
-- 
In those days spirits were brave, the stakes were high, 
men were real men, women were real women, and small furry 
creatures from Alpha Centauri were real small furry 
creatures from Alpha Centauri. 
Sortir en Pantoufles: up 1118 days, 12:08



Re: [gentoo-user] Recompiling already installed packages with modification

2009-12-30 Thread Volker Armin Hemmann
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) ;)