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

Build Themis as regular user #629

Merged
merged 1 commit into from
Apr 24, 2020
Merged

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Apr 24, 2020

PR #611 keeps on giving! One side effect of performing configuration only once on the first run is that if you initially install Themis with

sudo make install

without running make first then ./configure will be run as root too, meaning that it may not see some toolchains installed locally for the user, not globally in the system.

Rust's rustup is an example of toolchain installer which does not install it's stuff into system and configures PATH in such way that its local installation is not visible from within sudo.

This means that sudo make install will not see Rust toolchain and will write empty RUST_VERSION variable to configuration.mk. This will cause make test_rust to do nothing and exit while printing a lovecraftian message during CI runs:

fatal: No names found, cannot describe anything.
tput: No value for $TERM and no -T specified
make: Nothing to be done for 'test_rust'.

(Other messages are unrelated, but funny nevertheless)

So... Install Themis by doing

make
sudo make install

to ensure that ./configure sees Rust toolchain and the tests will actually get run.

While we're here, update all other instances of Themis Core installation with bare sudo make install to avoid such issue if it becomes actual. However, most other toolchain installers seems to install their stuff globally so the above issue is not actual for them right now.

Checklist

Commit f79cd23 ("configure" script for platform detection, 2020-03-27)
keeps on giving! One side effect of performing configuration only once
on the first run is that if you initially install Themis with

    sudo make install

without running "make" first then "./configure" will be run as root too,
meaning that it may not see some toolchains installed locally for the
user, not globally in the system.

Rust's rustup is an example of toolchain installer which does not
install it's stuff into system *and* configures PATH in such way that
its local installation is not visible from within sudo.

This means that "sudo make install" wlll not see Rust toolchain and will
write empty RUST_VERSION variable to "configuration.mk". This will cause
"make test_rust" to do nothing and exit while printing a lovecraftian
message during CI runs:

    fatal: No names found, cannot describe anything.
    tput: No value for $TERM and no -T specified
    make: Nothing to be done for 'test_rust'.

(Other messages are unrelated, but funny nevertheless)

So... Install Themis by doing

    make
    sudo make install

to ensure that "./configure" sees Rust toolchain and the tests will
actually get run.

While we're here, update all other instances of Themis Core installation
with bare "sudo make install" to avoid such issue if it becomes actual.
However, most other toolchain installers seems to install their stuff
globally so the above issue is not actual for them right now.
@ilammy ilammy added infrastructure Automated building and packaging W-RustThemis 🦀 Wrapper: Rust-Themis, Rust API, Cargo crates labels Apr 24, 2020
Copy link
Contributor

@vixentael vixentael left a comment

Choose a reason for hiding this comment

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

I’d recommend @shadinua to take a short look

@ilammy ilammy merged commit 27cc325 into cossacklabs:master Apr 24, 2020
@ilammy ilammy deleted the root-build branch April 24, 2020 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Automated building and packaging W-RustThemis 🦀 Wrapper: Rust-Themis, Rust API, Cargo crates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants