Merge branch 'dont_touch_user_home' into 'master'

Don't touch user home from packages

See merge request redox-os/redox!2365
This commit is contained in:
Jeremy Soller 2026-09-29 17:19:53 -06:00
commit 004566fa67
14 changed files with 30 additions and 53 deletions

View File

@ -25,7 +25,7 @@ path = "/usr/lib/run_acid.ion"
data = """
#!/usr/bin/env ion
export RUST_BACKTRACE=full
cd /home/user/acid
cargo test
export HOME=/home/root
acid-runner
shutdown
"""

View File

@ -24,9 +24,9 @@ path = "/usr/lib/run_tests.ion"
data = """
#!/usr/bin/env ion
export RUST_BACKTRACE=full
cd /home/user/acid
cargo test
bash /root/relibc-tests/run.sh
export HOME=/home/root
acid-runner
bash /usr/share/relibc-tests/run.sh
os-test-runner
shutdown
"""

View File

@ -1,11 +0,0 @@
[source]
git = "https://github.com/rust-lang/crates.io-index.git"
shallow_clone = true
[build]
template = "custom"
script = """
dir="${COOKBOOK_STAGE}/home/user/.cargo/registry/index/github.com-1ecc6299db9ec823"
mkdir -pv "${dir}"
cp -rv "${COOKBOOK_SOURCE}/.git" "${dir}"
"""

View File

