{"id":16195108,"url":"https://github.com/ashcrow/filetranspiler","last_synced_at":"2025-07-18T21:33:50.671Z","repository":{"id":53556538,"uuid":"188444826","full_name":"ashcrow/filetranspiler","owner":"ashcrow","description":"Creates an update Ignition json file with additions from a fake root.","archived":false,"fork":false,"pushed_at":"2021-03-24T18:39:04.000Z","size":59,"stargazers_count":47,"open_issues_count":0,"forks_count":30,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-06T18:45:41.248Z","etag":null,"topics":["ignition","tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ashcrow.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}},"created_at":"2019-05-24T15:21:32.000Z","updated_at":"2024-12-11T04:17:10.000Z","dependencies_parsed_at":"2022-09-01T15:43:32.222Z","dependency_job_id":null,"html_url":"https://github.com/ashcrow/filetranspiler","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ashcrow/filetranspiler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Ffiletranspiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Ffiletranspiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Ffiletranspiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Ffiletranspiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ashcrow","download_url":"https://codeload.github.com/ashcrow/filetranspiler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ashcrow%2Ffiletranspiler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265837631,"owners_count":23836558,"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":["ignition","tool"],"created_at":"2024-10-10T08:26:16.305Z","updated_at":"2025-07-18T21:33:50.384Z","avatar_url":"https://github.com/ashcrow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# filetranspiler\nCreates an [Ignition](https://github.com/coreos/ignition) JSON file from a fake root.\n\nSee also [fcct](https://github.com/coreos/fcct).\n\n## Getting filetranspiler\n\nIt's recommended to use a released version of filetranspiler. See [releases](https://github.com/ashcrow/filetranspiler/releases) page for the latest releases.\n\n## Building\n\n### Container Image\nRequires `podman`\n```\n$ make container\n```\n\n## Running\n\n### Source\n\nThese items are required when running outside of the container.\n\n- Python 3 (3.6+ recommended)\n- [PyYAML](https://github.com/yaml/pyyaml)\n- python3-magic\n- file-magic\n\n```\n./filetranspile -i ignition.json -f fakeroot\n```\n\n### Container Image\n**Note**: When using the container don't forget to mount the host directory that houses your ignition\nfile and fake root in to the container!\n```\n$ podman run --rm -ti --volume `pwd`:/srv:z localhost/filetranspiler:latest -i ignition.json -f fakeroot\n```\n\n## Example\n```\n$ tree fakeroot\nfakeroot/\n└── etc\n    ├── hostname\n    ├── hostname.link -\u003e hostname\n    ├── resolve.conf\n    └── sysconfig\n        └── network-scripts\n            ├── ifcfg-blah\n            └── ifcfg-fake\n\n3 directories, 5 files\n$ ./filetranspile --help\nusage: filetranspile [-h] [-i IGNITION] -f FAKE_ROOT [-o OUTPUT] [-p]\n                     [--dereference-symlinks] [--format {json,yaml}]\n                     [--version]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i IGNITION, --ignition IGNITION\n                        Path to ignition file to use as the base\n  -f FAKE_ROOT, --fake-root FAKE_ROOT\n                        Path to the fake root\n  -o OUTPUT, --output OUTPUT\n                        Where to output the file. If empty, will print to\n                        stdout\n  -p, --pretty          Make the output pretty\n  --dereference-symlinks\n                        Write out file contents instead of making symlinks\n                        NOTE: Target files must exist in the fakeroot\n  --format {json,yaml}  What format of file to write out. `yaml` or `json`\n                        (default)\n  --version             show program's version number and exit\n$ cat ignition.json \n{\n  \"ignition\": { \"version\": \"2.3.0\" },\n  \"storage\": {\n    \"files\": [{\n      \"path\": \"/var/foo/bar\",\n      \"filesystem\": \"root\",\n      \"mode\": 420,\n      \"contents\": { \"source\": \"data:,example%20file%0A\" }\n    }]\n  }\n}\n\n$ ./filetranspile -i test/ignition.json -f test/fakeroot -p\n{\n    \"ignition\": {\n        \"version\": \"2.3.0\"\n    },\n    \"storage\": {\n        \"files\": [\n            {\n                \"contents\": {\n                    \"source\": \"data:,example%20file%0A\"\n                },\n                \"filesystem\": \"root\",\n                \"mode\": 420,\n                \"path\": \"/var/foo/bar\"\n            },\n            {\n                \"contents\": {\n                    \"source\": \"data:text/plain;charset=us-ascii;base64,c29tZXRoaW5nCg==\"\n                },\n                \"filesystem\": \"root\",\n                \"mode\": 436,\n                \"path\": \"/etc/hostname\"\n            },\n            {\n                \"contents\": {\n                    \"source\": \"data:text/plain;charset=us-ascii;base64,c2VhcmNoIDEyNy4wLjAuMQpuYW1lc2VydmVyIDEyNy4wLjAuMQo=\"\n                },\n                \"filesystem\": \"root\",\n                \"mode\": 436,\n                \"path\": \"/etc/resolve.conf\"\n            },\n            {\n                \"contents\": {\n                    \"source\": \"data:text/plain;charset=us-ascii;base64,YmxhaCBibGFoIGJsYWgKMTIzNDU2Nzg5MApibGFoIGJsYWggYmxhaAo=\"\n                },\n                \"filesystem\": \"root\",\n                \"mode\": 436,\n                \"path\": \"/etc/sysconfig/network-scripts/ifcfg-blah\"\n            },\n            {\n                \"contents\": {\n                    \"source\": \"data:text/plain;charset=us-ascii;base64,ZmFrZQo=\"\n                },\n                \"filesystem\": \"root\",\n                \"mode\": 436,\n                \"path\": \"/etc/sysconfig/network-scripts/ifcfg-fake\"\n            }\n        ],\n        \"links\": [\n            {\n                \"filesystem\": \"root\",\n                \"hard\": false,\n                \"path\": \"/etc/hostname.link\",\n                \"target\": \"hostname\"\n            }\n        ]\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashcrow%2Ffiletranspiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashcrow%2Ffiletranspiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashcrow%2Ffiletranspiler/lists"}