Bug #11224


nightly and bldenv should be usable directly

Added by Michal Nowak almost 4 years ago. Updated about 3 years ago.

tools - gate/build tools
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:
External Bug:


I setup illumos-gate sources on OpenIndiana according to but I get following unexpected output:

newman:~/ws/illumos-gate $ time ksh93 usr/src/tools/scripts/ 
Usage: dirname [-frx] string

With some verbose options in the script it turns out that whence(1) is unable to find

  61 # Get the absolute path of the nightly script that the user invoked.  This
  62 # may be a relative path, and we need to do this before changing directory.
  63 nightly_path=`whence $0`
  65 #
  66 # Keep track of where we found nightly so we can invoke the matching
  67 # which_scm script.  If that doesn't work, don't go guessing, just rely
  68 # on the $PATH settings, which will generally give us either /opt/onbld
  69 # or the user's workspace.
  70 #
  71 WHICH_SCM=$(dirname $nightly_path)/which_scm

Unless is made executable.


Actions #1

Updated by John Levon over 3 years ago

So to get this problem resolved we'd need to remove and its surrounding
makefile infrastructure to create 'nightly' and 'bldenv', then rename the files in git
before adding the +x bit.

Given the standard env file sets MULTI_PROTO, and the other setting is no longer
relevant, AND basically nobody actually copies the created 'nightly' script instead of
'nightly', this seems fine to me.

In addition, we'd want to fix up anything that suggests a cp and chmod in the build
docs, and say we can just run the thing right out of the gate.

Actions #2

Updated by Michal Nowak over 3 years ago

I don't plan working on this, whoever does assign yourself instead of me (can't unassign myself).

Actions #3

Updated by John Levon over 3 years ago

  • Assignee deleted (Michal Nowak)
Actions #4

Updated by John Levon about 3 years ago

  • Subject changed from should be executable for whence(1) to find it to nightly and bldenv should be usable directly
  • Assignee set to John Levon
Actions #5

Updated by John Levon about 3 years ago

I tested that the new nightly/bldenv could be used directly from the gate now and do a full clean build

Actions #6

Updated by Electric Monk about 3 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 5ca82e6914c4162ba9b7028b19c9d77d3eadaf17

commit  5ca82e6914c4162ba9b7028b19c9d77d3eadaf17
Author: John Levon <>
Date:   2020-01-27T10:59:37.000Z

    11224 nightly and bldenv should be usable directly
    Reviewed by: Toomas Soome <>
    Reviewed by: Alexander Eremin <>
    Reviewed by: Alexander Pyhalov <>
    Approved by: Gordon Ross <>


Also available in: Atom PDF