public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] portage idea - auto embed user patches
@ 2006-12-21 14:32 Alexander Zubkov
  2006-12-21 14:41 ` Yuri Vasilevski
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Alexander Zubkov @ 2006-12-21 14:32 UTC (permalink / raw
  To: gentoo-dev

Hi!
I have some idea on extending portage building system (ebuild?).
Sometimes I'm (for example) want to apply custom patch to some package.
This patch can do something unusual, that can not be accepted by
maintainers and I know this. But I like features in my patch and want it
to apply automatically when updating the package. Not to do it like this:
$ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 unpack
$ cd /var/tmp/portage/pkg-categoty/some-package/work/...
$ patch -p1 < ~/my-patch-for-some-package
$ cd
$ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 merge

It is lot of manual work. The idea is having an file, for example
/etc/portage/package.patch with contents like this:
=pkg-category/some-package-1*      /path/to/my-patch-for-some-package

Of course, patches could fail in newer versions. But when I'll use that
feature - I'll understand why it can be and it'll be more convenient to
maintain it.

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] portage idea - auto embed user patches
  2006-12-21 14:32 [gentoo-dev] portage idea - auto embed user patches Alexander Zubkov
@ 2006-12-21 14:41 ` Yuri Vasilevski
  2006-12-21 15:12   ` Alexander Zubkov
  2006-12-21 14:50 ` [gentoo-dev] " Raymond Lewis Rebbeck
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Yuri Vasilevski @ 2006-12-21 14:41 UTC (permalink / raw
  To: gentoo-dev

Hello,

On Thu, 21 Dec 2006 17:32:41 +0300
Alexander Zubkov <green@area-b.msu.ru> wrote:

> Hi!
> I have some idea on extending portage building system (ebuild?).
> Sometimes I'm (for example) want to apply custom patch to some
> package. This patch can do something unusual, that can not be
> accepted by maintainers and I know this. But I like features in my
> patch and want it to apply automatically when updating the package.
> Not to do it like this: $
> ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 unpack
> $ cd /var/tmp/portage/pkg-categoty/some-package/work/... $ patch -p1
> < ~/my-patch-for-some-package $ cd
> $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 merge
> 
> It is lot of manual work. The idea is having an file, for example
> /etc/portage/package.patch with contents like this:
> =pkg-category/some-package-1*      /path/to/my-patch-for-some-package
> 
> Of course, patches could fail in newer versions. But when I'll use
> that feature - I'll understand why it can be and it'll be more
> convenient to maintain it.

You can use portage's bashrc to do that kind of autopatching.

Best regards,
Yuri.
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] portage idea - auto embed user patches
  2006-12-21 14:32 [gentoo-dev] portage idea - auto embed user patches Alexander Zubkov
  2006-12-21 14:41 ` Yuri Vasilevski
@ 2006-12-21 14:50 ` Raymond Lewis Rebbeck
  2006-12-21 15:03   ` Alexander Zubkov
  2006-12-21 14:58 ` Timothy Redaelli
  2006-12-21 18:59 ` Bo Ørsted Andresen
  3 siblings, 1 reply; 13+ messages in thread
From: Raymond Lewis Rebbeck @ 2006-12-21 14:50 UTC (permalink / raw
  To: gentoo-dev

On Friday, 22 December 2006 1:02, Alexander Zubkov wrote:
> Hi!
> I have some idea on extending portage building system (ebuild?).
> Sometimes I'm (for example) want to apply custom patch to some package.
> This patch can do something unusual, that can not be accepted by
> maintainers and I know this. But I like features in my patch and want it
> to apply automatically when updating the package. Not to do it like this:
> $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 unpack
> $ cd /var/tmp/portage/pkg-categoty/some-package/work/...
> $ patch -p1 < ~/my-patch-for-some-package
> $ cd
> $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 merge
>
> It is lot of manual work. The idea is having an file, for example
> /etc/portage/package.patch with contents like this:
> =pkg-category/some-package-1*      /path/to/my-patch-for-some-package
>
> Of course, patches could fail in newer versions. But when I'll use that
> feature - I'll understand why it can be and it'll be more convenient to
> maintain it.

You can edit ebuilds to apply whatever patches you want and put them in an 
overlay. Usually it's just an epatch line that needs to be added.

-- 
Raymond Lewis Rebbeck
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] portage idea - auto embed user patches
  2006-12-21 14:32 [gentoo-dev] portage idea - auto embed user patches Alexander Zubkov
  2006-12-21 14:41 ` Yuri Vasilevski
  2006-12-21 14:50 ` [gentoo-dev] " Raymond Lewis Rebbeck
@ 2006-12-21 14:58 ` Timothy Redaelli
  2006-12-21 16:01   ` Alexander Zubkov
  2006-12-21 18:59 ` Bo Ørsted Andresen
  3 siblings, 1 reply; 13+ messages in thread
