aura icon indicating copy to clipboard operation
aura copied to clipboard

`nobody` can't build Rust/Java packages

Open CapSel opened this issue 1 year ago • 15 comments
trafficstars

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'

CapSel avatar Aug 12 '24 11:08 CapSel

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

fosskers avatar Aug 12 '24 12:08 fosskers

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 avatar Aug 15 '24 16:08 mkoloberdin

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!

mkoloberdin avatar Aug 15 '24 16:08 mkoloberdin

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

fosskers avatar Aug 15 '24 20:08 fosskers

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

CapSel avatar Aug 15 '24 20:08 CapSel

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.

fosskers avatar Aug 15 '24 21:08 fosskers

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.

mb720 avatar Aug 16 '24 08:08 mb720

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 avatar Aug 16 '24 10:08 fosskers

Closing, as running Aura without sudo avoids the issue.

fosskers avatar Aug 24 '24 01:08 fosskers

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?

CapSel avatar Aug 26 '24 17:08 CapSel

What was the command you used to run Aura?

fosskers avatar Aug 26 '24 21:08 fosskers

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

CapSel avatar Aug 26 '24 21:08 CapSel

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

fosskers avatar Aug 26 '24 22:08 fosskers

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

CapSel avatar Aug 26 '24 22:08 CapSel

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 avatar Aug 26 '24 23:08 fosskers