Commit Graph

249 Commits

Author SHA1 Message Date
db0631ed09 Remove libsystemd dependency from main httpd binary
Until this change httpd was linking libsystemd to the main httpd binary. If you want to run lightweight version of httpd in container, sometimes you just want to install
httpd binary with as little dependencies as possible to make container small in size and do not pull uncencessary dependencies and libraries.

This change will move all systemd library calls from listen.c to mod_systemd module and remove systemd linking from the main httpd bin.
Fixed mixed declaration and wrongly declared variable.

Submitted by: Luboš Uhliarik <luhliari redhat.com>

Github: closes #312


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1899784 13f79535-47bb-0310-9956-ffa450edef68
2022-04-12 15:43:04 +00:00
e47bb7df5c * acinclude.m4 (APACHE_CHECK_OPENSSL): Use standard "yes/no" output
for the OpenSSL version check, rather than OK/FAILED.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1885269 13f79535-47bb-0310-9956-ffa450edef68
2021-01-08 12:19:48 +00:00
189927b735 Add a new way to document changes
* Makefile.in: Define the update-changes target to merge the change files
  from the changes directory to the top of the CHANGES file and remove
  them afterwards. If a Subversion binary was found during configure try
  to svn rm them otherwise just delete them.

* configure.in: Search for the Subversion binary.

* acinclude.m4: Set the corresponding Makefile variable for the Subversion
  binary.

