Git Product home page Git Product logo

termux-create-package's People

Contributors

agnostic-apollo avatar dependabot[bot] avatar fornwall avatar grimler91 avatar landfillbaby avatar mklein994 avatar wetitpig avatar yuriusu22 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

termux-create-package's Issues

Missing properties

As discussed on #termux, this script is missing the Homepage and Provides properties.

How To Add Custom Command On Deb Packages

How To Add Custom Commands On deb packages. If I Need To Install Some Pip requirement or ruby-gem. You Know Some Times Python Based Tools Need PIP requirements. I Hope You Can Understand

You cannot perform the script in Cygwin

The ruamel.yaml cannot be installed because it needs this Package: python-dev

Capture

Which is not Present Under Cygwin Repository Library.

Capture1

So yeah. Not Really Much like a bug, but more of compatibility issues

But idk if this can still run, cuz there is JSON, but i think the ruamel.yaml is important

Created packages cannot be added to repo using termux-apt-repo

Packages created with the command termux-create-package cannot be added to a repo using termux-apt-repo.

Steps to repoduce:

git clone 'https://github.com/termux/termux-apt-repo.git'
cd termux-apt-repo
python3 setup.py install --user
cd ..

git clone 'https://github.com/termux/termux-create-package.git'
cd termux-create-package
python3 setup.py install --user
cd ..

cat > helloworld << 'EOF'
#!/bin/bash
echo 'hello world!'
EOF
chmod +x helloworld

cat > helloworld_1.0_all.json << 'EOF'
{
  "name": "helloworld",
  "version": "1.0",
  "arch": "all",
  "description": "Hello World",
  "homepage": "http://localhost",
  "files": {
    "helloworld": "bin/helloworld"
  }
}
EOF

# build package and create repo
termux-create-package helloworld_1.0_all.json
mkdir pkg
cp helloworld_1.0_all.deb pkg/
mkdir repo
termux-apt-repo pkg/ repo/

Traceback (most recent call last):
File "/bin/termux-apt-repo", line 86, in
add_deb(deb_path, component, use_hard_links)
File "/bin/termux-apt-repo", line 23, in add_deb
deb_to_add_control_file = control_file_contents(deb_to_add_path)
File "/bin/termux-apt-repo", line 19, in control_file_contents
stderr=subprocess.DEVNULL
File "/usr/lib/python3.5/subprocess.py", line 316, in check_output
**kwargs).stdout
File "/usr/lib/python3.5/subprocess.py", line 398, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ar p pkg/helloworld_1.0_all.deb control.tar.xz | tar --to-stdout -xJf - ./control']' returned non-zero exit status 2

In my opinion, the problem is in line 59:
info = tarfile.TarInfo(name="control")
should be
info = tarfile.TarInfo(name="./control")
so that the control.tar file has the same structure as the packages compiled using build-package.sh.

# patch
cd termux-create-package
sed -i 's|info = tarfile.TarInfo(name="control")|info = tarfile.TarInfo(name="./control")|g' termux-create-package
python3 setup.py install --user
cd ..

# rebuild
rm helloworld_1.0_all.deb
rm -Rf pkg/ repo/
termux-create-package helloworld_1.0_all.json
mkdir pkg
cp helloworld_1.0_all.deb pkg/
mkdir repo
termux-apt-repo pkg/ repo/

Adding deb file: helloworld_1.0_all.deb...
Creating package file for extras and all...
Done!

Make the repo/ directory accessible at $REPO_URL

Users can then access the repo by adding a file at
$PREFIX/etc/apt/sources.list.d
containing:
deb [trusted=yes] $REPO_URL termux extras

[trusted=yes] is not needed if the repo has been signed with a gpg key

The problem occurs on Debian [GNU ar (GNU Binutils for Debian) 2.28] and Termux itself [GNU ar (GNU Binutils) 2.31.1].

termux-create-package Does not read images

Screenshot_20220315-195717
Screenshot_20220315-200040
Screenshot_20220315-200447

I have everything organized correctly, I already tried other things and I realize that termux-create-package does not read images, when adding a directory with images, the images are not added to the package.

Please arrange this.

Accessing custom package.

I've created my own package by putting up JSON file and using apt install ./
But if I try to execute it using my package name then it shows no command found ( package is successfully installed)
Please help me with the issue..

How to include an entire directory?

EDIT

I found the line for the directory recursion:

data_tarfile.add(input_file_path, arcname=output_file, recursive=False)

Note: Setting recursive=False to True will enable directory recursion.
From Python docs: tarfile.TarFile.add

I think recursion should be enabled by default.


I can't figure out how to include a directory. Does packaging an entire directory supported?

Suppose I have this setup:

.
├── bin
│   └── script
└── manifest.json

Can we just include the directory bin and be placed directly to the prefix (similar to how package.json#files works in npm)? Something like this:

"files": {
  "bin": "."
}

Would somehow result to this:

/data/data/com.termux/files/usr/bin/script

It would be very helpful for large number of files.

Error while building package

When i tried to build my package i got this error

Building termux-fetch_0.1_all.deb
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/termux-create-package", line 134, in <module>
    create_debfile(output_debfile_name, package_tmp_directory.name)
  File "/data/data/com.termux/files/usr/bin/termux-create-package", line 101, in create_debfile
    subprocess.check_call(["ar", 'r', debfile_output,
  File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 368, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/data/data/com.termux/files/usr/lib/python3.9/subprocess.py", line 1819, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ar'

create deb file not install ,given error.

When i make deb file with manifest.jeson file. This tool create perfectly deb file but when i testing deb file it given error.

dpkg-deb (subprocess): decompressing archive member: lzma write error: Broken pipe
dpkg-deb (subprocess): cannot copy archive member from 'o.deb' to decompressor pipe: fail
d to write (Broken pipe)
dpkg-deb: error: subprocess returned error exit status 2
Errors were encountered while processing:
o.deb

How To Add postint Script To .deb packages

I Have Created A .deb package. And It Requied Some pip package so i have create a postinit but i don't know where to put the postinit on manifest.json and the directory. Xeffry Please Help Me. Don't Close This Issuse Until I Get The Answer. If You Close This Issuse Without Answer Then I Will Open A New One

Add function to run scripts/commands during installation

Hello, I use termux-create-package and termux-apt-repo on my cell phone, everything is excellent, very versatile and easy to use, but I would like you to add the function of running a script during installation, to install things like example, python dependencies, or ask the user for a configuration, if you add it I would thank you very much, thank you for your time

Created Packages are Broken

Attempting to install the package using either apt install or dpkg --install results in an error.

$ dpkg --install ./traceroute_2.1.0_aarch64.deb
Preparing to unpack ./traceroute_2.1.0_aarch64.deb ...
Unpacking traceroute (2.1.0) ...
dpkg: error processing archive ./traceroute_2.1.0_aarch64.deb (--install):
 corrupted filesystem tarfile in package archive: unsupported PAX tar header type 'x'
Errors were encountered while processing:
 ./traceroute_2.1.0_aarch64.deb

How to use it?

In source code .Py. It says "resulting.deb file"
But at start it says .JSON file...?
I am so confused plz help me

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.