Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework yum-requirements #1019

Closed
wants to merge 3 commits into from

Conversation

mariusvniekerk
Copy link
Member

@mariusvniekerk mariusvniekerk commented Feb 16, 2019

This removes the need to specially deal with yum_requirements in conda-smithy itself. This allows us to get rid of a fair bit of code and remove the need to rerender when just changing yum_requirements

@mariusvniekerk
Copy link
Member Author

This also allows us to remove sudo from our docker images.

@isuruf
Copy link
Member

isuruf commented Feb 16, 2019

This also allows us to remove sudo from our docker images.

I'm -1 to that change. This makes using the docker image for debugging harder for no useful benefit. What's the reason to remove sudo?

@mariusvniekerk
Copy link
Member Author

mariusvniekerk commented Feb 16, 2019

In our current builds we cannot run sudo at all for aarch64 or ppc64le. This means we cannot yum install anything whatsoever. There are two viable solution mechanisms to this problem, either check for the existence of the yum_requirements at the docker entrypoint prior to switching to the conda user, or building a new image as in this PR .

The approach here is more explicit and has less docker entrypoint magic than the alternative

@mariusvniekerk
Copy link
Member Author

We don't really need to remove sudo. but we also don't need to use it anymore either

@isuruf
Copy link
Member

isuruf commented Feb 16, 2019

In our current builds we cannot run sudo at all for aarch64 or ppc64le.

Why can we do this for the x86_64 build?

@mariusvniekerk
Copy link
Member Author

The core issue is mostly around native vs emulated execution. On native systems it seems that sudo works as expected, but running sudo under qemu when you are not uid 0 just fails with messages about not being uid 0. In the interest of keeping the build approaches mostly the same we change both.

@mariusvniekerk
Copy link
Member Author

Example PR where this was applied. conda-forge/tk-feedstock#32

@isuruf
Copy link
Member

isuruf commented Feb 16, 2019

Does multiarch/qemu-user-static#17 (comment) work?

@mariusvniekerk
Copy link
Member Author

how on earth did you find that....., dunno, it might

@mariusvniekerk
Copy link
Member Author

looks like that does work. See https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=13649

do we want to keep some of the bits around how we execute yum so that adding yum requirements does not require a rerender?

@isuruf
Copy link
Member

isuruf commented Feb 17, 2019

I'm okay with keeping this if it was moved inside the docker container

@mariusvniekerk
Copy link
Member Author

@isuruf made that change

@mariusvniekerk
Copy link
Member Author

cc @hmaarrfk @jjhelmus

@hmaarrfk
Copy link
Contributor

whoa, magical!!!

{{ yum_build_setup }}{% endif -%}

# If we have yum requirements build a new specialized image that we will use to run our build in that includes
# those dependencies.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this comment or remove it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually are we able to just revert all of the changes to this file now?

Copy link
Member Author

@mariusvniekerk mariusvniekerk Feb 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could, though this does add the advantage that we dont need a rerender if we've changed yum_requirements, and it simplifies configure_feedstock.py

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is roughly how I proposed yum_requirements.txt originally ( #135 ), but Phil made a compelling argument that they should be listed explicitly ( #134 ). Ultimately I don't feel strongly either way, but it seems the crux of the needed change is quite simple; so, it would be nice if this PR reflected that. Orthogonal changes are better left for other PRs IMHO.

-e UPLOAD_PACKAGES \
$DOCKER_IMAGE \
{{ docker.command }} \
/home/conda/feedstock_root/${PROVIDER_DIR}/build_steps.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also are we able to revert the changes here too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could, but this is just whitespace

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly

@jakirkham
Copy link
Member

Since @isuruf's suggestion worked, would encourage slimming this down to the minimal required change. If I'm not mistaken, that amounts to one line. Though please feel free to correct me if I'm wrong.

@scopatz
Copy link
Member

scopatz commented Feb 21, 2019

Wow, that sudo change is insane! Great find @isuruf!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants