Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.2.2 produces PaxHeader compilation errors when used with Berkshelf and Librarian #147

Closed
kainosnoema opened this issue Aug 23, 2014 · 8 comments

Comments

@kainosnoema
Copy link

tl;dr

Packaging a site cookbook on OS X 10.6+ using bsdtar, with files containing extended attributes, causes runtime compilation errors for end-users extracting using Ruby's Minitar (e.g. Berkshelf and Librarian): https://tickets.opscode.com/browse/CHEF-4107

Details:

As of v2.2.2, we're getting runtime compilation errors like the following:

================================================================================
Recipe Compile Error in /var/folders/dy/tblyd6dn1jdbsglnk9kp60cm0000gn/T/d20140823-83378-hstg7l/cookbooks/redisio/providers/PaxHeader/configure.rb
================================================================================

SyntaxError
-----------
/var/folders/dy/tblyd6dn1jdbsglnk9kp60cm0000gn/T/d20140823-83378-hstg7l/cookbooks/redisio/providers/PaxHeader/configure.rb:1: syntax error, unexpected tIDENTIFIER, expecting end-of-input
16 gid=72107521
      ^

Cookbook Trace:
---------------
  /Users/evan/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/chef-11.12.8/lib/chef/mixin/from_file.rb:42:in `class_eval'
  /Users/evan/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/chef-11.12.8/lib/chef/mixin/from_file.rb:42:in `class_from_file'
  /Users/evan/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/chef-11.12.8/lib/chef/provider/lwrp_base.rb:94:in `build_from_file'
  /Users/evan/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/chefspec-4.0.1/lib/chefspec/extensions/chef/lwrp_base.rb:29:in `build_from_file_with_removal'

According to the Jira ticket mentioned above, "this is an edge-case caused by these conditions":

  • OS X 10.6+ as the cookbook packager
  • Cookbook files which contain extended attributes
  • Extraction through Ruby's Minitar (used by Berkshelf and Librarian)

My guess is that v2.2.2 introduced a file that contains extended attributes. The best way to fix this is to package using gnutar instead of bsdtar and resubmitting an update. This has affected many other cookbooks, including artifact: RiotGamesCookbooks/artifact-cookbook#86.

@brianbianco
Copy link
Contributor

Thanks for this. I will look into repackaging this as soon as I've got access to my laptop again!

@maraca
Copy link

maraca commented Aug 24, 2014

👍 having this issue too. Thanks @brianbianco for being on it!

@zarry
Copy link
Contributor

zarry commented Aug 24, 2014

This was packaged and uploaded with knife cookbook site share. Do you think this is an issue with chefdk or the tar on my path?

@martinb3
Copy link
Contributor

It sounds like the issue is BSD or Ruby tar vs. GNU tar.

@brianbianco
Copy link
Contributor

@kainosnoema @maraca Could you give downloading the latest cookbook a whirl again? I tagged a new version (no code changes) and released it. It was packaged on an ubuntu 14.04 machine so hopefully all issues will just vanish.

@brianbianco
Copy link
Contributor

I'll be closing this issue today unless anybody can confirm 2.2.3 doesn't work as well?

@kainosnoema
Copy link
Author

v2.2.3 seems to work well. Thanks for the quick turnaround!

@lock
Copy link

lock bot commented Nov 28, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants