* [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
@ 2004-09-22 11:02 Elfyn McBratney
2004-09-22 19:46 ` Joseph Booker
2004-09-22 19:52 ` Jeff Smelser
0 siblings, 2 replies; 15+ messages in thread
From: Elfyn McBratney @ 2004-09-22 11:02 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I'm about to start working on a new portage feature that allows you to run
commands (basically, bash syntax) before a merge and after a successful
merge.
(At work, we have a lot of virtual hosts with auto-generated vhosts.conf files
for apache, with configuration data stored in XML files and/or databases, and
having them updated automatically on apache upgrades would ease maintenance
burdens. :)
What I would like to do is add a new file to /etc/portage - package.hooks
(open to suggestions on better names ;), which would contain category/package
atoms and shell commands, ala:
[atom] 'before' '(' shell code ')' or
[atom] 'after' '(' shell code ')' or
e.g.
net-www/apache after apache-update-vhosts
net-www/apache after (foo && do-bar || die "do-bar failed")
Where atom's marked with before would run before the merge, and packages with
after (or none specified) would be run after the merge.
Before I start, does this feature sound useful for other gentoo'ers? :) If
I've also left out something really important (happens ;), please ask. =)
Comments, flames, etc, welcome. :)
Elfyn
- --
Elfyn McBratney
beu on irc.freenode.net/savannah.[non]gnu.org
PGP Key ID: 0x456548B4
PGP Key Fingerprint:
29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBUVu0aIgMKkVlSLQRAu0hAJ4rS+5Idji4eFbjHdpllYoNYWOkAwCeKLuk
nCWDE+e8kjGXTjLPYQWBxRo=
=5Se/
-----END PGP SIGNATURE-----
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-22 11:02 [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks) Elfyn McBratney
@ 2004-09-22 19:46 ` Joseph Booker
2004-09-22 20:46 ` [gentoo-portage-dev] unsuscribe Luca Martinetti
2004-09-24 9:55 ` [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks) Elfyn McBratney
2004-09-22 19:52 ` Jeff Smelser
1 sibling, 2 replies; 15+ messages in thread
From: Joseph Booker @ 2004-09-22 19:46 UTC (permalink / raw
To: gentoo-portage-dev
On Wed, September 22, 2004 6:02 am, Elfyn McBratney said:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> I'm about to start working on a new portage feature that allows you to run
> commands (basically, bash syntax) before a merge and after a successful
> merge.
>
> (At work, we have a lot of virtual hosts with auto-generated vhosts.conf
> files
> for apache, with configuration data stored in XML files and/or databases,
> and
> having them updated automatically on apache upgrades would ease
> maintenance
> burdens. :)
>
> What I would like to do is add a new file to /etc/portage - package.hooks
> (open to suggestions on better names ;), which would contain
> category/package
> atoms and shell commands, ala:
>
> [atom] 'before' '(' shell code ')' or
> [atom] 'after' '(' shell code ')' or
>
> e.g.
>
> net-www/apache after apache-update-vhosts
> net-www/apache after (foo && do-bar || die "do-bar failed")
Could this kind of syntax be added also
net-www/apache after |mail admin@localhost webmaster@localhost -s
"Apache updated by cronjob, just letting you know how it went"
Basicly, add the ability to pipe it places
--
Joseph Booker
joe @ irc.neoturbine.net
jj110888 @ irc.freenode.net
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-22 11:02 [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks) Elfyn McBratney
2004-09-22 19:46 ` Joseph Booker
@ 2004-09-22 19:52 ` Jeff Smelser
2004-09-23 2:56 ` Colin Kingsley
2004-09-24 9:47 ` Elfyn McBratney
1 sibling, 2 replies; 15+ messages in thread
From: Jeff Smelser @ 2004-09-22 19:52 UTC (permalink / raw
To: gentoo-portage-dev
On Wednesday 22 September 2004 06:02 am, Elfyn McBratney wrote:
> Before I start, does this feature sound useful for other gentoo'ers? :) If
> I've also left out something really important (happens ;), please ask. =)
I would like to see a default for anything.. I would probably set up something
to mail me the log file as it completes successfully..
* | mailx blah blah
Jeff
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* [gentoo-portage-dev] unsuscribe
2004-09-22 19:46 ` Joseph Booker
@ 2004-09-22 20:46 ` Luca Martinetti
2004-09-22 21:12 ` Michael Kohl
2004-09-24 9:55 ` [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks) Elfyn McBratney
1 sibling, 1 reply; 15+ messages in thread
From: Luca Martinetti @ 2004-09-22 20:46 UTC (permalink / raw
To: gentoo-portage-dev
Unsuscribe
remove
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] unsuscribe
2004-09-22 20:46 ` [gentoo-portage-dev] unsuscribe Luca Martinetti
@ 2004-09-22 21:12 ` Michael Kohl
0 siblings, 0 replies; 15+ messages in thread
From: Michael Kohl @ 2004-09-22 21:12 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
You want to send an email to gentoo-portage-dev-unsubscribe@gentoo.org
On Wed, 22 Sep 2004 22:46:07 +0200
"Luca Martinetti" <lucamartinetti@phatsoft.net> wrote:
> Unsuscribe
> remove
>
>
> --
> gentoo-portage-dev@gentoo.org mailing list
>
>
--
Michael Kohl <citizen428@gentoo.org>
GnuPG key: http://dev.gentoo.org/~citizen428/citizen428.asc
0x90CA09E3 - 4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-22 19:52 ` Jeff Smelser
@ 2004-09-23 2:56 ` Colin Kingsley
2004-09-23 10:48 ` Sven Vermeulen
2004-09-24 9:51 ` Elfyn McBratney
2004-09-24 9:47 ` Elfyn McBratney
1 sibling, 2 replies; 15+ messages in thread
From: Colin Kingsley @ 2004-09-23 2:56 UTC (permalink / raw
To: gentoo-portage-dev
Ths sounds usefull, but similar to package.cflags and a few other
things, probably takes alot of work to implement and doesnt benefit
enough users to justify it.
But if I'm wrong, then awesome, this sounds cool.
Colin
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-23 2:56 ` Colin Kingsley
@ 2004-09-23 10:48 ` Sven Vermeulen
2004-09-23 12:50 ` Jason Stubbs
2004-09-24 9:51 ` Elfyn McBratney
1 sibling, 1 reply; 15+ messages in thread
From: Sven Vermeulen @ 2004-09-23 10:48 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]
On Wed, Sep 22, 2004 at 10:56:01PM -0400, Colin Kingsley wrote:
> Ths sounds usefull, but similar to package.cflags and a few other
> things, probably takes alot of work to implement and doesnt benefit
> enough users to justify it.
Can the ebuild's test function be (ab)used for this? It does mean altering
the ebuild (so it's less userfriendly) though.
Wkr,
Sven Vermeulen
--
^__^ And Larry saw that it was Good.
(oo) Sven Vermeulen
(__) http://www.gentoo.org Documentation & PR
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-23 10:48 ` Sven Vermeulen
@ 2004-09-23 12:50 ` Jason Stubbs
2004-09-24 8:17 ` Michael Kohl
0 siblings, 1 reply; 15+ messages in thread
From: Jason Stubbs @ 2004-09-23 12:50 UTC (permalink / raw
To: gentoo-portage-dev
On Thursday 23 September 2004 19:48, Sven Vermeulen wrote:
> On Wed, Sep 22, 2004 at 10:56:01PM -0400, Colin Kingsley wrote:
> > Ths sounds usefull, but similar to package.cflags and a few other
> > things, probably takes alot of work to implement and doesnt benefit
> > enough users to justify it.
>
> Can the ebuild's test function be (ab)used for this? It does mean altering
> the ebuild (so it's less userfriendly) though.
The test function wouldn't work for two reasons. One is that the test function
is run before the package is merged to the live filesystem. Actually, it's
run before src_install is even ran. The second reason is that it is not run
at all for binary packages.
Regards,
Jason Stubbs
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-23 12:50 ` Jason Stubbs
@ 2004-09-24 8:17 ` Michael Kohl
2004-09-24 8:28 ` Marius Mauch
0 siblings, 1 reply; 15+ messages in thread
From: Michael Kohl @ 2004-09-24 8:17 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
On Thu, 23 Sep 2004 21:50:38 +0900
Jason Stubbs <jstubbs@gentoo.org> wrote:
> The test function wouldn't work for two reasons. One is that the test
> function is run before the package is merged to the live filesystem.
> Actually, it's run before src_install is even ran. The second reason
> is that it is not run at all for binary packages.
Would it be possible to add something to pkg_postinst which would parse
this proposed new file in /etc/portage?
Regards
--
Michael Kohl <citizen428@gentoo.org>
GnuPG key: http://dev.gentoo.org/~citizen428/citizen428.asc
0x90CA09E3 - 4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-24 8:17 ` Michael Kohl
@ 2004-09-24 8:28 ` Marius Mauch
2004-09-24 9:04 ` Michael Kohl
2004-09-24 9:53 ` Elfyn McBratney
0 siblings, 2 replies; 15+ messages in thread
From: Marius Mauch @ 2004-09-24 8:28 UTC (permalink / raw
To: gentoo-portage-dev
On 09/24/04 Michael Kohl wrote:
> On Thu, 23 Sep 2004 21:50:38 +0900
> Jason Stubbs <jstubbs@gentoo.org> wrote:
>
> > The test function wouldn't work for two reasons. One is that the
> > test function is run before the package is merged to the live
> > filesystem. Actually, it's run before src_install is even ran. The
> > second reason is that it is not run at all for binary packages.
>
> Would it be possible to add something to pkg_postinst which would
> parse this proposed new file in /etc/portage?
Ehm, this file hasn't even been discussed really, so there isn't really
a point to ask about implementation details. Also, why would you want to
parse it from an ebuild?
Marius
--
Public Key at http://www.genone.de/info/gpg-key.pub
In the beginning, there was nothing. And God said, 'Let there be
Light.' And there was still nothing, but you could see a bit better.
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-24 8:28 ` Marius Mauch
@ 2004-09-24 9:04 ` Michael Kohl
2004-09-24 9:53 ` Elfyn McBratney
1 sibling, 0 replies; 15+ messages in thread
From: Michael Kohl @ 2004-09-24 9:04 UTC (permalink / raw
To: gentoo-portage-dev
[-- Attachment #1: Type: text/plain, Size: 645 bytes --]
On Fri, 24 Sep 2004 10:28:15 +0200
Marius Mauch <genone@gentoo.org> wrote:
> On 09/24/04 Michael Kohl wrote:
> > Would it be possible to add something to pkg_postinst which would
> > parse this proposed new file in /etc/portage?
>
> Ehm, this file hasn't even been discussed really, so there isn't
> really a point to ask about implementation details.
True.
> Also, why would you want to parse it from an ebuild?
Sorry, I won't post again before having my first coffee.
--
Michael Kohl <citizen428@gentoo.org>
GnuPG key: http://dev.gentoo.org/~citizen428/citizen428.asc
0x90CA09E3 - 4D21 916E DBCE 72B8 CDC5 BD87 DE2D 91A2 90CA 09E3
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-22 19:52 ` Jeff Smelser
2004-09-23 2:56 ` Colin Kingsley
@ 2004-09-24 9:47 ` Elfyn McBratney
1 sibling, 0 replies; 15+ messages in thread
From: Elfyn McBratney @ 2004-09-24 9:47 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey Jeff,
On Wednesday 22 Sep 2004 20:52, Jeff Smelser wrote:
> On Wednesday 22 September 2004 06:02 am, Elfyn McBratney wrote:
> > Before I start, does this feature sound useful for other gentoo'ers? :)
> > If I've also left out something really important (happens ;), please ask.
> > =)
>
> I would like to see a default for anything.. I would probably set up
> something to mail me the log file as it completes successfully..
>
> * | mailx blah blah
At the mo, it's just a prototype, but piping should be simple enough to add
once it's working (just started on it now ;-)
Elfyn
- --
Elfyn McBratney
beu on irc.freenode.net/savannah.[non]gnu.org
PGP Key ID: 0x456548B4
PGP Key Fingerprint:
29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBU+0caIgMKkVlSLQRAoDPAJ9r/0cX/gox6Ayl4gJtcIjj5xAKTwCfSxjn
Vo0SjTSuit9x6xJCS8FLYas=
=kIzi
-----END PGP SIGNATURE-----
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-23 2:56 ` Colin Kingsley
2004-09-23 10:48 ` Sven Vermeulen
@ 2004-09-24 9:51 ` Elfyn McBratney
1 sibling, 0 replies; 15+ messages in thread
From: Elfyn McBratney @ 2004-09-24 9:51 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey Colin,
On Thursday 23 Sep 2004 03:56, Colin Kingsley wrote:
> Ths sounds usefull, but similar to package.cflags and a few other
> things,
Except, this isn't exactly a build time thing.. if package.cflags (hmm) went
wrong/bad/whatever, you might get a broken updated 'thing', due to build
errors. Ehm, anyway.. wrong, wrong, place for it, imo. ;-)
> probably takes alot of work to implement and doesnt benefit
> enough users to justify it.
Not much work, ~50 lines now and sorta working. :-)
> But if I'm wrong, then awesome, this sounds cool.
Well, one way it sits on my space and a few use it, other way it goes into
portage and maybe a few more use it and benefit from it. Who knows...
:-)
Elfyn
- --
Elfyn McBratney
beu on irc.freenode.net/savannah.[non]gnu.org
PGP Key ID: 0x456548B4
PGP Key Fingerprint:
29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBU+4jaIgMKkVlSLQRAniLAKCRxye26oaXD1uTemLx4d1iLr6lAACePD4F
NPj8yYb9kmL/cd+LBRLxNtQ=
=MvnD
-----END PGP SIGNATURE-----
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-24 8:28 ` Marius Mauch
2004-09-24 9:04 ` Michael Kohl
@ 2004-09-24 9:53 ` Elfyn McBratney
1 sibling, 0 replies; 15+ messages in thread
From: Elfyn McBratney @ 2004-09-24 9:53 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hello Marius,
On Friday 24 Sep 2004 09:28, Marius Mauch wrote:
> On 09/24/04 Michael Kohl wrote:
> > On Thu, 23 Sep 2004 21:50:38 +0900
> >
> > Jason Stubbs <jstubbs@gentoo.org> wrote:
> > > The test function wouldn't work for two reasons. One is that the
> > > test function is run before the package is merged to the live
> > > filesystem. Actually, it's run before src_install is even ran. The
> > > second reason is that it is not run at all for binary packages.
> >
> > Would it be possible to add something to pkg_postinst which would
> > parse this proposed new file in /etc/portage?
>
> Ehm, this file hasn't even been discussed really, so there isn't really
> a point to ask about implementation details. Also, why would you want to
> parse it from an ebuild?
;-)
I'll upload a patch (against latest portage CVS) to
<http://elfyn.demon.co.uk/> soon (the name will be obvious 8-)
Elfyn
- --
Elfyn McBratney
beu on irc.freenode.net/savannah.[non]gnu.org
PGP Key ID: 0x456548B4
PGP Key Fingerprint:
29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBU+6IaIgMKkVlSLQRAuoQAKC5HGnjmInTvEDeVrEHqsDohCw4jACfZ+5a
x9/L7TzIGTBlOxL8x+5tISo=
=VqmD
-----END PGP SIGNATURE-----
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
2004-09-22 19:46 ` Joseph Booker
2004-09-22 20:46 ` [gentoo-portage-dev] unsuscribe Luca Martinetti
@ 2004-09-24 9:55 ` Elfyn McBratney
1 sibling, 0 replies; 15+ messages in thread
From: Elfyn McBratney @ 2004-09-24 9:55 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Joseph,
On Wednesday 22 Sep 2004 20:46, Joseph Booker wrote:
> On Wed, September 22, 2004 6:02 am, Elfyn McBratney said:
> > [...]
> > > >
> > What I would like to do is add a new file to /etc/portage - package.hooks
> > (open to suggestions on better names ;), which would contain
> > category/package
> > atoms and shell commands, ala:
> >
> > [atom] 'before' '(' shell code ')' or
> > [atom] 'after' '(' shell code ')' or
> >
> > e.g.
> >
> > net-www/apache after apache-update-vhosts
> > net-www/apache after (foo && do-bar || die "do-bar failed")
>
> Could this kind of syntax be added also
> net-www/apache after |mail admin@localhost webmaster@localhost -s
> "Apache updated by cronjob, just letting you know how it went"
>
> Basicly, add the ability to pipe it places
Once I have something simple and working (abt an hour - patch found in url
posted above) I'll give that a go, but should be pisk easy given bash is
doing the hard work. ;-)
Elfyn
- --
Elfyn McBratney
beu on irc.freenode.net/savannah.[non]gnu.org
PGP Key ID: 0x456548B4
PGP Key Fingerprint:
29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBU+8IaIgMKkVlSLQRAqDIAJ9StYTDLyULqz9Qsb3OAx+YNUmLRgCfZo8x
BsPtibfYevzaPWGVRnbsrXc=
=JaFc
-----END PGP SIGNATURE-----
--
gentoo-portage-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2004-09-24 10:31 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-22 11:02 [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks) Elfyn McBratney
2004-09-22 19:46 ` Joseph Booker
2004-09-22 20:46 ` [gentoo-portage-dev] unsuscribe Luca Martinetti
2004-09-22 21:12 ` Michael Kohl
2004-09-24 9:55 ` [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks) Elfyn McBratney
2004-09-22 19:52 ` Jeff Smelser
2004-09-23 2:56 ` Colin Kingsley
2004-09-23 10:48 ` Sven Vermeulen
2004-09-23 12:50 ` Jason Stubbs
2004-09-24 8:17 ` Michael Kohl
2004-09-24 8:28 ` Marius Mauch
2004-09-24 9:04 ` Michael Kohl
2004-09-24 9:53 ` Elfyn McBratney
2004-09-24 9:51 ` Elfyn McBratney
2004-09-24 9:47 ` Elfyn McBratney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox