Add local docker-based build support and update documentation #43

Open
RenanGBarreto wants to merge 4 commits from PSBrew/docker-build-support into main
RenanGBarreto commented 2026-05-31 08:39:28 -05:00 (Migrated from github.com)

This PR adds a local docker-based build workflow and aligns documentation with the current build paths.

The problem

Sometimes depevelopers can't easily install the required dependencies in order to use make.

Proposed solution

Adds a build.sh that fetches all necessary files and builds the correct payloads.

Why

  • Provide a reproducible local build path that mirrors CI behavior
  • Reduce developer setup friction
  • Keep build documentation short, clear, and maintainable

What changed

  1. Added a new root-level helper script: build.sh
  2. Added a ## Building section inside README

Result

You can now build locally with:

./build.sh

Additional information

I am working on other pull requests that will be submited soon related to PFS image mount.
If you have a specif way you want me to send the PRs or information, please let me know.

Summary by CodeRabbit

  • Chores

    • Ignore common IDE/editor dirs and a local build artifact path
    • Add a reproducible, Docker-based build workflow with cached build image and optional cache-rebuild; validates environment and verifies produced artifact
  • Documentation

    • New "Building from source" section covering direct make, Docker usage, and CI build steps
  • Bug Fixes

    • Adjusted PFS mount/image defaults to change mounting behavior for affected images
This PR adds a local docker-based build workflow and aligns documentation with the current build paths. ### The problem Sometimes depevelopers can't easily install the required dependencies in order to use make. ### Proposed solution Adds a `build.sh` that fetches all necessary files and builds the correct payloads. #### Why - Provide a reproducible local build path that mirrors CI behavior - Reduce developer setup friction - Keep build documentation short, clear, and maintainable ### What changed 1. Added a new root-level helper script: `build.sh` 2. Added a `## Building` section inside README ### Result You can now build locally with: ```bash ./build.sh ```` ### Additional information I am working on other pull requests that will be submited soon related to PFS image mount. If you have a specif way you want me to send the PRs or information, please let me know. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Ignore common IDE/editor dirs and a local build artifact path * Add a reproducible, Docker-based build workflow with cached build image and optional cache-rebuild; validates environment and verifies produced artifact * **Documentation** * New "Building from source" section covering direct make, Docker usage, and CI build steps * **Bug Fixes** * Adjusted PFS mount/image defaults to change mounting behavior for affected images <!-- end of auto-generated comment: release notes by coderabbit.ai -->
coderabbitai[bot] commented 2026-05-31 08:39:39 -05:00 (Migrated from github.com)

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a Docker-driven build script (build.sh), a "Building from source" README section for direct/Docker/CI builds, .gitignore entries for IDE directories and a local shared-object artifact, and small PFS mount/image-type code adjustments.

Changes

Build System & Documentation

Layer / File(s) Summary
Git ignore updates
.gitignore
Ignores IDE/editor directories and a local shared object build artifact: .idea/, .vscode/, /src/libkernel_sys_ext.so.
Build documentation
README.md
Adds "Building from source" with direct make instructions, Docker-based build steps (including SMP_FORCE_REBUILD_IMAGE), and CI notes referencing .github/workflows/ps5.yml.
build.sh: entrypoint & Docker validation
build.sh
Adds strict shell entrypoint, ROOT_DIR and base image selection, logging/help, and Docker CLI/daemon availability checks; pulls base image if missing.
build.sh: cached build-image creation
build.sh
Derives a sanitized cache tag, supports SMP_FORCE_REBUILD_IMAGE, and builds a cached image that installs build dependencies, creates a build user, clones pacbrew-repo, copies PS5 stubs, and pre-installs SDK/sqlite packages.
build.sh: container build command
build.sh
Defines the container-side build command, validates required PS5 SDK stub file, and runs make clean all with PS5_SCE_STUBS_DIR.
build.sh: run container and validate artifact
build.sh
Runs the container with host UID/GID and repo mount, executes the build, and verifies shadowmountplus.elf was produced on the host.
PFS mount defaults update
include/sm_mount_defs.h
Updates default mkeymode comment and switches PFS mount macros to DEVPFS_BUDGET_SYSTEM and DEVPFS_MKEYMODE_GD.
LVD image type change for PFS
src/sm_image.c
Changes IMAGE_FS_PFS branch to return LVD_ATTACH_IMAGE_TYPE_SINGLE for LVD attach calls.

Sequence Diagram

sequenceDiagram
  participant Host
  participant DockerDaemon
  participant BuildImage
  participant BuildContainer
  participant Make
  participant HostFS

  Host->>DockerDaemon: docker pull $SMP_DOCKER_IMAGE
  DockerDaemon->>BuildImage: build or reuse smp-build-cache:<tag>
  Host->>DockerDaemon: docker run --user UID:GID -v repo:/workspace smp-build-cache:<tag>
  DockerDaemon->>BuildContainer: start container with mounted /workspace
  BuildContainer->>Make: run `make clean all` with PS5_SCE_STUBS_DIR
  Make->>HostFS: write shadowmountplus.elf to mounted workspace
  BuildContainer->>Host: exit and expose artifact path

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hopped into a Docker shell so deep,
Made images cached before I sleep,
Docs and ignores tucked out of sight,
make hums softly through the night,
An ELF appears — my tiny build delight.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: adding Docker-based build support (build.sh script) and updating documentation (README.md with build instructions). It matches the core changeset focus.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch docker-build-support

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Infer (1.2.0)
src/sm_image.c

src/sm_image.c:1:10: fatal error: 'sm_platform.h' file not found
1 | #include "sm_platform.h"
| ^~~~~~~~~~~~~~~
1 error generated.
Error: the following clang command did not run successfully:
/opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/bin/clang-18
@/tmp/coderabbit-infer/4ec1392edfa27dbe660ee0082eb749f81868dad6-8cba3e8232027899/tmp/clang_command_.tmp.d8b6ba.txt
++Contents of '/tmp/coderabbit-infer/4ec1392edfa27dbe660ee0082eb749f81868dad6-8cba3e8232027899/tmp/clang_command_.tmp.d8b6ba.txt':
"-cc1" "-load"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib"
"-add-plugin" "BiniouASTExporter" "-plugin-arg-BiniouASTExporter" "-"
"-plugin-arg-BiniouASTExporter" "PREPEND_CURRENT_DIR=1"
"-plugin-arg-BiniouASTExporter" "MAX_STRING_SIZE=65535" "-cc1" "-triple"
"x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free"
"-clea

... [truncated 682 characters] ...

