As a utility to help deployment (there are already a lot of different dependencies) I've added a small button that will remotely install the ARC2 library.
I FULLY understand if there are philosophical reasons why someone may not like this function, but my use-case is to do a lot of deployment testing, including tear-down and migration of sites, while still trying to keep up with the DEV versions via CVS. Copying third-party libraries around is a PITA.

Anyway:

Code looks like:

/**
 * Attempt to install and unzip the required library from remote source.
 * This may have security implications - it won't work if you have correctly
 * locked-down file permissions. It could if you are on a looser dev box.
 * 
 * There may be various problems on different machines, but this may work.
 */
function rdf_admin_install_arc() {
  $arc_library_package_url = 'http://arc.semsol.org/download/2009/03/05/arc.zip';
  $destination_filepath = dirname(RDF_ARC2_PATH) .'/'. basename($arc_library_package_url);
  drupal_set_message(t('Requesting ARC2 package from !arc_package', array('!arc_package' => l($arc_library_package_url, $arc_library_package_url))));
  if ($package_data = file_get_contents($arc_library_package_url)) {
    file_put_contents($destination_filepath, $package_data);
    drupal_set_message(t('Fetched library to %destination_filepath', array('%destination_filepath' => $destination_filepath)));
    // unpack it 
    // try system-level unzip (did not try eith ZipArchive)
    drupal_set_message(t('Unpacking using commandline'));
    exec("cd ". dirname($destination_filepath) .";unzip '". basename($destination_filepath) ."'");
    if (file_exists(RDF_ARC2_PATH. '/ARC2.php')) {
      exec("chmod -R g+w ". RDF_ARC2_PATH );
      drupal_set_message(t('Success!'));
    } 
    else {
      drupal_set_message(t('Failed to unzip. You\'ll have to do it yourself.'));
    }
  }
  else {
    drupal_set_message(t('Failed to retrieve package from @arc_package',  array('@arc_package' => l($arc_library_package_url, $arc_library_package_url))), 'error');
  }
}

The ARC library is fully GPL, so COULD be distributed. But this method still skirts the distribution issue by not includingit, just providing a tool that does the including for you.
Of course, there are security issues too.
I want this RDF initiative to gain momentum, but that won't happen while the dependencies are such a hassle.

An alternative, using form_alter, is in my sandbox.
If this looks like a bad idea, I'll just leave the code here as an FYI for reference.

Comments

scor’s picture

ARC license was recently adapted to allow its packaging with the RDF module, but I'm still waiting to hear from Arto on this issue...

xjm’s picture

Issue summary: View changes

Switching the IS away from Full HTML so the issue can be updated.

smustgrave’s picture

Status: Active » Closed (outdated)

Thanks @xjm closing since this was D6