On Thu, Mar 07, 2019 at 11:25:43AM -0700, Andrew Hewus Fresh wrote:
> On Thu, Mar 07, 2019 at 06:24:45PM +0100, Alexander Bluhm wrote:
> > On Wed, Mar 06, 2019 at 07:53:00PM -0700, Andrew Hewus Fresh wrote:
> > > A good 8 years since the 0.34 release to this one, but it seems to be
> > > just a few patches to make things faster, plus some documentation fixes.
> > >
> > > The difference between 0.50 and 0.51 is they actually applied the
> > > speed improvement patches to 0.51.
> > >
> > > https://metacpan.org/changes/release/KASEI/Class-Accessor-0.51
> > >
> > > OK?
> >
> > drwx------ 5 _pbuild _pbuild 512 Oct 22 2017
> > p5-Class-Accessor-0.51/Class-Accessor-0.51
> >
> > you need a FIX_EXTRACT_PERMISSIONS=yes
> >
> > with that OK bluhm@
>
> I wonder if we could add something to catch that.
>
> I don't know why I had to change to $# > 0 instead of 1 there, that
> could maybe indicate another problem, or maybe I'm just confused.
>
> I'm sure I can go read portcheck a bit closer and make a more
> appropriate check if this seems like a generally good idea.
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 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