"/opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/lib/clang/18/include"
"-internal-isystem" "/usr/local/include" "-internal-isystem"
"/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include"
"-internal-externc-isystem" "/usr/include/x86_64-linux-gnu"
"-internal-externc-isystem" "/include" "-internal-externc-isystem"
"/usr/include" "-Wno-ignored-optimization-argument" "-Wno-everything"
"-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf"
"-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o"
"/tmp/coderabbit-infer/8cba3e8232027899/file.o" "-x" "c" "src/sm_image.c"
"-O0" "-fno-builtin" "-include"
"/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../lib/clang_wrappers/global_defines.h"
"-Wno-everything"


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/drakmor/ShadowMountPlus/pull/43?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough Adds a Docker-driven build script (build.sh), a "Building from source" README section for direct/Docker/CI builds, .gitignore entries for IDE directories and a local shared-object artifact, and small PFS mount/image-type code adjustments. ## Changes **Build System & Documentation** |Layer / File(s)|Summary| |---|---| |**Git ignore updates** <br> `.gitignore`|Ignores IDE/editor directories and a local shared object build artifact: `.idea/`, `.vscode/`, `/src/libkernel_sys_ext.so`.| |**Build documentation** <br> `README.md`|Adds "Building from source" with direct `make` instructions, Docker-based build steps (including `SMP_FORCE_REBUILD_IMAGE`), and CI notes referencing `.github/workflows/ps5.yml`.| |**build.sh: entrypoint & Docker validation** <br> `build.sh`|Adds strict shell entrypoint, ROOT_DIR and base image selection, logging/help, and Docker CLI/daemon availability checks; pulls base image if missing.| |**build.sh: cached build-image creation** <br> `build.sh`|Derives a sanitized cache tag, supports `SMP_FORCE_REBUILD_IMAGE`, and builds a cached image that installs build dependencies, creates a build user, clones `pacbrew-repo`, copies PS5 stubs, and pre-installs SDK/sqlite packages.| |**build.sh: container build command** <br> `build.sh`|Defines the container-side build command, validates required PS5 SDK stub file, and runs `make clean all` with `PS5_SCE_STUBS_DIR`.| |**build.sh: run container and validate artifact** <br> `build.sh`|Runs the container with host UID/GID and repo mount, executes the build, and verifies `shadowmountplus.elf` was produced on the host.| |**PFS mount defaults update** <br> `include/sm_mount_defs.h`|Updates default `mkeymode` comment and switches PFS mount macros to `DEVPFS_BUDGET_SYSTEM` and `DEVPFS_MKEYMODE_GD`.| |**LVD image type change for PFS** <br> `src/sm_image.c`|Changes IMAGE_FS_PFS branch to return `LVD_ATTACH_IMAGE_TYPE_SINGLE` for LVD attach calls.| ## Sequence Diagram ```mermaid sequenceDiagram participant Host participant DockerDaemon participant BuildImage participant BuildContainer participant Make participant HostFS Host->>DockerDaemon: docker pull $SMP_DOCKER_IMAGE DockerDaemon->>BuildImage: build or reuse smp-build-cache:<tag> Host->>DockerDaemon: docker run --user UID:GID -v repo:/workspace smp-build-cache:<tag> DockerDaemon->>BuildContainer: start container with mounted /workspace BuildContainer->>Make: run `make clean all` with PS5_SCE_STUBS_DIR Make->>HostFS: write shadowmountplus.elf to mounted workspace BuildContainer->>Host: exit and expose artifact path ``` ## Estimated code review effort 🎯 3 (Moderate) | ⏱️ ~20 minutes ## Poem > 🐰 I hopped into a Docker shell so deep, > Made images cached before I sleep, > Docs and ignores tucked out of sight, > `make` hums softly through the night, > An ELF appears — my tiny build delight. </details> <!-- walkthrough_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 4 | ❌ 1</summary> ### ❌ Failed checks (1 warning) | Check name | Status | Explanation | Resolution | | :----------------: | :--------- | :------------------------------------------------------------------------------------ | :--------------------------------------------------------------------------------- | | Docstring Coverage | ⚠️ Warning | Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary>✅ Passed checks (4 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title accurately describes the main changes: adding Docker-based build support (build.sh script) and updating documentation (README.md with build instructions). It matches the core changeset focus. | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | </details> <sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- finishing_touch_checkbox_start --> <details> <summary>✨ Finishing Touches</summary> <details> <summary>🧪 Generate unit tests (beta)</summary> - [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests </details> <details open> <summary>⚔️ Resolve merge conflicts</summary> - [ ] <!-- {"checkboxId": "c3a5b2e1-4d7f-4a8c-b9d6-e1f2c3d4a5b6"} --> Resolve merge conflict in branch `docker-build-support` </details> </details> <!-- finishing_touch_checkbox_end --> <!-- This is an auto-generated comment: all tool run failures by coderabbit.ai --> > [!WARNING] > There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. > > <details> > <summary>🔧 Infer (1.2.0)</summary> > > <details> > <summary>src/sm_image.c</summary> > > src/sm_image.c:1:10: fatal error: 'sm_platform.h' file not found > 1 | `#include` "sm_platform.h" > | ^~~~~~~~~~~~~~~ > 1 error generated. > Error: the following clang command did not run successfully: > /opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/bin/clang-18 > `@/tmp/coderabbit-infer/4ec1392edfa27dbe660ee0082eb749f81868dad6-8cba3e8232027899/tmp/clang_command_.tmp.d8b6ba.txt` > ++Contents of '/tmp/coderabbit-infer/4ec1392edfa27dbe660ee0082eb749f81868dad6-8cba3e8232027899/tmp/clang_command_.tmp.d8b6ba.txt': > "-cc1" "-load" > "/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../../facebook-clang-plugins/libtooling/build/FacebookClangPlugin.dylib" > "-add-plugin" "BiniouASTExporter" "-plugin-arg-BiniouASTExporter" "-" > "-plugin-arg-BiniouASTExporter" "PREPEND_CURRENT_DIR=1" > "-plugin-arg-BiniouASTExporter" "MAX_STRING_SIZE=65535" "-cc1" "-triple" > "x86_64-unknown-linux-gnu" "-emit-obj" "-mrelax-all" "-disable-free" > "-clea > > ... [truncated 682 characters] ... > > "/opt/infer-linux-x86_64-v1.2.0/lib/infer/facebook-clang-plugins/clang/install/lib/clang/18/include" > "-internal-isystem" "/usr/local/include" "-internal-isystem" > "/usr/lib/gcc/x86_64-linux-gnu/12/../../../../x86_64-linux-gnu/include" > "-internal-externc-isystem" "/usr/include/x86_64-linux-gnu" > "-internal-externc-isystem" "/include" "-internal-externc-isystem" > "/usr/include" "-Wno-ignored-optimization-argument" "-Wno-everything" > "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" > "-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" > "/tmp/coderabbit-infer/8cba3e8232027899/file.o" "-x" "c" "src/sm_image.c" > "-O0" "-fno-builtin" "-include" > "/opt/infer-linux-x86_64-v1.2.0/lib/infer/infer/bin/../lib/clang_wrappers/global_defines.h" > "-Wno-everything" > > </details> > > </details> <!-- end of auto-generated comment: all tool run failures by coderabbit.ai --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=drakmor/ShadowMountPlus&utm_content=43)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end --> <!-- internal state start --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CAyXFQgLKEHOTjCEBYGtihyEYAbKBsDaCABJAIkHiHqBigLaRIJWsuM3R1sZq9beEHNxhCFMYQE3eYgpxXGQ9TudlU8ZPRhC2UxqeIU8Vpkmq3dNa9lAwC33Z5C8hYovcXnlX56PxOKFFexLGG6KS8aAkvPYMRS0qPirAsougD4FwBvAw4yvTWLgABACYDKMIHCaRL4rkSmJVE/JsRI4rFcG8TQkICJP66hwao1QGiTkDokNDqwNAP5tq31ZM9VAYAHsJTzAA4w9qDoGIHCBIBogJxV3cHjZRKZQhOqo3KAJJIhoyTcM8kjAHz3oD6AgAA= --> <!-- internal state end -->
coderabbitai[bot] (Migrated from github.com) reviewed 2026-05-31 08:43:50 -05:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.gitignore:
- Around line 11-12: The .gitignore currently ignores /pacbrew-repo/ and
/src/libkernel_sys_ext.so but not the SDK checkout; update the .gitignore to
also ignore the PS5 SDK checkout directory by adding an entry for ps5-sdk/
(e.g., ps5-sdk/ or /ps5-sdk/) so the directory created by build.sh (ps5-sdk) is
treated as untracked and not shown after Docker builds.

