Making collaboration and contribution easier for our Cookbooks


#1

Ohai!

At the Chef Community Summit last November, I announced in one of the
sessions that we would split up the Opscode monolithic cookbooks into
separate repositories per popular request. This is something we should
have done long ago, arguably from the very beginning, as it makes
contribution to a specific cookbook easier for you all. You can read
the blog post of the official announcement here:

If you are a contributor, or wish to become one, please read the
general How to Contribute page, and the more specific How to
Contribute to Opscode Cookbooks page:

The second link includes a script that will help automate forking and
cloning. If you want to export patches from your fork of the old
repository for one of the new ones, you can use git format-patch and
git apply. For example, if you have the two most recent commits and
want to export those as a patch:

opscode/cookbooks $ git format-patch --stdout --no-prefix HEAD~2 >

…/cookbook-patches/COOK-XYZ-CBNAME.patch
opscode-cookbooks/CBNAME$ git apply --stat
…/cookbook-patches/COOK-XYZ-CBNAME.patch
opscode-cookbooks/CBNAME$ git apply --check
…/cookbook-patches/COOK-XYZ-CBNAME.patch
opscode-cookbooks/CBNAME$ git am < …/cookbook-patches/COOK-XYZ-CBNAME.patch

It is important to use git apply --check to see if the patch will apply cleanly.

We’ll be working on getting pull requests in the old repository
handled. If you have an open pull request there, it would be totally
awesome if you can reapply your patch to a fork of the new repository
for the cookbook and submit a pull request for it. Also make sure that
you have updated the appropriate ticket in JIRA with the link for the
new pull request. Otherwise, we’ll work through the backlog.

Thanks and happy cooking!


Opscode, Inc
Joshua Timberman, Technical Program Manager
IRC, Skype, Twitter, Github: jtimberman


#2

On Mar 20, 2012, at 9:41 AM, Joshua Timberman wrote:

Ohai!

At the Chef Community Summit last November, I announced in one of the
sessions that we would split up the Opscode monolithic cookbooks into
separate repositories per popular request. This is something we should
have done long ago, arguably from the very beginning, as it makes
contribution to a specific cookbook easier for you all. You can read
the blog post of the official announcement here:

If you are a contributor, or wish to become one, please read the
general How to Contribute page, and the more specific How to
Contribute to Opscode Cookbooks page:

The second link includes a script that will help automate forking and
cloning. If you want to export patches from your fork of the old
repository for one of the new ones, you can use git format-patch and
git apply. For example, if you have the two most recent commits and
want to export those as a patch:

opscode/cookbooks git format-patch --stdout --no-prefix HEAD~2 > ../cookbook-patches/COOK-XYZ-CBNAME.patch opscode-cookbooks/CBNAME git apply --stat
…/cookbook-patches/COOK-XYZ-CBNAME.patch
opscode-cookbooks/CBNAME$ git apply --check
…/cookbook-patches/COOK-XYZ-CBNAME.patch
opscode-cookbooks/CBNAME$ git am < …/cookbook-patches/COOK-XYZ-CBNAME.patch

It is important to use git apply --check to see if the patch will apply cleanly.

We’ll be working on getting pull requests in the old repository
handled. If you have an open pull request there, it would be totally
awesome if you can reapply your patch to a fork of the new repository
for the cookbook and submit a pull request for it. Also make sure that
you have updated the appropriate ticket in JIRA with the link for the
new pull request. Otherwise, we’ll work through the backlog.

Thanks and happy cooking!


Opscode, Inc
Joshua Timberman, Technical Program Manager
IRC, Skype, Twitter, Github: jtimberman

Thanks for doing this, Opsocde folks.

This is great info on migrating changes using git. I added it to the wiki here: http://wiki.opscode.com/display/chef/Migrating+changes+from+the+old+monolithic+cookbooks+repo

Wes