Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Feb 2003 12:05:16 +0200
From:      Sheldon Hearn <sheldonh@starjuice.net>
To:        ports@FreeBSD.org
Subject:   [PATCH] makesum should not change ownership of distinfo
Message-ID:  <20030218100516.GE823@starjuice.net>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030218100516.GE823>