From owner-freebsd-ports@FreeBSD.ORG Wed Jan 2 22:01:13 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9805388E for ; Wed, 2 Jan 2013 22:01:13 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-ia0-f176.google.com (mail-ia0-f176.google.com [209.85.210.176]) by mx1.freebsd.org (Postfix) with ESMTP id 704FA70D for ; Wed, 2 Jan 2013 22:01:13 +0000 (UTC) Received: by mail-ia0-f176.google.com with SMTP id y26so12070772iab.7 for ; Wed, 02 Jan 2013 14:01:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0899+2dg/jQYDcYFMBf27C+j4hsmOHzzFTf5gjDoPao=; b=f3Feoq52dh1lOyxIjvKBLhRlkvwyfZ/TASy7ez/3mO6t1WkHoxqn4zCm7gblhyulSY QNp8rG0YRtPNzPo+mkYRe05BYRL+curkhLbfVIZgYD46l5lOOivsJ2aVXsC9FIFmTOYr oi2GBlxcq17XQBQi3kBbjq1JKgOfytgfMEqFH1TyQBlRtKEgBX50TWHJngzbPyuu00XY 2BaF9Cnz8A0ZB8PMbpJQCyTOamBeP9x21IjDzGGK6BkMVbEdv5FrH0H6foB8VdwwAUYs R610li0s+JWklnkEVevh96Ker8uh0jRkCRJ9LhVpsOLfLOFm8UVFSeMiQr3fjhGNQM0u 1pFw== MIME-Version: 1.0 Received: by 10.43.110.132 with SMTP id ek4mr35832452icc.32.1357164066847; Wed, 02 Jan 2013 14:01:06 -0800 (PST) Received: by 10.50.49.3 with HTTP; Wed, 2 Jan 2013 14:01:06 -0800 (PST) In-Reply-To: <50E49A73.2070008@quip.cz> References: <50E49A73.2070008@quip.cz> Date: Wed, 2 Jan 2013 16:01:06 -0600 Message-ID: Subject: Re: What is policy about auto-editing config files on port install / deinstall? From: Scot Hetzel To: Miroslav Lachman <000.fbsd@quip.cz> Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Jan 2013 22:01:13 -0000 On Wed, Jan 2, 2013 at 2:37 PM, Miroslav Lachman <000.fbsd@quip.cz> wrote: > Is somewhere written policy or portmgr recommendation about ports behavior > on install / deinstall? > I am talking about some ports doing "nasty" things. > > Some ports are stopping services on deinstall, some not. I prefer that when a port is uninstalled, that the service is stopped. If it isn't stopped, it could pose a security risk to the system at a later time. We still need to come up with a way of restarting the service after the upgrade. Currently, it has to be done manually to start the service. > Some ports are editing "my config files" on deinstall, so even on upgrade > procedure I must check if port did some changes before I can restart target > daemon. > Most ports don't edit the config files as they install the original config file to a different name. > For example some Apache modules (mod_bw, mod_xsendfile...) are commenting > out load_module lines in httpd.conf so I got syntax error on Apache restart > after upgrade of mentioned module and Apache failed to start. > Apache 2.x is an exception, as the installation of a Apache module requires apachectl to add/re-enable the module in the httpd.conf file. Upon deinstallation, apachectl is used to disable the module in the httpd.conf file. It doesn't remove the LoadModule directive, it just adds a '#" sign in front of it. When the port is re-installed, all apachectl has to do is remove the '#' sign. A restart of Apache should then load the module again. What errors are you getting when re-installing an Apache module? -- DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.