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

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

    <bug>
          <bug_id>32136</bug_id>
          
          <creation_ts>2016-05-25 20:57:50 +0300</creation_ts>
          <short_desc>bash4 is available to be used for build (with BASHOPTS=extglob, too)</short_desc>
          <delta_ts>2019-03-26 12:01:35 +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>zfs-utils</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>https://lists.altlinux.org/pipermail/sisyphus/2012-August/358222.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>32110</dependson>
    
    <dependson>31399</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Nobody&apos;s working on this, feel free to take it">nobody</assigned_to>
          <cc>at</cc>
    
    <cc>glebfm</cc>
    
    <cc>kde</cc>
    
    <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>157017</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2016-05-25 20:57:50 +0300</bug_when>
    <thetext>zfs-0.6.3-alt12

Сейчас в Sisyphus есть пакет bash4.

Если у Вас скрипты на bash4 (см. http://git.altlinux.org/gears/z/zfs.git?p=zfs.git;a=blob;f=zfs.spec;h=03f60bcb725c70d10722087ac5ec46e1e66e4f21;hb=HEAD#l75 ), то в нынешней ситуации (т.е.
когда bash -- это не bash4) с rpm-4.0.4-alt100.94 можно делать так:

* в shebang написать bash4
* в .spec-е экспортировать BASHOPTS:

# For shell.req:
%global __spec_autodep_custom_pre export BASHOPTS=extglob

Я так собрал пакет --
http://git.altlinux.org/people/imz/packages/mosquito-hive.git?p=mosquito-hive.git;a=commitdiff;h=c00c2380ca0b3529833d75b1ba3d6777dcccbd01
.

+++ This bug was initially created as a clone of Bug #32110 +++

bash-3.2.57-alt1

As described in https://lists.altlinux.org/pipermail/devel/2016-May/201432.html , the following failure:

Executing: /bin/sh -e /usr/src/tmp/rpm-tmp.yxuvVs
find-requires: running scripts (cpp,debuginfo,files,lib,pam,perl,pkgconfig,pkgconfiglib,python,rpmlib,shebang,shell,static,symlinks)
/usr/src/tmp/mosquito-hive-buildroot/usr/share/mosquito-hive/rebuild-helper-one.sh: line 22: syntax error near unexpected token `(&apos;
/usr/src/tmp/mosquito-hive-buildroot/usr/share/mosquito-hive/rebuild-helper-one.sh: line 22: `	-*([0-9])) num=&quot;${1#-}&quot;; shift;;&apos;
shell.req: ERROR: /usr/src/tmp/mosquito-hive-buildroot/usr/share/mosquito-hive/rebuild-helper-one.sh: /bin/bash --rpm-requires failed
find-requires: ERROR: /usr/lib/rpm/shell.req failed
error: /bin/sh failed
error: Failed to find Requires


RPM build errors:
    /bin/sh failed
    Failed to find Requires

can be reproduced by running gear-hsh in mosquito-hive from http://git.altlinux.org/people/imz/public/mosquito-hive.git and is caused by code like http://git.altlinux.org/people/imz/public/mosquito-hive.git?p=mosquito-hive.git;a=blob;f=rebuild-helper-one.sh;h=e229ef04e9a03db69704de2be95773320ef2ea6f;hb=HEAD#l22 :

    shopt -s extglob

    case &quot;$1&quot; in
	-*([0-9])) num=&quot;${1#-}&quot;; shift;;
    esac

(*(fooBAR) is the special form from the extended globs. I use it substantially in other places of mosquito-hive; but, anyway, a correct bash script shouldn&apos;t break this mode. )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>176382</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2018-12-05 07:59:11 +0300</bug_when>
    <thetext>Исправится само, как только ldv соберёт bash4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179991</commentid>
    <comment_count>2</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2019-03-26 12:01:35 +0300</bug_when>
    <thetext>bash-4 по умолчанию уже в Sisyphus</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>