From: Viktor Szakats Date: Mon, 10 Nov 2025 15:49:11 +0000 (+0100) Subject: scripts: use end-of-options marker in `find -exec` commands X-Git-Tag: rc-8_18_0-1~364 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aab1dc2639d4fc8aaaa1190914b0491e029dace;p=thirdparty%2Fcurl.git scripts: use end-of-options marker in `find -exec` commands Closes #19450 --- diff --git a/.github/workflows/checksrc.yml b/.github/workflows/checksrc.yml index 8f79f1ca6d..7aa8faf6a2 100644 --- a/.github/workflows/checksrc.yml +++ b/.github/workflows/checksrc.yml @@ -91,7 +91,7 @@ jobs: - name: 'pytype' run: | source ~/venv/bin/activate - find . -name '*.py' -exec pytype -j auto -k {} + + find . -name '*.py' -exec pytype -j auto -k -- {} + - name: 'ruff' run: | diff --git a/.github/workflows/http3-linux.yml b/.github/workflows/http3-linux.yml index d242c06116..a844eb6c14 100644 --- a/.github/workflows/http3-linux.yml +++ b/.github/workflows/http3-linux.yml @@ -587,7 +587,7 @@ jobs: cargo build -v --package quiche --release --features ffi,pkg-config-meta,qlog --verbose ln -s libquiche.so target/release/libquiche.so.0 mkdir -v quiche/deps/boringssl/src/lib - find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf '{}' quiche/deps/boringssl/src/lib \; + find target/release \( -name libcrypto.a -o -name libssl.a \) -exec ln -vnf -- '{}' quiche/deps/boringssl/src/lib \; # include dir # /home/runner/quiche/quiche/deps/boringssl/src/include diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0e0d03bc4f..fc624dc09a 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -184,7 +184,7 @@ jobs: fi - name: 'curl info' - run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file '{}' \; + run: find . -type f \( -name curl -o -name '*.dylib' -o -name '*.a' \) -exec file -- '{}' \; - name: 'build tests' run: | diff --git a/.github/workflows/non-native.yml b/.github/workflows/non-native.yml index 523a6761e6..7813c694a5 100644 --- a/.github/workflows/non-native.yml +++ b/.github/workflows/non-native.yml @@ -310,7 +310,7 @@ jobs: fi - name: 'curl info' - run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file '{}' \; + run: find . -type f \( -name curl -o -name '*.so' -o -name '*.a' \) -exec file -- '{}' \; - name: 'build tests' run: | diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index bcb846d806..15a586b12f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -133,7 +133,7 @@ jobs: timeout-minutes: 1 run: | PATH=/usr/bin - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \; + find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \; if [ "${MATRIX_BUILD}" = 'cmake' ]; then PATH="$PWD/bld/lib:$PATH" fi @@ -337,7 +337,7 @@ jobs: # avoid libtool's curl.exe wrapper for shared builds mv bld/src/.libs/curl.exe bld/src/curl.exe || true fi - find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \; + find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \; if [ "${MATRIX_TEST}" != 'uwp' ]; then # curl: error initializing curl library bld/src/curl.exe --disable --version fi @@ -548,7 +548,7 @@ jobs: - name: 'curl -V' timeout-minutes: 1 run: | - /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \; + /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \; PATH="$PWD/bld/lib:$PATH" bld/src/curl.exe --disable --version @@ -667,7 +667,7 @@ jobs: fi - name: 'curl info' - run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file '{}' \; + run: find . \( -name '*.exe' -o -name '*.dll' -o -name '*.a' \) -exec file -- '{}' \; - name: 'build tests' if: ${{ matrix.build == 'cmake' && matrix.compiler != 'clang-tidy' }} # Save time by skipping this for autotools and clang-tidy @@ -907,7 +907,7 @@ jobs: - name: 'curl -V' timeout-minutes: 1 run: | - /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file '{}' \; + /usr/bin/find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \; if [ "${MATRIX_PLAT}" != 'uwp' ]; then # Missing: ucrtbased.dll, VCRUNTIME140D.dll, VCRUNTIME140D_APP.dll PATH="$PWD/bld/lib/${MATRIX_TYPE}:$PATH" "bld/src/${MATRIX_TYPE}/curl.exe" --disable --version diff --git a/Makefile.am b/Makefile.am index 7b2f05f92e..f60c50e5ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -91,7 +91,7 @@ pkgconfig_DATA = libcurl.pc dist-hook: rm -rf $(top_builddir)/tests/log - find $(distdir) -name "*.dist" -exec rm {} \; + find $(distdir) -name "*.dist" -exec rm -- {} \; (distit=`find $(srcdir) -name "*.dist" | grep -v Makefile`; \ for file in $$distit; do \ strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \ diff --git a/appveyor.sh b/appveyor.sh index 4be76095ee..81407f7f33 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -98,7 +98,7 @@ elif [ "${BUILD_SYSTEM}" = 'VisualStudioSolution' ]; then curl="build/Win32/${VC_VERSION}/${PRJ_CFG}/curld.exe" fi -find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file '{}' \; +find . \( -name '*.exe' -o -name '*.dll' -o -name '*.lib' -o -name '*.pdb' \) -exec file -- '{}' \; if [ -z "${SKIP_RUN:-}" ]; then "${curl}" --disable --version else diff --git a/scripts/maketgz b/scripts/maketgz index d7059554d3..e6bc53dcdc 100755 --- a/scripts/maketgz +++ b/scripts/maketgz @@ -70,7 +70,7 @@ fi # As a precaution, remove all *.dist files that may be lying around, to reduce # the risk of old leftovers getting shipped. echo "removing all old *.dist files" -find . -name "*.dist" -exec rm {} \; +find . -name "*.dist" -exec rm -- {} \; numeric="$(printf "%02x%02x%02x\n" "$major" "$minor" "$patch")" @@ -184,7 +184,7 @@ retar() { mkdir "$tempdir" cd "$tempdir" gzip -dc "../$targz" | tar -xf - - find curl-* -depth -exec touch -c -t "$filestamp" '{}' + + find curl-* -depth -exec touch -c -t "$filestamp" -- '{}' + tar --create --format=ustar --owner=0 --group=0 --numeric-owner --sort=name curl-* | gzip --best --no-name > out.tar.gz mv out.tar.gz ../ cd ..