Update golang cookbook
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
202
cookbooks/ark/LICENSE
Normal 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.
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
# ark cookbook
|
||||
|
||||
[](https://travis-ci.org/chef-cookbooks/ark) [](https://supermarket.chef.io/cookbooks/ark)
|
||||
[](https://supermarket.chef.io/cookbooks/ark)
|
||||
[](https://github.com/sous-chefs/ark/actions?query=workflow%3Aci)
|
||||
[](#backers)
|
||||
[](#sponsors)
|
||||
[](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 you’d 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.
|
||||
```
|
||||

|
||||
|
||||
### Sponsors
|
||||
|
||||
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
@@ -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
115
cookbooks/ark/chefignore
Normal 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
|
||||
65
cookbooks/ark/kitchen.dokken.yml
Normal file
65
cookbooks/ark/kitchen.dokken.yml
Normal 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
|
||||
14
cookbooks/ark/kitchen.exec.yml
Normal file
14
cookbooks/ark/kitchen.exec.yml
Normal 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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user