{"id":13437192,"url":"https://github.com/pop-os/debrepbuild","last_synced_at":"2025-04-30T23:32:23.648Z","repository":{"id":84412208,"uuid":"131047960","full_name":"pop-os/debrepbuild","owner":"pop-os","description":"A project for automatically generating and maintaining Debian repositories from a TOML spec. ","archived":false,"fork":false,"pushed_at":"2021-08-05T14:37:18.000Z","size":365,"stargazers_count":52,"open_issues_count":11,"forks_count":10,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-10-27T21:50:02.062Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/pop-os.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}},"created_at":"2018-04-25T18:29:46.000Z","updated_at":"2024-01-04T16:22:37.000Z","dependencies_parsed_at":"2023-03-02T15:15:35.518Z","dependency_job_id":null,"html_url":"https://github.com/pop-os/debrepbuild","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pop-os%2Fdebrepbuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pop-os%2Fdebrepbuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pop-os%2Fdebrepbuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pop-os%2Fdebrepbuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pop-os","download_url":"https://codeload.github.com/pop-os/debrepbuild/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224225375,"owners_count":17276502,"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-07-31T03:00:54.946Z","updated_at":"2024-11-12T06:17:52.644Z","avatar_url":"https://github.com/pop-os.png","language":"Rust","funding_links":[],"categories":["Applications","Rust","应用","应用 Applications"],"sub_categories":["System tools","系统工具","系统工具 System tools"],"readme":"# Debian Repository Builder\n\nA simple utility for constructing and maintaining Debian repositories. Configuration of a repo is\nbased on the directory hierarchy, and a TOML configuration file. Real world repos to demonstrate\nmay be found bellow.\n\n- [System76 CUDA Repo](https://github.com/system76/cuda)\n- [Pop!\\_OS Proprietary Repo](https://github.com/pop-os/repo-proprietary)\n\n## Key Features\n\n- Can import pre-built Debian archives from external sources\n- Can repackage pre-built Debian archives\n- Can build packages from various sources, using `sbuild`\n- Supports multiple components within a suite\n- Supports migrating packages between components\n- Processes Debian archives within the pool in parallel.\n- Generates distribution file archives in parallel\n- Generates `Packages`, `Sources`, `Contents`, and `Release` dist files.\n- Repos will be `apt-file`-compatible\n\n## Todo\n\n- Generate Appstream + Icon archives\n\n## Directory Structure\n\nThe root directory of a debrep-based repo will contain the following directories:\n\n- **assets/**: where files that need to be linked at build-time are stored\n  - **cache/**: files which debrep downloads from external sources, and should be cached between runs\n  - **share/**: files that can be shared across packages, and are specified in the TOML config\n  - **packages/**: files which are automatically linked to the build before building\n  - **replace/${suite}/${component}/${arch}/package/files/**: Repackage prepackaged archives\n    - **DEBIAN**: control archive files to replace\n    - **data**: data archive files to replace\n- **build/${suite}/**: debrep performs all builds within this directory.\n  - Every file is linked / sourced here at build time.\n  - After each successful build, files are moved into the repo.\n- **debian/${suite}/**: contains the debian configuration for each source package that needs one.\n  - The directories within must have the same name as the source package they reference.\n  - Each package directory contains the entire contents of the debian directory for that package.\n- **metapackages/${suite/**: place your `metapackage.cfg` equivs files in here.\n  - On build, they'll be generated and placed into the repo.\n- **record/${suite}/**: keeps tabs on what source packages have been built\n- **repo/**: Contains the archive \u0026 associated dist and pool directories for each\n- **suites/${suite}.toml**: Configuration files for each repo to build.\n\n## Highly Parallel Distribution File Generation\n\nSince this tool is written in Rust, one of the key focuses has been on making it do as much as it can in parallel,\nas fast as it can do it. It uses thread pools, parallel iterators, and state machines to achieve that goal. Each\ncomponent of a suit; each architecture in those components; and each package in those architectures are all\nprocessed in parallel. Data from each archive is also processed in parallel, and the final stage of processing\nthat data into information and writing it to various compressed archives is done in parallel as well. Our tool\nshould be fast with large archives.\n\n## Source Building Support\n\nPackages can be generated from sources so long as you provide the debian files necessary -- either by using existing\ndebian files in the upstream archive or git repository, or by providing your own through a variety of means.\n\n## Components Support\n\nManaging components are supported by this utility! There's currently a `default_component` variable for the config,\nwhich will designate where packages will be stored by default. The `migrate` subcommand can be used to move packages\nbetween components. After moving packages, the dist files will be re-generated.\n\n## Contents Generation\n\nTools like `apt-file` require the the repository stores `Contents` archives, which it will download and read from\nto find which packages contain what files in a repository. This tool will process and generate these files in parallel\nas it is also processing the `Packages` archives.\n\n### Repo Structure\n\nThis is what you can expect to see after a successful build. You may sync the dists and pool\ndirectories to your package server to make your repository accessible to other machines.\n\n```\nrepo/\n  dists/\n    cosmic/\n    bionic/\n      Contents-amd64\n      Contents-amd64.gz\n      Contents-amd64.xz\n      InRelease\n      proposed/\n        binary-amd64/\n          Packages\n          Packages.gz\n          Packages.xz\n          Release\n      main/\n        binary-amd64/\n          Packages\n          Packages.gz\n          Packages.xz\n          Release\n        source/\n          Sources\n          Sources.gz\n          Sources.xz\n        Release\n        Release.gpg\n  pool/\n    cosmic/\n    bionic/\n      proposed/\n        binary-amd64/\n          p/\n            package/\n              package...\n      main/\n        binary-amd64/\n          p/\n            package/\n              package_version_amd64.buildinfo\n              package_version_amd64.changes\n              package_version_amd64.deb\n              package-dbgsym_version_amd64.ddeb\n        source/\n          p/\n            package/\n              package_version.dsc\n              package_version.tar.xz\n```\n\n## Usage\n\n### Create / update a Debian repository\n```\ndebrep build [ -f | --force ]\ndebrep build packages \u003cPACKAGES\u003e... [ -f | --force ]\ndebrep build pool\ndebrep build dist\n```\n\n### Migrate packages between components\n```\ndebrep migrate package1 package2 pacakge3 --from proposed --to main\n```\n\n### Clean up old packages\n```\ndebrep clean\n```\n\n### Remove packages\n```\ndebrep remove \u003cPACKAGES\u003e...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpop-os%2Fdebrepbuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpop-os%2Fdebrepbuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpop-os%2Fdebrepbuild/lists"}