On Thu, Mar 07, 2019 at 06:54:02PM -0700, Andrew Hewus Fresh wrote:
> Reading through the rest, and avoiding installing dependencies, we could
> just check for bad permissions if $WRKSRC exists, which it probably does
> if you've been working on the port.
This works well directly afer extraction. But if the build creates
non readable files, portcheck fails if you run it after make build.
I don't know wheter this happens in practice or how to fix this and
I have no better idea. To test the problem I did a build with a
retrictive umask.
bluhm
>
> This does specifically check that FIX_EXTRACT_PERMISSIONS is "No" and
> the ports infrastructure checks that it is "Yes" (case insensitive) so
> you could set "FIX_EXTRACT_PERMISSIONS=ignore" to silence this check.
>
>
> Index: infrastructure/bin/portcheck
> ===================================================================
> RCS file: /cvs/ports/infrastructure/bin/portcheck,v
> retrieving revision 1.126
> diff -u -p -r1.126 portcheck
> --- infrastructure/bin/portcheck 16 Nov 2018 10:08:38 -0000 1.126
> +++ infrastructure/bin/portcheck 7 Mar 2019 20:54:09 -0000
> @@ -790,6 +790,31 @@ check_distfiles() {
> local dist_subdir=$1; shift
> local portref=$(portref "$dir")
>
> + local wrkdist fix_extract_permissions
> + local show_items="WRKDIST FIX_EXTRACT_PERMISSIONS"
> + local read_ok=false
> +
> + (cd -- "$dir"; make "${make_args[@]}" show="$show_items" || true)
> </dev/null |&
> + read -pr wrkdist &&
> + read -pr fix_extract_permissions &&
> + read_ok=true
> +
> + if $read_ok; then
> + exec 3<&p
> + exec 3<&-
> + wait
> + else
> + error=true
> + return
> + fi
> +
> + if [ "$fix_extract_permissions" = No -a -e "$wrkdist" \
> + -a $( find "$wrkdist" ! \( \
> + \( -type d -a -perm -0555 \) -o -perm -0444 \
> + \) | wc -l ) -gt 0 ]; then
> + err "${portref}missing FIX_EXTRACT_PERMISSIONS"
> + fi
> +
> # do not care about absent distfiles, this is fine for meta ports
> while (($# > 1)); do
> # try to catch "version-only" names, but not anything more