Skip to main content

apt-repo-maker

apt-repo-maker is a program to create and host an APT repo on GitHub. Yes, this means committing binaries to a repo, because why not. It wraps reprepro with a very simple CLI.

Setup

Run apt-repo setup. Usage is as follows.

usage: apt-repo setup [-h] --public-key PUBLIC_KEY --private-key PRIVATE_KEY --description DESCRIPTION --origin ORIGIN --label LABEL --codename CODENAME --arch ARCH [ARCH ...] --component
                      COMPONENT [COMPONENT ...] [--splash SPLASH] [--private]
                      name

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  --public-key PUBLIC_KEY
                        public key to copy to repo
  --private-key PRIVATE_KEY
                        private key to sign packages with
  --description DESCRIPTION
  --origin ORIGIN
  --label LABEL
  --codename CODENAME
  --arch ARCH [ARCH ...]
  --component COMPONENT [COMPONENT ...]
  --splash SPLASH       HTML splash page for the repo
  --private             make repo private

All of the parameters are required and are fairly self-explanatory. The public key should be an exported file and the private key should be the private key ID in GPG.

Add some DEB files to the repo.

usage: apt-repo add [-h] name debs [debs ...]

positional arguments:
  name
  debs        DEB files to add (either just their locations, or <location>:<component>)

options:
  -h, --help  show this help message and exit

Note: You can specify DEB files with just their filenames, or like <location>:<component>; for example: mydeb_1.0.0-1_all.deb:main. Architecture will be determined automatically (by reading packages' actual architecture fields; not by assuming from their names).

Other stuff you can do

  • List the packages in the repo

    usage: apt-repo list [-h] [--no-format] name
    
    positional arguments:
    name
    
    options:
    -h, --help   show this help message and exit
    --no-format  do not pretty-print list
    
  • Remove packages in the repo

    usage: apt-repo remove [-h] name packages [packages ...]
    
    positional arguments:
    name
    packages    packages to remove
    
    options:
    -h, --help  show this help message and exit
    
  • Getting low on space on the GitHub repo? Run the clean function

    usage: apt-repo clean [-h] name
    
    positional arguments:
    name
    
    options:
    -h, --help  show this help message and exit
    

How can users add my created repos to their APT sources

This is largely a question about APT, not something for this project specifically, but I'll lend a hand.

If your GitHub repo is private, tell those who need access to it to generate a personal access token with repo read abilities (you can do so in the web interface, or even use a Selenium script). Then they should add the following to their /etc/apt/sources.list.

deb https://<username>:<personal_access_token>@raw.githubusercontent.com/<repo_host_username>/<repo_name>/gh-pages <codename> <component>

If your GitHub repo is public, the same method can be followed (<username>:<password> is not necessary though), or you can use this much nicer form.

deb https://<repo_host_username>.github.io/<repo_name>/ <codename> <component>

That's the whole point of GitHub pages, after all, that "nicer form".

Limitations

  • Files on stored GitHub can be no greater than 100 MB. This poses a significant issue for hosting APT repos, as 100 MB packages aren't too uncommon. Consider breaking your package up into multiple parts that are dependent on each other if you need to upload a package greater than 100 MB

Metadata

Release files for apt-repo-maker 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apt-repo-maker 3.0.0
File Size Uploaded Provenance Actions
apt_repo_maker-3.0.0.tar.gz 7.5 kB Without provenance Details for apt_repo_maker-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apt-repo-maker 3.0.0
File Interpreter ABI Platform Actions
apt_repo_maker-3.0.0-py3-none-any.whl Python 3 none any Details for apt_repo_maker-3.0.0-py3-none-any.whl

Total release size: 15.6 kB

Release files / apt_repo_maker-3.0.0.tar.gz

Download URL apt_repo_maker-3.0.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5d796262c78c4dc4014b721084f6875121f109387a8df5a0328ae4011f873abd
BLAKE2b-256 checksum
How to use checksums
f079597737ec8c6f6c805b44dae47129cb9b44d9f44eaa0798494f2f1635fb70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.5 Darwin/22.6.0

Release files / apt_repo_maker-3.0.0-py3-none-any.whl

Download URL apt_repo_maker-3.0.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14054b1aeb62ced0e4daa28482223c0465f1c3d6b19839522527dce8cdad4e8a
BLAKE2b-256 checksum
How to use checksums
0bcbd43bceabdc047aeb20d7332084c869561db98ddc4c7cdf5eacebd46610b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.5 Darwin/22.6.0

Security for apt-repo-maker 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page