/usr/share/perl5/Config/Model/models/Dpkg/Copyright/LicenseSpec.pl is in libconfig-model-dpkg-perl 2.076.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | [
{
'accept' => [
'.*',
{
'description' => 'license short_name. Example: GPL-1 LPL-2.1+',
'type' => 'leaf',
'value_type' => 'string'
}
],
'author' => [
'Dominique Dumont'
],
'class_description' => 'Stand-alone license paragraph. This paragraph is used to describe licenses which are used somewhere else in the Files paragraph.',
'copyright' => [
'2010',
'2011 Dominique Dumont'
],
'element' => [
'text',
{
'compute' => {
'allow_override' => '1',
'formula' => 'require Software::LicenseUtils ;
my $lic = &index( - ) ;
my $h = { short_name => $lic, holder => \'foo\' } ;
my $text;
if (defined $lic and $lic) {
# no need to fail if short_name is unknown
eval {
$text = Software::LicenseUtils->new_from_short_name($h)->debian_text ;
} ;
if ($text) {
# need to cleanup text to mimic cleanup done when copyright
# data is read from file
chomp($text);
# work-around a bug in lgpl license text summary... my bad :-/
$text =~ s!^\\.!!mg;
}
# FIXME: find a way to warn user if a license is unknown only when
# text is not set by another mean... may loop bad if not careful
# if ($@ and ! $self->value_object->{data}) {
# print "Cannot find license text for $lic\\n" ;
# }
}
$text;',
'undef_is' => '\'\'',
'use_eval' => '1'
},
'description' => 'Full license text.',
'type' => 'leaf',
'value_type' => 'string',
'warn_if_match' => {
'fill license' => {
'msg' => 'License contains copyright scanner boilerplate. Please update this field with the actual license text'
}
}
}
],
'license' => 'LGPL2',
'name' => 'Dpkg::Copyright::LicenseSpec'
}
]
;
|