diff --git a/conda_smithy/configure_feedstock.py b/conda_smithy/configure_feedstock.py index d68fdfef2..a12e9494c 100755 --- a/conda_smithy/configure_feedstock.py +++ b/conda_smithy/configure_feedstock.py @@ -708,11 +708,6 @@ def _circle_specific_setup(jinja_env, forge_config, forge_dir, platform): """ ) - if platform == "linux": - yum_build_setup = generate_yum_requirements(forge_dir) - if yum_build_setup: - forge_config["yum_build_setup"] = yum_build_setup - forge_config["build_setup"] = build_setup if platform == "linux": @@ -744,42 +739,6 @@ def _circle_specific_setup(jinja_env, forge_config, forge_dir, platform): set_exe_file(target_fname, True) -def generate_yum_requirements(forge_dir): - # If there is a "yum_requirements.txt" file in the recipe, we honour it. - yum_requirements_fpath = os.path.join( - forge_dir, "recipe", "yum_requirements.txt" - ) - yum_build_setup = '' - if os.path.exists(yum_requirements_fpath): - with open(yum_requirements_fpath) as fh: - requirements = [ - line.strip() - for line in fh - if line.strip() and not line.strip().startswith("#") - ] - if not requirements: - raise ValueError( - "No yum requirements enabled in the " - "yum_requirements.txt, please remove the file " - "or add some." - ) - yum_build_setup = textwrap.dedent( - """\ - - # 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) - ) - ) - return yum_build_setup - - def _get_platforms_of_provider(provider, forge_config): platforms = [] keep_noarchs = [] @@ -1014,11 +973,6 @@ def _azure_specific_setup(jinja_env, forge_config, forge_dir, platform): # Explicitly add in a newline character to ensure that jinja templating doesn't do something stupid build_setup = "run_conda_forge_build_setup\n" - if platform == "linux": - yum_build_setup = generate_yum_requirements(forge_dir) - if yum_build_setup: - forge_config['yum_build_setup'] = yum_build_setup - forge_config["build_setup"] = build_setup forge_config["docker"]["interactive"] = False diff --git a/conda_smithy/templates/azure-pipelines-linux.yml.tmpl b/conda_smithy/templates/azure-pipelines-linux.yml.tmpl index 1a59c7220..0fc0cf299 100644 --- a/conda_smithy/templates/azure-pipelines-linux.yml.tmpl +++ b/conda_smithy/templates/azure-pipelines-linux.yml.tmpl @@ -26,7 +26,7 @@ jobs: # configure qemu binfmt-misc running. This allows us to run docker containers # embedded qemu-static - script: | - docker run --rm --privileged multiarch/qemu-user-static:register + docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes ls /proc/sys/fs/binfmt_misc/ condition: not(startsWith(variables['CONFIG'], 'linux_64')) displayName: Configure binfmt_misc diff --git a/conda_smithy/templates/build_steps.sh.tmpl b/conda_smithy/templates/build_steps.sh.tmpl index e75b5bb0d..5312913c4 100644 --- a/conda_smithy/templates/build_steps.sh.tmpl +++ b/conda_smithy/templates/build_steps.sh.tmpl @@ -15,7 +15,7 @@ export CONFIG_FILE="${CI_SUPPORT}/${CONFIG}.yaml" cat >~/.condarc < + +**Changed:** + +* Changed how yum_requirements.txt is used in the docker build. It now installs the yum_requirements + prior to doing the primary conda build without needing to use sudo. + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* + +**Security:** + +* + diff --git a/tests/test_configure_feedstock.py b/tests/test_configure_feedstock.py index 0435b8cda..ac34ab6a1 100644 --- a/tests/test_configure_feedstock.py +++ b/tests/test_configure_feedstock.py @@ -149,19 +149,6 @@ def test_circle_with_yum_reqs(py_recipe, jinja_env): ) -def test_circle_with_empty_yum_reqs_raises(py_recipe, jinja_env): - with open( - os.path.join(py_recipe.recipe, "recipe", "yum_requirements.txt"), "w" - ) as f: - f.write("# effectively empty") - with pytest.raises(ValueError): - cnfgr_fdstk.render_circle( - jinja_env=jinja_env, - forge_config=py_recipe.config, - forge_dir=py_recipe.recipe, - ) - - def test_circle_osx(py_recipe, jinja_env): forge_dir = py_recipe.recipe travis_yml_file = os.path.join(forge_dir, ".travis.yml")