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

Sudo in dev builds isn't very necessary #2027

Open
JonChesterfield opened this issue Jul 19, 2024 · 2 comments
Open

Sudo in dev builds isn't very necessary #2027

JonChesterfield opened this issue Jul 19, 2024 · 2 comments

Comments

@JonChesterfield
Copy link

I don't have sudo on my dev machines but have successfully built the dev build despite that.

Process followed:

  1. Install the various dependencies as root
  2. mkdir /wedge && chown $USER:$USER /wedge
  3. sed 's_sudo__'g build/*, roughly - hacked sudo out one at a time until success
  4. Tests pass

The key change is probably dropping sudo from sudo $0 _unboxed-install "$@" in deps/wedge.sh, may also need to patch sudo $0 _install-new-r "$@" from build/py.sh.

apt install is present in a couple of places, test/spec-bin.sh build/deps.sh and there's a release-only set involving valgrind elsewhere.

I'm not sure on the cleanest way to modify the build scripts to make this optional. Perhaps allowing /wedge to be somewhere non-root-owned and then installing as a user instead?

@andychu
Copy link
Contributor

andychu commented Jul 19, 2024

Oh glad you looked into this! Yes I want to get rid of /wedge and any root requirements:

https://oilshell.zulipchat.com/#narrow/stream/308821-containers/topic/Getting.20rid.20of.20.2Fwedge

That was a bit of silly experiment where I thought we could cache /wedge, but we couldn't cache /home/ANYUSER/wedge


But now I realize we don't really need caching for this particular problem

I also realized that the WEDGE package defs can pretty much be written so their agnostic of /home/user/wedge vs. /wedge (in case we ever want caching for a different problem)

( FWIW this thread summarizes the 3 reasons for WEDGE - https://oilshell.zulipchat.com/#narrow/stream/308821-containers/topic/Wedge.3A.20flexible.20packages.20with.203.20options )

Glad you got it working!

@JonChesterfield
Copy link
Author

Caches under root and not under $USER wouldn't be much of a disaster either - it's already an initial build-deps.sh step that you don't run particularly often, and it runs within the time it took to find coffee on a slow machine. I haven't looked up what wedge actually is but am glad the build didn't lead with installing docker.

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

2 participants