diff --git a/drupalorg_project/plugins/release_packager/DrupalorgProjectPackageReleaseDistro.class.php b/drupalorg_project/plugins/release_packager/DrupalorgProjectPackageReleaseDistro.class.php
index 7dfa671..0ff70f3 100644
--- a/drupalorg_project/plugins/release_packager/DrupalorgProjectPackageReleaseDistro.class.php
+++ b/drupalorg_project/plugins/release_packager/DrupalorgProjectPackageReleaseDistro.class.php
@@ -30,7 +30,9 @@ class DrupalorgProjectPackageReleaseDistro extends DrupalorgProjectPackageReleas
     }
 
     // Move inside the profile directory.
-    if (!drupal_chdir("{$this->project_build_root}/{$this->project_short_name}")) {
+    $profile_dir = "{$this->project_build_root}/{$this->project_short_name}";
+
+    if (!drupal_chdir($profile_dir)) {
       return 'error';
     }
 
@@ -38,6 +40,10 @@ class DrupalorgProjectPackageReleaseDistro extends DrupalorgProjectPackageReleas
     // file named drupal-org.make in the main directory of their profile.
     $drupalorg_makefile = 'drupal-org.make';
 
+    // If they need to do fancy thing with core (patches, specific Git
+    // revisions, etc) they need to define core in a separate .make file.
+    $drupalorg_core_makefile = 'drupal-org-core.make';
+
     if (file_exists($drupalorg_makefile)) {
       // On packaged install profiles, we want the profile-only tarball to be
       // the heaviest weight in the {project_release_file} table so it sinks
@@ -45,169 +51,179 @@ class DrupalorgProjectPackageReleaseDistro extends DrupalorgProjectPackageReleas
       $files[$this->filenames['file_path_tgz']] = 10;
       $files[$this->filenames['file_path_zip']] = 11;
 
-      // Search the .make file for the required 'core' attribute.
-      $info = drupal_parse_info_file($drupalorg_makefile);
 
-      // Only proceed if a core release was found.
-      if (!isset($info['core'])) {
-        wd_err("ERROR: %profile does not have the required 'core' attribute.", array('%profile' => $this->release_file_id), $this->release_node_view_link);
-        return 'error';
+      // Parse the drupal-org.make file since we'll need to inspect the 'core'
+      // attribute.
+      $contrib_info = drupal_parse_info_file($drupalorg_makefile);
+
+      // If the distro defines its own drupal-org-core.make file, use that.
+      if (file_exists($drupalorg_core_makefile)) {
+        $drupalorg_core_makefile = "$profile_dir/$drupalorg_core_makefile";
+        // Parse this so we can validate the 'core' attribute later.
+        $core_info = drupal_parse_info_file($drupalorg_core_makefile);
       }
+
+      // Otherwise, create one automatically just using the 'core' attribute
+      // from the drupal-org.make file and write it out into the build root.
       else {
+        if (!isset($contrib_info['core'])) {
+          wd_err("ERROR: %profile does not have the required 'core' attribute.", array('%profile' => $this->release_file_id), $this->release_node_view_link);
+          return 'error';
+        }
 
         // Basic sanity check for the format of the attribute. The Git checkout
         // attempt of core will handle the rest of the validation (ie, it will
         // fail if a non-existant tag is specified.
-        if (!preg_match("/^(\d+)\.(\d+)(-[a-z0-9]+)?$/", $info['core'], $matches)) {
+        if (!preg_match("/^(\d+)\.(\d+)(-[a-z0-9]+)?$/", $contrib_info['core'], $matches)) {
           wd_err("ERROR: %profile specified an invalid 'core' attribute -- both API version and release are required.", array('%profile' => $this->release_file_id), $this->release_node_view_link);
           return 'error';
         }
-        else {
-          // Compare the Drupal API version in the profile's version string
-          // with the API version of core specificed in the .make file --
-          // these should match.
-          $profile_api_version = $matches[1];
-          $parts = explode('.', $this->release_version);
-          $release_api_version = $parts[0];
-          
-          if ($profile_api_version != $release_api_version) {
-            wd_err("ERROR: %profile specified an invalid 'core' attribute -- the API version must match the API version of the release.", array('%profile' => $this->release_file_id), $this->release_node_view_link);
-            return 'error';
-          }
-        }
 
-        // NO-CORE DISTRIBUTION.
-
-        $no_core_id = "{$this->release_file_id}-no-core";
-
-        // Build the drupal file path and the full file path for tgz and zip.
-        $no_core_file_path_tgz = "{$this->file_destination_subdir}/$no_core_id.tar.gz";
-        $no_core_full_dest_tgz = "{$this->file_destination_root}/$no_core_file_path_tgz";
-        $no_core_file_path_zip = "{$this->file_destination_subdir}/$no_core_id.zip";
-        $no_core_full_dest_zip = "{$this->file_destination_root}/$no_core_file_path_zip";
-
-        // Run drush_make to build the profile's contents.
-        // --drupal-org: Invoke drupal.org specific validation/processing.
-        // --drupal-org-build-root: Let the script know where to place it's
-        //   build-related files.
-        // --drupal-org-log-errors-to-file: Store build errors for later output.
-        // --drupal-org-log-package-metadata: Store package metadata for
-        //   later recording in the database.
-        if (!drupal_exec("{$this->conf['drush']} make --drupal-org --drupal-org-build-root={$this->project_build_root} --drupal-org-log-errors-to-file --drupal-org-log-package-metadata=metadata-contrib.json $drupalorg_makefile .")) {
-          // The build failed, get any output error messages and include them
-          // in the packaging error report.
-          $build_errors_file = "{$this->project_build_root}/build_errors.txt";
-          if (file_exists($build_errors_file)) {
-            $lines = file($build_errors_file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
-            foreach ($lines as $line) {
-            	wd_err("ERROR: $line");
-            }
+        // Write a drupal-org-core.make file used to build core.
+        $drupalorg_core_makefile = "{$this->project_build_root}/$drupalorg_core_makefile";
+        $core_info = $this->createCoreMakeFile($contrib_info['core'], $drupalorg_core_makefile);
+      }
+
+      // Now that we have both of the .make files we're going to use,
+      // ensure that the core major version matches across both files and the
+      // API version of the release node itself.
+      $core_parts = explode('.', $core_info['core']);
+      $contrib_parts = explode('.', $contrib_info['core']);
+      $release_parts = explode('.', $this->release_version);
+
+      if ($core_parts[0] != $contrib_parts[0]) {
+        wd_err("ERROR: %profile specified different major versions in the 'core' attributes in drupal-org.make and drupal-org-core.make.", array('%profile' => $this->release_file_id), $this->release_node_view_link);
+      }
+      if ($core_parts[0] != $release_parts[0]) {
+        wd_err("ERROR: %profile specified an invalid 'core' attribute -- the core major version must match the API version of the release.", array('%profile' => $this->release_file_id), $this->release_node_view_link);
+        return 'error';
+      }
+
+
+      // NO-CORE DISTRIBUTION.
+
+      $no_core_id = "{$this->release_file_id}-no-core";
+      // Build the drupal file path and the full file path for tgz and zip.
+      $no_core_file_path_tgz = "{$this->file_destination_subdir}/$no_core_id.tar.gz";
+      $no_core_full_dest_tgz = "{$this->file_destination_root}/$no_core_file_path_tgz";
+      $no_core_file_path_zip = "{$this->file_destination_subdir}/$no_core_id.zip";
+      $no_core_full_dest_zip = "{$this->file_destination_root}/$no_core_file_path_zip";
+
+      // Run drush_make to build the profile's contents.
+      // --drupal-org: Invoke drupal.org specific validation/processing.
+      // --drupal-org-build-root: Let the script know where to place it's
+      //   build-related files.
+      // --drupal-org-log-errors-to-file: Store build errors for later output.
+      // --drupal-org-log-package-metadata: Store package metadata for
+      //   later recording in the database.
+      if (!drupal_exec("{$this->conf['drush']} make --drupal-org=contrib --drupal-org-build-root={$this->project_build_root} --drupal-org-log-errors-to-file --drupal-org-log-package-metadata=metadata-contrib.json $drupalorg_makefile .")) {
+        // The build failed, get any output error messages and include them
+        // in the packaging error report.
+        $build_errors_file = "{$this->project_build_root}/build_errors.txt";
+        if (file_exists($build_errors_file)) {
+          $lines = file($build_errors_file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
+          foreach ($lines as $line) {
+            wd_err("ERROR: $line");
           }
-          wd_err("ERROR: Build for %profile failed.", array('%profile' => $no_core_id), $this->release_node_view_link);
-          return 'error';
         }
+        wd_err("ERROR: Build for %profile failed.", array('%profile' => $no_core_id), $this->release_node_view_link);
+        return 'error';
+      }
 
-        // Change into the profile build directory.
-        if (!drupal_chdir($this->project_build_root)) {
-          return 'error';
-        }
+      // Change into the profile build directory.
+      if (!drupal_chdir($this->project_build_root)) {
+        return 'error';
+      }
 
-        // Package the no-core distribution.
-        // 'h' is for dereference, we want to include the files, not the links
-        if (!drupal_exec("{$this->conf['tar']} -ch --file=- {$this->project_short_name} | {$this->conf['gzip']} -9 --no-name > $no_core_full_dest_tgz")) {
-          return 'error';
-        }
-        $files[$no_core_file_path_tgz] = 6;
+      // Package the no-core distribution.
+      // 'h' is for dereference, we want to include the files, not the links
+      if (!drupal_exec("{$this->conf['tar']} -ch --file=- {$this->project_short_name} | {$this->conf['gzip']} -9 --no-name > $no_core_full_dest_tgz")) {
+        return 'error';
+      }
+      $files[$no_core_file_path_tgz] = 6;
 
-        @unlink($no_core_full_dest_zip);
-        if (!drupal_exec("{$this->conf['zip']} -rq $no_core_full_dest_zip {$this->project_short_name}")) {
-          return 'error';
-        }
-        $files[$no_core_file_path_zip] = 7;
+      @unlink($no_core_full_dest_zip);
+      if (!drupal_exec("{$this->conf['zip']} -rq $no_core_full_dest_zip {$this->project_short_name}")) {
+        return 'error';
+      }
+      $files[$no_core_file_path_zip] = 7;
 
 
-        // CORE DISTRIBUTION.
+      // CORE DISTRIBUTION.
 
-        // Write a small .make file used to build core.
-        $core_version = $info['core'];
-        $core_build_dir = "drupal-$core_version";
-        $core_makefile = "$core_build_dir.make";
-        $this->createCoreMakeFile($core_version, $core_makefile);
+      // Create the name of the directory where we'll build core. This will be
+      // the top-level directory in the fully packaged distribution release.
+      $core_build_dir = 'drupal-' . $core_info['core'];
 
-        // Run drush_make to build core.
-        if (!drupal_exec("{$this->conf['drush']} make $core_makefile $core_build_dir")) {
-          // The build failed, bail out.
-          wd_err("ERROR: Build for %core failed.", array('%core' => $core_build_dir), $this->release_node_view_link);
-          return 'error';
-        }
+      // Run drush_make to build core.
+      // --drupal-org=core: Invoke drupal.org specific validation/processing.
+      // --drupal-org-build-root: Let the script know where to place it's
+      //   build-related files.
+      // --drupal-org-log-errors-to-file: Store build errors for later output.
+      // --drupal-org-log-package-metadata: Store package metadata for
+      //   later recording in the database.
+      if (!drupal_exec("{$this->conf['drush']} make --drupal-org=core --drupal-org-build-root={$this->project_build_root} --drupal-org-log-errors-to-file --drupal-org-log-package-metadata=metadata-core.json $drupalorg_core_makefile $core_build_dir")) {
+        // The build failed, bail out.
+        wd_err("ERROR: Build for %core failed.", array('%core' => $core_build_dir), $this->release_node_view_link);
+        return 'error';
+      }
 
-        // Move the profile into place inside core.
-        if (!rename($this->project_short_name, "$core_build_dir/profiles/{$this->project_short_name}")) {
-          wd_err("ERROR: can't rename {$this->project_short_name} to $core_build_dir/profiles/{$this->project_short_name}");
-          return 'error';
-        }
+      // Move the profile into place inside core.
+      if (!rename($this->project_short_name, "$core_build_dir/profiles/{$this->project_short_name}")) {
+        wd_err("ERROR: can't rename {$this->project_short_name} to $core_build_dir/profiles/{$this->project_short_name}");
+        return 'error';
+      }
 
-        $core_id = "{$this->release_file_id}-core";
+      $core_id = "{$this->release_file_id}-core";
 
-        // Build the drupal file path and the full file path for tgz and zip.
-        $core_file_path_tgz = "{$this->file_destination_subdir}/$core_id.tar.gz";
-        $core_full_dest_tgz = "{$this->file_destination_root}/$core_file_path_tgz";
-        $core_file_path_zip = "{$this->file_destination_subdir}/$core_id.zip";
-        $core_full_dest_zip = "{$this->file_destination_root}/$core_file_path_zip";
+      // Build the drupal file path and the full file path for tgz and zip.
+      $core_file_path_tgz = "{$this->file_destination_subdir}/$core_id.tar.gz";
+      $core_full_dest_tgz = "{$this->file_destination_root}/$core_file_path_tgz";
+      $core_file_path_zip = "{$this->file_destination_subdir}/$core_id.zip";
+      $core_full_dest_zip = "{$this->file_destination_root}/$core_file_path_zip";
 
-        // Package the core distribution.
-        // 'h' is for dereference, we want to include the files, not the links
-        if (!drupal_exec("{$this->conf['tar']} -ch --file=- $core_build_dir | {$this->conf['gzip']} -9 --no-name > $core_full_dest_tgz")) {
-          return 'error';
-        }
-        // We want this to float to the top, so give it the lightest weight.
-        $files[$core_file_path_tgz] = 0;
+      // Package the core distribution.
+      // 'h' is for dereference, we want to include the files, not the links
+      if (!drupal_exec("{$this->conf['tar']} -ch --file=- $core_build_dir | {$this->conf['gzip']} -9 --no-name > $core_full_dest_tgz")) {
+        return 'error';
+      }
+      // We want this to float to the top, so give it the lightest weight.
+      $files[$core_file_path_tgz] = 0;
 
-        @unlink($core_full_dest_zip);
-        if (!drupal_exec("{$this->conf['zip']} -rq $core_full_dest_zip $core_build_dir")) {
-          return 'error';
+      @unlink($core_full_dest_zip);
+      if (!drupal_exec("{$this->conf['zip']} -rq $core_full_dest_zip $core_build_dir")) {
+        return 'error';
+      }
+      // We want the .zip version with core to be ligher than the non-core
+      // files, but heavier than .tar.gz.
+      $files[$core_file_path_zip] = 1;
+
+      // If project_package exists, process the package metadata and record
+      // everything we just packaged up with this release.
+      if (module_exists('project_package')) {
+
+        // Development releases may have changed package contents -- clear
+        // out their package items so a fresh item summary will be built.
+        if ($this->release_node->project_release['rebuild']) {
+          db_query("DELETE FROM {project_package_local_release_item} WHERE package_nid = %d", $this->release_node->nid);
         }
-        // We want the .zip version with core to be ligher than the non-core
-        // files, but heavier than .tar.gz.
-        $files[$core_file_path_zip] = 1;
-
-        // If project_package exists, process the package metadata and record
-        // everything we just packaged up with this release.
-        if (module_exists('project_package')) {
-
-          // Development releases may have changed package contents -- clear
-          // out their package items so a fresh item summary will be built.
-          if ($this->release_node->project_release['rebuild']) {
-            db_query("DELETE FROM {project_package_local_release_item} WHERE package_nid = %d", $this->release_node->nid);
-          }
 
-          // TODO: Fix this once http://drupal.org/node/1469714 is deployed
-          // and we can safely use --drupal-org-log-package-metadata when
-          // building core, too.
-          // Core was built without the drupal.org drush extension, so the
-          // package item for core isn't in the package contents file.
-          // Retrieve it manually.
-          if (!($core_release_nid = db_result(db_query("SELECT nid FROM {project_release_nodes} WHERE pid = %d AND tag = '%s'", DRUPALORG_CORE_NID, $core_version)))) {
-            wd_err("ERROR: Can't find core release for $core_version");
-            return 'error';
-          }
-          project_package_record_local_items($this->release_node->nid, array($core_release_nid));
-
-          // Retrieve the contrib package metadata.
-          $contrib_metadata_file = "{$this->project_build_root}/metadata-contrib.json";
-          if (file_exists($contrib_metadata_file)) {
-            $json = file_get_contents($contrib_metadata_file);
-            $contrib_metadata = json_decode($json, TRUE);
+        // Retrieve the package metadata.
+        foreach (array('core', 'contrib') as $type) {
+          $metadata_file = "{$this->project_build_root}/metadata-$type.json";
+          if (file_exists($metadata_file)) {
+            $json = file_get_contents($metadata_file);
+            $metadata = json_decode($json, TRUE);
           }
           else {
-            wd_err("ERROR: %file does not exist for %profile release.", array('%file' => $contrib_metadata_file, '%profile' => $this->release_file_id), $this->release_node_view_link);
+            wd_err("ERROR: %file does not exist for %profile release.", array('%file' => "metadata-$type.json", '%profile' => $this->release_file_id), $this->release_node_view_link);
             return 'error';
           }
-
           // Record everything included in the release.
-          $this->recordPackageMetadata($contrib_metadata);
+          $this->recordPackageMetadata($metadata);
         }
       }
+
     }
     else {
       wd_msg("No makefile for %profile profile -- skipping extended packaging.", array('%profile' => $this->release_file_id), $this->release_node_view_link);
@@ -301,11 +317,24 @@ class DrupalorgProjectPackageReleaseDistro extends DrupalorgProjectPackageReleas
    *   The core release to package with the profile.
    * @param $core_makefile
    *   The path to the make file to create.
+   *
+   * @return array
+   *   The information we just wrote out as if we had parsed the .make file
+   *   with drupal_parse_info_file()
    */
   protected function createCoreMakeFile($core_version, $core_makefile) {
-    $output = '';
+    $output = "api = 2\n";
     $output .= "core = $core_version\n";
     $output .= "projects[drupal] = $core_version\n";
     file_put_contents($core_makefile, $output);
+
+    // Return this .make file as a parsed info array.
+    return array(
+      'api' => 2,
+      'core' => $core_version,
+      'projects' => array(
+        'drupal' => $core_version,
+      ),
+    );
   }
 }
