-
Notifications
You must be signed in to change notification settings - Fork 99
Rewrite termux-create-package #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
### Added - Add support for `YAML` format for manifests. - Add support for custom permissions and ownership of data files. - Add support to automatically set permissions and ownership to control tar files. - Add support to automatically add `Installed-Size` field to `control` file. - Add support to automatically generate `md5sums` file. - Add support to automatically add other controls files `config`, `conffiles`, `templates`, `shlibs` to control tar. - Add support to add custom `control` file fields. - Add support for control and data tar compression type and format. - Add support for `--control-files-dir`, `--deb-dir`, `--deb-name`, `--files-dir`, `--pkg-arch`, `--pkg-version` and `--yaml` comamnd line options. - Add support of `installation_prefix`, `files_dir`, `tar_compression`, `tar_format`, `deb_dir`, `deb_name`, `deb_architecture_tag`, `control_files_dir`, `maintainer_scripts_shebang`, `conffiles_prefix_to_replace`, `fix_perms`, `allow_bad_user_names_and_ids`, `ignore_android_specific_rules` create info fields in manifest. - Add support of `source`, `perm`, `fix_perm`, `source_ownership`, `owner_uid`, `owner_uname`, `owner_gid`, `owner_gname`, `is_conffile` attribute fields for `data_files` dictionary in manifest. - Add support of `ignore`, `ignore_if_no_exist`, `source_readlink`, `source_recurse`, `set_parent_perm`, `symlink_destinations`, `set_shebang` action fields for `data_files` dictionary in manifest. - Add support to automatically add `termux-create-package` script and `sha256sums.txt` to releases. ### Changed - The manifest format has been completely changed, but backward compatibility still maintained. Check `README.md` for details. The `files` dictionary has been replaced with `data_files`. The `control` file fields are to be added to the `control` dictionary. - Extended manifest validation so that debs comply with debian and `dpkg` rules. - The manifest `Depends`, `Provides`, `Conflicts` and other package relationship fields should be of type `string` now instead of a `list`. - The manifest `Description` and other multi-line field values should be of type `list` now instead of a `string`. - The `--prefix` must now be an absolute path.
setup.py
Outdated
version="0.11", | ||
author="Fredrik Fornwall", | ||
author_email="fredrik@fornwall.net", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of feels like a rewrite (with +5k lines) deserves a version bump and author change.. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I guess ;) I guess I can add my name to the field. Hopefully, python packaging policy hasn't changed since 2009 to allow multiple authors.
excellent !, this will help a lot to the automation and creation of packages for termux, many people will find it useful and it will encourage the use of deb packages to package projects |
Instructions were copied from one of my lib repos, hence had different permissions.
Thanks. Automation was my goal too. I have added install instructions in main comment above. |
I am already using your update. but I need a favor, can you give me an example of how to add a postins / postrm to the package? I didn't see how to do that in the documentation and I need it. |
It is documented at https://github.com/agnostic-apollo/termux-create-package/tree/rewrite#Other-Control-Files
|
Do you mean that if there is a folder called "control_files_dir" in the place of the script, it will automatically add the scripts that are inside that folder? |
No, those are keys where you supply the path. Check https://github.com/agnostic-apollo/termux-create-package/blob/rewrite/examples/goodbye-world/manifest-android-termux.yml#L16 and https://github.com/agnostic-apollo/termux-create-package/tree/rewrite/examples/goodbye-world/control of |
Oh, thanks! |
When will it be available? |
Well, like mostly always, nobody or not many are interested in testing (huge) changes, so will just merge after bumping versions and update package in |
Oh, ok |
Check
README.md
for further details. It seems to be working fine for both ubuntu and termux (android7
) as per my tests. Let me know if there are any issues. I'll wait a while for feedback before bumping version and merging. A single commit was done since pretty much everything has been replaced or deleted from previous versions and this is more like an initial commit.Release workflow and manual install instructions do need to be tested. Looks fine, final tests would need to be done after merging anyways.
Added
YAML
format for manifests.Installed-Size
field tocontrol
file.md5sums
file.config
,conffiles
,templates
,shlibs
to control tar.control
file fields.--control-files-dir
,--deb-dir
,--deb-name
,--files-dir
,--pkg-arch
,--pkg-version
and--yaml
comamnd line options.installation_prefix
,files_dir
,tar_compression
,tar_format
,deb_dir
,deb_name
,deb_architecture_tag
,control_files_dir
,maintainer_scripts_shebang
,conffiles_prefix_to_replace
,fix_perms
,allow_bad_user_names_and_ids
,ignore_android_specific_rules
create info fields in manifest.source
,perm
,fix_perm
,source_ownership
,owner_uid
,owner_uname
,owner_gid
,owner_gname
,is_conffile
attribute fields fordata_files
dictionary in manifest.ignore
,ignore_if_no_exist
,source_readlink
,source_recurse
,set_parent_perm
,symlink_destinations
,set_shebang
action fields fordata_files
dictionary in manifest.termux-create-package
script andsha256sums.txt
to releases.Changed
README.md
for details. Thefiles
dictionary has been replaced withdata_files
. Thecontrol
file fields are to be added to thecontrol
dictionary.dpkg
rules.Depends
,Provides
,Conflicts
and other package relationship fields should be of typestring
now instead of alist
.Description
and other multi-line field values should be of typelist
now instead of astring
.--prefix
must now be an absolute path.Install instructions
You can run following commands to install the updated script.
Termux
Linux Distros