In `@build.sh`:
- Around line 80-93: The cloned /workspace/pacbrew-repo and /workspace/ps5-sdk
are created as root but makepkg is executed under su - "$BUILDER_USER", causing
permission errors; fix by ensuring the repo directories are owned by
BUILDER_USER before running makepkg (either chown -R
"$BUILDER_USER":"$BUILDER_USER" /workspace/pacbrew-repo and /workspace/ps5-sdk
after each clone, or perform the git clone as the BUILDER_USER), so that su -
"$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sdk && makepkg ...' and the
subsequent makepkg in /workspace/pacbrew-repo/sqlite can write build artifacts
successfully.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3c7feb30-99c8-4c88-a2c1-691dac273af0

📥 Commits

Reviewing files that changed from the base of the PR and between e0b41b3ca6 and cc4d33dd7d.

📒 Files selected for processing (3)
  • .gitignore
  • README.md
  • build.sh
**Actionable comments posted: 2** <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In @.gitignore: - Around line 11-12: The .gitignore currently ignores /pacbrew-repo/ and /src/libkernel_sys_ext.so but not the SDK checkout; update the .gitignore to also ignore the PS5 SDK checkout directory by adding an entry for ps5-sdk/ (e.g., ps5-sdk/ or /ps5-sdk/) so the directory created by build.sh (ps5-sdk) is treated as untracked and not shown after Docker builds. In `@build.sh`: - Around line 80-93: The cloned /workspace/pacbrew-repo and /workspace/ps5-sdk are created as root but makepkg is executed under su - "$BUILDER_USER", causing permission errors; fix by ensuring the repo directories are owned by BUILDER_USER before running makepkg (either chown -R "$BUILDER_USER":"$BUILDER_USER" /workspace/pacbrew-repo and /workspace/ps5-sdk after each clone, or perform the git clone as the BUILDER_USER), so that su - "$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sdk && makepkg ...' and the subsequent makepkg in /workspace/pacbrew-repo/sqlite can write build artifacts successfully. ``` </details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro Plus **Run ID**: `3c7feb30-99c8-4c88-a2c1-691dac273af0` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between e0b41b3ca6b6a07eacf00ba14c85a5fa3d81d0da and cc4d33dd7da3871bcc6855db0e76b52236c6a4b3. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `.gitignore` * `README.md` * `build.sh` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
@ -6,3 +6,6 @@ notify.txt
src/notify_icon_asset.c
coderabbitai[bot] (Migrated from github.com) commented 2026-05-31 08:43:50 -05:00

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Also ignore the ps5-sdk/ checkout directory.

build.sh clones the SDK into /workspace/ps5-sdk (repo root) via git clone ... /workspace/ps5-sdk, but only /pacbrew-repo/ is excluded here. After a Docker build, ps5-sdk/ will show up as untracked.

Proposed fix
 /pacbrew-repo/
+/ps5-sdk/
 /src/libkernel_sys_ext.so
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

/pacbrew-repo/
/ps5-sdk/
/src/libkernel_sys_ext.so
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitignore around lines 11 - 12, The .gitignore currently ignores
/pacbrew-repo/ and /src/libkernel_sys_ext.so but not the SDK checkout; update
the .gitignore to also ignore the PS5 SDK checkout directory by adding an entry
for ps5-sdk/ (e.g., ps5-sdk/ or /ps5-sdk/) so the directory created by build.sh
(ps5-sdk) is treated as untracked and not shown after Docker builds.

✅ Confirmed as addressed by @RenanGBarreto

_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Also ignore the `ps5-sdk/` checkout directory.** `build.sh` clones the SDK into `/workspace/ps5-sdk` (repo root) via `git clone ... /workspace/ps5-sdk`, but only `/pacbrew-repo/` is excluded here. After a Docker build, `ps5-sdk/` will show up as untracked. <details> <summary>Proposed fix</summary> ```diff /pacbrew-repo/ +/ps5-sdk/ /src/libkernel_sys_ext.so ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion /pacbrew-repo/ /ps5-sdk/ /src/libkernel_sys_ext.so ``` </details> <!-- suggestion_end --> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.gitignore around lines 11 - 12, The .gitignore currently ignores /pacbrew-repo/ and /src/libkernel_sys_ext.so but not the SDK checkout; update the .gitignore to also ignore the PS5 SDK checkout directory by adding an entry for ps5-sdk/ (e.g., ps5-sdk/ or /ps5-sdk/) so the directory created by build.sh (ps5-sdk) is treated as untracked and not shown after Docker builds. ``` </details> <!-- fingerprinting:phantom:poseidon:capybara --> <!-- This is an auto-generated reply by CodeRabbit --> ✅ Confirmed as addressed by @RenanGBarreto <!-- This is an auto-generated comment by CodeRabbit -->
@ -0,0 +1,136 @@
#!/bin/bash
coderabbitai[bot] (Migrated from github.com) commented 2026-05-31 08:43:50 -05:00

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -nP -C5 '(makepkg|useradd|chown|pacman\s+.*-U)' .github/workflows/ps5.yml

Repository: drakmor/ShadowMountPlus

Length of output: 900


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect build.sh around the referenced lines
if [ -f build.sh ]; then
  nl -ba build.sh | sed -n '60,120p'
fi

# Inspect the CI workflow for context: container/user/sudo usage
if [ -f .github/workflows/ps5.yml ]; then
  nl -ba .github/workflows/ps5.yml | sed -n '1,200p'
fi

# Find where build.sh is invoked (if at all)
rg -n "build\.sh" -S .github/workflows || true

Repository: drakmor/ShadowMountPlus

Length of output: 110


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== build.sh (lines 70-110) ==="
if [ -f build.sh ]; then
  sed -n '70,110p' build.sh | cat -n
fi

echo
echo "=== build.sh (first 120 lines for context) ==="
if [ -f build.sh ]; then
  sed -n '1,120p' build.sh | cat -n
fi

echo
echo "=== .github/workflows/ps5.yml (entire file) ==="
if [ -f .github/workflows/ps5.yml ]; then
  sed -n '1,200p' .github/workflows/ps5.yml | cat -n
fi

echo
echo "=== find occurrences of build.sh invocation in workflows ==="
rg -n "build\.sh" .github/workflows || true

Repository: drakmor/ShadowMountPlus

Length of output: 10032


Fix build.sh Docker path: makepkg runs as smpbuilder but the cloned /workspace/pacbrew-repo is created as root

build.sh clones /workspace/pacbrew-repo as root, then runs makepkg under su - "$BUILDER_USER" (i.e., smpbuilder) without chowning /workspace/pacbrew-repo, so makepkg’s build directories under /workspace/pacbrew-repo/sdk and /workspace/pacbrew-repo/sqlite are likely non-writable and can break the build. (CI .github/workflows/ps5.yml doesn’t use build.sh; it runs makepkg directly as the runner user.)

Proposed fix
 if [ ! -d /workspace/ps5-sdk/.git ]; then
   rm -rf /workspace/ps5-sdk
   git clone --depth 1 https://github.com/ps5-payload-dev/sdk /workspace/ps5-sdk
 fi
+
+chown -R "$BUILDER_USER:$BUILDER_USER" /workspace/pacbrew-repo
 
 su - "$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sdk && makepkg -c -f'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

if [ ! -d /workspace/pacbrew-repo/.git ]; then
  rm -rf /workspace/pacbrew-repo
  git clone --depth 1 https://github.com/ps5-payload-dev/pacbrew-repo /workspace/pacbrew-repo
fi
if [ ! -d /workspace/ps5-sdk/.git ]; then
  rm -rf /workspace/ps5-sdk
  git clone --depth 1 https://github.com/ps5-payload-dev/sdk /workspace/ps5-sdk
fi

chown -R "$BUILDER_USER:$BUILDER_USER" /workspace/pacbrew-repo

su - "$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sdk && makepkg -c -f'
pacman --noconfirm -U /workspace/pacbrew-repo/sdk/ps5-payload-*.pkg.tar.gz

su - "$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sqlite && makepkg -c -f'
pacman --noconfirm -U /workspace/pacbrew-repo/sqlite/ps5-payload-*.pkg.tar.gz
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@build.sh` around lines 80 - 93, The cloned /workspace/pacbrew-repo and
/workspace/ps5-sdk are created as root but makepkg is executed under su -
"$BUILDER_USER", causing permission errors; fix by ensuring the repo directories
are owned by BUILDER_USER before running makepkg (either chown -R
"$BUILDER_USER":"$BUILDER_USER" /workspace/pacbrew-repo and /workspace/ps5-sdk
after each clone, or perform the git clone as the BUILDER_USER), so that su -
"$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sdk && makepkg ...' and the
subsequent makepkg in /workspace/pacbrew-repo/sqlite can write build artifacts
successfully.

