113 Commits

Author SHA1 Message Date
1da5ef4979 Merge branch 'master' into new_ldap_server 2022-04-28 09:23:18 +02:00
71f9b06d28 Tor improvements for bitcoin cookbook 2022-04-19 14:08:02 +02:00
a633834a1b Change rate limit for LndHub API 2022-04-18 10:42:47 +02:00
ae342106c9 Merge pull request 'Upgrade Gitea to 1.16.5' (#400) from chore/upgrade_gitea into master
Reviewed-on: #400
2022-04-11 10:52:34 +00:00
994e5873d6 Upgrade Gitea to 1.16.5
Also add our hack-fix cron job to the recipe, so it doesn't get lost
when creating new VMs or otherwise.
2022-04-11 12:50:44 +02:00
8f4d11b317 Add cron job for deleting repo archives 2022-04-11 12:31:00 +02:00
5617591e1c Merge pull request 'Rebuild broken VMs, fix small issues in various cookbooks' (#399) from sheesh into master
Reviewed-on: #399
2022-04-03 13:47:08 +00:00
f758c74b5f Rebuild broken VMs on fornax 2022-03-22 16:25:50 -06:00
bb8467b6ab Switch Discourse deploy branch from master to main 2022-03-22 16:24:40 -06:00
ac1414e24e Open alternative SSH port on KVM hosts 2022-03-22 16:24:14 -06:00
eabb6ab404 Switch more cookbooks from kosmos-redis to redisio
refs #349
2022-03-22 16:23:26 -06:00
71dda86d94 Remove obsolete license header 2022-03-22 16:21:29 -06:00
b6bd8ee6cd Upgrade Sockethub to latest alpha 2022-03-18 11:47:51 -06:00
d5268167b5 Upgrade node.js from 12 to 14 everywhere 2022-03-18 11:47:23 -06:00
8e28d39acd Remove superfluous license header 2022-03-18 11:47:04 -06:00
e3d0f8f83f Merge pull request 'Move static sites from centaurus to fornax' (#398) from chore/move_static_sites into master
Reviewed-on: #398
2022-03-17 21:13:24 +00:00
f17dd53f69 Include Stream configs in Nginx config if missing 2022-03-17 14:28:13 -06:00
4cd0149f76 Move static sites from centaurus to fornax/LB 2022-03-17 14:27:50 -06:00
5e38edb57e Merge pull request 'Move Gitea and Drone CI to new VMs' (#396) from chore/move_gitea_and_drone into master
Reviewed-on: #396
2022-03-17 19:38:04 +00:00
9c34e82484 Remove obsolete hosts entries for Gitea and Drone
They should use normal DNS
2022-03-17 13:02:56 -06:00
e1560ba12a Fix copypasta 2022-03-12 15:40:22 -06:00
0a953070fe Create nginx_proxy role
Used to configure hosts entries in the Gitea and Drone VMs, as well as
the allowed webhooks config for Gitea.
2022-03-12 15:39:07 -06:00
b270a2c1fd Add database secret for Drone CI
closes #388
2022-03-12 15:05:16 -06:00
9187985acc Move Gitea and Drone to new VMs 2022-03-12 14:47:06 -06:00
f35fb638d1 Adapt Drone recipes for VM setup, use PostgreSQL 2022-03-12 14:46:48 -06:00
a1b07dfb9e Adapt Gitea recipes for new VM setup 2022-03-12 14:46:45 -06:00
23e49134e7 Remove superfluous license headers 2022-03-12 14:42:03 -06:00
c25e3632af Upgrade RTL 2022-03-03 21:42:35 -06:00
b0ff8ec2a4 Merge pull request 'Upgrade RSKj to 3.2.0' (#394) from chore/upgrade_rsk into master
Reviewed-on: #394
2022-03-03 15:29:57 +00:00
13c7774433 Upgrade RSKj to 3.2.0 2022-03-03 09:06:30 -06:00
8d7dacffd5 Merge pull request 'Fix Sockethub being offline due to missing HAProxy and UFW configs' (#392) from bugfix/sockethub_firewall into master
Reviewed-on: #392
2022-03-02 15:57:05 +00:00
5f94c9752d Merge pull request 'Deploy Kosmos LndHub fork with lnurl-pay additions' (#393) from chore/fork_lndhub into master
Reviewed-on: #393
2022-03-02 15:56:44 +00:00
a091e07c72 Deploy Kosmos LndHub fork with lnurl-pay additions 2022-03-02 09:54:01 -06:00
f50e7874ba Remove old sockethub firewall recipe 2022-02-27 16:08:40 -06:00
2e8004b37a Add sockethub::firewall to draco, update node info 2022-02-27 13:10:00 -06:00
b9775a26e4 Rename sockethub firewall recipe
Not just used internally anymore.
2022-02-27 13:09:42 -06:00
1586fd536a Remove superfluous license header 2022-02-27 13:09:17 -06:00
227e4a4665 Update node info 2022-02-26 09:47:31 -06:00
d7c5e40602 Merge pull request 'Deploy new akkounts' (#390) from chore/deploy_akkounts into master
Reviewed-on: #390
2022-02-19 17:53:36 +00:00
e9c5286b24 Deploy new akkounts
Requires a newer version of Ruby.
2022-02-19 11:52:48 -06:00
74083256f4 Update zerotier-2 host 2022-02-18 13:19:42 -06:00
dc5813a8bb Remove old zerotier VM config 2022-02-18 13:18:43 -06:00
203f89fe6b Merge pull request 'Migrate Discourse to new VM on fornax' (#389) from chore/migrate_discourse into master
Reviewed-on: #389
2022-02-18 19:02:49 +00:00
Greg Karékinian
ee6bde5b23 Update discourse-1 node after running Chef 2022-02-18 20:00:18 +01:00
Greg Karékinian
58f2544a9e Remove the discourse role from centaurus 2022-02-18 19:59:17 +01:00
Greg Karékinian
98547088f1 Add the zerotier IP for fornax 2022-02-18 19:58:59 +01:00
Greg Karékinian
7582cafb77 Explicitly install snapd package
It was not installed on fornax for example
2022-02-18 19:42:43 +01:00
Greg Karékinian
31631ddc4a Add missing recipe 2022-02-18 19:39:04 +01:00
5b2ae82ce6 Remove obsolete IP from nginx config 2022-02-18 12:23:37 -06:00
910817a7d4 Create certbot site before normal site 2022-02-18 12:23:14 -06:00
163b12efbc Add firewall rule for Discourse 2022-02-18 12:22:15 -06:00
Greg Karékinian
79f623de4e Prepare fornax and discourse-1 for the discourse migration 2022-02-18 18:15:33 +01:00
Greg Karékinian
e8f46db49c Extract the nginx config for discourse to a recipe
Get the upstream servers automatically from Chef nodes
2022-02-18 18:14:33 +01:00
7a8fb1bc78 Add new Discourse VM 2022-02-17 13:02:10 -06:00
e46c8b3e81 Put Vagrant IP in new VirtualBox default allowed range 2022-02-12 10:58:15 -06:00
3c7cc1a133 Update node status 2022-02-12 10:57:26 -06:00
28659665a0 Merge pull request 'Migrate nodejs-2 from centaurus to nodejs-3 on fornax' (#386) from chore/move_nodejs_vm into master
Reviewed-on: #386
2022-02-12 16:56:25 +00:00
6454c56b70 Merge pull request 'Fix Webhooks for Drone not working in Gitea 1.16' (#387) from bugfix/allow_drone_webhooks into master
Reviewed-on: #387
2022-02-12 16:56:01 +00:00
03c7940f1c Fix Webhooks for Drone not working in Gitea 1.16
By default, only external requests are allowed:

https://github.com/go-gitea/gitea/pull/17482
2022-02-12 10:53:45 -06:00
a710182c39 Add missing user recipe import to botka recipe 2022-02-10 17:00:19 -06:00
18161832ef Deploy new nodejs VM (nodejs-3) 2022-02-10 17:00:10 -06:00
a2f1b7ccc6 Merge pull request 'Deploy new Zerotier Controller VMs' (#385) from chore/move_zerotier into master
Reviewed-on: #385
2022-02-10 21:38:47 +00:00
935eff3b84 Deploy zerotier-3 on DO
Changes the firewall config to allow the control UI to be reached from
all connected networks.
2022-02-10 15:34:28 -06:00
a1f723d52e Deploy zerotier-2 VM on fornax 2022-02-10 15:34:12 -06:00
c337ad9e40 Remove obsolete node configs 2022-02-10 15:33:23 -06:00
04a036c2b8 Merge pull request 'Move Mastodon to new VM on fornax' (#383) from chore/mastodon_move into master
Reviewed-on: #383
2022-02-10 21:32:56 +00:00
a4b50d1643 Merge pull request 'Upgrade Gitea to 1.16.1' (#384) from chore/upgrade_gitea into master
Reviewed-on: #384
2022-02-10 21:32:51 +00:00
22f5b8a66c Upgrade Gitea to 1.16.1 2022-02-10 15:32:25 -06:00
b823ad5e59 Switch Mastodon cookbook to new Redis cookbook
Also add new node config.

refs #349

Co-authored-by Greg Karékinian <greg@karekinian.com>
2022-02-10 15:29:02 -06:00
341806ec8a Update jemalloc binary path
Co-authored-by Greg Karékinian <greg@karekinian.com>
2022-02-10 15:26:37 -06:00
abe0218998 Merge pull request 'Upgrade knife-zero for Ruby 3.0' (#381) from chore/upgrade_knife into master
Reviewed-on: #381
2022-02-02 23:32:26 +00:00
dace2ddf79 Upgrade knife-zero for Ruby 3.0
Was failing with latest Chef DK.
2022-02-02 17:31:13 -06:00
da1afcbf46 Merge pull request 'Upgrade Gitea to 1.15.11' (#380) from chore/upgrade_gitea into master
Reviewed-on: #380
2022-02-01 18:49:33 +00:00
4462975e51 Upgrade Gitea to 1.15.11 2022-02-01 12:47:37 -06:00
3c76a1e0ad Merge pull request 'Configure/install boltzd for Lightning/on-chain swaps' (#378) from feature/boltz-lnd into master
Reviewed-on: #378
2022-01-28 23:38:49 +00:00
471c23eb5b Update node config/state 2022-01-28 17:33:34 -06:00
90bd2dadb2 Configure boltzd access for RTL 2022-01-28 17:33:22 -06:00
87334de83a Configure/install boltzd 2022-01-28 17:33:10 -06:00
d9bb257f99 Move golang installation to own recipe
Needed by more than one in the bitcoin cookbook now.
2022-01-28 17:32:19 -06:00
13ae913668 Upgrade nbxplorer
Needed a newer version of the .NET SDK as well.
2022-01-28 17:31:14 -06:00
727210aa74 Merge pull request 'Add new ejabberd node, remove old ones' (#377) from chore/ejabberd_cluster_nodes into master
Reviewed-on: #377
2022-01-23 18:18:23 +00:00
8509e0af58 Add new ejabberd node 2022-01-23 12:15:14 -06:00
05dbf5211f Remove old ejabberd node 2022-01-23 12:15:04 -06:00
bf6a77e41a Merge pull request 'Use private IP for ejabberd TURN' (#376) from chore/ejabberd_stun into master
Reviewed-on: #376
2022-01-23 18:09:46 +00:00
622fabe151 Use private IP for ejabberd TURN 2022-01-19 14:38:53 -06:00
3c3ca3f24a Merge pull request 'Replace ejabberd cluster' (#375) from chore/ejabberd_cluster into master
Reviewed-on: #375
2022-01-19 19:35:04 +00:00
6c8a98c524 Run Chef with ejabberd role against new cluster nodes 2022-01-18 12:50:14 -06:00
58736f05ee Remove node configs for old ejabberd cluster 2022-01-18 12:50:14 -06:00
62c95175cc Only allow ZeroTier connections for ejabberd cluster 2022-01-18 12:50:13 -06:00
74dd59ad07 Write hostname-related configs for new ejabberd cluster 2022-01-18 12:50:10 -06:00
5b351036ba Remove superfluous license header 2022-01-18 11:19:20 -06:00
024b4bf164 Fix typo 2022-01-18 11:19:19 -06:00
14d83b4376 Add ejabberd-4 VM 2022-01-18 10:15:39 -06:00
a2c5295afd Create ejabberd-3 VM 2022-01-18 10:15:37 -06:00
eb7c245ea1 Merge pull request 'Upgrade nbxplorer, c-lightning, BTCPay' (#373) from chore/upgrade_bitcoin_software into master
Reviewed-on: #373
2022-01-08 23:19:23 +00:00
d53e1b538b Update nbxplorer to 2.2.18 2022-01-08 17:17:04 -06:00
0e9a657090 Upgrade BTCPay to 1.3.7 2022-01-08 16:48:58 -06:00
3d54f7052f Upgrade c-lightning to 0.10.2 2022-01-08 16:48:58 -06:00
ca79b6031a Merge pull request 'Fix LndHub balances for on-chain topups' (#372) from bugfix/lndhub_onchain_topups into master
Reviewed-on: #372
2022-01-08 22:48:09 +00:00
14cc2c0eb0 Fix lndhub balances with on-chain topups
Removes the bitcoind RPC config entirely, so lndhub only uses LND's
transaction monitoring. The bitcoind integration is broken as is.
2022-01-08 16:38:01 -06:00
ec10a0c120 Merge pull request 'Connect to IRC bouncer instead of directly' (#371) from chore/fix_botka_connection into master
Reviewed-on: #371
2022-01-06 14:15:36 +00:00
f6fe3bab0f Connect to IRC bouncer instead of directly
Changes botka on libera to connect to a bouncer, which also uses SASL,
in order to fix the connection issues and keep a stable connection with
minimal maintenance.
2022-01-06 08:12:42 -06:00
62ff4e51b7 Merge pull request 'Back up LND files and channels to S3' (#370) from feature/359-lnd_channel_backups into master
Reviewed-on: #370
2022-01-03 17:38:46 +00:00
31f4a547a9 Backup LND SCB to S3 on change
closes #359
2021-12-23 13:06:32 +01:00
56f58f3a1b Install/configure AWS client 2021-12-23 13:06:12 +01:00
57b5a244fa Remove superfluous license header 2021-12-23 13:05:44 +01:00
0b80d490a8 Back up LND dir to S3 2021-12-23 13:05:14 +01:00
7adee84adf Merge pull request 'Upgrade Mastodon to 3.4.4' (#368) from chore/upgrade_mastodon into master
Reviewed-on: #368
2021-12-09 13:32:21 +00:00
a0de016e1c Add single sidekiq process for new scheduler queue 2021-12-05 16:27:05 -06:00
38756fd296 Upgrade Mastodon to latest version
Using a new branch with freshly added Kosmos changes on top of the
upstream release code.
2021-12-05 16:11:09 -06:00
3d06300167 Merge pull request 'Upgrade LND to 0.14.1' (#367) from chore/upgrade_lnd into master
Reviewed-on: #367
2021-12-05 01:59:56 +00:00
bbef38b6d6 Update golang cookbook 2021-12-04 19:57:19 -06:00
a8948053d6 Update LND to 0.14.1
closes #351
2021-12-04 19:56:49 -06:00
241 changed files with 4770 additions and 2404 deletions

View File

@@ -52,5 +52,5 @@ cookbook 'ipfs',
cookbook 'elasticsearch', '= 4.2.0'
cookbook 'java', '~> 4.3.0'
cookbook 'ulimit', '~> 1.0.0'
cookbook 'golang', '~> 4.1.0'
cookbook 'golang', '~> 5.3.1'
cookbook 'zerotier', '~> 1.0.7'

View File

@@ -12,7 +12,7 @@ DEPENDENCIES
elasticsearch (= 4.2.0)
firewall (~> 2.6.3)
git (~> 10.0.0)
golang (~> 4.1.0)
golang (~> 5.3.1)
homebrew (= 3.0.0)
hostname (= 0.4.2)
hostsfile (~> 3.0.1)
@@ -69,8 +69,8 @@ GRAPH
poise-javascript (~> 1.0)
poise-service (~> 1.0)
apt (7.3.0)
ark (5.0.0)
seven_zip (>= 0.0.0)
ark (6.0.3)
seven_zip (>= 3.1)
build-essential (8.2.1)
mingw (>= 1.1)
seven_zip (>= 0.0.0)
@@ -89,8 +89,8 @@ GRAPH
firewall (2.6.5)
chef-sugar (>= 0.0.0)
git (10.0.0)
golang (4.1.0)
ark (~> 5.0)
golang (5.3.1)
ark (>= 6.0)
homebrew (3.0.0)
hostname (0.4.2)
hostsfile (>= 0.0.0)
@@ -109,20 +109,20 @@ GRAPH
apache2 (>= 0.0.0)
nginx (>= 0.0.0)
php (>= 0.0.0)
mingw (2.1.0)
mingw (2.1.3)
seven_zip (>= 0.0.0)
mysql (8.7.3)
mysql (8.7.4)
nginx (9.0.0)
build-essential (>= 5.0)
ohai (>= 4.1.0)
yum-epel (>= 0.0.0)
nodejs (7.3.1)
nodejs (7.3.3)
ark (>= 2.0.2)
chocolatey (>= 3.0)
ntp (3.4.0)
ohai (5.2.5)
openssl (8.5.5)
php (8.0.0)
php (8.0.1)
yum-epel (>= 0.0.0)
poise (2.8.2)
poise-archive (1.5.0)
@@ -155,13 +155,12 @@ GRAPH
selinux_policy (>= 2.2.0)
ulimit (>= 0.1.2)
selinux_policy (2.4.3)
seven_zip (3.1.1)
windows (>= 0.0.0)
seven_zip (4.2.2)
timezone_iii (1.0.4)
ulimit (1.0.0)
users (5.3.1)
windows (6.0.0)
yum (5.1.0)
yum-epel (3.3.0)
windows (7.0.2)
yum (7.2.0)
yum-epel (4.2.3)
zerotier (1.0.7)
ohai (>= 0.0.0)

View File

@@ -1,3 +1,3 @@
source 'https://rubygems.org'
gem 'knife-zero'
gem 'knife-zero', '>= 2.4.2'

View File

@@ -1,15 +1,38 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
aws-eventstream (1.2.0)
aws-partitions (1.551.0)
aws-sdk-core (3.125.6)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.525.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.53.0)
aws-sdk-core (~> 3, >= 3.125.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.111.3)
aws-sdk-core (~> 3, >= 3.125.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.4)
aws-sdk-secretsmanager (1.56.0)
aws-sdk-core (~> 3, >= 3.125.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.4.0)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt_pbkdf (1.1.0)
builder (3.2.4)
chef (17.2.29)
chef (17.9.42)
addressable
chef-config (= 17.2.29)
chef-utils (= 17.2.29)
aws-sdk-s3 (~> 1.91)
aws-sdk-secretsmanager (~> 1.46)
chef-config (= 17.9.42)
chef-utils (= 17.9.42)
chef-vault
chef-zero (>= 14.0.11)
corefoundation (~> 0.3.4)
diff-lcs (>= 1.2.4, < 1.4.0)
erubis (~> 2.7)
ffi (>= 1.5.0)
@@ -31,20 +54,21 @@ GEM
train-core (~> 3.2, >= 3.2.28)
train-winrm (>= 0.2.5)
uuidtools (>= 2.1.5, < 3.0)
chef-config (17.2.29)
vault (~> 0.16)
chef-config (17.9.42)
addressable
chef-utils (= 17.2.29)
chef-utils (= 17.9.42)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
tomlrb (~> 1.2)
chef-telemetry (1.0.29)
chef-telemetry (1.1.1)
chef-config
concurrent-ruby (~> 1.0)
chef-utils (17.2.29)
chef-utils (17.9.42)
concurrent-ruby
chef-vault (4.1.0)
chef-zero (15.0.4)
chef-vault (4.1.5)
chef-zero (15.0.11)
ffi-yajl (~> 2.2)
hashie (>= 2.0, < 5.0)
mixlib-log (>= 2.0, < 4.0)
@@ -53,10 +77,12 @@ GEM
webrick
coderay (1.1.3)
concurrent-ruby (1.1.9)
corefoundation (0.3.10)
ffi (>= 1.15.0)
diff-lcs (1.3)
erubi (1.10.0)
erubis (2.7.0)
faraday (1.4.2)
faraday (1.4.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
@@ -68,11 +94,11 @@ GEM
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
faraday_middleware (1.0.0)
faraday-net_http_persistent (1.2.0)
faraday_middleware (1.2.0)
faraday (~> 1.0)
ffi (1.15.1)
ffi-libarchive (1.0.17)
ffi (1.15.5)
ffi-libarchive (1.1.3)
ffi (~> 1.0)
ffi-yajl (2.4.0)
libyajl2 (>= 1.2)
@@ -82,9 +108,10 @@ GEM
gyoku (1.3.1)
builder (>= 2.1.2)
hashie (4.1.0)
highline (2.0.3)
httpclient (2.8.3)
iniparse (1.5.0)
inspec-core (4.37.25)
inspec-core (4.52.9)
addressable (~> 2.4)
chef-telemetry (~> 1.0, >= 1.0.8)
faraday (>= 0.9.0, < 1.5)
@@ -108,9 +135,33 @@ GEM
tty-prompt (~> 0.17)
tty-table (~> 0.10)
ipaddress (0.8.3)
json (2.5.1)
knife-zero (2.3.2)
jmespath (1.5.0)
json (2.6.1)
knife (17.9.26)
bcrypt_pbkdf (~> 1.1)
chef (>= 17)
chef-config (>= 17)
chef-utils (>= 17)
chef-vault
erubis (~> 2.7)
ffi (>= 1.15)
ffi-yajl (~> 2.2)
highline (>= 1.6.9, < 3)
license-acceptance (>= 1.0.5, < 3)
mixlib-archive (>= 0.4, < 2.0)
mixlib-cli (>= 2.1.1, < 3.0)
net-ssh (>= 5.1, < 7)
net-ssh-multi (~> 1.2, >= 1.2.1)
ohai (~> 17.0)
pastel
train-core (~> 3.2, >= 3.2.28)
train-winrm (>= 0.2.5)
tty-prompt (~> 0.21)
tty-screen (~> 0.6)
tty-table (~> 0.11)
knife-zero (2.4.2)
chef (>= 15.0)
knife (>= 17.0)
libyajl2 (2.1.0)
license-acceptance (2.1.13)
pastel (~> 0.7)
@@ -138,8 +189,13 @@ GEM
net-sftp (3.0.0)
net-ssh (>= 5.0.0, < 7.0.0)
net-ssh (6.1.0)
net-ssh-gateway (2.0.0)
net-ssh (>= 4.0.0)
net-ssh-multi (1.2.1)
net-ssh (>= 2.6.5)
net-ssh-gateway (>= 1.2.0)
nori (2.6.0)
ohai (17.1.0)
ohai (17.9.0)
chef-config (>= 14.12, < 18)
chef-utils (>= 16.0, < 18)
ffi (~> 1.9)
@@ -152,7 +208,7 @@ GEM
plist (~> 3.1)
train-core
wmi-lite (~> 1.0)
parallel (1.20.1)
parallel (1.21.0)
parslet (1.8.2)
pastel (0.8.0)
tty-color (~> 0.5)
@@ -167,21 +223,21 @@ GEM
rspec-core (~> 3.10.0)
rspec-expectations (~> 3.10.0)
rspec-mocks (~> 3.10.0)
rspec-core (3.10.1)
rspec-core (3.10.2)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
rspec-expectations (3.10.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-its (1.3.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.10.2)
rspec-mocks (3.10.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.10.0)
rspec-support (3.10.2)
ruby2_keywords (0.0.4)
rspec-support (3.10.3)
ruby2_keywords (0.0.5)
rubyntlm (0.6.3)
rubyzip (2.3.0)
rubyzip (2.3.2)
semverse (3.0.0)
sslshake (1.3.1)
strings (0.2.1)
@@ -190,9 +246,9 @@ GEM
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
syslog-logger (1.6.8)
thor (1.1.0)
thor (1.2.1)
tomlrb (1.3.0)
train-core (3.7.2)
train-core (3.8.7)
addressable (~> 2.5)
ffi (!= 1.13.0)
json (>= 1.8, < 3.0)
@@ -221,9 +277,11 @@ GEM
pastel (~> 0.8)
strings (~> 0.2.0)
tty-screen (~> 0.8)
unicode-display_width (2.0.0)
unicode-display_width (2.1.0)
unicode_utils (1.4.0)
uuidtools (2.2.0)
vault (0.16.0)
aws-sigv4
webrick (1.7.0)
winrm (2.3.6)
builder (>= 2.1.2)
@@ -251,7 +309,7 @@ PLATFORMS
x86_64-linux
DEPENDENCIES
knife-zero
knife-zero (>= 2.4.2)
BUNDLED WITH
2.2.15

2
Vagrantfile vendored
View File

@@ -39,7 +39,7 @@ Vagrant.configure(2) do |config|
# Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network "private_network", ip: "192.168.33.10"
config.vm.network "private_network", ip: "192.168.56.5"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on

4
clients/discourse-1.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "discourse-1",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxJBhKUtTcmjP8eG4aLNF\n9UfNU9lRIFhfywjFJjtXoYdNaUatZHE3s1HKND0SjJs5BRQbZBEKLxTHCgnPZD4U\nlRgZ65JtHwi+JNM6ac4TQm5JYKA++KxX7FtOiJV6oGX6foNoFVHrGi+fhTlLE9hL\npHRQWTpM8ErpUEj3VHez+k6KT1Mr3QO5T9L5kqu1BdTYwtyfXJE0VfyDKz/rwrvc\ngPvZd167p8YCTu/rWLG9X8tag+ySUR9cmlEn5sCsBLmq56Zurf0VIe/0tuGPI8DP\nAVc4dIXHsfGuKLwBfFPSDy9YbI7F8gbaD05UnUVn60IWPmWsE19K/iIc/OnJZwRO\nkQIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/discourse-2.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "discourse-2",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwinJNGMUzUdrZwx/ZCkU\nxZRnuWqZHXHdZtkEG6beMY1sB/PpGknLgcfTjhh4FR/5hIXqBcVdUj3DZiTmhd8o\n0QpEkJPNKd08PN12CyShPwCcIA1KTqsCsNys+bp6Wff84JClAe/Oza6DonoRmhqO\ncFxSQcscuv8a6Gc/1X/aySmS01hwL+r9p0VZBEPNKEObgJXHsGIIbajlxgq037X/\n2/IsIk2etXTUSWPJLxNKSXzxC3l4Izw4NfvUgipByPTeJQ2YAVxbvrDEqquBGk5S\nll/mlF+fKX0QvUhm7sdLiSy++rHc8R1ny+4LnR1gAOscYMuLbDbpJnW0Rc0GEJOL\nVwIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/drone-1.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "drone-1",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0DLEt7jfKPH7X7pBknG3\nWoB6Q6Vffl6Q0GRxQiMJ1uRC79dulKH097CYfLzIXFZD9gRRP4K78vW5BA2spXVV\nn3qrak9JT6BGgdFrkBEdMNGZyz814aMiyhPZrQUrmIzyH8R04xZgv7UH86qdNQ5p\nPeIXS7gU7/0PmwRgEBiM1KLq+Kba6pYdGefKqxx5D59xweH+yE+rbd5ac9xn2GP7\nyOiZoG2sMuksq7d3O4SeTS2lBAmG5IeiP2iWvHWpZD48PTr78ItkTgIbaqZU2PXV\ng+2OcJPTel5xISooe5FvW8gdpC9SYoBPvgJuJ6czc1+LdUSK7pE7577eAJNDlh+H\nRwIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@@ -1,4 +0,0 @@
{
"name": "ejabberd-1",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtoVmQAEmmAWjjzi5X8Ia\n9sl2aH8Lh0AsckM0aE3hvw9lGfbNCPpYWrr0uh7R6/+13Z0OghrT3yDAZ+XfH39Y\nuGomazTzSMMOEofjepo+nXSgq4meFfX5vobYG7rpBdz1EsIT1bElHduItA2zsw9J\nFpXtGd4BjumMq1VykSTA+QaEE8byes/+groQTtXPqXf5gJMxyGlh4SU0MzmkGHaW\n8c9BPCQrV0CMiuGOGJ5mZ28HajbvSg3+bpgwThh3M5uQaQ6on1N2pvJuBypUySS6\nyc4TauocUcUsULYXq9wM8/rqDYsUah0PR0WSiOi90m5thGeBchFAmhdCvrS34FlR\nVQIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@@ -1,4 +0,0 @@
{
"name": "ejabberd-2",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAudueTsPYnRXRu/rmMGZe\nI7LdyrWKdY9FJaRhkXR5J9Yb8QnIcDS7ZXDJsVhyQW8pZ2DuaIs5dmGYvRtmx0ol\nqHTEel01Q3/xI1blJoq4uRm639PB5M9dSJ0w+s6P5zj7rbFKpvMBYxBSK6z+gXIc\n/L1ayJ6JOssX5/tEvcvx/d4GIxof/Q+puACAXawx7W88Wl7yYWdBQ78uTPHzuMyB\n8BRYz24tki/O1fa9JijW32d3EELD0EccI3iJ+/CR4BFEEM2QdDczY/Q6Ny7h7inH\n/TdU246nvtJIx7bAZHmDIDva8YPtL27RIOQ3JqBBe7prQP5Q9MBGPyCXWAglj99a\n6QIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/ejabberd-4.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "ejabberd-4",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6FuI13W2sft83OIWe59/\nYTfpTfKcYTCq5zAQEu87OYHHQeBAYo0W/g/qICh3qw0ie2QMPyggAezoeR5VQdLt\nkJq1X9AHqyX59YThzj7dLCCEKq+mAdriuKzNGu8eml4DRM3m+xw7jFzcwwrD8ECZ\nY+Kn7bcOtozx0mXpEm+cO2cOKmRQn0VJwAQSe6eW301iGmpR9et4hDqMjhiUiwaU\nWAqpsmP/JQMLAX2gLzwilD63VCQlcQCDq/D1m/N6bWb1L47zNAzwOCSYV92bGNDe\nRe+4gCVVLpfGWKbkjQFDraCmME7+O50WpbfowylF8gOzgl3AvnpC/LOSzT8VtMPr\nZQIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/ejabberd-6.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "ejabberd-6",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqvGOanDqJOhf0xl/TYcs\nqYhhGz4ptFzxmfxiCMWbnbDcICBLHni28dJHhP2ggfUKOGcp+OIqiy783eRUrPsf\nnH9VmvTnz4NdXIB5J45FgBtfYiF9ZseaPL+ufTSCbZj7Ih3lzTAbO5Ug+UOj852B\nnnqH2Ht2jXMp2v3NW4gAG9QyRpr6P5cyVWBrMFExjuhNWg119tJv+33oGnflrNRi\njV3yGbRFRpqAomAVCr6DAA9SX/R8J3yKTky6MdRGrXKH/7eXH0ehDi33Y9Pyy9Ci\nkQX/JRHffuJeBF3Tndiojqdx81C6oIh2s/H3JMew/DdRxjzlPP4nemYWXv1/YVcS\nCwIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/ejabberd-7.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "ejabberd-7",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzHfqcI/6w58gLwDFCKxw\n0TeKFOf4MFBnmUGsWyi8BEskkjh4QEDc4pUFeiVuEADFyBfCnALWh004nKhiwamc\nECybfAKlJryoQQEcYZC6H4rZf3SW7xPLk12X00YySNroYM50PM5Ly/G7MI9a669g\n6HNOgn1MYIEh8unpsAHjfKpx72bNutRYKKvBDaHXNvlJ459Jr8HNpERFk8IeaGcF\n4BKqf/MNxkQHOfy7R4ETXeLUBrgD13SmLbs6mM3lXS6IgkoeFyAvAPP4ZgwgiJ6w\nqIKsX4cRt8xnJJ+MTNBX4oc0f9+Gu8bUpr2JZ8tcwq3GUgDjv+JSJpk/uDzzbQUe\nIwIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/gitea-1.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "gitea-1",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0bp4I/f5dLL22GRHanLV\nw57sNBEWT3Vx32B24hScKNP5nYDW0dIRkt1c7SLEpe+diNgyIwk7JlI20Vl+oaVo\njdCpmHSB18yXxQT2Ub6aI8ApwFLECVA6SckekcwxLJc/oGRMB52PonI8opJOVbPa\nF+heZ5NNDiMvn3E8qODdMWSjDiJNSVLJgsCPFHAt32aJgLaXQTqG5lrmltaamscW\njGlFqiBJw/5saCkKBPdPwdX4RcDqvGX1FdE1LVB42cskv8CrnvEVFLBxKXAhAr6s\nNhOhenzLGHpy58tNoUoUw3v4WiPRtcnlNxeSVG5LKkjaK04f2oxeZx3SiSU/1naY\nkwIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/gitea-2.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "gitea-2",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7MKbO2vvX7TD1cFKjITh\ntvsf6hgAQRcu7F0kiekx15aC3VLnRgsB9A6SXySVrqvhq/vOSTXZsIC62IQi4Oks\nhhtAA/uvwcOmZ7JkMi0vJ3Ary94dTsg/L8i/0/k2V/D4FRKTV4414wSkpglFGLhl\nvbZ6P17LrqfyAzNJwIDzwd9d6cvt4a0qxvuxbTOHkBuY8tpyGdNzhg6fATadxbBa\nRASEVFb+xqxG3K+8zRmaCFyYqmSPS/8liVVbLPAeUlK6pDyQ5g4T37E5o+CpWfPF\nkBgYw/hHQe6zt1Z4wNJ6mb8YIN/l9kFF3EE99laYxp9Ua7ffrZkRgw12C5Yrn3N6\noQIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/mastodon-2.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "mastodon-2",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA27a8h17CCQLP8JY59n+M\nURsrbeVvRi3yIUe1IklOlRSTy0L3Z37rFuSNC3dC9rKl/pHDKtorgeukxbFADXQx\nkta2LNX8gf09jCWsUdga5lWIbfOdtlCLRDG1MVEUSA0f6Sxdqr8RbjM2ch31T6Me\n5Z6DYdggwBujcPHwZC1AugI1wJ0T5XHY9f2MDs/XjNEdw3ThYbAdbl1e09ql6Gtg\nSVCa4RlLg/KICdLJtVOLkX6049/XRxi41I6xvu9tXsqgV3+bs8dYbeGLsTWmpPIv\naAUMcf/A5t4B2DVpnlXDytPqfvZQPD3aBVyfEJRGI1yD6Vi9zL3RyIhDQ/I7PMNI\naQIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/mastodon-3.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "mastodon-3",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArBsrwKV1RtDfw/5y/L2N\n/x7UL2q6G4JypcD5Q8/aDQOTaGuTR+4RCup+Zcn2wzpdGnX6IzS7cy4/LqMoR2pB\nq8K1FZOXvcCtwsBqsyGWiFdy5aLXy2CkHhTRbkwOLPyb1rBy+qPCBdr055BPZUWm\nTfJaxTmph+Z1J+INz0YndYxz3iKET2V99OP27D7tUdZ7yPgMDbDJWqVxPdYrmAUr\n3QLpmYWsYlmPKhpTAXlvbvzE5vgh5EC8RGfhfYRpacc6QdwbahtxMQAV9+1S2+Vj\nntHfB6PSnYwewUHs9MMn8e33KmNlOZdMAVlyJymBZ4pNceC44vxvZYElp077A6tN\nFwIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/nodejs-3.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "nodejs-3",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyqP7aGx+S9Mdt6xmaGnJ\nfNWWQsg4BvLiP1qtVt3VRrcXF2cy1bhgfnmqoBqnDk4bGlRoTzF+rSOw284+O2UQ\ntUlsBRos4TOyGfbYHehF12Re6NX51K9LHwaprr3eN5h08wLI8pjVrRJlbce8pHST\nXQ/CZvU+CBg43LE08cXr5kRmhnZrgh70g7zTO8+1E6y74r1LEh77Ar4uaaB5jXw7\n6o9TyfaA1HgyqvfYbH+9KPrJfMX/DeLrYPMI3IG/j3fzDUQQ8o9Pb5B+G1Apl+I+\nsTcgWRei5u06aZHLMMd8MMo4O1yUhbt05kxfVhlDGUDWBdi3cvsMf95t6MNdz/eq\niwIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/nodejs-4.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "nodejs-4",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwIlB6swdT/Z7tRx/Sm24\n/ro3Jotpsi0DiNS6i7BA1fH0OdbX5CRel62jGC1Nja9QCY8aBd00E8u7KPCuK3iY\n5aA7v91sxWZ7nbXdSwBawaNsTZAe4rMaEkA74INpq7TOvLzHcmDcgRbo+MC2Nw3T\nl0mCOaWkUWFaukTLN8zBldzEbYxztKsaL+b2TbevnSCaPkdD9WmDbmjrUiWTlnpE\nDidMjZ9rp+PcODyjlvwka1yJCoPFoN/+ZL4yXxo49tJ2kbrxSh4tdDZqiZwnajRb\n4SAuRCaHTASDSmZ1Dj0ET/miXuvy6Jgvt06eSMPDKvb+84Dk8zLf4CW6DaE2TfX4\nzwIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@@ -1,4 +0,0 @@
{
"name": "postgres-3",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxPsFwxISCjy38kw78N2I\nhkxK6S0uARkPggE+OP7jWwZqHtnz1O+ZUbM/o9i/dWgm0Xl+hQ6grPtjS57VzXJq\nlwsVDGTkyb5T6wAcZao/koQbA9ZABknLH/ra52gny+7j3b2q5RIdyhddTYZwsbIG\n9y2BfcUW0Z1mPVkR2NxzFloj0ulsrJs6/5GhqbREqPz5BsyBJlwFsREK2Dy6m2nm\nVMp+GIQlRdhy/D09s/BZ/Ejwe8D3tv3jJT5CRXkndwa5qIc96E1uzRQpyyKvXZDK\nYvUdQwniW4EBNHEo/se+OqP+Du/M1dReX6aTq9axbhKiVWoD3FtMVtGqE3uf/i4I\n0QIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@@ -0,0 +1,4 @@
{
"name": "rsk-mainnet-2",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAu1cuvB3l7sBKJXqjhTih\nQloXteYOr/cQ24R5xUDnHZpCzM75khBjf9ZIX5fskManQ7MI4oFHAaKF6sCWT9QQ\nnL3ON0rCX8wDwBJpKY3iFisAK7f86GO5qkG2ovwG4wO1x69eKX52w33xGpPLPrmw\nBhFv+KfT56KZ3NCvDIQ6tew9VJ3g2V2zUtlL7xZIcdkgTXB06Ec8gbtoCAD3MVUQ\noxMCn+CK6QIAHGxpLIFEv5Y4hNRJ3+0RSuQikhhFzd7P2swnUgDSxDpbfoShroCC\neDw29sapOkQ+PwiHo2Zy8Qtr5m1ToGIhh8l1f/k2vi0Vf2xWVaTjbaeePEDMy9Fd\nKQIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@@ -0,0 +1,4 @@
{
"name": "rsk-testnet-3",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxbo3GccgPZp8UWhb9l2w\n+o6Qe5s4Tf/1TMOw3ppLw+IGCZhq9LEe8s8kngbBX7dMywbyDuf8vLXwvAHFKvC+\nx4XOXq0r9xDX8ujTCfqJxiSYk1KTyqM4lmi7qno7F9/Nwo7h3HuVbpkT752ojf+/\nDCSXwHL+uHlF6z3jKZ8iYBRHFrWmudh8bOm6lVsp/Iv4pQ/btZf8W5zULlk/Z6lT\nb6GS538Lnaoeu7wPCf/awL5GBg9findY3oS1lsEE+PfAu6SAHmbJcItMkrON7Esd\ng9xtwsjX1VICpJhOSkVS1nmRfYohELVJMdiKSLq+b5UskscbCjkRGY6GAPH8cVGg\nSQIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@@ -1,4 +0,0 @@
{
"name": "zerotier-1",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx59liuiEXuAykaiQhjvO\nMimzWH2MOE/GdfPdlGG0IupDtGbDgpsu6lHB/Tc8ct+SEsj55KuamEmUew3EzWRQ\ngVWAPjWtlk6gqVlpU+8eJjTAxT1vaEOvetzliPDNzRBk1AAzS0IkMQwPAIqOD2Vm\nz+QDrTiEFNnbKyBDQ54uY9jBtEgTHgzZyc9KHTjcodJu/oCmOuO0ieTtMS4CDWVl\no2auyABpXX6PzW3hFvH/GB0IlVC5IBa7XS6JrbIFbZCvoAYf/egcQUTToNiKH45e\n2tPZbFpOt955zwInKTioW+Ak3qVVEPvCZ9IBTN7jZkSQuP4Ob5SA4+IbDJcXGulG\nZQIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/zerotier-2.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "zerotier-2",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsild7NcktO5yVR3Uw0yA\negHFToXHaJMIR1z0WrfHgklHf27lRnWRHOiNjnR6SbsvKIT1MBntg4/mQgotah+n\npo6cKF+0pvUih+hOSBZ6+WwjRf5LxJTaj/R0e2j0Gig6PlDV3yWz8+2AB6gObVcb\nKOQT1w6p+T+S9t6Hv/E0Z8CJW+7ZXDZBvjKTg4kYb47P0J5704wATf38EcVAOuoa\nJsUJoE+dTygx2QUG78eiEYqVDgBak00MA7MpFI/yPrzfn4tjSO1aY2/vy1PyG0Zq\nfgAhuFNZPWQwxMvYsK68gFxfmfwsEn0iJOFh0rPCKYWgOCxzkMLk2z7ppCmNd+H6\nNQIDAQAB\n-----END PUBLIC KEY-----\n"
}

4
clients/zerotier-3.json Normal file
View File

@@ -0,0 +1,4 @@
{
"name": "zerotier-3",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA70y96zXq3XiMlJhLM5Tm\nCzRiZjwqCBN1fKOoihZpsgXHtqDfYd+5BTyafAKTpzVpAZ7HJp+X4da8T/rb+Pym\nu0PrREXJSXGdWjKIgvsTVUtT51ZFYWtqbpu2l43wh57KCt7Q57JRgKTPyNbHJS0Z\ngrB6fifvQMfzFMf+WKK4X7Z6VXFP1r2cwzRvywC4/d3ZSbJ4fP3g+nnl1623Pxfc\n/BkqyaDeRt2dBEa5I8+OvFkKC8muU99fWR/gPZkkWD4pFNwLPLnPfgdk3bUd7tjN\n/0ardVX9lRJog1CjXCHaUG9aq+WFrtr/tfW+kLff/P7k00E5zplqq9Oz6VUvRMmu\nNQIDAQAB\n-----END PUBLIC KEY-----\n"
}

View File

@@ -2,6 +2,40 @@
This file is used to list changes made in each version of the ark cookbook.
## 6.0.3 - *2021-08-30*
- Standardise files with files in sous-chefs/repo-management
## 6.0.2 - *2021-06-18*
- Update location of test archive fixtures
## 6.0.1 - *2021-06-01*
- Standardise files with files in sous-chefs/repo-management
## 6.0.0 - *2021-05-22*
- Chef 17 updates: enable `unified_mode` on all resources
- Bump required Chef Infra Client to >= 15.3
- Migrate to using `seven_zip_tool` resource directly and require `seven_zip` >= 3.1
- Various ChefSpec fixes
## 5.1.1 - *2021-04-29*
- Added a version pin on seven_zip
## 5.1.0 - *2021-01-24*
- Sous Chefs Adoption
- Standardise files with files in sous-chefs/repo-management
- Cookstyle fixes
- Add integration testing for Windows and MacOS
- Remove testing for Amazon Linux 201x, CentOS 6 and Ubuntu 16.04
- Fix ChefSpec tests
- Fix issues with `--strip-components` with the `:cherry_pick` action on MacOS
- Ensure `/etc/profile.d` exists on MacOS if `append_env_path` is used
## 5.0.0 (2020-01-02)
- Require Chef Infra Client 14+ and remove the need for the build_essential dependency - [@tas50](https://github.com/tas50)
@@ -33,8 +67,9 @@ This file is used to list changes made in each version of the ark cookbook.
- Rewrite of resource to custom resources.
- Remove EOL platforms from testing.
- Update zlib URL
-
## 2.2.1 (2016-12-16)
- Use Ohai root_group attribute to avoid trying to set the group to root on BSD/macOS.
- Add missing accessor for owner property

View File

@@ -1,2 +0,0 @@
Please refer to
https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD

202
cookbooks/ark/LICENSE Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -1,6 +1,10 @@
# ark cookbook
[![Build Status](https://travis-ci.org/chef-cookbooks/ark.svg?branch=master)](https://travis-ci.org/chef-cookbooks/ark) [![Cookbook Version](https://img.shields.io/cookbook/v/ark.svg)](https://supermarket.chef.io/cookbooks/ark)
[![Cookbook Version](https://img.shields.io/cookbook/v/ark.svg)](https://supermarket.chef.io/cookbooks/ark)
[![CI State](https://github.com/sous-chefs/ark/workflows/ci/badge.svg)](https://github.com/sous-chefs/ark/actions?query=workflow%3Aci)
[![OpenCollective](https://opencollective.com/sous-chefs/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
## Overview
@@ -27,6 +31,10 @@ By default, the ark will not run again if the `:path` is not empty. Ark provides
For remote files ark supports URLs using the [remote_file](http://docs.chef.io/resource_remote_file.html) resource. Local files are accessed with the `file://` syntax.
## Maintainers
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If youd like to know more please visit [sous-chefs.org](https://sous-chefs.org/) or come chat with us on the Chef Community Slack in [#sous-chefs](https://chefcommunity.slack.com/messages/C2V7B88SF).
## Requirements
### Platforms
@@ -269,29 +277,27 @@ You can also supply the file extension in case the file extension can not be det
end
```
## License & Authors
## Contributors
- Author: Philip (flip) Kromer - Infochimps, Inc([coders@infochimps.com](mailto:coders@infochimps.com))
- Author: Bryan W. Berry ([bryan.berry@gmail.com](mailto:bryan.berry@gmail.com))
- Author: Denis Barishev ([denis.barishev@gmail.com](mailto:denis.barishev@gmail.com))
- Author: Sean OMeara ([someara@chef.io](mailto:someara@chef.io))
- Author: John Bellone ([jbellone@bloomberg.net](mailto:jbellone@bloomberg.net))
- Copyright: 2011, Philip (flip) Kromer - Infochimps, Inc
- Copyright: 2012, Bryan W. Berry
- Copyright: 2012, Denis Barishev
- Copyright: 2013-2017, Chef Software, Inc
- Copyright: 2014, Bloomberg L.P.
This project exists thanks to all the people who [contribute.](https://opencollective.com/sous-chefs/contributors.svg?width=890&button=false)
```
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
### Backers
http://www.apache.org/licenses/LICENSE-2.0
Thank you to all our backers!
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
![https://opencollective.com/sous-chefs#backers](https://opencollective.com/sous-chefs/backers.svg?width=600&avatarHeight=40)
### Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
![https://opencollective.com/sous-chefs/sponsor/0/website](https://opencollective.com/sous-chefs/sponsor/0/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/1/website](https://opencollective.com/sous-chefs/sponsor/1/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/2/website](https://opencollective.com/sous-chefs/sponsor/2/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/3/website](https://opencollective.com/sous-chefs/sponsor/3/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/4/website](https://opencollective.com/sous-chefs/sponsor/4/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/5/website](https://opencollective.com/sous-chefs/sponsor/5/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/6/website](https://opencollective.com/sous-chefs/sponsor/6/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/7/website](https://opencollective.com/sous-chefs/sponsor/7/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/8/website](https://opencollective.com/sous-chefs/sponsor/8/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/9/website](https://opencollective.com/sous-chefs/sponsor/9/avatar.svg?avatarHeight=100)

View File

@@ -31,7 +31,7 @@ pkgs = %w(libtool autoconf) unless platform_family?('mac_os_x')
pkgs += %w(make) unless platform_family?('mac_os_x', 'freebsd')
pkgs += %w(unzip rsync gcc) unless platform_family?('mac_os_x')
pkgs += %w(autogen) unless platform_family?('rhel', 'fedora', 'mac_os_x', 'suse', 'amazon')
pkgs += %w(gtar) if platform?('freebsd') || platform?('smartos')
pkgs += %w(gtar) if platform?('freebsd', 'smartos')
pkgs += %w(gmake) if platform?('freebsd')
if platform_family?('rhel', 'suse', 'amazon')
if node['platform_version'].to_i >= 7

115
cookbooks/ark/chefignore Normal file
View File

@@ -0,0 +1,115 @@
# Put files/directories that should be ignored in this file when uploading
# to a Chef Infra Server or Supermarket.
# Lines that start with '# ' are comments.
# OS generated files #
######################
.DS_Store
ehthumbs.db
Icon?
nohup.out
Thumbs.db
.envrc
# EDITORS #
###########
.#*
.project
.settings
*_flymake
*_flymake.*
*.bak
*.sw[a-z]
*.tmproj
*~
\#*
REVISION
TAGS*
tmtags
.vscode
.editorconfig
## COMPILED ##
##############
*.class
*.com
*.dll
*.exe
*.o
*.pyc
*.so
*/rdoc/
a.out
mkmf.log
# Testing #
###########
.circleci/*
.codeclimate.yml
.delivery/*
.foodcritic
.kitchen*
.mdlrc
.overcommit.yml
.rspec
.rubocop.yml
.travis.yml
.watchr
.yamllint
azure-pipelines.yml
Dangerfile
examples/*
features/*
Guardfile
kitchen.yml*
mlc_config.json
Procfile
Rakefile
spec/*
test/*
# SCM #
#######
.git
.gitattributes
.gitconfig
.github/*
.gitignore
.gitkeep
.gitmodules
.svn
*/.bzr/*
*/.git
*/.hg/*
*/.svn/*
# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp
# Bundler #
###########
vendor/*
Gemfile
Gemfile.lock
# Policyfile #
##############
Policyfile.rb
Policyfile.lock.json
# Documentation #
#############
CODE_OF_CONDUCT*
CONTRIBUTING*
documentation/*
TESTING*
UPGRADING*
# Vagrant #
###########
.vagrant
Vagrantfile

View File

@@ -0,0 +1,65 @@
driver:
name: dokken
privileged: true # because Docker and SystemD
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
chef_license: accept-no-persist
transport:
name: dokken
provisioner:
name: dokken
platforms:
- name: amazonlinux-2
driver:
image: dokken/amazonlinux-2
pid_one_command: /usr/lib/systemd/systemd
- name: debian-9
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: debian-10
driver:
image: dokken/debian-10
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: centos-7
driver:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd
- name: centos-8
driver:
image: dokken/centos-8
pid_one_command: /usr/lib/systemd/systemd
- name: fedora-latest
driver:
image: dokken/fedora-latest
pid_one_command: /usr/lib/systemd/systemd
- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: ubuntu-20.04
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: opensuse-leap-15
driver:
image: dokken/opensuse-leap-15
pid_one_command: /bin/systemd

View File

@@ -0,0 +1,14 @@
---
driver:
name: exec
transport:
name: exec
provisioner:
name: chef_zero
deprecations_as_errors: true
platforms:
- name: windows-latest
- name: macos-latest

View File

@@ -104,7 +104,7 @@ module Ark
def wmi_property_from_query(wmi_property, wmi_query)
@wmi = ::WIN32OLE.connect('winmgmts://')
result = @wmi.ExecQuery(wmi_query)
return nil unless result.each.count > 0
return unless result.each.count > 0
result.each.next.send(wmi_property)
end

View File

@@ -42,7 +42,7 @@ module Ark
end
def sevenzip_binary
@tar_binary ||= "\"#{(node['ark']['sevenzip_binary'] || sevenzip_path_from_registry)}\""
@tar_binary ||= "\"#{node['ark']['sevenzip_binary'] || sevenzip_path_from_registry}\""
end
def sevenzip_path_from_registry

View File

@@ -9,7 +9,7 @@ module Ark
end
def cherry_pick
"#{tar_binary} #{args} #{resource.release_file} -C #{resource.path} #{resource.creates}#{strip_args}"
"#{tar_binary} #{args} #{resource.release_file} -C #{resource.path}#{strip_args} #{resource.creates}"
end
def initialize(resource)

View File

@@ -1 +1,49 @@
{"name":"ark","version":"5.0.0","description":"Provides a custom resource for installing runtime artifacts in a predictable fashion","long_description":"","maintainer":"Chef Software, Inc.","maintainer_email":"cookbooks@chef.io","license":"Apache-2.0","platforms":{"ubuntu":">= 0.0.0","debian":">= 0.0.0","redhat":">= 0.0.0","centos":">= 0.0.0","suse":">= 0.0.0","opensuse":">= 0.0.0","opensuseleap":">= 0.0.0","scientific":">= 0.0.0","oracle":">= 0.0.0","amazon":">= 0.0.0","windows":">= 0.0.0","mac_os_x":">= 0.0.0","smartos":">= 0.0.0","freebsd":">= 0.0.0"},"dependencies":{"seven_zip":">= 0.0.0"},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/chef-cookbooks/ark","issues_url":"https://github.com/chef-cookbooks/ark/issues","chef_version":[[">= 14.0"]],"ohai_version":[]}
{
"name": "ark",
"description": "Provides a custom resource for installing runtime artifacts in a predictable fashion",
"long_description": "",
"maintainer": "Sous Chefs",
"maintainer_email": "help@sous-chefs.org",
"license": "Apache-2.0",
"platforms": {
"amazon": ">= 0.0.0",
"centos": ">= 0.0.0",
"debian": ">= 0.0.0",
"freebsd": ">= 0.0.0",
"mac_os_x": ">= 0.0.0",
"opensuse": ">= 0.0.0",
"opensuseleap": ">= 0.0.0",
"oracle": ">= 0.0.0",
"redhat": ">= 0.0.0",
"scientific": ">= 0.0.0",
"smartos": ">= 0.0.0",
"suse": ">= 0.0.0",
"ubuntu": ">= 0.0.0",
"windows": ">= 0.0.0"
},
"dependencies": {
"seven_zip": ">= 3.1"
},
"providing": {
},
"recipes": {
},
"version": "6.0.3",
"source_url": "https://github.com/sous-chefs/ark",
"issues_url": "https://github.com/sous-chefs/ark/issues",
"privacy": false,
"chef_versions": [
[
">= 15.3"
]
],
"ohai_versions": [
],
"gems": [
],
"eager_load_libraries": true
}

View File

@@ -1,16 +1,26 @@
name 'ark'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache-2.0'
description 'Provides a custom resource for installing runtime artifacts in a predictable fashion'
version '5.0.0'
name 'ark'
maintainer 'Sous Chefs'
maintainer_email 'help@sous-chefs.org'
license 'Apache-2.0'
description 'Provides a custom resource for installing runtime artifacts in a predictable fashion'
version '6.0.3'
source_url 'https://github.com/sous-chefs/ark'
issues_url 'https://github.com/sous-chefs/ark/issues'
chef_version '>= 15.3'
%w(ubuntu debian redhat centos suse opensuse opensuseleap scientific oracle amazon windows mac_os_x smartos freebsd).each do |os|
supports os
end
supports 'amazon'
supports 'centos'
supports 'debian'
supports 'freebsd'
supports 'mac_os_x'
supports 'opensuse'
supports 'opensuseleap'
supports 'oracle'
supports 'redhat'
supports 'scientific'
supports 'smartos'
supports 'suse'
supports 'ubuntu'
supports 'windows'
depends 'seven_zip' # for windows os
source_url 'https://github.com/chef-cookbooks/ark'
issues_url 'https://github.com/chef-cookbooks/ark/issues'
chef_version '>= 14.0'
depends 'seven_zip', '>= 3.1' # for windows os

View File

@@ -20,4 +20,4 @@
package node['ark']['package_dependencies'] unless platform_family?('windows', 'mac_os_x')
include_recipe 'seven_zip' if platform_family?('windows')
seven_zip_tool 'ark' if platform_family?('windows')

View File

@@ -25,7 +25,7 @@ property :url, String, required: true
property :path, String
property :full_path, String
property :append_env_path, [true, false], default: false
property :checksum, regex: /^[a-zA-Z0-9]{64}$/, default: nil
property :checksum, String, regex: /^[a-zA-Z0-9]{64}$/
property :has_binaries, Array, default: []
property :creates, String
property :release_file, String, default: ''
@@ -46,6 +46,8 @@ property :autoconf_opts, Array, default: []
property :extension, String
property :backup, [FalseClass, Integer], default: 5
unified_mode true
#################
# action :install
#################
@@ -105,6 +107,9 @@ action :install do
to new_resource.path
end
# This directory doesn't exist by default on MacOS
directory '/etc/profile.d' if platform_family?('mac_os_x')
# Add to path for interactive bash sessions
template "/etc/profile.d/#{new_resource.name}.sh" do
cookbook 'ark'

View File

@@ -2,6 +2,36 @@
This file is used to list changes made in each version of golang.
## 5.3.1 - *2021-08-30*
- Standardise files with files in sous-chefs/repo-management
## 5.3.0 - *2021-07-15*
- Fix `unified_mode` declaration
- Bump `ark` dependency to one with `unified_mode` set
## 5.2.0 - *2021-06-04*
- Update example package to adhere with modern Go standards
## 5.1.0 - *2021-06-03*
- Fix resource to use the correct path in GOPATH profile.d template
## 5.0.1 - *2021-06-01*
- Standardise files with files in sous-chefs/repo-management
## 5.0.0 - *2021-05-21*
- Require chef 15.3 or greater
- Use unified_mode for chef 17 support
## 4.1.1 - *2021-02-03*
- Use `node['golang']['scm']` and `node['golang']['scm_packages']` attributes in default recipe.
## 4.1.0
- Create a custom resource to install Go from source or by downloading a package

View File

@@ -1,4 +0,0 @@
# Contributing
Please refer to
[https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD](https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD)

201
cookbooks/golang/LICENSE Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

115
cookbooks/golang/chefignore Normal file
View File

@@ -0,0 +1,115 @@
# Put files/directories that should be ignored in this file when uploading
# to a Chef Infra Server or Supermarket.
# Lines that start with '# ' are comments.
# OS generated files #
######################
.DS_Store
ehthumbs.db
Icon?
nohup.out
Thumbs.db
.envrc
# EDITORS #
###########
.#*
.project
.settings
*_flymake
*_flymake.*
*.bak
*.sw[a-z]
*.tmproj
*~
\#*
REVISION
TAGS*
tmtags
.vscode
.editorconfig
## COMPILED ##
##############
*.class
*.com
*.dll
*.exe
*.o
*.pyc
*.so
*/rdoc/
a.out
mkmf.log
# Testing #
###########
.circleci/*
.codeclimate.yml
.delivery/*
.foodcritic
.kitchen*
.mdlrc
.overcommit.yml
.rspec
.rubocop.yml
.travis.yml
.watchr
.yamllint
azure-pipelines.yml
Dangerfile
examples/*
features/*
Guardfile
kitchen.yml*
mlc_config.json
Procfile
Rakefile
spec/*
test/*
# SCM #
#######
.git
.gitattributes
.gitconfig
.github/*
.gitignore
.gitkeep
.gitmodules
.svn
*/.bzr/*
*/.git
*/.hg/*
*/.svn/*
# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp
# Bundler #
###########
vendor/*
Gemfile
Gemfile.lock
# Policyfile #
##############
Policyfile.rb
Policyfile.lock.json
# Documentation #
#############
CODE_OF_CONDUCT*
CONTRIBUTING*
documentation/*
TESTING*
UPGRADING*
# Vagrant #
###########
.vagrant
Vagrantfile

View File

@@ -0,0 +1,55 @@
---
driver:
name: dokken
privileged: true
transport:
name: dokken
provisioner:
name: dokken
product_name: chef
product_version: <%= ENV['CHEF_VERSION'] || 'latest' %>
chef_license: accept-no-persist
install_strategy: once
platforms:
- name: debian-9
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: debian-10
driver:
image: dokken/debian-10
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: centos-7
driver:
image: dokken/centos-7
platform: rhel
pid_one_command: /usr/lib/systemd/systemd
- name: centos-8
driver:
image: dokken/centos-8
platform: rhel
pid_one_command: /usr/lib/systemd/systemd
- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: ubuntu-20.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update

View File

@@ -1 +1,43 @@
{"name":"golang","version":"4.1.0","description":"Installs go programming language","long_description":"","maintainer":"Sous Chefs","maintainer_email":"help@sous-chefs.org","license":"Apache-2.0","platforms":{"debian":">= 0.0.0","ubuntu":">= 0.0.0","redhat":">= 0.0.0","centos":">= 0.0.0","fedora":">= 0.0.0","amazon":">= 0.0.0","scientific":">= 0.0.0","oracle":">= 0.0.0"},"dependencies":{"ark":"~> 5.0"},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/sous-chefs/golang","issues_url":"https://github.com/sous-chefs/golang/issues","chef_version":[[">= 14.0"]],"ohai_version":[]}
{
"name": "golang",
"description": "Installs go programming language",
"long_description": "",
"maintainer": "Sous Chefs",
"maintainer_email": "help@sous-chefs.org",
"license": "Apache-2.0",
"platforms": {
"debian": ">= 0.0.0",
"ubuntu": ">= 0.0.0",
"redhat": ">= 0.0.0",
"centos": ">= 0.0.0",
"fedora": ">= 0.0.0",
"amazon": ">= 0.0.0",
"scientific": ">= 0.0.0",
"oracle": ">= 0.0.0"
},
"dependencies": {
"ark": ">= 6.0"
},
"providing": {
},
"recipes": {
},
"version": "5.3.1",
"source_url": "https://github.com/sous-chefs/golang",
"issues_url": "https://github.com/sous-chefs/golang/issues",
"privacy": false,
"chef_versions": [
[
">= 15.3"
]
],
"ohai_versions": [
],
"gems": [
],
"eager_load_libraries": true
}

View File

@@ -5,8 +5,8 @@ license 'Apache-2.0'
description 'Installs go programming language'
source_url 'https://github.com/sous-chefs/golang'
issues_url 'https://github.com/sous-chefs/golang/issues'
chef_version '>= 14.0'
version '4.1.0'
chef_version '>= 15.3'
version '5.3.1'
supports 'debian'
supports 'ubuntu'
@@ -17,4 +17,4 @@ supports 'amazon'
supports 'scientific'
supports 'oracle'
depends 'ark', '~> 5.0'
depends 'ark', '>= 6.0'

View File

@@ -2,7 +2,7 @@
# Cookbook:: golang
# Recipe:: default
#
# Copyright:: 2013, Alexander Rozhnov
# Copyright:: 2013-2021, Alexander Rozhnov
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
@@ -21,6 +21,8 @@ golang 'Install go' do
from_source node['golang']['from_source']
version node['golang']['version'] if node['golang']['version'] # go version
source_version node['golang']['source_version'] if node['golang']['source_version'] # go version from source
scm node['golang']['scm']
scm_packages node['golang']['scm_packages']
owner node['golang']['owner'] if node['golang']['owner']
group node['golang']['group'] if node['golang']['group']
end

View File

@@ -2,7 +2,7 @@
# Cookbook:: golang
# Resource:: default
#
# Copyright:: 2020, Sous-chefs
# Copyright:: 2020-2021, Sous-chefs
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
@@ -17,6 +17,8 @@
# under the License.
#
unified_mode true
# Install golang by compiling from source
property :from_source, [true, false], default: false
@@ -99,7 +101,7 @@ action :install do
source 'golang.sh.erb'
mode new_resource.directory_mode
variables gobin: new_resource.gobin,
gopath: new_resource.gobin,
gopath: new_resource.gopath,
install_dir: new_resource.install_dir
end

View File

@@ -2,6 +2,22 @@
# Cookbook:: golang
# Resource:: default
#
# Copyright:: 2020-2021, Sous-chefs
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
unified_mode true
default_action :install

View File

@@ -2,6 +2,19 @@
This file is used to list changes made in each version of the mingw cookbook.
## 2.1.3 - *2021-08-31*
- Standardise files with files in sous-chefs/repo-management
## 2.1.1 (2020-06-02)
- Resolve cookstyle 5.8 warnings - [@tas50](https://github.com/tas50)
- Require Chef 12.15+ - [@tas50](https://github.com/tas50)
- Fix compatibility with Chef Infra Client 16 - [@xorimabot](https://github.com/xorimabot)
- resolved cookstyle error: resources/get.rb:26:1 warning: `ChefDeprecations/ResourceUsesOnlyResourceName`
- resolved cookstyle error: resources/msys2_package.rb:31:1 warning: `ChefDeprecations/ResourceUsesOnlyResourceName`
- resolved cookstyle error: resources/tdm_gcc.rb:26:1 warning: `ChefDeprecations/ResourceUsesOnlyResourceName`
## 2.1.0 (2018-07-24)
- refactor msys2 package source and checksum to attributes

View File

@@ -1,2 +0,0 @@
Please refer to
https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD

202
cookbooks/mingw/LICENSE Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -12,7 +12,7 @@ Installs a mingw/msys based compiler tools chain on windows. This is required fo
### Chef
- Chef 12.5+
- Chef 12.15+
### Cookbooks

115
cookbooks/mingw/chefignore Normal file
View File

@@ -0,0 +1,115 @@
# Put files/directories that should be ignored in this file when uploading
# to a Chef Infra Server or Supermarket.
# Lines that start with '# ' are comments.
# OS generated files #
######################
.DS_Store
ehthumbs.db
Icon?
nohup.out
Thumbs.db
.envrc
# EDITORS #
###########
.#*
.project
.settings
*_flymake
*_flymake.*
*.bak
*.sw[a-z]
*.tmproj
*~
\#*
REVISION
TAGS*
tmtags
.vscode
.editorconfig
## COMPILED ##
##############
*.class
*.com
*.dll
*.exe
*.o
*.pyc
*.so
*/rdoc/
a.out
mkmf.log
# Testing #
###########
.circleci/*
.codeclimate.yml
.delivery/*
.foodcritic
.kitchen*
.mdlrc
.overcommit.yml
.rspec
.rubocop.yml
.travis.yml
.watchr
.yamllint
azure-pipelines.yml
Dangerfile
examples/*
features/*
Guardfile
kitchen.yml*
mlc_config.json
Procfile
Rakefile
spec/*
test/*
# SCM #
#######
.git
.gitattributes
.gitconfig
.github/*
.gitignore
.gitkeep
.gitmodules
.svn
*/.bzr/*
*/.git
*/.hg/*
*/.svn/*
# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp
# Bundler #
###########
vendor/*
Gemfile
Gemfile.lock
# Policyfile #
##############
Policyfile.rb
Policyfile.lock.json
# Documentation #
#############
CODE_OF_CONDUCT*
CONTRIBUTING*
documentation/*
TESTING*
UPGRADING*
# Vagrant #
###########
.vagrant
Vagrantfile

View File

@@ -2,7 +2,7 @@
# Cookbook:: mingw
# Library:: _helper
#
# Copyright:: 2016, Chef Software, Inc.
# Copyright:: 2016-2019, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -35,4 +35,4 @@ module Mingw
end
end
Chef::Resource.send(:include, Mingw::Helper)
Chef::Resource.include Mingw::Helper

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,14 @@
name 'mingw'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache-2.0'
description 'Installs a mingw/msys based toolchain on windows'
version '2.1.3'
supports 'windows'
depends 'seven_zip'
source_url 'https://github.com/chef-cookbooks/mingw'
issues_url 'https://github.com/chef-cookbooks/mingw/issues'
chef_version '>= 12.15'

View File

@@ -2,7 +2,7 @@
# Cookbook:: mingw
# Recipe:: default
#
# Copyright:: 2016, Chef Software, Inc.
# Copyright:: 2016-2019, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View File

@@ -2,7 +2,7 @@
# Cookbook:: mingw
# Resource:: get
#
# Copyright:: 2016, Chef Software, Inc.
# Copyright:: 2016-2019, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -23,8 +23,6 @@
property :package, String, name_property: true
property :root, String, required: true
resource_name :mingw_get
action_class do
def mingw_do_action(action_cmd)
seven_zip_archive "fetching mingw-get to #{win_friendly_path(root)}" do

View File

@@ -2,7 +2,7 @@
# Cookbook:: mingw
# Resource:: msys2_package
#
# Copyright:: 2016, Chef Software, Inc.
# Copyright:: 2016-2019, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -19,16 +19,16 @@
# Installs msys2 base system and installs/upgrades packages within in.
#
# Where's the version flag? Where's idempotence you say? Well f*** you
# for trying to version your product. This is arch. They live on the edge.
# You never get anything but the latest version. And if that's broken...
# well that's your problem isn't it? And they don't believe in preserving
# older versions. Good luck!
# Where's the version flag? Where's idempotence you say? Well f*** you
# for trying to version your product. This is arch. They live on the edge.
# You never get anything but the latest version. And if that's broken...
# well that's your problem isn't it? And they don't believe in preserving
# older versions. Good luck!
property :package, String, name_property: true
property :root, String, required: true
resource_name :msys2_package
provides :msys2_package
action_class do
#
@@ -97,7 +97,7 @@ action_class do
cookbook 'mingw'
end
# $HOME is using files from /etc/skel. The home-directory creation step
# $HOME is using files from /etc/skel. The home-directory creation step
# will automatically be performed if other users log in - so if you wish
# to globally modify user first time setup, edit /etc/skel or add
# "post-setup" steps to /etc/post-install/
@@ -125,10 +125,10 @@ action :install do
msys2_do_action("installing #{package}", "pacman -S --needed --noconfirm #{package}")
end
# Package name is ignored. This is arch. Why would you ever upgrade a single
# package and its deps? That'll just break everything else that ever depended
# on a different version of that dep. Because arch is wonderful like that.
# So you only get the choice to move everything to latest or not... it's the
# Package name is ignored. This is arch. Why would you ever upgrade a single
# package and its deps? That'll just break everything else that ever depended
# on a different version of that dep. Because arch is wonderful like that.
# So you only get the choice to move everything to latest or not... it's the
# most agile development possible!
action :upgrade do
msys2_do_action("upgrading #{package}", "pacman -Syu --noconfirm #{package}")

View File

@@ -2,7 +2,7 @@
# Cookbook:: mingw
# Resource:: tdm_gcc
#
# Copyright:: 2016, Chef Software, Inc.
# Copyright:: 2016-2019, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -23,8 +23,6 @@ property :flavor, Symbol, is: [:sjlj_32, :seh_sjlj_64], default: :seh_sjlj_64
property :root, String, required: true
property :version, String, is: ['5.1.0'], name_property: true
resource_name :mingw_tdm_gcc
tdm_gcc_64 = {
'http://iweb.dl.sourceforge.net/project/tdm-gcc/TDM-GCC%205%20series/5.1.0-tdm64-1/gcc-5.1.0-tdm64-1-core.tar.lzma' =>
'29393aac890847089ad1e93f81a28f6744b1609c00b25afca818f3903e42e4bd',

View File

@@ -2,6 +2,13 @@
All notable changes to this project will be documented in this file.
## 8.7.4 - 2020-09-16
- resolved cookstyle error: spec/mysql_client_installation_package_spec.rb:4:48 warning: `ChefDeprecations/DeprecatedChefSpecPlatform`
- resolved cookstyle error: spec/mysql_server_installation_package_spec.rb:4:48 warning: `ChefDeprecations/DeprecatedChefSpecPlatform`
- Use mysql_test cookbook attributes for testing
- Cookstyle Bot Auto Corrections with Cookstyle 6.17.6
## 8.7.3 - 2020-07-22
- restore resource_name in mysql_service for Chef Infra Client < 16

View File

@@ -3,48 +3,48 @@ module MysqlCookbook
require 'shellwords'
def el6?
return true if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 6
return true if platform_family?('rhel') && node['platform_version'].to_i == 6
false
end
def el7?
return true if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 7
return true if platform_family?('rhel') && node['platform_version'].to_i == 7
false
end
def fedora?
return true if node['platform_family'] == 'fedora'
return true if platform_family?('fedora')
false
end
def suse?
return true if node['platform_family'] == 'suse'
return true if platform_family?('suse')
false
end
def jessie?
return true if node['platform'] == 'debian' && node['platform_version'].to_i == 8
return true if platform?('debian') && node['platform_version'].to_i == 8
false
end
def stretch?
return true if node['platform'] == 'debian' && node['platform_version'].to_i == 9
return true if platform?('debian') && node['platform_version'].to_i == 9
false
end
def trusty?
return true if node['platform'] == 'ubuntu' && node['platform_version'] == '14.04'
return true if node['platform'] == 'linuxmint' && node['platform_version'] =~ /^17\.[0-9]$/
return true if platform?('ubuntu') && node['platform_version'] == '14.04'
return true if platform?('linuxmint') && node['platform_version'] =~ /^17\.[0-9]$/
false
end
def xenial?
return true if node['platform'] == 'ubuntu' && node['platform_version'] == '16.04'
return true if platform?('ubuntu') && node['platform_version'] == '16.04'
false
end
def bionic?
return true if node['platform'] == 'ubuntu' && node['platform_version'] == '18.04'
return true if platform?('ubuntu') && node['platform_version'] == '18.04'
false
end
@@ -70,7 +70,7 @@ module MysqlCookbook
# rhelish
return '5.6' if el6?
return '5.6' if el7?
return '5.6' if node['platform'] == 'amazon'
return '5.6' if platform?('amazon')
# debian
return '5.5' if jessie?
@@ -81,7 +81,7 @@ module MysqlCookbook
return '5.7' if bionic?
# misc
return '5.6' if node['platform'] == 'freebsd'
return '5.6' if platform?('freebsd')
return '5.7' if fedora?
return '5.6' if suse?
end
@@ -105,25 +105,25 @@ module MysqlCookbook
def default_client_package_name
return %w(mysql mysql-devel) if major_version == '5.1' && el6?
return %w(mysql mysql-devel) if el7?
return ['mysql55', 'mysql55-devel.x86_64'] if major_version == '5.5' && node['platform'] == 'amazon'
return ['mysql56', 'mysql56-devel.x86_64'] if major_version == '5.6' && node['platform'] == 'amazon'
return ['mysql57', 'mysql57-devel.x86_64'] if major_version == '5.7' && node['platform'] == 'amazon'
return ['mysql-client-5.5', 'libmysqlclient-dev'] if major_version == '5.5' && node['platform_family'] == 'debian'
return ['mysql-client-5.6', 'libmysqlclient-dev'] if major_version == '5.6' && node['platform_family'] == 'debian'
return ['mysql-client-5.7', 'libmysqlclient-dev'] if major_version == '5.7' && node['platform_family'] == 'debian'
return 'mysql-community-server-client' if major_version == '5.6' && node['platform_family'] == 'suse'
return ['mysql55', 'mysql55-devel.x86_64'] if major_version == '5.5' && platform?('amazon')
return ['mysql56', 'mysql56-devel.x86_64'] if major_version == '5.6' && platform?('amazon')
return ['mysql57', 'mysql57-devel.x86_64'] if major_version == '5.7' && platform?('amazon')
return ['mysql-client-5.5', 'libmysqlclient-dev'] if major_version == '5.5' && platform_family?('debian')
return ['mysql-client-5.6', 'libmysqlclient-dev'] if major_version == '5.6' && platform_family?('debian')
return ['mysql-client-5.7', 'libmysqlclient-dev'] if major_version == '5.7' && platform_family?('debian')
return 'mysql-community-server-client' if major_version == '5.6' && platform_family?('suse')
%w(mysql-community-client mysql-community-devel)
end
def default_server_package_name
return 'mysql-server' if major_version == '5.1' && el6?
return 'mysql55-server' if major_version == '5.5' && node['platform'] == 'amazon'
return 'mysql56-server' if major_version == '5.6' && node['platform'] == 'amazon'
return 'mysql57-server' if major_version == '5.7' && node['platform'] == 'amazon'
return 'mysql-server-5.5' if major_version == '5.5' && node['platform_family'] == 'debian'
return 'mysql-server-5.6' if major_version == '5.6' && node['platform_family'] == 'debian'
return 'mysql-server-5.7' if major_version == '5.7' && node['platform_family'] == 'debian'
return 'mysql-community-server' if major_version == '5.6' && node['platform_family'] == 'suse'
return 'mysql55-server' if major_version == '5.5' && platform?('amazon')
return 'mysql56-server' if major_version == '5.6' && platform?('amazon')
return 'mysql57-server' if major_version == '5.7' && platform?('amazon')
return 'mysql-server-5.5' if major_version == '5.5' && platform_family?('debian')
return 'mysql-server-5.6' if major_version == '5.6' && platform_family?('debian')
return 'mysql-server-5.7' if major_version == '5.7' && platform_family?('debian')
return 'mysql-community-server' if major_version == '5.6' && platform_family?('suse')
'mysql-community-server'
end
@@ -132,33 +132,33 @@ module MysqlCookbook
end
def run_dir
return "#{prefix_dir}/var/run/#{mysql_name}" if node['platform_family'] == 'rhel'
return "/run/#{mysql_name}" if node['platform_family'] == 'debian'
return "#{prefix_dir}/var/run/#{mysql_name}" if platform_family?('rhel')
return "/run/#{mysql_name}" if platform_family?('debian')
"/var/run/#{mysql_name}"
end
def prefix_dir
return "/opt/mysql#{pkg_ver_string}" if node['platform_family'] == 'omnios'
return '/opt/local' if node['platform_family'] == 'smartos'
return "/opt/mysql#{pkg_ver_string}" if platform_family?('omnios')
return '/opt/local' if platform_family?('smartos')
return "/opt/rh/#{scl_name}/root" if scl_package?
end
def scl_name
return unless node['platform_family'] == 'rhel'
return unless platform_family?('rhel')
return 'mysql51' if version == '5.1' && node['platform_version'].to_i == 5
return 'mysql55' if version == '5.5' && node['platform_version'].to_i == 5
end
def scl_package?
return unless node['platform_family'] == 'rhel'
return unless platform_family?('rhel')
return true if version == '5.1' && node['platform_version'].to_i == 5
return true if version == '5.5' && node['platform_version'].to_i == 5
false
end
def etc_dir
return "/opt/mysql#{pkg_ver_string}/etc/#{mysql_name}" if node['platform_family'] == 'omnios'
return "#{prefix_dir}/etc/#{mysql_name}" if node['platform_family'] == 'smartos'
return "/opt/mysql#{pkg_ver_string}/etc/#{mysql_name}" if platform_family?('omnios')
return "#{prefix_dir}/etc/#{mysql_name}" if platform_family?('smartos')
"#{prefix_dir}/etc/#{mysql_name}"
end
@@ -167,10 +167,10 @@ module MysqlCookbook
end
def system_service_name
return 'mysql51-mysqld' if node['platform_family'] == 'rhel' && scl_name == 'mysql51'
return 'mysql55-mysqld' if node['platform_family'] == 'rhel' && scl_name == 'mysql55'
return 'mysqld' if node['platform_family'] == 'rhel'
return 'mysqld' if node['platform_family'] == 'fedora'
return 'mysql51-mysqld' if platform_family?('rhel') && scl_name == 'mysql51'
return 'mysql55-mysqld' if platform_family?('rhel') && scl_name == 'mysql55'
return 'mysqld' if platform_family?('rhel')
return 'mysqld' if platform_family?('fedora')
'mysql' # not one of the above
end
@@ -191,7 +191,7 @@ module MysqlCookbook
end
def log_dir
return "/var/adm/log/#{mysql_name}" if node['platform_family'] == 'omnios'
return "/var/adm/log/#{mysql_name}" if platform_family?('omnios')
"#{prefix_dir}/var/log/#{mysql_name}"
end
@@ -258,8 +258,8 @@ EOSQL
end
def mysql_install_db_bin
return "#{base_dir}/scripts/mysql_install_db" if node['platform_family'] == 'omnios'
return "#{prefix_dir}/bin/mysql_install_db" if node['platform_family'] == 'smartos'
return "#{base_dir}/scripts/mysql_install_db" if platform_family?('omnios')
return "#{prefix_dir}/bin/mysql_install_db" if platform_family?('smartos')
'mysql_install_db'
end
@@ -273,14 +273,14 @@ EOSQL
end
def mysqladmin_bin
return "#{prefix_dir}/bin/mysqladmin" if node['platform_family'] == 'smartos'
return "#{prefix_dir}/bin/mysqladmin" if platform_family?('smartos')
return 'mysqladmin' if scl_package?
"#{prefix_dir}/usr/bin/mysqladmin"
end
def mysqld_bin
return "#{prefix_dir}/libexec/mysqld" if node['platform_family'] == 'smartos'
return "#{base_dir}/bin/mysqld" if node['platform_family'] == 'omnios'
return "#{prefix_dir}/libexec/mysqld" if platform_family?('smartos')
return "#{base_dir}/bin/mysqld" if platform_family?('omnios')
return '/usr/sbin/mysqld' if fedora? && v56plus
return '/usr/libexec/mysqld' if fedora?
return 'mysqld' if scl_package?
@@ -289,14 +289,14 @@ EOSQL
def mysql_systemd_start_pre
return '/usr/bin/mysqld_pre_systemd' if v57plus && (el7? || fedora?)
return '/usr/bin/mysql-systemd-start pre' if node['platform_family'] == 'rhel'
return '/usr/bin/mysql-systemd-start pre' if platform_family?('rhel')
return '/usr/lib/mysql/mysql-systemd-helper install' if suse?
'/usr/share/mysql/mysql-systemd-start pre'
end
def mysql_systemd
return "/usr/libexec/#{mysql_name}-wait-ready $MAINPID" if v57plus && (el7? || fedora?)
return '/usr/bin/mysql-systemd-start' if node['platform_family'] == 'rhel'
return '/usr/bin/mysql-systemd-start' if platform_family?('rhel')
return '/usr/share/mysql/mysql-systemd-start' if v57plus
"/usr/libexec/#{mysql_name}-wait-ready $MAINPID"
end
@@ -311,8 +311,8 @@ EOSQL
end
def mysqld_safe_bin
return "#{prefix_dir}/bin/mysqld_safe" if node['platform_family'] == 'smartos'
return "#{base_dir}/bin/mysqld_safe" if node['platform_family'] == 'omnios'
return "#{prefix_dir}/bin/mysqld_safe" if platform_family?('smartos')
return "#{base_dir}/bin/mysqld_safe" if platform_family?('omnios')
return 'mysqld_safe' if scl_package?
"#{prefix_dir}/usr/bin/mysqld_safe"
end

View File

@@ -123,7 +123,7 @@ module MysqlCookbook
def configure_apparmor
# Do not add these resource if inside a container
# Only valid on Ubuntu
return if ::File.exist?('/.dockerenv') || ::File.exist?('/.dockerinit') || node['platform'] != 'ubuntu'
return if ::File.exist?('/.dockerenv') || ::File.exist?('/.dockerinit') || !platform?('ubuntu')
# Apparmor
package 'apparmor' do

View File

@@ -1 +1 @@
{"name":"mysql","version":"8.7.3","description":"Provides mysql_service, mysql_config, and mysql_client resources","long_description":"","maintainer":"Sous Chefs","maintainer_email":"help@sous-chefs.org","license":"Apache-2.0","platforms":{"redhat":">= 6.0","centos":">= 6.0","scientific":">= 6.0","oracle":">= 6.0","amazon":">= 0.0.0","fedora":">= 0.0.0","debian":">= 7.0","ubuntu":">= 14.04","opensuseleap":">= 0.0.0","suse":">= 12.0"},"dependencies":{},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/sous-chefs/mysql","issues_url":"https://github.com/sous-chefs/mysql/issues","chef_version":[[">= 12.7"]],"ohai_version":[]}
{"name":"mysql","version":"8.7.4","description":"Provides mysql_service, mysql_config, and mysql_client resources","long_description":"","maintainer":"Sous Chefs","maintainer_email":"help@sous-chefs.org","license":"Apache-2.0","platforms":{"redhat":">= 6.0","centos":">= 6.0","scientific":">= 6.0","oracle":">= 6.0","amazon":">= 0.0.0","fedora":">= 0.0.0","debian":">= 7.0","ubuntu":">= 14.04","opensuseleap":">= 0.0.0","suse":">= 12.0"},"dependencies":{},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/sous-chefs/mysql","issues_url":"https://github.com/sous-chefs/mysql/issues","chef_version":[[">= 12.7"]],"ohai_version":[]}

View File

@@ -6,7 +6,7 @@ description 'Provides mysql_service, mysql_config, and mysql_client resour
source_url 'https://github.com/sous-chefs/mysql'
issues_url 'https://github.com/sous-chefs/mysql/issues'
chef_version '>= 12.7'
version '8.7.3'
version '8.7.4'
%w(redhat centos scientific oracle).each do |el|
supports el, '>= 6.0'

View File

@@ -1,5 +1,13 @@
# NodeJS Cookbook Changelog
## 7.3.3 - *2021-08-30*
- Standardise files with files in sous-chefs/repo-management
## 7.3.2 - *2021-06-01*
- Standardise files with files in sous-chefs/repo-management
## 7.3.1 - *2020-12-31*
- resolved cookstyle error: attributes/packages.rb:15:55 convention: `Layout/TrailingEmptyLines`

View File

@@ -29,7 +29,7 @@
"recipes": {
},
"version": "7.3.1",
"version": "7.3.3",
"source_url": "https://github.com/redguide/nodejs",
"issues_url": "https://github.com/redguide/nodejs/issues",
"privacy": false,

View File

@@ -6,7 +6,7 @@ description 'Installs/Configures node.js'
source_url 'https://github.com/redguide/nodejs'
issues_url 'https://github.com/redguide/nodejs/issues'
chef_version '>= 14'
version '7.3.1'
version '7.3.3'
depends 'ark', '>= 2.0.2'
depends 'chocolatey', '>= 3.0'

View File

@@ -2,6 +2,10 @@
This file is used to list changes made in each version of the PHP cookbook.
## 8.0.1 (2020-11-12)
- Prevent Apache from being pulled in as a dependency on Ubuntu 20.04 (#311)
## 8.0.0 (2020-07-09)
- Drop support for:

View File

@@ -127,8 +127,7 @@ when 'debian'
default['php']['checksum'] = 'a554a510190e726ebe7157fb00b4aceabdb50c679430510a3b93cbf5d7546e44'
default['php']['conf_dir'] = '/etc/php/7.4/cli'
default['php']['src_deps'] = %w(libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg62-dev libkrb5-dev libmcrypt-dev libpng-dev libssl-dev pkg-config libxml2-dev libsqlite3-dev libonig-dev)
# Ubuntu >= 20.04 drops versions from the package names
default['php']['packages'] = %w(php-cgi php php-dev php-cli php-pear)
default['php']['packages'] = %w(php7.4-cgi php7.4 php7.4-dev php7.4-cli php-pear)
default['php']['fpm_package'] = 'php7.4-fpm'
default['php']['fpm_pooldir'] = '/etc/php/7.4/fpm/pool.d'
default['php']['fpm_service'] = 'php7.4-fpm'

View File

@@ -1 +1 @@
{"name":"php","version":"8.0.0","description":"Installs and maintains php and php modules","long_description":"","maintainer":"Sous Chefs","maintainer_email":"help@sous-chefs.org","license":"Apache-2.0","platforms":{"amazon":">= 2.0","centos":">= 7.0","debian":">= 9.0","oracle":">= 7.0","redhat":">= 7.0","scientific":">= 7.0","ubuntu":">= 16.04"},"dependencies":{"yum-epel":">= 0.0.0"},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/sous-chefs/php","issues_url":"https://github.com/sous-chefs/php/issues","chef_version":[[">= 14.0"]],"ohai_version":[]}
{"name":"php","version":"8.0.1","description":"Installs and maintains php and php modules","long_description":"","maintainer":"Sous Chefs","maintainer_email":"help@sous-chefs.org","license":"Apache-2.0","platforms":{"amazon":">= 2.0","centos":">= 7.0","debian":">= 9.0","oracle":">= 7.0","redhat":">= 7.0","scientific":">= 7.0","ubuntu":">= 16.04"},"dependencies":{"yum-epel":">= 0.0.0"},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{},"groupings":{},"recipes":{},"source_url":"https://github.com/sous-chefs/php","issues_url":"https://github.com/sous-chefs/php/issues","chef_version":[[">= 14.0"]],"ohai_version":[]}

View File

@@ -1,12 +1,12 @@
name 'php'
maintainer 'Sous Chefs'
maintainer_email 'help@sous-chefs.org'
license 'Apache-2.0'
description 'Installs and maintains php and php modules'
source_url 'https://github.com/sous-chefs/php'
issues_url 'https://github.com/sous-chefs/php/issues'
chef_version '>= 14.0'
version '8.0.0'
name 'php'
maintainer 'Sous Chefs'
maintainer_email 'help@sous-chefs.org'
license 'Apache-2.0'
description 'Installs and maintains php and php modules'
source_url 'https://github.com/sous-chefs/php'
issues_url 'https://github.com/sous-chefs/php/issues'
chef_version '>= 14.0'
version '8.0.1'
depends 'yum-epel'

View File

@@ -0,0 +1,104 @@
# CHANGELOG for seven_zip
This file is used to list changes made in each version of seven_zip.
## 4.2.2 - *2021-08-31*
- Standardise files with files in sous-chefs/repo-management
## 4.2.1 - *2021-06-07*
- [CI] Change ActionsHub actions to main
- [CI] Change checkout action to v2
- [CI] Change final step to an echo for faster final step
## 4.2.0 - *2021-06-07*
- Add remove action to seven_zip_tool
## 4.1.1 - *2021-06-01*
- Update delivery configuration
## 4.1.0 - *2021-05-20*
- Reduce Chef requirement to >= 15.3
## 4.0.0 - *2021-04-29*
- Increase the supported version of Chef to Chef 16
This is inline with our support policies, allowing us to use the newest Chef features
- Remove dependency on the deprecated Windows cookbook
- Convert to modern custom resources
- Remove the default recipe
- Remove default_spec as we no longer have a default recipe
- Use the Chef `execute` and `directory` resources rather than Ruby methods
- Pull Windows helpers from the Windows cookbook and fix them to work in this cookbook
As the Windows cookbook is no longer maintained many of the methods we used were deprecated
in Ruby 2.7 but were never fixed. These methods have now been removed in Ruby 3.0
- Move resource documentation to the documentation/resource directory.
- Update README to reflect new usage
## 3.2.0 - *2021-01-24*
- Sous Chefs Adoption
- Standardise files with files in sous-chefs/repo-management
- Various Cookstyle fixes
- Migrate from ServerSpec to InSpec for integration testing
- Update to 7-Zip 19.00
## 3.1.2
- Update nokogiri from [1.8.2 to 1.8.5](https://snyk.io/vuln/SNYK-RUBY-NOKOGIRI-72433)
## 3.1.1
- Fix deprecation warning regarding the use of `win_friendly_path` helper.
## 3.1.0
- Having a simple resource to setup 7-zip allows other resources (since including a recipe inside a resource is not a good pattern) to use it to ensure that their prerequisites are installed before-hand.
- This resource leverage existing attributes as default values to keep backward compatibility.
- The `seven_zip::default` recipe's code has been refactored to just use this resource.
## 3.0.0
- Support Chef 13, drop support for Chef 12.
- Upgrade to 7-Zip 18.05.
- Standardize testing environment across repos. (AppVeyor, Kitchen, Rake, etc.)
- Upgrade development dependencies.
## 2.0.2
- Add timeout to extract action on `seven_zip` resource and configurable `default_extract_timeout` attribute.
## 2.0.1
- [GH Issue 21 - NoMethodError: Undefined method or attribute kernel on node](https://github.com/daptiv/seven_zip/issues/21).
## 2.0.0
- [Upgrade to 7-Zip 15.14](https://github.com/daptiv/seven_zip/pull/9).
- [7-Zip now installed to the default MSI location by default](https://github.com/daptiv/seven_zip/pull/11).
- [7z.exe is located using the Windows registry unless the home attribute is explicitly set](https://github.com/daptiv/seven_zip/pull/10).
- [7-Zip is only added to the Windows PATH if the syspath attribute is set](https://github.com/daptiv/seven_zip/pull/11).
- [Installation idempotence check was fixed](https://github.com/daptiv/seven_zip/pull/14), package name was corrected.
- [TravisCI build added](https://github.com/daptiv/seven_zip/pull/12).
- [ServerSpec tests added](https://github.com/daptiv/seven_zip/pull/9)
- [Document Archive LRWP](https://github.com/daptiv/seven_zip/pull/6)
## 1.0.2
- [COOK-3476 - Upgrade to 7-zip 9.22](https://tickets.opscode.com/browse/COOK-3476)
## 1.0.0
- initial release
---
Refer to the [Markdown Syntax Guide](https://daringfireball.net/projects/markdown/syntax) for help with standard Markdown, and [Writing on GitHub](https://help.github.com/categories/writing-on-github/) for help with the GitHub dialect of Markdown.

View File

@@ -1,8 +0,0 @@
source 'http://rubygems.org'
gem 'cookstyle'
gem 'foodcritic'
gem 'rspec-expectations'
gem 'rspec-mocks'
gem 'rubocop'
gem 'stove'

View File

@@ -1,79 +0,0 @@
GEM
remote: http://rubygems.org/
specs:
ast (2.4.0)
backports (3.11.3)
chef-api (0.8.0)
logify (~> 0.1)
mime-types
cookstyle (3.0.0)
rubocop (= 0.55.0)
cucumber-core (3.1.0)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (>= 5.0.0)
cucumber-tag_expressions (1.1.1)
diff-lcs (1.3)
erubis (2.7.0)
ffi-yajl (2.3.1)
libyajl2 (~> 1.2)
foodcritic (13.1.1)
cucumber-core (>= 1.3)
erubis
ffi-yajl (~> 2.0)
nokogiri (>= 1.5, < 2.0)
rake
rufus-lru (~> 1.0)
treetop (~> 1.4)
gherkin (5.0.0)
libyajl2 (1.2.0)
logify (0.2.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.3.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
parallel (1.12.1)
parser (2.5.1.0)
ast (~> 2.4.0)
polyglot (0.3.5)
powerpack (0.1.1)
rainbow (3.0.0)
rake (12.3.1)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
rubocop (0.55.0)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-progressbar (1.9.0)
rufus-lru (1.1.0)
stove (6.0.0)
chef-api (~> 0.5)
logify (~> 0.2)
treetop (1.6.10)
polyglot (~> 0.3)
unicode-display_width (1.3.2)
PLATFORMS
ruby
DEPENDENCIES
cookstyle
foodcritic
rspec-expectations
rspec-mocks
rubocop
stove
BUNDLED WITH
1.16.1

View File

@@ -1,11 +1,21 @@
[![Cookbook Version](http://img.shields.io/cookbook/v/seven_zip.svg)](https://supermarket.chef.io/cookbooks/seven_zip)
[![Build status](https://ci.appveyor.com/api/projects/status/y1lsnlkd2b3q6gfd/branch/master?svg=true)](https://ci.appveyor.com/project/ChefWindowsCookbooks65871/seven-zip/branch/master)
# seven_zip Cookbook
[![Cookbook Version](https://img.shields.io/cookbook/v/seven_zip.svg)](https://supermarket.chef.io/cookbooks/seven_zip)
[![CI State](https://github.com/sous-chefs/seven_zip/workflows/ci/badge.svg)](https://github.com/sous-chefs/seven_zip/actions?query=workflow%3Aci)
[![OpenCollective](https://opencollective.com/sous-chefs/backers/badge.svg)](#backers)
[![OpenCollective](https://opencollective.com/sous-chefs/sponsors/badge.svg)](#sponsors)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)
[7-Zip](http://www.7-zip.org/) is a file archiver with a high compression ratio. This cookbook installs the full 7-Zip suite of tools (GUI and CLI). This cookbook replaces the older [7-Zip cookbook](https://github.com/sneal/7-zip).
# Requirements
## Maintainers
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If youd like to know more please visit [sous-chefs.org](https://sous-chefs.org/) or come chat with us on the Chef Community Slack in [#sous-chefs](https://chefcommunity.slack.com/messages/C2V7B88SF).
## Requirements
## Platforms
- Windows XP
- Windows Vista
- Windows 7
@@ -16,99 +26,37 @@
- Windows Server 2012 (R1, R2)
## Chef
- Chef >= 13.0
## Cookbooks
- windows
- Chef >= 16.0
# Attributes
## Optional
## Usage
| Key | Type | Description | Default |
|-----|------|-------------|---------|
| `['seven_zip']['home']` | String | 7-Zip installation directory. | |
| `['seven_zip']['syspath']` | Boolean | If true, adds 7-Zip directory to system PATH environment variable. | |
| `['seven_zip']['default_extract_timeout']` | Integer | The default timeout for an extract operation in seconds. This can be overridden by a resource attribute. | `600` |
## Resources
# Usage
## default
- [seven_zip_tool](https://github.com/sous-chefs/seven_zip/blob/master/documentation/resources/seven_zip_tool.md)
- [seven_zip_archive](https://github.com/sous-chefs/seven_zip/blob/master/documentation/resources/seven_zip_archive.md)
Add `seven_zip::default` to your run\_list which will download and install 7-Zip for the current Windows platform.
## Contributors
# Resource/Provider
## seven_zip_archive
Extracts a 7-Zip compatible archive (iso, zip, 7z, etc.) to the specified destination directory.
This project exists thanks to all the people who [contribute.](https://opencollective.com/sous-chefs/contributors.svg?width=890&button=false)
#### Actions
- `:extract` - Extract a 7-Zip compatible archive.
### Backers
#### Attribute Parameters
- `path` - Name attribute. The destination to extract to.
- `source` - The file path to the archive to extract.
- `overwrite` - Defaults to false. If true, the destination files will be overwritten.
- `checksum` - The archive file checksum.
- `timeout` - The extract action timeout in seconds, defaults to `node['seven_zip']['default_extract_timeout']`.
Thank you to all our backers!
#### Examples
Extract 7-Zip source files to `C:\seven_zip_source`.
![https://opencollective.com/sous-chefs#backers](https://opencollective.com/sous-chefs/backers.svg?width=600&avatarHeight=40)
```ruby
seven_zip_archive 'seven_zip_source' do
path 'C:\seven_zip_source'
source 'https://www.7-zip.org/a/7z1805-src.7z'
overwrite true
checksum 'd9acfcbbdcad078435586e00f73909358ed8d714d106e064dcba52fa73e75d83'
timeout 30
end
```
### Sponsors
## seven_zip_tool
Download and install 7-zip for the current Windows platform.
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
#### Actions
- `:install` - Installs 7-zip
- `:add_to_path` - Add 7-zip to the PATH
#### Attribute Parameters
- `package` - The name of the package.
- `path` - The install directory of 7-zip.
- `source` - The source URL of the 7-zip package.
- `checksum` - The 7-zip package checksum.
#### Examples
Install 7-zip in `C:\7z` and add it to the path.
```ruby
seven_zip_tool '7z 15.14 install' do
action [:install, :add_to_path]
package '7-Zip 15.14'
path 'C:\7z'
source 'http://www.7-zip.org/a/7z1514.msi'
checksum 'eaf58e29941d8ca95045946949d75d9b5455fac167df979a7f8e4a6bf2d39680'
end
```
# Recipes
## default
Installs 7-Zip and adds it to your system PATH.
# License & Authors
- Author:: Seth Chisamore (<schisamo@chef.io>)
- Author:: Shawn Neal (<sneal@sneal.net>)
```text
Copyright:: 2011-2016, Chef Software, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
![https://opencollective.com/sous-chefs/sponsor/0/website](https://opencollective.com/sous-chefs/sponsor/0/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/1/website](https://opencollective.com/sous-chefs/sponsor/1/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/2/website](https://opencollective.com/sous-chefs/sponsor/2/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/3/website](https://opencollective.com/sous-chefs/sponsor/3/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/4/website](https://opencollective.com/sous-chefs/sponsor/4/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/5/website](https://opencollective.com/sous-chefs/sponsor/5/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/6/website](https://opencollective.com/sous-chefs/sponsor/6/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/7/website](https://opencollective.com/sous-chefs/sponsor/7/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/8/website](https://opencollective.com/sous-chefs/sponsor/8/avatar.svg?avatarHeight=100)
![https://opencollective.com/sous-chefs/sponsor/9/website](https://opencollective.com/sous-chefs/sponsor/9/avatar.svg?avatarHeight=100)

View File

@@ -1,42 +0,0 @@
version: "3.1.1.{build}-{branch}"
image: Visual Studio 2013
platform: x64
environment:
machine_user: vagrant
machine_pass: vagrant
KITCHEN_YAML: .kitchen.appveyor.yml
branches:
only:
- master
# Do not build on tags (GitHub only)
skip_tags: true
#faster cloning
clone_depth: 1
install:
- ps: (& cmd /c); iex (irm https://omnitruck.chef.io/install.ps1); Install-Project -Project chefdk -channel stable -version 3.10.1
- ps: 'Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version'
- ps: $PSVersionTable
- c:\opscode\chefdk\bin\chef.bat exec ruby --version
- ps: secedit /export /cfg $env:temp/export.cfg
- ps: ((get-content $env:temp/export.cfg) -replace ('PasswordComplexity = 1', 'PasswordComplexity = 0')) | Out-File $env:temp/export.cfg
- ps: ((get-content $env:temp/export.cfg) -replace ('MinimumPasswordLength = 8', 'MinimumPasswordLength = 0')) | Out-File $env:temp/export.cfg
- ps: secedit /configure /db $env:windir/security/new.sdb /cfg $env:temp/export.cfg /areas SECURITYPOLICY
- ps: net user /add $env:machine_user $env:machine_pass
- ps: net localgroup administrators $env:machine_user /add
build_script:
- ps: c:\opscode\chefdk\bin\chef.bat shell-init powershell | iex; cmd /c c:\opscode\chefdk\bin\chef.bat --version
test_script:
- c:\opscode\chefdk\bin\cookstyle --version
- c:\opscode\chefdk\bin\chef.bat exec foodcritic --version
- c:\opscode\chefdk\bin\chef.bat exec rake
- c:\opscode\chefdk\bin\chef.bat exec kitchen verify
deploy: off

View File

@@ -1,31 +0,0 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: seven_zip
# Attribute:: default
#
# Copyright:: 2011-2017, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if node['kernel']['machine'] == 'x86_64'
default['seven_zip']['url'] = 'https://www.7-zip.org/a/7z1805-x64.msi'
default['seven_zip']['checksum'] = '898c1ca0015183fe2ba7d55cacf0a1dea35e873bf3f8090f362a6288c6ef08d7'
default['seven_zip']['package_name'] = '7-Zip 18.05 (x64 edition)'
else
default['seven_zip']['url'] = 'https://www.7-zip.org/a/7z1805.msi'
default['seven_zip']['checksum'] = 'c554238bee18a03d736525e06d9258c9ecf7f64ead7c6b0d1eb04db2c0de30d0'
default['seven_zip']['package_name'] = '7-Zip 18.05'
end
default['seven_zip']['default_extract_timeout'] = 600

View File

@@ -1,73 +1,85 @@
# Put files/directories that should be ignored in this file when uploading
# to a Chef Infra Server or Supermarket.
# Lines that start with '# ' are comments.
# OS generated files #
######################
.DS_Store
ehthumbs.db
Icon?
nohup.out
ehthumbs.db
Thumbs.db
# SASS #
########
.sass-cache
.envrc
# EDITORS #
###########
\#*
.#*
*~
*.sw[a-z]
.project
.settings
*_flymake
*_flymake.*
*.bak
*.sw[a-z]
*.tmproj
*~
\#*
REVISION
TAGS*
tmtags
*_flymake.*
*_flymake
*.tmproj
.project
.settings
mkmf.log
.vscode
.editorconfig
## COMPILED ##
##############
a.out
*.class
*.com
*.dll
*.exe
*.o
*.pyc
*.so
*.com
*.class
*.dll
*.exe
*/rdoc/
a.out
mkmf.log
# Testing #
###########
.watchr
.rspec
spec/*
spec/fixtures/*
test/*
features/*
examples/*
Guardfile
Procfile
.kitchen*
.rubocop.yml
spec/*
Rakefile
.travis.yml
.foodcritic
.circleci/*
.codeclimate.yml
.delivery/*
.foodcritic
.kitchen*
.mdlrc
.overcommit.yml
.rspec
.rubocop.yml
.travis.yml
.watchr
.yamllint
azure-pipelines.yml
Dangerfile
examples/*
features/*
Guardfile
kitchen.yml*
mlc_config.json
Procfile
Rakefile
spec/*
test/*
# SCM #
#######
.git
*/.git
.gitignore
.gitmodules
.gitconfig
.gitattributes
.gitconfig
.github/*
.gitignore
.gitkeep
.gitmodules
.svn
*/.bzr/*
*/.git
*/.hg/*
*/.svn/*
@@ -78,19 +90,24 @@ Berksfile.lock
cookbooks/*
tmp
# Cookbooks #
#############
CONTRIBUTING*
CHANGELOG*
TESTING*
MAINTAINERS.toml
# Bundler #
###########
vendor/*
Gemfile
Gemfile.lock
# Strainer #
############
Colanderfile
Strainerfile
.colander
.strainer
# Policyfile #
##############
Policyfile.rb
Policyfile.lock.json
# Documentation #
#############
CODE_OF_CONDUCT*
CONTRIBUTING*
documentation/*
TESTING*
UPGRADING*
# Vagrant #
###########

View File

@@ -0,0 +1,15 @@
---
driver:
name: exec
transport:
name: exec
provisioner:
name: chef_zero
enforce_idempotency: true
multiple_converge: 2
deprecations_as_errors: true
platforms:
- name: windows-latest

View File

@@ -1,33 +0,0 @@
#
# Author:: Shawn Neal (<sneal@sneal.net>)
# Cookbook:: visualstudio
#
# Copyright:: 2015-2017, Shawn Neal
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if defined?(ChefSpec)
chefspec_version = Gem.loaded_specs['chefspec'].version
define_method = if chefspec_version < Gem::Version.new('4.1.0')
ChefSpec::Runner.method(:define_runner_method)
else
ChefSpec.method(:define_matcher)
end
define_method.call :seven_zip_archive
def extract_seven_zip_archive(resource_name)
ChefSpec::Matchers::ResourceMatcher.new(:seven_zip_archive, :extract, resource_name)
end
end

View File

@@ -1,32 +1,29 @@
{
"name": "seven_zip",
"description": "Installs/Configures 7-Zip",
"long_description": "[![Cookbook Version](http://img.shields.io/cookbook/v/seven_zip.svg)](https://supermarket.chef.io/cookbooks/seven_zip)\n[![Build status](https://ci.appveyor.com/api/projects/status/y1lsnlkd2b3q6gfd/branch/master?svg=true)](https://ci.appveyor.com/project/ChefWindowsCookbooks65871/seven-zip/branch/master)\n\n# seven_zip Cookbook\n[7-Zip](http://www.7-zip.org/) is a file archiver with a high compression ratio. This cookbook installs the full 7-Zip suite of tools (GUI and CLI). This cookbook replaces the older [7-Zip cookbook](https://github.com/sneal/7-zip).\n\n# Requirements\n## Platforms\n- Windows XP\n- Windows Vista\n- Windows 7\n- Windows 8, 8.1\n- Windows 10\n- Windows Server 2003 R2\n- Windows Server 2008 (R1, R2)\n- Windows Server 2012 (R1, R2)\n\n## Chef\n- Chef >= 13.0\n\n## Cookbooks\n- windows\n\n# Attributes\n## Optional\n\n| Key | Type | Description | Default |\n|-----|------|-------------|---------|\n| `['seven_zip']['home']` | String | 7-Zip installation directory. | |\n| `['seven_zip']['syspath']` | Boolean | If true, adds 7-Zip directory to system PATH environment variable. | |\n| `['seven_zip']['default_extract_timeout']` | Integer | The default timeout for an extract operation in seconds. This can be overridden by a resource attribute. | `600` |\n\n# Usage\n## default\n\nAdd `seven_zip::default` to your run\\_list which will download and install 7-Zip for the current Windows platform.\n\n# Resource/Provider\n## seven_zip_archive\nExtracts a 7-Zip compatible archive (iso, zip, 7z, etc.) to the specified destination directory.\n\n#### Actions\n- `:extract` - Extract a 7-Zip compatible archive.\n\n#### Attribute Parameters\n- `path` - Name attribute. The destination to extract to.\n- `source` - The file path to the archive to extract.\n- `overwrite` - Defaults to false. If true, the destination files will be overwritten.\n- `checksum` - The archive file checksum.\n- `timeout` - The extract action timeout in seconds, defaults to `node['seven_zip']['default_extract_timeout']`.\n\n#### Examples\nExtract 7-Zip source files to `C:\\seven_zip_source`.\n\n```ruby\nseven_zip_archive 'seven_zip_source' do\n path 'C:\\seven_zip_source'\n source 'https://www.7-zip.org/a/7z1805-src.7z'\n overwrite true\n checksum 'd9acfcbbdcad078435586e00f73909358ed8d714d106e064dcba52fa73e75d83'\n timeout 30\nend\n```\n\n## seven_zip_tool\nDownload and install 7-zip for the current Windows platform.\n\n#### Actions\n- `:install` - Installs 7-zip\n- `:add_to_path` - Add 7-zip to the PATH\n\n#### Attribute Parameters\n- `package` - The name of the package.\n- `path` - The install directory of 7-zip.\n- `source` - The source URL of the 7-zip package.\n- `checksum` - The 7-zip package checksum.\n\n#### Examples\nInstall 7-zip in `C:\\7z` and add it to the path.\n\n```ruby\nseven_zip_tool '7z 15.14 install' do\n action [:install, :add_to_path]\n package '7-Zip 15.14'\n path 'C:\\7z'\n source 'http://www.7-zip.org/a/7z1514.msi'\n checksum 'eaf58e29941d8ca95045946949d75d9b5455fac167df979a7f8e4a6bf2d39680'\nend\n```\n\n# Recipes\n## default\n\nInstalls 7-Zip and adds it to your system PATH.\n\n# License & Authors\n- Author:: Seth Chisamore (<schisamo@chef.io>)\n- Author:: Shawn Neal (<sneal@sneal.net>)\n\n```text\nCopyright:: 2011-2016, Chef Software, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n",
"maintainer": "Shawn Neal",
"maintainer_email": "sneal@sneal.net",
"long_description": "",
"maintainer": "Sous Chefs",
"maintainer_email": "help@sous-chefs.org",
"license": "Apache-2.0",
"platforms": {
"windows": ">= 0.0.0"
},
"dependencies": {
"windows": ">= 0.0.0"
},
"providing": {
},
"attributes": {
"providing": {
},
"recipes": {
},
"version": "3.1.1",
"source_url": "https://github.com/windowschefcookbooks/seven_zip",
"issues_url": "https://github.com/windowschefcookbooks/seven_zip/issues",
"version": "4.2.2",
"source_url": "https://github.com/sous-chefs/seven_zip",
"issues_url": "https://github.com/sous-chefs/seven_zip/issues",
"privacy": false,
"chef_versions": [
[
">= 13.0"
">= 15.3"
]
],
"ohai_versions": [
@@ -34,5 +31,6 @@
],
"gems": [
]
],
"eager_load_libraries": true
}

View File

@@ -1,12 +1,11 @@
name 'seven_zip'
maintainer 'Shawn Neal'
maintainer_email 'sneal@sneal.net'
source_url 'https://github.com/windowschefcookbooks/seven_zip'
issues_url 'https://github.com/windowschefcookbooks/seven_zip/issues'
chef_version '>= 13.0' if respond_to?(:chef_version)
maintainer 'Sous Chefs'
maintainer_email 'help@sous-chefs.org'
license 'Apache-2.0'
description 'Installs/Configures 7-Zip'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '3.1.1'
version '4.2.2'
source_url 'https://github.com/sous-chefs/seven_zip'
issues_url 'https://github.com/sous-chefs/seven_zip/issues'
chef_version '>= 15.3'
supports 'windows'
depends 'windows'

View File

@@ -1,64 +0,0 @@
#
# Author:: Shawn Neal (<sneal@sneal.net>)
# Cookbook:: seven_zip
# Provider:: archive
#
# Copyright:: 2013-2017, Daptiv Solutions LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'fileutils'
require 'chef/mixin/shell_out'
require 'chef/util/path_helper'
include Chef::Mixin::ShellOut
include Windows::Helper
def whyrun_supported?
true
end
action :extract do
converge_by("Extract #{@new_resource.source} => #{@new_resource.path} (overwrite=#{@new_resource.overwrite})") do
FileUtils.mkdir_p(@new_resource.path) unless Dir.exist?(@new_resource.path)
local_source = cached_file(@new_resource.source, @new_resource.checksum)
overwrite_file = @new_resource.overwrite ? ' -y' : ' -aos'
cmd = "\"#{seven_zip_exe}\" x"
cmd << overwrite_file
cmd << " -o\"#{Chef::Util::PathHelper.cleanpath(@new_resource.path)}\""
cmd << " \"#{local_source}\""
Chef::Log.debug(cmd)
shell_out!(cmd, timeout: extract_timeout)
end
end
def seven_zip_exe
path = node['seven_zip']['home'] || seven_zip_exe_from_registry
Chef::Log.debug("Using 7-zip home: #{path}")
Chef::Util::PathHelper.cleanpath(::File.join(path, '7z.exe'))
end
def seven_zip_exe_from_registry
require 'win32/registry'
# Read path from recommended Windows App Paths registry location
# docs: https://msdn.microsoft.com/en-us/library/windows/desktop/ee872121
::Win32::Registry::HKEY_LOCAL_MACHINE.open(
'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe',
::Win32::Registry::KEY_READ
).read_s('Path')
end
def extract_timeout
@new_resource.timeout || node['seven_zip']['default_extract_timeout']
end

View File

@@ -1,24 +0,0 @@
#
# Author:: Seth Chisamore (<schisamo@chef.io>)
# Cookbook:: seven_zip
# Recipe:: default
#
# Copyright:: 2011-2017, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Install 7z and optionally add it to path
seven_zip_tool 'install seven_zip' do
action [:install, :add_to_path] if node['seven_zip']['syspath']
end

View File

@@ -1,29 +1,92 @@
#
# Author:: Shawn Neal (<sneal@sneal.net>)
# Cookbook:: seven_zip
# Resource:: archive
#
# Copyright:: 2013-2017, Daptiv Solutions LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
unified_mode true
default_action :extract
property :path,
String,
name_property: true,
description: 'Path to extract the archive.'
actions :extract
property :source,
String,
description: 'Source archive location.'
attribute :path, kind_of: String, name_attribute: true
attribute :source, kind_of: String
attribute :overwrite, kind_of: [TrueClass, FalseClass], default: false
attribute :checksum, kind_of: String
attribute :timeout, kind_of: Integer
property :overwrite,
[true, false],
default: false,
description: 'Whether to overwrite the destination files.'
property :checksum,
String,
description: 'The checksum for the downloaded file.'
property :timeout,
Integer,
default: 600,
description: 'Extract timeout in seconds.'
action :extract do
directory new_resource.path
local_source = cached_file(new_resource.source, new_resource.checksum)
overwrite_file = new_resource.overwrite ? ' -y' : ' -aos'
cmd = "\"#{seven_zip_exe}\" x"
cmd << overwrite_file
cmd << " -o\"#{Chef::Util::PathHelper.cleanpath(new_resource.path)}\""
cmd << " \"#{local_source}\""
Chef::Log.debug(cmd)
execute "extracting #{new_resource.source}" do
command cmd
timeout new_resource.timeout
end
end
action_class do
# require 'chef/mixin/shell_out'
# include Chef::Mixin::ShellOut
def seven_zip_exe
path = seven_zip_exe_from_registry
Chef::Log.debug("Using 7-zip home: #{path}")
Chef::Util::PathHelper.cleanpath(::File.join(path, '7z.exe'))
end
def seven_zip_exe_from_registry
require 'win32/registry'
# Read path from recommended Windows App Paths registry location
# docs: https://msdn.microsoft.com/en-us/library/windows/desktop/ee872121
::Win32::Registry::HKEY_LOCAL_MACHINE.open(
'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe',
::Win32::Registry::KEY_READ
).read_s('Path')
end
# if a file is local it returns a windows friendly path version
# if a file is remote it caches it locally
def cached_file(source, checksum = nil)
if source =~ %r{^(file|ftp|http|https):\/\/}
uri = as_uri(source)
cache_file_path = "#{Chef::Config[:file_cache_path]}/#{::File.basename(::CGI.unescape(uri.path))}"
Chef::Log.debug("Caching a copy of file #{source} at #{cache_file_path}")
remote_file cache_file_path do
source source
backup false
checksum checksum unless checksum.nil?
end
else
cache_file_path = source
end
Chef::Util::PathHelper.cleanpath(cache_file_path)
end
def as_uri(source)
URI.parse(source)
rescue URI::InvalidURIError
Chef::Log.warn("#{source} was an invalid URI. Trying to escape invalid characters")
URI.parse(URI.escape(source))
end
end

View File

@@ -1,26 +1,23 @@
#
# Author:: Annih (<b.courtois@criteo.com>)
# Cookbook:: seven_zip
# Resource:: tool
#
# Copyright:: 2018, Baptiste Courtois
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
property :package, ::String, default: lazy { node['seven_zip']['package_name'] }
property :source, ::String, default: lazy { node['seven_zip']['url'] }
property :checksum, [::NilClass, ::String], default: lazy { node['seven_zip']['checksum'] }
property :path, [::NilClass, ::String], default: lazy { node['seven_zip']['home'] }
unified_mode true
property :package,
String,
description: 'Name of the package to install.',
default: node['kernel']['machine'] == 'x86_64' ? '7-Zip 19.00 (x64 edition)' : '7-Zip 19.00'
property :source,
String,
description: 'Source URL of the package to install.',
default: node['kernel']['machine'] == 'x86_64' ? 'https://www.7-zip.org/a/7z1900-x64.msi' : 'https://www.7-zip.org/a/7z1900.msi'
property :checksum,
String,
description: 'Checksum for the downloaded pacakge.',
default: node['kernel']['machine'] == 'x86_64' ? 'a7803233eedb6a4b59b3024ccf9292a6fffb94507dc998aa67c5b745d197a5dc' : 'b49d55a52bc0eab14947c8982c413d9be141c337da1368a24aa0484cbb5e89cd'
property :path,
String,
description: 'Optional: path to install 7zip to.'
action :install do
windows_package new_resource.package do
@@ -38,6 +35,12 @@ action :add_to_path do
end
end
action :remove do
windows_package new_resource.package do
action :remove
end
end
action_class do
REG_PATH = 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\7zFM.exe'.freeze

View File

@@ -2,6 +2,49 @@
This file is used to list changes made in each version of the windows cookbook.
## 7.0.2 (2020-09-10)
- Resolve a typo in the user_privilege resource - [@tas50](https://github.com/tas50)
- Don't run delivery in Appveyor - [@tas50](https://github.com/tas50)
## 7.0.1 (2020-09-10)
- Remove testing of Windows 2008 R2 - [@tas50](https://github.com/tas50)
- Cookstyle 6.2.9 Fixes - [@xorimabot](https://github.com/xorimabot)
- Avoid deprcation warnings when using user_privilege resource on Chef >= - [@tas50](https://github.com/tas50)
## Unreleased
- resolved cookstyle error: libraries/registry_helper.rb:69:9 refactor: `ChefCorrectness/ChefApplicationFatal`
- resolved cookstyle error: libraries/registry_helper.rb:232:9 convention: `Style/RedundantReturn`
- resolved cookstyle error: libraries/registry_helper.rb:234:9 convention: `Style/RedundantReturn`
- resolved cookstyle error: libraries/registry_helper.rb:244:9 convention: `Style/RedundantReturn`
- resolved cookstyle error: libraries/registry_helper.rb:245:7 convention: `Style/EmptyElse`
- resolved cookstyle error: libraries/registry_helper.rb:246:9 convention: `Style/RedundantReturn`
- resolved cookstyle error: libraries/registry_helper.rb:272:9 convention: `Style/RedundantReturn`
- resolved cookstyle error: libraries/registry_helper.rb:274:9 convention: `Style/RedundantReturn`
- resolved cookstyle error: libraries/windows_helper.rb:165:14 warning: `Lint/SendWithMixinArgument`
## 7.0.0 (2020-03-26)
### Breaking Changes
- This cookbook now requires Chef Infra Client 14.7 and later as it no longer includes the `windows_share` and `windows_certificate` resources that are now built into Chef Infra Client.
### Other Changes
- Remove list of actions in the dns resource - [@tas50](https://github.com/tas50)
- Don't set the guard_interpreter in powershell_script - [@tas50](https://github.com/tas50)
- Add windows_schannel resource (#619) - [@Xorima](https://github.com/Xorima)
- Remove desired_state: true from resources - [@tas50](https://github.com/tas50)
- The host_name property in the dns resource doesn't need to be a name property - [@tas50](https://github.com/tas50)
- Remove unnecessary include of the powershell mixin - [@tas50](https://github.com/tas50)
## 6.0.1 (2019-10-01)
- Update README.md for Windows cookbook suggesting core dns resources (#616) - [@NAshwini](https://github.com/NAshwini)
- Add a warning when using windows_zipfile resource as users should migrate to archive_file (#617) - [@NAshwini](https://github.com/NAshwini)
## 6.0.0 (2019-04-25)
### Breaking Changes

View File

@@ -8,83 +8,21 @@ Provides a set of Windows-specific resources to aid in the creation of cookbooks
### Platforms
- Windows 7
- Windows Server 2008 R2
- Windows 7 (EOL)
- Windows Server 2008 R2 (EOL)
- Windows 8, 8.1
- Windows Server 2012 (R1, R2)
- Windows Server 2016
### Chef
- Chef 14+
- Chef 14.7+
## Resources
### Deprecated Resources Note
As of Chef 14.7+ the windows_share and windows_certificate resources are now included in the Chef Client. If you are running Chef 14.7+ the resources in Chef client will take precedence over the resources in this cookbook. In November 2019 we will release a new major version of this cookbook that removes these resources.
### windows_certificate
`Note`: This resource is now included in Chef 14.7 and later. There is no need to depend on the Windows cookbook for this resource.
Installs a certificate into the Windows certificate store from a file, and grants read-only access to the private key for designated accounts. Due to current limitations in WinRM, installing certificated remotely may not work if the operation requires a user profile. Operations on the local machine store should still work.
#### Actions
- `:create` - creates or updates a certificate.
- `:delete` - deletes a certificate.
- `:acl_add` - adds read-only entries to a certificate's private key ACL.
- `:verify` - logs whether or not a certificate is valid
#### Properties
- `source` - name attribute. The source file (for create and acl_add), thumbprint (for delete and acl_add) or subject (for delete).
- `pfx_password` - the password to access the source if it is a pfx file.
- `private_key_acl` - array of 'domain\account' entries to be granted read-only access to the certificate's private key. This is not idempotent.
- `store_name` - the certificate store to manipulate. One of:
- MY (Personal)
- CA (Intermediate Certification Authorities)
- ROOT (Trusted Root Certification Authorities)
- TRUSTEDPUBLISHER (Trusted Publishers)
- CLIENTAUTHISSUER (Client Authentication Issuers)
- REMOTE DESKTOP (Remote Desktop)
- TRUSTEDDEVICES (Trusted Devices)
- WEBHOSTING (Web Hosting)
- AUTHROOT (Third-Party Root Certification Authorities)
- TRUSTEDPEOPLE (Trusted People)
- SMARTCARDROOT (Smart Card Trusted Roots)
- TRUST (Enterprise Trust)
- DISALLOWED (Untrusted Certificates)
- `user_store` - if false (default) then use the local machine store; if true then use the current user's store.
#### Examples
```ruby
# Add PFX cert to local machine personal store and grant accounts read-only access to private key
windows_certificate "c:/test/mycert.pfx" do
pfx_password "password"
private_key_acl ["acme\fred", "pc\jane"]
end
```
```ruby
# Add cert to trusted intermediate store
windows_certificate "c:/test/mycert.cer" do
store_name "CA"
end
```
```ruby
# Remove all certificates matching the subject
windows_certificate "me.acme.com" do
action :delete
end
```
### windows_certificate_binding
Binds a certificate to an HTTP port in order to enable TLS communication.
Binds a certificate to an HTTP port to enable TLS communication.
#### Actions
@@ -135,6 +73,8 @@ end
### windows_dns
`Note`: This resource is now included in Chef 15 and later. If you are using newer versions of [windows](https://devblogs.microsoft.com/powershell/configuration-in-a-devops-world-windows-powershell-desired-state-configuration/) then should use the core [resource](https://github.com/chef/chef/blob/master/RELEASE_NOTES.md#windows_dns_record-resource) instead of windows_dns.
Configures A and CNAME records in Windows DNS. This requires the DNSCMD to be installed, which is done by adding the DNS role to the server or installing the Remote Server Admin Tools.
#### Actions
@@ -213,52 +153,19 @@ windows_http_acl 'http://+:50051/' do
end
```
### windows_share
### windows_schannel
`Note`: This resource is now included in Chef 14.7 and later. There is no need to depend on the Windows cookbook for this resource.
Creates, modifies and removes Windows shares. All properties are idempotent.
`Note`: This resource uses PowerShell cmdlets introduced in Windows 2012/8.
Used to configure the schannel security settings in windows, this is used by dotnet apps and PowerShell to be able to speak to tls 1.2 endpoints
#### Actions
- `:create`: creates/modifies a share
- `:delete`: deletes a share
- `configure`: Configures the setting
#### Properties
property | type | default | description
------------------------ | ---------- | ------------- | -----------------------------------------------------------------------------------------------------------------------------------------------------------
`share_name` | String | resource name | the share to assign to the share
`path` | String | | The path of the location of the folder to share. Required when creating. If the share already exists on a different path then it is deleted and re-created.
`description` | String | | description to be applied to the share
`full_users` | Array | [] | users which should have "Full control" permissions
`change_users` | Array | [] | Users are granted modify permission to access the share.
`read_users` | Array | [] | users which should have "Read" permissions
`temporary` | True/False | false | The lifetime of the new SMB share. A temporary share does not persist beyond the next restart of the computer
`scope_name` | String | '*' | The scope name of the share.
`ca_timeout` | Integer | 0 | The continuous availability time-out for the share.
`continuously_available` | True/False | false | Indicates that the share is continuously available.
`concurrent_user_limit` | Integer | 0 (unlimited) | The maximum number of concurrently connected users the share can accommodate
`encrypt_data` | True/False | false | Indicates that the share is encrypted.
#### Examples
```ruby
windows_share "foo" do
action :create
path "C:\\foo"
full_users ["DOMAIN_A\\some_user", "DOMAIN_B\\some_other_user"]
read_users ["DOMAIN_C\\Domain users"]
end
```
```ruby
windows_share "foo" do
action :delete
end
```
`use_strong_crypto` | True, False | true | Enables or disables the setting
### windows_user_privilege
@@ -345,7 +252,9 @@ SeTakeOwnershipPrivilege Take ownership of files or other objects
### windows_zipfile
Most version of Windows do not ship with native cli utility for managing compressed files. This resource provides a pure-ruby implementation for managing zip files. Be sure to use the `not_if` or `only_if` meta parameters to guard the resource for idempotence or action will be taken every Chef run.
`Note`: This resource has been deprecated as Chef Infra Client 15.0 shipped with a new archive_file resource, which natively handles multiple archive formats. Please update any cookbooks using this resource to instead use the `archive_file` resource: https://docs.chef.io/resource_archive_file.html
Most versions of Windows do not ship with native cli utility for managing compressed files. This resource provides a pure-ruby implementation for managing zip files. Be sure to use the `not_if` or `only_if` meta parameters to guard the resource for idempotence or action will be taken every Chef run.
#### Actions
@@ -401,7 +310,7 @@ Returns a hash of all DisplayNames installed
```ruby
# usage in a recipe
::Chef::Recipe.send(:include, Windows::Helper)
::Chef::DSL::Recipe.send(:include, Windows::Helper)
hash_of_installed_packages = installed_packages
```
@@ -414,7 +323,7 @@ Download a file if a package isn't installed
```ruby
# usage in a recipe to not download a file if package is already installed
::Chef::Recipe.send(:include, Windows::Helper)
::Chef::DSL::Recipe.send(:include, Windows::Helper)
is_win_sdk_installed = is_package_installed?('Windows Software Development Kit')
remote_file 'C:\windows\temp\windows_sdk.zip' do
@@ -436,11 +345,11 @@ end
### Windows::VersionHelper
Helper that allows you to get information of the windows version running on your node. It leverages windows ohai from kernel.os_info, easy to mock and to use even on linux.
Helper that allows you to get information on the windows version running on your node. It leverages windows ohai from kernel.os_info, easy to mock and to use even on Linux.
#### core_version?
Determines whether given node is running on a windows Core.
Determines whether the given node is running on a Windows Core.
```ruby
if ::Windows::VersionHelper.core_version? node
@@ -450,7 +359,7 @@ end
#### workstation_version?
Determines whether given node is a windows workstation version (XP, Vista, 7, 8, 8.1, 10)
Determines whether the given node is a windows workstation version (XP, Vista, 7, 8, 8.1, 10)
```ruby
if ::Windows::VersionHelper.workstation_version? node
@@ -460,7 +369,7 @@ end
#### server_version?
Determines whether given node is a windows server version (Server 2003, Server 2008, Server 2012, Server 2016)
Determines whether the given node is a windows server version (Server 2003, Server 2008, Server 2012, Server 2016)
```ruby
if ::Windows::VersionHelper.server_version? node

View File

@@ -66,7 +66,7 @@ module Windows
}[hkey]
unless hive
Chef::Application.fatal!("Unsupported registry hive '#{hive_name}'")
raise("Unsupported registry hive '#{hive_name}'")
end
Chef::Log.debug("Registry hive resolved to #{hkey}")
@@ -229,9 +229,9 @@ module Windows
begin
hive.open(key, ::Win32::Registry::Constants::KEY_READ | @@native_registry_constant)
return true
true
rescue
return false
false
ensure
ensure_hive_unloaded(hive_loaded)
end
@@ -241,9 +241,7 @@ module Windows
reg_key = "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\#{sid}"
Chef::Log.debug("Looking for profile at #{reg_key}")
if key_exists?(reg_key)
return get_value(reg_key, 'ProfileImagePath')
else
return nil
get_value(reg_key, 'ProfileImagePath')
end
end
@@ -269,9 +267,9 @@ module Windows
user_hive = path[0]
if user_hive?(hive)
return key_exists?("#{hive_name}\\#{user_hive}")
key_exists?("#{hive_name}\\#{user_hive}")
else
return true
true
end
end

View File

@@ -162,4 +162,4 @@ module Windows
end
end
Chef::Recipe.send(:include, Windows::Helper)
Chef::Recipe.include Windows::Helper

File diff suppressed because one or more lines are too long

View File

@@ -3,9 +3,8 @@ maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@chef.io'
license 'Apache-2.0'
description 'Provides a set of useful Windows-specific primitives.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '6.0.0'
version '7.0.2'
supports 'windows'
source_url 'https://github.com/chef-cookbooks/windows'
issues_url 'https://github.com/chef-cookbooks/windows/issues'
chef_version '>= 14'
chef_version '>= 14.7'

View File

@@ -23,11 +23,6 @@
include Windows::Helper
# Support whyrun
def whyrun_supported?
true
end
action :create do
if @current_resource.exists
needs_change = (@new_resource.record_type != @current_resource.record_type) ||

View File

@@ -1,301 +0,0 @@
#
# Author:: Richard Lavey (richard.lavey@calastone.com)
# Cookbook:: windows
# Resource:: certificate
#
# Copyright:: 2015-2017, Calastone Ltd.
# Copyright:: 2018-2019, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
require 'chef/util/path_helper'
chef_version_for_provides '< 14.7' if respond_to?(:chef_version_for_provides)
resource_name :windows_certificate
property :source, String, name_property: true
property :pfx_password, String
property :private_key_acl, Array
property :store_name, String, default: 'MY', equal_to: ['TRUSTEDPUBLISHER', 'TrustedPublisher', 'CLIENTAUTHISSUER', 'REMOTE DESKTOP', 'ROOT', 'TRUSTEDDEVICES', 'WEBHOSTING', 'CA', 'AUTHROOT', 'TRUSTEDPEOPLE', 'MY', 'SMARTCARDROOT', 'TRUST', 'DISALLOWED']
property :user_store, [TrueClass, FalseClass], default: false
property :cert_path, String
property :sensitive, [ TrueClass, FalseClass ], default: lazy { |r| r.pfx_password ? true : false }
action :create do
load_gem
# Extension of the certificate
ext = ::File.extname(new_resource.source)
cert_obj = fetch_cert_object(ext) # Fetch OpenSSL::X509::Certificate object
thumbprint = OpenSSL::Digest::SHA1.new(cert_obj.to_der).to_s # Fetch its thumbprint
# Need to check if return value is Boolean:true
# If not then the given certificate should be added in certstore
if verify_cert(thumbprint) == true
Chef::Log.debug('Certificate is already present')
else
converge_by("Adding certificate #{new_resource.source} into Store #{new_resource.store_name}") do
if ext == '.pfx'
add_pfx_cert
else
add_cert(cert_obj)
end
end
end
end
# acl_add is a modify-if-exists operation : not idempotent
action :acl_add do
if ::File.exist?(new_resource.source)
hash = '$cert.GetCertHashString()'
code_script = cert_script(false)
guard_script = cert_script(false)
else
# make sure we have no spaces in the hash string
hash = "\"#{new_resource.source.gsub(/\s/, '')}\""
code_script = ''
guard_script = ''
end
code_script << acl_script(hash)
guard_script << cert_exists_script(hash)
powershell_script "setting the acls on #{new_resource.source} in #{cert_location}\\#{new_resource.store_name}" do
guard_interpreter :powershell_script
convert_boolean_return true
code code_script
only_if guard_script
sensitive if new_resource.sensitive
end
end
action :delete do
load_gem
cert_obj = fetch_cert
if cert_obj
converge_by("Deleting certificate #{new_resource.source} from Store #{new_resource.store_name}") do
delete_cert
end
else
Chef::Log.debug('Certificate not found')
end
end
action :fetch do
load_gem
cert_obj = fetch_cert
if cert_obj
show_or_store_cert(cert_obj)
else
Chef::Log.debug('Certificate not found')
end
end
action :verify do
load_gem
out = verify_cert
if !!out == out
out = out ? 'Certificate is valid' : 'Certificate not valid'
end
Chef::Log.info(out.to_s)
end
action_class do
require 'openssl'
# load the gem and rescue a gem install if it fails to load
def load_gem
gem 'win32-certstore', '>= 0.2.4'
require 'win32-certstore' # until this is in core chef
rescue LoadError
Chef::Log.debug('Did not find win32-certstore >= 0.2.4 gem installed. Installing now')
chef_gem 'win32-certstore' do
compile_time true
action :upgrade
end
require 'win32-certstore'
end
def add_cert(cert_obj)
store = ::Win32::Certstore.open(new_resource.store_name)
store.add(cert_obj)
end
def add_pfx_cert
store = ::Win32::Certstore.open(new_resource.store_name)
store.add_pfx(new_resource.source, new_resource.pfx_password)
end
def delete_cert
store = ::Win32::Certstore.open(new_resource.store_name)
store.delete(new_resource.source)
end
def fetch_cert
store = ::Win32::Certstore.open(new_resource.store_name)
store.get(new_resource.source)
end
# Checks whether a certificate with the given thumbprint
# is already present and valid in certificate store
# If the certificate is not present, verify_cert returns a String: "Certificate not found"
# But if it is present but expired, it returns a Boolean: false
# Otherwise, it returns a Boolean: true
def verify_cert(thumbprint = new_resource.source)
store = ::Win32::Certstore.open(new_resource.store_name)
store.valid?(thumbprint)
end
def show_or_store_cert(cert_obj)
if new_resource.cert_path
export_cert(cert_obj, new_resource.cert_path)
if ::File.size(new_resource.cert_path) > 0
Chef::Log.info("Certificate export in #{new_resource.cert_path}")
else
::File.delete(new_resource.cert_path)
end
else
Chef::Log.info(cert_obj.display)
end
end
def export_cert(cert_obj, cert_path)
out_file = ::File.new(cert_path, 'w+')
case ::File.extname(cert_path)
when '.pem'
out_file.puts(cert_obj.to_pem)
when '.der'
out_file.puts(cert_obj.to_der)
when '.cer'
cert_out = powershell_out("openssl x509 -text -inform DER -in #{cert_obj.to_pem} -outform CER").stdout
out_file.puts(cert_out)
when '.crt'
cert_out = powershell_out("openssl x509 -text -inform DER -in #{cert_obj.to_pem} -outform CRT").stdout
out_file.puts(cert_out)
when '.pfx'
cert_out = powershell_out("openssl pkcs12 -export -nokeys -in #{cert_obj.to_pem} -outform PFX").stdout
out_file.puts(cert_out)
when '.p7b'
cert_out = powershell_out("openssl pkcs7 -export -nokeys -in #{cert_obj.to_pem} -outform P7B").stdout
out_file.puts(cert_out)
else
Chef::Log.info('Supported certificate format .pem, .der, .cer, .crt, .pfx and .p7b')
end
out_file.close
end
def cert_location
@location ||= new_resource.user_store ? 'CurrentUser' : 'LocalMachine'
end
def cert_script(persist)
cert_script = '$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2'
file = Chef::Util::PathHelper.cleanpath(new_resource.source)
cert_script << " \"#{file}\""
if ::File.extname(file.downcase) == '.pfx'
cert_script << ", \"#{new_resource.pfx_password}\""
if persist && new_resource.user_store
cert_script << ', ([System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::PersistKeySet)'
elsif persist
cert_script << ', ([System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::PersistKeySet -bor [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::MachineKeyset)'
end
end
cert_script << "\n"
end
def cert_exists_script(hash)
<<-EOH
$hash = #{hash}
Test-Path "Cert:\\#{cert_location}\\#{new_resource.store_name}\\$hash"
EOH
end
def within_store_script
inner_script = yield '$store'
<<-EOH
$store = New-Object System.Security.Cryptography.X509Certificates.X509Store "#{new_resource.store_name}", ([System.Security.Cryptography.X509Certificates.StoreLocation]::#{cert_location})
$store.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite)
#{inner_script}
$store.Close()
EOH
end
def acl_script(hash)
return '' if new_resource.private_key_acl.nil? || new_resource.private_key_acl.empty?
# this PS came from http://blogs.technet.com/b/operationsguy/archive/2010/11/29/provide-access-to-private-keys-commandline-vs-powershell.aspx
# and from https://msdn.microsoft.com/en-us/library/windows/desktop/bb204778(v=vs.85).aspx
set_acl_script = <<-EOH
$hash = #{hash}
$storeCert = Get-ChildItem "cert:\\#{cert_location}\\#{new_resource.store_name}\\$hash"
if ($storeCert -eq $null) { throw 'no key exists.' }
$keyname = $storeCert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName
if ($keyname -eq $null) { throw 'no private key exists.' }
if ($storeCert.PrivateKey.CspKeyContainerInfo.MachineKeyStore)
{
$fullpath = "$Env:ProgramData\\Microsoft\\Crypto\\RSA\\MachineKeys\\$keyname"
}
else
{
$currentUser = New-Object System.Security.Principal.NTAccount($Env:UserDomain, $Env:UserName)
$userSID = $currentUser.Translate([System.Security.Principal.SecurityIdentifier]).Value
$fullpath = "$Env:ProgramData\\Microsoft\\Crypto\\RSA\\$userSID\\$keyname"
}
EOH
new_resource.private_key_acl.each do |name|
set_acl_script << "$uname='#{name}'; icacls $fullpath /grant $uname`:RX\n"
end
set_acl_script
end
# Method returns an OpenSSL::X509::Certificate object
#
# Based on its extension, the certificate contents are used to initialize
# PKCS12 (PFX), PKCS7 (P7B) objects which contains OpenSSL::X509::Certificate.
#
# @note Other then PEM, all the certificates are usually in binary format, and hence
# their contents are loaded by using File.binread
#
# @param ext [String] Extension of the certificate
#
# @return [OpenSSL::X509::Certificate] Object containing certificate's attributes
#
# @raise [OpenSSL::PKCS12::PKCS12Error] When incorrect password is provided for PFX certificate
#
def fetch_cert_object(ext)
contents = if binary_cert?
::File.binread(new_resource.source)
else
::File.read(new_resource.source)
end
case ext
when '.pfx'
OpenSSL::PKCS12.new(contents, new_resource.pfx_password).certificate
when '.p7b'
OpenSSL::PKCS7.new(contents).certificates.first
else
OpenSSL::X509::Certificate.new(contents)
end
end
# @return [Boolean] Whether the certificate file is binary encoded or not
#
def binary_cert?
powershell_out!("file -b --mime-encoding #{new_resource.source}").stdout.strip == 'binary'
end
end

View File

@@ -19,7 +19,6 @@
# limitations under the License.
#
include Chef::Mixin::PowershellOut
include Windows::Helper
property :cert_name, String, name_property: true
@@ -28,7 +27,7 @@ property :address, String, default: '0.0.0.0'
property :port, Integer, default: 443
property :app_id, String, default: '{4dc3e181-e14b-4a21-b022-59fc669b0914}'
property :store_name, String, default: 'MY', equal_to: ['TRUSTEDPUBLISHER', 'CLIENTAUTHISSUER', 'REMOTE DESKTOP', 'ROOT', 'TRUSTEDDEVICES', 'WEBHOSTING', 'CA', 'AUTHROOT', 'TRUSTEDPEOPLE', 'MY', 'SMARTCARDROOT', 'TRUST']
property :exists, [true, false], desired_state: true
property :exists, [true, false]
load_current_value do |desired|
mode = desired.address.match(/(\d+\.){3}\d+|\[.+\]/).nil? ? 'hostnameport' : 'ipport'

View File

@@ -1,6 +1,6 @@
#
# Author:: Richard Lavey (richard.lavey@calastone.com)
# Cookbook Name:: windows
# Cookbook:: windows
# Resource:: dns
#
# Copyright:: 2015, Calastone Ltd.
@@ -18,10 +18,9 @@
# limitations under the License.
#
actions :create, :delete
default_action :create
attribute :host_name, kind_of: String, name_property: true, required: true
attribute :host_name, kind_of: String, required: true
attribute :record_type, kind_of: String, default: 'A', regex: /^(?:A|CNAME)$/
attribute :dns_server, kind_of: String, default: '.'
attribute :target, kind_of: [Array, String], required: true

View File

@@ -23,7 +23,7 @@ include Windows::Helper
property :url, String, name_property: true
property :user, String
property :sddl, String
property :exists, [true, false], desired_state: true
property :exists, [true, false]
# See https://msdn.microsoft.com/en-us/library/windows/desktop/cc307236%28v=vs.85%29.aspx for netsh info

Some files were not shown because too many files have changed in this diff Show More