NetBSD Problem Report #60388
From www@netbsd.org Tue Jun 30 01:50:00 2026
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)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "R13" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D94B91A923A
for <gnats-bugs@gnats.NetBSD.org>; Tue, 30 Jun 2026 01:49:59 +0000 (UTC)
Message-Id: <20260630014958.B4A4D1A923B@mollari.NetBSD.org>
Date: Tue, 30 Jun 2026 01:49:58 +0000 (UTC)
From: andrew.cagney@gmail.com
Reply-To: andrew.cagney@gmail.com
To: gnats-bugs@NetBSD.org
Subject: xmlto uses `type -p cygpath`, is that a bashism
X-Send-Pr-Version: www-1.0
X-From4GNATS: "andrew.cagney@gmail.com via gnats" <gnats-admin@NetBSD.org>
>Number: 60388
>Category: pkg
>Synopsis: xmlto uses `type -p cygpath`, is that a bashism
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: gutteridge
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 30 01:50:00 +0000 2026
>Closed-Date: Wed Jul 01 03:59:26 +0000 2026
>Last-Modified: Wed Jul 01 03:59:26 +0000 2026
>Originator: cagney
>Release: 10.1
>Organization:
libreswan
>Environment:
NetBSD thomasina 10.0_RC5 NetBSD 10.0_RC5 (GENERIC64)
>Description:
xmlto contains
```
-o)
OUTPUT_DIR="$2"
if type -p cygpath >/dev/null; then
OUTPUT_DIR=$(cygpath "$OUTPUT_DIR")
fi
```
leading to:
```
xmlto --searchpath /home/cagney/pkgsrc/wip/libreswan/work/libreswan-5.3.1/programs/showhostkey:/home/cagney/pkgsrc/wip/libreswan/work/libreswan-5.3.1/mk man ipsec-showhostkey.8.xml -o ../../OBJ.netbsd.evbarm/programs/showhostkey
type: usage: type name...
Note: Writing ipsec-showhostkey.8
```
>How-To-Repeat:
>Fix:
I'm not clear if this is a bashism or a shell deficiency.
>Release-Note:
>Audit-Trail:
From: "David H. Gutteridge" <david@gutteridge.ca>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/60388: xmlto uses `type -p cygpath`, is that a bashism
Date: Mon, 29 Jun 2026 23:35:11 -0400
The short answer would be "type -p" isn't universally supported by
modern Unix shells. It was removed from NetBSD's sh prior to the
9.0 release. "command -v" should probably be used here instead.
(If interested in more detail about this, please see:
https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=3D54803
)
I can look at tweaking xmlto in pkgsrc, if it helps.
Regards,
Dave
From: Andrew Cagney <andrew.cagney@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org
Subject: Re: pkg/60388: xmlto uses `type -p cygpath`, is that a bashism
Date: Tue, 30 Jun 2026 09:27:07 -0400
> I can look at tweaking xmlto in pkgsrc, if it helps.
Yes please. It would eliminate the confusing error message (while the
command fails, the script still manages to stumble down the correct
path).
From: "David H. Gutteridge" <gutteridge@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60388 CVS commit: pkgsrc/textproc/xmlto
Date: Wed, 1 Jul 2026 03:50:37 +0000
Module Name: pkgsrc
Committed By: gutteridge
Date: Wed Jul 1 03:50:37 UTC 2026
Modified Files:
pkgsrc/textproc/xmlto: Makefile distinfo
pkgsrc/textproc/xmlto/patches: patch-xmlto_in
Log Message:
xmlto: apply two shell-related tweaks
First, make shell code used in the "-o" option parsing more portable.
"type -p" hasn't been supported by NetBSD's sh since 8.0 (and also
isn't universally supported elsewhere by other shells). This addresses
PR pkg/60388 from Andrew Cagney. (Really here we're suppressing a
warning rather than a failure, one that happens to show up in build
logs.)
(We could substitute "command -v" instead (recommended over bare "type"
by a NetBSD shell guru), but since both the existing upstream code and
a bunch of our patches are already using "type" in many places, I kept
it consistent here.)
Next, Makefile r. 1.32 removed bash as a runtime dependency, but didn't
account for REPLACE_BASH still being defined, which results in a broken
(though effectively harmless) substitution to "#!". (Here perhaps the
pkgsrc replacement mechanism could be improved so it generates an error
when the replacement path is empty.) This is only relevant for the test
target.
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 pkgsrc/textproc/xmlto/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/textproc/xmlto/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/textproc/xmlto/patches/patch-xmlto_in
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Responsible-Changed-From-To: pkg-manager->gutteridge
Responsible-Changed-By: gutteridge@NetBSD.org
Responsible-Changed-When: Wed, 01 Jul 2026 03:55:39 +0000
Responsible-Changed-Why:
Take this PR.
State-Changed-From-To: open->closed
State-Changed-By: gutteridge@NetBSD.org
State-Changed-When: Wed, 01 Jul 2026 03:59:26 +0000
State-Changed-Why:
Should be fixed now.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.