From owner-freebsd-ports Tue Feb 18 2: 5:22 2003 Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D0D737B401 for ; Tue, 18 Feb 2003 02:05:21 -0800 (PST) Received: from axl.seasidesoftware.co.za (axl.seasidesoftware.co.za [196.31.7.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06A8D43F3F for ; Tue, 18 Feb 2003 02:05:20 -0800 (PST) (envelope-from sheldonh@starjuice.net) Received: from sheldonh by axl.seasidesoftware.co.za with local (Exim 4.12) id 18l4cm-0000kh-00 for ports@FreeBSD.org; Tue, 18 Feb 2003 12:05:16 +0200 Date: Tue, 18 Feb 2003 12:05:16 +0200 From: Sheldon Hearn To: ports@FreeBSD.org Subject: [PATCH] makesum should not change ownership of distinfo Message-ID: <20030218100516.GE823@starjuice.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.3i Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi folks, I have an unusual setup here, such that I often run makesum as root. Although my ports tree is owned by sheldonh, my distfiles directory is owned by root. Unfortunately, bsd.port.mk deletes an existing distinfo file before creating the new one. This means the newly created distinfo will be owned by the owner of the make process, root in my case. This then means I can't commit the file as sheldonh. The following simple patch addresses the issue in a way that I believe should not affect other folks. In particular, I believe that /dev/null should exist in any package-building environment. Ciao, Sheldon. Index: Mk/bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.440 diff -u -d -r1.440 bsd.port.mk --- Mk/bsd.port.mk 16 Feb 2003 21:22:15 -0000 1.440 +++ Mk/bsd.port.mk 18 Feb 2003 09:59:59 -0000 @@ -3219,7 +3219,7 @@ .if !target(makesum) makesum: @cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} fetch NO_CHECKSUM=yes - @if [ -f ${MD5_FILE} ]; then ${RM} -f ${MD5_FILE}; fi + @if [ -f ${MD5_FILE} ]; then ${CAT} /dev/null > ${MD5_FILE}; fi @(cd ${DISTDIR}; \ for file in ${_CKSUMFILES}; do \ ${MD5} $$file >> ${MD5_FILE}; \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message