[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][lintian/lintian][master] Allow sourcing init-functions from /usr/lib as well



Title: GitLab

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:

Changes:

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

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


  • Reply to: