From: Stefan Eissing Date: Mon, 23 Aug 2021 10:51:12 +0000 (+0000) Subject: * modules.conf is now build from a list of desired modules X-Git-Tag: 2.5.0-alpha2-ci-test-only~859 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c6bd7d3a3522d94e4daf10842094e60efc9c66c8;p=thirdparty%2Fapache%2Fhttpd.git * modules.conf is now build from a list of desired modules found in the file system. This accomodates builds that bind certain modules statically. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892543 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/modules/http2/conf/modules.conf.template b/test/modules/http2/conf/modules.conf.template deleted file mode 100644 index 233b1a92ec5..00000000000 --- a/test/modules/http2/conf/modules.conf.template +++ /dev/null @@ -1,43 +0,0 @@ -LoadModule log_config_module "${libexec_dir}/mod_log_config.so" -LoadModule logio_module "${libexec_dir}/mod_logio.so" -LoadModule unixd_module "${libexec_dir}/mod_unixd.so" -LoadModule version_module "${libexec_dir}/mod_version.so" -LoadModule watchdog_module "${libexec_dir}/mod_watchdog.so" -LoadModule authn_core_module "${libexec_dir}/mod_authn_core.so" -LoadModule authz_host_module "${libexec_dir}/mod_authz_host.so" -LoadModule authz_groupfile_module "${libexec_dir}/mod_authz_groupfile.so" -LoadModule authz_user_module "${libexec_dir}/mod_authz_user.so" -LoadModule authz_core_module "${libexec_dir}/mod_authz_core.so" -LoadModule access_compat_module "${libexec_dir}/mod_access_compat.so" -LoadModule auth_basic_module "${libexec_dir}/mod_auth_basic.so" -LoadModule cache_module "${libexec_dir}/mod_cache.so" -LoadModule cache_disk_module "${libexec_dir}/mod_cache_disk.so" -LoadModule cache_socache_module "${libexec_dir}/mod_cache_socache.so" -LoadModule socache_shmcb_module "${libexec_dir}/mod_socache_shmcb.so" -LoadModule dumpio_module "${libexec_dir}/mod_dumpio.so" -LoadModule reqtimeout_module "${libexec_dir}/mod_reqtimeout.so" -LoadModule filter_module "${libexec_dir}/mod_filter.so" -LoadModule mime_module "${libexec_dir}/mod_mime.so" -LoadModule env_module "${libexec_dir}/mod_env.so" -LoadModule headers_module "${libexec_dir}/mod_headers.so" -LoadModule setenvif_module "${libexec_dir}/mod_setenvif.so" -LoadModule slotmem_shm_module "${libexec_dir}/mod_slotmem_shm.so" -LoadModule ssl_module "${libexec_dir}/mod_ssl.so" -LoadModule status_module "${libexec_dir}/mod_status.so" -LoadModule autoindex_module "${libexec_dir}/mod_autoindex.so" -LoadModule cgid_module "${libexec_dir}/mod_cgid.so" -LoadModule dir_module "${libexec_dir}/mod_dir.so" -LoadModule alias_module "${libexec_dir}/mod_alias.so" -LoadModule rewrite_module "${libexec_dir}/mod_rewrite.so" -LoadModule deflate_module "${libexec_dir}/mod_deflate.so" -LoadModule proxy_module "${libexec_dir}/mod_proxy.so" -LoadModule proxy_http_module "${libexec_dir}/mod_proxy_http.so" -LoadModule proxy_balancer_module "${libexec_dir}/mod_proxy_balancer.so" -LoadModule proxy_hcheck_module "${libexec_dir}/mod_proxy_hcheck.so" - -LoadModule http2_module "${libexec_dir}/mod_http2.so" -LoadModule proxy_http2_module "${libexec_dir}/mod_proxy_http2.so" - -# Load the local test module also into the server -LoadModule h2test_module "${test_dir}/mod_h2test/.libs/mod_h2test.so" - diff --git a/test/modules/http2/config.ini.in b/test/modules/http2/config.ini.in index b89f4938bce..52607d8a3bf 100644 --- a/test/modules/http2/config.ini.in +++ b/test/modules/http2/config.ini.in @@ -13,8 +13,6 @@ libexecdir = @libexecdir@ apr_bindir = @APR_BINDIR@ apxs = @APR_BINDIR@/apxs apachectl = @sbindir@/apachectl -mpm_modules = @MPM_MODULES@ -enabled_mpm_module = @ENABLED_MPM_MODULE@ dso_modules = @DSO_MODULES@ [httpd] diff --git a/test/modules/http2/h2_env.py b/test/modules/http2/h2_env.py index b3e98520d27..0e59774b191 100644 --- a/test/modules/http2/h2_env.py +++ b/test/modules/http2/h2_env.py @@ -30,6 +30,46 @@ class Dummy: class H2TestSetup: + # the modules we want to load + MODULES = [ + "log_config", + "logio", + "unixd", + "version", + "watchdog", + "authn_core", + "authz_host", + "authz_groupfile", + "authz_user", + "authz_core", + "access_compat", + "auth_basic", + "cache", + "cache_disk", + "cache_socache", + "socache_shmcb", + "dumpio", + "reqtimeout", + "filter", + "mime", + "env", + "headers", + "setenvif", + "slotmem_shm", + "ssl", + "status", + "autoindex", + "cgid", + "dir", + "alias", + "rewrite", + "deflate", + "proxy", + "proxy_http", + "proxy_balancer", + "proxy_hcheck", + ] + def __init__(self, env: 'H2TestEnv'): self.env = env @@ -38,6 +78,7 @@ class H2TestSetup: self._make_conf() self._make_htdocs() self._make_h2test() + self._make_modules_conf() def _make_dirs(self): if os.path.exists(self.env.gen_dir): @@ -86,6 +127,19 @@ class H2TestSetup: capture_output=True, check=True, cwd=os.path.join(self.env.test_dir, 'mod_h2test')) + def _make_modules_conf(self): + modules_conf = os.path.join(self.env.server_dir, 'conf/modules.conf') + with open(modules_conf, 'w') as fd: + # issue load directives for all modules we want that are shared + for m in self.MODULES: + mod_path = os.path.join(self.env.libexec_dir, f"mod_{m}.so") + if os.path.isfile(mod_path): + fd.write(f"LoadModule {m}_module \"{mod_path}\"\n") + for m in ["http2", "proxy_http2"]: + fd.write(f"LoadModule {m}_module \"{self.env.libexec_dir}/mod_{m}.so\"\n") + # load our test module which is not installed + fd.write(f"LoadModule h2test_module \"{self.env.test_dir}/mod_h2test/.libs/mod_h2test.so\"\n") + class H2TestEnv: @@ -110,11 +164,13 @@ class H2TestEnv: self._test_dir = self.config.get('test', 'test_dir') self._test_src_dir = self.config.get('test', 'test_src_dir') self._gen_dir = self.config.get('test', 'gen_dir') - self._server_dir = self.config.get('test', 'server_dir') + self._server_dir = os.path.join(self._gen_dir, 'apache') self._server_conf_dir = os.path.join(self._server_dir, "conf") self._server_docs_dir = os.path.join(self._server_dir, "htdocs") self._server_logs_dir = os.path.join(self.server_dir, "logs") self._server_error_log = os.path.join(self._server_logs_dir, "error_log") + + self._dso_modules = self.config.get('global', 'dso_modules').split(' ') self._domains = [ f"test1.{self._http_tld}", f"test2.{self._http_tld}", @@ -228,6 +284,10 @@ class H2TestEnv: def libexec_dir(self) -> str: return self._libexec_dir + @property + def dso_modules(self) -> List[str]: + return self._dso_modules + @property def server_conf_dir(self) -> str: return self._server_conf_dir