Skip to content

Commit

Permalink
Move ulimit workaround into yum reqs func
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham committed Jun 24, 2024
1 parent 9e4720f commit d405f43
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 9 additions & 1 deletion conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,12 +1357,20 @@ def generate_yum_requirements(forge_config, forge_dir):
yum_build_setup = textwrap.dedent(
"""\
(
# Due to https://bugzilla.redhat.com/show_bug.cgi?id=1537564 old
# versions of rpm are drastically slowed down when the number of
# file descriptors is very high. This can be visible during a
# `yum install` step of a feedstock build.
# => Set a lower limit in a subshell for the `yum install`s only.
ulimit -n 1024
# Install the yum requirements defined canonically in the
# "recipe/yum_requirements.txt" file. After updating that file,
# run "conda smithy rerender" and this line will be updated
# automatically.
/usr/bin/sudo -n yum install -y {}
)
""".format(
" ".join(requirements)
Expand Down
9 changes: 1 addition & 8 deletions conda_smithy/templates/build_steps.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,7 @@ setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
{% if build_setup -%}
{{ build_setup }}{% endif -%}
{% if yum_build_setup is defined -%}
(
# Due to https://bugzilla.redhat.com/show_bug.cgi?id=1537564 old versions of rpm
# are drastically slowed down when the number of file descriptors is very high.
# This can be visible during a `yum install` step of a feedstock build.
# => Set a lower limit in a subshell for the `yum install`s only.
ulimit -n 1024
{{ yum_build_setup }}
){% endif -%}
{{ yum_build_setup }}{% endif -%}

# make the build number clobber
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
Expand Down

0 comments on commit d405f43

Please sign in to comment.