@ -4,6 +4,6 @@ shallow_clone = true
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}"/home/user/hello-world-examples
cp -rv "${COOKBOOK_SOURCE}"/[#,a-z] "${COOKBOOK_STAGE}"/home/user/hello-world-examples
mkdir -pv "${COOKBOOK_STAGE}"/usr/share/hello-world-examples
cp -rv "${COOKBOOK_SOURCE}"/[#,a-z] "${COOKBOOK_STAGE}"/usr/share/hello-world-examples
"""

View File

@ -31,8 +31,4 @@ COOKBOOK_CMAKE_FLAGS+=(
-DWITH_SYSTEM_ZSTD=ON
)
cookbook_cmake
# for some reason flycast require local dir already set up
mkdir -p ${COOKBOOK_STAGE}/home/user/.local/share/flycast
touch ${COOKBOOK_STAGE}/home/user/.local/share/flycast/.tmp
"""

View File

@ -7,8 +7,8 @@ script = """
DYNAMIC_INIT
cookbook_cargo
mkdir -pv "${COOKBOOK_STAGE}/home/user/cookbook"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/home/user/cookbook"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/cookbook"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/usr/share/cookbook"
"""
[package]

View File

@ -4,6 +4,6 @@ git = "https://github.com/jackpot51/rustconf2025.git"
[build]
template = "custom"
script = """
mkdir -p "${COOKBOOK_STAGE}/home/user"
cp -v "${COOKBOOK_SOURCE}/"*.pdf "${COOKBOOK_STAGE}/home/user"
mkdir -p "${COOKBOOK_STAGE}/usr/share"
cp -v "${COOKBOOK_SOURCE}/"*.pdf "${COOKBOOK_STAGE}/usr/share"
"""

View File

@ -1,21 +1,19 @@
# Due to necessary write permission for compilation the filesystem path of source code installation is an exception
# where the package manager can't switch between system-wide and user paths
[source]
git = "https://gitlab.redox-os.org/redox-os/acid.git"
shallow_clone = true
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}/home/user/acid"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/home/user/acid"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/acid"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/usr/share/acid"
# Create runner script
mkdir -p "${COOKBOOK_STAGE}/usr/bin"
cat > "${COOKBOOK_STAGE}/usr/bin/acid-runner" <<EOF
#!/usr/bin/env bash
#!/usr/bin/ion
set -e
cd /home/user/acid
cargo test
mkdir -p ~/.cache/acid
cargo test --manifest-path /usr/share/acid/Cargo.toml --target-dir ~/.cache/acid
EOF
chmod +x "${COOKBOOK_STAGE}/usr/bin/acid-runner"

View File

@ -1,8 +1,6 @@
# Due to necessary write permission for compilation the filesystem path of source code installation is an exception
# where the package manager can't switch between system-wide and user paths
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}/home/user/hello-redox"
cp -rv "${COOKBOOK_RECIPE}"/files/* "${COOKBOOK_STAGE}/home/user/hello-redox"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/hello-redox"
cp -rv "${COOKBOOK_RECIPE}"/files/* "${COOKBOOK_STAGE}/usr/share/hello-redox"
"""

View File

@ -1,5 +1,3 @@
# Due to necessary write permission for compilation the filesystem path of source code installation is an exception
# where the package manager can't switch between system-wide and user paths
[source]
git = "https://gitlab.redox-os.org/redox-os/openposixtestsuite.git"
branch = "redox"
@ -7,8 +5,8 @@ branch = "redox"
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}/home/user/openposixtestsuite"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/home/user/openposixtestsuite"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/openposixtestsuite"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/usr/share/openposixtestsuite"
"""
[package]

View File

@ -5,8 +5,8 @@ git = "https://gitlab.redox-os.org/redox-os/redox-posix-tests.git"
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}/home/user/redox-posix-tests"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/home/user/redox-posix-tests"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/redox-posix-tests"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/usr/share/redox-posix-tests"
"""
[package]

View File

@ -6,10 +6,10 @@ template = "custom"
script = """
rsync -av --delete "${COOKBOOK_SOURCE}/" ./
make install-tests DESTDIR="${COOKBOOK_STAGE}/home/user" NATIVE_LIBC=1 IS_REDOX=1
make install-tests DESTDIR="${COOKBOOK_STAGE}/usr/share" NATIVE_LIBC=1 IS_REDOX=1
if [ -n "$TESTBIN" ]; then
"${COOKBOOK_REDOXER}" write-exec sh -c "cd /home/user/relibc-tests; make run-once TESTBIN=bins_dynamic/$TESTBIN"
"${COOKBOOK_REDOXER}" write-exec sh -c "cd /usr/share/relibc-tests; make run-once TESTBIN=bins_dynamic/$TESTBIN"
fi
# Create runner script
@ -17,8 +17,8 @@ mkdir -p "${COOKBOOK_STAGE}/usr/bin"
cat > "${COOKBOOK_STAGE}/usr/bin/relibc-tests-runner" <<EOF
#!/usr/bin/env bash
set -e
cd /home/user/relibc-tests
make run IS_REDOX=1
cd /usr/share/relibc-tests
make run IS_REDOX=1 # FIXME use a user writable dir as build dir
EOF
chmod +x "${COOKBOOK_STAGE}/usr/bin/relibc-tests-runner"

View File

@ -1,13 +1,11 @@
# Due to necessary write permission for compilation the filesystem path of source code installation is an exception
# where the package manager can't switch between system-wide and user paths
[source]
same_as = "../../core/relibc"
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}/home/user/relibc-tests"
cp -rv "${COOKBOOK_SOURCE}/tests" "${COOKBOOK_STAGE}/home/user/relibc-tests"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/relibc-tests"
cp -rv "${COOKBOOK_SOURCE}/tests" "${COOKBOOK_STAGE}/usr/share/relibc-tests"
"""
[package]

View File

@ -5,8 +5,8 @@ branch = "prod/testsuite-base"
[build]
template = "custom"
script = """
mkdir -pv "${COOKBOOK_STAGE}/home/user/wasi-testsuite"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/home/user/wasi-testsuite"
mkdir -pv "${COOKBOOK_STAGE}/usr/share/wasi-testsuite"
cp -rv "${COOKBOOK_SOURCE}"/* "${COOKBOOK_STAGE}/usr/share/wasi-testsuite"
"""
[package]