✅ Confirmed as addressed by @RenanGBarreto

_⚠️ Potential issue_ | _🟠 Major_ | _🏗️ Heavy lift_ <details> <summary>🧩 Analysis chain</summary> 🏁 Script executed: ```shell #!/bin/bash rg -nP -C5 '(makepkg|useradd|chown|pacman\s+.*-U)' .github/workflows/ps5.yml ``` Repository: drakmor/ShadowMountPlus Length of output: 900 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail # Inspect build.sh around the referenced lines if [ -f build.sh ]; then nl -ba build.sh | sed -n '60,120p' fi # Inspect the CI workflow for context: container/user/sudo usage if [ -f .github/workflows/ps5.yml ]; then nl -ba .github/workflows/ps5.yml | sed -n '1,200p' fi # Find where build.sh is invoked (if at all) rg -n "build\.sh" -S .github/workflows || true ``` Repository: drakmor/ShadowMountPlus Length of output: 110 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== build.sh (lines 70-110) ===" if [ -f build.sh ]; then sed -n '70,110p' build.sh | cat -n fi echo echo "=== build.sh (first 120 lines for context) ===" if [ -f build.sh ]; then sed -n '1,120p' build.sh | cat -n fi echo echo "=== .github/workflows/ps5.yml (entire file) ===" if [ -f .github/workflows/ps5.yml ]; then sed -n '1,200p' .github/workflows/ps5.yml | cat -n fi echo echo "=== find occurrences of build.sh invocation in workflows ===" rg -n "build\.sh" .github/workflows || true ``` Repository: drakmor/ShadowMountPlus Length of output: 10032 --- </details> **Fix `build.sh` Docker path: `makepkg` runs as `smpbuilder` but the cloned `/workspace/pacbrew-repo` is created as root** `build.sh` clones `/workspace/pacbrew-repo` as root, then runs `makepkg` under `su - "$BUILDER_USER"` (i.e., `smpbuilder`) without chowning `/workspace/pacbrew-repo`, so `makepkg`’s build directories under `/workspace/pacbrew-repo/sdk` and `/workspace/pacbrew-repo/sqlite` are likely non-writable and can break the build. (CI `.github/workflows/ps5.yml` doesn’t use `build.sh`; it runs `makepkg` directly as the runner user.) <details> <summary>Proposed fix</summary> ```diff if [ ! -d /workspace/ps5-sdk/.git ]; then rm -rf /workspace/ps5-sdk git clone --depth 1 https://github.com/ps5-payload-dev/sdk /workspace/ps5-sdk fi + +chown -R "$BUILDER_USER:$BUILDER_USER" /workspace/pacbrew-repo su - "$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sdk && makepkg -c -f' ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion if [ ! -d /workspace/pacbrew-repo/.git ]; then rm -rf /workspace/pacbrew-repo git clone --depth 1 https://github.com/ps5-payload-dev/pacbrew-repo /workspace/pacbrew-repo fi if [ ! -d /workspace/ps5-sdk/.git ]; then rm -rf /workspace/ps5-sdk git clone --depth 1 https://github.com/ps5-payload-dev/sdk /workspace/ps5-sdk fi chown -R "$BUILDER_USER:$BUILDER_USER" /workspace/pacbrew-repo su - "$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sdk && makepkg -c -f' pacman --noconfirm -U /workspace/pacbrew-repo/sdk/ps5-payload-*.pkg.tar.gz su - "$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sqlite && makepkg -c -f' pacman --noconfirm -U /workspace/pacbrew-repo/sqlite/ps5-payload-*.pkg.tar.gz ``` </details> <!-- suggestion_end --> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build.sh` around lines 80 - 93, The cloned /workspace/pacbrew-repo and /workspace/ps5-sdk are created as root but makepkg is executed under su - "$BUILDER_USER", causing permission errors; fix by ensuring the repo directories are owned by BUILDER_USER before running makepkg (either chown -R "$BUILDER_USER":"$BUILDER_USER" /workspace/pacbrew-repo and /workspace/ps5-sdk after each clone, or perform the git clone as the BUILDER_USER), so that su - "$BUILDER_USER" -c 'cd /workspace/pacbrew-repo/sdk && makepkg ...' and the subsequent makepkg in /workspace/pacbrew-repo/sqlite can write build artifacts successfully. ``` </details> <!-- fingerprinting:phantom:poseidon:capybara --> <!-- This is an auto-generated reply by CodeRabbit --> ✅ Confirmed as addressed by @RenanGBarreto <!-- This is an auto-generated comment by CodeRabbit -->
RenanGBarreto (Migrated from github.com) reviewed 2026-05-31 10:05:58 -05:00
@ -0,0 +1,136 @@
#!/bin/bash
RenanGBarreto (Migrated from github.com) commented 2026-05-31 10:05:58 -05:00

Solved

Solved
coderabbitai[bot] (Migrated from github.com) reviewed 2026-05-31 10:06:21 -05:00
@ -0,0 +1,136 @@
#!/bin/bash
coderabbitai[bot] (Migrated from github.com) commented 2026-05-31 10:06:20 -05:00

@RenanGBarreto, thanks for the fix! The chown before makepkg ensures smpbuilder has write access to the cloned directories.

(ˆ•ω•ˆ) 🐇


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

