FOSSology Project Logo FOSSology
Advancing open source analysis and development
 

Bucket Description

Buckets allow a fossology system administrator to create reporting categories. For example, HP uses categories like “Preferred Licenses”, “SHIP-HOLD Licenses”, “Possibly restrictive licensing terms”, “Commercial Licenses”, … See the example report Buckets.

You don't have to use buckets if you don't want, but they are a very powerful way to organize your reports, minimizing the time needed for software reviews. Since buckets frequently need to make a value judgement, they need to be customized for each user/project/corporation. Samples (TBD) will ship with fossology.

Bucket analysis is done through a bucket agent and results are stored in the database.

How to Define a Bucket

Before you create a definition is is important to understand that:

  • Buckets are evaluated for all files and containers (aka items).
  • Any item that matches a bucket definition will be reported as being in that bucket.
  • Buckets can be defined to be exclusive (an item can only appear in 1 bucket) or non-exclusive (an item can be a member of multiple buckets). You could even define a bucket to report files that appear in multiple buckets.
  • Buckets can have an evaluation order.

These are the methods you can use to define a bucket:

  • REGEX: Match license name against a regular expression.
  • MATCH_EVERY: Match an items license names against a combination of licenses. For example, you could define a “Potential License Conflict” bucket that is defined as MATCH_EVERY for the license combination “MPL and GPL” or “GPL and OSL”. If an item has one of the listed combinations, it goes in the bucket.
  • MATCH_ONLY: Match the licenses in item to the licenses listed in a file. If the item only has licenses listed in the file, then put the item in this bucket.
  • EXEC: Exec a program. Return value says if item is in the bucket.

Any item that doesn't match a defined bucket goes into a special bucket that just says it's not in any other one.

Bucket Pools

Buckets are individual classifications e.g. “Items with bad licenses”. But buckets are usually (always?) used in groups. Bucket Pools are collections of buckets. For example, you could have a bucket pool for your distro, project or company that defines good, bad, questionable, … buckets.

For every bucket pool, there is always a bucket called “No Match”. Any pfile that matches no other bucket will end up in this bucket.

Database

Table: bucketpool

Names the each bucket pool.

Column Description
bucketpool_pk Primary Key
bucketpool_name Name of bucket pool, unique
bucketpool_desc Bucket pool description

Table: bucket

Defines each bucket in a bucket pool. Each bucketpool has 1-n bucket records.

Column Description
bucket_pk Primary Key
bucketpool_fk Foreign key to bucketpool this bucket definition belongs in.
bucket_name Name
bucket_color Color to highlight bucket in reports
bucket_report_order Order to sort buckets in reports. 1 is highest priority
bucket_eval_order Order to evaluate buckets. e.g. an order of 5 will be evaluated before an order of 6
bucket_exclusive True if an item that matches this bucket def will appear exclusively in this bucket. Note the eval_order is important.
bucket_type 1=MATCH_EVERY, 2=MATCH_ONLY, 3=REGEX, 4=EXEC
bucket_regex if type is REGEX, this is the regular expression
bucket_filename if type is 1 or 2, this is the name of the file containing the license name strings. If type is 4, this is the name of the file to exec. Files are stored in $DATADIR/{bucketpool name}

Table: bucket_file

Associate a pfile with 1-n buckets.

Column Description
bf_pkPrimary Key
bucket_fk Foreign key to table bucket
pfile_fk Foreign key to table pfile

Origin

Buckets are based on an internal HP tool called Nomos. Here is a partial screenshot:

 
task/buckets.txt · Last modified: 2010/01/07 16:28 by bobg

Copyright (C) 2007-2009 Hewlett-Packard Development Company, L.P.
FOSSology Project documentation is licensed under the GNU Free Documentation License Version 1.2
Recent changes RSS feed Valid XHTML 1.0 Valid CSS3 Driven by DokuWiki