Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

The tar cookbook has been deprecated

Author provided reason for deprecation:

The tar cookbook has been deprecated and is no longer being maintained by its authors. Use of the tar cookbook is no longer recommended.

RSS

tar (20) Versions 2.2.0

Installs tar and two resources to manage remote tar packages

Policyfile
Berkshelf
Knife
cookbook 'tar', '~> 2.2.0', :supermarket
cookbook 'tar', '~> 2.2.0'
knife supermarket install tar
knife supermarket download tar
README
Dependencies
Changelog
Quality 17%

tar Cookbook

Build Status Cookbook Version

Installs tar and includes resources for managing remote tar files. tar_package handles remote source package compilation. tar_extract handles retrieving remote tar files and extracting them locally.

Requirements

Platforms

  • Debian / Ubuntu derivatives
  • RHEL and derivatives
  • openSUSE / SUSE Linux Enterprises
  • FreeBSD

Chef

  • Chef 12.7+

Resources

tar_package

The tar_package resource provides an easy way to download remote files and compile and install them. This only works for the most basic Autoconf programs that can do ./configure && make && make install.

Actions

  • install Installs the package

Properties

  • source: name attribute. The source remote URL.
  • prefix: Directory to be used as the --prefix configure flag.
  • source_directory: Directory to which source files are downloaded.
  • creates: prevent the command from running when the specified file already exists.
  • configure_flags: Array of additional flags to be passed to ./configure.
  • archive_name: Specify a different name for the downloaded archive. Use it if the directory name inside the tar file is different than the name defined in the URL. Additionally, tar_package supports most remote_file attributes.

Example

tar_package 'http://pgfoundry.org/frs/download.php/1446/pgpool-3.4.1.tar.gz' do
  prefix '/usr/local'
  creates '/usr/local/bin/pgpool'
end

This will download, compile, and install the package from the given URL and install it into /usr/local.

tar_extract

The tar_extract resource provides an easy way to extract tar files from downloaded or local files.

Actions

  • extract Extracts the tar file from a url
  • extract_local Extracts the tar file from a local file path

Properties

  • source: name attribute. The source remote URL.
  • target_dir: Directory to extract into, e.g. tar xzf -C (target_dir)
  • download_dir: Directory to which tarball is downloaded (defaults to chef cache which requires root group and user).
  • creates: prevent the command from running when the specified file already exists.
  • compress_char: Flag for compression type, such as z for gzip. man tar for options.
  • tar_flags: Array of additional flags to be passed to tar xzf command.
  • group: Group name or group ID to extract the archive under. If set to non-root group, point to a download_dir the group has permission to access.
  • user: User name or user ID to extract the archive under. If set to non-root user, point to a download_dir the user has permission to access. Additionally, tar_extract supports most remote_file attributes.

Example

tar_extract 'http://dev.mycoderepo.com/artifacts/mycode-1.2.3.tar.gz' do
  target_dir '/opt/myapp/mycode'
  creates '/opt/myapp/mycode/lib'
  tar_flags [ '-P', '--strip-components 1' ]
end

This will download the tarball to cache, extract the contents to /opt/myapp/mycode, use the file '/opt/myapp/mycode/lib' to determine idempotency, and pass both '-P' and '--strip-components 1' flags to the tar xzf command.

tar_extract '/tmp/mycode-1.2.3.tar.gz' do
  action :extract_local
  target_dir '/opt/myapp/mycode'
  creates '/opt/myapp/mycode/lib'
end

This will extract the contents of /tmp/mycode-1.2.3.tar.gz to /opt/myapp/mycode and use the file '/opt/myapp/mycode/lib' to determine idempotency.

LICENSE AND AUTHOR

Copyright: 2011, Cramer Development, Inc.
Copyright: 2013, TAQTIQA LLC.
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.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

aerospike Applicable Versions
alfresco-transformations Applicable Versions
anaconda Applicable Versions
apache_spark Applicable Versions
apache_spark_ng Applicable Versions
azure_pipelines_agent_macos Applicable Versions
btm-test Applicable Versions
cassandra-reaper Applicable Versions
cesi Applicable Versions
chef-maven Applicable Versions
chef-sourcemod Applicable Versions
chef-steamcmd Applicable Versions
consul-template-cookbook Applicable Versions
corbel Applicable Versions
corus Applicable Versions
dotnetcore Applicable Versions
dynamodb-local Applicable Versions
geth Applicable Versions
go_chef Applicable Versions
gobblin Applicable Versions
gor Applicable Versions
habitat-cookbook Applicable Versions
intellij Applicable Versions
iojs Applicable Versions
jenkins_drupal Applicable Versions
kubernetes-install Applicable Versions
mattermost-cookbook Applicable Versions
multi_python Applicable Versions
nexus_repository_manager Applicable Versions
nsenter Applicable Versions
opencart Applicable Versions
openntpd Applicable Versions
orientdb Applicable Versions
pencil Applicable Versions
poweradmin Applicable Versions
shifter Applicable Versions
solr-lts Applicable Versions
stackify_agent Applicable Versions
stow Applicable Versions
tonicdns Applicable Versions
tripwire_agent Applicable Versions
vsts_agent_macos Applicable Versions
wordpress Applicable Versions
xldeploy Applicable Versions
xlrelease Applicable Versions

