Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
fornwall committed Dec 14, 2024
2 parents c237ade + 3dbda88 commit bfa9eaf
Show file tree
Hide file tree
Showing 21 changed files with 2,197 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/bootstrap_archives.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
steps:
- name: Git clone
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Create bootstrap archive
run: ./scripts/generate-bootstraps.sh --architectures ${{ matrix.arch }}
- name: Store artifacts
Expand All @@ -42,6 +44,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Fetch bootstrap archives
uses: actions/download-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/command_not_found.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
with:
fetch-depth: 1
token: ${{ secrets.TERMUXBOT2_TOKEN }}
persist-credentials: false
- name: Revbump main/command-not-found
env:
GITHUB_TOKEN: ${{ secrets.TERMUXBOT2_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Build
run: |
cd ./scripts
Expand All @@ -35,6 +37,7 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}
persist-credentials: false
- name: Push
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && github.repository == 'termux-play-store/termux-packages'
run: |
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1000
persist-credentials: false
- name: Gather build summary
id: build-info
env:
MANUAL_INPUT_PACKAGES: ${{ github.event.inputs.packages }}
run: |
if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then
BASE_COMMIT=$(jq --raw-output .pull_request.base.sha "$GITHUB_EVENT_PATH")
Expand Down Expand Up @@ -110,7 +113,10 @@ jobs:
done<<<${CHANGED_FILES}
done
else
for pkg in ${{ github.event.inputs.packages }}; do
# Ensure MANUAL_INPUT_PACKAGES is newline free, and put it
# into an array
read -a PACKAGES <<< "${MANUAL_INPUT_PACKAGES//$'\n'/ }"
for pkg in "${PACKAGES[@]}"; do
repo_paths=$(jq --raw-output 'del(.pkg_format) | keys | .[]' repo.json)
found=false
for repo_path in $repo_paths; do
Expand Down Expand Up @@ -189,6 +195,8 @@ jobs:
fi
- name: Free additional disk space (if needed)
env:
DOCKER_BUILD: ${{ steps.build-info.outputs.docker-build }}
run: |
declare -a packages
for repo_path in $(jq --raw-output 'del(.pkg_format) | keys | .[]' repo.json); do
Expand All @@ -198,7 +206,7 @@ jobs:
fi
done
if [ ${{ steps.build-info.outputs.docker-build }} == 'false' ]; then
if [ "$DOCKER_BUILD" == 'false' ]; then
./scripts/setup-ubuntu.sh
sudo apt install ninja-build
sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(aspnetcore|cabal-|dotnet-|ghc-|libmono|mongodb-|mysql-|php)') \
Expand All @@ -209,6 +217,8 @@ jobs:
fi
- name: Build packages
env:
DOCKER_BUILD: ${{ steps.build-info.outputs.docker-build }}
run: |
declare -a packages
for repo_path in $(jq --raw-output 'del(.pkg_format) | keys | .[]' repo.json); do
Expand All @@ -218,8 +228,8 @@ jobs:
fi
done
if [ ${{ steps.build-info.outputs.docker-build }} == 'false' ]; then
NDK=$ANDROID_NDK ANDROID_HOME=$ANDROID_SDK_ROOT ./build-package.sh -i -a ${{ matrix.target_arch }} $packages
if [ "$DOCKER_BUILD" == 'false' ]; then
NDK=$ANDROID_NDK ANDROID_HOME=$ANDROID_SDK_ROOT ./build-package.sh -I -a ${{ matrix.target_arch }} $packages
elif [ -n "$packages" ]; then
./scripts/run-docker.sh ./build-package.sh -i -a ${{ matrix.target_arch }} $packages
fi
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Vagrant repo
run: |
# https://developer.hashicorp.com/vagrant/downloads#linux
Expand Down
4 changes: 2 additions & 2 deletions packages/neocmakelsp/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://github.com/Decodetalkers/neocmakelsp
TERMUX_PKG_DESCRIPTION="a cmake lsp based on tower-lsp and treesitter"
TERMUX_PKG_LICENSE=MIT
TERMUX_PKG_MAINTAINER=@termux
TERMUX_PKG_VERSION="0.8.12.2"
TERMUX_PKG_VERSION="0.8.13"
TERMUX_PKG_SRCURL=https://github.com/Decodetalkers/neocmakelsp/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=74f6979fc6e3dd2e5d58cce314eb0e71280b7da2a4874795634a01c01e0fbab2
TERMUX_PKG_SHA256=57c68173ddd2362d14a272a57eba25892ce0be02ac864b2d7f572e06f77ab55a
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_AUTO_UPDATE=true

Expand Down
32 changes: 32 additions & 0 deletions packages/starship/6342-fix-username.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From abad5e3de2d680f905d4b95349b1d6926cea36c2 Mon Sep 17 00:00:00 2001
From: David Knaack <[email protected]>
Date: Mon, 21 Oct 2024 19:10:17 +0200
Subject: [PATCH] fix(username): avoid using `whoami` on android

Closes #6340

Co-Authored-By: AminurAlam <[email protected]>
---
src/modules/username.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/username.rs b/src/modules/username.rs
index 8ba3509e44b9..59d6f8330f51 100644
--- a/src/modules/username.rs
+++ b/src/modules/username.rs
@@ -19,13 +19,13 @@ const USERNAME_ENV_VAR: &str = "USERNAME";
/// Does not display the username:
/// - If the option `username.detect_env_vars` is set with a negated environment variable [A]
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
- #[cfg(not(test))]
+ #[cfg(not(any(test, target_os = "android")))]
let mut username = whoami::fallible::username()
.inspect_err(|e| log::debug!("Failed to get username {e:?}"))
.ok()
.or_else(|| context.get_env(USERNAME_ENV_VAR))?;

- #[cfg(test)]
+ #[cfg(any(test, target_os = "android"))]
let mut username = context.get_env(USERNAME_ENV_VAR)?;

let mut module = context.new_module("username");
2 changes: 1 addition & 1 deletion packages/starship/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A minimal, blazing fast, and extremely customizable prom
TERMUX_PKG_LICENSE="ISC"
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
TERMUX_PKG_VERSION="1.21.1"
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/starship/starship/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=f543dfa3229441ca2a55b8a625ce4bad5756a896378b019f4d0f0e00cf34dcc8
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
3 changes: 3 additions & 0 deletions scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ PACKAGES+=" libzstd-dev"
# Needed by tree-sitter-c
PACKAGES+=" tree-sitter-cli"

# Needed by wlroots
PACKAGES+=" glslang-tools"

# Do not require sudo if already running as root.
SUDO="sudo"
if [ "$(id -u)" = "0" ]; then
Expand Down
22 changes: 22 additions & 0 deletions x11-packages/labwc/0001-fix-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/src/common/dir.c b/src/common/dir.c
index 59db410..fdce0ed 100644
--- a/src/common/dir.c
+++ b/src/common/dir.c
@@ -30,7 +30,7 @@ static struct dir config_dirs[] = {
.path = "labwc"
}, {
.prefix = "XDG_CONFIG_DIRS",
- .default_prefix = "/etc/xdg",
+ .default_prefix = "@TERMUX_PREFIX@/etc/xdg",
.path = "labwc",
}, {
.path = NULL,
@@ -47,7 +47,7 @@ static struct dir theme_dirs[] = {
.path = ".themes",
}, {
.prefix = "XDG_DATA_DIRS",
- .default_prefix = "/usr/share:/usr/local/share:/opt/share",
+ .default_prefix = "@TERMUX_PREFIX@/share:@TERMUX_PREFIX@/local/share:@TERMUX_PREFIX@/opt/share",
.path = "themes",
}, {
.path = NULL,
Loading

0 comments on commit bfa9eaf

Please sign in to comment.