From owner-freebsd-ports@FreeBSD.ORG Mon Oct 31 09:23:24 2011 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 A22E51065670; Mon, 31 Oct 2011 09:23:24 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5F0648FC12; Mon, 31 Oct 2011 09:23:24 +0000 (UTC) Received: by iabz21 with SMTP id z21so1016368iab.13 for ; Mon, 31 Oct 2011 02:23:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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 :content-transfer-encoding; bh=8hpEdU7vKD2neVHgYyxLYWVYnnkrJJy2XfIM6qtUGJI=; b=RzqWRZFgUWEh/j8kodOl4ozI/v2B1ySuvlXihZUh8vNn0cbsTCQbaI/j7J+AKc9T+X 1BYMHPxrR5hYY//wiI4/vlrXjx8BOQMY/5thG/cxED3AhgbBIO8q/RNFvc+WcA5E6Scd VcUFYEQBjfhwmA8VmxuNmlUwaWurIZ/qYiIFA= Received: by 10.231.82.11 with SMTP id z11mr4817666ibk.77.1320053004070; Mon, 31 Oct 2011 02:23:24 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.231.11.140 with HTTP; Mon, 31 Oct 2011 02:22:54 -0700 (PDT) In-Reply-To: <4EAE5E2D.3060209@FreeBSD.org> References: <20111027091500.GM63910@hoeg.nl> <20111027162715.GB1012@sysmon.tcworks.net> <4EAE401B.2040704@FreeBSD.org> <4EAE5075.6030102@bsdforen.de> <4EAE5E2D.3060209@FreeBSD.org> From: Chris Rees Date: Mon, 31 Oct 2011 09:22:54 +0000 X-Google-Sender-Auth: f8-hmjCY5j3lJ8M23u3Shl4iD-0 Message-ID: To: Doug Barton Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: ports@freebsd.org, Dominic Fandrey , Ed Schouten Subject: Re: ports/162049: The Ports tree lacks a framework to restart services 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: Mon, 31 Oct 2011 09:23:24 -0000 On 31 October 2011 08:37, Doug Barton wrote: > On 10/31/2011 00:38, Dominic Fandrey wrote: >> On 31/10/2011 07:28, Doug Barton wrote: >>> On 10/27/2011 09:27, Scott Lambert wrote: >>>> On Thu, Oct 27, 2011 at 11:15:00AM +0200, Ed Schouten wrote: >>>>> What really bothers me when I use the FreeBSD Ports tree on one of my >>>>> systems, is that the behaviour of dealing with services is quite >>>>> inconsistent. >>>> >>>> If all of that is contingent upon a boolean knob the admin can set, >>>> something like NO_RESTART_SERVICES, I suspect everyone could get >>>> what they want and the bikeshed would be limitted to what the default >>>> for that boolean should be. >>>> >>>> The people who don't want the services restarted automagically can >>>> set it and, once things use the new ports framewoork properly, not >>>> have to worry about suprises. =A0The people who want everything to >>>> restarted as soon as possible can set the knob the other way. >>>> >>> >>> >>> I think Scott's on the right track. The way that I envision it working >>> would be a 3-knob system. One knob to always restart the services, one >>> to never do it; and then asking on a per-port basis, which should be th= e >>> default. I can imagine portmaster detecting this option in the pre-buil= d >>> phase similarly to how it detects and warns about IS_INTERACTIVE now, >>> and giving the user a menu of options for how to handle it. I'm happy t= o >>> add more details if people are interested. >> >> I think this should be handled in the pkg-install script. Pkg based >> upgrade tools _do_ exist. > > Yeah, that's what I said below. :) > >>> Where this actually becomes interesting is not in the ports >>> build/install process, which is pretty easy to deal with, but with >>> package installs/deinstalls. I definitely think it's doable, what we >>> probably want to do is put a knob for this in the port's Makefile, and >>> handle the stop/start for both the port and the package with a little >>> script that can be included in the package, and run with @exec and @une= xec. >> >> Note the Porters' Handboock chapter 6.23.1. The knob to stop services is >> already there. > > That feature as it exists currently isn't even close to adequate, and is > causing more problems than it solves. Hence the discussion. I'd be happy to code this; I've offered once before. However, I had a hard time convincing people that it wasn't something that portmaster/portupgrade should be doing instead... Chris