Giter Site home page Giter Site logo

termux-apt-repo's Introduction

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.

termux-apt-repo's People

Contributors

2096779623 avatar bravegnu avatar fornwall avatar grimler91 avatar mawatech avatar pkulev avatar valpogus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

termux-apt-repo's Issues

Help

Help, create a repository and use GitHub pages, and I do everything to the letter, but when I put pkg update I get this error :
Screenshot_20210414-164953
Screenshot_20210414-165019

How To Fix This Error. Help

I Have Uploaded All The File To My Gitpage
After Adding Sources.list With Trused=Yes
After Giving Apt Update Command I Get This Error.Can Anyone Help Me
$ apt update
Hit:1 https://termux.net stable InRelease
Ign:3 https://dl.bintray.com/xeffyr/x11-packages x11 InRelease
Get:4 https://dl.bintray.com/xeffyr/x11-packages x11 Release [6055 B]
Hit:4 https://dl.bintray.com/xeffyr/x11-packages x11 Release
Ign:2 https://rootsh311.github.io/repo main InRelease
Ign:5 https://rootsh311.github.io/repo main Release
Ign:6 http://rootsh311.github.io/repo main/stable arm Packages
Ign:6 https://rootsh311.github.io/repo main/stable arm Packages
Ign:7 http://rootsh311.github.io/repo main/stable all Packages
Ign:7 https://rootsh311.github.io/repo main/stable all Packages
Ign:6 http://rootsh311.github.io/repo main/stable arm Packages
Ign:6 https://rootsh311.github.io/repo main/stable arm Packages
Ign:7 http://rootsh311.github.io/repo main/stable all Packages
Ign:7 https://rootsh311.github.io/repo main/stable all Packages
Ign:6 http://rootsh311.github.io/repo main/stable arm Packages
Ign:6 https://rootsh311.github.io/repo main/stable arm Packages
Ign:7 http://rootsh311.github.io/repo main/stable all Packages
Ign:7 https://rootsh311.github.io/repo main/stable all Packages
Err:6 http://rootsh311.github.io/repo main/stable arm Packages
404
Ign:6 https://rootsh311.github.io/repo main/stable arm Packages
Ign:7 https://rootsh311.github.io/repo main/stable all Packages
Reading package lists... Done
E: Failed to fetch http://rootsh311.github.io/repo/dists/main/stable/binary-arm/Packages 404
E: Some index files failed to download. They have been ignored, or old ones used instead.

Apt issue

I don't know what to do anyone please help me to resolve those error
I can't install any package in termux
Screenshot_20191001_233734

Some of the packages from termux.net don't work with termux-apt-repo

Thank you all, to those who are making this happen:

Stable / Testing / Experimental Termux 💪🙂 Distributions are the goals of this issue. Please assist in resolving them ASAP (As Soon As Possible).

g093 @Auxilus some of the packeges from termux.net don't work with terux-apt-repo
g093 subprocess.CalledProcessError: Command '['ar p storage/external-1/debs/termux.net/dists/stable/main/binary-arm/brogue-1.7.4_arm.deb control.tar.xz | tar --to-stdout -xJf - ./control']' returned non-zero exit status 2.
g093 any idea why?
g093 any¹?

IRC/Gitter bot Sep 07 23:59
g093 i wonder how debating GUI & Termux would look at a tech symposium?
screenshot_20170908-000527

Termux IRC Chat Log https://sdrausty.github.io/logs/ircFreenodeTermuxWeechatlog

$ termux-apt-repo storage/external-1/debs/termux.net/dists/stable/main/binary-arm/ ty/

screenshot_20170908-004405

termux/termux-packages#1398

Not working

I have compiled libsparse for termux and I will create a répondu with your script but it fails. Output:
Traceback (most recent call last):
File "/data/data/com.termux/files/usr/bin/termux-apt-repo", line 65, in
add_deb(deb_path)
File "/data/data/com.termux/files/usr/bin/termux-apt-repo", line 23, in add_deb
deb_to_add_control_file = control_file_contents(deb_to_add_path)
File "/data/data/com.termux/files/usr/bin/termux-apt-repo", line 19, in control_file_contents
stderr=subprocess.DEVNULL
File "/data/data/com.termux/files/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/data/data/com.termux/files/usr/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ar p downloads/libsparse_0.1_arm.deb control.tar.xz | tar --to-stdout -xJf - ./control']' returned non-zero exit status 2.

Apt repo does not detect a aarch64

Hello, I'm using termux-apt-repo to keep my project, but today something unexpected happened, the all and arm packages detects them, but the aarch64 ones don't, why?

Screenshot_20210621-122802
Screenshot_20210621-122658
Screenshot_20210621-122352
Screenshot_20210621-122834

apt error parse

E: Problem parsing dependency 20 of package:aarch64=1.0.0
E: Error occurred while processing package (NewVersion2)
E: Problem with MergeList /data/data/com.termux/files/usr/var/lib/apt/lists/repotermux.kryptonproject.my.id_dists_termux_sc_binary-aarch64_Packages
E: The package lists or status file could not be parsed or opened.

Unable to install or update

pkg install nano proot
Ign:1 https://dl.bintray.com/termux/termux-packages-24 stable InRelease
Ign:2 https://dl.bintray.com/grimler/game-packages-24 games InRelease Ign:3 https://dl.bintray.com/grimler/science-packages-24 science InRelease
Ign:4 https://dl.bintray.com/xeffyr/unstable-packages-24 unstable InRelease
Err:5 https://dl.bintray.com/termux/termux-packages-24 stable Release
403 Forbidden Get:6 https://dl.bintray.com/grimler/game-packages-24 games Release [5344 B]
Hit:6 https://dl.bintray.com/grimler/game-packages-24 games Release
Get:8 https://dl.bintray.com/grimler/science-packages-24 science Release [5348 B]
Hit:8 https://dl.bintray.com/grimler/science-packages-24 science Release
Get:10 https://dl.bintray.com/xeffyr/unstable-packages-24 unstable Release [6065 B] Hit:10 https://dl.bintray.com/xeffyr/unstable-packages-24 unstable Release
Reading package lists... Done
E: The repository 'https://dl.bintray.com/termux/termux-packages-24 stable Release' does no longer have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

I am getting this error please help.
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.