From owner-freebsd-ports@freebsd.org Wed Jun 27 23:08:56 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2330101A6E9 for ; Wed, 27 Jun 2018 23:08:55 +0000 (UTC) (envelope-from jbwlists@hilltopgroup.com) Received: from equinox.hilltopgroup.com (equinox.hilltopgroup.com [204.109.63.175]) by mx1.freebsd.org (Postfix) with ESMTP id 7BF0F77F2E for ; Wed, 27 Jun 2018 23:08:55 +0000 (UTC) (envelope-from jbwlists@hilltopgroup.com) Received: from mail.relativity.hilltop.int (unknown [104.185.205.155]) by equinox.hilltopgroup.com (Postfix) with ESMTP id 9D78237BDC4 for ; Wed, 27 Jun 2018 19:08:48 -0400 (EDT) Received: from sovereign.sector005 (equinox.hilltopgroup.com [204.109.63.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jbwlists@hilltopgroup.com) by mail.relativity.hilltop.int (Postfix) with ESMTPSA id E663711F63 for ; Wed, 27 Jun 2018 19:08:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hilltopgroup.com; s=mail; t=1530140928; bh=hd4WCVMUjVSHxHENFDtgFRSpzF6OphhTWavz0UZ23NA=; h=To:From:Subject:Date; b=c1/Bxj/zCbA4Otrom73AYxwqdS76UcxpOZE+RyXTPaUOuUtWcUmYNXaCTWRF8HoyG VhZCdF16batDsN5RpKdRz+sKVVm8lsAFEJbkiyFVtSwELMIwrlP9MzPCX3RCU6auL6 Uuc5yopYQ8w/OYT8zRirH6VDKePsFostPwOyjZLY= To: freebsd-ports@freebsd.org From: Joseph Ward Subject: Any way to prevent do-extract chmod and chown? Message-ID: Date: Wed, 27 Jun 2018 19:06:44 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 23:08:56 -0000 Hi everyone, I'm creating some internal-only ports and I'm trying to maintain the permissions and owners of the files present in the distfile.tar.gz when they get packaged up for install. When I "make extract", the "do-extract" target is performing a chmod and chown on everything, as seen from the following excerpt from the bsd.port.mk file: .if !target(do-extract) do-extract: ${EXTRACT_WRKDIR}         @for file in ${EXTRACT_ONLY}; do \                 if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\                 then \                         exit 1; \                 fi; \         done         @if [ ${UID} = 0 ]; then \                 ${CHMOD} -R ug-s ${WRKDIR}; \                 ${CHOWN} -R 0:0 ${WRKDIR}; \         fi .endif Short of commenting those lines out (which I really don't want to do because I have 0 idea why it's there or what I'd break with other ports) is there any way at all to maintain the ownership of the files?  Thanks, Joseph Ward