NetBSD Problem Report #57875

From www@netbsd.org  Wed Jan 24 14:09:18 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 02ECE1A9238
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 24 Jan 2024 14:09:18 +0000 (UTC)
Message-Id: <20240124140916.9BF271A9239@mollari.NetBSD.org>
Date: Wed, 24 Jan 2024 14:09:16 +0000 (UTC)
From: jtocino@gmx.com
Reply-To: jtocino@gmx.com
To: gnats-bugs@NetBSD.org
Subject: getconf: Suggested enhancement for portability
X-Send-Pr-Version: www-1.0

>Number:         57875
>Category:       bin
>Synopsis:       getconf: Suggested enhancement for portability
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Jan 24 14:10:00 +0000 2024
>Closed-Date:    Mon Mar 11 22:22:21 +0000 2024
>Last-Modified:  Mon Mar 11 22:22:21 +0000 2024
>Originator:     Jason Bacon
>Release:        NetBSD 10
>Organization:
NA
>Environment:
NetBSD netbsd10.local 10.0_RC1 NetBSD 10.0_RC1 (GENERIC) #0: Sun Nov  5 18:30:08 UTC 2023  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
NetBSD's getconf command currently does not tolerate a leading '_' in the variable name.

Linux requires an '_' and FreeBSD accepts variables with or without.

I'd suggest following FreeBSD's example, to make it easier to port scripts to NetBSD from other platforms.

NetBSD netbsd10.local  bacon ~ 12: getconf NPROCESSORS_CONF
2
NetBSD netbsd10.local  bacon ~ 13: getconf _NPROCESSORS_CONF
getconf: _NPROCESSORS_CONF: unknown variable

Linux alma8.local  bacon ~ 589: (pkgsrc): getconf NPROCESSORS_CONF
getconf: Unrecognized variable `NPROCESSORS_CONF'
Linux alma8.local  bacon ~ 589: (pkgsrc): getconf _NPROCESSORS_CONF
2

FreeBSD coral.acadix  bacon ~ 1004: getconf NPROCESSORS_CONF
4
FreeBSD coral.acadix  bacon ~ 1005: getconf _NPROCESSORS_CONF
4

>How-To-Repeat:
NetBSD netbsd10.local  bacon ~ 12: getconf NPROCESSORS_CONF
2
NetBSD netbsd10.local  bacon ~ 13: getconf _NPROCESSORS_CONF
getconf: _NPROCESSORS_CONF: unknown variable

>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57875 CVS commit: src/usr.bin/getconf
Date: Sat, 27 Jan 2024 11:04:36 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Sat Jan 27 16:04:36 UTC 2024

 Modified Files:
 	src/usr.bin/getconf: getconf.c

 Log Message:
 PR/57875: Jason Bacon: Try again without an _ for portability.


 To generate a diff of this commit:
 cvs rdiff -u -r1.36 -r1.37 src/usr.bin/getconf/getconf.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: jkoshy@NetBSD.org
State-Changed-When: Sat, 17 Feb 2024 19:03:14 +0000
State-Changed-Why:
Fixed in r1.37 of src/usr.bin/getconf/getconf.c.


From: "Joseph Koshy" <jkoshy@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57875 CVS commit: src/usr.bin/getconf
Date: Sun, 18 Feb 2024 19:35:38 +0000

 Module Name:	src
 Committed By:	jkoshy
 Date:		Sun Feb 18 19:35:38 UTC 2024

 Modified Files:
 	src/usr.bin/getconf: getconf.1

 Log Message:
 getconf.1: Note that leading underscores in configuration
 variable names are ignored by getconf(1).

 While here, add a section with examples, and make the synopsis
 more concise.

 PR bin/57875


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.14 src/usr.bin/getconf/getconf.1

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->needs-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Fri, 01 Mar 2024 13:59:25 +0000
State-Changed-Why:
fix committed, looks reasonable, needs pullups
pullup-10, pullup-9, pullup-8


State-Changed-From-To: needs-pullups->pending-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Fri, 01 Mar 2024 15:15:58 +0000
State-Changed-Why:
pullup-10 #617
pullup-9 #1811
pullup-8 #1943


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57875 CVS commit: [netbsd-10] src/usr.bin/getconf
Date: Sun, 10 Mar 2024 19:03:30 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Mar 10 19:03:30 UTC 2024

 Modified Files:
 	src/usr.bin/getconf [netbsd-10]: getconf.1 getconf.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #617):

 	usr.bin/getconf/getconf.c: revision 1.37
 	usr.bin/getconf/getconf.1: revision 1.14

 PR/57875: Jason Bacon: Try again without an _ for portability.
 getconf.1: Note that leading underscores in configuration
 variable names are ignored by getconf(1).

 While here, add a section with examples, and make the synopsis
 more concise.

 PR bin/57875


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.13.34.1 src/usr.bin/getconf/getconf.1
 cvs rdiff -u -r1.35 -r1.35.36.1 src/usr.bin/getconf/getconf.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57875 CVS commit: [netbsd-9] src/usr.bin/getconf
Date: Sun, 10 Mar 2024 19:04:39 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Mar 10 19:04:39 UTC 2024

 Modified Files:
 	src/usr.bin/getconf [netbsd-9]: getconf.1 getconf.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1811):

 	usr.bin/getconf/getconf.c: revision 1.37
 	usr.bin/getconf/getconf.1: revision 1.14

 PR/57875: Jason Bacon: Try again without an _ for portability.
 getconf.1: Note that leading underscores in configuration
 variable names are ignored by getconf(1).

 While here, add a section with examples, and make the synopsis
 more concise.

 PR bin/57875


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.13.26.1 src/usr.bin/getconf/getconf.1
 cvs rdiff -u -r1.35 -r1.35.28.1 src/usr.bin/getconf/getconf.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57875 CVS commit: [netbsd-8] src/usr.bin/getconf
Date: Sun, 10 Mar 2024 19:05:46 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Mar 10 19:05:46 UTC 2024

 Modified Files:
 	src/usr.bin/getconf [netbsd-8]: getconf.1 getconf.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1943):

 	usr.bin/getconf/getconf.c: revision 1.37
 	usr.bin/getconf/getconf.1: revision 1.14

 PR/57875: Jason Bacon: Try again without an _ for portability.
 getconf.1: Note that leading underscores in configuration
 variable names are ignored by getconf(1).

 While here, add a section with examples, and make the synopsis
 more concise.

 PR bin/57875


 To generate a diff of this commit:
 cvs rdiff -u -r1.13 -r1.13.16.1 src/usr.bin/getconf/getconf.1
 cvs rdiff -u -r1.35 -r1.35.18.1 src/usr.bin/getconf/getconf.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Mon, 11 Mar 2024 22:22:21 +0000
State-Changed-Why:
fixed and pulled up


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.