From owner-freebsd-ports@FreeBSD.ORG Wed Mar 31 11:49:21 2010 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D14551065676 for ; Wed, 31 Mar 2010 11:49:21 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 5F0FB8FC1B for ; Wed, 31 Mar 2010 11:49:21 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CFB7.dip.t-dialin.net [217.226.207.183]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 093E58442CC; Wed, 31 Mar 2010 13:49:12 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 19E55508E; Wed, 31 Mar 2010 13:49:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1270036149; bh=djQWb84BbagJevyvXRiPLF66cu6wkBRMG7Djoe5ozLQ=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=HV05ftjhrno9+m9laLpRSK9OFxmNcmf1TQb/J2QPHIEZE3x6Ugg9/CFCrVNtKjnLC b1Ky1YQaTxwIoY29yE20S95rjJsEFHHBQ4WLFNh2wMQFT2vTmGs4GQU4uRQgne5oyW UMZsqes/R7AMO7pzhnSN6Du/3K47LU6I846pWBaL2BD3qUVgHSQjMtq84JlQsgaXN4 Yr2ZQjiHQu1t7Qqh9UlJ1sAXC35j8uC9FGkLS/ZgrMi5zYxzlcGWgIlO3i/JODzyi1 EEqHbwG3ivQMHBW/B81RYOy8pQPXO8bEfocCRZXda7yAChKOqJN9g1WDZ6FZL+3f53 NaxvCojeOQuBQ== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id o2VBn8n9000212; Wed, 31 Mar 2010 13:49:08 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 31 Mar 2010 13:49:08 +0200 Message-ID: <20100331134908.18805n93tsol8co4@webmail.leidinger.net> Date: Wed, 31 Mar 2010 13:49:08 +0200 From: Alexander Leidinger To: Florent Thoumie References: <7d6fde3d1003272314r25305a39mce9893e07453ef90@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 093E58442CC.5C99A X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.44, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1270640955.72861@JY4hyfDI5+gnkt1dVQ+KGA X-EBL-Spam-Status: No Cc: FreeBSD Ports , Garrett Cooper , Matthias Andree Subject: Re: [RFC] deprecate @exec and @unexec in plists in favor of pre-install and post-install scripts X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Mar 2010 11:49:22 -0000 Quoting Florent Thoumie (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