From owner-freebsd-ports@FreeBSD.ORG Tue Jun 5 11:06:54 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5216A106566C; Tue, 5 Jun 2012 11:06:54 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id 081CF8FC0A; Tue, 5 Jun 2012 11:06:54 +0000 (UTC) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 67F4D28426; Tue, 5 Jun 2012 13:06:47 +0200 (CEST) Received: from [192.168.1.2] (static-84-242-120-26.net.upcbroadband.cz [84.242.120.26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 6956A28423; Tue, 5 Jun 2012 13:06:46 +0200 (CEST) Message-ID: <4FCDE845.8080903@quip.cz> Date: Tue, 05 Jun 2012 13:06:45 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.19) Gecko/20110420 Lightning/1.0b1 SeaMonkey/2.0.14 MIME-Version: 1.0 To: Baptiste Daroussin References: <4FCDCCFB.9080701@tzim.net> <20120605100021.GR73254@ithaqua.etoilebsd.net> In-Reply-To: <20120605100021.GR73254@ithaqua.etoilebsd.net> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Cc: Arnaud Houdelette , freebsd-ports@freebsd.org Subject: Re: PKGNG upgrade / reinstall overides directory permissions 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: Tue, 05 Jun 2012 11:06:54 -0000 Baptiste Daroussin wrote: > On Tue, Jun 05, 2012 at 11:10:19AM +0200, Arnaud Houdelette wrote: >> Hello. >> >> I'm currently testing pkgng and poudriere as a replacement for old pkg >> and pkg_jail. >> >> When upgrading/reinstalling a port, pkg install / pkg upgrade resets the >> permissions of the directories created by the ports which already exist. >> >> Old pkg_add did not have this behavior. >> >> For example, >> - install lighttpd >> - chmod 750 /var/log/lighttpd >> - pkg install -f lighttpd >> >> => /var/log/lighttpd mode is reset to 700. >> >> Is this behavior correct ? Is there some option to avoid this ? >> >> Arnaud > > This is expected and there is no way to avoid this but fixing the ports itself > so that it create a 750 package. > > The package should be consistent and the permission should be set at the > package creation > time. > > Of course my view here might be wrong and I'm all open for aguments against that > :D I am against automatic (silent) overriding of modified directory permissions / owners. It is really annoying to correct it after each update of the port. I am not saying that it is problem of PKGNG, it is sometime problem elsewhere - in my example in rc script of courier-authdaemond which contains install -o courier -g courier -m 0750 -d "${authdaemonvar}" So after update / reinstall, Postfix cannot connect to courier-authdaemond socket to verify SMTP auth. I don't know how it should be done for all ports in the same way. Some ports let the user to create directories manually, some create them only if directories doesn't exist, some change owner and permission on existing directories (the worst case). In the case of Lighttpd, the Makefile contains LIGHTTPD_LOGROOT?= /var/log/lighttpd LIGHTTPD_WEBROOT?= ${PREFIX}/www/data LIGHTTPD_USER?= www LIGHTTPD_GROUP?= www PLIST_SUB+= LOGROOT="${LIGHTTPD_LOGROOT}" \ USER="${LIGHTTPD_USER}" \ GROUP="${LIGHTTPD_GROUP}" \ MKDIR="${MKDIR}" \ CHOWN="${CHOWN}" Is it possible to add "LIGHTTPD_LOGROOT_MODE" (or some other variable) to allow user to override default mode in make.conf? LIGHTTPD_LOGROOT_MODE?= 0750 Or is it already recorded in binary package and cannot be overriden in install time? Miroslav Lachman