strace: Update from 4.12 to 4.13
[termux-packages] / build-package.sh
index c6fe7f7..bed59bb 100755 (executable)
@@ -260,6 +260,7 @@ TERMUX_PKG_KEEP_STATIC_LIBRARIES="false"
 TERMUX_PKG_KEEP_HEADER_FILES="false"
 TERMUX_PKG_ESSENTIAL=""
 TERMUX_PKG_CONFLICTS="" # https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts
+TERMUX_PKG_REPLACES=""
 TERMUX_PKG_CONFFILES=""
 TERMUX_PKG_INCLUDE_IN_DEVPACKAGE=""
 TERMUX_PKG_DEVPACKAGE_DEPENDS=""
@@ -560,7 +561,7 @@ termux_step_massage () {
         find . -exec chmod u+w,o-rwx \{\} \;
        # .. strip binaries (setting them as writeable first)
        if [ "$TERMUX_DEBUG" = "" ]; then
-                find . -type f | xargs file | grep -E "(executable|shared object)" | grep ELF | cut -f 1 -d : | xargs $STRIP --strip-unneeded --preserve-dates -R '.gnu.version*'
+                find . -type f | xargs -r file | grep -E "(executable|shared object)" | grep ELF | cut -f 1 -d : | xargs -r $STRIP --strip-unneeded --preserve-dates -R '.gnu.version*'
        fi
         # Fix shebang paths:
         for file in `find -L . -type f`; do
@@ -569,7 +570,7 @@ termux_step_massage () {
        set -e -o pipefail
         # Remove DT_ entries which the android 5.1 linker warns about:
        if [ "$TERMUX_DEBUG" = "" ]; then
-               find . -type f -print0 | xargs -0 $TERMUX_ELF_CLEANER
+               find . -type f -print0 | xargs -r -0 $TERMUX_ELF_CLEANER
        fi
 
        test ! -z "$TERMUX_PKG_RM_AFTER_INSTALL" && rm -Rf $TERMUX_PKG_RM_AFTER_INSTALL
@@ -837,6 +838,7 @@ HERE
 test ! -z "$TERMUX_PKG_DEPENDS" && echo "Depends: $TERMUX_PKG_DEPENDS" >> DEBIAN/control
 test ! -z "$TERMUX_PKG_ESSENTIAL" && echo "Essential: yes" >> DEBIAN/control
 test ! -z "$TERMUX_PKG_CONFLICTS" && echo "Conflicts: $TERMUX_PKG_CONFLICTS" >> DEBIAN/control
+test ! -z "$TERMUX_PKG_REPLACES" && echo "Replaces: $TERMUX_PKG_REPLACES" >> DEBIAN/control
 
 # Create DEBIAN/conffiles (see https://www.debian.org/doc/debian-policy/ap-pkg-conffiles.html):
 for f in $TERMUX_PKG_CONFFILES; do echo $TERMUX_PREFIX/$f >> DEBIAN/conffiles; done