From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Mar 30 19:50:06 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE0021065672 for ; Sun, 30 Mar 2008 19:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A87F38FC14 for ; Sun, 30 Mar 2008 19:50:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2UJo5mZ098363 for ; Sun, 30 Mar 2008 19:50:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m2UJo5nF098357; Sun, 30 Mar 2008 19:50:05 GMT (envelope-from gnats) Resent-Date: Sun, 30 Mar 2008 19:50:05 GMT Resent-Message-Id: <200803301950.m2UJo5nF098357@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stefan Sperling Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCDD51065677 for ; Sun, 30 Mar 2008 19:46:36 +0000 (UTC) (envelope-from stsp@stsp.name) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.freebsd.org (Postfix) with ESMTP id 542358FC21 for ; Sun, 30 Mar 2008 19:46:36 +0000 (UTC) (envelope-from stsp@stsp.name) Received: from stsp.name (ted.stsp.name [217.197.84.186]) (authenticated bits=128) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id m2UJkYBs006093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 30 Mar 2008 21:46:35 +0200 Received: from ted.stsp.name (localhost [127.0.0.1]) by stsp.name (8.14.2/8.14.2) with ESMTP id m2UJkXfQ067256 for ; Sun, 30 Mar 2008 21:46:33 +0200 (CEST) (envelope-from stsp@ted.stsp.name) Received: (from stsp@localhost) by ted.stsp.name (8.14.2/8.14.2/Submit) id m2UJkXnu067255; Sun, 30 Mar 2008 21:46:33 +0200 (CEST) (envelope-from stsp) Message-Id: <200803301946.m2UJkXnu067255@ted.stsp.name> Date: Sun, 30 Mar 2008 21:46:33 +0200 (CEST) From: Stefan Sperling To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/122269: mail/fetchmail install as non-root user with SU_CMD fails X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stefan Sperling List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2008 19:50:06 -0000 >Number: 122269 >Category: ports >Synopsis: mail/fetchmail install as non-root user with SU_CMD fails >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 30 19:50:05 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Stefan Sperling >Release: FreeBSD 7.0-RELEASE i386 >Organization: >Environment: System: FreeBSD ted.stsp.name 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Sat Mar 29 23:54:21 CET 2008 stsp@ted.stsp.name:/usr/obj/home/stsp/src/freebsd-7.0/sys/TED i386 >Description: When installing the mail/fetchmail port as a non-root user with SU_CMD, the install fails because the port Makefile executes the pkg-install script which needs root privileges to succeed as a non-root user. >How-To-Repeat: Set SU_CMD in /etc/make.conf, for example: SU_CMD=/usr/bin/su root -c Try to install fetchmail. This will happen: ===> Installing for fetchmail-6.3.8_4 ===> fetchmail-6.3.8_4 depends on file: /usr/local/share/certs/ca-root-nss.crt - found ===> fetchmail-6.3.8_4 depends on shared library: intl - found fetchmail:*:124: You already have a group "fetchmail", so I will use it. fetchmail:*:124:124::0:0:Fetchmail mail-retrieval daemon:/var/run/fetchmail:/usr /sbin/nologin You already have a user "fetchmail", so I will use it. install: mkdir /var/run/fetchmail: Permission denied *** Error code 71 Stop in /usr/ports/mail/fetchmail. *** Error code 1 Stop in /usr/ports/mail/fetchmail. >Fix: The port should acquire root privileges before executing the pkg-install script. The patch below fixes the issue for me. Index: mail/fetchmail/Makefile =================================================================== RCS file: /usr/ncvs/ports/mail/fetchmail/Makefile,v retrieving revision 1.191 diff -u -r1.191 Makefile --- mail/fetchmail/Makefile 4 Oct 2007 01:49:27 -0000 1.191 +++ mail/fetchmail/Makefile 30 Mar 2008 19:38:46 -0000 @@ -136,7 +136,7 @@ @${ECHO_CMD} "" -pre-install: +pre-su-install: @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL post-install: >Release-Note: >Audit-Trail: >Unformatted: