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

Option to allow all environment variables #465

Open
raingloom opened this issue Jul 17, 2022 · 3 comments
Open

Option to allow all environment variables #465

raingloom opened this issue Jul 17, 2022 · 3 comments

Comments

@raingloom
Copy link

raingloom commented Jul 17, 2022

First, in light of https://sfconservancy.org/GiveUpGitHub/ I'd like to ask if there is any other way to contribute to the project that is not GitHub?

Second, I'm trying to use Tup on Guix, which takes care of clearing up the environment variables much better than Tup can. It also relies on a lot more variables than Tup seems to anticipate. On Guix, I think it is perfectly safe to assume that the user wants every environment variable to be passed through, and if they want a fully sandboxed deterministic build, they'll just use Guix's tooling, which does a lot more than Tup can on its own.

The problem is, there seem to be no option to just let all variables through. I tried adding one in a fork and I think I finally figured out how to do it, but an "officially sanctioned" way would be nice.

I'd also be fine with it being a hidden option, or something you have to opt into at compile time.

@gittup
Copy link
Owner

gittup commented Aug 10, 2022

First, in light of https://sfconservancy.org/GiveUpGitHub/ I'd like to ask if there is any other way to contribute to the project that is not GitHub?

Sure, this github repo isn't the "official" upstream repo anyway - I posted it here mostly as a convenience for those people who prefer to use it. You can clone from git://gittup.org/tup.git if you like. You can also post any issues to the tup mailing list, and if you're contributing a patch, feel free to link to your public repo hosted anywhere you choose.

Second, I'm trying to use Tup on Guix, which takes care of clearing up the environment variables much better than Tup can. It also relies on a lot more variables than Tup seems to anticipate. On Guix, I think it is perfectly safe to assume that the user wants every environment variable to be passed through, and if they want a fully sandboxed deterministic build, they'll just use Guix's tooling, which does a lot more than Tup can on its own.

Can you clarify what you mean by clearing the environment much better than tup can? Tup wipes it entirely (except for a few defaults to get standard toolchains working), but if there's a better method I'd like to incorporate it if possible!

Tup would still need to track the environment variables so it can rebuild if necessary. Are there any variables in the Guix environment that would change frequently? If so, the model might need to change from an "(empty environment) + (some variables)" model to a "(full environment) - (some variables)" model for it to work.

The problem is, there seem to be no option to just let all variables through. I tried adding one in a fork and I think I finally figured out how to do it, but an "officially sanctioned" way would be nice.

I'd also be fine with it being a hidden option, or something you have to opt into at compile time.

What do you think about an "export_all" keyword? So instead of having a Tuprules.tup file like:

export VAR1
export VAR2
export ...

You could have:

export_all

Which would go through the tup process' own environment and add all variables.

@raingloom
Copy link
Author

raingloom commented Oct 11, 2022 via email

@edwinzrodriguez
Copy link

I would like to see a way to specify certain variables that are not checked. i.e. if GCC_COLOR changes that shouldn't trigger a full rebuild.

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

No branches or pull requests

3 participants