Commit 19dfa0b1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

build: add define_allow_root_build if ALLOW_ROOT_USER is set

parent 4743b4a5
...@@ -42,6 +42,9 @@ uni_rpmbuild() ...@@ -42,6 +42,9 @@ uni_rpmbuild()
local SIXPARAM="--quiet" local SIXPARAM="--quiet"
[ -n "$USEDMAKE" ] && SIXPARAM="--define=make_build dmake" [ -n "$USEDMAKE" ] && SIXPARAM="--define=make_build dmake"
local SEVENPARAM=""
[ -n "ALLOW_ROOT_USER" ] && SEVENPARAM="--define=_allow_root_build 1"
if is_gear $SPECDIR ; then if is_gear $SPECDIR ; then
[ -f "$SPECNAME" ] || fatal "run uni_rpmbuild with spec as 2nd parameter" [ -f "$SPECNAME" ] || fatal "run uni_rpmbuild with spec as 2nd parameter"
shift # skip spec name shift # skip spec name
...@@ -51,7 +54,7 @@ uni_rpmbuild() ...@@ -51,7 +54,7 @@ uni_rpmbuild()
# build package without MENV checking # build package without MENV checking
if true || [ "$MENV" = "SS" ] ; then if true || [ "$MENV" = "SS" ] ; then
LANG=$NEULOCALE docmd $NICE $GEAR $COMMIT $GEARRULES --rpmbuild -- $RPMBUILD "$TWOPARAM" "$THRPARAM" "$FOURPARAM" "$FIVEPARAM" "$SIXPARAM" "$@" || RET=$? LANG=$NEULOCALE docmd $NICE $GEAR $COMMIT $GEARRULES --rpmbuild -- $RPMBUILD "$TWOPARAM" "$THRPARAM" "$FOURPARAM" "$FIVEPARAM" "$SIXPARAM" "$SEVENPARAM" "$@" || RET=$?
[ -z "$COMMANDAFTER" ] || docmd $COMMANDAFTER [ -z "$COMMANDAFTER" ] || docmd $COMMANDAFTER
else else
fatal "Build backported src.rpm from git is unsupported now" fatal "Build backported src.rpm from git is unsupported now"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment