Skip to main content

Script to create Termux apt repositories

Project description

termux-apt-repo

Script to create Termux package repos.

It can be used to publish cross-compiled packages created using the Termux build setup or with packages created (possibly on-device) with termux-create-package.

Usage instructions

In Termux, install with pkg install termux-apt-repo and execute as:

termux-apt-repo [-h] [--use-hard-links] input output [dist] [comp]

positional arguments:
input             folder where .deb files are located
output            folder with repository tree
dist              name of distribution folder. deb files are put into
                  output/dists/distribution/component/binary-$ARCH/
comp              name of component folder. deb files are put into
                  output/dists/distribution/component/binary-$ARCH/

optional arguments:
-h, --help        show this help message and exit
--use-hard-links  use hard links instead of copying deb files. Will not work
                  on an android device
-s --sign         sign repo with GPG key

When using outside Termux (the script should work on most Linux distributions), install with pip3 install termux-apt-repo.

All the .deb files in the first directory will be published to a newly created APT repository in the second directory (which will be deleted if it exists, so take caution).

Publishing the generated folder

The published folder can be made available at a publicly accessible $REPO_URL using any method:

  1. By running termux-apt-repository on a web server directly.

  2. Using rsync: rsync --delete -r <apt-repository-directory> your.host:path/to/folder.

  3. Creating a zip or tar file and unpacking it at a web server.

  4. Any other creative way.

It can also be published using e.g. GitHub pages.

Accessing the repository

With the created <apt-repository-directory> available at $REPO_URL, users can access repo by creating a file:

$PREFIX/etc/apt/sources.list.d

containing the single line:

deb [trusted=yes] $REPO_URL $dist $comp

[trusted=yes] is needed if the repo has not been signed with a gpg key. To sign it, pass --sign argument. The signing key then has to be imported by the user to make apt trust it.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termux-apt-repo-0.5.tar.gz (8.9 kB view details)

Uploaded Source

File details

Details for the file termux-apt-repo-0.5.tar.gz.

File metadata

  • Download URL: termux-apt-repo-0.5.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for termux-apt-repo-0.5.tar.gz
Algorithm Hash digest
SHA256 20463bdafe93e2f4503796451bd235dab13e7f341e6042ff179ea9c245aa2cb2
MD5 bd2c9e6ad45d508d1eb6636eb4312fcc
BLAKE2b-256 1e782a11217f9ca81e707e28b4e1ebed98de7e68222ba1b691d6582cc05211c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page