157 Commits

Author SHA1 Message Date
Georges-Antoine Assi
52163633e5 Merge branch 'master' into claude/server-side-rom-patching-EaQck 2026-06-23 07:01:07 -04:00
zurdi
9f6138d010 Merge branch 'master' into chore/frontend-v2
Adopt master's ROM schema design (sibling_roms + files, batched
get_files_for_roms / get_siblings_for_roms) while preserving the v2-branch
features master lacks: per-user is_main_sibling on siblings and audio_meta
on rom files.

Conflict resolution:
- responses/rom.py: keep master's sibling_roms/files fields; re-graft
  is_main_sibling via SiblingRomSchema.from_rom(rom, is_main_sibling=...);
  restore the eager-relationship fallback in
  SimpleRomSchema.from_orm_with_request (None sentinel) so the v2
  /{id}/simple endpoint still returns siblings/files.
- roms_handler.py: get_siblings_for_roms now left-joins RomUser and returns
  (Rom, is_main_sibling) tuples; keep both branch and master file helpers.
- drop the redundant branch-only sibling_ids field and
  get_sibling_data_for_roms.
- generated types resolved to match (sibling_roms + files; RomFileSchema
  keeps audio_meta and gains archive_members).
- update v2 components and the RelatedGameCard mock to read sibling_roms.
- fix stale exclude={"siblings"} -> "sibling_roms" in scan emit payloads.
- re-chain the audio_meta migration as 0083 (after master's 0082) to keep a
  single Alembic head.
- package.json: union of branch tooling + master dependency bumps; lock
  regenerated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 01:19:55 +02:00
Georges-Antoine Assi
21f60b64aa add smol comment 2026-06-06 10:28:02 -04:00
Georges-Antoine Assi
a69f09b7f8 cleanup 2026-06-06 10:24:08 -04:00
Claude
6d533e0a25 fix(docker): declare /romm as single volume to enable asset hardlinks
PR #3388 added hardlink-based asset import/export (os.link with a
shutil.copy2 fallback) to avoid duplicating disk space. The Dockerfile
VOLUME instruction listed each /romm subdirectory (resources, library,
assets, config, sync) separately, which makes Docker create an
independent mount point for each one — even when the user bind-mounts a
single parent at /romm. Each mount point is its own st_dev, so every
cross-directory os.link() failed with EXDEV and silently fell back to a
full copy, defeating the optimization.

Declare the parent /romm directory instead so all subdirectories share a
single filesystem and hardlinks can succeed when paths reside on the same
underlying host filesystem.
2026-06-06 14:20:29 +00:00
Georges-Antoine Assi
619e03ab32 fix: stop serving private user assets via unauthenticated nginx static route
The default Docker image symlinked /romm/assets into the nginx static web
root (/assets/romm/assets), where it was served by an unauthenticated
`location /assets { try_files ... }` block. /romm/assets holds private user
data (save files, save states, screenshots, avatars) that is meant to be
accessible only through the authenticated /api/raw/assets/{path} route
(Scope.ASSETS_READ). The static symlink bypassed that protection, letting any
unauthenticated caller read another user's files given a (guessable) path.
Avatar URLs leaked the hex user ID through the same static route, making path
construction straightforward.

Fix:
- Drop the /romm/assets symlink from the Docker image build and both
  entrypoint scripts; only /romm/resources (public cover art, screenshots,
  manuals) remains statically served.
- Point the frontend avatar URLs at the authenticated /api/raw/assets/ route
  instead of /assets/romm/assets/. Browser <img> loads authenticate via the
  existing session cookie.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 17:34:30 -04:00
