From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Mon, 27 Aug 2012 19:56:45 +0400 From: Alexey Tourbin To: ALT Linux Sisyphus discussions Message-ID: <20120827155645.GA18053@altlinux.org> Mail-Followup-To: ALT Linux Sisyphus discussions References: <503B789A.50305@kde.kiev.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <503B789A.50305@kde.kiev.ua> Subject: Re: [sisyphus] shell.req X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Sisyphus discussions List-Id: ALT Linux Sisyphus discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 15:56:45 -0000 Archived-At: List-Archive: List-Post: On Mon, Aug 27, 2012 at 04:39:38PM +0300, Denis Kuznetsov wrote: > Доброго времени суток. > Решил попробовать собрать zfs. Сборка > завершается с ошибкой: > > /home/kde/tmp/zfs-buildroot/usr/bin/zpool_layout: line 176: syntax error > near unexpected token `(' > /home/kde/tmp/zfs-buildroot/usr/bin/zpool_layout: line 176: ` > ls ${LABEL}-+([0-9a-f])-switch-port:${p}-slot:+([0-9]) \' > shell.req: ERROR: /home/kde/tmp/zfs-buildroot/usr/bin/zpool_layout: > /bin/bash --rpm-requires failed > find-requires: ERROR: /usr/lib/rpm/shell.req failed > ошибка: /bin/sh не удалось > ошибка: Невозможно найти Requires > > > Собственно что в скрипте. > 167 # Generate channel/disk layout table for comment header. > 168 print_channel_layout() { > 169 pushd ${DEV_DISK_DIR} >/dev/null > 170 echo "# ----------------- Channel/Disk Layout -------------------" > 171 echo "# Channel Disks" > 172 if [ ${TOPOLOGY} = "switch" ] ; then > 173 for (( i=0; i<${#SWITCH_PORTS[*]}; i++ )); do > 174 printf "# %-9s" ${CHANNELS[$i]} > 175 p=${SWITCH_PORTS[$i]} > 176 ls ${LABEL}-+([0-9a-f])-switch-port:${p}-slot:+([0-9]) \ > 177 2>/dev/null | cut -f3 -d':' | sort -u -n | \ > 178 xargs | tr ' ' ',' > 179 done > 180 else > 181 for (( i=0, k=0; i<${#BUSES[*]}; i++ )); do > 182 for (( j=0; j<${#HOST_PORTS[*]}; j++, k++ )); do > 183 printf "# %-9s" ${CHANNELS[$k]} > 184 ls *:${BUSES[$i]}:*:${HOST_PORTS[$j]}* \ > 185 2>/dev/null | cut -f7 -d'-' | \ > 186 sort -u -n | xargs | tr ' ' ',' > 187 done > 188 done > 189 fi > 190 echo "#" > 191 popd > /dev/null > 192 } > 193 > > Собственно вопрос как всегда, куда > копать? Копать туда, что shell syntax check у этого скрипта не проходит: $ sh -n test.sh test.sh: line 9: syntax error near unexpected token `(' test.sh: line 9: ` ls ${LABEL}-+([0-9a-f])-switch-port:${p}-slot:+([0-9]) \' Соответственно, rpm не дает запаковать этот скрипт в абсолютно неработающем виде, есть считается, что это /bin/sh или /bin/bash скрипт.