From owner-svn-ports-head@freebsd.org Sat Oct 29 09:30:15 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D817EC25493; Sat, 29 Oct 2016 09:30:15 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4D99EA6; Sat, 29 Oct 2016 09:30:15 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9T9UE4n013543; Sat, 29 Oct 2016 09:30:14 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9T9UEqX013539; Sat, 29 Oct 2016 09:30:14 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201610290930.u9T9UEqX013539@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Sat, 29 Oct 2016 09:30:14 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r424898 - in head: Mk misc/compat4x security/bugs x11/fluxbg X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2016 09:30:16 -0000 Author: mat Date: Sat Oct 29 09:30:14 2016 New Revision: 424898 URL: https://svnweb.freebsd.org/changeset/ports/424898 Log: Fix file modes after extracting. Some port's archives contains files modes that are a bit too restrictive for some usage. For example: BUILD_DEPENDS= ${NONEXISTENT}:foo/bar:configure When building as a regular user, dependencies are installed/built as root, so if the archive contains files that have a mode of, say, 600, they will not be readable by the port requesting the dependency. This will also fix broken distribution files where directories don't have the executable bit on. OSVERSION 1100077 is after base r283997: Change directory permissions in pre-order. In this order, it won't try to recurse into a directory for which it doesn't have permission, before changing that permission. This follows an existing behavior in other BSDs, linux, OS X. PR: 213574 Submitted by: mat Exp-run by: antoine Sponsored by: Absolight Modified: head/Mk/bsd.port.mk (contents, props changed) head/misc/compat4x/Makefile (contents, props changed) head/security/bugs/Makefile (contents, props changed) head/x11/fluxbg/Makefile (contents, props changed) Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Sat Oct 29 09:04:18 2016 (r424897) +++ head/Mk/bsd.port.mk Sat Oct 29 09:30:14 2016 (r424898) @@ -3830,6 +3830,17 @@ checksum: fetch .endif .endif +# Some port's archives contains files modes that are a bit too restrictive for +# some usage. For example: +# BUILD_DEPENDS= ${NONEXISTENT}:foo/bar:configure +# When building as a regular user, dependencies are installed/built as root, so +# if the archive contains files that have a mode of, say, 600, they will not be +# readable by the port requesting the dependency. +# This will also fix broken distribution files where directories don't have the +# executable bit on. +extract-fixup-modes: + @${CHMOD} -R u+w,a+rX ${WRKDIR} + ################################################################ # The special package-building targets # You probably won't need to touch these @@ -5201,6 +5212,7 @@ _EXTRACT_SEQ= 010:check-build-conflicts 150:extract-depends 190:clean-wrkdir 200:${EXTRACT_WRKDIR} \ 300:pre-extract 450:pre-extract-script 500:do-extract \ 700:post-extract 850:post-extract-script \ + 999:extract-fixup-modes \ ${_OPTIONS_extract} ${_USES_extract} ${_SITES_extract} _PATCH_DEP= extract _PATCH_SEQ= 050:ask-license 100:patch-message 150:patch-depends \ Modified: head/misc/compat4x/Makefile ============================================================================== --- head/misc/compat4x/Makefile Sat Oct 29 09:04:18 2016 (r424897) +++ head/misc/compat4x/Makefile Sat Oct 29 09:30:14 2016 (r424898) @@ -74,7 +74,7 @@ COMPAT4X_MASTER_SITES= LOCAL/kris/${COMP do-extract: @${MKDIR} ${WRKDIR} - @(cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${TAR} -xzf - -C ${WRKDIR} ) + @(cd ${DISTDIR}/${DIST_SUBDIR} && ${CAT} ${DISTFILES} | ${TAR} -xzf - -C ${WRKDIR} usr/lib/compat ) .if !defined(FORCE_VULNERABLE_OPENSSL) .for lib in ${OPENSSL_LIBS} @${RM} ${WRKSRC}/${lib} Modified: head/security/bugs/Makefile ============================================================================== --- head/security/bugs/Makefile Sat Oct 29 09:04:18 2016 (r424897) +++ head/security/bugs/Makefile Sat Oct 29 09:30:14 2016 (r424898) @@ -55,4 +55,11 @@ post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) -.include +.include + +.if ${OSVERSION} < 1100077 +post-extract: + ${CHMOD} +x ${WRKSRC}/lib/unix ${WRKSRC}/lib/windows +.endif + +.include Modified: head/x11/fluxbg/Makefile ============================================================================== --- head/x11/fluxbg/Makefile Sat Oct 29 09:04:18 2016 (r424897) +++ head/x11/fluxbg/Makefile Sat Oct 29 09:30:14 2016 (r424898) @@ -25,4 +25,11 @@ post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g ; \ s|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/src/fluxbg_conf.cc -.include +.include + +.if ${OSVERSION} < 1100077 +post-extract: + ${CHMOD} +x ${WRKSRC}/autom4te.cache +.endif + +.include