[Sugar-devel] Full Licence field

Panu Matilainen pmatilai at laiskiainen.org
Tue Mar 24 04:07:30 EDT 2009


On Mon, 23 Mar 2009, Tom \spot\ Callaway wrote:

> On 03/22/2009 05:18 AM, Panu Matilainen wrote:
>
>> Heh, actually rpm has had %license special file attribute since rpm
>> 2.5.4, it just doesn't really do much anything at all. It also doesn't
>> play well together with %doc, AND since the ancient copyright -> license
>> tag change, %license as file attribute has gotten globbered with
>> side-effect macro from the License: tag, so you'll have to use %%license
>> in the %files section.
>>
>> Other than that, making --excludedocs not affect %license files is
>> literally a one-liner.
>>
>> Making %license use in spec saner is somewhat more complicated (due to
>> the funny little historical issues listed above). I take it you'd like
>> it to behave exactly like %doc, like
>>
>> %files
>> %doc README NEWS ChangeLog
>> %license COPYING
>> %{_bindir}/*
>>
>> ...which would place COPYING into the default docdir, but with the
>> license attribute set. Right?
>
> Yes, this is almost exactly what I would think would be ideal.

Ok.

> (Yes, it requires a rebuild, but I far prefer being able to mark the 
> license files rather than have some heuristic guess and get it wrong 
> repeatedly).

Yup, magic runtime pattern matching aint going work and aint going to 
happen.

> The only thing I would want on top of that is what Jakub proposed
> earlier in the thread:
>
> Basically, have rpm -V ignore timestamp verification on %license files.

Make that "have rpm -V ignore timestamp verification on files whose 
hardlink count is > 1". That's reasonably in line with how rpm -V 
currently treats files shared among multiple packages and makes 
hardlink-on-content verification-friendly for any files, and without 
making licenses a totally oddball special case in verify.

> Then, upon install, if there is already another %license file present
> with identical {md5,sha{256,512}} sum and size installed and if so, do a
> byte by byte comparison and hardlink the files if they are indeed identical.
>
> I'm not sure whether that overcomplicates the transaction or not (also,
> removal would probably need to make sure we didn't leave a package
> without a license text).

And on every upgrade check that hardlinked files are still shareable 
and if not undo hardlinks... eww. Sounds like a whole lotta trouble for 
very little gain.

 	- Panu -


More information about the Sugar-devel mailing list