Bug 191746 - [PATCH] PORTDOCS et al. not properly expanded for ${FIND} ... -type d, missing @dirrm
Summary: [PATCH] PORTDOCS et al. not properly expanded for ${FIND} ... -type d, missin...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Matthias Andree
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-08 18:43 UTC by Matthias Andree
Modified: 2014-08-28 07:38 UTC (History)
2 users (show)

See Also:


Attachments
patch to fix PORTDOCS/PORTEXAMPLES/PORTDATA @dirrm generation for globs in subdirs (PORTDOCS=dir/*) (2.12 KB, patch)
2014-07-08 18:43 UTC, Matthias Andree
no flags Details | Diff
additional patch to fix the netmond regression (284 bytes, patch)
2014-08-27 20:14 UTC, Matthias Andree
no flags Details | Diff
revised patch to fix up netmond's @mode, too, and bump PORTREVISION (751 bytes, patch)
2014-08-27 21:12 UTC, Matthias Andree
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree freebsd_committer freebsd_triage 2014-07-08 18:43:06 UTC
Created attachment 144521 [details]
patch to fix PORTDOCS/PORTEXAMPLES/PORTDATA @dirrm generation for globs in subdirs (PORTDOCS=dir/*)

PORTDOCS/PORTEXAMPLES/PORTDATA are variables to ease installing documentation, examples, or other port data into the ${SHAREDIR} or thereabouts.

The porter's handbook lists and example thus: 

PORTDOCS=	README.* ChangeLog docs/*

However, the add-plist-docs and related targets fail to create a @dirrm docs entry for the .PLIST.mktmp file.

Cause is that this target necessarily expands the globs on the ${FIND} -P -d command line, thus, causing something like /usr/bin/find -P -d /usr/ports/some/port/work/stage/usr/local/share/doc/someport/docs/FILE1 to be run, which will only match the "find -type d" constraint for nested directories.

In order to catch those, we need to strip trailing components that contain glob characters, to let FIND handle those.  The attached patch does this.
This may not work for deeply nested structures when the parents are empty, i. e. 

PORTDOCS=file1 glob1*  deep/ly/nes/ted/glob*
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2014-07-08 18:43:52 UTC
assign to maintainer
Comment 2 Matthias Andree freebsd_committer freebsd_triage 2014-07-16 07:08:21 UTC
ping?
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2014-08-15 21:04:16 UTC
ping?
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2014-08-16 10:03:41 UTC
This needs an exprun (how many ports would this break with pkg developer mode due to duplicate lines?)

Do we really want to fix this when dirrm is going to die in a few weeks?
Comment 5 Matthias Andree freebsd_committer freebsd_triage 2014-08-16 10:34:23 UTC
If I hadn't wanted to fix that I wouldn't have submitted the patch.
Exp-run flag set.

And who knows if "remove @dirrm" isn't just a temporary fad. 
I wouldn't stake anything to promise we'll just ditch @dirrm altogether.
Comment 6 Antoine Brodin freebsd_committer freebsd_triage 2014-08-25 06:13:55 UTC
Take for qat exp-run
Comment 7 Antoine Brodin freebsd_committer freebsd_triage 2014-08-27 11:21:52 UTC
Hi,

QAT exp-run results at http://package23.nyi.freebsd.org/build.html?mastername=91amd64-default-PR191746&build=2014-08-26_05h22m45s

It breaks 1 port with pkg developer mode (and unbreaks 0 port):

+ {"origin"=>"net-mgmt/netmond", "pkgname"=>"netmond-2.2b6_6", "phase"=>"package", "errortype"=>"???"}

Error log:
http://package23.nyi.freebsd.org/data/91amd64-default-PR191746/2014-08-26_05h22m45s/logs/errors/netmond-2.2b6_6.log
Comment 8 Matthias Andree freebsd_committer freebsd_triage 2014-08-27 18:09:57 UTC
reset exp-run flag
Comment 9 Matthias Andree freebsd_committer freebsd_triage 2014-08-27 20:14:35 UTC
Created attachment 146394 [details]
additional patch to fix the netmond regression

The additional patch here should fix the netmond regression.
Comment 10 Matthias Andree freebsd_committer freebsd_triage 2014-08-27 21:12:37 UTC
Created attachment 146408 [details]
revised patch to fix up netmond's @mode, too, and bump PORTREVISION

revise netmond patch
Comment 11 Antoine Brodin freebsd_committer freebsd_triage 2014-08-27 21:13:48 UTC
approved
Comment 12 Matthias Andree freebsd_committer freebsd_triage 2014-08-27 21:52:44 UTC
committed as r366361.
Comment 13 commit-hook freebsd_committer freebsd_triage 2014-08-27 21:52:53 UTC
A commit references this bug:

Author: mandree
Date: Wed Aug 27 21:52:26 UTC 2014
New revision: 366361
URL: http://svnweb.freebsd.org/changeset/ports/366361

Log:
  Fix @dirrm auto-generation for PORTDOCS/PORTEXAMPLES/PORTDATA with globs.

  Fix up net-mgmt/netmond pkg-plist for @mode (regression with pkg from
  r347404 committed by rene@) and remove two @dirrm lines that are now excess.

  Exp-run completed.

  PR:		191746
  Reviewed by:	antoine
  Approved by:	portmgr (antoine)

Changes:
  head/Mk/bsd.port.mk
  head/net-mgmt/netmond/Makefile
  head/net-mgmt/netmond/pkg-plist
Comment 14 commit-hook freebsd_committer freebsd_triage 2014-08-28 07:38:14 UTC
A commit references this bug:

Author: antoine
Date: Thu Aug 28 07:38:12 UTC 2014
New revision: 366382
URL: http://svnweb.freebsd.org/changeset/ports/366382

Log:
  Commit the version of the patch that was exp-runned

  PR:		191746
  With hat:	portmgr

Changes:
  head/Mk/bsd.port.mk