Table of Contents

Using FOSSology from the Command Line

These command line utilities are helpful for sysadmins automating certain FOSSology tasks.

User Commands

These commands have man pages:

cp2foss Copy files to a FOSSology server, and run analyses.
fossjobs Queue up a FOSSology analysis job.
fosslic Deprecated: Perform a bsam license analysis on single files.
nomos Perform a license analysis on a single file.
fo_notify Email notification.

Developer Commands

The following are probably only useful for developers. These don't have man pages but you can get their usage message with -h:

fossology-scheduler FOSSology scheduler.
ununpack File unpacker. Unpacks zips, tars, bz2, …

Precursor to REST API

So what if you want to send a fossology server a file to do a license analysis on? First you need to change the fossology module so that it doesn't require authentication. Change:

class agent_nomos_once extends FO_Plugin {
 ...
  /** For anyone to access, without login, use: **/
  // public $DBaccess   = PLUGIN_DB_NONE;
  // public $LoginFlag  = 0;

  /** To require login access, use: **/
  public $DBaccess = PLUGIN_DB_ANALYZE;
  public $LoginFlag = 1;

To:

class agent_nomos_once extends FO_Plugin {
...
  /** For anyone to access, without login, use: **/
  public $DBaccess   = PLUGIN_DB_NONE;
  public $LoginFlag  = 0;

  /** To require login access, use: **/
  // public $DBaccess = PLUGIN_DB_ANALYZE;
  // public $LoginFlag = 1;

Now you can use wget to return a license:

wget --post-file i2c-htv.c http://myfossologyserver.com/?mod=agent_license_once