Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2010 13:49:08 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Florent Thoumie <flz@xbsd.org>
Cc:        FreeBSD Ports <ports@freebsd.org>, Garrett Cooper <yanefbsd@gmail.com>, Matthias Andree <matthias.andree@gmx.de>
Subject:   Re: [RFC] deprecate @exec and @unexec in plists in favor of pre-install and post-install scripts
Message-ID:  <20100331134908.18805n93tsol8co4@webmail.leidinger.net>
In-Reply-To: <a01628141003290210w45432af9o57a8a045d0bb92cb@mail.gmail.com>
References:  <7d6fde3d1003272314r25305a39mce9893e07453ef90@mail.gmail.com> <op.vabkfdrt1e62zd@merlin.emma.line.org> <a01628141003290210w45432af9o57a8a045d0bb92cb@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Florent Thoumie <flz@xbsd.org> (from Mon, 29 Mar 2010 09:10:54 +0000):

> I mentioned getting rid of those pesky @*exec lines a few years ago,
> but this was met by quite a lot of objection.
>
> I still think it would be a good change, assuming that we provide
> equivalent (or better) features:
>
> - Configuration files should be marked and automatically dealt with by
> the infrastructure, not by esoteric commands.
> - Subroutines for shell scripts should be provided along with
> pkg_install, or be installed by a third party port (users/groups
> creation comes to mind).
> - Scripts should be automatically picked up as you mentioned. We're
> trying to shove most targets in pkg-install, but it probably would be
> best to split it (preinstall, postinstall, predeinstall,
> postdeinstall). Good thing is, this doesn't require any change in
> pkg_install since it's already supported.
>
> One of the added bonus is that some code that appears both in Makefile
> and pkg-plist will only be in preinstall/postinstall scripts.

Given that a lot of the @(un)exec is comming from ports/Mk/bsd.*.mk,  
and that you can detect if there is already a pre-/post-install script  
in bsd.port.mk, it should be not so hard for the people which propose  
those (IMO good) ideas to come up with a patch for bsd.port.mk which  
generates pre-/post-install scripts with appropriate commands and does  
not add the @(un)exec to pkg-plist for those ports, which do not have  
a pre-/post-install script. It could serve as a proof of concept and  
would show more clearly what you have in mind. Done nicely, it also  
allows to keep a lot of the stuff in the Makefile and only write such  
scripts by hand if absolutely necessary (think about e.g.  
"CREATE_USER=name1:UID1 name2:UID2" which would already cover a lot if  
not most use cases).

Bye,
Alexander.

-- 
Behold the unborn foetus and
	Weep salt tears crocodilian;
All life is sacred (save, of course,
	An enemy civilian).

http://www.Leidinger.net    Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org       netchild @ FreeBSD.org  : PGP ID = 72077137



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100331134908.18805n93tsol8co4>