Hello community,

here is the log from the commit of package rpmrebuild for openSUSE:Factory 
checked in at 2020-02-22 19:08:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rpmrebuild (Old)
 and      /work/SRC/openSUSE:Factory/.rpmrebuild.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rpmrebuild"

Sat Feb 22 19:08:35 2020 rev:25 rq:778164 version:2.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/rpmrebuild/rpmrebuild.changes    2018-11-05 
22:55:23.620055554 +0100
+++ /work/SRC/openSUSE:Factory/.rpmrebuild.new.26092/rpmrebuild.changes 
2020-02-22 19:08:41.398615750 +0100
@@ -1,0 +2,20 @@
+Fri Feb 21 20:01:01 UTC 2020 - Bruno Friedmann <[email protected]>
+
+- Update to version 2.15
+  + fix error on rpmrebuild_files.sh line 204 (verify tag)
+  + use env in shebang to avoid path problemes (/bin versus /usr/bin)
+    *** This is reverted on openSUSE to static /usr/bin/bash ***
+  + updated htmc doc (features, usage)
+  + avoid shebang translation for rpmrebuild packages
+    (__brp_mangle_shebangs macro)
+  + fix bug on change-spec-preamble (move processing_init before
+    CommandLineParsing) thanks Nerijus
+  + fix cpio problem : add --no-absolute-filenames option
+  + better diagnostic on internal error
+  + fix bug on conditional requires (with space)
+- Packaging
+  + renew spec with spec-cleaner
+  + use %autopatch macro
+  + Add sed instruction to remove all env calls in code
+
+-------------------------------------------------------------------

Old:
----
  rpmrebuild-2.14.tar.gz
  rpmrebuild-2.14.tar.gz.sig

New:
----
  rpmrebuild-2.15.tar.gz
  rpmrebuild-2.15.tar.gz.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rpmrebuild.spec ++++++
--- /var/tmp/diff_new_pack.LJtcyz/_old  2020-02-22 19:08:42.586618117 +0100
+++ /var/tmp/diff_new_pack.LJtcyz/_new  2020-02-22 19:08:42.590618125 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package rpmrebuild
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           rpmrebuild
-Version:        2.14
+Version:        2.15
 Release:        0
 Summary:        A tool to build a rpm file from the rpm database
 License:        GPL-2.0-or-later
@@ -44,14 +44,18 @@
 
 %prep
 %setup -q -c
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
+%autopatch -p1
 
 %build
 make %{?_smp_mflags}
 # Remove shebang on script that are sourced and not executed
-find . -iname "*.src" -exec sed -i 's,^#!/bin/bash,,g' {} \;
+find . -iname "*.src" -exec sed -i 's,^#!%{_bindir}/env bash,,g' {} \;
+# As in 2.15 remove env usage to static path
+find . -iname "*.sh" -exec sed -i 's,^#!%{_bindir}/env bash,#!%{_bindir}/sh,g' 
{} \;
+# Same for those
+find . -iname "*.sh" -exec sed -i 's,^#!%{_bindir}/env sh,#!%{_bindir}/sh,g' 
{} \;
+# and last
+sed -i 's,^#!%{_bindir}/env sh,#!%{_bindir}/sh,g' rpmrebuild
 
 %install
 make DESTDIR=%{buildroot} install %{?_smp_mflags} 
@@ -61,8 +65,8 @@
 
 %files
 %defattr(-,root,root,-)
