[SCM] Debian package checker branch, master, updated. 2.5.10-248-g5fe591b
The following commit has been merged in the master branch:
commit 5fe591bdcc3d57ef54040de8c61e1c49222e02a8
Author: Bastien ROUCARIÈS <roucaries.bastien@gmail.com>
Date: Sun Dec 9 12:37:33 2012 +0100
Add detecting of adobe proprietary font hinting
Add detection of proprietary font hinting code from adobe.
[nthykier:
* minor whitespace/style fixes
* add test suite and add t1utils to Build-Depends
]
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/checks/files b/checks/files
index 7d9ece5..4b6c709 100644
--- a/checks/files
+++ b/checks/files
@@ -1021,6 +1021,26 @@ foreach my $file ($info->sorted_index) {
} elsif ($pkg !~ m/^(?:[ot]tf|t1|x?fonts)-/) {
tag 'font-in-non-font-package', $file;
}
+ my $finfo = $info->file_info ($file) || '';
+ if ($finfo =~ m/PostScript Type 1 font program data/) {
+ my $path = $info->unpacked ($file);
+ open my $t1pipe, '-|', 't1disasm', $path or fail "Can't pipe from t1disasm: $!";
+ my $foundadobeline = 0;
+ while (my $line = <$t1pipe>) {
+ if ($foundadobeline) {
+ if ($line =~ m/^[%\s]*All\s*Rights\s*Reserved\.?\s*$/i) {
+ tag 'font-adobe-copyrighted-fragment', $file;
+ last;
+ } else {
+ $foundadobeline = 0;
+ }
+ }
+ if ($line =~ m/^[%\s]*Copyright\s*\(c\)\s*19\d{2}[\-\s]19\d{2}\s*Adobe\s*Systems\s*Incorporated\.?\s*$/i) {
+ $foundadobeline = 1;
+ }
+ }
+ close $t1pipe or fail "could not close pipe: $! $?";
+ }
}
# ---------------- non-free .swf files
diff --git a/checks/files.desc b/checks/files.desc
index 4ad5ee2..11ad8b4 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -962,6 +962,16 @@ Info: This package contains a *.ttf, *.otf, or *.pfb file, file
the font should be packaged separately, since fonts are usually useful
outside of the package that embeds them.
+Tag: font-adobe-copyrighted-fragment
+Severity: serious
+Certainty: possible
+Info: This type 1 font file includes some postscript fragment with a
+ non free license of Adobe. In order to check if this tag is genuine
+ please follow the proceedure described in the reference.
+ .
+ Should this be a false-positive, please override the tag.
+Ref: http://wiki.debian.org/qa.debian.org/type1nondfsg
+
Tag: duplicate-font-file
Severity: normal
Certainty: possible
diff --git a/debian/changelog b/debian/changelog
index 7e2aef2..1b5b69e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ lintian (2.5.11) UNRELEASED; urgency=low
- debug-package-for-multi-arch-same-pkg-not-coinstallable
- dm-upload-allowed-is-obsolete
- field-name-typo-in-dep5-copyright
+ - font-adobe-copyrighted-fragment
- maintainer-script-has-unexpanded-debhelper-token
- shlibs-uses-obsolete-relation
- untranslatable-debconf-templates
@@ -79,6 +80,8 @@ lintian (2.5.11) UNRELEASED; urgency=low
+ [RG] Recognise smarty3 as smarty itself.
+ [NT] Consider "tasksel tasks" as a meta package.
(Closes: #691489)
+ + [NT] Add patch from Bastien Roucaries to check for adobe font
+ license issues. (Closes: #694328)
* checks/group-checks{,.desc}:
+ [NT] Detect debug packages not co-installable with itself,
when it provides debug symbols for a Multi-Arch: same package.
diff --git a/debian/control b/debian/control
index f30dd8d..0f3c0cf 100644
--- a/debian/control
+++ b/debian/control
@@ -52,6 +52,7 @@ Build-Depends: binutils,
python-numpy,
quilt,
rsync,
+ t1utils,
unzip,
xz-utils,
xz-utils (>= 5.1.1alpha+20120614) | xz-lzma | lzma,
@@ -85,6 +86,7 @@ Depends: binutils,
man-db,
patchutils,
perl,
+ t1utils,
${misc:Depends}
Suggests: binutils-multiarch,
dpkg-dev,
diff --git a/t/tests/files-adobe-font/debian/Makefile b/t/tests/files-adobe-font/debian/Makefile
new file mode 100644
index 0000000..79c39ed
--- /dev/null
+++ b/t/tests/files-adobe-font/debian/Makefile
@@ -0,0 +1,8 @@
+all: bad.pfb good.pfb
+
+%.pfb: %.raw
+ t1asm $< > $@
+
+clean:
+ rm -f *.pfb
+
diff --git a/t/tests/files-adobe-font/debian/bad.raw b/t/tests/files-adobe-font/debian/bad.raw
new file mode 100644
index 0000000..f792d8c
--- /dev/null
+++ b/t/tests/files-adobe-font/debian/bad.raw
@@ -0,0 +1,16 @@
+%!PS-AdobeFont-1.0: Untitled1 001.000
+%%Title: bad
+%Version: 001.000
+%%CreationDate: Mon Dec 10 21:21:58 2012
+%%Creator: nthykier,,,
+%Copyright: Created by nthykier,,, hand-crafted
+%%EndComments
+
+/RD{string currentfile exch readstring pop}executeonly def
+
+% Below is here to trick Lintian...
+% Copyright (c) 1987-1990 Adobe Systems Incorporated.
+% All Rights Reserved.
+
+2 index /CharStrings 2 dict dup begin
+
diff --git a/t/templates/tests/pedantic/debian/control.in b/t/tests/files-adobe-font/debian/debian/control.in
similarity index 92%
copy from t/templates/tests/pedantic/debian/control.in
copy to t/tests/files-adobe-font/debian/debian/control.in
index f021f86..09fae11 100644
--- a/t/templates/tests/pedantic/debian/control.in
+++ b/t/tests/files-adobe-font/debian/debian/control.in
@@ -1,12 +1,12 @@
Source: {$srcpkg}
Priority: extra
-Section: {$section}
+Section: fonts
Maintainer: {$author}
Standards-Version: {$standards_version}
Build-Depends: debhelper (>= 9)
Homepage: http://lintian.debian.org/
-Package: {$srcpkg}
+Package: fonts-{$srcpkg}
Architecture: {$architecture}
Depends: $\{misc:Depends\}
Description: {$description}
@@ -14,3 +14,4 @@ Description: {$description}
Lintian. It is part of the Lintian test suite and may do very odd
things. It should not be installed like a regular package. It may
be an empty package.
+
diff --git a/t/tests/files-adobe-font/debian/debian/install b/t/tests/files-adobe-font/debian/debian/install
new file mode 100644
index 0000000..f589ca9
--- /dev/null
+++ b/t/tests/files-adobe-font/debian/debian/install
@@ -0,0 +1 @@
+*.pfb usr/share/lintian/fonts/
diff --git a/t/tests/files-adobe-font/debian/good.raw b/t/tests/files-adobe-font/debian/good.raw
new file mode 100644
index 0000000..fd50247
--- /dev/null
+++ b/t/tests/files-adobe-font/debian/good.raw
@@ -0,0 +1,15 @@
+%!PS-AdobeFont-1.0: Untitled1 001.000
+%%Title: good
+%Version: 001.000
+%%CreationDate: Mon Dec 10 21:21:58 2012
+%%Creator: nthykier,,,
+%Copyright: Created by nthykier,,, hand-crafted
+%%EndComments
+
+/RD{string currentfile exch readstring pop}executeonly def
+
+% This file has no license issues (bad.raw doesn't either, but
+% we pretend it does).
+
+2 index /CharStrings 2 dict dup begin
+
diff --git a/t/tests/files-adobe-font/desc b/t/tests/files-adobe-font/desc
new file mode 100644
index 0000000..adb0c13
--- /dev/null
+++ b/t/tests/files-adobe-font/desc
@@ -0,0 +1,5 @@
+Testname: files-adobe-font
+Sequence: 6000
+Version: 1.0
+Description: Test for adobe font license issues
+Test-For: font-adobe-copyrighted-fragment
diff --git a/t/tests/files-adobe-font/tags b/t/tests/files-adobe-font/tags
new file mode 100644
index 0000000..6a6bd8d
--- /dev/null
+++ b/t/tests/files-adobe-font/tags
@@ -0,0 +1 @@
+E: fonts-files-adobe-font: font-adobe-copyrighted-fragment usr/share/lintian/fonts/bad.pfb
--
Debian package checker
Reply to: