Update repo

This commit is contained in:
termux-pacman-bot
2025-04-27 21:35:50 +00:00
parent 7fd74888ea
commit e118e03016
4 changed files with 16 additions and 19 deletions

View File

@@ -336,8 +336,8 @@ source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_install_service_scripts.sh"
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_install_license.sh" source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_install_license.sh"
# Function to cp (through tar) installed files to massage dir # Function to cp (through tar) installed files to massage dir
# shellcheck source=scripts/build/termux_step_extract_into_massagedir.sh # shellcheck source=scripts/build/termux_step_copy_into_massagedir.sh
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_extract_into_massagedir.sh" source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_copy_into_massagedir.sh"
# Hook function to create {pre,post}install, {pre,post}rm-scripts for subpkgs # Hook function to create {pre,post}install, {pre,post}rm-scripts for subpkgs
# shellcheck source=scripts/build/termux_step_create_subpkg_debscripts.sh # shellcheck source=scripts/build/termux_step_create_subpkg_debscripts.sh
@@ -710,7 +710,7 @@ for ((i=0; i<${#PACKAGE_LIST[@]}; i++)); do
termux_step_install_service_scripts termux_step_install_service_scripts
termux_step_install_license termux_step_install_license
cd "$TERMUX_PKG_MASSAGEDIR" cd "$TERMUX_PKG_MASSAGEDIR"
termux_step_extract_into_massagedir termux_step_copy_into_massagedir
termux_step_massage termux_step_massage
cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX_CLASSICAL" cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX_CLASSICAL"
termux_step_post_massage termux_step_post_massage

View File

@@ -61,7 +61,7 @@ fi
# only delete `TERMUX__PREFIX` since its parent directories could # only delete `TERMUX__PREFIX` since its parent directories could
# be a critical directory in `TERMUX_REGEX__INVALID_TERMUX_PREFIX_PATHS`. # be a critical directory in `TERMUX_REGEX__INVALID_TERMUX_PREFIX_PATHS`.
# This should not be an issue as package files are only packed # This should not be an issue as package files are only packed
# from `TERMUX_PREFIX_CLASSICAL` via `termux_step_extract_into_massagedir()`. # from `TERMUX_PREFIX_CLASSICAL` via `termux_step_copy_into_massagedir()`.
if [[ "$TERMUX__PREFIX" == "$TERMUX_APP__DATA_DIR" ]] || \ if [[ "$TERMUX__PREFIX" == "$TERMUX_APP__DATA_DIR" ]] || \
[[ "$TERMUX__PREFIX" == "$TERMUX_APP__DATA_DIR/"* ]]; then [[ "$TERMUX__PREFIX" == "$TERMUX_APP__DATA_DIR/"* ]]; then
deletion_dir="$TERMUX_APP__DATA_DIR" deletion_dir="$TERMUX_APP__DATA_DIR"

View File

@@ -0,0 +1,12 @@
termux_step_copy_into_massagedir() {
local DEST="$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX_CLASSICAL"
cd "$TERMUX_PREFIX_CLASSICAL"
mkdir -p "$DEST"
# Recreate each new directory and copy its metadata in one go
find . -path ./tmp -prune -o -type d -newer "$TERMUX_BUILD_TS_FILE" \
-exec mkdir -p "$DEST"/{} \; -exec chmod --reference="{}" "$DEST"/{} \;
# Copy only files modified during the build preserving original modes in order to massage them
# xargs is needed to avoid exceeding ARG_MAX
find . -path ./tmp -prune -o -newer "$TERMUX_BUILD_TS_FILE" \( -type f -o -type l \) \
-exec cp -P --preserve=all --parents -t "$DEST" {} +
}

View File

@@ -1,15 +0,0 @@
termux_step_extract_into_massagedir() {
local TARBALL_ORIG=$TERMUX_PKG_PACKAGEDIR/${TERMUX_PKG_NAME}_orig.tar.gz
# Build diff tar with what has changed during the build:
cd $TERMUX_PREFIX_CLASSICAL
tar -N "$TERMUX_BUILD_TS_FILE" \
--exclude='tmp' \
-czf "$TARBALL_ORIG" .
# Extract tar in order to massage it
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX_CLASSICAL"
cd "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX_CLASSICAL"
tar xf "$TARBALL_ORIG"
rm "$TARBALL_ORIG"
}