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

[Bug]: Error running scripts/setup-ubuntu.sh as root #8209

Closed
tareksander opened this issue Dec 11, 2021 · 1 comment
Closed

[Bug]: Error running scripts/setup-ubuntu.sh as root #8209

tareksander opened this issue Dec 11, 2021 · 1 comment
Labels
bug report Something is not working properly.

Comments

@tareksander
Copy link
Member

Problem description

The script errors out on line 222 because it tries to interpret "DEBIAN_FRONTEND=noninteractive" as a command when SUDO is an empty string. Maybe set SUDO to another command like env when run as root?

What steps will reproduce the bug?

Running scripts/setup-ubuntu.sh as root on Ubuntu 20.04.

What is the expected behavior?

The script runs without any error.

System information

This error occurs on Ubuntu 20.04, not on Termux.

@tareksander tareksander added the bug report Something is not working properly. label Dec 11, 2021
@ghost
Copy link

ghost commented Dec 11, 2021

Yes, env can be used there.

Reminding that running scripts as root can be bad idea. setup-ubuntu.sh uses whoami when setting ownership for sysroot:

$SUDO mkdir -p $TERMUX_PREFIX
$SUDO chown -R $(whoami) /data

You can run into permission issues when attempting to build package as non-root.

Use of build-package.sh as root may lead to host system breakage. Had an incident with package perl where some files went into /usr instead of prefix, probably fixed in current version but not sure.

@ghost ghost closed this as completed in 8279cf4 Dec 11, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly.
Projects
None yet
Development

No branches or pull requests

1 participant