boxes 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/boxes/version.rb +1 -1
- data/scripts/chef.sh +32 -17
- data/scripts/puppet.sh +3 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52086e8025e436389b24a3277ade1e64078120c0
|
4
|
+
data.tar.gz: 0bca9ac72bc3a4d5a27837d55384233533395d83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc189c6e439afc17c59348315a88854c74e1ec22a009a16194a9c0916e230d635e2bd5f5e4a7b7bf77f7705a8c8650b6fb95898653677b8a9a1e461712027980
|
7
|
+
data.tar.gz: edaf1b9d08f12f9fc063fc9c2379b115fcd4b6b2f9edabeef45ed449986a094f5e79c00882ddcdc4e89e213ecabd6caf171bcb1358639f91ae7e54b82a315497
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 3.1.0 (08/04/2018)
|
4
|
+
|
5
|
+
* Switch to use the Boxes Metadata API for Chef ([52]).
|
6
|
+
* Fix Puppet deb installation ([51])
|
7
|
+
|
8
|
+
[51]: https://github.com/nickcharlton/boxes/pull/51
|
9
|
+
[52]: https://github.com/nickcharlton/boxes/pull/52
|
10
|
+
|
3
11
|
## 3.0.0 (05/02/2018)
|
4
12
|
|
5
13
|
* Update scripts/ruby.sh to follow ruby-lang.org current Rubies ([48]).
|
data/lib/boxes/version.rb
CHANGED
data/scripts/chef.sh
CHANGED
@@ -1,28 +1,43 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
#
|
3
|
+
# Fetches the Chef package version and sha from the Boxes API, then installs
|
4
|
+
# the package.
|
5
|
+
|
6
|
+
set -e
|
7
|
+
|
8
|
+
boxes_api="https://boxes.io/api/v1"
|
4
9
|
platform=$(lsb_release -si | tr '[:upper:]' '[:lower:]')
|
5
10
|
release=$(lsb_release -sr)
|
6
|
-
version_url="https://www.opscode.com/chef/metadata?v=&prerelease=false&nightlies=false&p=$platform&pv=$release&m=x86_64"
|
7
|
-
current_version=$(curl -s "$version_url")
|
8
11
|
|
9
|
-
|
10
|
-
|
12
|
+
if [ "$platform" == "debian" ]; then
|
13
|
+
release=$(echo "$release" | cut -d. -f1)
|
14
|
+
fi
|
15
|
+
|
16
|
+
version_url="$boxes_api/metadata/chef?platform=$platform&platform_version=$release"
|
17
|
+
|
18
|
+
echo "Determining current Chef package version..."
|
19
|
+
if ! current_version=$(curl --silent --fail "${version_url}"); then
|
20
|
+
>&2 echo "Unable to fetch version information for $platform, $release"
|
21
|
+
exit 1
|
22
|
+
fi
|
23
|
+
|
24
|
+
version_url=$(echo "$current_version" | python -c \
|
25
|
+
"import json,sys;obj=json.load(sys.stdin);print obj['url'];")
|
26
|
+
version_sha=$(echo "$current_version" | python -c \
|
27
|
+
"import json,sys;obj=json.load(sys.stdin);print obj['sha256'];")
|
11
28
|
|
12
|
-
|
13
|
-
curl --
|
29
|
+
echo "Fetching Chef package..."
|
30
|
+
curl --silent --fail "$version_url" -o chef.deb
|
14
31
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
exit 1
|
32
|
+
echo "Verifying downloaded Chef package..."
|
33
|
+
downloaded_sha=$(openssl sha256 -r chef.deb)
|
34
|
+
if [ "$version_sha *chef.deb" != "$downloaded_sha" ]; then
|
35
|
+
>&2 echo "Unable to verify downloaded chef.deb"
|
36
|
+
echo 2
|
21
37
|
fi
|
22
38
|
|
23
|
-
|
24
|
-
dpkg
|
39
|
+
echo "Installing Chef package..."
|
40
|
+
dpkg --install chef.deb
|
25
41
|
|
26
|
-
|
42
|
+
echo "Tidying up artifacts..."
|
27
43
|
rm chef.deb
|
28
|
-
rm /tmp/chef-checksum
|
data/scripts/puppet.sh
CHANGED
@@ -1,14 +1,11 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
# see:
|
3
|
+
# see: https://docs.puppet.com/puppet/latest/puppet_platform.html
|
4
4
|
|
5
5
|
# determine the os release
|
6
6
|
os_release=$(lsb_release -cs)
|
7
7
|
|
8
8
|
# configure the puppet package sources
|
9
|
-
wget
|
10
|
-
dpkg -i
|
9
|
+
wget "https://apt.puppet.com/puppet5-release-$os_release.deb"
|
10
|
+
dpkg -i "puppet5-release-$os_release.deb"
|
11
11
|
apt-get -q update
|
12
|
-
|
13
|
-
# install puppet
|
14
|
-
apt-get install -qy puppet
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boxes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Charlton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|