<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>3743</bug_id>
          
          <creation_ts>2013-01-17 11:45:32 +0000</creation_ts>
          <short_desc>Packaging license texts</short_desc>
          <delta_ts>2014-07-21 16:32:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>configuration</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>1.7</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Beth Flanagan">elizabeth.flanagan</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>elizabeth.flanagan</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28891</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2013-01-17 11:45:32 +0000</bug_when>
    <thetext>We would like to include license texts (generic LICENSE + LIC_FILES_CHKSUMs) in PN-lic to install them on target.

http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/032174.html

I&apos;ve talked with Beth about this:
Tue Nov 27 18:50:49 2012:
18:24 &lt;pidge&gt; hey martin, I have some questions about what you&apos;re looking for with license.bbclass
18:26 &lt;JaMa&gt; hi
18:27 &lt;pidge&gt; hiya
18:27 &lt;pidge&gt; I want to understand a bit more fully what you&apos;re looking to do
18:28 &lt;JaMa&gt; currently there is license in package metadata and opkg shows it
18:28 &lt;pidge&gt; yes
18:28 &lt;JaMa&gt; for proprietary packages we would like to also package license text in main package
18:28 &lt;JaMa&gt; so that on target device you can actually read what license &apos;proprietary-foo&apos; says
18:29 &lt;pidge&gt; ah, ok
18:29 &lt;pidge&gt; so, a few things
18:29 &lt;pidge&gt; you know about LICENSE_PATH I assume
18:29 &lt;JaMa&gt; so such functionality should add do_install_append which copies files referenced by LIC_FILES_CHKSUM to some unified location
18:30 &lt;pidge&gt; yes, that&apos;d kind of what I was thinking.
18:31 &lt;JaMa&gt; I&apos;m not sure if LICENSE_PATH is what I&apos;m looking for
18:32 &lt;pidge&gt; no, only for adding the custom generic
18:32 &lt;pidge&gt; ok, so... one way to do it is with COPY_LIC_MANIFEST and COPY_LIC_FILES but I don&apos;t think it will do exactly what you want.
18:33 &lt;pidge&gt; if I understand correctly, what you want is for the license text to be added to the package so when the package is installed it&apos;s added to the image.
18:33 &lt;pidge&gt; that sound about right?
18:33 &lt;JaMa&gt; ah reading COPY_LIC_DIRS + COPY_LIC_MANIFEST once again looks close to what we want
18:34 &lt;JaMa&gt; yes it&apos;s close, but doesn&apos;t solve when some package is installed by opkg after image creation
18:34 &lt;pidge&gt; yeah. not exact, but I think what you&apos;re asking for may be more useful in certain use cases
18:34 &lt;pidge&gt; right
18:35 &lt;pidge&gt; and honestly, we should be packaging with licenses anyway
18:35 &lt;JaMa&gt; I think what I want can replace COPY_LIC_DIRS + COPY_LIC_MANIFEST
18:35 &lt;pidge&gt; so, I think the right place to do this is within package.bbclass
18:36 &lt;JaMa&gt; because with licenses in packages itself you don&apos;t need to create manifest and license dir on rootfs time
18:37 &lt;pidge&gt; some people do require the manifest. but yeah, I think that doing it via the packager is cleaner.
18:37 &lt;pidge&gt; hrm.......
18:37 &lt;pidge&gt; ok, how does this sound....
18:38 &lt;pidge&gt; on do_package the packager grabs the license text and also creates the spdx metadata and packages it up with everything.
18:38 &lt;JaMa&gt; looks good to me
18:39 &lt;pidge&gt; on do_install if COPY_LIC_MANIFEST is set, we do_install_append to tack on the spdx metadata to the main manifest.
18:39 &lt;JaMa&gt; there is also option to add PN-license with only license included and add PN-license to PN RDEPENDS
18:39 &lt;pidge&gt; and COPY_LIC_DIRS sets up if we package with license text
18:40 &lt;JaMa&gt; but in both cases there is issue with &quot;shared&quot; license text as 2 packages cannot install the same file
18:40 &lt;JaMa&gt; so you can install bigger package with all common-licenses included and then PN installs just symlink which is unique
18:40 &lt;pidge&gt; hrm. right. but they can install a simlink heh, exactly
18:40 &lt;JaMa&gt; or you have to duplicate common license text for each package
18:41 &lt;pidge&gt; simlinks, or else dvhart will have my head ;)
18:41 &lt;JaMa&gt; then there is problem how to generate that big package with all common-licenses :)
18:41 &lt;pidge&gt; poky-tiny will no longer be tiny without that
18:42 &lt;JaMa&gt; it should include all licenses (not only those used on rootfs time) to catch all those ipk files only in feed
18:42 &lt;pidge&gt; hrm.... yeah. can opkg do a conditional install? if the file exists, install?
18:42 &lt;pidge&gt; does not exist
18:42 &lt;pidge&gt; hrm...
18:42 &lt;JaMa&gt; and if it includes all then you have to bump PR or something in such package when common/licenses directory is changed in git
18:43 &lt;pidge&gt; yeah, I think having 168 different common licenses on an image won&apos;t fly]
18:43 &lt;pidge&gt; let me think of a cleaner way here.
18:43 &lt;JaMa&gt; or generate package for each license :)
18:44 &lt;JaMa&gt; then PN which wants to install just symlink to shared license will just set right RDEPENDS to install shared license text
18:45 &lt;pidge&gt; hrm. let me look at the package bbclasses. I think there is a way to do this conditionally, which would be the best way to do this

