Commit 85baf2e4 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-repack-rpm: repack every package in a separate HOME

parent 198cb5de
...@@ -90,7 +90,7 @@ __create_rpmmacros() ...@@ -90,7 +90,7 @@ __create_rpmmacros()
%packager EPM <support@eepm.ru> %packager EPM <support@eepm.ru>
%_vendor EEPM %_vendor EEPM
%_gpg_name support@etersoft.ru %_gpg_name support@etersoft.ru
# TODO: use special user for repack (instead of root of local user)
%_allow_root_build 1 %_allow_root_build 1
EOF EOF
remove_on_exit "$HOME/.rpmmacros" remove_on_exit "$HOME/.rpmmacros"
...@@ -130,16 +130,17 @@ __epm_repack_to_rpm() ...@@ -130,16 +130,17 @@ __epm_repack_to_rpm()
fi fi
local pkg local pkg
HOME="$(mktemp -d --tmpdir=$BIGTMPDIR)" || fatal
remove_on_exit $HOME
export HOME
__create_rpmmacros
local alpkg local alpkg
local abspkg local abspkg
local tmpbuilddir local tmpbuilddir
repacked_pkgs='' repacked_pkgs=''
for pkg in $pkgs ; do for pkg in $pkgs ; do
# TODO: keep home?
HOME="$(mktemp -d --tmpdir=$BIGTMPDIR)" || fatal
remove_on_exit $HOME
export HOME
__create_rpmmacros
tmpbuilddir=$HOME/$(basename $pkg).tmpdir tmpbuilddir=$HOME/$(basename $pkg).tmpdir
mkdir $tmpbuilddir mkdir $tmpbuilddir
abspkg="$(realpath $pkg)" abspkg="$(realpath $pkg)"
...@@ -200,7 +201,7 @@ __epm_repack_to_rpm() ...@@ -200,7 +201,7 @@ __epm_repack_to_rpm()
remove_on_exit "$repacked_rpm" remove_on_exit "$repacked_rpm"
[ -n "$repacked_pkgs" ] && repacked_pkgs="$repacked_pkgs $repacked_rpm" || repacked_pkgs="$repacked_rpm" [ -n "$repacked_pkgs" ] && repacked_pkgs="$repacked_pkgs $repacked_rpm" || repacked_pkgs="$repacked_rpm"
else else
warning "Can't find converted rpm for source binary package '$pkg'" warning "Can't find converted rpm for source binary package '$pkg' (got $repacked_rpm)"
fi fi
cd $EPMCURDIR >/dev/null cd $EPMCURDIR >/dev/null
done done
......
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