From: Timothy Redaelli @ 2006-12-21 14:58 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]

Alexander Zubkov wrote:
> Hi!
> I have some idea on extending portage building system (ebuild?).
> Sometimes I'm (for example) want to apply custom patch to some package.
> This patch can do something unusual, that can not be accepted by
> maintainers and I know this. But I like features in my patch and want it
> to apply automatically when updating the package. Not to do it like this:
> $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 unpack
> $ cd /var/tmp/portage/pkg-categoty/some-package/work/...
> $ patch -p1 < ~/my-patch-for-some-package
> $ cd
> $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 merge
> 
> It is lot of manual work. The idea is having an file, for example
> /etc/portage/package.patch with contents like this:
> =pkg-category/some-package-1*      /path/to/my-patch-for-some-package
> 
> Of course, patches could fail in newer versions. But when I'll use that
> feature - I'll understand why it can be and it'll be more convenient to
> maintain it.

You can use a bashrc script http://forums.gentoo.org/viewtopic-t-339019.html

-- 
Timothy `Drizzt` Redaelli - http://drizzt.bsdnet.eu/blog/
FreeSBIE Developer, Gentoo Developer, GUFI Staff
There are two major products that come out of Berkeley: LSD and UNIX.
We don't believe this to be a coincidence.      -- Jeremy S. Anderson


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] portage idea - auto embed user patches
  2006-12-21 14:50 ` [gentoo-dev] " Raymond Lewis Rebbeck
@ 2006-12-21 15:03   ` Alexander Zubkov
  0 siblings, 0 replies; 13+ messages in thread
From: Alexander Zubkov @ 2006-12-21 15:03 UTC (permalink / raw
  To: gentoo-dev

> 
> You can edit ebuilds to apply whatever patches you want and put them in an 
> overlay. Usually it's just an epatch line that needs to be added.
> 

I know. But this takes many time too. I want something to work
automatically when package updates.
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] portage idea - auto embed user patches
  2006-12-21 14:41 ` Yuri Vasilevski
@ 2006-12-21 15:12   ` Alexander Zubkov
  2006-12-21 15:30     ` Alec Warner
  0 siblings, 1 reply; 13+ messages in thread
From: Alexander Zubkov @ 2006-12-21 15:12 UTC (permalink / raw
  To: gentoo-dev

> 
> You can use portage's bashrc to do that kind of autopatching.
> 

I have no idea how I can change environment so ebuild will do additional
actions...
May be I can redefine src_unpack function. But package can have its own
src_unpack. If there will be something like system_after_src_unpack,
then I can do it. But I don't know about such.
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] portage idea - auto embed user patches
  2006-12-21 15:12   ` Alexander Zubkov
@ 2006-12-21 15:30     ` Alec Warner
  2006-12-22  2:34       ` [gentoo-dev] " Steve Long
  0 siblings, 1 reply; 13+ messages in thread
From: Alec Warner @ 2006-12-21 15:30 UTC (permalink / raw
  To: gentoo-dev

Alexander Zubkov wrote:
>>You can use portage's bashrc to do that kind of autopatching.
>>
> 
> 
> I have no idea how I can change environment so ebuild will do additional
> actions...
> May be I can redefine src_unpack function. But package can have its own
> src_unpack. If there will be something like system_after_src_unpack,
> then I can do it. But I don't know about such.

http://dev.gentoo.org/~solar/bashrc

At the bottom of solar's bashrc you will find some lines dealing with 
AUTOPATCH, I don't see the bashrc.autopatch in his dev space, but you 
can probably request it from him.

-Alec Warner
antarus@gentoo.org
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] portage idea - auto embed user patches
  2006-12-21 14:58 ` Timothy Redaelli
@ 2006-12-21 16:01   ` Alexander Zubkov
  0 siblings, 0 replies; 13+ messages in thread
From: Alexander Zubkov @ 2006-12-21 16:01 UTC (permalink / raw
  To: gentoo-dev

> 
> You can use a bashrc script http://forums.gentoo.org/viewtopic-t-339019.html
> 

Thanks all. I was misunderstood the place of bashrc. Now I see, that it
is a solution. :)
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev] portage idea - auto embed user patches
  2006-12-21 14:32 [gentoo-dev] portage idea - auto embed user patches Alexander Zubkov
                   ` (2 preceding siblings ...)
  2006-12-21 14:58 ` Timothy Redaelli
@ 2006-12-21 18:59 ` Bo Ørsted Andresen
  3 siblings, 0 replies; 13+ messages in thread
From: Bo Ørsted Andresen @ 2006-12-21 18:59 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]

On Thursday 21 December 2006 15:32, Alexander Zubkov wrote:
> I have some idea on extending portage building system (ebuild?).
> Sometimes I'm (for example) want to apply custom patch to some package.
> This patch can do something unusual, that can not be accepted by
> maintainers and I know this. But I like features in my patch and want it
> to apply automatically when updating the package. Not to do it like this:
> $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 unpack
> $ cd /var/tmp/portage/pkg-categoty/some-package/work/...
> $ patch -p1 < ~/my-patch-for-some-package
> $ cd
> $ ebuild /usr/portage/pkg-categoty/some-package/some-package-1.0 merge
>
> It is lot of manual work. The idea is having an file, for example
> /etc/portage/package.patch with contents like this:
> =pkg-category/some-package-1*      /path/to/my-patch-for-some-package
>
> Of course, patches could fail in newer versions. But when I'll use that
> feature - I'll understand why it can be and it'll be more convenient to
> maintain it.

You can also use the post_src_unpack() user hook and the profile.bashrc in the 
base profile for this. E.g.:

# mkdir -p /etc/portage/env/$category
# cat << END > /etc/portage/env/$category/$name
post_src_unpack() {
    epatch foo.patch
}
END

-- 
Bo Andresen

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [gentoo-dev]  Re: portage idea - auto embed user patches
  2006-12-21 15:30     ` Alec Warner
@ 2006-12-22  2:34       ` Steve Long
  2006-12-22  3:47         ` Steev Klimaszewski
  0 siblings, 1 reply; 13+ messages in thread
From: Steve Long @ 2006-12-22  2:34 UTC (permalink / raw
  To: gentoo-dev

Alec Warner wrote:
> http://dev.gentoo.org/~solar/bashrc
> 
> At the bottom of solar's bashrc you will find some lines dealing with
> AUTOPATCH, I don't see the bashrc.autopatch in his dev space, but you
> can probably request it from him.
> 
Would it be possible to post that to this list? Then we've all got a
searchable record of the best practise.

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev]  Re: portage idea - auto embed user patches
  2006-12-22  2:34       ` [gentoo-dev] " Steve Long
@ 2006-12-22  3:47         ` Steev Klimaszewski
  2006-12-23 18:18           ` Edward Catmur
  0 siblings, 1 reply; 13+ messages in thread
From: Steev Klimaszewski @ 2006-12-22  3:47 UTC (permalink / raw
  To: gentoo-dev

Steve Long wrote:
> Alec Warner wrote:
>> http://dev.gentoo.org/~solar/bashrc
>>
>> At the bottom of solar's bashrc you will find some lines dealing with
>> AUTOPATCH, I don't see the bashrc.autopatch in his dev space, but you
>> can probably request it from him.
>>
> Would it be possible to post that to this list? Then we've all got a
> searchable record of the best practise.
> 
try http://dev.gentoo.org/~solar/portage_misc
-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [gentoo-dev]  Re: portage idea - auto embed user patches
  2006-12-22  3:47         ` Steev Klimaszewski
