Community Documentation

Packaging a distribution on drupal.org

Last updated February 8, 2012. Created by hunmonk on November 25, 2009.
Edited by webchick, geerlingguy, cr0ss, langworthy. Log in to edit this page.

So you want to provide a Distribution on Drupal.org? Great! Here are the steps.

The drupal.org packaging system will take the code for a project, assemble it into an easily downloadable format, and post it to the project's pages on drupal.org.

Step 1: Pre-requisites

Step 2: Drush Make file

A Drush Make file is essentially a "recipe" that explains how to gather up all of the pre-requisites for a Drupal installation. You can either create them by hand, or with the generator.

See http://drupal.org/node/1432374 for a full working example of all valid properties supported by Drupal.org's packaging system. You can either create/edit these by hand, or you can auto-generate one in seconds by changing into any working Drupal site's root directory and running the command:

drush generate-makefile distro.make

Drush make will inspect your current install and write a distro.make file with the latest stable releases for all of the modules/themes it finds.

TODO: Except for #1432396: Drush make / Drupal.org make core specifications are different? and #1432380: drush generate-makefile and drush verify-makefile are incompatible.

Step 3: Converting to a Drupal.org-specific Drush Make file.

Once you have a valid Drush Make file, the next step is to convert it to one suitable for Drupal.org packaging. The Drupal.org version is essentially the same as a normal Drush Make file, but with the following important differences:

Verify make file

To check whether your make file is Drupal.org-compatible, run the following command:

drush verify-makefile distro.make

Note that you must resolve all errors before proceeding. See http://drupal.org/node/1432190 for some common errors and how to fix them.

If all goes well, you should see the following output from Drush:

Makefile simple.make passed.  [ok]

Convert make file to drupal-org.make file

drush convert-makefile distro.make drupal-org.make

If you get the following output:

Successfully wrote converted .make file drupal-org.make. [ok]

...you are good to go! The converted .make file will look something like this:

core = 6.14
projects[views] = 2.7
projects[cck] = 2.6
projects[webform] = 2.9
projects[token] = 1.12
projects[spreadfirefox] = 1.2

Note that if Drush scares you, there is also a web interface for verifying/converting .make files at the bottom of any distribution project page:

Links to verify and convert .make files

Step 4: Committing and releasing

Follow the instructions on your project page's "Version Control" tab to clone your Git repository. You'll need to add your new drupal-org.make file to the root directory:

git clone --branch 7.x-1.x [yourname]@git.drupal.org:project/[project].git
cd [project]
mv /path/to/drupal-org.make .
git add drupal-org.make
git commit -m "Drupal.org make file"

As a profile maintainer, all you have to check in to Git is the drupal-org.make file, and the packaging script will automatically assemble all of the modules, themes, libraries, and patches it references when creating the downloadable file archive for a given release.

Once that's complete, create a release for your project in the typical way. The packaging system looks in a profile's main directory (the same directory your .profile file is located) for the drupal-org.make file -- if it finds the file, then it will package the contents of the file with the profile.

// TODO: Screenshot of a fully packaged profile.

Step 5: Maintaining your distribution

Blah blah about Documentation. Support. Security/maintenance fixes.

AttachmentSize
distro-web-tools.png50.57 KB
nobody click here