Skip to content

make install review: requires root access & assumes running in Github Actions #299

Open
@mratsim

Description

@mratsim

Linked to #298

Root access

Currently for make install, we require write access to /opt which is root-only

raiko/makefile

Lines 2 to 3 in 546ab19

install:
./script/install.sh $(TARGET)

raiko/script/install.sh

Lines 23 to 24 in 546ab19

# Extract the downloaded archive
tar -xzf /tmp/riscv32-unknown-elf.gcc-13.2.0.tar.gz -C /opt/riscv/

Instead we should:

Assumes running in Github Action

The SP1 part is assuming /home/runner and $GITHUB_PATH which are Github Action specific.

raiko/script/install.sh

Lines 50 to 64 in 546ab19

# SP1
if [ -z "$1" ] || [ "$1" == "sp1" ]; then
curl -L https://sp1.succinct.xyz | bash
if [ -z "${CI}" ] || [ ! command -v sp1up &> /dev/null ]; then
# Need to add sp1up to the path here
PROFILE=$HOME/.bashrc
echo ${PROFILE}
source ${PROFILE}
sp1up
else
echo "/home/runner/.config/.sp1/bin" >> $GITHUB_PATH
/home/runner/.config/.sp1/bin/sp1up
fi
fi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions