Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Feb 2016 10:10:51 -0800
From:      Peter Wemm <peter@wemm.org>
To:        svn-src-head@freebsd.org
Cc:        Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= <des@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org
Subject:   Re: svn commit: r292206 - in head/contrib/unbound: . compat daemon dns64 dnstap doc iterator libunbound libunbound/python libunbound/python/doc libunbound/python/doc/modules libunbound/python/examples ...
Message-ID:  <2289655.bjqHNzHbLI@overcee.wemm.org>
In-Reply-To: <201512141301.tBED1pnR087993@repo.freebsd.org>
References:  <201512141301.tBED1pnR087993@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Monday, December 14, 2015 01:01:51 PM Dag-Erling Smørgrav wrote:
> Author: des
> Date: Mon Dec 14 13:01:51 2015
> New Revision: 292206
> URL: https://svnweb.freebsd.org/changeset/base/292206
> 
> Log:
>   Upgrade to Unbound 1.5.7.
> 
> Added:
>   head/contrib/unbound/.gitignore
>      - copied unchanged from r292133, vendor/unbound/dist/.gitignore
>   head/contrib/unbound/compat/isblank.c
>      - copied unchanged from r292133, vendor/unbound/dist/compat/isblank.c
> Modified:
>   head/contrib/unbound/Makefile.in

An error was introduced here that breaks some of the support scripts:

@@ -107,16 +107,15 @@
 fi
 
 # create self-signed cert for server
-cat >request.cfg <<EOF
-[req]
-default_bits=$BITS
-default_md=$HASH
-prompt=no
-distinguished_name=req_distinguished_name
+echo "[req]\n" > request.cfg
+echo "default_bits=$BITS\n" >> request.cfg
+echo "default_md=$HASH\n" >> request.cfg
+echo "prompt=no\n" >> request.cfg
+echo "distinguished_name=req_distinguished_name\n" >> request.cfg
+echo "\n" >> request.cfg
+echo "[req_distinguished_name]\n" >> request.cfg
+echo "commonName=$SERVERNAME\n" >> request.cfg
 
-[req_distinguished_name]
-commonName=$SERVERNAME
-EOF
 test -f request.cfg || error "could not create request.cfg"
 
 echo "create $SVR_BASE.pem (self signed certificate)"
@@ -125,16 +124,15 @@
 openssl x509 -in $SVR_BASE.pem -addtrust serverAuth -out 
$SVR_BASE"_trust.pem"
 
 # create client request and sign it, piped
-cat >request.cfg <<EOF
-[req]
-default_bits=$BITS
-default_md=$HASH
-prompt=no
-distinguished_name=req_distinguished_name
+echo "[req]\n" > request.cfg
+echo "default_bits=$BITS\n" >> request.cfg
+echo "default_md=$HASH\n" >> request.cfg
+echo "prompt=no\n" >> request.cfg
+echo "distinguished_name=req_distinguished_name\n" >> request.cfg
+echo "\n" >> request.cfg
+echo "[req_distinguished_name]\n" >> request.cfg
+echo "commonName=$CLIENTNAME" >> request.cfg
 
-[req_distinguished_name]
-commonName=$CLIENTNAME
-EOF
 test -f request.cfg || error "could not create request.cfg"
 
 echo "create $CTL_BASE.pem (signed client certificate)"

Whoever wrote this seems to have confused "echo" with "printf".  All the 
trailing "\n" lines cause an openssl error.  In the cluster build I had to 
remove the "\n" and that was sufficient to bootstrap new instances again.

I suspect this error is harmless on bash.  Unfortunately our environment 
cares.

-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAABCAAGBQJWskKrAAoJEDXWlwnsgJ4ESaQH/iRPiV8qr1kFmEBx3Ys3dnAD
UCZ8vDg9piEW6ZRTyVBQ3BmkY5cNBZznRsI9G+TQdzcLFwX3yUCGGOyuWBp1NN9I
jrAfJK6S3evyl9VYctnQL+lS6cSrXF3y+VdmNaObP2fcLsdSn/5TsZEQpHlACWGw
5J94KEM07Bcdd+oIScRxsRB9OO5T+8btCloqguT2ZfLMf0ltmjhM0Zn/Bwa32mLx
/ltA3yme0nckBLNor9ft3sb2EYe4hQ95DcqocpcSSwQfp0uw5RCvrTBTs24CUos2
vygfRjs1J9OvME4bGtoWTcNj/AGokWQxeD1Fh10yLaCxz/gH+viNvsDQEeJKDmQ=
=L5bg
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2289655.bjqHNzHbLI>