Merge branch 'ps/httpd-tests-on-nixos'

Portability tweak.

* ps/httpd-tests-on-nixos:
  t9164: fix inability to find basename(1) in Subversion hooks
  t/lib-httpd: stop using legacy crypt(3) for authentication
  t/lib-httpd: dynamically detect httpd and modules path
This commit is contained in:
Junio C Hamano
2023-12-09 16:37:46 -08:00
4 changed files with 23 additions and 7 deletions

View File

@ -55,21 +55,30 @@ fi
HTTPD_PARA=""
for DEFAULT_HTTPD_PATH in '/usr/sbin/httpd' '/usr/sbin/apache2'
for DEFAULT_HTTPD_PATH in '/usr/sbin/httpd' \
'/usr/sbin/apache2' \
"$(command -v httpd)" \
"$(command -v apache2)"
do
if test -x "$DEFAULT_HTTPD_PATH"
if test -n "$DEFAULT_HTTPD_PATH" && test -x "$DEFAULT_HTTPD_PATH"
then
break
fi
done
if test -x "$DEFAULT_HTTPD_PATH"
then
DETECTED_HTTPD_ROOT="$("$DEFAULT_HTTPD_PATH" -V 2>/dev/null | sed -n 's/^ -D HTTPD_ROOT="\(.*\)"$/\1/p')"
fi
for DEFAULT_HTTPD_MODULE_PATH in '/usr/libexec/apache2' \
'/usr/lib/apache2/modules' \
'/usr/lib64/httpd/modules' \
'/usr/lib/httpd/modules' \
'/usr/libexec/httpd'
'/usr/libexec/httpd' \
"${DETECTED_HTTPD_ROOT:+${DETECTED_HTTPD_ROOT}/modules}"
do
if test -d "$DEFAULT_HTTPD_MODULE_PATH"
if test -n "$DEFAULT_HTTPD_MODULE_PATH" && test -d "$DEFAULT_HTTPD_MODULE_PATH"
then
break
fi

View File

@ -1 +1 @@
user@host:xb4E8pqD81KQs
user@host:$apr1$LGPmCZWj$9vxEwj5Z5GzQLBMxp3mCx1

View File

@ -1 +1 @@
proxuser:2x7tAukjAED5M
proxuser:$apr1$RxS6MLkD$DYsqQdflheq4GPNxzJpx5.

View File

@ -46,6 +46,14 @@ setup_hook()
"passed to setup_hook" >&2 ; return 1; }
echo "cnt=$skip_revs" > "$hook_type-counter"
rm -f "$rawsvnrepo/hooks/"*-commit # drop previous hooks
# Subversion hooks run with an empty environment by default. We thus
# need to propagate PATH so that we can find executables.
cat >"$rawsvnrepo/conf/hooks-env" <<-EOF
[default]
PATH = ${PATH}
EOF
hook="$rawsvnrepo/hooks/$hook_type"
cat > "$hook" <<- 'EOF1'
#!/bin/sh
@ -63,7 +71,6 @@ EOF1
if [ "$hook_type" = "pre-commit" ]; then
echo "echo 'commit disallowed' >&2; exit 1" >>"$hook"
else
echo "PATH=\"$PATH\"; export PATH" >>"$hook"
echo "svnconf=\"$svnconf\"" >>"$hook"
cat >>"$hook" <<- 'EOF2'
cd work-auto-commits.svn