NetBSD Problem Report #55168
From tsutsui@ceres.dti.ne.jp Sun Apr 12 15:13:46 2020
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-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 2983B1A9213
for <gnats-bugs@gnats.NetBSD.org>; Sun, 12 Apr 2020 15:13:46 +0000 (UTC)
Message-Id: <202004121513.03CFDadq007062@ceres.dti.ne.jp>
Date: Mon, 13 Apr 2020 00:13:36 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@NetBSD.org
Subject: 2020Q1 textproc/source-highlight check-portability failures
X-Send-Pr-Version: 3.95
>Number: 55168
>Category: pkg
>Synopsis: 2020Q1 textproc/source-highlight check-portability failures
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Apr 12 15:15:00 +0000 2020
>Closed-Date: Tue Oct 13 02:48:16 +0000 2020
>Last-Modified: Tue Oct 13 02:48:16 +0000 2020
>Originator: Izumi Tsutsui
>Release: NetBSD 9.0 + pkgsrc-2020Q1
>Organization:
>Environment:
System: NetBSD optiplex 9.0 NetBSD 9.0 (GENERIC) #0: Fri Feb 14 00:06:28 UTC 2020 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: maybe all
Machine: all
>Description:
pkgsrc-2020Q1 textproc/source-highlight build fails:
---
:
=> Adding run-time search paths to pkg-config files.
=> Checking for portability problems in extracted files
ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] lib/tests/valgrind_test.sh.in:62: if test "$?" == "0"; then
ERROR: [check-portability.awk] lib/tests/valgrind_test.sh.in:72: if test "$?" == "0"; then
ERROR: [check-portability.awk] lib/tests/valgrind_test.sh.in:81: if test "x${tmp_err}" == "x"; then
Explanation:
===========================================================================
The "test" command, as well as the "[" command, are not required to know
the "==" operator. Only a few implementations like bash and some
versions of ksh support it.
When you run "test foo == foo" on a platform that does not support the
"==" operator, the result will be "false" instead of "true". This can
lead to unexpected behavior.
There are two ways to fix this error message. If the file that contains
the "test ==" is needed for building the package, you should create a
patch for it, replacing the "==" operator with "=". If the file is not
needed, add its name to the CHECK_PORTABILITY_SKIP variable in the
package Makefile.
===========================================================================
ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] tests/valgrind_suppressions.sh.in:58: if test "$?" == "0"; then
ERROR: [check-portability.awk] tests/valgrind_suppressions.sh.in:68: if test "$?" == "0"; then
ERROR: [check-portability.awk] tests/valgrind_suppressions.sh.in:77: if test "x${tmp_err}" == "x"; then
Explanation:
===========================================================================
The "test" command, as well as the "[" command, are not required to know
the "==" operator. Only a few implementations like bash and some
versions of ksh support it.
When you run "test foo == foo" on a platform that does not support the
"==" operator, the result will be "false" instead of "true". This can
lead to unexpected behavior.
There are two ways to fix this error message. If the file that contains
the "test ==" is needed for building the package, you should create a
patch for it, replacing the "==" operator with "=". If the file is not
needed, add its name to the CHECK_PORTABILITY_SKIP variable in the
package Makefile.
===========================================================================
ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] tests/valgrind_tests.sh.in:55: if test "$?" == "0"; then
ERROR: [check-portability.awk] tests/valgrind_tests.sh.in:65: if test "$?" == "0"; then
ERROR: [check-portability.awk] tests/valgrind_tests.sh.in:74: if test "x${tmp_err}" == "x"; then
Explanation:
===========================================================================
The "test" command, as well as the "[" command, are not required to know
the "==" operator. Only a few implementations like bash and some
versions of ksh support it.
When you run "test foo == foo" on a platform that does not support the
"==" operator, the result will be "false" instead of "true". This can
lead to unexpected behavior.
There are two ways to fix this error message. If the file that contains
the "test ==" is needed for building the package, you should create a
patch for it, replacing the "==" operator with "=". If the file is not
needed, add its name to the CHECK_PORTABILITY_SKIP variable in the
package Makefile.
===========================================================================
ERROR: [check-portability.awk] => Found test ... == ...:
ERROR: [check-portability.awk] tests/valgrind_test.sh.in:62: if test "$?" == "0"; then
ERROR: [check-portability.awk] tests/valgrind_test.sh.in:72: if test "$?" == "0"; then
ERROR: [check-portability.awk] tests/valgrind_test.sh.in:81: if test "x${tmp_err}" == "x"; then
Explanation:
===========================================================================
The "test" command, as well as the "[" command, are not required to know
the "==" operator. Only a few implementations like bash and some
versions of ksh support it.
When you run "test foo == foo" on a platform that does not support the
"==" operator, the result will be "false" instead of "true". This can
lead to unexpected behavior.
There are two ways to fix this error message. If the file that contains
the "test ==" is needed for building the package, you should create a
patch for it, replacing the "==" operator with "=". If the file is not
needed, add its name to the CHECK_PORTABILITY_SKIP variable in the
package Makefile.
===========================================================================
*** Error code 1
Stop.
make[3]: stopped in /usr/pkgsrc/textproc/source-highlight
*** Error code 1
---
>How-To-Repeat:
"make package" in pkgsrc/textproc/source-highlight as above.
>Fix:
Fix all usage of '=='?
(Some of them are not caught by check-portability.awk ?)
---
% grep -R 'if.*test.*==' .
./lib/tests/valgrind_test.sh.in: if test ! -x "$1" -o "$1" == `basename $0`; then
./lib/tests/valgrind_test.sh.in: if test "$?" == "0"; then
./lib/tests/valgrind_test.sh.in: if test "$?" == "0"; then
./lib/tests/valgrind_test.sh.in: if test "x${tmp_err}" == "x"; then
./tests/valgrind_suppressions.sh.in: if test ! -x "$1" -o "$1" == `basename $0`; then
./tests/valgrind_suppressions.sh.in: if test "$?" == "0"; then
./tests/valgrind_suppressions.sh.in: if test "$?" == "0"; then
./tests/valgrind_suppressions.sh.in: if test "x${tmp_err}" == "x"; then
./tests/valgrind_tests.sh.in: if test ! -x "$1" -o "$1" == `basename $0`; then
./tests/valgrind_tests.sh.in: if test "$?" == "0"; then
./tests/valgrind_tests.sh.in: if test "$?" == "0"; then
./tests/valgrind_tests.sh.in: if test "x${tmp_err}" == "x"; then
./tests/valgrind_test.sh.in: if test ! -x "$1" -o "$1" == `basename $0`; then
./tests/valgrind_test.sh.in: if test "$?" == "0"; then
./tests/valgrind_test.sh.in: if test "$?" == "0"; then
./tests/valgrind_test.sh.in: if test "x${tmp_err}" == "x"; then
% grep -R 'if.* \[.*==.*\]' .
./completion/source-highlight: if [[ "${cur}" == -* || ${COMP_CWORD} -eq 1 ]] ; then
./lib/tests/valgrind_test.sh.in: if [[ $1 == *.sh ]]; then
./tests/valgrind_suppressions.sh.in: if [[ $1 == *.sh ]]; then
./tests/valgrind_tests.sh.in: if [[ $1 == *.sh ]]; then
./tests/valgrind_test.sh.in: if [[ $1 == *.sh ]]; then
%
---
Izumi Tsutsui
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Tue, 13 Oct 2020 02:48:16 +0000
State-Changed-Why:
joerg fixed this,
1.61 (joerg 18-Apr-20): # bash scripts
1.61 (joerg 18-Apr-20): CHECK_PORTABILITY_SKIP+= \
1.61 (joerg 18-Apr-20): lib/tests/valgrind_test.sh.in \
1.61 (joerg 18-Apr-20): tests/valgrind_suppressions.sh.in \
1.61 (joerg 18-Apr-20): tests/valgrind_test.sh.in \
1.61 (joerg 18-Apr-20): tests/valgrind_tests.sh.in
Thanks for the report.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.