←back to thread

466 points CoolCold | 2 comments | | HN request time: 0.544s | source
Show context
withinboredom ◴[] No.40212976[source]
I don't understand the point of creating an entirely new shell inheriting almost nothing. Seems like that would cause a lot of issues (i.e., sudo make install)
replies(1): >>40213021 #
1. Arnavion ◴[] No.40213021[source]
That's how sudo already works on most (all?) distros. Eg Debian 12 has:

    Defaults env_reset
... which will clear almost everything that `make install` would've used. OpenSUSE TW has:

    Defaults always_set_home
    Defaults env_reset
    Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"
... which is a lot more, but will still clear whatever `make install` would've used.

Anything you need to give to `make install` should be given explicitly, like `sudo make INSTALL_ROOT=$INSTALL_ROOT install` or whatever.

replies(1): >>40215771 #
2. gcbirzan ◴[] No.40215771[source]
If you're using autoconf/automake, you don't need to do that.