<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>20096</bug_id>
          
          <creation_ts>2009-05-19 00:24:23 +0400</creation_ts>
          <short_desc>Надо тщательнее проверять шебанг.</short_desc>
          <delta_ts>2010-07-05 10:01:54 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>rpm-build</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sir Raorn">raorn</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>arseny</cc>
    
    <cc>glebfm</cc>
    
    <cc>imz</cc>
    
    <cc>ldv</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91447</commentid>
    <comment_count>0</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2009-05-19 00:24:23 +0400</bug_when>
    <thetext>В shebang.req:ShebangReq() надо добавить проверку что $1 - абсолютный путь.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110247</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2010-07-01 21:34:07 +0400</bug_when>
    <thetext>rpm-4.0.4-alt98.37 -&gt; sisyphus:

* Thu Jul 01 2010 Dmitry V. Levin &lt;ldv@altlinux&gt; 4.0.4-alt98.37
- shebang.req (ShebangReq): Ensure that interpreter is specified
  as an absolute pathname (closes: #20096).
- platform.in: Enabled %check in buildreq mode (closes: #23030).
- pkgconfig.req (PkgconfigReqProv): Relaxed version check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>110347</commentid>
    <comment_count>2</comment_count>
    <who name="at@altlinux.org">at</who>
    <bug_when>2010-07-05 10:01:54 +0400</bug_when>
    <thetext>Шебанг с неабсолютным путём просто не обрабатывается.
Так что 4.0.4-alt98.36-3-g7b74686 ничего не дает.

line=$(sed -n &apos;1s|^#![[:space:]]*/|/|p;q&apos; &quot;$f&quot;)
[ -n &quot;$line&quot; ] || return 0

Ну и потом file(1) не определяет неабсолютный шебанг как &quot;script text executable&quot;.  Прежде чем проверять шебанг нужно его определить.  А без абсолютного пути считается что шебанга как бы вообще нет. Так что это просто плохо обдуманный багрепорт и плохо обдуманное изменение.

$ cat test.pl
#!perl
#
$ file test.pl
test.pl: ASCII text
$</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>