From owner-freebsd-ports@FreeBSD.ORG Wed Mar 31 12:01:15 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 DBC74106566C for ; Wed, 31 Mar 2010 12:01:14 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: from mail-fx0-f225.google.com (mail-fx0-f225.google.com [209.85.220.225]) by mx1.freebsd.org (Postfix) with ESMTP id 51E178FC19 for ; Wed, 31 Mar 2010 12:01:13 +0000 (UTC) Received: by fxm25 with SMTP id 25so11601fxm.3 for ; Wed, 31 Mar 2010 05:01:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:received:message-id :subject:to:cc:content-type; bh=iS1Pi0KVL1umio/akLuPGdukn/ayizpCSEJDffSavrQ=; b=YCtxI71D0zlbGjW2RLlDZEvkkfCyqPmpnpCxxlQQDaGV0ePbI6dUcMcw16/QOdVmA/ sVHalgD7F+w0U2OvVPwaJo63G3dLrcHOp5g7molFZXrl4KoVzFDaHQEuafefJvp+pVRx CUPDqpxiPIT5he1/RhwUrv6qfSad1iWHjeVLk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; b=fyifilfZLxl+/yScIZrOyaGVXmOZuchH5PaQi/rms72wfSvOGtoFRhI//vyNRxMKdX UK7zhuTGACg9GmjwxtD4StXAvdNm9BzYaPelN7TN+R9INds8NXB58KABaVDxLXVnLLjG ov+S8S4Hpevt/o5WlULV+Y7UU7FpxX5ZAP5RQ= MIME-Version: 1.0 Sender: florent.thoumie@gmail.com Received: by 10.239.182.206 with HTTP; Wed, 31 Mar 2010 05:00:53 -0700 (PDT) In-Reply-To: <20100331134908.18805n93tsol8co4@webmail.leidinger.net> References: <7d6fde3d1003272314r25305a39mce9893e07453ef90@mail.gmail.com> <20100331134908.18805n93tsol8co4@webmail.leidinger.net> From: Florent Thoumie Date: Wed, 31 Mar 2010 12:00:53 +0000 X-Google-Sender-Auth: ca8b4a2654a75e2b Received: by 10.239.131.199 with SMTP id 7mr725216hbo.175.1270036873134; Wed, 31 Mar 2010 05:01:13 -0700 (PDT) Message-ID: To: Alexander Leidinger Content-Type: text/plain; charset=ISO-8859-1 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 12:01:15 -0000 On Wed, Mar 31, 2010 at 11:49 AM, Alexander Leidinger wrote: > 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. That would be a good start indeed, but this is the easy part. > 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). CREATE_USER? Have you been living under a rock recently? :-) I suppose Garrett sent this email to get a feel of what the general consensus was. If it turns out that people agree we should get rid of those lines, then I'm sure we can find people willing to do the necessary work. -- Florent Thoumie flz@FreeBSD.org FreeBSD Committer