Project

General

Profile

Bug #11551

Clean up nawk(1) usage in illumos-gate

Added by Cody Mello 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

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.

History

#1

Updated by Cody Mello 5 months 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
#2

Updated by Electric Monk 5 months 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>

Also available in: Atom PDF