1
1

Merge pull request #6636 from mwheinz/REF6638-v4.0.x

v4.0.x buildrpm.sh no longer respects the value of rpmtopdir
Этот коммит содержится в:
Geoff Paulsen 2019-05-07 09:41:14 -05:00 коммит произвёл GitHub
родитель 73f9bcc374 77caeb9bfa
Коммит 5d4c9b444a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 35 добавлений и 17 удалений

3
contrib/dist/linux/README поставляемый
Просмотреть файл

@ -86,6 +86,9 @@ Please, do NOT set the same settings with parameters and config vars.
file from the tarball specified on the command line. By default, file from the tarball specified on the command line. By default,
the script will look for the specfile in the current directory. the script will look for the specfile in the current directory.
-R directory
Specifies the top level RPM build direcotry.
-h -h
Prints script usage information. Prints script usage information.

19
contrib/dist/linux/buildrpm.sh поставляемый
Просмотреть файл

@ -58,6 +58,9 @@
# file from the tarball specified on the command line. By default, # file from the tarball specified on the command line. By default,
# the script will look for the specfile in the current directory. # the script will look for the specfile in the current directory.
# #
# -R directory
# Specifies the top level RPM build direcotry.
#
# -h # -h
# Prints script usage information. # Prints script usage information.
# #
@ -107,7 +110,7 @@ orig_param="$@"
# #
# usage information # usage information
# #
usage="Usage: $0 [-b][-o][-m][-d][-u][-s][-h] [-n name][-f lf_location][-t tm_location] tarball usage="Usage: $0 [-b][-o][-m][-d][-u][-s][-h] [-n name][-f lf_location][-t tm_location][-R directory] tarball
-b -b
build all-in-one binary RPM only (required for all other flags to work) build all-in-one binary RPM only (required for all other flags to work)
@ -146,6 +149,9 @@ usage="Usage: $0 [-b][-o][-m][-d][-u][-s][-h] [-n name][-f lf_location][-t tm_lo
-r parameter -r parameter
add custom RPM build parameter add custom RPM build parameter
-R directory
Specifies the top level RPM build direcotry.
-h print this message and exit -h print this message and exit
tarball path to Open MPI source tarball tarball path to Open MPI source tarball
@ -155,8 +161,9 @@ usage="Usage: $0 [-b][-o][-m][-d][-u][-s][-h] [-n name][-f lf_location][-t tm_lo
# parse args # parse args
# #
libfabric_path="" libfabric_path=""
rpmtopdir=
while getopts bn:omif:t:dc:r:sh flag; do while getopts bn:omif:t:dc:r:sR:h flag; do
case "$flag" in case "$flag" in
b) build_srpm="no" b) build_srpm="no"
build_single="yes" build_single="yes"
@ -180,6 +187,8 @@ while getopts bn:omif:t:dc:r:sh flag; do
;; ;;
r) configure_options="$rpmbuild_options $OPTARG" r) configure_options="$rpmbuild_options $OPTARG"
;; ;;
R) rpmtopdir="$OPTARG"
;;
s) unpack_spec="1" s) unpack_spec="1"
;; ;;
h) echo "$usage" 1>&2 h) echo "$usage" 1>&2
@ -267,10 +276,16 @@ fi
# Find where the top RPM-building directory is # Find where the top RPM-building directory is
# #
# if the user did not specify an $rpmtopdir, check for an .rpmmacros file.
if test "$rpmtopdir" == ""; then
file=~/.rpmmacros file=~/.rpmmacros
if test -r $file; then if test -r $file; then
rpmtopdir=${rpmtopdir:-"`grep %_topdir $file | awk '{ print $2 }'`"} rpmtopdir=${rpmtopdir:-"`grep %_topdir $file | awk '{ print $2 }'`"}
fi fi
fi
# If needed, initialize the $rpmtopdir directory. If no $rpmtopdir was
# specified, try various system-level defaults.
if test "$rpmtopdir" != ""; then if test "$rpmtopdir" != ""; then
rpmbuild_options="$rpmbuild_options --define '_topdir $rpmtopdir'" rpmbuild_options="$rpmbuild_options --define '_topdir $rpmtopdir'"
if test ! -d "$rpmtopdir"; then if test ! -d "$rpmtopdir"; then