Bug 245086

Summary: Failure at buildworld with srcdir on filesystem with exec=off
Product: Base System Reporter: Piotr Kubaj <pkubaj>
Component: miscAssignee: Brooks Davis <brooks>
Status: Closed FIXED    
Severity: Affects Many People CC: brooks
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
possible fix none

Description Piotr Kubaj freebsd_committer freebsd_triage 2020-03-26 22:03:05 UTC
I'm on r359342.

--- kyua-about.1 ---
/usr/src/contrib/kyua/doc/manbuild.sh  -v "CONFDIR=/etc/kyua"  -v "DOCDIR=/usr/share/doc/kyua"  -v "EGDIR=/usr/share/examples/kyua"  -v "MISCDIR=/usr/share/kyua/misc"  -v "PACKAGE=kyua"  -v "STOREDIR=/usr/share/kyua/store"  -v "TESTSDIR=/usr/tests"  -v "VERSION=0.13" /usr/src/contrib/kyua/doc/kyua-about.1.in kyua-about.1
sh: /usr/src/contrib/kyua/doc/manbuild.sh: Permission denied

srcdir is on a ZFS dataset with exec=off:
pkubaj@talos:$/usr/src$ zfs get exec zroot/usr/src
NAME           PROPERTY  VALUE  SOURCE
zroot/usr/src  exec      off    local

manbuild.sh should be copied to objdir before executing.
Comment 1 Brooks Davis freebsd_committer freebsd_triage 2020-03-26 23:52:04 UTC
Created attachment 212740 [details]
possible fix

The problem should be that ${SH} expands to nothing (I'd grabbed that bit from the kyua build bits).  I think this patch will do the job.
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-03-29 19:49:26 UTC
A commit references this bug:

Author: brooks
Date: Sun Mar 29 19:48:29 UTC 2020
New revision: 359426
URL: https://svnweb.freebsd.org/changeset/base/359426

Log:
  Fix build with src on a noexec filesystem.

  ${SH} expands to nothing on src builds so this worked by accident.  Use
  a bare "sh" instead.

  PR:		245086
  Reported by:	pkubaj
  Sponsored by:	DARPA

Changes:
  head/usr.bin/kyua/Makefile