Repository navigation
Closed
Description
When I run the official instructions for installing pkgsrc for SmartOS global zone environments, I get verification errors:
bootstrap.sh, copied from the https://pkgsrc.joyent.com/install-on-illumos/ website:
#!/bin/sh
BOOTSTRAP_TAR="bootstrap-2017Q4-tools.tar.gz"
BOOTSTRAP_SHA="840bcdff718bdf1f7d3ac10017af83a23d25f4c3"
# Download the bootstrap kit to the current directory. Note that we currently
# pass "-k" to skip SSL certificate checks as the GZ doesn't install them.
curl -kO https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}
# Verify the SHA1 checksum.
[ "${BOOTSTRAP_SHA}" = "$(/bin/digest -a sha1 ${BOOTSTRAP_TAR})" ] || echo "ERROR: checksum failure"
# Verify PGP signature. This step is optional, and requires gpg.
curl -kO https://pkgsrc.joyent.com/packages/SmartOS/bootstrap/${BOOTSTRAP_TAR}.asc
curl -sS https://pkgsrc.joyent.com/pgp/DE817B8E.asc | gpg --import
gpg --verify ${BOOTSTRAP_TAR}{.asc,}
# Install bootstrap kit to /opt/tools
tar -zxpf ${BOOTSTRAP_TAR} -C /
# Add to PATH/MANPATH.
PATH=/opt/tools/sbin:/opt/tools/bin:$PATH
MANPATH=/opt/tools/man:$MANPATH
Trace:
$ echo ".\nvagrant\n" | /usr/lib/embedded_su root -c 'sh bootstrap.sh'
CONV 1
PAM_PROMPT_ECHO_OFF
Password:
.
SUCCESS
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 50.1M 0 111k 0 0 232k 0 0:03:40 --:--:-- 0:03:40 325k
2 50.1M 2 1151k 0 0 768k 0 0:01:06 0:00:01 0:01:05 846k
9 50.1M 9 4623k 0 0 1872k 0 0:00:27 0:00:02 0:00:25 1983k
17 50.1M 17 9071k 0 0 2613k 0 0:00:19 0:00:03 0:00:16 2720k
25 50.1M 25 12.5M 0 0 2872k 0 0:00:17 0:00:04 0:00:13 2963k
34 50.1M 34 17.1M 0 0 3216k 0 0:00:15 0:00:05 0:00:10 3503k
43 50.1M 43 21.7M 0 0 3443k 0 0:00:14 0:00:06 0:00:08 4248k
52 50.1M 52 26.4M 0 0 3625k 0 0:00:14 0:00:07 0:00:07 4491k
62 50.1M 62 31.1M 0 0 3761k 0 0:00:13 0:00:08 0:00:05 4558k
71 50.1M 71 35.7M 0 0 3862k 0 0:00:13 0:00:09 0:00:04 4755k
80 50.1M 80 40.4M 0 0 3952k 0 0:00:12 0:00:10 0:00:02 4758k
90 50.1M 90 45.1M 0 0 4031k 0 0:00:12 0:00:11 0:00:01 4793k
99 50.1M 99 50.0M 0 0 4108k 0 0:00:12 0:00:12 --:--:-- 4829k
100 50.1M 100 50.1M 0 0 4109k 0 0:00:12 0:00:12 --:--:-- 4845k
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: directory `/opt/home/vagrant/.gnupg' created
gpg: can't open `/usr/share/gnupg/options.skel': No such file or directory
gpg: keyring `/opt/home/vagrant/.gnupg/secring.gpg' created
gpg: keyring `/opt/home/vagrant/.gnupg/pubring.gpg' created
curl: (77) error setting certificate verify locations:
CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: WARNING: using insecure memory!
gpg: please see http://www.gnupg.org/faq.html for more information
gpg: Signature made January 4, 2018 at 10:40:59 AM UTC using RSA key ID DE817B8E
gpg: Can't check signature: public key not foundLooks like the GPG keys aren't importing correctly?
I'm working around these errors by dropping the GPG check and relying on the SHA1 checksum, though it's disheartening to see the official instructions fail for some reason.
I'm using SmartOS 20180203T031130Z inside Vagrant 2.0.1 inside VirtualBox 5.2.6r120293 inside macOS High Sierra 10.13.
Metadata
Metadata
Assignees
Labels
No labels
Activity
jperkin commentedon Mar 1, 2018
This is somewhat expected, and why the GPG check is marked as optional. The GPG shipped in the SmartOS GZ is basically unusable as it is so old, and is only kept for historical reasons. It's also complicated by the fact the GZ does not ship SSL certificates (TritonDataCenter/smartos-live#450).
I'll add a comment explaining that this is unlikely to work in the SmartOS global zone.
jperkin commentedon Mar 1, 2018
Actually, in verifying this I think I see the problem - if you change the curl args when fetching the GPG key to use
-ksSinstead of-sSdoes it work?www/ruby-jekyll-minima: update to 2.4.0
textproc/ruby-classifier-reborn: update to 2.2.0
mcandre commentedon Apr 19, 2018
... if we're going to download GPG keys without proper SSL, then we should at the very least publish an official cryptographically secure checksum (e.g. MD5, SHA256+) for the keys, and have the install commands vet the checksums before proceeding to import the keys.
Update to 2.5.6
liferea: Update www/liferea to 1.12.5a
gdk-pixbuf2*: update to 2.38.1
Update to 2.0.1
Update to 2.0.1
bibletime: Upgrade to 2.11.2
lang/pear: update to 1.10.10
Update unbound to version 1.9.6
124 remaining items
py-uv-dynamic-versioning: update to 0.14.0.
security/flawz: update to 0.4.1
ocaml-zarith: update to 1.14
net/ttl: update to 0.21.0
py-annotated-types: update to 0.8.0.
Update to 0.41
misc/rozi: update to 0.0.28
misc/rozi: update to 0.0.28
Update to 1.31
textproc/treemd: update to 0.10.0
misc/rozi: update to 0.0.28
Update to 1.31
textproc/treemd: update to 0.10.0
security/ruby-net-scp: update to 4.2.1
asn1c: Update to version 0.9.29