@ 2006-12-23 18:18           ` Edward Catmur
  2006-12-27 21:13             ` [gentoo-dev] " Steve Long
  0 siblings, 1 reply; 13+ messages in thread
From: Edward Catmur @ 2006-12-23 18:18 UTC (permalink / raw
  To: gentoo-dev

On Thu, 2006-12-21 at 21:47 -0600, Steev Klimaszewski wrote:
> Steve Long wrote:
> > Alec Warner wrote:
> >> http://dev.gentoo.org/~solar/bashrc
> >>
> >> At the bottom of solar's bashrc you will find some lines dealing with
> >> AUTOPATCH, I don't see the bashrc.autopatch in his dev space, but you
> >> can probably request it from him.
> >>
> > Would it be possible to post that to this list? Then we've all got a
> > searchable record of the best practise.
> > 
> try http://dev.gentoo.org/~solar/portage_misc

Interesting, but fairly lightweight. Mine handles re-autotooling when
appropriate and marking the autopatch stage as completed:

http://sources.catmur.co.uk/svn/repos/gentoo/phase_hooks.d/post_src_unpack/

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

* [gentoo-dev]  Re: Re: portage idea - auto embed user patches
  2006-12-23 18:18           ` Edward Catmur
@ 2006-12-27 21:13             ` Steve Long
  0 siblings, 0 replies; 13+ messages in thread
From: Steve Long @ 2006-12-27 21:13 UTC (permalink / raw
  To: gentoo-dev

Edward Catmur wrote:

> On Thu, 2006-12-21 at 21:47 -0600, Steev Klimaszewski wrote:
>> Steve Long wrote:
>> > Alec Warner wrote:
>> >> http://dev.gentoo.org/~solar/bashrc
>> >>
>> >> At the bottom of solar's bashrc you will find some lines dealing with
>> >> AUTOPATCH, I don't see the bashrc.autopatch in his dev space, but you
>> >> can probably request it from him.
>> >>
>> > Would it be possible to post that to this list? Then we've all got a
>> > searchable record of the best practise.
>> > 
>> try http://dev.gentoo.org/~solar/portage_misc
> 
> Interesting, but fairly lightweight. Mine handles re-autotooling when
> appropriate and marking the autopatch stage as completed:
> 
>
http://sources.catmur.co.uk/svn/repos/gentoo/phase_hooks.d/post_src_unpack/
> 
I think that should be:
http://sources.catmur.co.uk/viewcvs/svn/gentoo/phase_hooks.d/post_src_unpack/
..looks like interesting stuff (parent dirs as well), although I'm not
looking at it now ;)

-- 
gentoo-dev@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-12-27 21:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-21 14:32 [gentoo-dev] portage idea - auto embed user patches Alexander Zubkov
2006-12-21 14:41 ` Yuri Vasilevski
2006-12-21 15:12   ` Alexander Zubkov
2006-12-21 15:30     ` Alec Warner
2006-12-22  2:34       ` [gentoo-dev] " Steve Long
2006-12-22  3:47         ` Steev Klimaszewski
2006-12-23 18:18           ` Edward Catmur
2006-12-27 21:13             ` [gentoo-dev] " Steve Long
2006-12-21 14:50 ` [gentoo-dev] " Raymond Lewis Rebbeck
2006-12-21 15:03   ` Alexander Zubkov
2006-12-21 14:58 ` Timothy Redaelli
2006-12-21 16:01   ` Alexander Zubkov
2006-12-21 18:59 ` Bo Ørsted Andresen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox