-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
bump|addpkg(main/{termux-core,termux-exec,tudo,sudo}) #18872
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
87d9faa to
b12bdb3
Compare
b12bdb3 to
db3ef28
Compare
…AGE@` TODO when termux/termux-packages#18872 gets merged: - Replace `@TERMUX_APP_PACKAGE@/@TERMUX_APP_PACKAGE@.app.*` with respective component name variables. - Replace `com.termux.termuxam.Am` with `TERMUX_AM__AM_CLASS__CLASS_NAME`.
…AGE@` TODO when termux/termux-packages#18872 gets merged: - Replace `@TERMUX_APP_PACKAGE@/@TERMUX_APP_PACKAGE@.app.*` with respective component name variables. - Replace `com.termux.termuxam.Am` with `TERMUX_AM__AM_CLASS__CLASS_NAME`.
db3ef28 to
9dde787
Compare
c6e89df to
f60666c
Compare
| for variable_name in TERMUX__PREFIX TERMUX_APP__DATA_DIR CGCT_DIR; do | ||
| variable_value="${!variable_name:-}" | ||
| if [[ ! "$variable_value" =~ ^(/[^/]+)+$ ]]; then | ||
| echo "The $variable_name '$variable_value' is not an absolute path under rootfs '/' while running 'clean.sh'." 1>&2 |
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.
I feel like these two could use a rename.
And probably also a comment because I just had to reference the man page to remember that ${!var} is an indirection, not a key lookup (${!arr[i]}).
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.
Which two and comment what? ${!var} is pretty common and loop items are clearly variable names anyways being expanded to a value.
3f2bff4 to
34a804f
Compare
|
The termux-packages/.github/workflows/packages.yml Lines 98 to 111 in 39e0f7a
|
a02f745 to
5c94e60
Compare
|
I have removed the c86229d commit so that The |
…directory set in `$TERMUX_PKG_SRCURL` if its in the format `file:///path/to/source/dir` The `/path/to/source/dir` must be an absolute and normalized path to a source directory on the local file system. Whatever was the current state of the local source directory when build was started, that is what will be built, without any changes to any `git` branches/tags. Any uncommitted changes to current `git` branch will also get built. Any value for `TERMUX_PKG_GIT_BRANCH` in the `build.sh` of the package will be ignored since a `tar` file will be created from the source directory and it will be used as is. No checksum checks like one set in `$TERMUX_PKG_SHA256` will be done, and a tar for source directory will be created every time package is built, assuming `-f/-F` flags are passed for rebuilds, and the `-r` flag (to be added later) will not be required. Note that to build from a local git repo, the `git+file:///path/to/source` format must be used with the `git+` prefix.
…in `$TERMUX_PKG_SRCURL` if its in the format `git+file:///path/to/source/git/dir` This got broken a while ago due to changes in pulling sources, although current format wasn't mandated. The `$TERMUX_PKG_SRCURL` must start with `git+` prefix like already used for other git `http` urls, followed by a `file://` url, where `/path/to/source/git/dir` is an absolute and normalized path to a source git directory on the local file system, with a `.git` sub directory. If the source directory has been cloned already in a previous build, then it will NOT be cloned again if `-f/-F` flags are passed for rebuilds, and the `-r` flag (to be added later) will be required to clone latest sources again/every time. Any uncommitted changes to `git` branch will NOT get built. An additional requirement is that the local git repository must have its `origin` url in `.git/config` as a `https` URL instead of a `ssh` (`git@`) URL if running in termux-packages docker container and `$TERMUX_PKG_GIT_BRANCH` is set, as it doesn't have `ssh` installed by default and `git fetch` would fail otherwise. So if local git repository needs to be cloned from an upstream git url itself, like GitHub, then use `https://github.com/org/repo.git` to clone instead of `git@github.com:org/repo.git`. Or you can install `ssh` inside docker and set up ssh keys manually.
…UILD__RM_ALL_PKGS_BUILT_MARKER_AND_INSTALL_FILES`
…ocess if `-a all` is passed
The `${parameter+word}` expansion will substitute word if "parameter is Set and Not Null" and also if "parameter is Set But Null". So if a variable is unset, or if set to any random value or empty string, even if its "false", then the flag will get passed.
For example running `TERMUX_DEBUG_BUILD= ./build-package.sh -I -f -r -a all termux-tools` or `TERMUX_DEBUG_BUILD=false ./build-package.sh -I -f -r -a all termux-tools` will pass the `-f` flag, even though it should not be. Ideally, command option variables should set to their default values before command options are parsed.
Additionally, the `${parameter:=word}` expansion will assign the word to the variable itself if "parameter is Set But Null" or "parameter is Unset", instead of just substituting temporarily, which would then cause potential problems when default value is to be set to the variables later in "current" build-package.sh process depending on some variable dependent logic, as variables would already be set. The "sub" build-package.sh process should not be passed `debian` and `bionic` as defaults, it should set its own default variables.
Also pass the `-i` and `-I` flag appropriately depending on what was originally passed instead of always passing the `-i` flag if `$TERMUX_INSTALL_DEPS` is set (to whatever), which would wipe TERMUX_PREFIX and built-packages dir.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
…dependent directories that `-f/-F` flags alone would not remove This includes the package cache directory (`$TERMUX_PKG_CACHEDIR`) containing package sources and host build directory (`$TERMUX_PKG_HOSTBUILD_DIR`). The `-r` flag is ignored if `-f/-F` flags are not passed. With `-f/-F` flags alone, latest package sources will not be re-downloaded on rebuilds if `$TERMUX_PKG_SRCURL` refers to `git+` URL, i.e for a branch (like `master`) that's being continuously updated on a remote git repository (`git+https://`) or in a local git repository directory (`git+file://`).
…` for checking built packages and quote variables for all related functions
…cond stage has already been run before" error if `ln` process used to create lock file got killed instead of failing to create lock file if it already existed Related termux/termux-app#4219
…it could be a different path than `/data` that is critical for build host like Termux docker Either delete entire `TERMUX_APP__DATA_DIR` if `TERMUX__PREFIX` directory exists under it, or only delete `TERMUX__PREFIX` directory itself if it exists outside it.
… directory before `cd` command for changes in a46e3e9
…ermux_step_elf_cleaner` for packages to hook into Packages may not want specific elf files to be stripped, like for debug `-g` test binaries, or may have elf files under different non-standard directories.
…function to file and provide `termux_step_create_debscripts__copy_from_dir()` for packages to copy debscripts from a custom directory into the current `DEBIAN` working directory
For example:
```shell
termux_step_create_debscripts() {
termux_step_create_debscripts__copy_from_dir "$TERMUX_PKG_SRCDIR/build/output/packaging/debian" .
}
```
…for `output` and `debs/built_${repo}_packages.txt`
… variables The `package` and `package_recipes` bash indexed array being used are using the `$var` expansion like `$packages` in the for loop while adding additional values, which will only expand to the first value of the array. Global arrays must always be unset with `=()` on initialization as `declare -a` alone will not unset them and old values with remain in case array variable is reused for a different logic. Package names should not be used in regexes without escaping them as they can contain special characters like `.`. Use fixed string line match `-Fx` with `grep` instead.
…ath for setting ownership of `TERMUX__PREFIX` and create `TERMUX_APP__DATA_DIR` as well in case `TERMUX__PREFIX` is not under it Ownership of `TERMUX__PREFIX` must be fixed before `TERMUX_APP__DATA_DIR` if its under it, otherwise `TERMUX__ROOTFS` will not have its ownership fixed and following error would occur during package dependency extraction. `tar: data/data/com.termux/files: Cannot change mode to rwxr-xr-x: Operation not permitted`
…chy under `/tmp` so that `TERMUX_PKGS__BUILD__REPO_ROOT_DIR` validation does not fail in `properties.sh` file and export `TERMUX_PKGS__BUILD__IS_DOCKER_BUILD` to skip reading `repo.json` into variables The `TERMUX_PKGS__BUILD__REPO_ROOT_DIR` validation checks if `scripts/properties.sh` file exists, which wouldn't exist under `scripts` directory if proper hierarchy is not created under `/tmp` directory. Files above the `scripts` directory are not accessible during `cd scripts; docker build`, so `repo.json` cannot be copied to `tmp`, which is read by `properties.sh`. So skip reading its variables until it can be moved to under `scripts` directory in future during docker build.
ae953b1 to
8a03e33
Compare
Related pull termux/termux-exec-package#24
DO NOT MERGE UNTIL CHANGES HAVE BEEN MERGED WITH
termux-execMASTER