Hi Mike,
those instructions are for BSAM license agent. Adding a new license to nomos
requires editing of parse.c and STRINGS.in files and then recompiling of
nomos agent. Depending on what kind of license one wants to add this may
be an easy task or not so easy. Add new license page is just for storing
license information, the license agent does not use that information.

This is how I understand the procedure, I hope fossology team
corrects if I tried to lead you to wrong direction. Note that
this is for the easy case, someone else should tell what to do in
the not-so-easy case.

Adding a new license has two steps. In the first step
the license text has to be correctly identified
as as a new XYZ-license. In the second step files which
are referring to the new license have to be identified
as XYZ licensed files.

Nomos does license identification  using short phrases.
If nomos is not identifying the license then it may identify
it as a "style" type of license if it has similarities with
the known license types or a "not license found" or "copyright"
type file. In the former case you don't have to add new
license phrases (_LT_) to STRINGS.in but only a new TITLE for the
XYZ-license. This may sound odd but it does not matter whether
license is identified as BSD-style or MPL-style or Apache-style
when it is eventually tagged with the right license information.
For example:
#
%ENTRY% _TITLE_XYZ-LICENSE1
%KEY%   "licen[cs]"
%STR%   "XYZ-licen[cs]e (v|version ) 1\.?0"
#
Note syntax . Both \ and ? are required around '.'.

In addition parse.c has to be updated. If the new license was
identified a style type license then add to right place
a new else if block like
  else if (INFILE(_TITLE_XYZ-LICENSE1)) {
    INTERESTING("XYZ_v1.0");
  }

Nomos agent has to be now recompiled. You don't have to
install the new agent yet  but it is better to test
it using command line ui. Nomos agent may need to access
the database, so you may have to run nomos agent
as a user that has access to postgre db like
  $sudo -u fossy ./nomos xyx-license.txt

As a result you should get output
  File LICENSE contains license(s) XYZ_v1.0

I hope this helps.

br Raino



2010/10/5 Mike Kinghan <mi...@symbian.org>:
> Hi Mary,
>
> These instructions work fine.
>
> However I don't seem to have succeed in adding a new license to my analysis.
> I used the instructions here:
>
> http://www.fossology.org/how_to_add_a_license_template_or_license_phrase_and_re-analyze_licenses
>
> and I chose the method:
>
> Alternately:
>
> Place your file under /usr/local/share/fossology/agents/licenses/.
> Run 'sudo fossinit'. The ”…” sequence indicates that the licenses are being
> installed.
>
> Specifically I created the folder
> /usr/local/share/fossology/agents/licenses/proprietary and placed in it a
> raw license text file called "Nokia Closed Copyright" which contains the
> text:
>
> Copyright 2007 Nokia. All rights reserved.
> This material, including documentation and any related computer
> programs, is protected by copyright controlled by Nokia. All
> rights are reserved. Copying, including reproducing, storing,
> adapting or translating, any or all of this material requires the
> prior written consent of Nokia. This material also contains
> confidential information which may not be disclosed to others
> without the prior written consent of Nokia.
>
> I want to detect source files in the Symbian OS source tree from which this
> Nokia license has not been scrubbed.
>
> The fossinit process reported 1 more license processed (361) than the
> initial install. However I notice that after fossinit, there do does not
> exist a "Nokia Closed Copyright.meta" file, whereas all the default raw
> licenses have matching .meta files
>
> When I rescheduled the analysis, I expected the package to gain a Nomos
> License report-line for the "Nokia Closed Copyright" license, because I know
> there are matching files. But the rescheduled analysis ran in 0 time and did
> not report the new license.
>
> I guess the process I have followed is not sufficient to register a new
> license? I also tried entering the license via License Admin -> Add License
> (which seems to be under construction). That operation reported the license
> added but resulted in nothing new appearing under
> /usr/local/share/fossology/agents/licenses/, and again made no difference
> when I reran the analysis.
>
> Br, Mike
>
>
> On 4 October 2010 19:10, Laser, Mary <mary.la...@hp.com> wrote:
>>
>> Hi Mike,
>>
>> Yes, that page is out of date.  Here is the correct click-by-click process
>> for rescheduling an agent for analysis:
>>
>>
>>
>> 1.       Click on the main “Browse” tab.
>>
>> 2.       Navigate using the left navigation bar till you see your upload
>> in the right hand window.
>>
>> 3.       Click on the “jobs” link to see the history of jobs run on your
>> upload.
>>
>> 4.       On the right side of the window, locate the “Reset | Delete”
>> actions for the agent you wish to rerun.
>>
>> 5.       Click on “Delete”.  The window will refresh and the job will be
>> gone.
>>
>> 6.       Select  “Jobs” -> “Agents” from the top menu bar.
>>
>> 7.       Select the folder containing the upload you wish to analyze.
>>
>> 8.       Select the upload to analyze.
>>
>> 9.       A list of analyses available for the upload are listed in step 3.
>>
>> 10.   Select the one you wish to run and Click on the “Analyze” button.
>>
>> 11.   The job is automatically queued up & run.
>>
>>
>>
>>
>>
>> I will update the instructions on fossology.org with these steps.  Please
>> let me know if they are OK/not OK.
>>
>>
>>
>> Thanks,
>>
>> Mary
>>
>>
>>
>>
>>
>>
>>
>> From: fossology-boun...@fossology.org
>> [mailto:fossology-boun...@fossology.org] On Behalf Of Mike Kinghan
>> Sent: Monday, October 04, 2010 2:21 AM
>> To: fossology@fossology.org
>> Subject: [FOSSology] How to reschedule nomos license analysis?
>>
>>
>>
>> Hi folks,
>>
>> I have added a new license to my foss 1.2 server (by placing the raw
>> license in /usr/lib/share/fossology/agents/licenses and running fossinit)
>> and now want to reschedule the nomos analysis of a package. I can't see any
>> way to do this via the UI. The instructions at
>> http://www.fossology.org/how_to_add_a_license_template_or_license_phrase_and_re-analyze_licenses#re-analyzing_licenses
>> say:
>>
>> Click “Browse” at the top menu. Navigate the tree until you find the
>> upload to analyze.
>>
>> Under the upload's description is a link to “Reschedule license analysis”.
>> This will schedule the upload for a re-analysis.
>>
>> But in 1.2 no such link exists in the Browser.
>>
>> --
>> Mike Kinghan,
>> Test Lead, Symbian
>> +44(0)776 5222 793
>>
>>
>>
>> Some facts about Symbian that we are legally obliged to tell you:
>>
>> Symbian Foundation Limited is a Company Limited by Guarantee and not
>> having Share Capital
>>
>> We're registered in England and Wales - Companies House knows us by the
>> number 6683783
>>
>> Our address is 1 Boundary Row, Southwark, London SE1 8HP.
>>
>>
>>
>>
>
>
> --
> Mike Kinghan,
> Test Lead, Symbian
> +44(0)776 5222 793
>
> Some facts about Symbian that we are legally obliged to tell you:
> Symbian Foundation Limited is a Company Limited by Guarantee and not having
> Share Capital
> We're registered in England and Wales - Companies House knows us by the
> number 6683783
> Our address is 1 Boundary Row, Southwark, London SE1 8HP.
>
>
>
> _______________________________________________
> fossology mailing list
> fossology@fossology.org
> http://fossology.org/mailman/listinfo/fossology
>
>
_______________________________________________
fossology mailing list
fossology@fossology.org
http://fossology.org/mailman/listinfo/fossology

Reply via email to