Louis-Philippe Véronneau pushed to branch master at lintian / lintian


Commits:
ee7bbda7 by Maytham Alsudany at 2025-03-28T16:46:26+00:00
Allow sourcing init-functions from /usr/lib as well

The /usr-merge means that sourcing /usr/lib/lsb/init-functions should do
the same thing as sourcing /lib/lsb/init-functions.

Keep in mind that the LSB spec only mentions /lib/lsb/init-functions:
https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html

Closes: #1099868

- - - - -


2 changed files:

- lib/Lintian/Check/Systemd.pm
- t/recipes/checks/systemd/init.d-general/build-spec/debian/init.d-general.init


Changes:

=====================================
lib/Lintian/Check/Systemd.pm
=====================================
@@ -249,7 +249,7 @@ sub check_init_script {
         $lsb_source_seen = 1
           if $position == 1
           && $line
-          =~ m{\A [#]! \s* (?:/usr/bin/env)? \s* /lib/init/init-d-script}xsm;
+          =~ m{\A [#]! \s* (?:/usr/bin/env)? \s* 
(?:/usr)?/lib/init/init-d-script}xsm;
 
         $is_rcs_script = 1
           if $line =~ m{#.*Default-Start:.*S};
@@ -259,7 +259,7 @@ sub check_init_script {
 
         $lsb_source_seen = 1
           if $line
-          =~ m{(?:\.|source)\s+/lib/(?:lsb/init-functions|init/init-d-script)};
+          =~ 
m{(?:\.|source)\s+(?:/usr)?/lib/(?:lsb/init-functions|init/init-d-script)};
 
     } continue {
         ++$position;


=====================================
t/recipes/checks/systemd/init.d-general/build-spec/debian/init.d-general.init
=====================================
@@ -2,7 +2,7 @@
 
 set -e
 
-. /lib/lsb/init-functions
+source /usr/lib/lsb/init-functions
 
 ### BEGIN INIT INFO
 # Provides:          init.d-general



View it on GitLab: 
https://salsa.debian.org/lintian/lintian/-/commit/ee7bbda7eb6db9f9930ee481596c9298443185c5

-- 
View it on GitLab: 
https://salsa.debian.org/lintian/lintian/-/commit/ee7bbda7eb6db9f9930ee481596c9298443185c5
You're receiving this email because of your account on salsa.debian.org.


Reply via email to