* README.CHANGES: New file to document the new approach.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879822 13f79535-47bb-0310-9956-ffa450edef68
2020-07-13 10:29:11 +00:00
bf3eb5a3e3 Revert r1876869 because on trunk server/listen.c
also has a dependency on libsystemd.
Thanks to jorton for pointing it out.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876873 13f79535-47bb-0310-9956-ffa450edef68
2020-04-23 10:18:12 +00:00
ee78d61e46 systemd dependencies are only needed by mod_systemd.
They should currently not be needed by httpd directly
or any other binary. So no need to add them to
HTTPD_LIBS.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876869 13f79535-47bb-0310-9956-ffa450edef68
2020-04-23 08:52:45 +00:00
6db29cc79e * acinclude.m4 (APACHE_CHECK_SYSTEMD): Remove redundant test.
Submitted by: Pascal Terjan <pterjan linuxfr.org>
PR: 57631


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1875128 13f79535-47bb-0310-9956-ffa450edef68
2020-03-12 16:16:28 +00:00
c0a2ea7ec2 * modules/loggers/config.m4, modules/md/config2.m4, acinclude.m4:
Correctly link mod_md and mod_log_json (and no other objects)
  against -ljansson.  Removes unnecessary deps on libjansson
  from other linked objects, and fixes mod_md static build.  (see
  https://travis-ci.org/apache/httpd/jobs/636789380)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1872776 13f79535-47bb-0310-9956-ffa450edef68
2020-01-14 12:50:12 +00:00
5e3277b05b mod_ssl: use OPENSSL_init_ssl() to initialise OpenSSL on versions 1.1+.
Reference: http://openssl.6102.n7.nabble.com/Shutting-down-openssl-is-the-correct-thing-to-do-nothing-td76857.html#a76862


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861950 13f79535-47bb-0310-9956-ffa450edef68
2019-06-23 21:55:48 +00:00
07e3fbd647 * configure.in, acinclude.m4: Inline APACHE_GEN_MAKEFILES in AC_CONFIG_COMMANDS
and run during the "normal" phase of ./config.status rather than as init-cmds.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1861787 13f79535-47bb-0310-9956-ffa450edef68
2019-06-21 13:30:17 +00:00
0507bb7e88 Define "state directory" for storing persistent child-writable state,
with default from config.layout, configurable via DefaultStateDir.

* server/core.c (set_state_dir, ap_state_dir_relative):
  New functions.
  
* config.layout, acinclude.m4, Makefile.in, configure.in: Define
  statedir variables, drop davlockdb.

* include/ap_config_layout.h.in: Define DEFAULT_REL_STATEDIR,
  DEFAULT_EXP_STATEDIR in place of _DAVLOCKDB.

* include/ap_mmn.h: Bump MMN minor.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1842929 13f79535-47bb-0310-9956-ffa450edef68
2018-10-05 15:25:04 +00:00
9adaa7ce09 * acinclude.m4 (APACHE_GEN_MAKEFILES): Respect configure --quiet by
sending fastgen output to the appropriate fd.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1835572 13f79535-47bb-0310-9956-ffa450edef68
2018-07-10 15:58:27 +00:00
20fb0366f6 Allow openssl.pc to be in lib64 (like other components).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1834497 13f79535-47bb-0310-9956-ffa450edef68
2018-06-27 12:15:32 +00:00
fbaec28178 Move APACHE_CHECK_JANSSON m4 macro to general includes so additional modules can use it.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829895 13f79535-47bb-0310-9956-ffa450edef68
2018-04-23 15:31:28 +00:00
df2cdee6e8 * support/Makefile.in, acinclude.m4: Add OpenSSL libraries at the end of the
ab link line, not the start.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1816534 13f79535-47bb-0310-9956-ffa450edef68
2017-11-28 09:31:00 +00:00
681948ae61 Revert r1814940: serf-1 has a different API,
so in order to support it more changes are necessary.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1814954 13f79535-47bb-0310-9956-ffa450edef68
2017-11-11 14:45:26 +00:00
89d7cd6814 Look for serf-1 instead of serf-0 during configure.
Using a fixed major version might not be the best
choice but using a fixed outdated one is even worse.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1814940 13f79535-47bb-0310-9956-ffa450edef68
2017-11-11 10:36:17 +00:00
89f3b1b7fc Follow up to r1812263.
As suggested by Joe, add --maintainer/debugger-mode's CFLAGS in
NOTEST_CFLAGS to avoid interractions with autoconf's AC_LANG_PROGRAM.

APACHE_ADD_GCC_CFLAG now also forces -Wno-strict-prototypes for -Werror
to work despite AC_LANG_PROGRAM generating this warning by itself.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1812301 13f79535-47bb-0310-9956-ffa450edef68
2017-10-16 16:12:26 +00:00
7b2bdcea91 PR60947: avoid CRYPTO_THREADID_set_callback() if possible
CRYPTO_THREADID_set_callback() is write-once, so if mod_ssl is unloaded
and reloaded into a different address, we'll crash if OpenSSL wasn't
also unloaded and reloaded at the same time. This can happen if another
module or library is using OpenSSL as well.

- OpenSSL 1.1.0 isn't affected.
- Certain platforms (Windows, BeOS, and POSIX-compliant systems) can
  make use of the default THREADID callback in OpenSSL 1.0.x.
- If the deprecated CRYPTO_set_id_callback() is available, we can use it
  instead of CRYPTO_THREADID_set_callback().

Otherwise, we have to fall back to CRYPTO_THREADID_set_callback(), but
hopefully that applies to a small percentage of users at this point.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791732 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 00:19:32 +00:00
4eeb7b5d2d configure: bump thread count for the &errno test
Increase the number of threads from three to ten. Patch by rjung.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791309 13f79535-47bb-0310-9956-ffa450edef68
2017-04-14 00:14:24 +00:00
d3ed155819 configure: check if &errno is thread-local for OpenSSL
This is step one for fixing, or at least mitigating, PR60947. Determine
which platforms can use the default OpenSSL (1.0.x) threadid-callback,
by recording the address of errno for several threads and testing that
they're all different.

The result of this test is put into the new macro,
AP_OPENSSL_USE_ERRNO_THREADID.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/trunk-openssl-threadid@1791054 13f79535-47bb-0310-9956-ffa450edef68
2017-04-11 23:59:31 +00:00
e0e7e49253 configure: remove orphaned APACHE_OUTPUT macro
The last use of APACHE_OUTPUT appears to have been removed back in
r87231.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753316 13f79535-47bb-0310-9956-ffa450edef68
2016-07-18 20:43:09 +00:00
d313a757fa Small change to r952007, ensure we don't wipe out the $enable_foomod value
when that value is 'shared'. The 'yes', 'shared', 'static' and 'no' values
are all valid.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750553 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 18:33:52 +00:00
113a5b38ba This is not C code... no semi, a colon is a noop
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750420 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 22:05:54 +00:00
31b6d84c9e Undo r1750418, miscommitted a local test
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750419 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 22:05:31 +00:00
55a500ebaa This isn't C ;) Colon for noop
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750418 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 22:04:13 +00:00
86a096011a Account for explicit enable- cases of 'shared', 'few', 'all', 'reallyall'
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750407 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 19:47:52 +00:00
6a3a4f5cc5 Ensure not-selected means 'no', once an APACHE_MODULE enable_foo is processed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750335 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 13:45:02 +00:00
3347e068bb Promote any static module to yes|shared if a required dependency is not static
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1749925 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 15:42:30 +00:00
7e0472f687 Support multiple module dependencies for the final prereq argument to the
APACHE_MODULE macro, as a comma separated list, e.g.

APACHE_MODULE(proxy_http2, [...], [proxy,http2])

will evaluate the availability of mod_proxy, followed by mod_http2


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1749658 13f79535-47bb-0310-9956-ffa450edef68
2016-06-22 12:22:44 +00:00
89605f9ee7 Use different variables to track normal
modules and MPMs during build.

Normal modules and MPMs follow different
rules in the config, e.g. we are only
allowed to have one active LoadModule
for an MPM in the config.

As a side effect, LoadModule for MPMs
will now come before LoadModule for
the normal modules.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1730079 13f79535-47bb-0310-9956-ffa450edef68
2016-02-12 17:46:38 +00:00
f80ac38222 Support for OpenSSL 1.1.0:
- don't check for SSLeay_version() in configure
  The function no longer exists in 1.1.0.
  It was replaced by OpenSSL_version().
- Switch between SSLeay_version(U) and
  OpenSSL_version() depending on version
  in modules/ssl/ssl_util_ssl.h.
- Use MODSSL_LIBRARY_DYNTEXT everywhere.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728981 13f79535-47bb-0310-9956-ffa450edef68
2016-02-07 16:12:34 +00:00
e1fa09b047 * Since r1724820 two modules, mod_http2 and mod_ssl, call APACHE_CHECK_OPENSSL,
with mod_http2 doing it first. Because the result of APACHE_CHECK_OPENSSL
  is cached this causes MOD_LDFLAGS and MOD_CFLAGS to remain unset for mod_ssl
  which in turn causes it not to be linked against Openssl which means that
  mod_ssl cannot be loaded if the Openssl libs haven't been loaded by other means
  already.
  Fix this by caching the values for MOD_LDFLAGS and MOD_CFLAGS created during
  the first run and set them in the cached case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725325 13f79535-47bb-0310-9956-ffa450edef68
2016-01-18 19:21:16 +00:00
d6ed470b92 m4: please any autoconf by quoting AC_DEFUN's names. PR 58126.
Submitted by: olli hauer <ohauer gmx.de>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1706918 13f79535-47bb-0310-9956-ffa450edef68
2015-10-05 20:52:51 +00:00
ea390af213 httpd compiles warning free on gcc and every new warning will be treated as an error, standard c-89 is enforced
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1702948 13f79535-47bb-0310-9956-ffa450edef68
2015-09-14 13:29:35 +00:00
8b52e26df1 moving m4 mod_h2 macro from global to module local config
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1698103 13f79535-47bb-0310-9956-ffa450edef68
2015-08-27 09:43:10 +00:00
4774dd4680 Add HTTPD_VERSION and HTTPD_MMN to the variables available with apxs -q
PR58202. 

Submitted By: Daniel Shahaf 
Committed By: covener




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1693919 13f79535-47bb-0310-9956-ffa450edef68
2015-08-03 15:37:07 +00:00
8c27a4cd1b reworked mod_h2 donation checkin into build system, added documentation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1690248 13f79535-47bb-0310-9956-ffa450edef68
2015-07-10 11:45:46 +00:00
0f10bfb7f0 mod_ssl: Check for RAND_egd() at configure time and only use it if present.
Fixes the build with LibreSSL which does not provide this function.

Submitted by: Bernard Spil <pil.oss gmail com>, stsp
Committed by: stsp


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1674542 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 17:03:47 +00:00
6ac752395e * mod_dav_fs: set default value of DavLockDB using installation layout
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1674222 13f79535-47bb-0310-9956-ffa450edef68
2015-04-17 07:28:50 +00:00
07605b2bad Generate #LoadModule directive in default httpd.conf for every --enable-mpms-shared. PR 53882.
Submitted by: olli hauer <ohauer gmx.de>
Committed by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1652930 13f79535-47bb-0310-9956-ffa450edef68
2015-01-19 08:14:48 +00:00
695d4cdd5d * acinclude.m4 (APACHE_CHECK_SYSTEMD): Actually use $PKGCONFIG, duh.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1614824 13f79535-47bb-0310-9956-ffa450edef68
2014-07-31 08:06:22 +00:00
81eecb045b * acinclude.m4 (APACHE_CHECK_SYSTEMD): Check first for libsystemd
with pkg-config since libsystemd-daemon is deprecated upstream.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1614823 13f79535-47bb-0310-9956-ffa450edef68
2014-07-31 08:01:07 +00:00
d91f672d4f * configure.in, acinclude.m4: Move systemd check to APACHE_CHECK_SYSTEMD
and use pkg-config where available.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1614821 13f79535-47bb-0310-9956-ffa450edef68
2014-07-31 07:56:44 +00:00
725978c554 Increase minimum required OpenSSL version to 0.9.8a (in preparation
for the next mod_ssl commit, which will rely on the get_rfcX_prime_Y
functions added in that release):

- remove obsolete #defines / macros

- in ssl_private.h, regroup definitions based on whether
  they depend on TLS extension support or not

- for ECC and SRP support, set HAVE_X and change the rather awkward
  #ifndef OPENSSL_NO_X lines accordingly

For the discussion prior to taking this step, see
https://mail-archives.apache.org/mod_mbox/httpd-dev/201309.mbox/%3C524275C7.9060408%40velox.ch%3E


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527294 13f79535-47bb-0310-9956-ffa450edef68
2013-09-29 10:12:47 +00:00
9c396d2432 mod_ssl/ab: only use "--static" for pkg-config when explicity requested
(by adding an "--enable-ssl-staticlib-deps" option to configure)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1429228 13f79535-47bb-0310-9956-ffa450edef68
2013-01-05 07:54:15 +00:00
78096fee34 Improve pkg-config usage for mod_ssl/ab:
also use pkg-config for determining the -l flags (and fall back
to a hardcoded default of "-lssl -lcrypto")

add --static to pkg-config invocations, so that libraries for
static linking are also taken into account (PR 54252 - note that
the additional flags will only appear in modules/ssl/modules.mk
and ab_LDFLAGS, so potential side effects are limited)

separate --libs-only-L and --libs-only-other into two invocations
(can't be used concurrently, only the first takes effect)

use --silence-errors where applicable


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1428184 13f79535-47bb-0310-9956-ffa450edef68
2013-01-03 07:23:27 +00:00
864d3d0d87 Follow on to r1393976 and r1396424:
mod_systemd: Specify "all" instead of "yes" (on Unix) so that APACHE_MODULE doesn't
             act as if the user requested it.

General: Fix APACHE_MODULE so that failed prereqs will disable a module unless the
         user requested it explicitly.

Result: By default systemd will be enabled where it actually works and disabled otherwise,
        but if the user requests it and the prereqs fail then configure will halt.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1396440 13f79535-47bb-0310-9956-ffa450edef68
2012-10-10 01:04:36 +00:00
67fde08ec7 Fix usage of MOD_* variables for MPM modules
r1385216 broke building of mpm event with serf support. To fix,

* introduce APACHE_MPMPATH_INIT/FINISH similar to
  APACHE_MODPATH_INIT/FINISH to create modules.mk and add
  MOD_* vars to it.
* change APACHE_MPM_MODULE to only append to modules.mk, not
  overwrite
* add APACHE_MPMPATH_INIT/FINISH to all MPMs


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1395252 13f79535-47bb-0310-9956-ffa450edef68
2012-10-07 08:56:45 +00:00
089f0eb0ac Spin off module-specific build options into separate build vars.
[second try, supersedes r1385214]

Add MOD_CFLAGS, MOD_LDFLAGS variables etc. to the build commands,
which are available to modules for customization on a per-subdir
basis (by adding definitions to modules.mk). Reduces the risk
of side-effects when a module needs to add CFLAGS, LDFLAGS etc.
and these would be added to the global settings (ALL_CFLAGS etc.).

Adapt build settings for mod_ssl, mod_socache_dc, mod_deflate,
mod_xml2enc, mod_proxy_html, and mod_lua to use the new MOD_xxx
build variables.

Change PICFLAGS, SHLTCFLAGS and LTCFLAGS into config vars, instead
of AC_SUBSTing them in build/rules.mk.in. For support/ab, introduce
ab_CFLAGS and ab_LDFLAGS, and define explicit make targets where
they appear at the proper position in the build commands.

Consistently use "--with-xxx=PATH" in configure help strings which
are used to specify a path to the installation directory of an
auxiliary package.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385216 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 06:19:13 +00:00
5b09bf5772 revert r1358167, in preparation of the next commit
(will give a more meaningful diff)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385213 13f79535-47bb-0310-9956-ffa450edef68
2012-09-16 05:54:16 +00:00