{"id":17801009,"url":"https://github.com/refi64/croft","last_synced_at":"2026-02-15T21:05:05.743Z","repository":{"id":69429126,"uuid":"388299588","full_name":"refi64/croft","owner":"refi64","description":"ChROmium Flatpak Toolkit","archived":false,"fork":false,"pushed_at":"2022-12-01T01:22:22.000Z","size":40,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T18:27:56.204Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refi64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-22T02:05:55.000Z","updated_at":"2025-01-24T06:59:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"d65f2721-8cd7-4009-8e6c-5361866a7806","html_url":"https://github.com/refi64/croft","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fcroft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fcroft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fcroft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refi64%2Fcroft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refi64","download_url":"https://codeload.github.com/refi64/croft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249716761,"owners_count":21315068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T12:33:09.547Z","updated_at":"2026-02-15T21:05:00.691Z","avatar_url":"https://github.com/refi64.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CroFT\n\n*\u003cb\u003eC\u003c/b\u003eh\u003cb\u003ero\u003c/b\u003emium \u003cb\u003eF\u003c/b\u003elatpak \u003cb\u003eToolkit\u003c/b\u003e*\n\nCroFT is a utility for managing a Chromium source tree tied to a Flatpak\nmanifest, actively used for maintaining the primary Chromium Flatpak. The end\ngoal is to be able to, in theory, have this tool (and the workflows it supports)\nshared amongst anyone else who wants to maintain some source-based Chromium\nderivative Flatpak, in order to streamline routine maintenance.\n\n## Downloads\n\nBinary releases of this will periodically be posted to\n[the releases page](https://github.com/refi64/croft/releases).\n\n## Building\n\nInstall the Dart SDK, then run:\n\n```\n$ dart pub get\n$ dart run build_runner build\n$ dart2native bin/croft.dart -o croft\n```\n\nthen move the `croft` binary to wherever you want.\n\n## Configuration\n\nCroFT requires a `~/.config/croft.yaml` to work, using the following format:\n\n```yaml\n# Map of Chromium-based Flatpak projects\nprojects:\n  chromium:\n    # Directory containing the Flatpak manifest and related files\n    manifest-dir: ~/manifests/chromium\n    # Filename of the Flatpak manifest\n    manifest-name: org.chromium.Chromium.yaml\n    # Module in the Flatpak manifest that builds the Chromium project itself\n    main-module: chromium\n    # Directory containing the Chromium source tree\n    chromium-source-root: ~/code/chromium/src\n    # (optional, defaults to 'docker') The docker or podman command to run\n    docker-command: docker\n    # (optional, defaults to 'false') Build a custom toolchain to configure FFmpeg\n    use-custom-ffmpeg-toolchain: false\n# (optional) Default project name in the projects map above\ndefault-project: chromium\n```\n\n## Basic terms\n\n- \"Component\" is referring to either the root Chromium repository (\"chromium\")\n  or the FFmpeg repository inside (\"ffmpeg\").\n- \"Upstream revision\" is the last revision that's part of upstream, i.e. the\n  revision right before any locally added commits.\n\n## Workflow to update Chromium\n\n### Updating the local source tree\n\nFirst off, downloading the new sources. In your Chromium source tree, `git fetch\n--tags`, then checkout the tag corresponding to the latest release, and `gclient\nsync`. Note that, if any commits are present in the FFmpeg repository, this will\nfail. You can work around that by resetting it first via `croft\ndestructive-reset ffmpeg upstream`, but note that **this will discard any work\nin the FFmpeg repository**.\n\nNow, the current patches in the manifest can be applied to Chromium and FFmpeg\nvia `croft apply-patches chromium` and `croft apply-patches ffmpeg`,\nrespectively. `croft apply-patches` is a thin wrapper over `git am -3`, so on\nany patch conflicts, you can make changes as needed and then do `git am\n--continue`.\n\nIf the upstream FFmpeg configuration was updated, it will conflict with our\nFFmpeg configuration patch, so that one can be skipped via `git am --skip` and\nrecreated later (see below). If you already know there will be a conflict, you\ncan skip the configuration patch altogether via `croft apply-patches ffmpeg\n--skip-ffmpeg-config`.\n\n### Updating the FFmpeg configuration\n\nIf the FFmpeg configuration was updated and needs to be regenerated (see above),\nuse `croft generate-ffmpeg-config` to regenerate and commit the new\nconfiguration. This command requires Docker or Podman in order to work.\n\n### Exporting the patches\n\nOnce all patches are updated, run `croft export-patches chromium` and `croft\nexport-patches ffmpeg` to export the patches back to the manifest folder, then\nyou can commit and push those as desired.\n\n## Workflow for modifying \u0026 creating patches\n\n### Working with the upstream revision\n\nYou can use `croft get-upstream-revision` to print out the upstream revision.\n\n`croft rebase-on-upstream chromium|ffmpeg` will open an interactive rebase\ntargeting said upstream revision, allowing you to rebase just the patch commits\nas needed.\n\n### Building Chromium\n\nIn order to access the Flatpak build environment, use `croft build-shell`, which\nwill build all the modules in the manifest *before* the main one, then open up\na shell in the resulting build environment (using `flatpak-builder --run`).\n\nIf you want to run an *entire* manifest build, you can use `croft\nbuild-release`, which will build the entire Flatpak manifest, from top to\nbottom. Due to the large size of the Chromium sources, this will also delete any\nprevious Chromium build directories left over in your Flatpak cache before it\nstarts.\n\n## Usage on arm64 hosts\n\nChromium's default prebuilt toolchains, which required to generate the FFmpeg\nconfig, only run on x64, so a custom-built toolchain needs to be used. You can\nset `use-custom-ffmpeg-toolchain: true` in the project configuration and run\n`croft build-ffmpeg-toolchain` in order to build a separate copy of the Chromium\nbuild toolchain for use in generating the FFmpeg config. After that, `croft\ngenerate-ffmpeg-config` will automatically use the new toolchain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fcroft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefi64%2Fcroft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefi64%2Fcroft/lists"}