tar Cookbook CHANGELOG

This file is used to list changes made in each version of the tar cookbook.

2.2.0 (2018-07-24)

  • Enable FC016 again
  • Use dokken and swap opensuse 13 testing for debian 9
  • GH-42 Fix opensuse image name in .kitchen.yml
  • GH-42 Add freebsd 10 and 11 to tested platforms
  • GH-42 Skip tar package install on freebsd
  • GH-42 Fix default group name in tar_extract
  • GH-42 Ensure src_dir exists in tar_package
  • GH-42 Use short options for make command
  • GH-42 Use latest nano for testing purposes
  • GH-42 Add freebsd to supported platforms list
  • Update creates parameter to reflect what gets extracted by resource.
  • Remove chefspec matchers that are autogenerated
  • Use build_essential resource instead of the recipe

2.1.1 (2017-06-13)

  • Fix metadata source and issues links.

2.1.0 (2017-05-30)

  • Test with Local Delivery instead of Rake
  • Update apache2 license string
  • Attribute -> Property in the custom resource
  • Remove class_eval and require Chef 12.7+

2.0.0 (2017-02-16)

  • Converted the existing LWRPs to custom resources and bumped the minimum supported Chef release to 12.5
  • Add all supported platforms to the metadata
  • Add full testing of the resources in Travis CI

1.1.0 (2016-12-21)

  • added support for .xz compression type
  • Reformat the readme
  • Define both Chefspec matchers
  • Remove Chef 11 compatibility code

1.0.0 (2016-12-21)

  • This cookbook has been adopted by Chef and will be maintained by the Community Cookbook Team going forward.
  • This cookbook now requires Chef 12.1+ to align with the requirements of all Chef maintained cookbooks
  • Cookbook boilerplate has been updated

    • chefignore file added
    • gitignore file
    • Test Kitchen config added
    • Berksfile added
    • Gemfile added
    • Badges added to the readme
    • Add maintainers files
    • Add rakefile for simplified testing
    • Add github templates
    • Add license file
    • Update author in metadata and add supermarket metadata
    • Add contributing and testing docs
    • Cookstyle fixes
    • Add basic chefspec convergence test
    • Add a basic test cookbook
    • Add test kitchen testing in Travis

v0.7.0 (2015-07-08)

  • Add adoption notice
  • Use file_cache_path instead of file_backup_path for downloaded artifact storage
  • Fix links to Chef documentation in README

v0.6.0 (2014-12-03)

  • Allow either string or array for tar flags

v0.5.0 (2014-07-28)

  • Add support for more attributes of remote_file
  • Escape downloaded file names

v0.4.0 (2014-06-13)

  • Add archive_name option for when the file name is different from the package name

v0.3.4 (2014-06-05)

  • Define ChefSpec::Runner method for tar_extract

v0.3.3 (2014-06-03)

  • Add ChefSpec matchers

v0.3.2 (2014-05-05)

  • Add checksum to remote file downloads

v0.3.1 (2014-04-04)

  • Correct "notifies" definition in tar_extract's remote_file

v0.3.0 (2014-03-21)

  • Add :extract_local action

v0.2.0 (2013-12-31)

  • Make tar_extract only run if needed
  • Fix missing space in command line prefix
  • Ensure file_backup_path exists on initial chef-client run
  • Only add headers if needed

v0.1.0 (2013-11-26)

  • Allow custom HTTP headers when downloading files
  • Allow the type of tar compression
  • Improve resource notifications

v0.0.4 (2013-10-02)

  • Remove conditional download requests in favor of built-in functionality in Chef >= 11.6.0.
  • Fix readme example
  • Foodcritic fixes

v0.0.3 (2013-01-30)

  • Conditional requests for downloads
  • Allow extract if non-root user
  • Formatting fixes

v0.0.2 (2012-10-13)

  • Add tar_extract LWRP

v0.0.1 (2011-09-15)

Initial release

Collaborator Number Metric
            

2.2.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

2.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Cookstyle Metric
            

2.2.0 failed this metric

Chef/Correctness/LazyEvalNodeAttributeDefaults: When setting a node attribute as the default value for a custom resource property, wrap the node attribute in `lazy {}` so that its value is available when the resource executes. (https://docs.chef.io/workstation/cookstyle/chef_correctness_lazyevalnodeattributedefaults): tar/resources/extract.rb: 29
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): tar/resources/extract.rb: 1
Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. (https://docs.chef.io/workstation/cookstyle/chef_deprecations_resourcewithoutunifiedtrue): tar/resources/package.rb: 1

Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations

No Binaries Metric
            

2.2.0 passed this metric

Testing File Metric
            

2.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

2.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number