NetBSD Problem Report #48259

From www@NetBSD.org  Wed Oct  2 13:02:07 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 5229F70FEC
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  2 Oct 2013 13:02:07 +0000 (UTC)
Message-Id: <20131002130205.CDEB77100A@mollari.NetBSD.org>
Date: Wed,  2 Oct 2013 13:02:05 +0000 (UTC)
From: richard@netbsd.org
Reply-To: richard@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: bsd.wrapper.mk and gawk 3.1.8
X-Send-Pr-Version: www-1.0

>Number:         48259
>Category:       pkg
>Synopsis:       bsd.wrapper.mk and gawk 3.1.8
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 02 13:05:00 +0000 2013
>Last-Modified:  Fri Dec 17 16:22:34 +0000 2021
>Originator:     Richard PALO
>Release:        pkgsrc trunk
>Organization:
>Environment:
SunOS x3200 5.11 illumos-gate i86pc i386 i86pc Solaris

>Description:
no observations in tech-pkg, therefore submitted as a bug.

-------- Message original --------
Sujet: bsd.wrapper.mk and gawk 3.1.8
Date : Sun, 22 Sep 2013 20:00:01 +0200
De : Richard PALO <richard.palo@free.fr>
Pour : tech-pkg@netbsd.org
Groupes de discussion: gmane.os.netbsd.devel.packages

apparently the native gawk package (3.1.8) on certain solaris systems 
have a problem with the following from bsd.wrapper.mk:
> # Filter to scrunch shell scripts by removing comments and empty lines.
> _WRAP_SH_CRUNCH_FILTER= ${AWK} ' \
> 		/^\#!/ { print } \
> 		/^[[:space:]]*\#/ || NF == 0 { next } \
> 		/.*/ { print } \
> 		'

Particular uncomfortable during a bootstrap, as it gives the following:
> ===> Extracting for bootstrap-mk-files-20130912
> ===> Patching for bootstrap-mk-files-20130912
> ===> Creating toolchain wrappers for bootstrap-mk-files-20130912
> gawk: fatal: Unmatched [ or [^: /^[[:space:]]*#/

confirmed with the quick test:
 richard@devzone:~$ cat ~/.profile |gawk ' \
 /^\#!/ { print } \
 /^[[:space:]]\#/ || NF == 0 { next } \
 /.*/ { print } \
 '
gawk: cmd. line:3: fatal: Unmatched [ or [^: /^[[:space:]]\#/

which works with the pkgsrc gawk.

Is there not a means make this statement work with 3.1.8?

The wrappers should probably be able to work with native tools where possible and, by all appearances, not all platforms are up to 4.0
including solaris.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc: 
Subject: Re: pkg/48259: bsd.wrapper.mk and gawk 3.1.8
Date: Wed, 2 Oct 2013 15:33:14 +0200

 On Wed, Oct 02, 2013 at 01:05:00PM +0000, richard@netbsd.org wrote:
 > apparently the native gawk package (3.1.8) on certain solaris systems 
 > have a problem with the following from bsd.wrapper.mk:
 > > # Filter to scrunch shell scripts by removing comments and empty lines.
 > > _WRAP_SH_CRUNCH_FILTER= ${AWK} ' \
 > > 		/^\#!/ { print } \
 > > 		/^[[:space:]]*\#/ || NF == 0 { next } \
 > > 		/.*/ { print } \
 > > 		'
 > 
 > Particular uncomfortable during a bootstrap, as it gives the following:
 > > ===> Extracting for bootstrap-mk-files-20130912
 > > ===> Patching for bootstrap-mk-files-20130912
 > > ===> Creating toolchain wrappers for bootstrap-mk-files-20130912
 > > gawk: fatal: Unmatched [ or [^: /^[[:space:]]*#/
 > 
 > confirmed with the quick test:
 >  richard@devzone:~$ cat ~/.profile |gawk ' \
 >  /^\#!/ { print } \
 >  /^[[:space:]]\#/ || NF == 0 { next } \
 >  /.*/ { print } \
 >  '
 > gawk: cmd. line:3: fatal: Unmatched [ or [^: /^[[:space:]]\#/
 > 
 > which works with the pkgsrc gawk.

 Have you tried replacing
 /^[[:space:]]\#/
 with
 /^[ \t]\#/

 ?
  Thomas

From: Richard PALO <richard.palo@free.fr>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/48259: bsd.wrapper.mk and gawk 3.1.8
Date: Wed, 02 Oct 2013 16:42:27 +0200

 Le 02/10/13 15:35, Thomas Klausner a écrit :
 > The following reply was made to PR pkg/48259; it has been noted by GNATS.
 >
 > From: Thomas Klausner <wiz@NetBSD.org>
 > To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
 > Cc:
 > Subject: Re: pkg/48259: bsd.wrapper.mk and gawk 3.1.8
 > Date: Wed, 2 Oct 2013 15:33:14 +0200
 >
 >   On Wed, Oct 02, 2013 at 01:05:00PM +0000, richard@netbsd.org wrote:
 >   > apparently the native gawk package (3.1.8) on certain solaris systems
 >   > have a problem with the following from bsd.wrapper.mk:
 >   > > # Filter to scrunch shell scripts by removing comments and empty lines.
 >   > > _WRAP_SH_CRUNCH_FILTER= ${AWK} ' \
 >   > > 		/^\#!/ { print } \
 >   > > 		/^[[:space:]]*\#/ || NF == 0 { next } \
 >   > > 		/.*/ { print } \
 >   > > 		'
 >   >
 >   > Particular uncomfortable during a bootstrap, as it gives the following:
 >   > > ===> Extracting for bootstrap-mk-files-20130912
 >   > > ===> Patching for bootstrap-mk-files-20130912
 >   > > ===> Creating toolchain wrappers for bootstrap-mk-files-20130912
 >   > > gawk: fatal: Unmatched [ or [^: /^[[:space:]]*#/
 >   >
 >   > confirmed with the quick test:
 >   >  richard@devzone:~$ cat ~/.profile |gawk ' \
 >   >  /^\#!/ { print } \
 >   >  /^[[:space:]]\#/ || NF == 0 { next } \
 >   >  /.*/ { print } \
 >   >  '
 >   > gawk: cmd. line:3: fatal: Unmatched [ or [^: /^[[:space:]]\#/
 >   >
 >   > which works with the pkgsrc gawk.
 >
 >   Have you tried replacing
 >   /^[[:space:]]\#/
 >   with
 >   /^[ \t]\#/
 >
 >   ?
 >    Thomas
 >
 >
 Yes Thomas, substituting '[:space:]' with ' \t' seems to work:
 $ cat ~/.profile |gawk ' \
   /^\#!/ { print } \
   /^[ \t]*\#/ || NF == 0 { next } \
   /.*/ { print } \
   '

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Fri, 17 Dec 2021 16:22:34 +0000
Responsible-Changed-Why:
Solaris issue.

Candidate for closing given how old this is.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.