lib, plugins: use mktemp with -p /var/tmp to avoid disk full situations on tmpfs
This commit is contained in:
parent
6beb82631f
commit
8b395cffa4
@ -307,7 +307,7 @@ proxy:,proxy-user:,autoupdate-off: \
|
|||||||
# FIXME : should `specname' be an optional argument?
|
# FIXME : should `specname' be an optional argument?
|
||||||
[ "$specname" ] || { usage; ${EXIT_FUNC:-"exit"} 1; }
|
[ "$specname" ] || { usage; ${EXIT_FUNC:-"exit"} 1; }
|
||||||
|
|
||||||
local fcurlout=$(mktemp -q -t fcurlout.XXXXXXXX) ||
|
local fcurlout=$(mktemp -q -p /var/tmp -t fcurlout.XXXXXXXX) ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
|
|
||||||
# SPEC_SOURCE0_PCKNAME --> src0pckname
|
# SPEC_SOURCE0_PCKNAME --> src0pckname
|
||||||
|
@ -221,7 +221,7 @@ getting list of files from"" \`${NOTE}$currurl/${NORM}'..."
|
|||||||
continue ;;
|
continue ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
currflist="$(mktemp -q -t flist.XXXXXXXX)" ||
|
currflist="$(mktemp -q -p /var/tmp -t flist.XXXXXXXX)" ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
notify.debug "$FUNCNAME: currflist = $currflist"
|
notify.debug "$FUNCNAME: currflist = $currflist"
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ function repository.get_RPMS_name() {
|
|||||||
[ "$archlist" ] || notify.error $"\
|
[ "$archlist" ] || notify.error $"\
|
||||||
(bug)"" -- $FUNCNAME: "$"no list of architectures set"" (\$archlist)"
|
(bug)"" -- $FUNCNAME: "$"no list of architectures set"" (\$archlist)"
|
||||||
|
|
||||||
local flist=`mktemp -q -t flist.XXXXXXXX` ||
|
local flist=`mktemp -q -p /var/tmp -t flist.XXXXXXXX` ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
|
|
||||||
local curr_arch errors pck_name curr_match
|
local curr_arch errors pck_name curr_match
|
||||||
@ -1026,7 +1026,7 @@ function git.create_tarball() {
|
|||||||
type -p git &>/dev/null ||
|
type -p git &>/dev/null ||
|
||||||
notify.error $"utility not found"": \`git'"
|
notify.error $"utility not found"": \`git'"
|
||||||
|
|
||||||
local tmpgitdir=$(mktemp -q -d -t tmpgit.XXXXXXXX)
|
local tmpgitdir=$(mktemp -q -d -p /var/tmp -t tmpgit.XXXXXXXX)
|
||||||
[ $? -eq 0 ] ||
|
[ $? -eq 0 ] ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
notify.debug "$FUNCNAME: tmpgitdir = $tmpgitdir"
|
notify.debug "$FUNCNAME: tmpgitdir = $tmpgitdir"
|
||||||
|
@ -632,7 +632,7 @@ $FUNCNAME: specfile_preprocessed = \"$specfile_preprocessed\""
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
local tmpspreprerr=$(mktemp -q -t $me.XXXXXXXX)
|
local tmpspreprerr=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
|
||||||
[ $? -eq 0 ] ||
|
[ $? -eq 0 ] ||
|
||||||
notify.error "$FUNCNAME: "$"can't create temporary files"
|
notify.error "$FUNCNAME: "$"can't create temporary files"
|
||||||
notify.debug "$FUNCNAME: tmpspreprerr = \`${NOTE}$tmpspreprerr${NORM}'"
|
notify.debug "$FUNCNAME: tmpspreprerr = \`${NOTE}$tmpspreprerr${NORM}'"
|
||||||
|
@ -407,11 +407,11 @@ $"illegal value"": \"$ftp_rw_server_num_default\""
|
|||||||
# display users and passwords in the debug messages (default: '0')
|
# display users and passwords in the debug messages (default: '0')
|
||||||
debug_print_private_user_infos=0
|
debug_print_private_user_infos=0
|
||||||
|
|
||||||
infofile=$(mktemp -q -t infofile.XXXXXXXX)
|
infofile=$(mktemp -q -p /var/tmp -t infofile.XXXXXXXX)
|
||||||
[ $? -eq 0 ] || notify.error $"can't create temporary files"
|
[ $? -eq 0 ] || notify.error $"can't create temporary files"
|
||||||
|
|
||||||
# preprocessed specfile generated by 'rpm --specfile --specedit'
|
# preprocessed specfile generated by 'rpm --specfile --specedit'
|
||||||
specfile_preprocessed=$(mktemp -q -t specpreproc.XXXXXXXX)
|
specfile_preprocessed=$(mktemp -q -p /var/tmp -t specpreproc.XXXXXXXX)
|
||||||
[ $? -eq 0 ] || notify.error $"can't create temporary files"
|
[ $? -eq 0 ] || notify.error $"can't create temporary files"
|
||||||
|
|
||||||
trap "rm -f $infofile $specfile_preprocessed" 0 1 2 3 6 7 9 13 15
|
trap "rm -f $infofile $specfile_preprocessed" 0 1 2 3 6 7 9 13 15
|
||||||
@ -1341,7 +1341,7 @@ illegal \`format_extra_rules' (see configuration file(s))"
|
|||||||
local sharedstatedir=`rpm --eval=%{_sharedstatedir}`
|
local sharedstatedir=`rpm --eval=%{_sharedstatedir}`
|
||||||
local sysconfdir=`rpm --eval=%{_sysconfdir}`
|
local sysconfdir=`rpm --eval=%{_sysconfdir}`
|
||||||
|
|
||||||
local tmpspec=$(mktemp -q -t $me.XXXXXXXX)
|
local tmpspec=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
|
||||||
[ $? -eq 0 ] ||
|
[ $? -eq 0 ] ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
notify.debug "tmpspec = \`${NOTE}$tmpspec${NORM}'"
|
notify.debug "tmpspec = \`${NOTE}$tmpspec${NORM}'"
|
||||||
@ -1478,7 +1478,7 @@ for i in $(seq 1 1 ${#spec_lines[@]}); do
|
|||||||
echo -n "\n ${spec_lines[$i-1]}"
|
echo -n "\n ${spec_lines[$i-1]}"
|
||||||
done)"
|
done)"
|
||||||
|
|
||||||
local tmppreamble=$(mktemp -q -t $me.XXXXXXXX)
|
local tmppreamble=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
|
||||||
[ $? -eq 0 ] ||
|
[ $? -eq 0 ] ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
notify.debug "tmppreamble = \`${NOTE}$tmppreamble${NORM}'"
|
notify.debug "tmppreamble = \`${NOTE}$tmppreamble${NORM}'"
|
||||||
@ -2193,7 +2193,7 @@ It seems good but do not forget to run quality and security tests"\
|
|||||||
" (-a8)${NORM}""
|
" (-a8)${NORM}""
|
||||||
"
|
"
|
||||||
else
|
else
|
||||||
local tmpunpackfiles=$(mktemp -q -t $me.XXXXXXXX)
|
local tmpunpackfiles=$(mktemp -q -p /var/tmp -t $me.XXXXXXXX)
|
||||||
[ $? -eq 0 ] || notify.error $"can't create temporary files"
|
[ $? -eq 0 ] || notify.error $"can't create temporary files"
|
||||||
notify.debug "tmpunpackfiles = \`${NOTE}$tmpunpackfiles${NORM}'"
|
notify.debug "tmpunpackfiles = \`${NOTE}$tmpunpackfiles${NORM}'"
|
||||||
|
|
||||||
@ -2273,7 +2273,7 @@ build the list of the build requirements""${NORM}"
|
|||||||
notify.debug "SPEC_TARGET = [ ${SPEC_TARGET[*]} ]"
|
notify.debug "SPEC_TARGET = [ ${SPEC_TARGET[*]} ]"
|
||||||
notify.debug "pcks_list = [ ${pcks_list[*]} ]"
|
notify.debug "pcks_list = [ ${pcks_list[*]} ]"
|
||||||
|
|
||||||
local frequires=$(mktemp -q -t frequires.XXXXXXXX) ||
|
local frequires=$(mktemp -q -p /var/tmp -t frequires.XXXXXXXX) ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
# FIXME: "/usr/lib/perl5" should be defined in autospec.conf
|
# FIXME: "/usr/lib/perl5" should be defined in autospec.conf
|
||||||
local perl_prefixes=$(perl -V | grep "^[[:space:]]\+/usr/lib/perl5")
|
local perl_prefixes=$(perl -V | grep "^[[:space:]]\+/usr/lib/perl5")
|
||||||
@ -2521,7 +2521,7 @@ pck_newver = \"$pck_newver\", pck_newrel = \"$pck_newrel\""
|
|||||||
notify.debug "pck_rpmrelease = $pck_rpmrelease"
|
notify.debug "pck_rpmrelease = $pck_rpmrelease"
|
||||||
|
|
||||||
local tmpextractdir
|
local tmpextractdir
|
||||||
tmpextractdir=$(mktemp -q -d -t rpm_extract.XXXXXXXX)
|
tmpextractdir=$(mktemp -q -d -p /var/tmp -t rpm_extract.XXXXXXXX)
|
||||||
[[ $? -eq 0 ]] ||
|
[[ $? -eq 0 ]] ||
|
||||||
notify.error $"can't create temporary files"
|
notify.error $"can't create temporary files"
|
||||||
notify.debug "$FUNCNAME: tmpextractdir = $tmpextractdir"
|
notify.debug "$FUNCNAME: tmpextractdir = $tmpextractdir"
|
||||||
|
@ -654,7 +654,7 @@ python modules must have this name structure (use \`-n'):"" \
|
|||||||
# link fd#3 with stdout and redirect stdout to the log file
|
# link fd#3 with stdout and redirect stdout to the log file
|
||||||
[ "$outfile" ] && { exec 3<&1; exec 1>>$outfile; }
|
[ "$outfile" ] && { exec 3<&1; exec 1>>$outfile; }
|
||||||
|
|
||||||
local tmpdir=`mktemp -q -d -t $me.XXXXXXXX`
|
local tmpdir=`mktemp -q -d -p /var/tmp -t $me.XXXXXXXX`
|
||||||
[ $? -eq 0 ] ||
|
[ $? -eq 0 ] ||
|
||||||
notify.error $"can't create temporary directory"
|
notify.error $"can't create temporary directory"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user