`@RenanGBarreto`, thanks for the fix! The `chown` before `makepkg` ensures `smpbuilder` has write access to the cloned directories. (ˆ•ω•ˆ) 🐇 <!-- <review_comment_addressed> --> --- <!-- This is an auto-generated comment: tweet message by coderabbit.ai --> If you found this review helpful, would you consider giving us a shout-out on [X](https://twitter.com/intent/tweet?related=CodeRabbitAI&text=Found%20Docker%20CI%20bug%3A%20repo%20cloned%20as%20root%20while%20makepkg%20runs%20as%20smpbuilder%20%E2%80%94%20build%20dirs%20unwritable.%20Add%20chown%20to%20BUILDER_USER%20before%20makepkg%20to%20fix%20CI%20reliability.%20Try%20%40coderabbitai%20%F0%9F%94%8D%F0%9F%9A%80&url=https%3A%2F%2Fgithub.com%2Fdrakmor%2FShadowMountPlus%2Fpull%2F43%23discussion_r3330299354)? Thank you for using CodeRabbit! <!-- end of auto-generated comment: tweet message by coderabbit.ai --> <!-- This is an auto-generated reply by CodeRabbit -->
RenanGBarreto (Migrated from github.com) reviewed 2026-05-31 10:06:26 -05:00
@ -6,3 +6,6 @@ notify.txt
src/notify_icon_asset.c
RenanGBarreto (Migrated from github.com) commented 2026-05-31 10:06:26 -05:00

Solved by moving the sdk to be hidden inside the docker image and not n the workspace.

Solved by moving the sdk to be hidden inside the docker image and not n the workspace.
coderabbitai[bot] (Migrated from github.com) reviewed 2026-05-31 10:06:51 -05:00
@ -6,3 +6,6 @@ notify.txt
src/notify_icon_asset.c
coderabbitai[bot] (Migrated from github.com) commented 2026-05-31 10:06:51 -05:00

@RenanGBarreto, that's a cleaner solution — keeping the SDK entirely inside the Docker image avoids polluting the workspace directory and eliminates the need for the .gitignore entry altogether. Thanks for the update!

`@RenanGBarreto`, that's a cleaner solution — keeping the SDK entirely inside the Docker image avoids polluting the workspace directory and eliminates the need for the `.gitignore` entry altogether. Thanks for the update! <!-- <review_comment_addressed> --> <!-- This is an auto-generated reply by CodeRabbit -->
coderabbitai[bot] (Migrated from github.com) reviewed 2026-05-31 10:11:07 -05:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 2

🧹 Nitpick comments (2)
README.md (1)

340-344: 💤 Low value

Add a language to the fenced code block.

The example block on Line 342 has no language hint (markdownlint MD040). Use bash for consistency with the other examples in this section.

📝 Proposed fix
 **Optional:**
 - `SMP_FORCE_REBUILD_IMAGE=1` to rebuild the cached Docker image before building  
-  ```
+  ```bash
     SMP_FORCE_REBUILD_IMAGE=1 ./build.sh
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @README.md around lines 340 - 344, The fenced code block showing the example
"SMP_FORCE_REBUILD_IMAGE=1 ./build.sh" is missing a language hint; update that
code fence to use bash by changing the opening fence from tobash so the
block becomes bash\nSMP_FORCE_REBUILD_IMAGE=1 ./build.sh\n (ensure
spacing/indentation matches surrounding examples).


</details>

</blockquote></details>
<details>
<summary>build.sh (1)</summary><blockquote>

`89-91`: _⚖️ Poor tradeoff_

**Pin SDK/SQLite sources for reproducibility.**

`--depth 1` clones track the moving default branch, so the cached image content varies over time and across rebuilds — at odds with the PR's reproducible-build goal. Consider pinning to a tag or commit SHA (e.g., `git clone --depth 1 --branch <tag> ...` or clone + `git checkout <sha>`).

<details>
<summary>🤖 Prompt for AI Agents</summary>

```
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@build.sh` around lines 89 - 91, The three RUN git clone lines (cloning
pacbrew-repo and sdk with --depth 1) should be made reproducible by pinning to a
specific tag or commit: replace the shallow moving-branch clones with either git
clone --depth 1 --branch <tag-or-release> ... or keep the clone and immediately
run git checkout <commit-sha> (and optionally git reset --hard) for both
https://github.com/ps5-payload-dev/pacbrew-repo and
https://github.com/ps5-payload-dev/sdk; keep the subsequent chown -R
smpbuilder:smpbuilder /opt/pacbrew-repo /opt/ps5-sdk as-is. Ensure the chosen
tags or SHAs are inserted into the appropriate RUN lines so rebuilds are
deterministic.
```

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @build.sh:

  • Around line 83-97: The FORCE rebuild logic currently calls docker build for
    LOCAL_BUILD_IMAGE but reuses cache so cloned SDK/sqlite layers aren't refreshed;
    modify the branch where FORCE_REBUILD_IMAGE (or SMP_FORCE_REBUILD_IMAGE) is true
    so the docker build invocation for LOCAL_BUILD_IMAGE adds the --no-cache flag
    (only when the force condition is set) to ensure all layers (the RUN git clone /
    makepkg steps) are rebuilt and fresh sources are fetched.
  • Around line 104-119: The build script sets
    PS5_SCE_STUBS_DIR="/opt/ps5-sdk/sce_stubs" inside BUILD_CMD and then runs "make
    clean all", but the Makefile requires $(PS5_SCE_STUBS_DIR)/libkernel_sys.c; add
    a pre-flight check or stub population step inside BUILD_CMD (before invoking
    make clean all) to either generate/populate the sce_stubs (using the upstream
    stubs generator or copying populated stubs into /opt/ps5-sdk/sce_stubs) or fail
    fast with a clear error if /opt/ps5-sdk/sce_stubs/libkernel_sys.c is missing;
    update BUILD_CMD (and/or the Docker image build) so that PS5_SCE_STUBS_DIR
    points to a directory that contains libkernel_sys.c before running make.

Nitpick comments:
In @build.sh:

  • Around line 89-91: The three RUN git clone lines (cloning pacbrew-repo and sdk
    with --depth 1) should be made reproducible by pinning to a specific tag or
    commit: replace the shallow moving-branch clones with either git clone --depth 1
    --branch ... or keep the clone and immediately run git checkout
    (and optionally git reset --hard) for both
    https://github.com/ps5-payload-dev/pacbrew-repo and
    https://github.com/ps5-payload-dev/sdk; keep the subsequent chown -R
    smpbuilder:smpbuilder /opt/pacbrew-repo /opt/ps5-sdk as-is. Ensure the chosen
    tags or SHAs are inserted into the appropriate RUN lines so rebuilds are
    deterministic.

In @README.md:

  • Around line 340-344: The fenced code block showing the example
    "SMP_FORCE_REBUILD_IMAGE=1 ./build.sh" is missing a language hint; update that
    code fence to use bash by changing the opening fence from tobash so the
    block becomes bash\nSMP_FORCE_REBUILD_IMAGE=1 ./build.sh\n (ensure
    spacing/indentation matches surrounding examples).

</details>

<details>
<summary>🪄 Autofix (Beta)</summary>

Fix all unresolved CodeRabbit comments on this PR:

- [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended)
- [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: defaults

**Review profile**: CHILL

**Plan**: Pro Plus

**Run ID**: `aee88ed0-297b-4fb7-bb5c-0f67165f1106`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between cc4d33dd7da3871bcc6855db0e76b52236c6a4b3 and c5572165a239c39b9a2fadb6e62d5834b19105f3.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `.gitignore`
* `README.md`
* `build.sh`

</details>

<details>
<summary>💤 Files with no reviewable changes (1)</summary>

* .gitignore

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
**Actionable comments posted: 2** <details> <summary>🧹 Nitpick comments (2)</summary><blockquote> <details> <summary>README.md (1)</summary><blockquote> `340-344`: _💤 Low value_ **Add a language to the fenced code block.** The example block on Line 342 has no language hint (markdownlint MD040). Use `bash` for consistency with the other examples in this section. <details> <summary>📝 Proposed fix</summary> ```diff **Optional:** - `SMP_FORCE_REBUILD_IMAGE=1` to rebuild the cached Docker image before building - ``` + ```bash SMP_FORCE_REBUILD_IMAGE=1 ./build.sh ``` ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ```` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@README.md` around lines 340 - 344, The fenced code block showing the example "SMP_FORCE_REBUILD_IMAGE=1 ./build.sh" is missing a language hint; update that code fence to use bash by changing the opening fence from ``` to ```bash so the block becomes ```bash\nSMP_FORCE_REBUILD_IMAGE=1 ./build.sh\n``` (ensure spacing/indentation matches surrounding examples). ```` </details> </blockquote></details> <details> <summary>build.sh (1)</summary><blockquote> `89-91`: _⚖️ Poor tradeoff_ **Pin SDK/SQLite sources for reproducibility.** `--depth 1` clones track the moving default branch, so the cached image content varies over time and across rebuilds — at odds with the PR's reproducible-build goal. Consider pinning to a tag or commit SHA (e.g., `git clone --depth 1 --branch <tag> ...` or clone + `git checkout <sha>`). <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build.sh` around lines 89 - 91, The three RUN git clone lines (cloning pacbrew-repo and sdk with --depth 1) should be made reproducible by pinning to a specific tag or commit: replace the shallow moving-branch clones with either git clone --depth 1 --branch <tag-or-release> ... or keep the clone and immediately run git checkout <commit-sha> (and optionally git reset --hard) for both https://github.com/ps5-payload-dev/pacbrew-repo and https://github.com/ps5-payload-dev/sdk; keep the subsequent chown -R smpbuilder:smpbuilder /opt/pacbrew-repo /opt/ps5-sdk as-is. Ensure the chosen tags or SHAs are inserted into the appropriate RUN lines so rebuilds are deterministic. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ```` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In `@build.sh`: - Around line 83-97: The FORCE rebuild logic currently calls docker build for LOCAL_BUILD_IMAGE but reuses cache so cloned SDK/sqlite layers aren't refreshed; modify the branch where FORCE_REBUILD_IMAGE (or SMP_FORCE_REBUILD_IMAGE) is true so the docker build invocation for LOCAL_BUILD_IMAGE adds the --no-cache flag (only when the force condition is set) to ensure all layers (the RUN git clone / makepkg steps) are rebuilt and fresh sources are fetched. - Around line 104-119: The build script sets PS5_SCE_STUBS_DIR="/opt/ps5-sdk/sce_stubs" inside BUILD_CMD and then runs "make clean all", but the Makefile requires $(PS5_SCE_STUBS_DIR)/libkernel_sys.c; add a pre-flight check or stub population step inside BUILD_CMD (before invoking make clean all) to either generate/populate the sce_stubs (using the upstream stubs generator or copying populated stubs into /opt/ps5-sdk/sce_stubs) or fail fast with a clear error if /opt/ps5-sdk/sce_stubs/libkernel_sys.c is missing; update BUILD_CMD (and/or the Docker image build) so that PS5_SCE_STUBS_DIR points to a directory that contains libkernel_sys.c before running make. --- Nitpick comments: In `@build.sh`: - Around line 89-91: The three RUN git clone lines (cloning pacbrew-repo and sdk with --depth 1) should be made reproducible by pinning to a specific tag or commit: replace the shallow moving-branch clones with either git clone --depth 1 --branch <tag-or-release> ... or keep the clone and immediately run git checkout <commit-sha> (and optionally git reset --hard) for both https://github.com/ps5-payload-dev/pacbrew-repo and https://github.com/ps5-payload-dev/sdk; keep the subsequent chown -R smpbuilder:smpbuilder /opt/pacbrew-repo /opt/ps5-sdk as-is. Ensure the chosen tags or SHAs are inserted into the appropriate RUN lines so rebuilds are deterministic. In `@README.md`: - Around line 340-344: The fenced code block showing the example "SMP_FORCE_REBUILD_IMAGE=1 ./build.sh" is missing a language hint; update that code fence to use bash by changing the opening fence from ``` to ```bash so the block becomes ```bash\nSMP_FORCE_REBUILD_IMAGE=1 ./build.sh\n``` (ensure spacing/indentation matches surrounding examples). ```` </details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro Plus **Run ID**: `aee88ed0-297b-4fb7-bb5c-0f67165f1106` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between cc4d33dd7da3871bcc6855db0e76b52236c6a4b3 and c5572165a239c39b9a2fadb6e62d5834b19105f3. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `.gitignore` * `README.md` * `build.sh` </details> <details> <summary>💤 Files with no reviewable changes (1)</summary> * .gitignore </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
@ -0,0 +99,4 @@
RUN pacman --noconfirm -U /opt/pacbrew-repo/sdk/ps5-payload-*.pkg.tar.gz
RUN su - smpbuilder -c 'cd /opt/pacbrew-repo/sqlite && makepkg -c -f'
RUN pacman --noconfirm -U /opt/pacbrew-repo/sqlite/ps5-payload-*.pkg.tar.gz
EOF
coderabbitai[bot] (Migrated from github.com) commented 2026-05-31 10:11:06 -05:00

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

SMP_FORCE_REBUILD_IMAGE=1 won't actually rebuild the cached layers.

When forcing a rebuild you re-run docker build with an identical Dockerfile and the same base image, so Docker reuses the cached layers for the git clone and makepkg steps. The result is that fresh SDK/SQLite sources are never fetched, which defeats the documented purpose of the flag. Pass --no-cache when force-rebuilding.

🔧 Proposed fix
+NO_CACHE_FLAG=""
+if [[ "$FORCE_REBUILD_IMAGE" == "1" ]]; then
+  NO_CACHE_FLAG="--no-cache"
+fi
+
 if [[ "$FORCE_REBUILD_IMAGE" == "1" ]] || ! docker image inspect "$LOCAL_BUILD_IMAGE" >/dev/null 2>&1; then
   log "Preparing cached build image: $LOCAL_BUILD_IMAGE"
-  docker build -t "$LOCAL_BUILD_IMAGE" -f - "$ROOT_DIR" <<EOF
+  docker build $NO_CACHE_FLAG -t "$LOCAL_BUILD_IMAGE" -f - "$ROOT_DIR" <<EOF
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@build.sh` around lines 83 - 97, The FORCE rebuild logic currently calls
docker build for LOCAL_BUILD_IMAGE but reuses cache so cloned SDK/sqlite layers
aren't refreshed; modify the branch where FORCE_REBUILD_IMAGE (or
SMP_FORCE_REBUILD_IMAGE) is true so the docker build invocation for
LOCAL_BUILD_IMAGE adds the --no-cache flag (only when the force condition is
set) to ensure all layers (the RUN git clone / makepkg steps) are rebuilt and
fresh sources are fetched.

✅ Confirmed as addressed by @RenanGBarreto

_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ **`SMP_FORCE_REBUILD_IMAGE=1` won't actually rebuild the cached layers.** When forcing a rebuild you re-run `docker build` with an identical Dockerfile and the same base image, so Docker reuses the cached layers for the `git clone` and `makepkg` steps. The result is that fresh SDK/SQLite sources are never fetched, which defeats the documented purpose of the flag. Pass `--no-cache` when force-rebuilding. <details> <summary>🔧 Proposed fix</summary> ```diff +NO_CACHE_FLAG="" +if [[ "$FORCE_REBUILD_IMAGE" == "1" ]]; then + NO_CACHE_FLAG="--no-cache" +fi + if [[ "$FORCE_REBUILD_IMAGE" == "1" ]] || ! docker image inspect "$LOCAL_BUILD_IMAGE" >/dev/null 2>&1; then log "Preparing cached build image: $LOCAL_BUILD_IMAGE" - docker build -t "$LOCAL_BUILD_IMAGE" -f - "$ROOT_DIR" <<EOF + docker build $NO_CACHE_FLAG -t "$LOCAL_BUILD_IMAGE" -f - "$ROOT_DIR" <<EOF ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build.sh` around lines 83 - 97, The FORCE rebuild logic currently calls docker build for LOCAL_BUILD_IMAGE but reuses cache so cloned SDK/sqlite layers aren't refreshed; modify the branch where FORCE_REBUILD_IMAGE (or SMP_FORCE_REBUILD_IMAGE) is true so the docker build invocation for LOCAL_BUILD_IMAGE adds the --no-cache flag (only when the force condition is set) to ensure all layers (the RUN git clone / makepkg steps) are rebuilt and fresh sources are fetched. ``` </details> <!-- fingerprinting:phantom:poseidon:capybara --> <!-- This is an auto-generated reply by CodeRabbit --> ✅ Confirmed as addressed by @RenanGBarreto <!-- This is an auto-generated comment by CodeRabbit -->
@ -0,0 +125,4 @@
-v "$ROOT_DIR:/workspace" \
-w /workspace \
"$RUNTIME_IMAGE" \
/bin/bash -lc "$BUILD_CMD"
coderabbitai[bot] (Migrated from github.com) commented 2026-05-31 10:11:06 -05:00

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check how sce_stubs is referenced/produced in the Makefile and CI
rg -nP -C3 'sce_stubs|PS5_SCE_STUBS_DIR' Makefile .github/workflows/ps5.yml 2>/dev/null

Repository: drakmor/ShadowMountPlus

Length of output: 1331


🌐 Web query:

Does the ps5-payload-dev/sdk GitHub repo contain a sce_stubs directory in source, or is it generated by make/makepkg?

💡 Result:

The sce_stubs directory exists in the ps5-payload-dev/sdk repository, but it is not a pre-populated source directory containing final stub files [1]. Instead, it serves as a workspace where the user generates these stubs [1]. To use it, a user must manually place decrypted.sprx (library) files into the sce_stubs directory [1]. Once the files are in place, the user executes the make command within that directory to generate the necessary stubs [1]. This workflow is explicitly documented in the repository's instructions for adding new SCE libraries [1].

Citations:


Ensure libkernel_sys.c exists under /opt/ps5-sdk/sce_stubs (matches PS5_SCE_STUBS_DIR).

build.sh sets PS5_SCE_STUBS_DIR="/opt/ps5-sdk/sce_stubs", and the Makefile requires $(PS5_SCE_STUBS_DIR)/libkernel_sys.c (it explicitly test -fs it). The upstream ps5-payload-dev/sdk sce_stubs/ directory is a workspace that needs stub generation/population, so the plain clone may not contain libkernel_sys.c. Add a stubs-population/generation step in the image build (or at least a fail-fast check like test -f /opt/ps5-sdk/sce_stubs/libkernel_sys.c) before running make clean all.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@build.sh` around lines 104 - 119, The build script sets
PS5_SCE_STUBS_DIR="/opt/ps5-sdk/sce_stubs" inside BUILD_CMD and then runs "make
clean all", but the Makefile requires $(PS5_SCE_STUBS_DIR)/libkernel_sys.c; add
a pre-flight check or stub population step inside BUILD_CMD (before invoking
make clean all) to either generate/populate the sce_stubs (using the upstream
stubs generator or copying populated stubs into /opt/ps5-sdk/sce_stubs) or fail
fast with a clear error if /opt/ps5-sdk/sce_stubs/libkernel_sys.c is missing;
update BUILD_CMD (and/or the Docker image build) so that PS5_SCE_STUBS_DIR
points to a directory that contains libkernel_sys.c before running make.

✅ Addressed in commit 912c682

_⚠️ Potential issue_ | _🔴 Critical_ <details> <summary>🧩 Analysis chain</summary> 🏁 Script executed: ```shell #!/bin/bash # Check how sce_stubs is referenced/produced in the Makefile and CI rg -nP -C3 'sce_stubs|PS5_SCE_STUBS_DIR' Makefile .github/workflows/ps5.yml 2>/dev/null ``` Repository: drakmor/ShadowMountPlus Length of output: 1331 --- 🌐 Web query: `Does the ps5-payload-dev/sdk GitHub repo contain a sce_stubs directory in source, or is it generated by make/makepkg?` 💡 Result: The sce_stubs directory exists in the ps5-payload-dev/sdk repository, but it is not a pre-populated source directory containing final stub files [1]. Instead, it serves as a workspace where the user generates these stubs [1]. To use it, a user must manually place decrypted.sprx (library) files into the sce_stubs directory [1]. Once the files are in place, the user executes the make command within that directory to generate the necessary stubs [1]. This workflow is explicitly documented in the repository's instructions for adding new SCE libraries [1]. Citations: - 1: https://github.com/ps5-payload-dev/sdk --- </details> **Ensure `libkernel_sys.c` exists under `/opt/ps5-sdk/sce_stubs` (matches `PS5_SCE_STUBS_DIR`).** `build.sh` sets `PS5_SCE_STUBS_DIR="/opt/ps5-sdk/sce_stubs"`, and the Makefile requires `$(PS5_SCE_STUBS_DIR)/libkernel_sys.c` (it explicitly `test -f`s it). The upstream `ps5-payload-dev/sdk` `sce_stubs/` directory is a workspace that needs stub generation/population, so the plain clone may not contain `libkernel_sys.c`. Add a stubs-population/generation step in the image build (or at least a fail-fast check like `test -f /opt/ps5-sdk/sce_stubs/libkernel_sys.c`) before running `make clean all`. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@build.sh` around lines 104 - 119, The build script sets PS5_SCE_STUBS_DIR="/opt/ps5-sdk/sce_stubs" inside BUILD_CMD and then runs "make clean all", but the Makefile requires $(PS5_SCE_STUBS_DIR)/libkernel_sys.c; add a pre-flight check or stub population step inside BUILD_CMD (before invoking make clean all) to either generate/populate the sce_stubs (using the upstream stubs generator or copying populated stubs into /opt/ps5-sdk/sce_stubs) or fail fast with a clear error if /opt/ps5-sdk/sce_stubs/libkernel_sys.c is missing; update BUILD_CMD (and/or the Docker image build) so that PS5_SCE_STUBS_DIR points to a directory that contains libkernel_sys.c before running make. ``` </details> <!-- fingerprinting:phantom:poseidon:capybara --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit 912c682
RenanGBarreto commented 2026-05-31 10:11:38 -05:00 (Migrated from github.com)

I've made a new commit to address the bot's suggestions.
In addition, I added an image caching feature that makes local rebuilds much faster after the first run. Subsequent builds now take only about 7 seconds.

I believe this feature is ready to be merged, so I’ll move on to the next one.

I've made a new commit to address the bot's suggestions. In addition, I added an image caching feature that makes local rebuilds much faster after the first run. Subsequent builds now take only about 7 seconds. I believe this feature is ready to be merged, so I’ll move on to the next one.
RenanGBarreto (Migrated from github.com) reviewed 2026-05-31 10:31:18 -05:00
@ -0,0 +99,4 @@
RUN pacman --noconfirm -U /opt/pacbrew-repo/sdk/ps5-payload-*.pkg.tar.gz
RUN su - smpbuilder -c 'cd /opt/pacbrew-repo/sqlite && makepkg -c -f'
RUN pacman --noconfirm -U /opt/pacbrew-repo/sqlite/ps5-payload-*.pkg.tar.gz
EOF
RenanGBarreto (Migrated from github.com) commented 2026-05-31 10:31:18 -05:00

Fixed

Fixed
coderabbitai[bot] (Migrated from github.com) reviewed 2026-05-31 10:31:49 -05:00
@ -0,0 +99,4 @@
RUN pacman --noconfirm -U /opt/pacbrew-repo/sdk/ps5-payload-*.pkg.tar.gz
RUN su - smpbuilder -c 'cd /opt/pacbrew-repo/sqlite && makepkg -c -f'
RUN pacman --noconfirm -U /opt/pacbrew-repo/sqlite/ps5-payload-*.pkg.tar.gz
EOF
coderabbitai[bot] (Migrated from github.com) commented 2026-05-31 10:31:48 -05:00

@RenanGBarreto, thanks for the fix! The --no-cache flag will now ensure fresh SDK/SQLite sources are fetched when SMP_FORCE_REBUILD_IMAGE=1 is set. 🐇


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

`@RenanGBarreto`, thanks for the fix! The `--no-cache` flag will now ensure fresh SDK/SQLite sources are fetched when `SMP_FORCE_REBUILD_IMAGE=1` is set. 🐇 <!-- <review_comment_addressed> --> --- <!-- This is an auto-generated comment: tweet message by coderabbit.ai --> If you found this review helpful, would you consider giving us a shout-out on [X](https://twitter.com/intent/tweet?related=CodeRabbitAI&text=When%20forcing%20Docker%20rebuild%2C%20add%20--no-cache%20so%20git%20clone%2Fmakepkg%20layers%20aren't%20reused%20and%20fresh%20SDK%2FSQLite%20sources%20are%20fetched.%20Smart%20fix%20from%20%40coderabbitai%20%E2%80%94%20try%20it!%20%F0%9F%94%A7%F0%9F%90%87&url=https%3A%2F%2Fgithub.com%2Fdrakmor%2FShadowMountPlus%2Fpull%2F43%23discussion_r3330437824)? Thank you for using CodeRabbit! <!-- end of auto-generated comment: tweet message by coderabbit.ai --> <!-- This is an auto-generated reply by CodeRabbit -->
coderabbitai[bot] (Migrated from github.com) reviewed 2026-06-02 00:08:51 -05:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@include/sm_mount_defs.h`:
- Line 61: The comment documenting default mkeymode is inconsistent with the
code: the comment says "AC" but the constant PFS_MOUNT_MKEYMODE is set to
DEVPFS_MKEYMODE_GD (which maps to "GD"); update one to match the other. Either
change the comment to document "GD" to reflect the current definition of
PFS_MOUNT_MKEYMODE/DEVPFS_MKEYMODE_GD, or if "AC" was intended, change
PFS_MOUNT_MKEYMODE to use the DEVPFS_MKEYMODE_AC symbol instead so the code and
comment agree.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 30076350-32c4-4007-8df1-544a508621c6

📥 Commits

Reviewing files that changed from the base of the PR and between 912c6825e9 and 4ec1392edfa27dbe660ee0082eb749f81868dad6.

📒 Files selected for processing (4)
  • README.md
  • build.sh
  • include/sm_mount_defs.h
  • src/sm_image.c
✅ Files skipped from review due to trivial changes (1)
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • build.sh
**Actionable comments posted: 1** <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. Inline comments: In `@include/sm_mount_defs.h`: - Line 61: The comment documenting default mkeymode is inconsistent with the code: the comment says "AC" but the constant PFS_MOUNT_MKEYMODE is set to DEVPFS_MKEYMODE_GD (which maps to "GD"); update one to match the other. Either change the comment to document "GD" to reflect the current definition of PFS_MOUNT_MKEYMODE/DEVPFS_MKEYMODE_GD, or if "AC" was intended, change PFS_MOUNT_MKEYMODE to use the DEVPFS_MKEYMODE_AC symbol instead so the code and comment agree. ``` </details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro Plus **Run ID**: `30076350-32c4-4007-8df1-544a508621c6` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 912c6825e9b20fa764f926041feb4df6f5ff8bc8 and 4ec1392edfa27dbe660ee0082eb749f81868dad6. </details> <details> <summary>📒 Files selected for processing (4)</summary> * `README.md` * `build.sh` * `include/sm_mount_defs.h` * `src/sm_image.c` </details> <details> <summary>✅ Files skipped from review due to trivial changes (1)</summary> * README.md </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary> * build.sh </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
coderabbitai[bot] (Migrated from github.com) commented 2026-06-02 00:08:50 -05:00

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Documentation inconsistency: comment claims "AC" but code uses "GD".

The comment on line 61 documents the default mkeymode as "AC", but line 72 defines PFS_MOUNT_MKEYMODE as DEVPFS_MKEYMODE_GD (which resolves to "GD" per line 69). These are distinct master key modes.

📝 Proposed fix to align documentation with code
-// - mkeymode: "AC"
+// - mkeymode: "GD"

If "AC" was the intended mode, then line 72 should be changed instead:

-#define PFS_MOUNT_MKEYMODE DEVPFS_MKEYMODE_GD
+#define PFS_MOUNT_MKEYMODE DEVPFS_MKEYMODE_AC
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

// - mkeymode: "GD"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@include/sm_mount_defs.h` at line 61, The comment documenting default mkeymode
is inconsistent with the code: the comment says "AC" but the constant
PFS_MOUNT_MKEYMODE is set to DEVPFS_MKEYMODE_GD (which maps to "GD"); update one
to match the other. Either change the comment to document "GD" to reflect the
current definition of PFS_MOUNT_MKEYMODE/DEVPFS_MKEYMODE_GD, or if "AC" was
intended, change PFS_MOUNT_MKEYMODE to use the DEVPFS_MKEYMODE_AC symbol instead
so the code and comment agree.
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ **Documentation inconsistency: comment claims "AC" but code uses "GD".** The comment on line 61 documents the default mkeymode as `"AC"`, but line 72 defines `PFS_MOUNT_MKEYMODE` as `DEVPFS_MKEYMODE_GD` (which resolves to `"GD"` per line 69). These are distinct master key modes. <details> <summary>📝 Proposed fix to align documentation with code</summary> ```diff -// - mkeymode: "AC" +// - mkeymode: "GD" ``` If "AC" was the intended mode, then line 72 should be changed instead: ```diff -#define PFS_MOUNT_MKEYMODE DEVPFS_MKEYMODE_GD +#define PFS_MOUNT_MKEYMODE DEVPFS_MKEYMODE_AC ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committable suggestion</summary> > ‼️ **IMPORTANT** > Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements. ```suggestion // - mkeymode: "GD" ``` </details> <!-- suggestion_end --> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@include/sm_mount_defs.h` at line 61, The comment documenting default mkeymode is inconsistent with the code: the comment says "AC" but the constant PFS_MOUNT_MKEYMODE is set to DEVPFS_MKEYMODE_GD (which maps to "GD"); update one to match the other. Either change the comment to document "GD" to reflect the current definition of PFS_MOUNT_MKEYMODE/DEVPFS_MKEYMODE_GD, or if "AC" was intended, change PFS_MOUNT_MKEYMODE to use the DEVPFS_MKEYMODE_AC symbol instead so the code and comment agree. ``` </details> <!-- fingerprinting:phantom:poseidon:puma --> <!-- This is an auto-generated comment by CodeRabbit -->
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'PSBrew/docker-build-support:PSBrew/docker-build-support'
git switch 'PSBrew/docker-build-support'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'PSBrew/docker-build-support'
git switch 'PSBrew/docker-build-support'
git rebase 'main'
git switch 'main'
git merge --ff-only 'PSBrew/docker-build-support'
git switch 'PSBrew/docker-build-support'
git rebase 'main'
git switch 'main'
git merge --no-ff 'PSBrew/docker-build-support'
git switch 'main'
git merge --squash 'PSBrew/docker-build-support'
git switch 'main'
git merge --ff-only 'PSBrew/docker-build-support'
git switch 'main'
git merge 'PSBrew/docker-build-support'
git push origin 'main'
Sign in to join this conversation.
No description provided.