zurdi
25d76300f4 feat: specify platform for frontend build to avoid emulation issues 2026-05-27 19:19:29 +00:00
zurdi
6f2bc8b3e3 chore: update Node.js version to 24.16 in Dockerfile 2026-05-26 07:33:38 +00:00
zurdi
17ea8da23d Merge remote-tracking branch 'origin/master' into chore/frontend-v2 2026-05-25 07:56:38 +00:00
Georges-Antoine Assi
51f0522193 undo 2026-05-17 17:39:47 -04:00
Georges-Antoine Assi
10d3eb2079 feat(sync): default SYNC_BASE_PATH to /var/lib/romm/sync
Move the sync staging folder out of ROMM_BASE_PATH so it lives on a
dedicated writable mount. This lets the container run with a read-only
root filesystem without losing in-flight save uploads, and keeps
app-owned state separate from the user-curated library volume.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 09:28:39 -04:00
zurdi
af53de4b29 chore: update permissions for nginx and gunicorn configuration directories 2026-04-29 13:30:43 +00:00
zurdi
0bfce43371 chore: update uv sync command to use frozen option for consistency 2026-04-27 20:34:22 +00:00
Dang Mai
47eb47a8f1 Small spacing fix 2026-04-17 16:26:24 -07:00
Dang Mai
a5ff6010cd Fix RAHasher prod build 2026-04-17 16:24:31 -07:00
Georges-Antoine Assi
3104a55ae1 update libretro to 1.8.3 in prod 2026-04-16 22:15:06 -04:00
copilot-swe-agent[bot]
80d20eec51 fix: bump RAHasher version from 1.8.1 to 1.8.3 in docker/Dockerfile
Agent-Logs-Url: https://github.com/rommapp/romm/sessions/59aeb3a2-1a8c-47f5-9f90-f6d537765977

Co-authored-by: gantoine <3247106+gantoine@users.noreply.github.com>
2026-04-17 01:44:30 +00:00
Georges-Antoine Assi
1ee4682845 feat: drive frontend patcher via server-side endpoint, isolate Node deps
- Rewrite frontend/src/views/Patcher.vue around library ROM/patch pickers
  (v-autocomplete with debounced search) and call POST /api/roms/{id}/patch
  with responseType: blob; download and/or re-upload the patched output.
- Drop the rom-patcher npm dep and vite-plugin-static-copy from the frontend;
  remove the now-unused web worker, type decls, and viteStaticCopy plugin.
- Move the Node patcher into a self-contained npm project at
  backend/utils/rom_patcher/ (dir uses underscore so it's a valid Python
  package). Patcher.js loads RomPatcher.js from its sibling node_modules.
- Extract the heavy subprocess logic into backend/utils/rom_patcher/patcher.py
  (apply_patch, PatcherError, SUPPORTED_PATCH_EXTENSIONS); slim patch.py to
  HTTP/DB plumbing and fix a stale .parent.parent path.
- Wire up Docker: dev Dockerfile installs the new npm project; prod
  Dockerfile adds a backend-node-build stage and copies rom-patcher-js into
  the production image; install nodejs at runtime.
- Add new patcher i18n keys to en_US (other locales fall back).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 07:39:31 -04:00
Georges-Antoine Assi
9a6beba18b udpate uv version dockerfiule 2026-04-01 08:30:19 -04:00
Georges-Antoine Assi
cccee5ab57 pin nginx to 1.29.5 2026-02-21 12:48:37 -05:00
Georges-Antoine Assi
5f5c7afb7a revert nginx version pin 2026-02-17 15:21:19 -05:00
Georges-Antoine Assi
695a12a21a upgrade some base images 2026-02-16 22:11:47 -05:00
Georges-Antoine Assi
fad5f7fd23 Bump dockerfile baselayer image tags 2025-10-20 10:56:42 -04:00
Georges-Antoine Assi
c4d8450009 fix typo 2025-09-18 17:01:28 -04:00
Georges-Antoine Assi
873b59c951 use non-slim nginx 2025-09-18 15:30:04 -04:00
Georges-Antoine Assi
b0c37c193f drop setting user 2025-09-18 14:44:23 -04:00
Georges-Antoine Assi
f1750951cf install devs deps to build images 2025-09-18 11:45:38 -04:00
Georges-Antoine Assi
536a5dd3dd atempt fix ralibretro 2025-09-18 11:38:39 -04:00
Georges-Antoine Assi
1a41190fb8 add NGINX_VERSION to local 2025-09-18 11:28:29 -04:00
Georges-Antoine Assi
57e488d8b4 copy from uv image direct 2025-09-18 10:58:47 -04:00
Georges-Antoine Assi
d91be2c16a first attempt to fix build failure 2025-09-18 10:34:50 -04:00
Georges-Antoine Assi
90fc571eb4 Use hashes for each later + set USER 2025-09-18 09:46:36 -04:00
Michael Manganiello
0f0d1a1903 fix: Remove mod_zip workaround for upstream subrequests to internal locations
Related `mod_zip` issue https://github.com/evanmiller/mod_zip/issues/90
has been fixed in commit
288d66541c

