Summary: | Try to mitigate archives with bad modes for files and directories a bit | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Mathieu Arnold <mat> | ||||||||||
Component: | Ports Framework | Assignee: | Mathieu Arnold <mat> | ||||||||||
Status: | Closed FIXED | ||||||||||||
Severity: | Affects Only Me | CC: | portmgr | ||||||||||
Priority: | --- | Flags: | mat:
exp-run?
|
||||||||||
Version: | Latest | ||||||||||||
Hardware: | Any | ||||||||||||
OS: | Any | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 213743 | ||||||||||||
Attachments: |
|
Why not ${CHMOD} -R a+rX ? It's faster, and maybe better (sets executable bit too). Yeah, I stumbled upon a port doing that after submitting the patch, I wanted to do a few tests to see if it would fix some other stuff. Created attachment 175878 [details]
v2
This way will also fix ports like converters/p5-Unicode-IMAPUtf7 where the directories are 0644 in the distfile.
New failures when building as a regular user: http://pb2.nyi.freebsd.org/data/103i386-default-PR213574/2016-10-26_05h52m03s/logs/errors/fluxbg-0.7_13.log http://pb2.nyi.freebsd.org/data/103i386-default-PR213574/2016-10-26_05h52m03s/logs/errors/bugs-4.1.1_2.log New failure when building as root: http://package23.nyi.freebsd.org/data/110amd64-default-PR213574/2016-10-26_05h39m19s/logs/errors/compat4x-i386-5.3_11.log Just to be sure, those three were the only fallout ? (In reply to Mathieu Arnold from comment #5) So far yes, I am doing a few more tests. Created attachment 176220 [details]
v3
Fix current fallout.
Created attachment 176221 [details]
v4
Don't chmod CONFIGURE_CMD in the end.
Exp-run looks fine. A commit references this bug: Author: mat Date: Sat Oct 29 09:30:14 UTC 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 Changes: head/Mk/bsd.port.mk head/misc/compat4x/Makefile head/security/bugs/Makefile head/x11/fluxbg/Makefile |
Created attachment 175871 [details] v1