From ab21e51016ca82a07a43d996158729d885e5551f Mon Sep 17 00:00:00 2001 From: LucĂ­a Andrea Illanes Albornoz Date: Mar 30 2023 16:12:45 +0000 Subject: Delete ${DEFAULT_RPM_JOBS_SEMAPHORE} on init. --- diff --git a/build.sh b/build.sh index e5f225f..8d6f209 100755 --- a/build.sh +++ b/build.sh @@ -95,6 +95,7 @@ buildp_init() { "${DEFAULT_CHECK_PATH_VARS}" \ "${DEFAULT_CLEAR_ENV_VARS_EXCEPT}" \ "${DEFAULT_CLEAR_PREFIX_PATHS}" \ + "${DEFAULT_RPM_JOBS_SEMAPHORE}" \ "${BUILD_DLCACHEDIR}" "${PREFIX}" \ "${PREFIX_RPM}" "${BUILD_WORKDIR}"; then diff --git a/midipix.env b/midipix.env index 8b61288..ae5e185 100644 --- a/midipix.env +++ b/midipix.env @@ -176,13 +176,16 @@ rtl_get_var_unsafe \$DEFAULT_LDFLAGS_RUNTIME -u "DEFAULT_LDFLAGS_${BUILD_KIND}_R # Default command & tool flags & variables : ${DEFAULT_AUTOCONF_CONFIG_GUESS:="copy"}; : ${DEFAULT_CMAKE_LISTFILE:="CMakeLists.txt"}; +: ${DEFAULT_GIT_ARGS:=""}; : ${DEFAULT_GITROOT:=git://midipix.org}; : ${DEFAULT_GITROOT_HEAD:=git://midipix.org}; : ${DEFAULT_MAKE_INSTALL_VNAME:=DESTDIR}; : ${DEFAULT_MAKEFLAGS_LOADAVG:="-l${DEFAULT_BUILD_CPUS}"}; : ${DEFAULT_MAKEFLAGS_PARALLELISE:="-j${DEFAULT_BUILD_CPUS}"}; : ${DEFAULT_MAKEFLAGS_VERBOSITY:="V=99 VERBOSE=1"}; -: ${DEFAULT_GIT_ARGS:=""}; +: ${DEFAULT_RPM_JOBS_MAX:=1}; +: ${DEFAULT_RPM_JOBS_SEMAPHORE:="${BUILD_WORKDIR}/rpm.jobs"}; +: ${DEFAULT_RPM_JOBS_WAIT:=8}; : ${DEFAULT_TIMESTAMP_FMT:="%Y/%m/%d %H:%M:%S"}; : ${DEFAULT_WGET_ARGS:="--no-check-certificate --timeout=25 --waitretry=16"}; : ${DEFAULT_ZIPDIST_DEFROOT:="/dev/fs/c/midipix"}; diff --git a/subr.ex/ex_init.subr b/subr.ex/ex_init.subr index 71bcc67..61d2676 100644 --- a/subr.ex/ex_init.subr +++ b/subr.ex/ex_init.subr @@ -244,6 +244,7 @@ ex_init_help() { # @_check_path_vars: list of pathname variables to check # @_clear_env_vars_except: list of environment variables to not unset when clearing the environment # @_clear_prefix_paths: list of directory pathnames to clear in the top-level prefix +# @_rpm_semaphore: absolute pathname to rpmbuild(1) parallel jobs count semaphore # @_dlcachedir: absolute pathname to download cache directory # @_prefix: absolute pathname to top-level prefix # @_prefix_rpm: absolute pathname to RPM files prefix @@ -256,8 +257,8 @@ ex_init_files() { _eif_build_log_fname="${4}" _eif_build_log_last_fname="${5}" \ _eif_build_status_in_progress_fname="${6}" _eif_check_path_vars="${7}" \ _eif_clear_env_vars_except="${8}" _eif_clear_prefix_paths="${9}" \ - _eif_dlcachedir="${10}" _eif_prefix="${11}" _eif_prefix_rpm="${12}" \ - _eif_workdir="${13}" \ + _eif_rpm_semaphore="${10}" _eif_dlcachedir="${11}" _eif_prefix="${12}" \ + _eif_prefix_rpm="${13}" _eif_workdir="${14}" \ _eif_log_last_fname="" _eif_log_last_num=1 _eif_rc=0; if ! rtl_fileop mkdir "${_eif_dlcachedir}" "${_eif_workdir}"\ @@ -287,7 +288,11 @@ ex_init_files() { rtl_fileop ln_symbolic "${_eif_log_last_fname}" "${_eif_build_log_last_fname}"; fi; - rtl_fileop touch "${_eif_build_log_fname}"; rtl_log_set_fname "${_eif_build_log_fname}"; + rtl_fileop touch "${_eif_build_log_fname}"; + rtl_log_set_fname "${_eif_build_log_fname}"; + + rtl_fileop rm "${_eif_rpm_semaphore}"; + if rtl_lmatch "${_eif_rclean_builds}" $"prefix" ","; then trap "rm -f \"${_eif_build_status_in_progress_fname}\" 2>/dev/null; diff --git a/subr.pkg/pkg_install_rpm.subr b/subr.pkg/pkg_install_rpm.subr index c5ddf80..83b6841 100644 --- a/subr.pkg/pkg_install_rpm.subr +++ b/subr.pkg/pkg_install_rpm.subr @@ -18,7 +18,8 @@ pkg_install_rpm() { "${PKG_VERSION:-}" || return 1; ex_rtl_build_rpm \ "${PKG_DESTDIR}" \ - 1 "${BUILD_WORKDIR}/rpm.jobs" 8 \ + "${DEFAULT_RPM_JOBS_MAX}" "${DEFAULT_RPM_JOBS_SEMAPHORE}" \ + "${DEFAULT_RPM_JOBS_WAIT}" \ "${PKG_NAME}" \ "${PREFIX_RPM}" \ "${MIDIPIX_BUILD_PWD}/etc/package.spec" \