NetBSD Problem Report #42238
From leo@mnet-online.de Tue Oct 27 14:21:16 2009
Return-Path: <leo@mnet-online.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 08C0363B902
for <gnats-bugs@gnats.NetBSD.org>; Tue, 27 Oct 2009 14:21:16 +0000 (UTC)
Message-Id: <20091027142110.804C719A40@zork.local>
Date: Tue, 27 Oct 2009 15:21:09 +0100 (CET)
From: leo@mnet-online.de
Reply-To: leo@marco.de
To: gnats-bugs@gnats.NetBSD.org
Subject: security/mozilla-rootcerts does not work with nawk
X-Send-Pr-Version: 3.95
>Number: 42238
>Category: pkg
>Synopsis: security/mozilla-rootcerts does not work with nawk
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 27 14:25:00 +0000 2009
>Closed-Date: Tue Nov 03 02:44:10 +0000 2009
>Last-Modified: Tue Nov 03 02:45:00 +0000 2009
>Originator: leo@marco.de
>Release: NetBSD 5.0_STABLE
>Organization:
Matthias Pfaller Software Entwicklung
marco Systemanalyse und Entwicklung GmbH Tel +49 8131 5161 41
Hans-Böckler-Str. 2, D 85221 Dachau Fax +49 8131 5161 66
http://www.marco.de/ Email leo@marco.de
>Environment:
System: NetBSD zork 5.0_STABLE NetBSD 5.0_STABLE (ZORK) #15: Wed Sep 30 09:10:09 CEST 2009 leo@slug:/usr/src-5.0/sys/arch/i386/compile/ZORK i386
Architecture: i386
Machine: i386
>Description:
pkgsrc/security/mozilla-rootcerts does not work for me on
netbsd-5.0. It looks like awk does not like printing strings with
embedded \0.
>How-To-Repeat:
install pkgsrc/security/mozilla-rootcerts. Do a
"mozilla-rootcerts extract" and watch it fail.
>Fix:
Apply the following patch.
--- mozilla-rootcerts.sh 2007-09-20 22:02:53.000000000 +0200
+++ /tmp/xxx/mozilla-rootcerts 2009-10-27 15:05:47.000000000 +0100
@@ -126,13 +126,6 @@
# "mozilla-rootcert-<n>.pem" in the current working directory.
#
cat "$certfile" | ${AWK} -v OPENSSL=${OPENSSL} '
- function join(array, start, end, separator, result, i) {
- result = array[start]
- for (i = start + 1; i <= end; i++)
- result = result separator array[i]
- return result
- }
-
function base8to10(o, octal, decimal, power, i, n) {
decimal = 0
n = split(o, octal, "")
@@ -149,7 +142,6 @@
BEGIN {
filenum = 0
while (getline) {
- D = 0
if ($0 !~ /^CKA_VALUE MULTILINE_OCTAL/) continue
filename = "mozilla-rootcert-" filenum ".pem"
@@ -160,10 +152,9 @@
if ($0 ~ /^END/) break
n = split($0, line, "\\")
for (i = 2; i <= n; i++) {
- der[D++] = sprintf("%c", base8to10(line[i]))
+ printf("%c", base8to10(line[i])) | cmd
}
}
- printf("%s", join(der, 0, D, "")) | cmd
close(cmd)
}
}'
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 03 Nov 2009 02:44:10 +0000
State-Changed-Why:
Committed, thanks!
From: Thomas Klausner <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42238 CVS commit: pkgsrc/security/mozilla-rootcerts
Date: Tue, 3 Nov 2009 02:43:56 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Tue Nov 3 02:43:56 UTC 2009
Modified Files:
pkgsrc/security/mozilla-rootcerts: Makefile distinfo
pkgsrc/security/mozilla-rootcerts/files: mozilla-rootcerts.sh
Log Message:
Simplify awk usage to make it work with nawk, from Matthias Pfaller in
PR 42238.
While here, update to latest certificates from mozilla.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/security/mozilla-rootcerts/Makefile
cvs rdiff -u -r1.1.1.1 -r1.2 pkgsrc/security/mozilla-rootcerts/distinfo
cvs rdiff -u -r1.1.1.1 -r1.2 \
pkgsrc/security/mozilla-rootcerts/files/mozilla-rootcerts.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>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.