summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-03-30 18:11:59 +0200
committerLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-03-30 18:12:45 +0200
commitab21e51016ca82a07a43d996158729d885e5551f (patch)
tree345a3b2da29d48d17a7b94d0704f22e87e5d9027
parent2665b3a9b7289516298d3cb1bdf0d33686ccb446 (diff)
downloadmidipix_build-ab21e51016ca82a07a43d996158729d885e5551f.tar.bz2
midipix_build-ab21e51016ca82a07a43d996158729d885e5551f.tar.xz
Delete ${DEFAULT_RPM_JOBS_SEMAPHORE} on init.
-rwxr-xr-xbuild.sh1
-rw-r--r--midipix.env5
-rw-r--r--subr.ex/ex_init.subr11
-rw-r--r--subr.pkg/pkg_install_rpm.subr3
4 files changed, 15 insertions, 5 deletions
diff --git a/build.sh b/build.sh
index e5f225f0..8d6f2090 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 8b612887..ae5e1851 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 71bcc672..61d2676f 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 c5ddf80a..83b6841f 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" \