{"id":15051178,"url":"https://github.com/hmelder/rootfsbuilder","last_synced_at":"2025-04-10T02:41:04.241Z","repository":{"id":194295265,"uuid":"690456260","full_name":"hmelder/rootfsbuilder","owner":"hmelder","description":"An all-in-one RootFS builder for Debian-based distributions with seemless QEMU integration","archived":false,"fork":false,"pushed_at":"2024-03-15T20:27:07.000Z","size":55,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T04:11:21.680Z","etag":null,"topics":["debian","debootstrap","golang","qemu","rootfs"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hmelder.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}},"created_at":"2023-09-12T08:25:44.000Z","updated_at":"2025-02-07T19:46:57.000Z","dependencies_parsed_at":"2024-03-15T21:24:29.227Z","dependency_job_id":"e35faf4e-c420-4823-be8f-0436e1190a6a","html_url":"https://github.com/hmelder/rootfsbuilder","commit_stats":null,"previous_names":["hmelder/rootfsbuilder"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmelder%2Frootfsbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmelder%2Frootfsbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmelder%2Frootfsbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hmelder%2Frootfsbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hmelder","download_url":"https://codeload.github.com/hmelder/rootfsbuilder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144900,"owners_count":21055007,"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":["debian","debootstrap","golang","qemu","rootfs"],"created_at":"2024-09-24T21:31:28.755Z","updated_at":"2025-04-10T02:41:04.193Z","avatar_url":"https://github.com/hmelder.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"RootFS Builder\n====================\n\n[![CI](https://github.com/hmelder/rootfsbuilder/actions/workflows/go.yml/badge.svg)](https://github.com/hmelder/rootfsbuilder/actions/workflows/go.yml?query=branch%3Amain)\n\nRootFS Builder is a high-quality tool to automate building, payload extraction, script execution, and repackaging of root filesystems.\nIt automatically detects the host architecture and uses qemu-static to run binaries for other architectures, when needed.\n\nCurrently, only Debian-based root filesystems are supported (Which support debootstrap).\n\n## Why use RootFS Builder?\nRootFS Builder is written and golang and easy to maintain, contrary to hacky shell scripts.\nThe idea to write this simple tool occured to me while trying to figure out the various badly written\nscripts that are used to build the Nvidia Jetson root filesystems.\n\nFeel free to open an issue if you have any questions or suggestions to further improve this tool.\n\n## Dependencies\n\n### Build dependencies\n- golang\n- make (for building and installing all auxiliary files)\n\n### Runtime dependencies\n- debootstrap\n- dpkg\n- squashfs-tools (if you want to use the squashfs option)\n- tar (if you want to use the tarball option)\n- qemu-user-static (for cross-architecture builds)\n\n## Building from source\n\nYou need a working Go installation (1.16 or newer) and make, as we also need to install auxiliary files.\n```bash\nmake\nmake install\n```\nNote: You might need to run `sudo make install` if you don't have write permissions to `/usr/local/bin`, which is\nthe default installation path.\n\nIf You want to just build the binary without using make, run 'go build' in the root directory of the repository.\n\n## Usage\n\nThe tool is configuration-based. This means you specify the root filesystem you want to build in a JSON file.\n\nYou will need a working dpkg installation, as well as debootstrap for basic usage.\nIf you want to build cross-architecture root filesystems, you will also need qemu-user-static when executing custom commands.\n\nCurrently required fields are:\n- `name`: The name of the root filesystem.\n- `distribution`: The distribution to use for building the root filesystem (e.g. `debian`, `ubuntu`, etc.)\n- `release`: The specific release (e.g. `unstable`, `bookworm`, `lunar`)\n- `architecture`: The architecture (debian naming scheme) of the root filesystem (e.g. `amd64`, `arm64`, `armhf`)\n- `mirror`: The mirror to use for downloading packages (e.g. `http://deb.debian.org/debian`)\n- `tarball_type`: The type of tarball to use for the root filesystem. Currently, only `tar`, and `tar.gz` are supported. You can omitt this field if you enable the `squashfs` option.\n\nOptional fields are:\n- `variant`: The variant of the root filesystem (e.g. `minbase`, `buildd`, etc.). This is passed to debootstrap.\n- `additional_packages`: A list of additional packages (strings) to install in the root filesystem.\n- `excluded_packages`: A list of packages (strings) to exclude from the root filesystem.\n- `components`: A list of components (strings) to use for the mirror (e.g. `main`, `contrib`, `non-free`).\n- `payload`: A payload to be extracted into the root filesystem. The payload name should be just the name of the file, which is in the same directory as the configuration.\n- `payload_type`: The type of the payload. Currently, only `tar`, and `tar.gz` are supported.\n- `post_install_command`: A command to be executed in the rootfs, after the payload has been extracted.\n- `use_hosts_resolv_conf`: Whether to use the host's `/etc/resolv.conf` in the root filesystem (boolean value). Default: false.\n- `squashfs`: Boolean value to indicate whether to squash the root filesystem into a squashfs image. Default: false.\n- `squashfs_args`: List of arguments to pass to mksquashfs. Default: `[\"-noappend\"]`.\n\nFor examples see the `examples` directory.\n\n### Building a root filesystem\n\nTo build a root filesystem, run:\n```bash\nrootfsbuilder \u003cconfig_file\u003e\n```\n\n## License\nThis project is licensed under the MIT license. See the LICENSE file for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmelder%2Frootfsbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhmelder%2Frootfsbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhmelder%2Frootfsbuilder/lists"}