By upgrading `mod_zip` to include this fix, we can remove the workaround
that involved using a separate internal location and server to serve
files for zipping.
2025-09-11 18:24:12 -03:00
Michael Manganiello
6e7edd2b89 misc: Upgrade Ruffle to v2025-08-14 2025-08-15 12:16:34 -03:00
Georges-Antoine Assi
d005dba90b fix a bunch of shit 2025-08-09 11:16:12 -04:00
Michael Manganiello
676079f1e5 fix: Docker build and init fixes
* Added `linux-headers` back, but only for development stage.
* Fixed initialization script, as `uv` is not included in the final
  Docker image.
* Initialize variable `ENABLE_SCHEDULED_UPDATE_LAUNCHBOX_METADATA`.
2025-08-08 15:09:27 -03:00
Georges-Antoine Assi
b247a5c5bb small tweaks 2025-08-07 17:39:57 -04:00
Georges-Antoine Assi
988fa510e5 readd link in dockerfile 2025-07-07 18:05:38 -04:00
Michael Manganiello
87d20b0bb8 fix: Correctly use Python 3.13 in Docker image
The `production-stage` stage was depending on the `python3` package from
Alpine, which at the moment of writing is still Python 3.12.

To avoid relying on Alpine's package and releases, we now copy the
Python installation directly from its official Docker image.

Other options were tested but did not work:
- Trying to install Python 3.13 using `apk`. As mentioned, Alpine does
  not support Python 3.13 yet.
- Installing Python 3.13 using `pyenv`. The installation worked, but the
  generated image was too large. Related `pyenv` discussion:
  https://github.com/orgs/pyenv/discussions/2868
- Installing Python 3.13 using `uv`. Only worked for `amd64`
  architecture, but the installation failed on `arm64`.
2025-07-07 00:17:25 -03:00
Georges-Antoine Assi
d1117a11f3 bump emujs to 4.2.3 2025-07-05 16:18:48 -04:00
Georges-Antoine Assi
8e1a93480e Apply suggestion from @adamantike
Co-authored-by: Michael Manganiello <adamantike@users.noreply.github.com>
2025-07-04 21:26:34 -04:00
Georges-Antoine Assi
4f6b6fe660 Apply suggestion from @adamantike
Co-authored-by: Michael Manganiello <adamantike@users.noreply.github.com>
2025-07-04 21:26:20 -04:00
Georges-Antoine Assi
edfa25ef21 Apply suggestion from @adamantike
Co-authored-by: Michael Manganiello <adamantike@users.noreply.github.com>
2025-07-04 21:26:12 -04:00
Georges-Antoine Assi
e1a5c14817 Apply suggestion from @adamantike
Co-authored-by: Michael Manganiello <adamantike@users.noreply.github.com>
2025-07-04 21:26:05 -04:00
Georges-Antoine Assi
e6fe94fc0b Apply suggestion from @adamantike
Co-authored-by: Michael Manganiello <adamantike@users.noreply.github.com>
2025-07-04 21:25:53 -04:00
Georges-Antoine Assi
543238fb40 install uv to correct dir 2025-07-04 10:03:44 -04:00
Georges-Antoine Assi
e8f8f1621c complete migration to uv 2025-07-04 09:54:04 -04:00
Michael Manganiello
f96adeeaee misc: Upgrade to Python 3.13
Small changes to upgrade Python to version 3.13, and fixes based on a
`pyupgrade` run using the `--py313-plus` flag.
2025-07-03 23:37:00 -03:00
Georges-Antoine Assi
1050f47aac bump emulatorjs to 4.2.2 2025-07-02 16:40:01 -04:00
Georges-Antoine Assi
67dc49c818 Add vscode devcontainer file and fix dockerfile 2025-07-01 15:02:32 -04:00