[lintian] 01/01: r/templates: Generate HTML5 output instead of XHTML 1.1

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 9652c2e46cc5909e7d8ebad7a28aa5fefaf29e1e
Author: Niels Thykier 
Date:   Tue Jun 30 21:22:05 2015 +0200

r/templates: Generate HTML5 output instead of XHTML 1.1

... for that new and shiny look.

Signed-off-by: Niels Thykier 
---
 debian/changelog |  3 +++
 reporting/templates/foot.tmpl|  6 +++---
 reporting/templates/head.tmpl| 16 ++--
 reporting/templates/lintian.css.tmpl | 23 ---
 reporting/templates/maintainer.tmpl  |  2 +-
 reporting/templates/maintainers.tmpl |  2 +-
 6 files changed, 30 insertions(+), 22 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a82e175..359d0ca 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ lintian (2.5.33) UNRELEASED; urgency=medium
 + [JW] Correct spelling for "GNU Public Licence".
   (Closes: #790369)
 
+  * reporting/templates/*.tmpl:
++ [NT] Change from XHTML 1.1 to HTML5.
+
  -- Niels Thykier   Sun, 28 Jun 2015 17:01:10 +0200
 
 lintian (2.5.32) unstable; urgency=medium
diff --git a/reporting/templates/foot.tmpl b/reporting/templates/foot.tmpl
index baa1e42..d9553b7 100644
--- a/reporting/templates/foot.tmpl
+++ b/reporting/templates/foot.tmpl
@@ -1,8 +1,8 @@
- 
+
 
 
 
-
+
   
 Comments about these web pages?  Please use
 http://packages.debian.org/sid/reportbug";>reportbug
@@ -14,7 +14,7 @@
 {$LINTIAN_SOURCE}.
   
   Page last updated: {$timestamp} using Lintian {$version}.
-
+
 
 
 
diff --git a/reporting/templates/head.tmpl b/reporting/templates/head.tmpl
index ffeb81a..fd3554f 100644
--- a/reporting/templates/head.tmpl
+++ b/reporting/templates/head.tmpl
@@ -1,12 +1,8 @@
-
-http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
-
-http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+
+
 
   {$page_title}
-  
+  
   
   
   
@@ -14,7 +10,7 @@
 
 
 
-
+
   Lintian Reports
   
 Maintainers
@@ -23,6 +19,6 @@
 Packages
   
   
-
+
 
-
+
diff --git a/reporting/templates/lintian.css.tmpl 
b/reporting/templates/lintian.css.tmpl
index af49fff..a8cfef5 100644
--- a/reporting/templates/lintian.css.tmpl
+++ b/reporting/templates/lintian.css.tmpl
@@ -92,19 +92,19 @@ hr {
 display: none;
 }
 
-
 /*
  * 2. Header title
  */
 
-#header {
+header {
+display: block; /* HTML5 compat */
 margin: 0 0 28px 0;
 padding: 5px 20px;
 background: #F3F3F3 url("{{{resource_path('logo-small.png')}}}") no-repeat 
right;
 border-bottom: 1px solid #AAA;
 }
 
-#header p {
+header p {
 float: left;
 margin: 5px 0;
 color: #444;
@@ -113,7 +113,7 @@ hr {
 font-weight: bold;
 }
 
-#header p a {
+header p a {
 color: #444;
 text-decoration: none;
 }
@@ -151,7 +151,8 @@ hr {
  * 4. Main content
  */
 
-#main {
+main {
+display: block;
 margin: 0 25px;
 font-size: 0.9em;
 line-height: 1.4em;
@@ -408,14 +409,15 @@ blockquote.type-P {
  * 5. Footer
  */
 
-#footer {
+footer {
+display: block; /* HTML5 compat */
 margin: 20px 20px;
 padding: 10px 0 0 0;
 font-size: 0.85em;
 border-top: 1px solid #AAA;
 }
 
-#footer p {
+footer p {
 margin: 0;
 padding: 0;
 }
@@ -428,3 +430,10 @@ blockquote.type-P {
 div.clear {
 clear: both;
 }
+
+a.invisible-anchor {
+  /*
+These elements are always empty, but lets make this abundantly clear
+  */
+  display: none;
+}
diff --git a/reporting/templates/maintainer.tmpl 
b/reporting/templates/maintainer.tmpl
index d720919..5740b04 100644
--- a/reporting/templates/maintainer.tmpl
+++ b/reporting/templates/maintainer.tmpl
@@ -121,7 +121,7 @@
 if ($first_version) {
 # Unversioned # references just go to the first 
version.
 $first_version = 0;
-$OUT .= qq( )
+$OUT .= qq( )
 }
 $OUT .= "\n";
 $OUT .= qq(   \n);
diff --git a/reporting/templates/maintainers.tmpl 
b/reporting/templates/maintainers.tmpl
index 24ed83d..b6c02e8 100644
--- a/reporting/templates/maintainers.tmpl
+++ b/reporting/templates/maintainers.tmpl
@@ -34,7 +34,7 @@
 if ($letter eq 'Other') {
 $OUT .= qq(  \n\n  Other\n\n  \n);
 } else {
-$OUT .= qq(  \n\n  )
+$OUT .= qq(  \n\n  )
 . $letter . "\n\n  \n";
 }
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1za1fa-0005ds...@moszumanska.debian.org



[lintian] branch master updated (d0e8479 -> 9652c2e)

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a change to branch master
in repository lintian.

  from  d0e8479   helpers/c/objdump-info-helper: Remove incorrect special 
case
   new  9652c2e   r/templates: Generate HTML5 output instead of XHTML 1.1

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 debian/changelog |  3 +++
 reporting/templates/foot.tmpl|  6 +++---
 reporting/templates/head.tmpl| 16 ++--
 reporting/templates/lintian.css.tmpl | 23 ---
 reporting/templates/maintainer.tmpl  |  2 +-
 reporting/templates/maintainers.tmpl |  2 +-
 6 files changed, 30 insertions(+), 22 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150630193055.21601.24...@moszumanska.debian.org



[lintian] 02/05: Check files as we detect them, and discard invalid files

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit e10c185c11f2d4c2840b239d3584ca6c01241770
Author: Felipe Sateler 
Date:   Sat Jun 27 21:56:11 2015 -0300

Check files as we detect them, and discard invalid files

prevents duplicate service-file-is-not-a-file

Signed-off-by: Niels Thykier 
---
 checks/systemd.pm| 30 --
 t/tests/systemd-general/tags |  1 -
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/checks/systemd.pm b/checks/systemd.pm
index 1411322..79b413e 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -51,16 +51,12 @@ sub run {
 # This includes Alias= directives, so after parsing
 # NetworkManager.service, it will contain NetworkManager and
 # network-manager.
-my $services = get_systemd_service_names($info);
+my $services = get_systemd_service_names($info, \@service_files);
 
 for my $script (@init_scripts) {
 check_init_script($info, $script, $services);
 }
 
-for my $service (@service_files) {
-check_systemd_service_file($info, $service);
-}
-
 check_maintainer_scripts($info);
 return;
 }
@@ -121,12 +117,18 @@ sub check_init_script {
 
 sub get_systemd_service_files {
 my ($info) = @_;
+my @res;
+my @potential
+  = grep { m,/systemd/system/.*\.service$, } $info->sorted_index;
 
-return grep { m,/systemd/system/.*\.service$, } $info->sorted_index;
+for my $file (@potential) {
+push(@res, $file) if check_systemd_service_file($info, $file);
+}
+return @res;
 }
 
 sub get_systemd_service_names {
-my ($info) = @_;
+my ($info,$files_ref) = @_;
 my %services;
 
 my $safe_add_service = sub {
@@ -138,7 +140,7 @@ sub get_systemd_service_names {
 $services{$name} = 1;
 };
 
-for my $file (get_systemd_service_files($info)) {
+for my $file (@{$files_ref}) {
 my $name = $file->basename;
 $name =~ s/\.service$//;
 $safe_add_service->($name, $file);
@@ -161,11 +163,16 @@ sub check_systemd_service_file {
 tag 'systemd-service-file-outside-lib', $file
   if ($file =~ m,^usr/lib/systemd/system/,);
 
+unless ($file->is_open_ok
+|| ($file->is_symlink && $file->link eq '/dev/null')) {
+tag 'service-file-is-not-a-file', $file;
+return 0;
+}
 my @values = extract_service_file_values($info, $file, 'Unit', 'After');
 my @obsolete = grep { /^(?:syslog|dbus)\.target$/ } @values;
 tag 'systemd-service-file-refers-to-obsolete-target', $file, $_
   for @obsolete;
-return;
+return 1;
 }
 
 sub service_file_lines {
@@ -207,11 +214,6 @@ sub extract_service_file_values {
 
 my (@values, $section);
 
-unless ($file->is_open_ok
-|| ($file->is_symlink && $file->link eq '/dev/null')) {
-tag 'service-file-is-not-a-file', $file;
-return;
-}
 my @lines = service_file_lines($file);
 my $key_ws = first_index { /^[[:alnum:]]+(\s*=\s|\s+=)/ } @lines;
 if ($key_ws > -1) {
diff --git a/t/tests/systemd-general/tags b/t/tests/systemd-general/tags
index 47fe757..3223f6a 100644
--- a/t/tests/systemd-general/tags
+++ b/t/tests/systemd-general/tags
@@ -1,6 +1,5 @@
 E: systemd-general: init-script-is-not-a-file etc/init.d/fifo-pipe-as-init
 E: systemd-general: service-file-is-not-a-file 
etc/systemd/system/fifo-pipe-as-init.service
-E: systemd-general: service-file-is-not-a-file 
etc/systemd/system/fifo-pipe-as-init.service
 E: systemd-general: service-key-has-whitespace etc/systemd/system/test.service 
at line 3
 E: systemd-general: service-key-has-whitespace etc/systemd/system/test.service 
at line 3
 E: systemd-general: service-key-has-whitespace 
usr/lib/systemd/system/test.service at line 3

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1za2bt-5a...@moszumanska.debian.org



[lintian] 03/05: Add parameter to prevent tagging when parsing values

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 9e851c8645aa5f801f44334b5b902b4155524633
Author: Felipe Sateler 
Date:   Sat Jun 27 22:01:19 2015 -0300

Add parameter to prevent tagging when parsing values

Enables us to prevent multiple service-key-has-whitespace

Signed-off-by: Niels Thykier 
---
 checks/systemd.pm | 7 ---
 t/tests/systemd-complex-service-file/tags | 1 -
 t/tests/systemd-general/tags  | 2 --
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/checks/systemd.pm b/checks/systemd.pm
index 79b413e..eea80be 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -146,7 +146,7 @@ sub get_systemd_service_names {
 $safe_add_service->($name, $file);
 
 my @aliases
-  = extract_service_file_values($info, $file, 'Install', 'Alias');
+  = extract_service_file_values($info, $file, 'Install', 'Alias', 1);
 
 for my $alias (@aliases) {
 $safe_add_service->($alias, $file);
@@ -210,14 +210,15 @@ sub service_file_lines {
 
 # Extracts the values of a specific Key from a .service file
 sub extract_service_file_values {
-my ($info, $file, $extract_section, $extract_key) = @_;
+my ($info, $file, $extract_section, $extract_key, $skip_tag) = @_;
 
 my (@values, $section);
 
 my @lines = service_file_lines($file);
 my $key_ws = first_index { /^[[:alnum:]]+(\s*=\s|\s+=)/ } @lines;
 if ($key_ws > -1) {
-tag 'service-key-has-whitespace', $file, 'at line', $key_ws;
+tag 'service-key-has-whitespace', $file, 'at line', $key_ws
+  unless $skip_tag;
 }
 if (any { /^\.include / } @lines) {
 my $parent_dir = $file->parent_dir;
diff --git a/t/tests/systemd-complex-service-file/tags 
b/t/tests/systemd-complex-service-file/tags
index 1ffee42..61a9669 100644
--- a/t/tests/systemd-complex-service-file/tags
+++ b/t/tests/systemd-complex-service-file/tags
@@ -1,4 +1,3 @@
 E: systemd-complex-service-file: service-key-has-whitespace 
lib/systemd/system/test3.service at line 3
-E: systemd-complex-service-file: service-key-has-whitespace 
lib/systemd/system/test3.service at line 3
 W: systemd-complex-service-file: 
systemd-service-file-refers-to-obsolete-target lib/systemd/system/test.service 
dbus.target
 W: systemd-complex-service-file: 
systemd-service-file-refers-to-obsolete-target lib/systemd/system/test2.service 
syslog.target
diff --git a/t/tests/systemd-general/tags b/t/tests/systemd-general/tags
index 3223f6a..6f693e3 100644
--- a/t/tests/systemd-general/tags
+++ b/t/tests/systemd-general/tags
@@ -1,8 +1,6 @@
 E: systemd-general: init-script-is-not-a-file etc/init.d/fifo-pipe-as-init
 E: systemd-general: service-file-is-not-a-file 
etc/systemd/system/fifo-pipe-as-init.service
 E: systemd-general: service-key-has-whitespace etc/systemd/system/test.service 
at line 3
-E: systemd-general: service-key-has-whitespace etc/systemd/system/test.service 
at line 3
-E: systemd-general: service-key-has-whitespace 
usr/lib/systemd/system/test.service at line 3
 E: systemd-general: service-key-has-whitespace 
usr/lib/systemd/system/test.service at line 3
 E: systemd-general: special-file etc/init.d/fifo-pipe-as-init 0644
 E: systemd-general: special-file etc/systemd/system/fifo-pipe-as-init.service 
0644

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1za2bt-5n...@moszumanska.debian.org



[lintian] 05/05: d/changelog: Document Felipe Sateler's patches

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit bc3fb451a7672969bb543b6a989fec9748fcb682
Author: Niels Thykier 
Date:   Tue Jun 30 22:02:08 2015 +0200

d/changelog: Document Felipe Sateler's patches

Signed-off-by: Niels Thykier 
---
 debian/changelog | 8 
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 359d0ca..b364104 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,14 @@ lintian (2.5.33) UNRELEASED; urgency=medium
 
   XXX: generate tag summary
 
+  * checks/systemd.{desc,pm}:
++ [NT] Apply patches from Felipe Sateler to refactor the
+  systemd checks.  Notably this also fixes some duplicate
+  tags.
++ [NT] Apply patch from Felipe Sateler to warn about rcS
+  init scripts without a native systemd unit file.
+  (Closes: #790323)
+
   * data/spelling/corrections-multiword:
 + [JW] Correct spelling for "GNU Public Licence".
   (Closes: #790369)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1za2bu-6b...@moszumanska.debian.org



Processed: limit source to lintian, tagging 790323

2015-06-30 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> limit source lintian
Limiting to bugs with field 'source' containing at least one of 'lintian'
Limit currently set to 'source':'lintian'

> tags 790323 + pending
Bug #790323 [lintian] lintian: warn when init.d script for rcS does not have a 
native systemd unit
Added tag(s) pending.
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
790323: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790323
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/handler.s.c.143569632015887.transcr...@bugs.debian.org



[lintian] 01/01: t: Add some missing tags in Test-For

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 5c1174dca788f472c9b33dd86473e6033c418421
Author: Niels Thykier 
Date:   Tue Jun 30 22:35:23 2015 +0200

t: Add some missing tags in Test-For

Signed-off-by: Niels Thykier 
---
 t/COVERAGE   | 4 ++--
 t/tests/cruft-autogenerated/desc | 1 +
 t/tests/files-foo-in-bar/desc| 1 +
 t/tests/testsuite-unknown-suite/desc | 4 +++-
 4 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/t/COVERAGE b/t/COVERAGE
index f928897..4727134 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,5 +1,5 @@
-Last generated 2014-10-25
-Coverage (Tags): 1044/1113 (93.80%), w. legacy tests: 1101/1113 (98.92%)
+Last generated 2015-06-30
+Coverage (Tags): 1068/1137 (93.93%), w. legacy tests: 1125/1137 (98.94%)
 Coverage (Checks): 38/46 (82.61%), w. legacy tests: 40/46 (86.96%)
 
 The following tags are not tested by the test suite:
diff --git a/t/tests/cruft-autogenerated/desc b/t/tests/cruft-autogenerated/desc
index 2f70057..044ca02 100644
--- a/t/tests/cruft-autogenerated/desc
+++ b/t/tests/cruft-autogenerated/desc
@@ -7,3 +7,4 @@ Description: Check for autogenerated file
 Test-For:
  source-contains-autogenerated-visual-c++-file
  source-contains-autogenerated-gperf-data
+ source-contains-data-from-ieee-data-oui-db
diff --git a/t/tests/files-foo-in-bar/desc b/t/tests/files-foo-in-bar/desc
index 4e0c2b6..ac2a126 100644
--- a/t/tests/files-foo-in-bar/desc
+++ b/t/tests/files-foo-in-bar/desc
@@ -27,6 +27,7 @@ Test-For:
  package-contains-thumbnails-dir
  package-installs-file-to-usr-x11r6
  package-install-apt-preferences
+ package-install-apt-sources
  package-installs-into-etc-gconf-schemas
  package-installs-into-etc-rc.boot
  package-installs-into-etc-rc.d
diff --git a/t/tests/testsuite-unknown-suite/desc 
b/t/tests/testsuite-unknown-suite/desc
index 1c35c5c..35fb923 100644
--- a/t/tests/testsuite-unknown-suite/desc
+++ b/t/tests/testsuite-unknown-suite/desc
@@ -2,4 +2,6 @@ Testname: testsuite-unknown-suite
 Sequence: 6000
 Version: 1.0
 Description: Tests for unknown suite in the control being non-file
-Test-For: unknown-testsuite
+Test-For:
+ unknown-testsuite
+ xs-testsuite-header-in-debian-control

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1za2fc-0007my...@moszumanska.debian.org



[lintian] 04/05: Add check for rcS.d init scripts without native systemd unit

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit 40cfb4d163a0fda5797b995ecb3a4a8b34f3babb
Author: Felipe Sateler 
Date:   Sat Jun 27 12:20:19 2015 -0300

Add check for rcS.d init scripts without native systemd unit

[nthykier: fix a case of "Mixed high and low-precedence booleans"]

Signed-off-by: Niels Thykier 
---
 checks/systemd.desc| 14 ++
 checks/systemd.pm  | 12 ++--
 t/tests/systemd-general/debian/debian/init |  2 +-
 t/tests/systemd-general/desc   |  1 +
 t/tests/systemd-general/tags   |  1 +
 5 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/checks/systemd.desc b/checks/systemd.desc
index f84835f..6554f58 100644
--- a/checks/systemd.desc
+++ b/checks/systemd.desc
@@ -47,6 +47,20 @@ Info: The listed init.d script has no systemd equivalent.
  Your package ships a service file, but for the listed init.d script, there is
  no corresponding systemd service file.
 
+Tag: systemd-no-service-for-init-rcS-script
+Severity: serious
+Certainty: certain
+Ref: https://wiki.debian.org/Teams/pkg-systemd/rcSMigration
+Info: The rcS init.d script has no systemd equivalent.
+ .
+ Systemd has a SysV init.d script compatibility mode. It provides access to
+ each SysV init.d script as long as there is no native service file with the
+ same name (e.g. /lib/systemd/system/rsyslog.service corresponds to
+ /etc/init.d/rsyslog).
+ .
+ Services in rcS.d are particularly problematic, because they often cause
+ dependency loops, as they are ordered very early in the boot sequence.
+
 Tag: init.d-script-does-not-source-init-functions
 Severity: normal
 Certainty: certain
diff --git a/checks/systemd.pm b/checks/systemd.pm
index eea80be..5319152 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -84,6 +84,7 @@ sub check_init_script {
 my ($info, $file, $services) = @_;
 my $basename = $file->basename;
 my $lsb_source_seen;
+my $is_rcs_script = 0;
 
 if (!$file->is_regular_file) {
 unless ($file->is_open_ok) {
@@ -96,12 +97,14 @@ sub check_init_script {
 lstrip;
 if ($. == 1 and m{\A [#]! \s*/lib/init/init-d-script}xsm) {
 $lsb_source_seen = 1;
-last;
 }
+if (m,#.*Default-Start:.*S,) {
+$is_rcs_script = 1;
+}
+
 next if /^#/;
 if (m,(?:\.|source)\s+/lib/(?:lsb/init-functions|init/init-d-script),){
 $lsb_source_seen = 1;
-last;
 }
 }
 close($fh);
@@ -112,6 +115,11 @@ sub check_init_script {
 # make the package work with systemd.
 tag 'systemd-no-service-for-init-script', $basename
   if (%{$services} and not $services->{$basename});
+
+# rcS scripts are particularly bad, warn even if there is
+# no systemd integration
+tag 'systemd-no-service-for-init-rcS-script', $basename
+  if (not $services->{$basename} and $is_rcs_script);
 return;
 }
 
diff --git a/t/tests/systemd-general/debian/debian/init 
b/t/tests/systemd-general/debian/debian/init
index afffa18..42cb175 100644
--- a/t/tests/systemd-general/debian/debian/init
+++ b/t/tests/systemd-general/debian/debian/init
@@ -3,7 +3,7 @@
 # Provides:  systemd-general
 # Required-Start:$remote_fs $syslog
 # Required-Stop: $remote_fs $syslog
-# Default-Start: 2 3 4 5
+# Default-Start: S 2 3 4 5
 # Default-Stop:  0 1 6
 # Short-Description: Example initscript
 # Description:   This file should be used to construct scripts to be
diff --git a/t/tests/systemd-general/desc b/t/tests/systemd-general/desc
index 0bffbeb..f865251 100644
--- a/t/tests/systemd-general/desc
+++ b/t/tests/systemd-general/desc
@@ -12,3 +12,4 @@ Test-For:
  systemd-tmpfiles.d-outside-usr-lib
  systemd-service-file-refers-to-obsolete-target
  systemd-no-service-for-init-script
+ systemd-no-service-for-init-rcS-script
diff --git a/t/tests/systemd-general/tags b/t/tests/systemd-general/tags
index 6f693e3..3dc3b91 100644
--- a/t/tests/systemd-general/tags
+++ b/t/tests/systemd-general/tags
@@ -4,6 +4,7 @@ E: systemd-general: service-key-has-whitespace 
etc/systemd/system/test.service a
 E: systemd-general: service-key-has-whitespace 
usr/lib/systemd/system/test.service at line 3
 E: systemd-general: special-file etc/init.d/fifo-pipe-as-init 0644
 E: systemd-general: special-file etc/systemd/system/fifo-pipe-as-init.service 
0644
+E: systemd-general: systemd-no-service-for-init-rcS-script systemd-general
 E: systemd-general: systemd-no-service-for-init-script systemd-general
 E: systemd-general: systemd-service-file-outside-lib 
etc/systemd/system/fifo-pipe-as-init.service
 E: systemd-general: systemd-service-file-outside-lib 
etc/systemd/system/test.service

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to d

[lintian] branch master updated (9652c2e -> bc3fb45)

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a change to branch master
in repository lintian.

  from  9652c2e   r/templates: Generate HTML5 output instead of XHTML 1.1
   new  cb81402   Reorder systemd checks
   new  e10c185   Check files as we detect them, and discard invalid files
   new  9e851c8   Add parameter to prevent tagging when parsing values
   new  40cfb4d   Add check for rcS.d init scripts without native systemd 
unit
   new  bc3fb45   d/changelog: Document Felipe Sateler's patches

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 checks/systemd.desc|  14 +++
 checks/systemd.pm  | 171 +
 debian/changelog   |   8 ++
 t/tests/systemd-complex-service-file/tags  |   1 -
 t/tests/systemd-general/debian/debian/init |   2 +-
 t/tests/systemd-general/desc   |   1 +
 t/tests/systemd-general/tags   |   4 +-
 7 files changed, 125 insertions(+), 76 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150630203137.32728.46...@moszumanska.debian.org



[lintian] 01/05: Reorder systemd checks

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit cb81402f80c3ec0e4b396e85ed50916e96043c67
Author: Felipe Sateler 
Date:   Sat Jun 27 16:32:42 2015 -0300

Reorder systemd checks

This reorder groups most checks inside the corresponding check_*

[nthykier: fix a case of "Mixed high and low-precedence booleans"]

Signed-off-by: Niels Thykier 
---
 checks/systemd.pm | 138 ++
 1 file changed, 78 insertions(+), 60 deletions(-)

diff --git a/checks/systemd.pm b/checks/systemd.pm
index d36cf65..1411322 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -37,81 +37,64 @@ use Lintian::Util qw(fail lstrip rstrip);
 sub run {
 my (undef, undef, $info) = @_;
 
-# Figure out whether the maintainer of this package did any effort to
-# make the package work with systemd. If not, we will not warn in case
-# of an init script that has no systemd equivalent, for example.
-my $ships_systemd_file = any { m,/systemd/, } $info->sorted_index;
-
-# An array of names which are provided by the service files.
-# This includes Alias= directives, so after parsing
-# NetworkManager.service, it will contain NetworkManager and
-# network-manager.
-my @systemd_targets;
-
+# non-service checks
 for my $file ($info->sorted_index) {
 if ($file =~ m,^etc/tmpfiles\.d/.*\.conf$,) {
 tag 'systemd-tmpfiles.d-outside-usr-lib', $file;
 }
-if ($file =~ m,^etc/systemd/system/.*\.service$,) {
-tag 'systemd-service-file-outside-lib', $file;
-}
-if ($file =~ m,^usr/lib/systemd/system/.*\.service$,) {
-tag 'systemd-service-file-outside-lib', $file;
-}
-if ($file =~ m,/systemd/system/.*\.service$,) {
-check_systemd_service_file($info, $file);
-for my $name (extract_service_file_names($info, $file)) {
-push @systemd_targets, $name;
-}
-}
 }
 
-my @init_scripts = grep { m,^etc/init\.d/.+, } $info->sorted_index;
+my @init_scripts = get_init_scripts($info);
+my @service_files = get_systemd_service_files($info);
 
-# Verify that each init script includes /lib/lsb/init-functions,
-# because that is where the systemd diversion happens.
-for my $init_script (@init_scripts) {
-check_init_script($info, $init_script);
-}
+# A hash of names reference which are provided by the service files.
+# This includes Alias= directives, so after parsing
+# NetworkManager.service, it will contain NetworkManager and
+# network-manager.
+my $services = get_systemd_service_names($info);
 
-@init_scripts = map { basename($_) } @init_scripts;
+for my $script (@init_scripts) {
+check_init_script($info, $script, $services);
+}
 
-if ($ships_systemd_file) {
-for my $init_script (@init_scripts) {
-tag 'systemd-no-service-for-init-script', $init_script
-  unless any { m/\Q$init_script\E\.service/ } @systemd_targets;
-}
+for my $service (@service_files) {
+check_systemd_service_file($info, $service);
 }
 
 check_maintainer_scripts($info);
 return;
 }
 
+sub get_init_scripts {
+my ($info) = @_;
+my @ignore = ('README','skeleton','rc','rcS',);
+my @scripts;
+if (my $initd_path = $info->index_resolved_path('etc/init.d/')) {
+for my $init_script ($initd_path->children) {
+next if any { $_ eq $init_script->basename } @ignore;
+next
+  if $init_script->is_symlink
+  && $init_script->link eq '/lib/init/upstart-job';
+
+push(@scripts, $init_script);
+}
+}
+return @scripts;
+}
+
+# Verify that each init script includes /lib/lsb/init-functions,
+# because that is where the systemd diversion happens.
 sub check_init_script {
-my ($info, $file) = @_;
+my ($info, $file, $services) = @_;
 my $basename = $file->basename;
 my $lsb_source_seen;
 
-# Couple of special cases we don't care about...
-return
- if $basename eq 'README'
-  or $basename eq 'skeleton'
-  or $basename eq 'rc'
-  or $basename eq 'rcS';
-
-if ($file->is_symlink) {
-# We cannot test upstart-jobs
-return if $file->link eq '/lib/init/upstart-job';
-}
-
 if (!$file->is_regular_file) {
 unless ($file->is_open_ok) {
 tag 'init-script-is-not-a-file', $file;
 return;
 }
-
 }
-
 my $fh = $file->open;
 while (<$fh>) {
 lstrip;
@@ -127,15 +110,57 @@ sub check_init_script {
 }
 close($fh);
 
-if (!$lsb_source_seen) {
-tag 'init.d-script-does-not-source-init-functions', $file;
-}
+tag 'init.d-script-does-not-source-init-functions', $file
+  unless $lsb_source_seen;
+# O

[lintian] branch master updated (bc3fb45 -> 5c1174d)

2015-06-30 Thread Niels Thykier
This is an automated email from the git hooks/post-receive script.

nthykier pushed a change to branch master
in repository lintian.

  from  bc3fb45   d/changelog: Document Felipe Sateler's patches
   new  5c1174d   t: Add some missing tags in Test-For

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 t/COVERAGE   | 4 ++--
 t/tests/cruft-autogenerated/desc | 1 +
 t/tests/files-foo-in-bar/desc| 1 +
 t/tests/testsuite-unknown-suite/desc | 4 +++-
 4 files changed, 7 insertions(+), 3 deletions(-)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/lintian/lintian.git


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150630203528.27907.58...@moszumanska.debian.org



Bug#790323: lintian: warn when init.d script for rcS does not have a native systemd unit

2015-06-30 Thread Niels Thykier
On 2015-06-30 05:40, Felipe Sateler wrote:
> [...]
> I forgot this part. Attached a new patchset applying perltidy on each commit.
> 

Thanks, I have applied all four patches with only 3 minor modifications:

 * 0001 + 0004: Fix a use of "low + high precedence boolean operators"
   - Example: "x and !y" => "x and not y" (or "x && !y")
   - Found by perlcritic
   - Test suite: t/runtests -k t debian/test-out 01-critic/checks

 * 0004: Summary / Synopsis message shorten as it was rather long.
   - Here I just dropped the "checks/systemd" prefix

Once again, thanks for the patches, :)
~Niels


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/5592feab.8060...@thykier.net



Bug#790323: lintian: warn when init.d script for rcS does not have a native systemd unit

2015-06-30 Thread Felipe Sateler
On 30 June 2015 at 17:40, Niels Thykier  wrote:
>
> On 2015-06-30 05:40, Felipe Sateler wrote:
> > [...]
> > I forgot this part. Attached a new patchset applying perltidy on each 
> > commit.
> >
>
> Thanks, I have applied all four patches with only 3 minor modifications:
>
>  * 0001 + 0004: Fix a use of "low + high precedence boolean operators"
>- Example: "x and !y" => "x and not y" (or "x && !y")
>- Found by perlcritic
>- Test suite: t/runtests -k t debian/test-out 01-critic/checks
>
>  * 0004: Summary / Synopsis message shorten as it was rather long.
>- Here I just dropped the "checks/systemd" prefix
>
> Once again, thanks for the patches, :)

Thanks to you for maintaining lintian, and guiding me through the process.


-- 

Saludos,
Felipe Sateler


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/caafdzj_nb0mbx81apk2fode1p8jbvwzq9-u7phrhuof_yng...@mail.gmail.com



Bug#790693: lintian: Aymara language code is ayc (not ay - not yet, at least...)

2015-06-30 Thread Jonas Smedegaard
Package: lintian
Version: 2.5.32
Severity: normal
Tags: l10n

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Seems to me that language code "aym" should not be corrected to "ay" but
instead (for the time being" to "ayc".  Here's my reasoning:

Some of th sugar-*-activity packages trigger lintian warnings like this:

  W: sugar-read-activity: incorrect-locale-code aym -> ay

Long description of the lintian warning mentions that language codes are
those is ISO 639-1 and ISO 639-2, but does not say which wins if listed
in both but by different name.

Aymara is listed in ISO 639-1 as "ay" but in ISO 639-2 as "aym", but are
are both listed as scope "Macrolanguage" - i.e. what some refer to as
"Aymaran", the _family_ of Aymara languages.

Wikipedia article on Amayran references the individual languages as
"Southern Aymara" with code "ayc" and "Central Aymara" with code "ayr".

Only Amaya-related locale listed in /usr/share/i18n/SUPPORTED is ayc_PE
- - i.e. Southern Aymara in Peru.


As I understand it, renaming locale files to "ay" renders them unusable
on a standard Debian system (needing /usr/local/share/i18n/SUPPORTED
hack).  Only Amayan language code usable in standard Debian currently is
"ayc".

I am right now in Peru, discussing this issue with Sebastian Silva - a
local activist involved in deploying Sugar there.  As I (vaguely)
understand it, the ayc_PE slot was created few years ago to cover one of
the two Aymara dialects, whereas current translation efforts (involving
Sugarlabs, Peruvian ministry and OLPC) intends to cover both dialects as
a single language.  In the short term the only option I see is to
"abuse" the "ayc" slot for "ay/aym". Sebastian will try get confirmed if
above is correctly understood, and if so we should probably have the
slot "ay" (or "aym" - depending on which ISO standard has priority)
added and move dual-dialect localizations to that.

...Or instead have slot "ayr" created, if in fact current translation
covers only one of the dialects _and_ there is interest in localizations
also for the other.


Phew.  Hope that all made some sense...

 - Jonas

-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBAgAGBQJVkw3HAAoJECx8MUbBoAEhyXAP/1SZD5kjNnUjKSPGefLp1JfM
LeSOM44g2/mKDkZYZcN/xE3AcSkAU0rtz0JLdS6fUMM07xVeIoE0MMp4K3IvZMX5
/pErsiXF3Fqq8JZT5vWJub99qE/9w3E6MNpYNQolbhZVTmuaEPQZyZOMXGfsuxOC
HDNqlhjWOZSWEqWDLOs+ZTzTuwnHwuHretn+H8ny/qtHaDoeXKcRXakvngRoRUkA
coTlOAVMwuSlzXjjbJo53p39bIICcdpCptPuSfn35XZUcGXVHEKZPgGVJb/DT0tP
H6EF0sObKvT+xpY8Eecntj0TilrZruH645+Id2MhLtMuaER0JBORHPtgDzJZDAmM
xXlRQWH40hWiSWt7qcRwmDqkQ2o7hMUCIjmtJ8SfJjA/JU99WWGtbDJGa7e1eCrg
UaBFzbJQuyspQOcVVrT9uSnnzwzbxDbY9CsvrrSI1gNhT8YBM7FRrdZybsCiRt04
aTa+UVSxey1bmAVpDVkjqyneMMfmgsk+o9a48RIu4sfGVo5J0IbtgTaIFQrljYEA
xqNMucPZFuDevMKsfu5d7TPRBrISZ14phUc+pgurJNYMXdeDRh9OJs0wiZyvLV0D
IcL+yZGU5U221fQ1b0ytzXhDwRAzOwN1BxZGtQItlirR/0X3allZ5gV2ziGZCBRF
Ds1eNVXXx0x9I0bNoqaa
=HxE6
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/20150630214442.13887.48537.report...@auryn.jones.dk



Bug#790693: lintian: Aymara language code is ayc (not ay - not yet, at least...)

2015-06-30 Thread Jakub Wilk

Hi Jonas!

* Jonas Smedegaard , 2015-06-30, 16:44:
Some of th sugar-*-activity packages trigger lintian warnings like 
this:


 W: sugar-read-activity: incorrect-locale-code aym -> ay

Long description of the lintian warning mentions that language codes 
are those is ISO 639-1 and ISO 639-2, but does not say which wins if 
listed in both but by different name.


The two-letter code wins. We should update the tag description to make 
it clear.


Wikipedia article on Amayran references the individual languages as 
"Southern Aymara" with code "ayc" and "Central Aymara" with code "ayr".


Only Amaya-related locale listed in /usr/share/i18n/SUPPORTED is ayc_PE 
- i.e. Southern Aymara in Peru.


As I understand it, renaming locale files to "ay" renders them unusable 
on a standard Debian system (needing /usr/local/share/i18n/SUPPORTED 
hack). Only Amayan language code usable in standard Debian currently 
is "ayc".


Not quite. You can set the LANGUAGE variable[0] to "ay" (or "ayc:ay" or 
similar), and the translations will work, even though the locale is not 
supported.



[0] 
https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150630221626.ga5...@jwilk.net



Processed: retitle 790693 to lintian: ambiguous if ISO 639-1 or 639-2 is preferred

2015-06-30 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> retitle 790693 lintian: ambiguous if ISO 639-1 or 639-2 is preferred
Bug #790693 [lintian] lintian: Aymara language code is ayc (not ay - not yet, 
at least...)
Changed Bug title to 'lintian: ambiguous if ISO 639-1 or 639-2 is preferred' 
from 'lintian: Aymara language code is ayc (not ay - not yet, at least...)'
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
790693: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790693
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems


--
To UNSUBSCRIBE, email to debian-lint-maint-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
https://lists.debian.org/handler.s.c.143571425829679.transcr...@bugs.debian.org



Bug#790693: lintian: Aymara language code is ayc (not ay - not yet, at least...)

2015-06-30 Thread Jonas Smedegaard
Hi Jakub,

Quoting Jakub Wilk (2015-06-30 17:16:26)
> * Jonas Smedegaard , 2015-06-30, 16:44:
>> Some of th sugar-*-activity packages trigger lintian warnings like 
>> this:
>>
>>  W: sugar-read-activity: incorrect-locale-code aym -> ay
>>
>> Long description of the lintian warning mentions that language codes 
>> are those is ISO 639-1 and ISO 639-2, but does not say which wins if 
>> listed in both but by different name.
>
> The two-letter code wins. We should update the tag description to make 
> it clear.
>
>> Wikipedia article on Amayran references the individual languages as 
>> "Southern Aymara" with code "ayc" and "Central Aymara" with code 
>> "ayr".
>>
>> Only Amaya-related locale listed in /usr/share/i18n/SUPPORTED is 
>> ayc_PE - i.e. Southern Aymara in Peru.
>>
>> As I understand it, renaming locale files to "ay" renders them 
>> unusable on a standard Debian system (needing 
>> /usr/local/share/i18n/SUPPORTED hack). Only Amayan language code 
>> usable in standard Debian currently is "ayc".
>
> Not quite. You can set the LANGUAGE variable[0] to "ay" (or "ayc:ay" 
> or similar), and the translations will work, even though the locale is 
> not supported.
>
>
> [0] 
> https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html

Thanks a lot for the clarification (the difference between LANG and 
LANGUAGE has puzzled me for long) :-)

I am leaving this bug open for that minor issue of improving wording, 
but consider the main issue solved.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private


signature.asc
Description: signature