-%license COPYING
-%doc AUTHORS Changelog COPYRIGHT News README Todo
+%license COPYING COPYRIGHT
+%doc AUTHORS Changelog News README Todo
 %{_bindir}/rpmrebuild
 %{_libexecdir}/rpmrebuild
 %{_mandir}/fr/man1/*

++++++ rpmrebuild-2.14.tar.gz -> rpmrebuild-2.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Changelog new/Changelog
--- old/Changelog       2018-10-19 17:48:29.000000000 +0200
+++ new/Changelog       2020-02-21 13:49:11.000000000 +0100
@@ -1,3 +1,13 @@
+* Fri Feb 21 2020 <[email protected]> 2.15-1
+- fix error on rpmrebuild_files.sh line 204 (verify tag)
+- use env in shebang to avoid path problemes (/bin versus /usr/bin)
+- updated htmc doc (features, usage)
+- avoid shebang translation for rpmrebuild packages (__brp_mangle_shebangs 
macro)
+- fix bug on change-spec-preamble (move processing_init before 
CommandLineParsing) thanks Nerijus
+- fix cpio problem : add --no-absolute-filenames option
+- better diagnostic on internal error
+- fix bug on conditional requires (with space)
+
 * Fri Oct 19 2018 <[email protected]> 2.14-1
 - add list of optional tags, to allow rpmrebuild work with old rpm versions
 - add dependency on setarch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Makefile.include new/Makefile.include
--- old/Makefile.include        2018-10-19 17:48:29.000000000 +0200
+++ new/Makefile.include        2020-02-21 11:18:45.000000000 +0100
@@ -50,8 +50,8 @@
 
 # rules to convert man page into html pages
 %.1.html: %.1
-       faire_doc2.sh $< $@
+       ./faire_doc2.sh $< $@
 
 %.1.html: %.1rrp
-       faire_doc2.sh $< $@
+       ./faire_doc2.sh $< $@
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/News new/News
--- old/News    2018-10-19 17:48:29.000000000 +0200
+++ new/News    2020-02-21 11:12:08.000000000 +0100
@@ -1,3 +1,4 @@
+* 2020-02-21 : release 2.15, bugs fix, better diagnostics on errors
 * 2018-10-19 : release 2.14, compatibility with old rpm releases
 * 2018-09-12 : release 2.13, RECOMMENDS/SUPPLEMENTS rpm tag
 * 2018-07-20 : release 2.12, Handle Requires(pre,post,preun,postun)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Todo new/Todo
--- old/Todo    2018-10-19 17:48:29.000000000 +0200
+++ new/Todo    2020-02-21 12:11:06.000000000 +0100
@@ -11,3 +11,23 @@
 
 --------------------------------------------------------
 fix shell syntax with http://www.shellcheck.net/
+--------------------------------------------------------
+fix pb with requires
+example :
+# rpm -qR NetworkManager-wifi
+(wpa_supplicant >= 1:1.1 or iwd)
+
+and in spec :
+Requires:      (wpa_supplicant 1:1.1 or
+
+ex : annobin
+$ rpm -qR annobin
+(gcc >= 9 with gcc < 10)
+
+ex : lightdm
+(lightdm-greeter = 1.2 if xorg-x11-server-Xorg)
+
+$ rpm -qR python3-requests
+(python3.7dist(urllib3) < 1.25 or python3.7dist(urllib3) >= 1.25.0)
+(python3.7dist(urllib3) < 1.25.1 or python3.7dist(urllib3) >= 1.25.1.0)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Version new/Version
--- old/Version 2018-09-23 14:49:21.000000000 +0200
+++ new/Version 2019-10-17 19:03:20.000000000 +0200
@@ -1 +1 @@
-2.14
+2.15
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/compat_digest.sh new/plugins/compat_digest.sh
--- old/plugins/compat_digest.sh        2014-06-10 09:53:34.000000000 +0200
+++ new/plugins/compat_digest.sh        2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   compat_digest.sh
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/demo.sh new/plugins/demo.sh
--- old/plugins/demo.sh 2017-09-10 15:19:53.000000000 +0200
+++ new/plugins/demo.sh 2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   demo.sh
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/demofiles.sh new/plugins/demofiles.sh
--- old/plugins/demofiles.sh    2017-09-10 15:19:53.000000000 +0200
+++ new/plugins/demofiles.sh    2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env sh
 ###############################################################################
 #   demofiles.sh
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/file2pacDep.sh new/plugins/file2pacDep.sh
--- old/plugins/file2pacDep.sh  2017-09-10 15:19:53.000000000 +0200
+++ new/plugins/file2pacDep.sh  2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   file2pacDep.sh
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/nodoc.sh new/plugins/nodoc.sh
--- old/plugins/nodoc.sh        2017-09-10 15:19:53.000000000 +0200
+++ new/plugins/nodoc.sh        2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   nodoc.sh
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/set_tag.sh new/plugins/set_tag.sh
--- old/plugins/set_tag.sh      2017-09-10 15:19:53.000000000 +0200
+++ new/plugins/set_tag.sh      2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   set_tag.sh
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/un_prelink.sh new/plugins/un_prelink.sh
--- old/plugins/un_prelink.sh   2014-06-10 09:53:34.000000000 +0200
+++ new/plugins/un_prelink.sh   2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   unset_tag.sh
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/uniq.sh new/plugins/uniq.sh
--- old/plugins/uniq.sh 2017-09-10 15:19:53.000000000 +0200
+++ new/plugins/uniq.sh 2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   uniq.plug
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/plugins/unset_tag.sh new/plugins/unset_tag.sh
--- old/plugins/unset_tag.sh    2017-09-10 15:19:53.000000000 +0200
+++ new/plugins/unset_tag.sh    2019-10-18 14:10:37.000000000 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   unset_tag.sh
 #      it's a part of the rpmrebuild project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/processing_func.src new/processing_func.src
--- old/processing_func.src     2018-10-19 17:51:37.000000000 +0200
+++ new/processing_func.src     2020-02-21 13:53:22.000000000 +0100
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #    Copyright (C) 2004 by Valery Reznic
 #    This file is a part of the rpmrebuild project
-#    $Id: rpmrebuild-2.14 | processing_func.src | Wed Sep 12 15:59:23 2018 
+0200 | Eric Gerbier  $
+#    $Id: rpmrebuild-2.15 | processing_func.src | Mon Feb 17 14:17:27 2020 
+0100 | Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -72,7 +72,7 @@
 {
        local Func="processing_spec_change"
        [ $# -ne 1 -o "x$1" = "x" ] && {
-               echo "Usage: $0 $Func <operation>" 1>&2
+               Error "(processing_spec_change) Usage: $0 $Func <operation>"
                return 1
        }
 
@@ -232,14 +232,14 @@
 
                Xchange-spec-whole | \
                Xedit-whole)
-                       $Func "concatenate" || return
+                       $Func "concatenate" || Error "(processing_spec_change) 
$Func concatenate" || return
                        SPEC_IN=$FIC_SPEC.$spec_index
                        spec_index=$[spec_index + 1]
                        SPEC_OUT=$FIC_SPEC.$spec_index
                ;;
 
                *)
-                       Error "$Func: $UnknownOperation '$operation'"
+                       Error "(processing_spec_change) $Func: 
$UnknownOperation '$operation'"
                        return 1 
                ;;
        esac
@@ -321,7 +321,7 @@
 function CreateProcessing
 {
        [ $# -ne 1 -o "x$1" = "x" ] && {
-               Error "CreateProcessing <operation>"
+               Error "(CreateProcessing) <operation>"
                return 1
        }
 
@@ -330,19 +330,19 @@
        local cmd
        case "X$operation" in
                Xfini)
-                       processing_fini || return
+                       processing_fini || Error "(CreateProcessing) 
processing_fini" || return
                ;;
 
                Xchange-spec-whole | Xedit-whole)
-                       processing_spec_change "$operation" || return
+                       processing_spec_change "$operation" || Error 
"(CreateProcessing) processing_spec_change" || return
                ;;
 
                Xchange-spec-* | Xedit-*)
                        if [ "X$spec_concatenated" = "Xyes" ]; then
-                               Error "'$LONG_OPTION' $ForbidenOption"
+                               Error "(CreateProcessing) '$LONG_OPTION' 
$ForbidenOption"
                                return 1
                        fi
-                       processing_spec_change "$operation" || return
+                       processing_spec_change "$operation" || Error 
"(CreateProcessing) processing_spec_change" || return
                ;;
 
                Xchange-files)
@@ -360,9 +360,9 @@
                ;;
 
                *)
-                       Error "CreateProcessing: $UnknownOperation : 
'$operation'"
+                       Error "(CreateProcessing) $UnknownOperation : 
'$operation'"
                        return 1
                ;;
-       esac || return
+       esac || Error "(CreateProcessing) esac" || return
        return 0
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild new/rpmrebuild
--- old/rpmrebuild      2018-10-19 17:51:37.000000000 +0200
+++ new/rpmrebuild      2020-02-21 13:53:22.000000000 +0100
@@ -1,10 +1,10 @@
-#!/bin/sh
+#!/usr/bin/env sh
 ###############################################################################
 #   rpmrebuild 
 #
 #    Copyright (C) 2002 by Eric Gerbier
 #    Bug reports to: [email protected]
-#    $Id: rpmrebuild-2.14 | rpmrebuild | Thu May 17 15:04:50 2012 +0000 | 
gerbier  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild | Thu Oct 17 15:14:23 2019 +0200 | Eric 
Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild.lsm new/rpmrebuild.lsm
--- old/rpmrebuild.lsm  2018-10-19 17:48:29.000000000 +0200
+++ new/rpmrebuild.lsm  2020-02-21 11:11:15.000000000 +0100
@@ -1,7 +1,7 @@
 Begin4
 Title:          rpmrebuild
-Version:        2.14
-Entered-date:   2018-10-19
+Version:        2.15
+Entered-date:   2020-02-21
 Description:    rpmrebuild creates spec files used by the Red Hat Package 
Manager
                 in building RPM packages.  It uses the information it can
                 determine (from the rpm database) to fill in the proper spec 
file fields. 
@@ -12,7 +12,7 @@
 Author:         [email protected] (Eric Gerbier)
                [email protected] (Valery Reznic)
 Primary-site:   http://rpmrebuild.sourceforge.net
-               90 ko rpmrebuild-2.14-1.noarch.rpm
+               90 ko rpmrebuild-2.15-1.noarch.rpm
 Platforms:      linux, works with bash and rpm >= 3.x
 Copying-policy: GPL
 End
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild.sh new/rpmrebuild.sh
--- old/rpmrebuild.sh   2018-10-19 17:51:37.000000000 +0200
+++ new/rpmrebuild.sh   2020-02-21 13:53:22.000000000 +0100
@@ -1,10 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   rpmrebuild.sh 
 #
 #    Copyright (C) 2002 by Eric Gerbier
 #    Bug reports to: [email protected]
-#    $Id: rpmrebuild-2.14 | rpmrebuild.sh | Wed Oct 17 15:21:30 2018 +0200 | 
Eric Gerbier  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild.sh | Mon Feb 17 14:17:27 2020 +0100 | 
Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@
 {
        Debug '(SpecEdit)'
        [ $# -ne 1 -o "x$1" = "x" ] && {
-               Echo "Usage: $0 SpecEdit <file>"
+               Error "(SpecEdit) Usage: $0 SpecEdit <file>"
                return 1
        }
        # -e option : edit the spec file
@@ -45,6 +45,7 @@
        ${VISUAL:-${EDITOR:-vi}} $File
        AskYesNo "$WantContinue" || {
                Aborted="yes"
+               export Aborted
                Echo "Aborted."
                return 1
        }
@@ -66,7 +67,11 @@
        [ "X$batch"     = "Xyes" ] && return 0 ## batch mode, continue
        [ "X$spec_only" = "Xyes" ] && return 0 ## spec only mode, no questions
 
-       AskYesNo "$WantContinue" || return
+       AskYesNo "$WantContinue" || {
+               Aborted="yes"
+               export Aborted
+               return 0
+       }
        local RELEASE_ORIG="$(spec_query qf_spec_release )"
        [ -z "$RELEASE_NEW" ] && \
        AskYesNo "$WantChangeRelease" && {
@@ -85,7 +90,7 @@
        if [ "$?" -eq 1 ]
        then
                # no such package in rpm database
-               Error "${PAQUET} $PackageNotInstalled"
+               Error "(IsPackageInstalled) ${PAQUET} $PackageNotInstalled"
                return 1
        else
                # find it : one or more ?
@@ -96,7 +101,7 @@
                        ;;
 
                        *)
-                       Error "$PackageTooMuch '${PAQUET}':\n$output"
+                               Error "(IsPackageInstalled) $PackageTooMuch 
'${PAQUET}':\n$output"
                        return 1
                        ;;
                esac 
@@ -110,15 +115,15 @@
        Debug '(RpmUnpack)'
        # do not install files on /
        [ "x$BUILDROOT" = "x/" ] && {
-               Error "$BuildRootError" 
+               Error "(RpmUnpack) $BuildRootError"
                return 1
        }
        local CPIO_TEMP=$TMPDIR_WORK/${PAQUET_NAME}.cpio
        rm --force $CPIO_TEMP                               || return
-       rpm2cpio ${PAQUET} > $CPIO_TEMP                     || return
+       rpm2cpio ${PAQUET} > $CPIO_TEMP                     || Error 
"(RpmUnpack) rpm2cpio" || return
        rm    --force --recursive $BUILDROOT                || return
        Mkdir_p                   $BUILDROOT                || return
-       (cd $BUILDROOT && cpio --quiet -idmu ) < $CPIO_TEMP || return
+       (cd $BUILDROOT && cpio --quiet -idmu --no-absolute-filenames ) < 
$CPIO_TEMP || Error "(RpmUnpack) cpio" || return
        rm --force $CPIO_TEMP                               || return
        # Process ghost files
        /bin/bash $MY_LIB_DIR/rpmrebuild_ghost.sh $BUILDROOT < $FILES_IN || 
return
@@ -132,13 +137,13 @@
         if [ "x$package_flag" = "x" ]; then
                # installed package
                if [ "X$need_change_files" = "Xyes" ]; then
-                       /bin/bash $MY_LIB_DIR/rpmrebuild_buildroot.sh 
$BUILDROOT < $FILES_IN || return
+                       /bin/bash $MY_LIB_DIR/rpmrebuild_buildroot.sh 
$BUILDROOT < $FILES_IN || Error "(CreateBuildRoot) rpmrebuild_buildroot.sh 
$BUILDROOT" || return
                else
                        : # Do nothing (avoid a copy)
                fi
        else
                # rpm file
-               RpmUnpack || return
+               RpmUnpack || Error "(CreateBuildRoot) RpmUnpack" || return
        fi 
        return 0
 }
@@ -202,8 +207,8 @@
                ln -s / $BUILDROOT || return
        fi
        eval $change_arch $BUILDCMD --define "'buildroot $BUILDROOT'" 
$rpm_defines -bb $rpm_verbose $additional ${FIC_SPEC} || {
-               Error "package '${PAQUET}' $BuildFailed"
-               return 1
+               Error "(RpmBuild) package '${PAQUET}' $BuildFailed"
+               return 1
        }
        
        return 0
@@ -234,7 +239,7 @@
        RPMFILENAME="${rpmdir}/${RPMFILENAME}"
        if [ ! -f "${RPMFILENAME}" ]
        then
-               Warning "$FileNotFound rpm $RPMFILENAME"
+               Error "(RpmFileName) $FileNotFound rpm $RPMFILENAME"
                ls -ltr ${rpmdir}/${pac_arch}/${PAQUET}*
                return 1
        fi
@@ -249,7 +254,7 @@
        # installation test
        # force is necessary to avoid the message : already installed
        rpm -U --test --force ${RPMFILENAME} || {
-               Error "package '${PAQUET}' $TestFailed"
+               Error "(InstallationTest) package '${PAQUET}' $TestFailed"
                return 1
        }
        Debug "(InstallationTest) test install ${PAQUET} ok"
@@ -265,13 +270,13 @@
        if [ "$ID" -eq 0 ]
        then
                rpm -Uvh --force ${RPMFILENAME} || {
-                       Error "package '${PAQUET}' $InstallFailed"
+                       Error "(Installation) package '${PAQUET}' 
$InstallFailed"
                        return 1
                }
                return 0
        else
-               Error "package '${PAQUET}' $InstallCannot"
-               return 1;
+               Error "(Installation) package '${PAQUET}' $InstallCannot"
+               return 1
        fi
 }
 ###############################################################################
@@ -279,15 +284,15 @@
 function Processing
 {
        Debug '(Processing)'
-       local Aborted="no"
+       #local Aborted="no"
        local MsgFail
 
        source $RPMREBUILD_PROCESSING && return 0
 
        if [ "X$need_change_spec" = "Xyes" -o "X$need_change_files" = "Xyes" ]; 
then
-               [ "X$Aborted" = "Xyes" ] || Error "package '$PAQUET' 
$ModificationFailed."
+               [ "X$Aborted" = "Xyes" ] || Error "(Processing) package 
'$PAQUET' $ModificationFailed."
        else
-               Error "package '$PAQUET' $SpecFailed."
+               Error "(Processing) package '$PAQUET' $SpecFailed."
        fi
        return 1
 }
@@ -314,6 +319,9 @@
 {
        Debug '(SendBugReport)'
        [ "X$batch"     = "Xyes" ] && return 0 ## batch mode, skip report
+
+       [ -s $RPMREBUILD_BUGREPORT ] || return 0 ## empty report
+
        AskYesNo "$WantSendBugReport" || return
        # build default mail address 
        local from="${USER}@${HOSTNAME}"
@@ -432,7 +440,6 @@
        if [ $errors -ge 1 ] 
        then
                Warning "$CannotWork"
-               SendBugReport
                return 1
        fi
 }
@@ -464,12 +471,13 @@
        export RPMREBUILD_TMPDIR
        TMPDIR_WORK=$RPMREBUILD_TMPDIR/work
 
-       MY_LIB_DIR=`dirname $0` || return
-       source $MY_LIB_DIR/rpmrebuild_lib.src    || return
+       MY_LIB_DIR=`dirname $0` || ( echo "ERROR rpmrebuild.sh dirname $0"; 
exit 1)
+       MY_BASENAME=`basename $0`
+       source $MY_LIB_DIR/rpmrebuild_lib.src    || ( echo "ERROR rpmrebuild.sh 
source $MY_LIB_DIR/rpmrebuild_lib.src" ; exit 1)
 
        # create tempory directories before any work/test
-       RmDir "$RPMREBUILD_TMPDIR" || return
-       Mkdir_p $TMPDIR_WORK       || return
+       RmDir "$RPMREBUILD_TMPDIR" || Error "RmDir $RPMREBUILD_TMPDIR" || return
+       Mkdir_p $TMPDIR_WORK       || Error "Mkdir_p $TMPDIR_WORK" || return
 
        # get VERSION
        GetVersion
@@ -480,9 +488,9 @@
        # plugins for fs modification  (--change-files)
        BUILDROOT=$TMPDIR_WORK/root
 
-       source $MY_LIB_DIR/rpmrebuild_parser.src || return
-       source $MY_LIB_DIR/spec_func.src         || return
-       source $MY_LIB_DIR/processing_func.src   || return
+       source $MY_LIB_DIR/rpmrebuild_parser.src || Error "source 
$MY_LIB_DIR/rpmrebuild_parser.src" || return
+       source $MY_LIB_DIR/spec_func.src         || Error "source 
$MY_LIB_DIR/spec_func.src" || return
+       source $MY_LIB_DIR/processing_func.src   || Error "source 
$MY_LIB_DIR/processing_func.src" || return
 
        # check language
        case "$LANG" in
@@ -495,12 +503,12 @@
        source $MY_LIB_DIR/locale/$real_lang/rpmrebuild.lang
        
        RPMREBUILD_PROCESSING=$TMPDIR_WORK/PROCESSING
+       processing_init || return
        CommandLineParsing "$@" || return
        [ "x$NEED_EXIT" = "x" ] || return $NEED_EXIT
 
        Debug "rpmrebuild version $VERSION : $@"
 
-       processing_init || return
        check_i18ndomains
 
        # generate rpm query file 
@@ -538,21 +546,21 @@
 
        if [ "X$spec_only" = "Xyes" ]; then
                BUILDROOT="/"
-               SpecGeneration   || return
-               Processing       || return
+               SpecGeneration   || Error "SpecGeneration" || return
+               Processing       || Error "Processing" || return
        else
-               SpecGeneration   || return
-               CreateBuildRoot  || return
-               Processing       || return
-               CheckArch        || return
-               RpmBuild         || return
-               RpmFileName      || return
+               SpecGeneration   || Error "SpecGeneration" || return
+               CreateBuildRoot  || Error "CreateBuildRoot" || return
+               Processing       || Error "Processing" || return
+               CheckArch        || Error "CheckArch" || return
+               RpmBuild         || Error "RpmBuild" || return
+               RpmFileName      || Error "RpmFileName" || return
                echo "result: ${RPMFILENAME}"
                if [ -z "$NOTESTINSTALL" ]; then
-                       InstallationTest || return
+                       InstallationTest || Error "InstallationTest" || return
                fi
                if [ -n "$package_install" ]; then
-                       Installation || return
+                       Installation || Error "Installation" || return
                fi
        fi
        return 0
@@ -562,6 +570,12 @@
 Main "$@"
 st=$?  # save status
 
+# bug report ?
+if [ "X$Aborted" = "Xno" ]
+then
+       SendBugReport
+fi
+
 # in debug mode , we do not clean temp files
 if [ -z "$debug" ]
 then
@@ -570,6 +584,7 @@
        Debug "workdir : $TMPDIR_WORK"
        ls -altr $TMPDIR_WORK
 fi
+
 exit $st
 
 #####################################
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild.spc new/rpmrebuild.spc
--- old/rpmrebuild.spc  2018-09-23 14:16:20.000000000 +0200
+++ new/rpmrebuild.spc  2019-10-18 14:47:59.000000000 +0200
@@ -5,6 +5,8 @@
 # define binary flags
 %define is_rpm3 %test_ver %rpm_ver 3
 
+%define __brp_mangle_shebangs echo "no shebang change"
+
 # The Summary: line should be expanded to about here -----^
 Summary: A tool to build rpm file from rpm database
 Summary(fr): Un outil pour construire un package depuis une base rpm
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild.spec new/rpmrebuild.spec
--- old/rpmrebuild.spec 2018-10-19 17:49:44.000000000 +0200
+++ new/rpmrebuild.spec 2020-02-21 13:53:22.000000000 +0100
@@ -1,4 +1,4 @@
-Version: 2.14
+Version: 2.15
 %define release 1
 # get rpm version
 %define rpm_ver %( rpm -q --queryformat='%{VERSION}' rpm | cut -f 1 -d.)
@@ -7,6 +7,8 @@
 # define binary flags
 %define is_rpm3 %test_ver %rpm_ver 3
 
+%define __brp_mangle_shebangs echo "no shebang change"
+
 # The Summary: line should be expanded to about here -----^
 Summary: A tool to build rpm file from rpm database
 Summary(fr): Un outil pour construire un package depuis une base rpm
@@ -78,6 +80,16 @@
 %files -f rpmrebuild.files
 
 %changelog
+* Fri Feb 21 2020 <[email protected]> 2.15-1
+- fix error on rpmrebuild_files.sh line 204 (verify tag)
+- use env in shebang to avoid path problemes (/bin versus /usr/bin)
+- updated htmc doc (features, usage)
+- avoid shebang translation for rpmrebuild packages (__brp_mangle_shebangs 
macro)
+- fix bug on change-spec-preamble (move processing_init before 
CommandLineParsing) thanks Nerijus
+- fix cpio problem : add --no-absolute-filenames option
+- better diagnostic on internal error
+- fix bug on conditional requires (with space)
+
 * Fri Oct 19 2018 <[email protected]> 2.14-1
 - add list of optional tags, to allow rpmrebuild work with old rpm versions
 - add dependency on setarch
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild_buildroot.sh new/rpmrebuild_buildroot.sh
--- old/rpmrebuild_buildroot.sh 2018-10-19 17:51:37.000000000 +0200
+++ new/rpmrebuild_buildroot.sh 2020-02-21 13:53:22.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   rpmrebuild_files.sh 
 #      it's a part of the rpmrebuild project
@@ -6,7 +6,7 @@
 #    Copyright (C) 2002, 2003, 2013 by Valery Reznic
 #    Bug reports to: [email protected]
 #      or          : [email protected]
-#    $Id: rpmrebuild-2.14 | rpmrebuild_buildroot.sh | Mon Jan 14 12:35:18 2013 
+0000 | valery_reznic  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild_buildroot.sh | Mon Feb 17 13:54:44 2020 
+0100 | Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -36,14 +36,14 @@
 # rpmrebuild_files.sh rpmrebuild_ghost.sh rpmrebuild_buildroot.sh
 ################################################################
 
+MY_LIB_DIR=`dirname $0` || ( echo "ERROR $0 dirname $0"; exit 1)
+MY_BASENAME=`basename $0`
+source $MY_LIB_DIR/rpmrebuild_lib.src    || ( echo "ERROR $0 source 
$MY_LIB_DIR/rpmrebuild_lib.src" ; exit 1)
+
 [ $# -ne 1 -o "x$1" = "x" ] && {
-       echo "Usage: $0 <buildroot>" 1>&2
-       exit 1
+       Critical "Usage: $0 <buildroot>"
 }
 
-MY_LIB_DIR=`dirname $0` || return
-source $MY_LIB_DIR/rpmrebuild_lib.src    || return
-
 BuildRoot="$1"
 
 while :; do
@@ -72,16 +72,16 @@
                        # of the string.
                        # result will be 4 permissions characters
                        file_perm="${file_perm#${not_perm}}"
-                       Mkdir_p $BuildRoot/$file || exit
-                       chmod $file_perm $BuildRoot/$file || exit
+                       Mkdir_p $BuildRoot/$file || Critical "$MY_BASENAME 
Mkdir_p $BuildRoot/$file"
+                       chmod $file_perm $BuildRoot/$file || Critical 
"$MY_BASENAME chmod $file_perm $BuildRoot/$file"
                ;;
 
                *)
                        # Not directory
                        DirName=${file%/*}
-                       Mkdir_p $BuildRoot/$DirName || exit
-                       cp --preserve --no-dereference $file $BuildRoot/$file 
|| exit
+                       Mkdir_p $BuildRoot/$DirName || Critical "$MY_BASENAME 
Mkdir_p $BuildRoot/$DirName"
+                       cp --preserve --no-dereference $file $BuildRoot/$file 
|| Critical "$MY_BASENAME cp --preserve $file"
                ;;
-       esac || exit
-done || exit
+       esac || Critical "$MY_BASENAME esac"
+done || Critical "$MY_BASENAME done"
 exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild_extract_tags.sh 
new/rpmrebuild_extract_tags.sh
--- old/rpmrebuild_extract_tags.sh      2018-10-19 17:51:37.000000000 +0200
+++ new/rpmrebuild_extract_tags.sh      2020-02-21 13:53:22.000000000 +0100
@@ -1,8 +1,8 @@
-#!/bin/sh 
+#!/usr/bin/env sh
 ###############################################################################
 #    Copyright (C) 2002 by Eric Gerbier
 #    Bug reports to: [email protected]
-#    $Id: rpmrebuild-2.14 | rpmrebuild_extract_tags.sh | Tue Feb 14 09:30:42 
2012 +0000 | gerbier  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild_extract_tags.sh | Thu Oct 17 15:14:23 
2019 +0200 | Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild_files.sh new/rpmrebuild_files.sh
--- old/rpmrebuild_files.sh     2018-10-19 17:51:37.000000000 +0200
+++ new/rpmrebuild_files.sh     2020-02-21 13:53:22.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   rpmrebuild_files.sh 
 #      it's a part of the rpmrebuild project
@@ -6,7 +6,7 @@
 #    Copyright (C) 2002, 2003, 2013 by Valery Reznic
 #    Bug reports to: [email protected]
 #      or          : [email protected]
-#    $Id: rpmrebuild-2.14 | rpmrebuild_files.sh | Mon Jan 14 12:35:18 2013 
+0000 | valery_reznic  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild_files.sh | Mon Feb 17 13:54:44 2020 
+0100 | Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -42,8 +42,9 @@
 # it is used in the 3 scripts : rpmrebuild_files.sh rpmrebuild_ghost.sh 
rpmrebuild_buildroot.sh
 ################################################################
 
-MY_LIB_DIR=`dirname $0` || return
-source $MY_LIB_DIR/rpmrebuild_lib.src    || return
+MY_LIB_DIR=`dirname $0` || ( echo "ERROR $0 dirname $0"; exit 1)
+MY_BASENAME=`basename $0`
+source $MY_LIB_DIR/rpmrebuild_lib.src    || ( echo "ERROR $0 source 
$MY_LIB_DIR/rpmrebuild_lib.src" ; exit 1)
 
 FFLAGS="d c s m n g"
 d_val="%doc "      # doc flag
@@ -199,27 +200,33 @@
        verify_par=""
        non_verify_par=""
        Bit=1
-       file_verify="0$file_verify" # make it octal for shell
-       for verify_flag in $VERIFY_FLAGS; do
-               if [ $[$file_verify & $Bit] -eq 0 ]; then
-                       non_verify_par="$non_verify_par$verify_flag "
-               else
-                       verify_par="$verify_par$verify_flag "
-               fi
-               Bit=$[ $Bit << 1 ]
-       done
+       if [ "$file_verify" = "(none)" ]
+       then
+               # no file_verify
+               verify_str=""
+       else
+               file_verify="0$file_verify" # make it octal for shell
+               for verify_flag in $VERIFY_FLAGS; do
+                       if [ $[$file_verify & $Bit] -eq 0 ]; then
+                               non_verify_par="$non_verify_par$verify_flag "
+                       else
+                               verify_par="$verify_par$verify_flag "
+                       fi
+                       Bit=$[ $Bit << 1 ]
+               done
 
-       # if bit after last verify bit is off I assume that 
-       # %verify( ...) was used
-       # otherwise I assume %verify(not ...) was used. 
-       if [ $[$file_verify & $Bit] -eq 0 ]; then ## Use "verify_par"
-               # If verify_par not empty, set verify_str to 
%verify($verify_par)
-               # Strip last character from verify_par
-               verify_str="${verify_par:+%verify(${verify_par%?}) }" 
-       else # Use "non_verify_par
-               # If non_verify_par not empty, set verify_str to %verify(not 
$verify_par)
-               # Strip last character from non_verify_par
-               verify_str="${non_verify_par:+%verify(not ${non_verify_par%?}) 
}" 
+               # if bit after last verify bit is off I assume that
+               # %verify( ...) was used
+               # otherwise I assume %verify(not ...) was used.
+               if [ $[$file_verify & $Bit] -eq 0 ]; then ## Use "verify_par"
+                       # If verify_par not empty, set verify_str to 
%verify($verify_par)
+                       # Strip last character from verify_par
+                       verify_str="${verify_par:+%verify(${verify_par%?}) }"
+               else # Use "non_verify_par
+                       # If non_verify_par not empty, set verify_str to 
%verify(not $verify_par)
+                       # Strip last character from non_verify_par
+                       verify_str="${non_verify_par:+%verify(not 
${non_verify_par%?}) }"
+               fi
        fi
 
        # test for jokers in file : globing seems not to work
@@ -227,7 +234,7 @@
        if [ "X$RPMREBUILD_WARNING" = "Xyes" ]; then
                case "$file" in
                        *[*?]*)
-                               cat <<-WARN_TXT 1>&2 || exit
+                               cat <<-WARN_TXT 1>&2 || Critical "$MY_BASENAME 
cat"
                                
                                -------------------------------- WARNING 
------------------------------------------
                                file named $file contains globbing characters
@@ -239,5 +246,5 @@
        fi
 
        echo 
"${miss_str}${lang_str}${dir_str}${fflags_str}${attr_str}${caps_str}${verify_str}\"${file}\""
-done || exit
+done || Critical "$MY_BASENAME done"
 exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild_ghost.sh new/rpmrebuild_ghost.sh
--- old/rpmrebuild_ghost.sh     2018-10-19 17:51:37.000000000 +0200
+++ new/rpmrebuild_ghost.sh     2020-02-21 13:53:22.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #   rpmrebuild_ghost.sh 
 #      it's a part of the rpmrebuild project
@@ -6,7 +6,7 @@
 #    Copyright (C) 2002, 2003, 2013 by Valery Reznic
 #    Bug reports to: [email protected]
 #      or          : [email protected]
-#    $Id: rpmrebuild-2.14 | rpmrebuild_ghost.sh | Mon Jan 14 12:35:18 2013 
+0000 | valery_reznic  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild_ghost.sh | Mon Feb 17 13:54:44 2020 
+0100 | Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -38,14 +38,14 @@
 # rpmrebuild_files.sh rpmrebuild_ghost.sh rpmrebuild_buildroot.sh
 ################################################################
 
+MY_LIB_DIR=`dirname $0` || ( echo "ERROR $0 dirname $0"; exit 1)
+MY_BASENAME=`basename $0`
+source $MY_LIB_DIR/rpmrebuild_lib.src    || ( echo "ERROR $0 source 
$MY_LIB_DIR/rpmrebuild_lib.src" ; exit 1)
+
 [ $# -ne 1 -o "x$1" = "x" ] && {
-       echo "Usage: $0 <buildroot>" 1>&2
-       exit 1
+       Critical "Usage: $0 <buildroot>"
 }
 
-MY_LIB_DIR=`dirname $0` || return
-source $MY_LIB_DIR/rpmrebuild_lib.src    || return
-
 BuildRoot="$1"
 
 while :; do
@@ -77,17 +77,17 @@
        case "X$file_type" in
                Xd*)
                        # Directory. Ghost directory ?
-                       Mkdir_p $File || exit
+                       Mkdir_p $File || Critical "$MY_BASENAME Mkdir_p $File"
                ;;
 
                *)
                        # Not directory
                        #  Just in case dir for ghost file not exist create it
                        DirName=${File%/*}
-                       Mkdir_p $DirName || exit
+                       Mkdir_p $DirName || Critical "$MY_BASENAME Mkdir_p 
$DirName"
                        # Create file itself
-                       > $File || exit
+                       > $File || Critical "$MY_BASENAME create $File"
                ;;
-       esac || exit
-done || exit
+       esac || Critical "$MY_BASENAME esac"
+done || Critical "$MY_BASENAME done"
 exit 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild_lib.src new/rpmrebuild_lib.src
--- old/rpmrebuild_lib.src      2018-10-19 17:51:37.000000000 +0200
+++ new/rpmrebuild_lib.src      2020-02-21 13:53:22.000000000 +0100
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #    Copyright (C) 2011 by Eric Gerbier
 #    This file is a part of the rpmrebuild project
-#    $Id: rpmrebuild-2.14 | rpmrebuild_lib.src | Fri Oct 12 09:29:50 2018 
+0200 | Eric Gerbier  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild_lib.src | Mon Feb 17 13:54:44 2020 
+0100 | Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -28,22 +28,41 @@
 ###############################################################################
 function Echo
 {
-       echo -e "$@" 1>&2
+       echo -e "$@"
 }
 ###############################################################################
+# common low level code for Error and Warning functions
+function Logger
+{
+       # screen
+       Echo "$0: $@" 1>&2
+       # for optionnal bug report
+       echo -e "$0: $@" >> $RPMREBUILD_BUGREPORT
+
+}
+###############################################################################
+# to be used after a return code test
+# propagate error code
+# replace line as
+# foo || return
+# by
+# foo || Error "pb foo" || return
 function Error
 {
-       Echo "$0: ERROR: $@"
+       ret=$?
+       Logger "ERROR: $@"
+       return $ret
 }
 ###############################################################################
-
 function Warning
 {
-       # screen
-       Echo "$0: WARNING: $@"
-       # for optionnal bug report
-       echo -e "$0: WARNING: $@" >> $RPMREBUILD_BUGREPORT
-
+       Logger "WARNING: $@"
+}
+###############################################################################
+function Critical
+{
+       Error $@
+       exit 1
 }
 ###############################################################################
 
@@ -63,7 +82,7 @@
 function RmDir
 {
        [ $# -ne 1 -o "x$1" = "x" ] && {
-               Echo "Usage: RmDir <dir>"
+               Warning "Usage: RmDir <dir>"
                return 1
        }
        # to ensure tmpdir is really emptied by rm -rf
@@ -85,7 +104,7 @@
 function Mkdir_p
 {
        [ $# -ne 1 -o "x$1" = "x" ] && {
-               Echo "Usage: Mkdir_p <dir>"
+               Warning "Usage: Mkdir_p <dir>"
                return 1
        }
        local Dir
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild_parser.src new/rpmrebuild_parser.src
--- old/rpmrebuild_parser.src   2018-10-19 17:51:38.000000000 +0200
+++ new/rpmrebuild_parser.src   2020-02-21 13:53:22.000000000 +0100
@@ -1,10 +1,10 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # to be sourced from bash
 ###############################################################################
 #
 #    Copyright (C) 2002 by Eric Gerbier
 #    Bug reports to: [email protected]
-#    $Id: rpmrebuild-2.14 | rpmrebuild_parser.src | Fri Oct 12 09:24:27 2018 
+0200 | Eric Gerbier  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild_parser.src | Mon Feb 17 14:17:27 2020 
+0100 | Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -1131,7 +1131,7 @@
                                        # find in plugin dir
                                        
INCLUDE_FILE="$RPMREBUILD_PLUGINS_DIR/$OPTARG"
                                else 
-                                       Error "$FileNotFound : '$OPTARG'"
+                                       Error "(ProcessLongOptions) 
$FileNotFound : '$OPTARG'"
                                        return 1
                                fi
                                Include || return
@@ -1205,7 +1205,7 @@
                        ;;
 
                        *)
-                               Error "$InternalError: 
LONG_OPTION='$LONG_OPTION'"
+                               Error "(ProcessLongOptions) $InternalError: 
LONG_OPTION='$LONG_OPTION'"
                                return 1
                        ;;
                esac || return
@@ -1315,7 +1315,7 @@
        shift $((OPTIND - 1))
        case $# in
                0)
-                       Error "$PackageArgumentMissing"
+                       Error "(CommandLineParsing) $PackageArgumentMissing"
                        Try_Help
                        return 1
                ;;
@@ -1336,18 +1336,18 @@
                                        if [ $? -eq 0 ]; then
                                                        : #ok
                                        else
-                                               Error "$NotAnRpm '$PAQUET'"
+                                               Error "(CommandLineParsing) 
$NotAnRpm '$PAQUET'"
                                                return 1
                                        fi
                                else
-                                       Error "$FileNotFound '$PAQUET'"
+                                       Error "(CommandLineParsing) 
$FileNotFound '$PAQUET'"
                                        return 1
                                fi
                        fi
                ;;
 
                *)
-                       Error "$PackageMultiple"
+                       Error "(CommandLineParsing) $PackageMultiple"
                        Try_Help
                        return 1
                ;;
@@ -1364,7 +1364,7 @@
                # Yeah, a bit ugly, but simple and seems to work...
                Mkdir_p "$rpmdir" # Not check exit status here
                rpmdir="$(cd $rpmdir && echo $PWD)" || {
-                       Error "$CannotChdir '$rpmdir'"
+                       Error "(CommandLineParsing) $CannotChdir '$rpmdir'"
                        return 1
                }
        fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/rpmrebuild_rpmqf.src new/rpmrebuild_rpmqf.src
--- old/rpmrebuild_rpmqf.src    2018-10-19 17:51:38.000000000 +0200
+++ new/rpmrebuild_rpmqf.src    2020-02-21 13:53:22.000000000 +0100
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #    Copyright (C) 2002 by Eric Gerbier
 #    Bug reports to: [email protected]
-#    $Id: rpmrebuild-2.14 | rpmrebuild_rpmqf.src | Wed Oct 17 15:16:18 2018 
+0200 | Eric Gerbier  $
+#    $Id: rpmrebuild-2.15 | rpmrebuild_rpmqf.src | Fri Feb 21 13:50:26 2020 
+0100 | Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -84,8 +84,10 @@
 # Similar to qf_spec_requires, but includes an undecoded REQUIREFLAGS, and does
 #  not include the "Requires:" string.
 # Intended to allow further decoding of REQUIREFLAGS .
+# use comma separator because REQUIRENAME may contain spaces : (wpa_supplicant 
>= 1:1.1 or iwd)
+# the separator must be the same used in decode_requires awk
 function qf_spec_requires_raw {
-echo '%|REQUIRENAME?{[%{REQUIRENAME} %{REQUIREFLAGS} %{REQUIREFLAGS:depflags} 
%{REQUIREVERSION}\n]}|'
+echo 
'%|REQUIRENAME?{[%{REQUIRENAME},%{REQUIREFLAGS},%{REQUIREFLAGS:depflags},%{REQUIREVERSION}\n]}|'
 }
 
 function qf_spec_suggest {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec_func.src new/spec_func.src
--- old/spec_func.src   2018-10-19 17:51:38.000000000 +0200
+++ new/spec_func.src   2020-02-21 13:53:22.000000000 +0100
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/usr/bin/env bash
 ###############################################################################
 #    Copyright (C) 2004, 2009 by Valery Reznic
 #    This file is a part of the rpmrebuild project
-#    $Id: rpmrebuild-2.14 | spec_func.src | Fri Oct 12 09:29:50 2018 +0200 | 
Eric Gerbier  $
+#    $Id: rpmrebuild-2.15 | spec_func.src | Fri Feb 21 13:50:26 2020 +0100 | 
Eric Gerbier  $
 #
 #    This program is free software; you can redistribute it and/or modify
 #    it under the terms of the GNU General Public License as published by
@@ -54,16 +54,16 @@
 {
        rpm_qf=$( $1 )
        local RPM_QUERY="rpm --query $i18ndomains $package_flag --queryformat "
-       $RPM_QUERY "$rpm_qf" $PAQUET || return
+       $RPM_QUERY "$rpm_qf" $PAQUET || Error "(spec_query) $rpm_qf" || return
        return 0
 }
 
 # build the list of files in package
 function spec_files
 {
-       rm -f $FILES_IN || return
-       spec_query qf_spec_files > $FILES_IN || return
-       /bin/bash $MY_LIB_DIR/rpmrebuild_files.sh < $FILES_IN || return
+       rm -f $FILES_IN || Erro "spec_files rm $FILES_IN" || return
+       spec_query qf_spec_files > $FILES_IN || Error "(spec_files) spec_query 
qf_spec_files" || return
+       /bin/bash $MY_LIB_DIR/rpmrebuild_files.sh < $FILES_IN || Error 
"(spec_files) rpmrebuild_files.sh" || return
        return 0
 }
 
@@ -75,9 +75,9 @@
        }"
 
        if [ "x$RELEASE_NEW" = "x" ]; then
-               spec_query qf_spec_preamble                         || return
+               spec_query qf_spec_preamble                         || Error 
"(spec_preamble) spec_query qf_spec_preamble" || return
        else
-               spec_query qf_spec_preamble | sed -e "$sed_release" || return
+               spec_query qf_spec_preamble | sed -e "$sed_release" || Error 
"(spec_preamble) spec_query qf_spec_preamble with sed" || return
        fi
 }
 
@@ -89,7 +89,7 @@
        # Comment out Provides with pgp()
        local sed_provides='/Provides[[:space:]]*:[[:space:]]*gpg(.*)/s/^/#/'
        [ "X$autoprovide" = "Xyes" ] && sed_provides="$sed_provides$sed_comment"
-       spec_query qf_spec_provides | sed -e "$sed_provides" || return
+       spec_query qf_spec_provides | sed -e "$sed_provides" || Error 
"(spec_provides) spec_query qf_spec_provides" || return
        return 0
 }
 
@@ -106,10 +106,10 @@
        then
                # current code using awk to decode
                spec_query qf_spec_requires_raw | decode_requires \
-           | sed -e "$sed_requires" || return
+                       | sed -e "$sed_requires" || Error "(spec_requires) 
spec_query qf_spec_requires_raw" || return
        else
                # old code without awk for old distributions
-               spec_query qf_spec_requires | sed -e "$sed_requires" || return
+               spec_query qf_spec_requires | sed -e "$sed_requires" || Error 
"(spec_requires) spec_query qf_spec_requires" || return
        fi
        return 0
 }
@@ -118,7 +118,8 @@
 {
        # Decode the REQUIREFLAGS bits to dependency attributes.
        # Bits are defined in lib/rpmlib.h in the rpm source code.
-       awk '
+       # separator must be the same as in qf_spec_requires_raw
+       awk -F, '
            BEGIN {
                PRE    = lshift(1,  9);
                POST   = lshift(1, 10);
@@ -157,26 +158,26 @@
        local sed_comment=';s/^/#/'
 
        local i=1
-       spec_preamble                  > $SPEC_PREAMBLE.$i     || return
-       spec_query qf_spec_conflicts    > $SPEC_CONFLICTS.$i    || return
-       spec_query qf_spec_obsoletes    > $SPEC_OBSOLETES.$i    || return
-       spec_provides                  > $SPEC_PROVIDES.$i     || return
-       spec_requires                  > $SPEC_REQUIRES.$i     || return
-       spec_query qf_spec_suggest      > $SPEC_SUGGESTS.$i     || return
-       spec_query qf_spec_enhance      > $SPEC_ENHANCES.$i     || return
-       spec_query qf_spec_recommends   > $SPEC_RECOMMENDS.$i   || return
-       spec_query qf_spec_supplements  > $SPEC_SUPPLEMENTS.$i  || return
-       spec_query qf_spec_description  > $SPEC_DESCRIPTION.$i  || return
-       spec_files                     > $SPEC_FILES.$i         || return
-       spec_query qf_spec_triggers     > $SPEC_TRIGGERS.$i     || return
-       spec_query qf_spec_pre          > $SPEC_PRE.$i          || return
-       spec_query qf_spec_pretrans     > $SPEC_PRETRANS.$i     || return
-       spec_query qf_spec_post         > $SPEC_POST.$i         || return
-       spec_query qf_spec_posttrans    > $SPEC_POSTTRANS.$i    || return
-       spec_query qf_spec_preun        > $SPEC_PREUN.$i        || return
-       spec_query qf_spec_postun       > $SPEC_POSTUN.$i       || return
-       spec_query qf_spec_verifyscript > $SPEC_VERIFYSCRIPT.$i || return
-       spec_query qf_spec_changelog    > $SPEC_CHANGELOG.$i    || return
+       spec_preamble                  > $SPEC_PREAMBLE.$i      || Error 
"(SpecGeneration) spec_preamble" || return
+       spec_query qf_spec_conflicts    > $SPEC_CONFLICTS.$i    || Error 
"(SpecGeneration) qf_spec_conflicts" || return
+       spec_query qf_spec_obsoletes    > $SPEC_OBSOLETES.$i    || Error 
"(SpecGeneration) qf_spec_obsoletes" || return
+       spec_provides                  > $SPEC_PROVIDES.$i      || Error 
"(SpecGeneration) spec_provides" || return
+       spec_requires                  > $SPEC_REQUIRES.$i      || Error 
"(SpecGeneration) spec_requires" || return
+       spec_query qf_spec_suggest      > $SPEC_SUGGESTS.$i     || Error 
"(SpecGeneration) qf_spec_suggest" || return
+       spec_query qf_spec_enhance      > $SPEC_ENHANCES.$i     || Error 
"(SpecGeneration) qf_spec_enhance" || return
+       spec_query qf_spec_recommends   > $SPEC_RECOMMENDS.$i   || Error 
"(SpecGeneration) qf_spec_recommends" || return
+       spec_query qf_spec_supplements  > $SPEC_SUPPLEMENTS.$i  || Error 
"(SpecGeneration) qf_spec_supplements" || return
+       spec_query qf_spec_description  > $SPEC_DESCRIPTION.$i  || Error 
"(SpecGeneration) qf_spec_description" || return
+       spec_files                      > $SPEC_FILES.$i        || Error 
"(SpecGeneration) spec_files" || return
+       spec_query qf_spec_triggers     > $SPEC_TRIGGERS.$i     || Error 
"(SpecGeneration) qf_spec_triggers" || return
+       spec_query qf_spec_pre          > $SPEC_PRE.$i          || Error 
"(SpecGeneration) qf_spec_pre" || return
+       spec_query qf_spec_pretrans     > $SPEC_PRETRANS.$i     || Error 
"(SpecGeneration) qf_spec_pretrans" || return
+       spec_query qf_spec_post         > $SPEC_POST.$i         || Error 
"(SpecGeneration) qf_spec_post" || return
+       spec_query qf_spec_posttrans    > $SPEC_POSTTRANS.$i    || Error 
"(SpecGeneration) qf_spec_posttrans" || return
+       spec_query qf_spec_preun        > $SPEC_PREUN.$i        || Error 
"(SpecGeneration) qf_spec_preun" || return
+       spec_query qf_spec_postun       > $SPEC_POSTUN.$i       || Error 
"(SpecGeneration) qf_spec_postun" || return
+       spec_query qf_spec_verifyscript > $SPEC_VERIFYSCRIPT.$i || Error 
"(SpecGeneration) qf_spec_verifyscript" || return
+       spec_query qf_spec_changelog    > $SPEC_CHANGELOG.$i    || Error 
"(SpecGeneration) qf_spec_changelog" || return
 
        return 0
 }
@@ -195,9 +196,9 @@
        else
                echo "BuildRoot: $BUILDROOT" || return
        fi       
-       spec_auto_prov || return
-       spec_auto_req  || return
-       spec_md5_compat_digest || return
+       spec_auto_prov || Error "(spec_concatenate) spec_auto_prov" || return
+       spec_auto_req  || Error "(spec_concatenate) spec_auto_req" || return
+       spec_md5_compat_digest || Error "(spec_concatenate) 
spec_md5_compat_digest" || return
 
        cat <<-SPEC_DEFS || return
                # Do not try autogenerate prereq/conflicts/obsoletes and check 
files
@@ -221,7 +222,7 @@
                $SPEC_ENHANCES.$si_enhances         \
                $SPEC_RECOMMENDS.$si_recommends     \
                $SPEC_SUPPLEMENTS.$si_supplements   \
-       || return
+               || Error "(spec_concatenate) sed1 error" || return
 
        echo                   || return
        echo    "%description" || return
@@ -259,7 +260,7 @@
                $SPEC_PREUN.$si_preun               \
                $SPEC_POSTUN.$si_postun             \
                $SPEC_VERIFYSCRIPT.$si_verifyscript \
-       || return
+               || Error "(spec_concatenate) sed2 error" || return
 
        echo "%changelog" || return
        sed -e "$sed_double_percent"                \



Reply via email to