Bug #11551
closedClean up nawk(1) usage in illumos-gate
100%
Description
There are several places in building the gate where nawk(1)
is used in a non-standard way that will be broken with newer versions:
- Use of continue
outside of a for
loop to get the same behaviour as next
: i.rbac (it's not used in build, but lib/brand/solaris10/zone/p2v.ksh also does this and should be fixed)
- Using print
with no arguments (which is equivalent to print $0
) in an END
block, and assuming that $0
is always ""
: lib/libxcurses/src/libc/xcurses/mkkey.awk, lib/libxcurses/src/libc/xcurses/mkterm.awk, lib/libxcurses2/src/libc/xcurses/mkkey.awk, lib/libxcurses2/src/libc/xcurses/mkterm.awk
These will need to be fixed so that they don't break the build on a system with an updated nawk(1)
.
These changes are based on work done in OS-7569.
Updated by Cody Mello almost 4 years ago
To test these changes, I ran a full build twice: once with the current nawk
, and a second time with the updated nawk
lofs-mounted over /usr/bin/nawk
:
cpm@utu ~ % /usr/bin/nawk --version /usr/bin/nawk: unknown option --version ignored /usr/bin/nawk: no program given cpm@utu ~ % pfexec mount -O -F lofs ./nawk /usr/bin/nawk cpm@utu ~ % /usr/bin/nawk --version awk version Aug 27, 2018
Updated by Electric Monk almost 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit ac05f74f7be0e256003b8dd2492cf96ac4ecda1d
commit ac05f74f7be0e256003b8dd2492cf96ac4ecda1d Author: Cody Peter Mello <cody.mello@joyent.com> Date: 2019-08-24T02:54:33.000Z 11551 Clean up nawk(1) usage in illumos-gate Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gwr@nexenta.com>
Updated by Electric Monk about 3 years ago
git commit e9753c805d68532dc7d35057f2b3d5a52cd23c81
commit e9753c805d68532dc7d35057f2b3d5a52cd23c81 Author: Cody Peter Mello <cody.mello@joyent.com> Date: 2020-04-07T00:55:12.000Z 11551 Clean up nawk(1) usage in illumos-gate Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com> Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gwr@nexenta.com>