{"id":15070071,"url":"https://github.com/desultory/pycpio","last_synced_at":"2026-02-04T22:08:26.367Z","repository":{"id":209246510,"uuid":"723550430","full_name":"desultory/pycpio","owner":"desultory","description":"Python library for CPIO manipulation","archived":false,"fork":false,"pushed_at":"2024-03-25T01:30:24.000Z","size":100,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-26T00:32:33.153Z","etag":null,"topics":["cpio","cpio-archives","data","initramfs","pypi-package","python","python-3","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/desultory.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-11-26T02:38:24.000Z","updated_at":"2024-08-20T20:01:06.920Z","dependencies_parsed_at":"2023-12-19T06:17:22.431Z","dependency_job_id":"ef348b2a-6001-4b82-8f4a-b92975926b45","html_url":"https://github.com/desultory/pycpio","commit_stats":null,"previous_names":["desultory/pycpio"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desultory%2Fpycpio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desultory%2Fpycpio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desultory%2Fpycpio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/desultory%2Fpycpio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/desultory","download_url":"https://codeload.github.com/desultory/pycpio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248261403,"owners_count":21074222,"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":["cpio","cpio-archives","data","initramfs","pypi-package","python","python-3","python3"],"created_at":"2024-09-25T01:46:52.551Z","updated_at":"2026-02-04T22:08:26.362Z","avatar_url":"https://github.com/desultory.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":" ![Tests](https://github.com/desultory/pycpio/actions/workflows/unit_tests.yml/badge.svg)\n![ZenlibTests](https://github.com/desultory/zenlib/actions/workflows/unit_tests.yml/badge.svg)\n![Black](https://img.shields.io/badge/code%20style-black-000000.svg)\n\n# PyCPIO\n\nA library for creating CPIO files in Python.\n\nCurrently, the library only supports the New ASCII format.\n\nxz and zstd compression types are currently suppored.\n\nThis library is primary designed for use in [ugrd](https://github.com/desultory/ugrd) to create initramfs CPIO archives \n\n## Usage\n\n```\n  -h, --help            show this help message and exit\n  -d, --debug           enable debug mode (level 10)\n  -dd, --trace          enable trace debug mode (level 5)\n  -v, --version         print the version and exit\n  --log-file LOG_FILE   set the path to the log file\n  --log-level LOG_LEVEL\n                        set the log level\n  --log-time            enable log timestamps\n  --no-log-color        disable log color\n  -i INPUT, --input INPUT\n                        input file\n  -a APPEND, --append APPEND\n                        append to archive\n  --recursive RECURSIVE\n                        append to archive recursively\n  --relative RELATIVE   append to archive relative to this path\n  --absolute            allow absolute paths\n  --reproducible        Set mtime to 0, start inodes at 0\n  --deduplicate         Make hardlinks for files with identical content\n  --rm RM, --delete RM  delete from archive\n  -n NAME, --name NAME  Name/path override for append\n  -s SYMLINK, --symlink SYMLINK\n                        create symlink\n  -c CHARDEV, --chardev CHARDEV\n                        create character device\n  --major MAJOR         major number for character/block device\n  --minor MINOR         minor number for character/block device\n  -u UID, --set-owner UID\n                        set UID on all files\n  -g GID, --set-group GID\n                        set GID on all files\n  -m MODE, --set-mode MODE\n                        set mode on all files\n  -z COMPRESS, --compress COMPRESS\n                        compression type\n  -o OUTPUT, --output OUTPUT\n                        output file\n  -l, --list            list CPIO contents\n  -p, --print           print CPIO contents\n  ```\n\n# Structure\n\n- `pycpio.header.cpioheader`: The class which represents a CPIO header\n  * Can be initialized from args for header fields, or bytes representing a header\n  * header types are defined in `pycpio.header.headers` (only the new ascii format is supported)\n- `pycpio.cpio.data`: The class which represents a CPIO data block\n  * Each CPIO object must have a header.\n  * Currently the follwing subtypes are supported:\n    - `file` : A regular file, or hardlink.\n    - `dir` : A directory\n    - `symlink` : A symbolic link\n    - `chardev` : A character device\n  * CPIO objects are collected in a `pycpio.cpio.archive` object\n    - The archive handles duplication, inode generation, name normalization, and other collection related tasks\n\n  * All CPIO object types can be initialized from args, bytes, or a file path\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesultory%2Fpycpio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesultory%2Fpycpio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesultory%2Fpycpio/lists"}