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

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

    <bug>
          <bug_id>35376</bug_id>
          
          <creation_ts>2018-09-10 12:02:22 +0300</creation_ts>
          <short_desc>Шебанг #!/usr/bin/env bash не распознается /usr/lib/rpm/shell.req</short_desc>
          <delta_ts>2019-02-01 02:12:19 +0300</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="mikhailnov">m</reporter>
          <assigned_to name="placeholder@altlinux.org">placeholder</assigned_to>
          <cc>arseny</cc>
    
    <cc>evg</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>174006</commentid>
    <comment_count>0</comment_count>
    <who name="mikhailnov">m</who>
    <bug_when>2018-09-10 12:02:22 +0300</bug_when>
    <thetext>/tmp/.private/user/pulsejoin-buildroot/usr/bin/pulsejoin: line 82: syntax error near unexpected token `&lt;&apos;
/tmp/.private/user/pulsejoin-buildroot/usr/bin/pulsejoin: line 82: `		done &lt; &lt;(sed -e &apos;s/ /\&apos;$&apos;\n/g&apos; -e &apos;/^$/d&apos; &quot;${pa_modules_list_file}&quot;)&apos;
shell.req: ERROR: /tmp/.private/user/pulsejoin-buildroot/usr/bin/pulsejoin: /bin/sh --rpm-requires failed

Участок кода:

pa_remove_devices(){
	if [ -f &quot;$pa_modules_list_file&quot; ]; then
		while read -r line
		do
			pactl unload-module &quot;$line&quot;
		done &lt; &lt;(sed -e &apos;s/ /\&apos;$&apos;\n/g&apos; -e &apos;/^$/d&apos; &quot;${pa_modules_list_file}&quot;)
		rm -fv &quot;${pa_modules_list_file}&quot;
	fi
}

https://gitlab.com/mikhailnov/pulsejoin/blob/master/pulsejoin.sh#L82

В сизифе не пробовал.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174008</commentid>
    <comment_count>1</comment_count>
    <who name="mikhailnov">m</who>
    <bug_when>2018-09-10 12:04:52 +0300</bug_when>
    <thetext>$ rpmbuild --version
RPM версия 4.0.4 (это p8)

Для воспроизведения:
git clone https://gitlab.com/mikhailnov/pulsejoin
cd pulsejoin
rpmbb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174012</commentid>
    <comment_count>2</comment_count>
    <who name="mikhailnov">m</who>
    <bug_when>2018-09-10 12:20:35 +0300</bug_when>
    <thetext>bash --rpm-requires pulsejoin.sh - все хорошо, sh --rpm-requires pulsejoin.sh - ошибка. Шебанг #!/usr/bin/env bash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>174013</commentid>
    <comment_count>3</comment_count>
    <who name="mikhailnov">m</who>
    <bug_when>2018-09-10 12:31:53 +0300</bug_when>
    <thetext>Замена шебанга
sed -i %{buildroot}/usr/bin/pulsejoin -e &apos;s,#!/usr/bin/env bash,#!/bin/bash,g&apos;
помогает.
То есть /usr/lib/rpm/shell.req вызывает sh вместо bash, не распознав /usr/bin/env bash</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>178034</commentid>
    <comment_count>4</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2019-02-01 02:12:19 +0300</bug_when>
    <thetext>rpm-build-4.0.4-alt126 -&gt; sisyphus:

Thu Jan 31 2019 Gleb F-Malinovskiy &lt;glebfm@altlinux&gt; 4.0.4-alt126
- imz@:
  + shell.req: correctly detect #!/bin/env bash (ALT#35376).
  + platform.in: completely expand %_libsuff (/usr/lib%nil was ugly).
- Fixed getopt(3) use in parameterized macros parser.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>