Skip to content

Commit

Permalink
using httpd directly instead of apachectl script this is foobar on ub…
Browse files Browse the repository at this point in the history
…untu
  • Loading branch information
icing committed Jan 13, 2025
1 parent 705fb2d commit 80a320f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
26 changes: 23 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,30 @@ HTTPD_VERSION="$($APXS -q HTTPD_VERSION)"
AC_SUBST(HTTPD_VERSION)

APACHECTL="$sbindir/apachectl"
if test ! -x "$APACHECTL"; then
# rogue distros rename things! =)
APACHECTL="$sbindir/apache2ctl"
if test -x "$APACHECTL"; then
: # all fine
else
AC_PATH_PROG([APACHECTL], [apachectl])
if test "x$APACHECTL" = "x"; then
AC_MSG_ERROR([apachectl not in PATH])
fi
fi
AC_SUBST(APACHECTL)

HTTPD="$sbindir/httpd"
if test -x "$HTTPD"; then
: # all fine
else
AC_PATH_PROG([HTTPD], [httpd])
if test "x$HTTPD" = "x"; then
AC_PATH_PROG([HTTPD], [apache2])
fi
if test "x$HTTPD" = "x"; then
AC_MSG_ERROR([httpd/apache2 not in PATH])
fi
fi
AC_SUBST(HTTPD)

if test -x "$APACHECTL"; then
DSO_MODULES="$($APACHECTL -t -D DUMP_MODULES | fgrep '(shared)'| sed 's/_module.*//g'|tr -d \\n)"
AC_SUBST(DSO_MODULES)
Expand Down Expand Up @@ -459,6 +477,8 @@ AC_MSG_NOTICE([summary of build options:
Install prefix: ${prefix}
APXS: ${APXS}
HTTPD-VERSION: ${HTTPD_VERSION}
APACHECTL: ${APACHECTL}
HTTPD: ${HTTPD}
C compiler: ${CC} ${COMPILER_VERSION}
CFLAGS: ${CFLAGS}
WARNCFLAGS: ${WERROR_CFLAGS}
Expand Down
2 changes: 0 additions & 2 deletions test/modules/md/test_702_auto.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import time
from datetime import timedelta

import pytest
Expand Down Expand Up @@ -46,7 +45,6 @@ def test_md_702_001(self, env):
#
# restart, check that MD is synched to store
assert env.apache_restart() == 0, f'{env.apachectl_stderr}'
time.sleep(20)
env.check_md(domains)
stat = env.get_md_status(domain)
assert stat["watched"] == 0
Expand Down
3 changes: 2 additions & 1 deletion test/pyhttpd/config.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ libexecdir = @libexecdir@

apr_bindir = @APR_BINDIR@
apxs = @bindir@/apxs
apachectl = @sbindir@/apachectl
apachectl = @APACHECTL@
httpd = @HTTPD@

[httpd]
version = @HTTPD_VERSION@
Expand Down
3 changes: 2 additions & 1 deletion test/pyhttpd/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def __init__(self, pytestconfig=None):
self._apxs = self.config.get('global', 'apxs')
self._prefix = self.config.get('global', 'prefix')
self._apachectl = self.config.get('global', 'apachectl')
self._httpd = self.config.get('global', 'httpd')
if HttpdTestEnv.LIBEXEC_DIR is None:
HttpdTestEnv.LIBEXEC_DIR = self._libexec_dir = self.get_apxs_var('LIBEXECDIR')
self._curl = self.config.get('global', 'curl_bin')
Expand Down Expand Up @@ -670,7 +671,7 @@ def _run_apachectl(self, cmd) -> ExecResult:
env['APACHE_RUN_USER'] = os.environ['USER']
env['APACHE_LOCK_DIR'] = self._server_lock_dir
env['APACHE_CONFDIR'] = self._server_conf_dir
args = [self._apachectl,
args = [self._httpd,
"-d", self.server_dir,
"-f", os.path.join(self._server_dir, f'conf/{conf_file}'),
"-k", cmd]
Expand Down

0 comments on commit 80a320f

Please sign in to comment.