issue pkg-plist @exec lines and pkg-install scripts

Tijl Coosemans tijl at FreeBSD.org
Wed Aug 6 10:43:24 UTC 2014


On Wed, 06 Aug 2014 10:46:06 +0200 olli hauer wrote:
> Hi,
> 
> haven't found the culprit but it seems during package building the @exec
> lines from pkg-plist are running.
> 
> I found this the hard way since many ports where failing on my local pd
> system.
> 
> 
> E.g from viewvc pkg-plist
> 
> @unexec if cmp -s %D/viewvc/cvsgraph.conf %D/viewvc/cvsgraph.conf.dist; then rm -f %D/viewvc/cvsgraph.conf; fi
> @unexec if cmp -s %D/viewvc/mimetypes.conf %D/viewvc/mimetypes.conf.dist; then rm -f %D/viewvc/mimetypes.conf; fi
> @unexec if cmp -s %D/viewvc/viewvc.conf %D/viewvc/viewvc.conf.dist; then rm -f %D/viewvc/viewvc.conf; fi
> viewvc/cvsgraph.conf.dist
> @exec [ -f %B/cvsgraph.conf ] || cp %B/%f %B/cvsgraph.conf
> viewvc/mimetypes.conf.dist
> @exec [ -f %B/mimetypes.conf ] || cp %B/%f %B/mimetypes.conf
> viewvc/viewvc.conf.dist
> @exec [ -f %B/viewvc.conf ] || cp %B/%f %B/viewvc.conf
> 
> 
> $ make check-orphans
> ====> Checking for pkg-plist issues (check-plist)
> ===> Parsing plist
> ===> Checking for items in STAGEDIR missing from pkg-plist
> Error: Orphaned: %%AP_NAME%%/cvsgraph.conf
> Error: Orphaned: %%AP_NAME%%/mimetypes.conf
> Error: Orphaned: %%AP_NAME%%/%%AP_NAME%%.conf
> ===> Checking for directories owned by MTREEs
> ===> Checking for directories handled by dependencies
> ===> Checking for items in pkg-plist which are not in STAGEDIR
> ===> Error: Plist issues found.
> *** Error code 1
> 
> 
> The finished package however has only the *.conf.dist files but many
> ports are broken now because @exec statements and pkg-install scripts
> are running now during package building ...

@exec statements aren't executed during package build.  The build log
shows that the port simply installs both cvsgraph.conf.dist and
cvsgraph.conf in the staging area (same for the other two orphans).  So
check-plist is correct.  If you don't want these files you can remove
them in post-install.


More information about the freebsd-ports mailing list