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

nobody can't build Rust/Java packages #907

Open
CapSel opened this issue Aug 12, 2024 · 15 comments
Open

nobody can't build Rust/Java packages #907

CapSel opened this issue Aug 12, 2024 · 15 comments
Labels

Comments

@CapSel
Copy link

CapSel commented Aug 12, 2024

I think this problem might be related to how aura separates build process from root and "my" user.
Failure that I have is related to a HOME directory of nobody that is set to / and missing rust default toolchain.
error: could not create home directory: '/.rustup'

@fosskers
Copy link
Owner

How are you invoking the build? What's the exact command that you're running?

@mkoloberdin
Copy link

I'm experiencing the same issue with other Rust packages from AUR.

$ aura -Akxua
...
error: could not create home directory: '/.rustup': Permission denied (os error 13)

@mkoloberdin
Copy link

I think this problem might be related to how aura separates build process from root and "my" user.
Failure that I have is related to a HOME directory of nobody that is set to / and missing rust default toolchain.

If so, this seems to cause even more problems, e.g. with some other packages:

Verifying source file signatures with gpg...
    dropbox-lnx.x86_64-205.4.5765.tar.gz ... SIGNATURE NOT FOUND
FAILED
==> ERROR: One or more PGP signatures could not be verified!

@fosskers
Copy link
Owner

@mkoloberdin To confirm: you're running Aura as the root user and without invoking sudo manually, yeah?

@CapSel
Copy link
Author

CapSel commented Aug 15, 2024

I run aura with sudo, always. It does not work with root account - like after sudo -s or su.

@fosskers
Copy link
Owner

Running aura with sudo is no longer necessary as of Aura 4. It should work as-is for root now as well. @CapSel , can you try rebuilding the original Rust package you were trying to build? Note that Aura is also a Rust package and can build itself without issue.

@mb720
Copy link

mb720 commented Aug 16, 2024

Omitting sudo for aura 4.0.3 also solved these issues for me when building the packages firefox-tridactyl-native and amdgpu-top with sudo aura -Aua:

oserrors.nim(92)         raiseOSError

    Error:  Permission denied
        ... Additional info: /.nimble/
==> ERROR: A failure occurred in build().
    Aborting...
aura :: Package failed to build, citing:

  makepkg failed.

and

error: could not create home directory: '/.rustup': Permission denied (os error 13)
==> ERROR: A failure occurred in prepare().
    Aborting...
aura :: Package failed to build, citing:

  makepkg failed.

I assume users of aura are used to calling sudo aura ... from the time before the transition from Haskell to Rust. I appreciate that the new aura apparently doesn't need root permissions anymore.

@fosskers
Copy link
Owner

fosskers commented Aug 16, 2024

I assume users of aura are used to calling sudo aura ... from the time before the transition from Haskell to Rust.

I posted that it's no longer necessary across every sensible doc location I can think of, but old habits are probably hard to break. At least these Issues will serve as a record for anyone else who runs into the same thing.

See also #873

@fosskers
Copy link
Owner

Closing, as running Aura without sudo avoids the issue.

@CapSel
Copy link
Author

CapSel commented Aug 26, 2024

I've got similar problem with su instead of sudo when compiling sourcetrail:

[ERROR] Could not create local repository at /.m2/repository -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException

Same error with sudo.
Is it related?

@fosskers
Copy link
Owner

What was the command you used to run Aura?

@CapSel
Copy link
Author

CapSel commented Aug 26, 2024

aura -Aux for upgrade, as I already had sourcetrail installed before.

@fosskers
Copy link
Owner

fosskers commented Aug 26, 2024

And if it's trying to create /.m2/, I suppose you're running as the root user (thus dropping down to nobody)?

@CapSel
Copy link
Author

CapSel commented Aug 26, 2024

Same error happens when I this command as root and with sudo.

@fosskers
Copy link
Owner

So as mentioned with ~/.cargo/ above, it seems that certain languages need temporary folders in which to put their dependencies during the build process, and by default they put them under ~/. When Aura is used as root, it drops down to nobody for building. However, nobody has no $HOME, so it attempts to write to / which it has no permission to do.

@fosskers fosskers reopened this Aug 26, 2024
@fosskers fosskers added the bug label Aug 26, 2024
@fosskers fosskers changed the title Problems compiling mozillavpn from aur nobody can't build Rust/Java packages Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants