This is an automated email from the git hooks/post-receive script. broucaries-guest pushed a commit to branch master in repository lintian.
commit 732b23524f035d0768e423c7b4ac3252496c5dee Author: Bastien ROUCARIÈS <roucaries.bastien+deb...@gmail.com> Date: Tue Nov 8 00:00:38 2016 +0100 Detect non free utf code Signed-off-by: Bastien ROUCARIÈS <roucaries.bastien+deb...@gmail.com> --- checks/cruft.desc | 18 ++++++++++++++++++ data/cruft/non-free-license | 2 ++ debian/changelog | 3 +++ t/scripts/implemented-tags.t | 1 + t/tests/cruft-non-free-utf/debian/src/bad.c | 18 ++++++++++++++++++ t/tests/cruft-non-free-utf/desc | 4 ++++ t/tests/cruft-non-free-utf/tags | 1 + 7 files changed, 47 insertions(+) diff --git a/checks/cruft.desc b/checks/cruft.desc index 3c5b8de..009d749 100644 --- a/checks/cruft.desc +++ b/checks/cruft.desc @@ -746,6 +746,24 @@ Info: The following source files include material under a If this is a false-positive, please report a bug against Lintian. Ref: https://bugs.debian.org/724930#27 +Tag: license-problem-convert-utf-code +Severity: serious +Certainty: possible +Info: The following file source files include material under a + non-free license from Unicode Inc. Therefore, it is + not possible to ship this in main or contrib. + . + This license does not grant any permission + to modify the files (thus failing DFSG#3). Moreover, the license grant + to attempt to restrict use to "products supporting the Unicode + Standard" (thus failing DFSG#6). + . + In this case a solution is to use libicu and to remove this code + by repacking. + . + If this is a false-positive, please report a bug against Lintian. +Ref: https://bugs.debian.org/823100 + Tag: license-problem-md5sum-non-distributable-file Severity: serious Certainty: certain diff --git a/data/cruft/non-free-license b/data/cruft/non-free-license index 938244e..622c093 100644 --- a/data/cruft/non-free-license +++ b/data/cruft/non-free-license @@ -29,3 +29,5 @@ source-contains-autogenerated-visual-c++-file ~~ microsoft && visual && generate source-contains-autogenerated-gperf-data ~~ code && produced && gperf && version ~~ code produced by gperf version ~~ code [ ] produced [ ] by [ ] gperf [ ] version [ ] \d+\.\d+ # warn about copy of ieee-data source-contains-data-from-ieee-data-oui-db ~~ struck && scitex && racore ~~ dr. b. struck ~~ dr. [ ] b. [ ] struck +# warn about unicode license for utf for convert utf +license-problem-convert-utf-code ~~ fall-through && bytestowrite && utf-8 ~~ the fall-through switches in utf-8 reading ~~ the [ ] fall-through [ ] switches [ ] in [ ] utf-8 [ ] reading [ ] code [ ] save diff --git a/debian/changelog b/debian/changelog index ac1af5a..65b0cef 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ lintian (2.5.50) UNRELEASED; urgency=medium XXX: generate tag summary with private/generate-tag-summary + * checks/cruft.desc: + + [BR] Detect utf convert non free code. + (Closes: #843595) * checks/binaries.desc: + [NT] Update hardening-no-pie description to reflect that PIE is on by default in Debian. diff --git a/t/scripts/implemented-tags.t b/t/scripts/implemented-tags.t index 4bbbbb2..796dd38 100755 --- a/t/scripts/implemented-tags.t +++ b/t/scripts/implemented-tags.t @@ -49,6 +49,7 @@ our $EXCLUDE =join( ^maintainer-script-may-.*$ ^install-info-used-in-maintainer-script$ ^license-problem-cc-by-nc-sa$ + ^license-problem-convert-utf-code$ ^license-problem-json-evil$ ^license-problem-non-free-RFC$ ^license-problem-non-free-RFC-BCP78$ diff --git a/t/tests/cruft-non-free-utf/debian/src/bad.c b/t/tests/cruft-non-free-utf/debian/src/bad.c new file mode 100644 index 0000000..753e63a --- /dev/null +++ b/t/tests/cruft-non-free-utf/debian/src/bad.c @@ -0,0 +1,18 @@ +/* --------------------------------------------------------------------- + + Note A. + The fall-through switches in UTF-8 reading code save a + temp variable, some decrements & conditionals. The switches + are equivalent to the following loop: + { + int tmpBytesToRead = extraBytesToRead+1; + do { + ch += *source++; + --tmpBytesToRead; + if (tmpBytesToRead) ch <<= 6; + } while (tmpBytesToRead > 0); + } + In UTF-8 writing code, the switches on "bytesToWrite" are + similarly unrolled loops. + + --------------------------------------------------------------------- */ diff --git a/t/tests/cruft-non-free-utf/desc b/t/tests/cruft-non-free-utf/desc new file mode 100644 index 0000000..318dfe2 --- /dev/null +++ b/t/tests/cruft-non-free-utf/desc @@ -0,0 +1,4 @@ +Testname: cruft-non-free-utf +Version: 1.0 +Description: Check for non free utf +Test-For: license-problem-convert-utf-code diff --git a/t/tests/cruft-non-free-utf/tags b/t/tests/cruft-non-free-utf/tags new file mode 100644 index 0000000..17dbb55 --- /dev/null +++ b/t/tests/cruft-non-free-utf/tags @@ -0,0 +1 @@ +E: cruft-non-free-utf source: license-problem-convert-utf-code src/bad.c -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git