I&apos;ll send pull request implementing first part which is good enough for us to use it in package manager, but it doesn&apos;t handle shared generic licenses.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28893</commentid>
    <comment_count>1</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2013-01-17 11:51:13 +0000</bug_when>
    <thetext>Patches sent to oe-core ML for review:
http://lists.linuxtogo.org/pipermail/openembedded-core/2013-January/034395.html
http://lists.linuxtogo.org/pipermail/openembedded-core/2013-January/034396.html
http://lists.linuxtogo.org/pipermail/openembedded-core/2013-January/034397.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31968</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-04-11 14:15:09 +0000</bug_when>
    <thetext>These patches have been merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2daab0b3a233f8e322e024338b158e0b0a16967f

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=15aa7134826bcdd54f548454991d531d9db3b3b3

Leaving open because it looks like there may be additional functionality to implement, is that still correct Martin?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>31970</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2013-04-11 14:24:10 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; These patches have been merged to master:
&gt; 
&gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
&gt; ?id=2daab0b3a233f8e322e024338b158e0b0a16967f
&gt; 
&gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
&gt; ?id=15aa7134826bcdd54f548454991d531d9db3b3b3
&gt; 
&gt; Leaving open because it looks like there may be additional functionality to
&gt; implement, is that still correct Martin?

Yes, it creates PN-lic packages if enabled, but without any optimization to share texts of common licenses between packages.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43051</commentid>
    <comment_count>4</comment_count>
    <who name="Beth Flanagan">elizabeth.flanagan</who>
    <bug_when>2014-04-28 19:40:02 +0000</bug_when>
    <thetext>Resolved in:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43946</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2014-06-13 16:03:04 +0000</bug_when>
    <thetext>So is this resolved now, or not? (I&apos;ll admit, I haven&apos;t checked the code.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44247</commentid>
    <comment_count>6</comment_count>
    <who name="Beth Flanagan">elizabeth.flanagan</who>
    <bug_when>2014-06-30 20:44:06 +0000</bug_when>
    <thetext>This has been resolved for a while. Closing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44254</commentid>
    <comment_count>7</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2014-06-30 23:20:18 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; This has been resolved for a while. Closing.

Not completely. It was merged without any optimization to share texts of common licenses between packages, which we originally discussed.

But I&apos;m ok with keeping it resolved.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>