diff --git a/SUSE-NOTICE b/SUSE-NOTICE
deleted file mode 100644
index e08ee0d..0000000
--- a/SUSE-NOTICE
+++ /dev/null
@@ -1,13 +0,0 @@
-
-The SUSE build of apache2 contains the following modifications:
- * assert HAVE_POLL during compilation (safety measure)
- * small fixes in apachectl to make it work with multiple MPMs, and
- use w3m alternatively to lynx
- * avoid error if compiled with openssl 0.9.6e
- * added patch to experimental caching module that fixes segfault for 'GET
- https://whatever.html HTTP/1.0' request on HTTP Port
- (/modules/experimental/cache_util.c)
- * RFC 2817 TLS upgrade backported from 2.1
- * fixed log_server_status to use Socket.pm and match our configuration
- * fixed check_forensic script (adjusted for GNU tools, use safe tmpdir)
- * http://www.apache.org/dist/httpd/patches/apply_to_2.0.52/util_ldap_cache_mgr.c.patch
diff --git a/_multibuild b/_multibuild
new file mode 100644
index 0000000..26a5726
--- /dev/null
+++ b/_multibuild
@@ -0,0 +1,14 @@
+
+ mpm_event
+ mpm_worker
+ mpm_prefork
+ utils
+ devel
+ manual
+ test_mpm_event
+ test_mpm_worker
+ test_mpm_prefork
+ test_devel
+ test_main
+
+
diff --git a/apache-22-24-upgrade b/apache-22-24-upgrade
deleted file mode 100644
index cff684b..0000000
--- a/apache-22-24-upgrade
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/bash
-
-# obsolete 2.2 modules -> 2.4 modules
-
-for module in mod_authn_default mod_authz_default mod_mem_cache authz_default authn_default mem_cache; do
- if /usr/sbin/a2enmod -q "$module"; then
- echo "!!ATTENTION! $module was removed from apache version 2.4 or later, CHECK YOUR CONFIGURATION!!!"
- /usr/sbin/a2dismod "$module"
- fi
-done
-
-if ! /usr/sbin/a2enmod -q authn_core; then
- /usr/sbin/a2enmod authn_core
-fi
-
-if ! /usr/sbin/a2enmod -q authz_core; then
- /usr/sbin/a2enmod authz_core
-fi
-
-if ! /usr/sbin/a2enmod -q log_config; then
- /usr/sbin/a2enmod log_config
-fi
diff --git a/apache-test-application-xml-type.patch b/apache-test-application-xml-type.patch
new file mode 100644
index 0000000..0520def
--- /dev/null
+++ b/apache-test-application-xml-type.patch
@@ -0,0 +1,12 @@
+Index: httpd-framework/t/conf/extra.conf.in
+===================================================================
+--- a/httpd-framework/t/conf/extra.conf.in 2020-06-15 10:43:26.156701553 +0200
++++ b/httpd-framework/t/conf/extra.conf.in 2020-06-15 10:46:16.141693081 +0200
+@@ -875,6 +875,7 @@ LimitRequestFields 32
+
+
+
++ AddType application/xml .xml
+
+ AddOutputFilterByType DEFLATE application/xml
+ AddOutputFilterByType DEFLATE text/xml
diff --git a/apache-test-turn-off-variables-in-ssl-var-lookup.patch b/apache-test-turn-off-variables-in-ssl-var-lookup.patch
new file mode 100644
index 0000000..0c7eac2
--- /dev/null
+++ b/apache-test-turn-off-variables-in-ssl-var-lookup.patch
@@ -0,0 +1,14 @@
+Index: httpd-framework/t/ssl/varlookup.t
+===================================================================
+--- a/httpd-framework/t/ssl/varlookup.t 2016-10-25 14:30:54.250707932 +0200
++++ b/httpd-framework/t/ssl/varlookup.t 2016-10-27 15:38:52.440667690 +0200
+@@ -210,9 +210,7 @@ SSL_SERVER_S_DN_UID
+ SSL_CLIENT_S_DN_Email "$client_dn{$email_field}"
+ SSL_SERVER_S_DN_Email "$server_dn{$email_field}"
+ SSL_CLIENT_SAN_Email_0 "$san_email"
+-SSL_SERVER_SAN_DNS_0 "$san_dns"
+ SSL_CLIENT_SAN_OTHER_msUPN_0 "$san_msupn"
+-SSL_SERVER_SAN_OTHER_dnsSRV_0 "$san_dnssrv"
+
+ SSL_CLIENT_I_DN "$client_i_dn"
+ SSL_SERVER_I_DN "$server_i_dn"
diff --git a/httpd-2.4.x-fate317766-config-control-two-protocol-options.diff b/apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch
similarity index 87%
rename from httpd-2.4.x-fate317766-config-control-two-protocol-options.diff
rename to apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch
index 8b32aa2..9201623 100644
--- a/httpd-2.4.x-fate317766-config-control-two-protocol-options.diff
+++ b/apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch
@@ -42,11 +42,11 @@ Conflicts:
server/protocol.c | 25 +++++++++++++++++--------
6 files changed, 77 insertions(+), 10 deletions(-)
-Index: httpd-2.4.26/modules/http/http_filters.c
+Index: httpd-2.4.46/modules/http/http_filters.c
===================================================================
---- httpd-2.4.26.orig/modules/http/http_filters.c 2017-01-09 22:17:08.000000000 +0100
-+++ httpd-2.4.26/modules/http/http_filters.c 2017-06-19 13:02:30.698399025 +0200
-@@ -1472,10 +1472,17 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
+--- httpd-2.4.46.orig/modules/http/http_filters.c 2020-07-08 13:09:13.000000000 +0200
++++ httpd-2.4.46/modules/http/http_filters.c 2020-11-10 16:16:44.663449886 +0100
+@@ -1483,10 +1483,17 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_
* zero C-L to the client. We can't just remove the C-L filter,
* because well behaved 2.0 handlers will send their data down the stack,
* and we will compute a real C-L for the head request. RBB
@@ -65,11 +65,11 @@ Index: httpd-2.4.26/modules/http/http_filters.c
apr_table_unset(r->headers_out, "Content-Length");
}
-Index: httpd-2.4.26/server/core.c
+Index: httpd-2.4.46/server/core.c
===================================================================
---- httpd-2.4.26.orig/server/core.c 2016-12-05 15:34:29.000000000 +0100
-+++ httpd-2.4.26/server/core.c 2017-06-19 12:54:26.353988343 +0200
-@@ -528,6 +528,12 @@ static void *merge_core_server_configs(a
+--- httpd-2.4.46.orig/server/core.c 2020-07-03 21:53:37.000000000 +0200
++++ httpd-2.4.46/server/core.c 2020-11-10 16:16:44.695450065 +0100
+@@ -530,6 +530,12 @@ static void *merge_core_server_configs(a
if (virt->http_methods != AP_HTTP_METHODS_UNSET)
conf->http_methods = virt->http_methods;
@@ -82,7 +82,7 @@ Index: httpd-2.4.26/server/core.c
/* no action for virt->accf_map, not allowed per-vhost */
if (virt->protocol)
-@@ -3955,6 +3961,32 @@ static const char *set_http_method(cmd_p
+@@ -4034,6 +4040,32 @@ static const char *set_http_method(cmd_p
return NULL;
}
@@ -115,7 +115,7 @@ Index: httpd-2.4.26/server/core.c
static apr_hash_t *errorlog_hash;
static int log_constant_item(const ap_errorlog_info *info, const char *arg,
-@@ -4474,6 +4506,10 @@ AP_INIT_TAKE1("TraceEnable", set_trace_e
+@@ -4567,6 +4599,10 @@ AP_INIT_TAKE1("TraceEnable", set_trace_e
"'on' (default), 'off' or 'extended' to trace request body content"),
AP_INIT_FLAG("MergeTrailers", set_merge_trailers, NULL, RSRC_CONF,
"merge request trailers into request headers or not"),
@@ -126,11 +126,11 @@ Index: httpd-2.4.26/server/core.c
AP_INIT_ITERATE("Protocols", set_protocols, NULL, RSRC_CONF,
"Controls which protocols are allowed"),
AP_INIT_TAKE1("ProtocolsHonorOrder", set_protocols_honor_order, NULL, RSRC_CONF,
-Index: httpd-2.4.26/server/protocol.c
+Index: httpd-2.4.46/server/protocol.c
===================================================================
---- httpd-2.4.26.orig/server/protocol.c 2017-05-30 14:27:41.000000000 +0200
-+++ httpd-2.4.26/server/protocol.c 2017-06-19 12:54:26.353988343 +0200
-@@ -1416,14 +1416,23 @@ request_rec *ap_read_request(conn_rec *c
+--- httpd-2.4.46.orig/server/protocol.c 2020-07-08 13:09:13.000000000 +0200
++++ httpd-2.4.46/server/protocol.c 2020-11-10 16:16:44.695450065 +0100
+@@ -1502,14 +1502,23 @@ request_rec *ap_read_request(conn_rec *c
r->expecting_100 = 1;
}
else {
@@ -162,10 +162,10 @@ Index: httpd-2.4.26/server/protocol.c
}
}
-Index: httpd-2.4.26/include/http_core.h
+Index: httpd-2.4.46/include/http_core.h
===================================================================
---- httpd-2.4.26.orig/include/http_core.h 2016-12-05 15:34:29.000000000 +0100
-+++ httpd-2.4.26/include/http_core.h 2017-06-19 12:54:26.353988343 +0200
+--- httpd-2.4.46.orig/include/http_core.h 2019-03-18 09:49:59.000000000 +0100
++++ httpd-2.4.46/include/http_core.h 2020-11-10 16:16:44.695450065 +0100
@@ -723,6 +723,16 @@ typedef struct {
#define AP_MERGE_TRAILERS_DISABLE 2
int merge_trailers;
diff --git a/httpd-2.4.9-bnc690734.patch b/apache2-LimitRequestFieldSize-limits-headers.patch
similarity index 80%
rename from httpd-2.4.9-bnc690734.patch
rename to apache2-LimitRequestFieldSize-limits-headers.patch
index ebeb61d..60e50b8 100644
--- a/httpd-2.4.9-bnc690734.patch
+++ b/apache2-LimitRequestFieldSize-limits-headers.patch
@@ -1,8 +1,8 @@
-Index: server/util_script.c
+Index: httpd-2.4.46/server/util_script.c
===================================================================
---- server/util_script.c.orig
-+++ server/util_script.c
-@@ -448,11 +448,20 @@ AP_DECLARE(int) ap_scan_script_header_er
+--- httpd-2.4.46.orig/server/util_script.c 2020-07-20 07:58:49.000000000 +0200
++++ httpd-2.4.46/server/util_script.c 2020-11-10 16:10:54.525476516 +0100
+@@ -468,11 +468,20 @@ AP_DECLARE(int) ap_scan_script_header_er
apr_table_t *cookie_table;
int trace_log = APLOG_R_MODULE_IS_LEVEL(r, module_index, APLOG_TRACE1);
int first_header = 1;
@@ -24,7 +24,7 @@ Index: server/util_script.c
/* temporary place to hold headers to merge in later */
merge = apr_table_make(r->pool, 10);
-@@ -468,7 +477,7 @@ AP_DECLARE(int) ap_scan_script_header_er
+@@ -488,7 +497,7 @@ AP_DECLARE(int) ap_scan_script_header_er
while (1) {
@@ -33,7 +33,7 @@ Index: server/util_script.c
if (rv == 0) {
const char *msg = "Premature end of script headers";
if (first_header)
-@@ -583,10 +592,13 @@ AP_DECLARE(int) ap_scan_script_header_er
+@@ -603,10 +612,13 @@ AP_DECLARE(int) ap_scan_script_header_er
if (!(l = strchr(w, ':'))) {
if (!buffer) {
/* Soak up all the script output - may save an outright kill */
diff --git a/apache2-README b/apache2-README
deleted file mode 100644
index 92c9a51..0000000
--- a/apache2-README
+++ /dev/null
@@ -1,114 +0,0 @@
-README.SuSE for Apache 2
-
-
-For The Impatient
-=================
-
- o There are several MPM packages (MPM = multiprocessing module, which implements
- the threads/processes model). The MPM packages contain the actual apache binary.
- At least one MPM package must be installed.
-
- o The apache v1 and v2 packages can be installed and run side by side :)
-
- o Some commands have a "2" suffix, and are thus easily confused with Apache 1
- commands -- if you have an old apache (1.3) installation around.
-
- o Edit /etc/sysconfig/apache2 to configure the list of modules to load, and other things.
- It is no longer required to run SuSEconfig after such changes. (In fact, the
- SuSEconfig.apache2 does no longer exist.)
-
-
- o For building apache modules, there are 4 apxs commands (all come with the
- apache2-devel package):
- apxs2 builds a common module for all MPMs and installs to /usr/lib/apache2
- apxs2-prefork builds for prefork and installs to /usr/lib/apache2-prefork
- apxs2-worker builds for worker and installs to /usr/lib/apache2-worker
-
- If you build apache modules, the configure script might not find apxs, and
- you'll need an option like --with-apxs=apxs2[-worker, ...], or of course you can set
- a symlink to apxs2.
-
- o The Apache Runtime (APR) is in the "libapr0" package (this package was named "apr"
- in the past (8.1))
-
-
-Choosing the right MPM for your application
-===========================================
-
-apache2-prefork is implemented with a prefork regime, while
-apache2-worker uses a hybrid threaded/preforked model.
-
-Which one to use? The short answer is:
- - if in doubt, simply use prefork
- - use prefork if you use mod_php4
- - use worker if you need maximal performance with (possibly) less resources
- (smaller memory footprint of threade compared to the same number as processes)
-
-The following nice article has a more in depth answer:
-http://www.onlamp.com/pub/a/apache/2004/06/17/apacheckbk.html
-
-See
-http://httpd.apache.org/docs/2.4/mpm.html and
-http://httpd.apache.org/docs/2.4/misc/perf-tuning.html#compiletime
-for more technical details.
-
-In general, using a threaded MPM (worker) requires that all libraries that are
-loaded into apache (and libraries loaded by them in turn) be threadsafe as well.
-See
-http://httpd.apache.org/docs/2.4/developer/thread_safety.html for a status on
-some libraries.
-
-
-Upgrading from apache 1.3
-=========================
-
-For a smooth transition from apache 1.3, apache 2 is installable alongside apache
-1.3. There are a few modules for apache 1 that have not been ported or enough
-tested for apache 2, but most important modules are available by now.
-
-The mechanism of specifying modules to load into the server has been cleaned up
-so a reasonable default set of modules is loaded. (It is not useful to load all
-available modules by default, it would make the server quite big and slow. This
-is important given as the number of modules in the apache base distribution is
-rising and rising (about 50 at this time).
-
-In previous apache packages (1.3), modules were activated by setting a
-APACHE_MOD_XYZ variable to "yes" and running SuSEconfig.
-Nowadays, modules are activated by adding them to a the APACHE_MODULES
-variable in /etc/sysconfig/apache2, and simply restarting apache.
-
-
-Building modules for apache 2
-=============================
-
-Therefore, the different MPMs will be needed and a mechanism to build
-the modules spesific to them. This can now be done with the apxs2,
-apxs2-worker or apxs2-prefork script.
-
-For a module's configure script, you would typically use
- --which-apxs=/usr/sbin/apxs2-prefork
-
-In RPM spec files, you can use
- %define apxs apxs2
- %define apache_libexecdir %(%{apxs} -q libexecdir)
-to build modules, or use apxs2-prefork (for instance) to build a module
-specifically for the prefork MPM.
-
-To further the example, apxs2-prefork will install a module below
-/usr/lib/apache2-prefork/, while "apxs2" will install it below
-/usr/lib/apache2/.
-
--a adds the module to APACHE_MODULES in /etc/sysconfig/apache2, which in turn
-takes care of loading the module.
-
-Thus, usually you will only have to call
- apxs2 -cia my_module.c
-and all is fine.
-
-
---
-Suggestions or bug reports (via http://bugzilla.novell.com/) are most
-welcome.
-
-
-Mar 14 2005, Peter Poeml
diff --git a/apache2-README.QUICKSTART b/apache2-README.QUICKSTART
deleted file mode 100644
index a7136e5..0000000
--- a/apache2-README.QUICKSTART
+++ /dev/null
@@ -1,4 +0,0 @@
-
-This README is now online:
-http://en.opensuse.org/SDB:Apache_installation
-
diff --git a/a2enflag b/apache2-a2enflag
similarity index 100%
rename from a2enflag
rename to apache2-a2enflag
diff --git a/a2enmod b/apache2-a2enmod
similarity index 100%
rename from a2enmod
rename to apache2-a2enmod
diff --git a/httpd-apachectl.patch b/apache2-apachectl.patch
similarity index 77%
rename from httpd-apachectl.patch
rename to apache2-apachectl.patch
index b65813e..469be59 100644
--- a/httpd-apachectl.patch
+++ b/apache2-apachectl.patch
@@ -1,9 +1,9 @@
-Index: support/apachectl.in
+Index: httpd-2.4.46/support/apachectl.in
===================================================================
---- support/apachectl.in.orig 2012-02-01 04:47:28.000000000 +0100
-+++ support/apachectl.in 2015-07-13 17:09:06.651280087 +0200
-@@ -42,7 +42,7 @@
+--- httpd-2.4.46.orig/support/apachectl.in 2012-02-01 04:47:28.000000000 +0100
++++ httpd-2.4.46/support/apachectl.in 2020-11-09 15:29:52.479823800 +0100
+@@ -42,7 +42,7 @@ ARGV="$@"
# -------------------- --------------------
#
# the path to your httpd binary, including options if necessary
@@ -12,7 +12,7 @@ Index: support/apachectl.in
#
# pick up any necessary environment variables
if test -f @exp_sbindir@/envvars; then
-@@ -52,7 +52,11 @@
+@@ -52,7 +52,11 @@ fi
# a command that outputs a formatted text version of the HTML at the
# url given on the command line. Designed for lynx, however other
# programs may work.
diff --git a/apache2-find-directives b/apache2-find_directives
similarity index 100%
rename from apache2-find-directives
rename to apache2-find_directives
diff --git a/gensslcert b/apache2-gensslcert
similarity index 100%
rename from gensslcert
rename to apache2-gensslcert
diff --git a/apache2-init.logrotate b/apache2-init.logrotate
deleted file mode 100644
index 4d99eff..0000000
--- a/apache2-init.logrotate
+++ /dev/null
@@ -1,84 +0,0 @@
-/var/log/apache2/access_log {
- compress
- dateext
- maxage 365
- rotate 99
- size=+4096k
- notifempty
- missingok
- create 644 root root
- prerotate
- /etc/init.d/apache2 check-reload
- endscript
- postrotate
- /etc/init.d/apache2 reload
- endscript
-}
-
-/var/log/apache2/error_log {
- compress
- dateext
- maxage 365
- rotate 99
- size=+1024k
- notifempty
- missingok
- create 644 root root
- prerotate
- /etc/init.d/apache2 check-reload
- endscript
- postrotate
- /etc/init.d/apache2 reload
- endscript
-}
-
-/var/log/apache2/suexec.log {
- compress
- dateext
- maxage 365
- rotate 99
- size=+1024k
- notifempty
- missingok
- create 644 root root
- prerotate
- /etc/init.d/apache2 check-reload
- endscript
- postrotate
- /etc/init.d/apache2 reload
- endscript
-}
-
-/var/log/apache2/ssl_request_log {
- compress
- dateext
- maxage 365
- rotate 99
- size=+4096k
- notifempty
- missingok
- create 644 root root
- prerotate
- /etc/init.d/apache2 check-reload
- endscript
- postrotate
- /etc/init.d/apache2 reload
- endscript
-}
-
-/var/log/apache2/ssl_engine_log {
- compress
- dateext
- maxage 365
- rotate 99
- size=+1024k
- notifempty
- missingok
- create 644 root root
- prerotate
- /etc/init.d/apache2 check-reload
- endscript
- postrotate
- /etc/init.d/apache2 reload
- endscript
-}
diff --git a/apache2-loadmodule.conf b/apache2-loadmodule.conf
index d58da23..74c29ea 100644
--- a/apache2-loadmodule.conf
+++ b/apache2-loadmodule.conf
@@ -1,24 +1,75 @@
-LoadModule actions_module /usr/lib64/apache2-prefork/mod_actions.so
-LoadModule alias_module /usr/lib64/apache2-prefork/mod_alias.so
-LoadModule auth_basic_module /usr/lib64/apache2-prefork/mod_auth_basic.so
-LoadModule authn_file_module /usr/lib64/apache2-prefork/mod_authn_file.so
-LoadModule authz_host_module /usr/lib64/apache2-prefork/mod_authz_host.so
-LoadModule authz_groupfile_module /usr/lib64/apache2-prefork/mod_authz_groupfile.so
-LoadModule authz_user_module /usr/lib64/apache2-prefork/mod_authz_user.so
-LoadModule autoindex_module /usr/lib64/apache2-prefork/mod_autoindex.so
-LoadModule cgi_module /usr/lib64/apache2-prefork/mod_cgi.so
-LoadModule dir_module /usr/lib64/apache2-prefork/mod_dir.so
-LoadModule env_module /usr/lib64/apache2-prefork/mod_env.so
-LoadModule expires_module /usr/lib64/apache2-prefork/mod_expires.so
-LoadModule include_module /usr/lib64/apache2-prefork/mod_include.so
-LoadModule log_config_module /usr/lib64/apache2-prefork/mod_log_config.so
-LoadModule mime_module /usr/lib64/apache2-prefork/mod_mime.so
-LoadModule negotiation_module /usr/lib64/apache2-prefork/mod_negotiation.so
-LoadModule setenvif_module /usr/lib64/apache2-prefork/mod_setenvif.so
-LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so
-LoadModule socache_shmcb_module /usr/lib64/apache2-prefork/mod_socache_shmcb.so
-LoadModule userdir_module /usr/lib64/apache2-prefork/mod_userdir.so
-LoadModule reqtimeout_module /usr/lib64/apache2-prefork/mod_reqtimeout.so
-LoadModule authn_core_module /usr/lib64/apache2-prefork/mod_authn_core.so
-LoadModule authz_core_module /usr/lib64/apache2-prefork/mod_authz_core.so
-
+
+ LoadModule actions_module /usr/lib64/apache2-prefork/mod_actions.so
+ LoadModule alias_module /usr/lib64/apache2-prefork/mod_alias.so
+ LoadModule auth_basic_module /usr/lib64/apache2-prefork/mod_auth_basic.so
+ LoadModule authn_file_module /usr/lib64/apache2-prefork/mod_authn_file.so
+ LoadModule authz_host_module /usr/lib64/apache2-prefork/mod_authz_host.so
+ LoadModule authz_groupfile_module /usr/lib64/apache2-prefork/mod_authz_groupfile.so
+ LoadModule authz_user_module /usr/lib64/apache2-prefork/mod_authz_user.so
+ LoadModule autoindex_module /usr/lib64/apache2-prefork/mod_autoindex.so
+ LoadModule cgi_module /usr/lib64/apache2-prefork/mod_cgi.so
+ LoadModule dir_module /usr/lib64/apache2-prefork/mod_dir.so
+ LoadModule env_module /usr/lib64/apache2-prefork/mod_env.so
+ LoadModule expires_module /usr/lib64/apache2-prefork/mod_expires.so
+ LoadModule include_module /usr/lib64/apache2-prefork/mod_include.so
+ LoadModule log_config_module /usr/lib64/apache2-prefork/mod_log_config.so
+ LoadModule mime_module /usr/lib64/apache2-prefork/mod_mime.so
+ LoadModule negotiation_module /usr/lib64/apache2-prefork/mod_negotiation.so
+ LoadModule setenvif_module /usr/lib64/apache2-prefork/mod_setenvif.so
+ LoadModule ssl_module /usr/lib64/apache2-prefork/mod_ssl.so
+ LoadModule socache_shmcb_module /usr/lib64/apache2-prefork/mod_socache_shmcb.so
+ LoadModule userdir_module /usr/lib64/apache2-prefork/mod_userdir.so
+ LoadModule reqtimeout_module /usr/lib64/apache2-prefork/mod_reqtimeout.so
+ LoadModule authn_core_module /usr/lib64/apache2-prefork/mod_authn_core.so
+ LoadModule authz_core_module /usr/lib64/apache2-prefork/mod_authz_core.so
+
+
+ LoadModule actions_module /usr/lib64/apache2-worker/mod_actions.so
+ LoadModule alias_module /usr/lib64/apache2-worker/mod_alias.so
+ LoadModule auth_basic_module /usr/lib64/apache2-worker/mod_auth_basic.so
+ LoadModule authn_file_module /usr/lib64/apache2-worker/mod_authn_file.so
+ LoadModule authz_host_module /usr/lib64/apache2-worker/mod_authz_host.so
+ LoadModule authz_groupfile_module /usr/lib64/apache2-worker/mod_authz_groupfile.so
+ LoadModule authz_user_module /usr/lib64/apache2-worker/mod_authz_user.so
+ LoadModule autoindex_module /usr/lib64/apache2-worker/mod_autoindex.so
+ LoadModule cgi_module /usr/lib64/apache2-worker/mod_cgi.so
+ LoadModule dir_module /usr/lib64/apache2-worker/mod_dir.so
+ LoadModule env_module /usr/lib64/apache2-worker/mod_env.so
+ LoadModule expires_module /usr/lib64/apache2-worker/mod_expires.so
+ LoadModule include_module /usr/lib64/apache2-worker/mod_include.so
+ LoadModule log_config_module /usr/lib64/apache2-worker/mod_log_config.so
+ LoadModule mime_module /usr/lib64/apache2-worker/mod_mime.so
+ LoadModule negotiation_module /usr/lib64/apache2-worker/mod_negotiation.so
+ LoadModule setenvif_module /usr/lib64/apache2-worker/mod_setenvif.so
+ LoadModule ssl_module /usr/lib64/apache2-worker/mod_ssl.so
+ LoadModule socache_shmcb_module /usr/lib64/apache2-worker/mod_socache_shmcb.so
+ LoadModule userdir_module /usr/lib64/apache2-worker/mod_userdir.so
+ LoadModule reqtimeout_module /usr/lib64/apache2-worker/mod_reqtimeout.so
+ LoadModule authn_core_module /usr/lib64/apache2-worker/mod_authn_core.so
+ LoadModule authz_core_module /usr/lib64/apache2-worker/mod_authz_core.so
+
+
+ LoadModule actions_module /usr/lib64/apache2-event/mod_actions.so
+ LoadModule alias_module /usr/lib64/apache2-event/mod_alias.so
+ LoadModule auth_basic_module /usr/lib64/apache2-event/mod_auth_basic.so
+ LoadModule authn_file_module /usr/lib64/apache2-event/mod_authn_file.so
+ LoadModule authz_host_module /usr/lib64/apache2-event/mod_authz_host.so
+ LoadModule authz_groupfile_module /usr/lib64/apache2-event/mod_authz_groupfile.so
+ LoadModule authz_user_module /usr/lib64/apache2-event/mod_authz_user.so
+ LoadModule autoindex_module /usr/lib64/apache2-event/mod_autoindex.so
+ LoadModule cgi_module /usr/lib64/apache2-event/mod_cgi.so
+ LoadModule dir_module /usr/lib64/apache2-event/mod_dir.so
+ LoadModule env_module /usr/lib64/apache2-event/mod_env.so
+ LoadModule expires_module /usr/lib64/apache2-event/mod_expires.so
+ LoadModule include_module /usr/lib64/apache2-event/mod_include.so
+ LoadModule log_config_module /usr/lib64/apache2-event/mod_log_config.so
+ LoadModule mime_module /usr/lib64/apache2-event/mod_mime.so
+ LoadModule negotiation_module /usr/lib64/apache2-event/mod_negotiation.so
+ LoadModule setenvif_module /usr/lib64/apache2-event/mod_setenvif.so
+ LoadModule ssl_module /usr/lib64/apache2-event/mod_ssl.so
+ LoadModule socache_shmcb_module /usr/lib64/apache2-event/mod_socache_shmcb.so
+ LoadModule userdir_module /usr/lib64/apache2-event/mod_userdir.so
+ LoadModule reqtimeout_module /usr/lib64/apache2-event/mod_reqtimeout.so
+ LoadModule authn_core_module /usr/lib64/apache2-event/mod_authn_core.so
+ LoadModule authz_core_module /usr/lib64/apache2-event/mod_authz_core.so
+
diff --git a/httpd-2.x.x-logresolve.patch b/apache2-logresolve-tmp-security.patch
similarity index 100%
rename from httpd-2.x.x-logresolve.patch
rename to apache2-logresolve-tmp-security.patch
diff --git a/apache2-manual.conf b/apache2-manual.conf
index 01a9d64..bbddce6 100644
--- a/apache2-manual.conf
+++ b/apache2-manual.conf
@@ -10,11 +10,12 @@ AliasMatch ^/manual(?:/(?:de|en|es|fr|ja|ko|ru))?(/.*)?$ "/usr/share/apache2/man
Options Indexes
AllowOverride None
- Require all granted
+ Require local
- Order allow,deny
- Allow from all
+ Order deny,allow
+ Deny from all
+ Allow from localhost 127.0.0.1
diff --git a/apache2-mod_example.c b/apache2-mod_example.c
new file mode 100644
index 0000000..bc310a7
--- /dev/null
+++ b/apache2-mod_example.c
@@ -0,0 +1,48 @@
+/* Include the required headers from httpd */
+#include "httpd.h"
+#include "http_core.h"
+#include "http_protocol.h"
+#include "http_request.h"
+
+/* Define prototypes of our functions in this module */
+static void register_hooks(apr_pool_t *pool);
+static int example_handler(request_rec *r);
+
+/* Define our module as an entity and assign a function for registering hooks */
+
+module AP_MODULE_DECLARE_DATA example_module =
+{
+ STANDARD20_MODULE_STUFF,
+ NULL, // Per-directory configuration handler
+ NULL, // Merge handler for per-directory configurations
+ NULL, // Per-server configuration handler
+ NULL, // Merge handler for per-server configurations
+ NULL, // Any directives we may have for httpd
+ register_hooks // Our hook registering function
+};
+
+
+/* register_hooks: Adds a hook to the httpd process */
+static void register_hooks(apr_pool_t *pool)
+{
+
+ /* Hook the request handler */
+ ap_hook_handler(example_handler, NULL, NULL, APR_HOOK_LAST);
+}
+
+/* The handler function for our module.
+ * This is where all the fun happens!
+ */
+
+static int example_handler(request_rec *r)
+{
+ /* First off, we need to check if this is a call for the "example" handler.
+ * If it is, we accept it and do our things, it not, we simply return DECLINED,
+ * and Apache will try somewhere else.
+ */
+ if (!r->handler || strcmp(r->handler, "example-handler")) return (DECLINED);
+
+ // The first thing we will do is write a simple "Hello, world!" back to the client.
+ ap_rputs("Hello, world!
\n", r);
+ return OK;
+}
diff --git a/apache2-mod_proxy_uwsgi-fix-crash.patch b/apache2-mod_proxy_uwsgi-fix-crash.patch
index 0d38d45..f25a040 100644
--- a/apache2-mod_proxy_uwsgi-fix-crash.patch
+++ b/apache2-mod_proxy_uwsgi-fix-crash.patch
@@ -1,7 +1,7 @@
Index: httpd-2.4.46/modules/proxy/mod_proxy_uwsgi.c
===================================================================
--- httpd-2.4.46.orig/modules/proxy/mod_proxy_uwsgi.c 2020-07-24 11:35:25.000000000 +0200
-+++ httpd-2.4.46/modules/proxy/mod_proxy_uwsgi.c 2020-08-07 14:03:05.266134827 +0200
++++ httpd-2.4.46/modules/proxy/mod_proxy_uwsgi.c 2020-11-10 16:38:14.507125446 +0100
@@ -175,7 +175,7 @@ static int uwsgi_send_headers(request_re
env = (apr_table_entry_t *) env_table->elts;
diff --git a/apache2-script-helpers b/apache2-script-helpers
index 3f67881..8de22c9 100644
--- a/apache2-script-helpers
+++ b/apache2-script-helpers
@@ -10,9 +10,9 @@ HTTPD_SBIN_BASE="/usr/sbin/httpd"
function load_sysconfig
{
[ -n "$sysconfig_loaded" ] && return
- [ ! -f "$SYSCONFIG_FILE" ] && return
+ [ ! -f "$HTTPD_SYSCONFIG_FILE" ] && return
- . $SYSCONFIG_FILE
+ . $HTTPD_SYSCONFIG_FILE
export ${!APACHE_*} sysconfig_loaded=true
}
@@ -32,22 +32,10 @@ function find_mpm
# try to read from sysconfig's APACHE_MPM
HTTPD_MPM="$APACHE_MPM"
- # if empty, then choose one from installed
+ # if empty, then choose the one chosen by
+ # update alternatives
if [ -z "$HTTPD_MPM" ]; then
- installed_mpms=""
- for i in $HTTPD_SBIN_BASE-*; do
- test -f $i || continue
- i=$(basename $i)
- i=${i#*-}
- installed_mpms="$installed_mpms $i"
- done
- # hardcoded preference here:
- for mpm in event worker prefork; do
- if [[ $installed_mpms =~ "$mpm" ]]; then
- HTTPD_MPM=$mpm
- break
- fi
- done
+ HTTPD_MPM=$(readlink $(readlink /usr/sbin/httpd) | sed "s:/usr/sbin/httpd-::")
fi
# in case no
diff --git a/apache-ssl-stuff.tar.bz2 b/apache2-ssl-dirs.tar.bz2
similarity index 100%
rename from apache-ssl-stuff.tar.bz2
rename to apache2-ssl-dirs.tar.bz2
diff --git a/start_apache2 b/apache2-start_apache2
similarity index 83%
rename from start_apache2
rename to apache2-start_apache2
index 123abaf..60a9bd9 100644
--- a/start_apache2
+++ b/apache2-start_apache2
@@ -14,26 +14,33 @@
. /usr/share/apache2/script-helpers
#
-# which instance should we will run
+# which instance should we will run, comes from
+# apache2@ service file
#
-
unset instance_suffix
-if [ -n "$HTTPD_INSTANCE" ]; then
- instance_suffix="@$HTTPD_INSTANCE"
+if [ -n "$START_APACHE_INSTANCE" ]; then
+ instance_suffix="@$START_APACHE_INSTANCE"
fi
#
# load sysconfig variables APACHE_* from instance sysconfig
-# file
+# file; START_APACHE_SYSCONFIG_FILE can be used for change the system
+# default (e. g. for testing purposes)
#
-export SYSCONFIG_FILE=/etc/sysconfig/apache2${instance_suffix}
+export HTTPD_SYSCONFIG_FILE=${START_APACHE_SYSCONFIG_FILE:-/etc/sysconfig/apache2${instance_suffix}}
load_sysconfig
+#
+# dir to locate pid file into; START_APACHE_RUN_DIR can be used
+# to change the system default (e. g. for testing purposes)
+#
+run_dir="${START_APACHE_RUN_DIR:-/run}"
+
unset server_flags
#
# server_flags: -DSYSCONFIG
#
-if [ -f "$SYSCONFIG_FILE" ]; then
+if [ -f "$HTTPD_SYSCONFIG_FILE" ]; then
server_flags="$server_flags -DSYSCONFIG"
fi
@@ -50,9 +57,9 @@ if [ -n "$HTTPD_MPM" ]; then
exit 1
fi
else
- echo >&2 "${warn}No Apache binary found. No MPM package installed? $norm"
- echo >&2 "Hint: install the apache2-prefork package, and try again."
- exit 1
+ # take /usr/sbin/httpd, which will
+ # exist thanks to update alternatives
+ apache_bin="$HTTPD_SBIN_BASE"
fi
# server flags from APACHE_SERVER_FLAGS
@@ -79,15 +86,14 @@ sysconfd_dir=$(dirname $httpd_conf)/sysconfig${instance_suffix}.d/
# be used in the configuration to change this, otherwise
# stopping will not work
#
-pid_file=/run/httpd${instance_suffix}.pid
+pid_file=$run_dir/httpd${instance_suffix}.pid
-unset sysconfig_setting
#
# involve the sysconfig variables
#
[ -d ${sysconfd_dir} ] || mkdir -p ${sysconfd_dir} || exit 1
for c in global.conf include.conf loadmodule.conf; do
- echo "# File generated from $SYSCONFIG_FILE, do not edit. Edit the sysconfig file instead." > ${sysconfd_dir}/$c
+ echo "# File generated from $HTTPD_SYSCONFIG_FILE, do not edit. Edit the sysconfig file instead." > ${sysconfd_dir}/$c
done
# APACHE_ACCESS_LOG -> global.conf
if [ -n "$APACHE_ACCESS_LOG" ]; then
@@ -163,7 +169,6 @@ exec $apache_bin $server_flags \
-C "Include $sysconfd_dir/global.conf" \
-f $httpd_conf \
-c "Include $sysconfd_dir/include.conf" \
- "${sysconfig_setting[@]}" \
$@
exit 0
diff --git a/apache2-system-dirs-layout.patch b/apache2-system-dirs-layout.patch
new file mode 100644
index 0000000..50cec95
--- /dev/null
+++ b/apache2-system-dirs-layout.patch
@@ -0,0 +1,76 @@
+Index: httpd-2.4.46/config.layout
+===================================================================
+--- httpd-2.4.46.orig/config.layout 2020-11-11 11:02:08.957535301 +0100
++++ httpd-2.4.46/config.layout 2020-11-11 11:03:47.118083192 +0100
+@@ -178,28 +178,52 @@
+ proxycachedir: ${localstatedir}/proxy
+
+
+-# SuSE 6.x layout
+-
+- prefix: /usr
+- exec_prefix: ${prefix}
+- bindir: ${prefix}/bin
+- sbindir: ${prefix}/sbin
+- libdir: ${prefix}/lib
+- libexecdir: ${prefix}/lib/apache
+- mandir: ${prefix}/share/man
+- sysconfdir: /etc/httpd
+- datadir: /usr/local/httpd
+- installbuilddir: ${datadir}/build
+- errordir: ${datadir}/error
+- iconsdir: ${datadir}/icons
++# SUSE (32 bit system)
++
++ prefix: /srv/www
++ exec_prefix: /usr
++ bindir: ${exec_prefix}/bin
++ sbindir: ${exec_prefix}/sbin
++ libdir: ${exec_prefix}/lib
++ libexecdir: ${exec_prefix}/lib/apache2${MPM_SUFFIX}
++ mandir: ${exec_prefix}/share/man
++ sysconfdir: /etc/apache2
++ datadir: ${prefix}
++ installbuilddir: ${exec_prefix}/share/apache2/build
++ errordir: ${exec_prefix}/share/apache2/error
++ iconsdir: ${exec_prefix}/share/apache2/icons
+ htdocsdir: ${datadir}/htdocs
+- manualdir: ${datadir}/manual
++ manualdir: ${exec_prefix}/share/apache2/manual
+ cgidir: ${datadir}/cgi-bin
+- includedir: ${prefix}/include/apache
+- localstatedir: /var/lib/httpd
++ includedir: ${exec_prefix}/include/apache2${MPM_SUFFIX}
++ localstatedir: /var/lib/apache2
+ runtimedir: /var/run
+- logfiledir: /var/log/httpd
+- proxycachedir: /var/cache/httpd
++ logfiledir: /var/log/apache2
++ proxycachedir: /var/cache/apache2
++
++
++# SUSE (64 bit system)
++
++ prefix: /srv/www
++ exec_prefix: /usr
++ bindir: ${exec_prefix}/bin
++ sbindir: ${exec_prefix}/sbin
++ libdir: ${exec_prefix}/lib64
++ libexecdir: ${exec_prefix}/lib64/apache2${MPM_SUFFIX}
++ mandir: ${exec_prefix}/share/man
++ sysconfdir: /etc/apache2
++ datadir: ${prefix}
++ installbuilddir: ${exec_prefix}/share/apache2/build
++ errordir: ${exec_prefix}/share/apache2/error
++ iconsdir: ${exec_prefix}/share/apache2/icons
++ htdocsdir: ${datadir}/htdocs
++ manualdir: ${exec_prefix}/share/apache2/manual
++ cgidir: ${datadir}/cgi-bin
++ includedir: ${exec_prefix}/include/apache2${MPM_SUFFIX}
++ localstatedir: /var/lib/apache2
++ runtimedir: /var/run
++ logfiledir: /var/log/apache2
++ proxycachedir: /var/cache/apache2
+
+
+ # BSD/OS layout
diff --git a/apache2.changes b/apache2.changes
index a2b1cd0..b652cd6 100644
--- a/apache2.changes
+++ b/apache2.changes
@@ -1,3 +1,83 @@
+-------------------------------------------------------------------
+Thu Nov 26 12:10:52 UTC 2020 - pgajdos@suse.com
+
+- package reworked trough [bsc#1178478]
+- modified patches
+ % apache2-mod_proxy_uwsgi-fix-crash.patch (refreshed)
+- modified sources
+ % apache2-loadmodule.conf
+ % apache2-manual.conf
+ % apache2-script-helpers
+ % apache2@.service
+ % sysconfig.apache2
+- deleted patches
+ - deprecated-scripts-arch.patch (not needed)
+ - httpd-2.0.54-envvars.dif (not needed)
+ - httpd-2.1.3alpha-layout.dif
+ (renamed to apache2-system-dirs-layout.patch)
+ - httpd-2.2.0-apxs-a2enmod.dif (not needed)
+ - httpd-2.4.9-bnc690734.patch
+ (renamed to apache2-LimitRequestFieldSize-limits-headers.patch)
+ - httpd-2.4.x-fate317766-config-control-two-protocol-options.diff
+ (renamed to apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch)
+ - httpd-2.x.x-logresolve.patch
+ (renamed to apache2-logresolve-tmp-security.patch)
+ - httpd-apachectl.patch
+ (renamed to apache2-apachectl.patch)
+ - httpd-implicit-pointer-decl.patch (not needed)
+ - httpd-visibility.patch (not needed)
+- deleted sources
+ - SUSE-NOTICE (outdated)
+ - a2enflag (renamed to apache2-a2enflag)
+ - a2enmod (renamed to apache2-a2enmod)
+ - apache-22-24-upgrade (outdated)
+ - apache2-README (outdated)
+ - apache2-README.QUICKSTART (outedated)
+ - apache2-find-directives (renamed to apache2-find_directives)
+ - apache2-init.logrotate (not needed)
+ - apache2.firewalld (renamed to firewalld.apache2)
+ - apache2.logrotate (renamed to logrotate.apache2)
+ - apache2.ssl.firewalld (renamed to firewalld-ssl.apache2)
+ - apache2.ssl.susefirewall (renamed to susefirewall.apache2)
+ - apache2.susefirewall (renamed to susefirewall-ssl.apache2)
+ - favicon.ico (not needed)
+ - rc.apache2 (not needed)
+ - robots.txt (not needed)
+ - sysconf_addword (not needed, in aaa_base)
+- added patches
+ fix PATCH: https://marc.info/?l=apache-httpd-users&m=147448312531134&w=2
+ + apache-test-application-xml-type.patch
+ fix these variables from the test
+ + apache-test-turn-off-variables-in-ssl-var-lookup.patch
+ fix [fate317766] backport of an upstream commit
+ + apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch
+ fix [bnc#690734] TODO, to be upstreamed
+ + apache2-LimitRequestFieldSize-limits-headers.patch
+ fix apachectl is frontend for start_apache2, suse specific
+ + apache2-apachectl.patch
+ fix [bnc#210904] perhaps to be upstreamed
+ + apache2-logresolve-tmp-security.patch
+ fix layout of system dirs configuration, may be upstreamed
+ + apache2-system-dirs-layout.patch
+- added sources
+ + _multibuild
+ + apache2-a2enflag
+ + apache2-a2enmod
+ + apache2-find_directives
+ + apache2-gensslcert
+ + apache2-mod_example.c
+ + apache2-start_apache2
+ + firewalld-ssl.apache2
+ + firewalld.apache2
+ + logrotate.apache2
+ + susefirewall-ssl.apache2
+ + susefirewall.apache2
+
+-------------------------------------------------------------------
+Fri Nov 13 12:54:04 UTC 2020 - pgajdos@suse.com
+
+- apache2.spec reworked
+
-------------------------------------------------------------------
Wed Oct 14 09:43:08 UTC 2020 - Franck Bui
diff --git a/apache2.spec b/apache2.spec
index 4a7b452..54054fd 100644
--- a/apache2.spec
+++ b/apache2.spec
@@ -16,44 +16,79 @@
#
-#Compat macro for new _fillupdir macro introduced in Nov 2017
-%if ! %{defined _fillupdir}
- %define _fillupdir /var/adm/fillup-templates
+%global upstream_name httpd
+%global testsuite_name %{upstream_name}-framework
+%global tversion svn1878849
+%global flavor @BUILD_FLAVOR@%{nil}
+%global mpm %(echo "%{flavor}" | grep -q "mpm" && { echo "%{flavor}" | sed 's:\\(test_\\|\\)mpm_::'; })
+# test installed packages
+%global test %(echo "%{flavor}" | grep -q "test_" && echo 1 || echo 0)
+# way how to translate _multibuild flavor (like for %%{test}) to BuildRequires conditional not found
+%if "%{flavor}" == "test_mpm_prefork" || "%{flavor}" == "test_mpm_worker" || "%{flavor}" == "test_mpm_event" || "%{flavor}" == "test_devel" || "%{flavor}" == "test_main"
+%bcond_without test_build_requires
+%if "%{flavor}" == "test_mpm_prefork" || "%{flavor}" == "test_mpm_worker" || "%{flavor}" == "test_mpm_event"
+%bcond_without unittest_build_requires
+%else
+%bcond_with unittest_build_requires
+%endif
+%else
+%bcond_with test_build_requires
+%endif
+%if "%{mpm}" == "prefork"
+%define mpm_alt_prio 10
+%endif
+%if "%{mpm}" == "worker"
+%define mpm_alt_prio 20
+%endif
+%if "%{mpm}" == "event"
+%define mpm_alt_prio 30
+%endif
+%define default_mpm prefork
+%define suse_maintenance_mmn 0
+%define apache_mmn %(test -s %{SOURCE0} && \
+ { echo -n apache_mmn_; bzcat %{SOURCE0} | \
+ awk '/^#define MODULE_MAGIC_NUMBER_MAJOR/ {printf "%d", $3}'; } || \
+ echo apache_mmn_notfound)
+%define static_modules unixd systemd
+%define dynamic_modules authz_core access_compat actions alias allowmethods asis auth_basic auth_digest auth_form authn_anon authn_core authn_dbd authn_dbm authn_file authn_socache authnz_ldap authnz_fcgi authz_core authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex bucketeer buffer cache cache_disk cache_socache case_filter case_filter_in cgid cgi charset_lite data dav dav_fs dav_lock dbd deflate brotli dialup dir dumpio echo env expires ext_filter file_cache filter headers heartmonitor http2 imagemap include info lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat ldap log_config log_debug log_forensic logio lua macro mime mime_magic negotiation optional_fn_export optional_fn_import optional_hook_export optional_hook_import proxy proxy_ajp proxy_balancer proxy_connect proxy_express proxy_fcgi proxy_fdpass proxy_ftp proxy_hcheck proxy_html proxy_http proxy_http2 proxy_scgi proxy_uwsgi proxy_wstunnel ratelimit reflector remoteip reqtimeout request rewrite sed session session_cookie session_crypto session_dbd setenvif slotmem_plain slotmem_shm socache_dbm socache_memcache socache_redis socache_shmcb speling ssl status substitute suexec unique_id userdir usertrack version vhost_alias watchdog xml2enc
+%define support_bin ab check_forensic dbmmanage find_directives gensslcert htdbm htdigest htpasswd httxt2dbm log_server_status logresolve split-logfile
+%define support_sbin apachectl htcacheclean fcgistarter logresolve.pl rotatelogs
+
+%define platform_string Linux/SUSE
+%define httpduser wwwrun
+%define httpdgroup www
+
+%define datadir /srv/www
+%define htdocsdir %{datadir}/htdocs
+%define manualdir %{_datadir}/apache2/manual
+%define errordir %{_datadir}/apache2/error
+%define iconsdir %{_datadir}/apache2/icons
+%define cgidir %{datadir}/cgi-bin
+%define localstatedir %{_localstatedir}/lib/apache2
+%define runtimedir /run
+%define proxycachedir %{_localstatedir}/cache/apache2
+%define logfiledir %{_localstatedir}/log/apache2
+%define sysconfdir %{_sysconfdir}/apache2
+%define includedir %{_includedir}/apache2
+%if "%{mpm}" != ""
+%define libexecdir %{_libdir}/apache2-%{mpm}
+%else
+%define libexecdir %{_libdir}/apache2
+%endif
+%define installbuilddir %{_datadir}/apache2/build
+%define userdir public_html
+
+%define suexec_safepath %{_prefix}/local/bin:%{_prefix}/bin:/bin
+
+%define psuffix %{nil}
+%if "%{mpm}" != ""
+%define psuffix -%{mpm}
+%else
+%if "%{flavor}" != ""
+%define psuffix -%{flavor}
+%endif
%endif
-%define src_name httpd-%{version}
-%define apache_mmn %(test -s %{SOURCE0} && { echo -n apache_mmn_; bzcat %{SOURCE0} | awk '/^#define MODULE_MAGIC_NUMBER_MAJOR/ {printf "%d", $3}'; } || echo apache_mmn_notfound)
-%define suse_maintenance_mmn 0
-%define default_mpm prefork
-%define mpms_to_build prefork worker event
-%define datadir /srv/www
-%define htdocsdir %{datadir}/htdocs
-%define manualdir %{_datadir}/%{name}/manual
-%define errordir %{_datadir}/%{name}/error
-%define iconsdir %{_datadir}/%{name}/icons
-%define cgidir %{datadir}/cgi-bin
-%define localstatedir %{_localstatedir}/lib/%{name}
-%define proxycachedir %{_localstatedir}/cache/%{name}
-%define logfiledir %{_localstatedir}/log/%{name}
-%define sysconfdir %{_sysconfdir}/%{name}
-%define includedir %{_includedir}/%{name}
-%define libexecdir %{_libdir}/%{name}
-%define installbuilddir %{_datadir}/%{name}/build
-%define userdir public_html
-%define suexec_safepath %{_prefix}/local/bin:%{_prefix}/bin:/bin
-%define platform_string Linux/SUSE
-%define httpduser wwwrun
-%define httpdgroup www
-#for some reason the parser barfs if not conditional
-%{?requires_ge:%requires_ge libapr1}
-%{?requires_ge:%requires_ge libapr-util1}
-%if 0%{?suse_version} >= 1220
-%define runtimedir /run
-%define mods_static unixd systemd
-%else
-%define runtimedir %{_localstatedir}/run
-%define mods_static unixd
-%endif
%if 0%{?suse_version} >= 1500
%define use_firewalld 1
%else
@@ -64,776 +99,721 @@
%else
%define build_http2 0
%endif
-Name: apache2
+
+Name: apache2%{psuffix}
Version: 2.4.46
Release: 0
-Summary: The Apache Web Server
+Summary: The Apache HTTPD Server
License: Apache-2.0
Group: Productivity/Networking/Web/Servers
-URL: http://httpd.apache.org/
-Source0: http://www.apache.org/dist/httpd/%{src_name}.tar.bz2
-Source1: http://www.apache.org/dist/httpd/%{src_name}.tar.bz2.asc
+URL: https://httpd.apache.org/
+# essential sources
+Source0: https://www.apache.org/dist/httpd/%{upstream_name}-%{version}.tar.bz2
+Source1: https://www.apache.org/dist/httpd/%{upstream_name}-%{version}.tar.bz2.asc
Source2: apache2.keyring
+Source3: apache2.service
+Source4: apache2@.service
+Source5: apache2.target
# Add file to take mtime from it in prep section
-Source3: apache2.changes
-Source10: SUSE-NOTICE
-Source11: rc.%{name}
-Source13: sysconfig.%{name}
-Source18: robots.txt
-Source20: favicon.ico
-Source22: apache2-README
-Source23: apache2-README.QUICKSTART
-Source25: gensslcert
-Source26: apache2-README-access_compat.txt
-Source27: %{name}.logrotate
-Source28: permissions.%{name}
-Source29: apache-ssl-stuff.tar.bz2
-Source30: deprecated-scripts.tar.xz
-Source31: apache2-README-instances.txt
-# sysconf_addword is part of aaa_base.rpm starting with openSUSE 11.0
-# we bring our own copy for the cases where it is not available
-Source45: sysconf_addword
-Source46: a2enflag
-Source47: a2enmod
-#%%if %%{use_firewalld}
-Source49: apache2.firewalld
-Source50: apache2.ssl.firewalld
-#%%else
-Source51: apache2.susefirewall
-Source52: apache2.ssl.susefirewall
-#%%endif
-Source100: apache2-httpd.conf
-Source101: apache2-errors.conf
-Source102: apache2-default-server.conf
-Source103: apache2-listen.conf
-Source104: apache2-manual.conf
-Source105: apache2-mod_autoindex-defaults.conf
-Source106: apache2-mod_info.conf
-Source107: apache2-mod_log_config.conf
-Source108: apache2-mod_mime-defaults.conf
-Source109: apache2-mod_status.conf
-Source110: apache2-mod_userdir.conf
-Source111: apache2-server-tuning.conf
-Source113: apache2-ssl-global.conf
-Source114: apache2-mod_usertrack.conf
-Source115: apache2-mod_reqtimeout.conf
-Source116: apache2-loadmodule.conf
-Source117: apache2-global.conf
-Source118: apache2-mod_cgid-timeout.conf
-Source119: apache2-protocols.conf
-Source130: apache2-vhost.template
-Source131: apache2-vhost-ssl.template
-Source140: apache2-check_forensic
-Source141: apache-22-24-upgrade
-Source142: start_apache2
-Source143: apache2-systemd-ask-pass
-Source144: apache2.service
-Source145: apache2-find-directives
-Source146: apache2@.service
-Source147: apache2-script-helpers
-Source148: apache2.target
-Source149: %{name}-init.logrotate
-Patch2: httpd-2.1.3alpha-layout.dif
-Patch23: httpd-apachectl.patch
-Patch66: httpd-2.0.54-envvars.dif
-Patch67: httpd-2.2.0-apxs-a2enmod.dif
-Patch68: httpd-2.x.x-logresolve.patch
-Patch69: httpd-2.4.9-bnc690734.patch
-Patch70: httpd-implicit-pointer-decl.patch
-Patch111: httpd-visibility.patch
-# PATCH-FEATURE-UPSTREAM kstreitova@suse.com -- backport of HttpContentLengthHeadZero and HttpExpectStrict
-Patch115: httpd-2.4.x-fate317766-config-control-two-protocol-options.diff
-Patch116: deprecated-scripts-arch.patch
-# https://svn.apache.org/viewvc?view=revision
-Patch117: apache2-mod_proxy_uwsgi-fix-crash.patch
+Source6: apache2.changes
+Source10: apache2-ssl-dirs.tar.bz2
+# test
+# svn checkout http://svn.apache.org/repos/asf/httpd/test/framework/trunk/ httpd-framework
+Source20: %{testsuite_name}-%{tversion}.tar.bz2
+Source21: apache2-mod_example.c
+# integration settings
+Source30: sysconfig.apache2
+Source31: logrotate.apache2
+Source32: permissions.apache2
+Source33: firewalld.apache2
+Source34: firewalld-ssl.apache2
+Source35: susefirewall.apache2
+Source36: susefirewall-ssl.apache2
+# scripts
+Source100: apache2-a2enmod
+Source101: apache2-a2enflag
+Source102: apache2-systemd-ask-pass
+Source103: apache2-start_apache2
+Source104: apache2-script-helpers
+# additional support
+Source130: apache2-gensslcert
+Source131: apache2-check_forensic
+Source132: apache2-find_directives
+# configuration
+Source150: apache2-httpd.conf
+Source151: apache2-errors.conf
+Source152: apache2-default-server.conf
+Source153: apache2-listen.conf
+Source154: apache2-manual.conf
+Source155: apache2-mod_autoindex-defaults.conf
+Source156: apache2-mod_info.conf
+Source157: apache2-mod_log_config.conf
+Source158: apache2-mod_mime-defaults.conf
+Source159: apache2-mod_status.conf
+Source160: apache2-mod_userdir.conf
+Source161: apache2-server-tuning.conf
+Source163: apache2-ssl-global.conf
+Source164: apache2-mod_usertrack.conf
+Source165: apache2-mod_reqtimeout.conf
+Source166: apache2-loadmodule.conf
+Source167: apache2-global.conf
+Source168: apache2-mod_cgid-timeout.conf
+Source169: apache2-protocols.conf
+Source190: apache2-vhost.template
+Source191: apache2-vhost-ssl.template
+# READMEs and other documentation
+Source200: apache2-README-access_compat.txt
+Source201: apache2-README-instances.txt
+# layout of system dirs configuration, may be upstreamed
+Patch0: apache2-system-dirs-layout.patch
+# apachectl is frontend for start_apache2, suse specific
+Patch1: apache2-apachectl.patch
+# [bnc#210904] perhaps to be upstreamed
+Patch2: apache2-logresolve-tmp-security.patch
+# [bnc#690734] TODO, to be upstreamed
+Patch3: apache2-LimitRequestFieldSize-limits-headers.patch
+# [fate317766] backport of an upstream commit
+Patch4: apache2-HttpContentLengthHeadZero-HttpExpectStrict.patch
+# [bsc#1174052] picked upstream commit
+Patch5: apache2-mod_proxy_uwsgi-fix-crash.patch
+# PATCH: https://marc.info/?l=apache-httpd-users&m=147448312531134&w=2
+Patch100: apache-test-application-xml-type.patch
+# PATCH: /test_ssl_var_lookup?SSL_SERVER_SAN_DNS_0 returns
+# /test_ssl_var_lookup?SSL_SERVER_SAN_OTHER_dnsSRV_0 _https.
+# but Apache::Test::vars()->{servername} returns 'localhost' instead of
+# (see $san_dns and $san_dnssrv variables in t/ssl/varlookup.t)
+# even if in live system I do not experience this inconsistency, let's turn off
+# these variables from the test
+Patch101: apache-test-turn-off-variables-in-ssl-var-lookup.patch
BuildRequires: apache-rpm-macros-control
-BuildRequires: apr-util-devel
#Since 2.4.7 the event MPM requires apr 1.5.0 or later.
BuildRequires: apr-devel >= 1.5.0
+BuildRequires: apr-util-devel
BuildRequires: automake
+# for basic testing
+BuildRequires: curl
+BuildRequires: db-devel
%if %{use_firewalld}
BuildRequires: firewall-macros
%endif
-%if 0%{?suse_version} >= 1315
BuildRequires: libbrotli-devel
+%if %{build_http2}
+BuildRequires: pkgconfig(libnghttp2) >= 1.2.1
%endif
-BuildRequires: db-devel
-BuildRequires: ed
BuildRequires: libcap-devel
-#for mod_proxy_html and mod_xml2enc
BuildRequires: libxml2-devel
BuildRequires: lua-devel
BuildRequires: openldap2-devel
BuildRequires: openssl-devel >= 0.9.8a
BuildRequires: pcre-devel
BuildRequires: pkgconfig
+BuildRequires: systemd-rpm-macros
BuildRequires: xz
BuildRequires: zlib-devel
-Requires: %{_sysconfdir}/mime.types
-Requires: %{name}-MPM
-Requires: logrotate
-Recommends: w3m
-%if 0%{?suse_version} >= 1315
-Requires: which
-%endif
-%if 0%{?suse_version} < 1210
-Requires(post): %insserv_prereq
-%endif
-Requires(post): %fillup_prereq
-Requires(post): %{name}-utils
-Requires(post): fileutils
-Requires(post): grep
-Requires(post): permissions
-Requires(post): pwdutils
-Requires(post): sed
-Requires(post): textutils
-%if 0%{?suse_version} > 1320
-Requires(pre): user(wwwrun)
-Requires(pre): group(www)
-%endif
-Suggests: apache2-%{default_mpm}
-Provides: %{apache_mmn}
-Provides: %{name}-mod_macro = %{version}
-Provides: http_daemon
-Provides: httpd
-Provides: suse_help_viewer
-Provides: suse_maintenance_mmn_%{suse_maintenance_mmn}
-Obsoletes: %{name}-mod_macro <= 1.2.1
-Provides: apache = %{version}
-Obsoletes: apache < 1.3.29
-Provides: mod_ssl = %{version}
-Obsoletes: mod_ssl < %{version}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-%if 0%{?suse_version} >= 1210
-BuildRequires: pkgconfig
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(systemd)
+# SECTION test requirements
+%if %{with test_build_requires}
+BuildRequires: apache-rpm-macros
+BuildRequires: apache2
+BuildRequires: apache2-devel
+BuildRequires: apache2-event
+BuildRequires: apache2-manual
+BuildRequires: apache2-prefork
+BuildRequires: apache2-utils
+BuildRequires: apache2-worker
+%if %{with unittest_build_requires}
+BuildRequires: mod_php_any
+# perl-doc is assumed by t/filter/case.t (/usr/lib/perl5/*/pod/perlsub.pod)
+BuildRequires: perl-doc
+BuildRequires: perl(Crypt::SSLeay)
+BuildRequires: perl(DateTime)
+BuildRequires: perl(Devel::CoreStack)
+BuildRequires: perl(Devel::Symdump)
+BuildRequires: perl(Digest::MD5)
+BuildRequires: perl(HTML::HeadParser)
+BuildRequires: perl(HTML::Parser)
+BuildRequires: perl(HTML::Tagset)
+BuildRequires: perl(HTTP::DAV)
+BuildRequires: perl(LWP)
+BuildRequires: perl(LWP::Protocol::https)
+BuildRequires: perl(MIME::Base64)
+BuildRequires: perl(Net::Cmd)
+BuildRequires: perl(URI)
+%if %{build_http2}
+BuildRequires: perl(AnyEvent)
+BuildRequires: perl(Protocol::HTTP2::Client)
%endif
-%if 0%{?suse_version} >= 1310
-BuildRequires: systemd-rpm-macros
%endif
-%if 0%{?build_http2}
-BuildRequires: pkgconfig(libnghttp2) >= 1.2.1
%endif
+# /SECTION
+%if "%{mpm}" != ""
+Provides: apache2-MPM
+%endif
+%if "%{flavor}" == ""
+Requires: %{_sysconfdir}/mime.types
+Requires: apache2-MPM
+Suggests: apache2-%{default_mpm}
+Requires: logrotate
+Provides: %{apache_mmn}
+Provides: httpd
+Provides: suse_maintenance_mmn_%{suse_maintenance_mmn}
+Requires(pre): group(www)
+Requires(pre): user(wwwrun)
%{?systemd_ordering}
-
-%description
-This version of httpd is a major release of the 2.4 stable branch,
-and represents the best available version of Apache HTTP Server.
-New features include Loadable MPMs, major improvements to OCSP support,
-mod_lua, Dynamic Reverse Proxy configuration, Improved Authentication/
-Authorization, FastCGI Proxy, New Expression Parser, and a Small Object
-Caching API.
-
- See %{_docdir}/apache2/, http://httpd.apache.org/, and
-http://httpd.apache.org/docs-2.4/upgrading.html.
-
-%package worker
-Summary: Apache 2 worker MPM (Multi-Processing Module)
-Group: Productivity/Networking/Web/Servers
-Requires: %{name} = %{version}
-# the post scriptlet sources /usr/share/apache2/script-helpers
-Requires(post): %{name} = %{version}
-Provides: %{name}-MPM
-
-%package prefork
-Summary: Apache 2 "prefork" MPM (Multi-Processing Module)
-Group: Productivity/Networking/Web/Servers
-Requires: %{name} = %{version}
-# the post scriptlet sources /usr/share/apache2/script-helpers
-Requires(post): %{name} = %{version}
-Provides: %{name}-MPM
-Provides: apache:%{_sbindir}/httpd
-
-%package event
-Summary: Apache 2 event MPM (Multi-Processing Module)
-Group: Productivity/Networking/Web/Servers
-Requires: %{name} = %{version}
-# the post scriptlet sources /usr/share/apache2/script-helpers
-Requires(post): %{name} = %{version}
-Provides: %{name}-MPM
-
-%description worker
-The worker MPM (multi-Processing Module) implementing a hybrid
-multi-threaded multi-process web server.
-
-This combination offers a performance boost and retains some of the
-stability of the multi-process model.
-
-%description prefork
-"prefork" MPM (Multi-Processing Module)
-
-This MPM is basically the one that Apache 1.3.x used. It warrants the
-maximum stability because each server runs in its own process. If a
-process dies it will not affect other servers.
-
-%description event
-"event" MPM (multi-Processing Module)
-
-It uses a separate thread to handle Keep Alive requests and accepting
-connections. Keep Alive requests have traditionally required httpd to
-dedicate a worker to handle it. This dedicated worker could not be used
-again until the Keep Alive timeout was reached.
-
-This MPM depends on APR's atomic compare-and-swap operations for thread
-synchronization.
-
-%package devel
-Summary: Apache 2 Header and Include Files
-Group: Development/Libraries/C and C++
-Requires: %{name} = %{version}
-Requires: %{name}-MPM
-Requires: apache-rpm-macros-control
-Requires: apache2-prefork
+%endif
+%if "%{flavor}" == "utils"
+Requires: which
+Recommends: w3m
+%endif
+%if "%{flavor}" == "devel"
+Requires: apache2 = %{version}
Requires: apr-devel
Requires: apr-util-devel
Requires: gcc
Provides: httpd-devel = %{version}
-
-%description devel
-This package contains header files and include files that are needed
-for development using the Apache API.
-
-%package doc
-Summary: Additional Package Documentation
-Group: Documentation/Other
-%if 0%{?suse_version} >= 1120
+%endif
+%if "%{mpm}" != ""
+Requires(pre): permissions
+Requires(post): %fillup_prereq
+%if %{use_firewalld}
+Requires(post): firewalld
+%endif
+Requires(post): grep
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
+%endif
+%if %{test} || "%{flavor}" == "manual"
BuildArch: noarch
%endif
-%description doc
-This package contains optional documentation provided in addition to
-this package's base documentation.
-
-%package example-pages
-Summary: Example Pages for the Apache 2 Web Server
-Group: Productivity/Networking/Web/Servers
-
-%description example-pages
-Some Example pages for Apache that show information about the installed
-server.
-
-%package utils
-Summary: Apache 2 utilities
-Group: Productivity/Networking/Web/Servers
-
-%description utils
-Utilities provided by the Apache 2 Web Server project which are useful
-to administrators of web servers in general.
+%description
+The Apache HTTP Server Project is an effort to develop and
+maintain an open-source HTTP server for modern operating
+systems including UNIX and Windows. The goal of this project
+is to provide a secure, efficient and extensible server that
+provides HTTP services in sync with the current HTTP standards.
%prep
-%setup -q -n %{src_name} -a30
+%setup -q -n %{upstream_name}-%{version} -a20
+%patch0 -p1
+%patch1 -p1
%patch2 -p1
-%patch23
-%patch66 -p1
-%patch67 -p1
-%patch68 -p1
-%patch69
-%patch70 -p1
-%patch111 -p1
-%patch115 -p1
-%if 0%{?suse_version} == 1110
-%patch116 -p1
-%endif
-%patch117 -p1
-cat %{_sourcedir}/SUSE-NOTICE >> NOTICE
-# install READMEs
-a=$(basename %{SOURCE22})
-cp %{SOURCE22} ./${a##%{name}-}
-b=$(basename %{SOURCE23})
-cp %{SOURCE23} ./${b##%{name}-}
-c=$(basename %{SOURCE31})
-cp %{SOURCE31} ./${c##%{name}-}
-d=$(basename %{SOURCE26})
-cp %{SOURCE26} ./${d##%{name}-}
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch100 -p1
+%patch101 -p1
#
-# replace PLATFORM string that's seen in the "Server:" header
+# BUILD
#
-sed 's,(" PLATFORM "),(%{platform_string}),' server/core.c > tmp_file && mv tmp_file server/core.c
-sed 's/public_html/%{userdir}/g' docs/conf/extra/httpd-userdir.conf.in > tmp_file && mv tmp_file docs/conf/extra/httpd-userdir.conf.in
-# Use mtime of .changes for build time
-CHANGES=`stat --format="%%y" %{SOURCE3}`
-sed -i -e "s/__DATE__ \" \" __TIME__;/\"$CHANGES\";/" server/buildmark.c
-#
-# now configure Apache
-#
-autoreconf -fiv
+%if ! %{test} && "%{flavor}" != "manual"
%build
-function configure {
- CFLAGS="%{optflags} -fPIC -Wall -DLDAP_DEPRECATED" \
- CPPFLAGS="-DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096" \
- ./configure \
- --enable-layout=SuSE81%(test "%{_lib}" = lib64 && echo -n _64) \
- --with-program-name=httpd$mpm_suffix \
- --with-apr=%{_bindir}/apr-1-config \
- --with-apr-util=%{_bindir}/apu-1-config \
- --with-mpm=$mpm \
-%if "$mpm" == "worker" || "$mpm" == "event"
+echo "================== BUILDING [%{flavor}] flavor"
+# configuration (autoreconf, configure) common for all flavors,
+# except test and manual
+
+autoreconf --force --install --verbose
+
+# replace PLATFORM string that's seen in the "Server:" header
+sed -i -e 's,(" PLATFORM "),(%{platform_string}),' server/core.c
+# use mtime of .changes for build time
+CHANGES_MTIME=`stat --format="%%y" %{SOURCE6}`
+sed -i -e "s/__DATE__ \" \" __TIME__;/\"$CHANGES_MTIME\";/" server/buildmark.c
+
+export CFLAGS="%{optflags} -fPIC -Wall
+ -DLDAP_DEPRECATED -DDEFAULT_LISTENBACKLOG=APR_INT32_MAX -DDEFAULT_ERRORLOG='\"%{logfiledir}/error_log\"'"
+export CPPFLAGS="%{optflags} -DSSL_EXPERIMENTAL_ENGINE -DMAX_SERVER_LIMIT=200000 -DLDAP_DEPRECATED -DMAXLINE=4096"
+cat > config.layout <<-EOF
+# SUSE Layout
+
+ prefix: %{datadir}
+ exec_prefix: %{_prefix}
+ bindir: %{_bindir}
+ sbindir: %{_sbindir}
+ libdir: %{_libdir}
+ libexecdir: %{libexecdir}
+ mandir: %{_mandir}
+ sysconfdir: %{sysconfdir}
+ datadir: %{datadir}
+ installbuilddir: %{installbuilddir}
+ errordir: %{errordir}
+ iconsdir: %{iconsdir}
+ htdocsdir: %{htdocsdir}
+ manualdir: %{manualdir}
+ cgidir: %{cgidir}
+ includedir: %{includedir}
+ localstatedir: %{localstatedir}
+ runtimedir: %{runtimedir}
+ logfiledir: %{logfiledir}
+ proxycachedir: %{proxycachedir}
+
+EOF
+# %%configure (e. g --libexecdir) switches override
+# layout paths (use layout because some of variables
+# there does not exist as configure switches), so
+# override them back
+%configure \
+ --libexecdir=%{libexecdir} \
+ --includedir=%{includedir} \
+ --sysconfdir=%{sysconfdir} \
+ --enable-layout=SUSE \
+ --libexecdir=%{libexecdir} \
+%if "%{mpm}" != ""
+ --with-program-name=httpd-%{mpm} \
+%endif
+ --with-apr=%{_bindir}/apr-1-config \
+ --with-apr-util=%{_bindir}/apu-1-config \
+%if "%{mpm}" != ""
+ --with-mpm="%{mpm}" \
+%endif
+%if "%{mpm}" == "worker" || "%{mpm}" == "event"
%ifarch %ix86
%ifnarch i386
- --enable-nonportable-atomics=yes \
+ --enable-nonportable-atomics=yes \
%endif
%endif
%endif
- --enable-exception-hook \
- --with-pcre \
- --enable-pie \
- --enable-mods-shared=all \
- --enable-mods-static="%{mods_static}" \
- --enable-ssl=shared \
- --disable-isapi \
- --enable-deflate \
-%if 0%{?suse_version} >= 1315
- --enable-brotli \
+ --enable-exception-hook \
+ --with-pcre \
+ --enable-pie \
+ --enable-mods-shared=all \
+ --enable-mods-static="%{static_modules}" \
+ --enable-ssl=shared \
+ --disable-isapi \
+ --enable-deflate \
+ --enable-brotli \
+ --enable-echo \
+ --enable-filter \
+ --enable-ext-filter \
+ --enable-charset-lite \
+ --enable-file-cache \
+ --enable-logio \
+ --enable-dumpio \
+ --enable-bucketeer \
+ --enable-case_filter \
+ --enable-case_filter_in \
+ --enable-imagemap \
+%if %{build_http2}
+ --enable-http2 \
+%endif
+ --with-ldap \
+ --enable-ldap \
+ --enable-authnz_ldap \
+ --enable-authnz-fcgi \
+ --enable-proxy \
+ --enable-proxy-connect \
+ --enable-proxy-ftp \
+ --enable-proxy-http \
+%if %{build_http2}
+ --enable-proxy-http2 \
+%endif
+ --enable-proxy-fdpass \
+ --enable-cache \
+ --enable-disk-cache \
+ --enable-mem-cache \
+ --enable-version \
+ --enable-dav-lock \
+ --enable-authn-alias \
+ --enable-optional-hook-export \
+ --enable-optional-hook-import \
+ --enable-optional-fn-import \
+ --enable-optional-fn-export \
+ --enable-suexec \
+ --with-suexec-bin=%{_sbindir}/suexec \
+ --with-suexec-caller=%{httpduser} \
+ --with-suexec-docroot=%{datadir} \
+ --with-suexec-logfile=%{logfiledir}/suexec.log \
+ --with-suexec-userdir=%{userdir} \
+ --with-suexec-uidmin=96 \
+ --with-suexec-gidmin=96 \
+ --with-suexec-safepath=%{suexec_safepath} \
+ --disable-heartbeat
+
+# MPMs build
+%if "%{mpm}" != ""
+# adjust SERVER_CONFIG_FILE
+sed -i "s:httpd-%{mpm}.conf:httpd.conf:" include/ap_config_auto.h
+make %{?_smp_mflags}
+%endif
+
+# main package build
+%if "%{flavor}" == ""
+pushd support
+make %{?_smp_flags} suexec
+popd
+%endif
+
+# utils build
+%if "%{flavor}" == "utils"
+pushd support
+make %{?_smp_mflags}
+cp %{SOURCE130} gensslcert
+cp %{SOURCE131} check_forensic
+cp %{SOURCE132} find_directives
+popd
+%endif
%endif
- --enable-echo \
- --enable-filter \
- --enable-ext-filter \
- --enable-charset-lite \
- --enable-file-cache \
- --enable-logio \
- --enable-dumpio \
- --enable-bucketeer \
- --enable-case_filter \
- --enable-case_filter_in \
- --enable-imagemap \
-%if 0%{?build_http2}
- --enable-http2 \
-%endif
- --with-ldap \
- --enable-ldap \
- --enable-authnz_ldap \
- --enable-authnz-fcgi \
- --enable-proxy \
- --enable-proxy-connect \
- --enable-proxy-ftp \
- --enable-proxy-http \
-%if 0%{?build_http2}
- --enable-proxy-http2 \
-%endif
- --enable-proxy-fdpass \
- --enable-cache \
- --enable-disk-cache \
- --enable-mem-cache \
- --enable-version \
- --enable-dav-lock \
- --enable-authn-alias \
- --enable-optional-hook-export \
- --enable-optional-hook-import \
- --enable-optional-fn-import \
- --enable-optional-fn-export \
- --enable-suexec \
- --with-suexec-bin=%{_sbindir}/suexec \
- --with-suexec-caller=%{httpduser} \
- --with-suexec-docroot=%{datadir} \
- --with-suexec-logfile=%{logfiledir}/suexec.log \
- --with-suexec-userdir=%{userdir} \
- --with-suexec-uidmin=96 \
- --with-suexec-gidmin=96 \
- --with-suexec-safepath=%{suexec_safepath} \
- --disable-heartbeat
-}
-# build the 3 multi-processing modules (MPM) in a loop
#
-for mpm in %{mpms_to_build}; do
- echo $mpm >> .status
- test -s Makefile && make clean >/dev/null
- echo -e "\n\n\n \e[01m***** Building $mpm MPM *****\e[00m\n\n\n"
- export mpm_suffix=-$mpm
- configure
- sed "s/-$mpm//" include/ap_config_auto.h > include/ap_config_auto.h.new
- mv include/ap_config_auto.h.new include/ap_config_auto.h
- sed -i -e "s@%{_localstatedir}/run@%{runtimedir}@g" include/ap_config_layout.h
-
- make CFLAGS="%{optflags} -fvisibility=hidden -fPIC -Wall -DDEFAULT_LISTENBACKLOG=APR_INT32_MAX -DDEFAULT_ERRORLOG='\"%{logfiledir}/error_log\"'" %{?_smp_mflags}
- make DESTDIR=%{buildroot} install -j1
-
- # show pathnames in config files
- echo;echo;echo; diff -U1 docs/conf/httpd-std.conf.in docs/conf/httpd-std.conf ||:
- echo;echo;echo; diff -U1 docs/conf/ssl-std.conf.in docs/conf/ssl-std.conf ||:
- # show compile settings
- pwd
- printf "\n\n\n"; ./httpd$mpm_suffix -V
- printf "\n\n\n"; ./httpd$mpm_suffix -l
- #mv %{buildroot}/%{sysconfdir}/httpd-std.conf %{buildroot}/%{sysconfdir}/httpd-std.conf$mpm_suffix
- #mv %{buildroot}/%{sysconfdir}/httpd2-prefork.conf %{buildroot}/%{sysconfdir}/httpd-std.conf$mpm_suffix
- # fix up and rename config_vars file: remove references to the RPM build dir;
- # remove references to RPM build root; fix apr/apu includedir
- sed -e "/^EXTRA_INCLUDES/s|-I%{_builddir}[^ ]* ||g" \
- -e "/^AP._INCLUDEDIR/s|%{builddir}.*$|%{includedir}$mpm_suffix|" \
- -e "/abs_srcdir/d" \
- -e "/AP_LIBS/d" \
- < %{buildroot}/%{installbuilddir}/config_vars.mk \
- > %{buildroot}/%{installbuilddir}/config_vars.mk$mpm_suffix
- rm %{buildroot}/%{installbuilddir}/config_vars.mk
- #rm -rf %{buildroot}.$mpm.post
- #cp -a %{buildroot}/ %{buildroot}.$mpm.post
-done
-mkdir -p %{buildroot}/%{libexecdir}
-
-# remove references to mpm type in config_vars
-sed -e "s^%{_libdir}/%{name}-%{default_mpm}^%{_libdir}/%{name}^" \
- -e "s/httpd$/httpd-%{default_mpm}/" \
- -e "s/%{name}-%{default_mpm}/%{name}/" \
- < %{buildroot}/%{installbuilddir}/config_vars.mk-%{default_mpm} \
- > %{buildroot}/%{installbuilddir}/config_vars.mk
-
-# get rid of modules that do not differ between the MPMs (since most of them are the same)
-# by putting them in /usr/lib/apache2
-ldir=%{buildroot}/%{libexecdir}
-for i in $(cd $ldir-%{default_mpm}; ls -1 *.so); do
- identical=true
- for mpm in %{mpms_to_build}; do
- if test -f $ldir-$mpm/$i -a -f $ldir-%{default_mpm}/$i; then
- objcopy --strip-debug $ldir-$mpm/$i $ldir-$mpm/$i.tst
- objcopy --strip-debug $ldir-%{default_mpm}/$i $ldir-%{default_mpm}/$i.tst
- ls -l $ldir-{%{default_mpm},$mpm}/$i*
- cmp -s $ldir-{%{default_mpm},$mpm}/$i.tst || identical=false
- rm -f $ldir-{%{default_mpm},$mpm}/$i.tst
- else
- identical=false
- fi
- done
- if $identical; then
- cp -dp $ldir-%{default_mpm}/$i $ldir
- for mpm in %{mpms_to_build}; do
- rm $ldir-$mpm/$i
- ln -s ../%{name}/$i $ldir-$mpm/$i
- done
- fi
-done
-
-# merge the three /usr/include/apache2-* directories
-# by putting them in /usr/lib/apache2
-idir=%{buildroot}/%{includedir}
-mkdir -p $idir
-for i in $(cd $idir-%{default_mpm}; ls -1); do
- identical=true
- for mpm in %{mpms_to_build}; do
- cmp -s $idir-{%{default_mpm},$mpm}/$i || identical=false
- done
- if $identical; then
- cp -dp $idir-%{default_mpm}/$i $idir
- for mpm in %{mpms_to_build}; do
- rm $idir-$mpm/$i
- ln -s ../%{name}/$i $idir-$mpm/$i
- done
- fi
-done
-for i in ap_config_auto.h ap_config_layout.h; do
- if [ ! -f $idir/$i ]; then
- sed 's/-%{default_mpm}//' $idir-%{default_mpm}/$i > $idir/$i
- fi
-done
+# INSTALL
+#
+%if ! %{test}
%install
-# (most installation (to build root) has already been done in %%build)
-#
+echo "================== INSTALLING [%{flavor}] flavor"
+
+# MPMs install
+%if "%{mpm}" != ""
+# install httpd binary
+make DESTDIR=%{buildroot} program-install
+# install modules
+pushd modules
+make DESTDIR=%{buildroot} install -j1
+popd
+# install alternative links (httpd binary, modules)
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+ln -sf %{_sysconfdir}/alternatives/httpd %{buildroot}%{_sbindir}/httpd
+mkdir -p %{buildroot}%{_libdir}/apache2/
+for module in %{dynamic_modules}; do
+ if [ -e %{buildroot}%{libexecdir}/mod_$module.so ]; then
+ ln -sf %{_sysconfdir}/alternatives/mod_$module.so %{buildroot}%{_libdir}/apache2/mod_$module.so
+ fi
+done
+%endif
+
+# main packge install
+%if "%{flavor}" == ""
+mkdir -p %{buildroot}%{logfiledir} \
+ %{buildroot}%{proxycachedir} \
+ %{buildroot}%{localstatedir} \
+ %{buildroot}%{libexecdir}
+
# save MODULE_MAGIC_NUMBER
-cat > %{buildroot}/%{_libdir}/%{name}_MMN <<-EOF
- #!/bin/sh
- echo %{apache_mmn}
+mkdir -p %{buildroot}/%{_libexecdir}
+cat > %{buildroot}/%{_libexecdir}/%{name}_MMN <<-EOF
+#!/bin/sh
+echo %{apache_mmn}
EOF
-cp -p %{buildroot}/%{sysconfdir}/httpd-%{default_mpm}.conf %{buildroot}/%{sysconfdir}/httpd.conf
-cp -p %{buildroot}/%{sysconfdir}/httpd.conf ./httpd.conf.default
-rm %{buildroot}/%{sysconfdir}/httpd-*.conf
-#
-# create directories
-mkdir -p %{buildroot}/%{_fillupdir} \
- %{buildroot}/%{proxycachedir} \
- %{buildroot}/%{localstatedir}
-#
-# support files
-install -m 755 support/log_server_status %{buildroot}/%{_bindir}/
-install -m 755 support/split-logfile %{buildroot}/%{_bindir}/
-install -m 755 support/logresolve.pl %{buildroot}/%{_sbindir}/
mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
-install -m 644 %{_sourcedir}/%{name}.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
-%if 0%{?suse_version} == 1110
-install -m 644 %{_sourcedir}/%{name}-init.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
-%endif
-install -m 755 %{_sourcedir}/apache2-check_forensic %{buildroot}/%{_bindir}/check_forensic
-install -m 755 %{_sourcedir}/apache2-find-directives %{buildroot}/%{_bindir}/
-#
-# ssl stuff
-install -m 755 %{SOURCE25} %{buildroot}/%{_bindir}/
-tar -xjf %{SOURCE29} -C %{buildroot}/%{sysconfdir}
-#
-# init script and friends
-install -m 644 %{_sourcedir}/apache2-script-helpers %{buildroot}/%{_datadir}/%{name}/script-helpers
-install -m 744 %{_sourcedir}/start_apache2 %{buildroot}/%{_sbindir}/
-cp -r deprecated-scripts %{buildroot}/%{_datadir}/%{name}/
-install -m 755 %{_sourcedir}/apache-22-24-upgrade %{buildroot}/%{_datadir}/%{name}/
-%if 0%{?suse_version} >= 1210
-mkdir -p %{buildroot}%{_unitdir}/
-install -m 700 %{_sourcedir}/apache2-systemd-ask-pass %{buildroot}/%{_sbindir}/
-install -m 644 %{_sourcedir}/apache2.service %{buildroot}/%{_unitdir}/
-install -m 644 %{_sourcedir}/apache2@.service %{buildroot}/%{_unitdir}/
-install -m 644 %{_sourcedir}/apache2.target %{buildroot}/%{_unitdir}/
-ln -sf service %{buildroot}/%{_sbindir}/rcapache2
-%else
-mkdir -p %{buildroot}%{_sysconfdir}/init.d
-mkdir -p %{buildroot}%{_sysconfdir}/%{name}/sysconfig.d
+install -m 644 %{SOURCE31} %{buildroot}/%{_sysconfdir}/logrotate.d/apache2
-install -m 744 %{_sourcedir}/rc.%{name} %{buildroot}/%{_initddir}/%{name}
-ln -sf ../..%{_initddir}/%{name} %{buildroot}/%{_sbindir}/rcapache2
-for file in find_mpm \
- get_includes \
- get_module_list \
- load_configuration
-do
- ln -sf deprecated-scripts/$file %{buildroot}/%{_datadir}/%{name}/$file
- chmod +x %{buildroot}/%{_datadir}/%{name}/$file
-done
+make DESTDIR=%{buildroot} install-suexec -j1
+
+mkdir -p %{buildroot}%{_unitdir}
+install -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/apache2.service
+install -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/apache2@.service
+install -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/apache2.target
+
+install -m 700 %{SOURCE102} %{buildroot}%{_sbindir}/apache2-systemd-ask-pass
+
+install -m 755 %{SOURCE100} %{buildroot}%{_sbindir}/a2enmod
+ln -s a2enmod %{buildroot}%{_sbindir}/a2dismod
+install -m 755 %{SOURCE101} %{buildroot}%{_sbindir}/a2enflag
+ln -s a2enflag %{buildroot}%{_sbindir}/a2disflag
+install -m 744 %{SOURCE103} %{buildroot}%{_sbindir}/start_apache2
+mkdir -p %{buildroot}/%{_datadir}/apache2/
+install -m 644 %{SOURCE104} %{buildroot}/%{_datadir}/apache2/script-helpers
+
+%if %{use_firewalld}
+install -D -m 644 %{SOURCE33} %{buildroot}%{_prefix}/lib/firewalld/services/apache2.xml
+install -D -m 644 %{SOURCE34} %{buildroot}%{_prefix}/lib/firewalld/services/apache2-ssl.xml
+%else
+install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
+install -m 644 %{SOURCE35} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/apache2
+install -m 644 %{SOURCE36} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/apache2-ssl
%endif
-install -m 755 %{_sourcedir}/sysconf_addword %{buildroot}/%{_datadir}/%{name}/
-install -m 755 %{_sourcedir}/a2enflag %{buildroot}/%{_sbindir}
-ln -s a2enflag %{buildroot}/%{_sbindir}/a2disflag
-install -m 755 %{_sourcedir}/a2enmod %{buildroot}/%{_sbindir}
-ln -s a2enmod %{buildroot}/%{_sbindir}/a2dismod
-#
-# directories for files from other packages and other configuration
-mkdir -p %{buildroot}/%{sysconfdir}/vhosts.d
-#
-# install sysconfig template
-install -m 644 %{_sourcedir}/sysconfig.%{name} \
- %{buildroot}/%{_fillupdir}/sysconfig.%{name}
-#
-# install configuration files:
-mkdir -p %{buildroot}/%{runtimedir}
-mkdir -p %{buildroot}/%{sysconfdir}/conf.d
-for i in default-server.conf \
- errors.conf \
- global.conf \
- httpd.conf \
- listen.conf \
- loadmodule.conf \
- mod_autoindex-defaults.conf \
- mod_info.conf \
- mod_log_config.conf \
- mod_mime-defaults.conf \
- mod_status.conf \
- mod_userdir.conf \
- mod_usertrack.conf \
- server-tuning.conf \
- mod_reqtimeout.conf \
+
+mkdir -p %{buildroot}%{_sysconfdir}
+mkdir -p %{buildroot}%{_sysconfdir}/apache2/sysconfig.d
+
+mkdir -p %{buildroot}/%{_fillupdir}
+install -m 644 %{SOURCE30} %{buildroot}%{_fillupdir}/sysconfig.apache2
+
+mkdir -p %{buildroot}%{sysconfdir}
+mkdir -p %{buildroot}%{sysconfdir}/conf.d
+for c in default-server.conf \
+ errors.conf \
+ global.conf \
+ httpd.conf \
+ listen.conf \
+ loadmodule.conf \
+ mod_autoindex-defaults.conf \
+ mod_info.conf \
+ mod_log_config.conf \
+ mod_mime-defaults.conf \
+ mod_status.conf \
+ mod_userdir.conf \
+ mod_usertrack.conf \
+ server-tuning.conf \
+ mod_reqtimeout.conf \
mod_cgid-timeout.conf \
- ssl-global.conf \
- protocols.conf
+ ssl-global.conf \
+ protocols.conf
do
- install -m 644 %{_sourcedir}/apache2-$i %{buildroot}/%{sysconfdir}/$i
+ install -m 644 %{_sourcedir}/apache2-$c %{buildroot}/%{sysconfdir}/$c
done
cat > %{buildroot}/%{sysconfdir}/uid.conf <<-EOF
- User %{httpduser}
- Group %{httpdgroup}
+ User %{httpduser}
+ Group %{httpdgroup}
EOF
-
+tar -xjf %{SOURCE10} -C %{buildroot}/%{sysconfdir}
# fixup libdir
%if "%{_lib}" != "lib64"
sed -e 's/lib64/%{_lib}/' -i \
%{buildroot}/%{sysconfdir}/loadmodule.conf \
- %{buildroot}/%{_fillupdir}/sysconfig.%{name}
+ %{buildroot}/%{_fillupdir}/sysconfig.apache2
%endif
-
-# remove configuration for mpms which have not been built
-mpm_confs="$(awk '/IfModule .*\.c/ {print $2}' %{buildroot}/%{sysconfdir}/server-tuning.conf | cut -d. -f1 | tr '\n' ' ')"
-for mpm_conf in $mpm_confs; do
- case "%{mpms_to_build}" in
- *$mpm_conf*) ;;
- *) sed "/^# $mpm_conf/, /^$/ d" %{buildroot}/%{sysconfdir}/server-tuning.conf > t
- #diff -u %{buildroot}/%{sysconfdir}/server-tuning.conf t ||:
- mv t %{buildroot}/%{sysconfdir}/server-tuning.conf
- ;;
- esac
-done
-install -m 644 %{SOURCE130} %{buildroot}/%{sysconfdir}/vhosts.d/vhost.template
-install -m 644 %{SOURCE131} %{buildroot}/%{sysconfdir}/vhosts.d/vhost-ssl.template
-install -m 644 %{SOURCE104} %{buildroot}/%{sysconfdir}/conf.d/manual.conf
-# for mod_auth_ldap
+mkdir %{buildroot}/%{sysconfdir}/vhosts.d
+install -m 644 %{SOURCE190} %{buildroot}/%{sysconfdir}/vhosts.d/vhost.template
+install -m 644 %{SOURCE191} %{buildroot}/%{sysconfdir}/vhosts.d/vhost-ssl.template
install -m 644 docs/conf/charset.conv %{buildroot}/%{sysconfdir}/
-
-cp -p %{_sourcedir}/robots.txt .
-cp -p %{_sourcedir}/favicon.ico %{buildroot}/%{htdocsdir}/
-cat > %{buildroot}/%{htdocsdir}/robots.txt <<-EOF
- User-Agent: *
- Disallow: /
-EOF
-
-#
-# use official mime.types (more complete)
-#
+install -m 644 docs/conf/magic %{buildroot}/%{sysconfdir}/
ln -sf ../mime.types %{buildroot}/%{sysconfdir}/mime.types
-mv %{buildroot}/%{cgidir}/printenv* .
-mv %{buildroot}/%{cgidir}/test-cgi .
+make DESTDIR=%{buildroot} install-icons
+make DESTDIR=%{buildroot} install-error
-# fix up apxs
-pushd %{buildroot}/%{_bindir}
- for mpm in %{mpms_to_build}; do
- cat <<-EOT_ED | ed -s apxs
- H
- ,s/^\(.*\)config_vars.mk\(.*\)$/\1config_vars.mk\$mpm_suffix\2/
- /config_vars.mk
- -
- i
- my \$mpm_suffix = "-$mpm";
- .
- wq apxs-$mpm
- EOT_ED
- chmod 755 apxs-$mpm
- done
- cat <<-EOT_ED | ed -s apxs
- H
- /config_vars
- a
- my \$mpm_suffix = "";
- .
- wq
- EOT_ED
-popd
-
-# install firewall information file
-%if %{use_firewalld}
-install -D -m 644 %{SOURCE49} %{buildroot}%{_prefix}/lib/firewalld/services/%{name}.xml
-install -D -m 644 %{SOURCE50} %{buildroot}%{_prefix}/lib/firewalld/services/%{name}-ssl.xml
-%else
-install -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/
-install -m 644 %{SOURCE51} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
-install -m 644 %{SOURCE52} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-ssl
+mkdir -p %{buildroot}%{_mandir}/man8/
+install -D -m 644 docs/man/suexec.8 %{buildroot}%{_mandir}/man8/
+install -D -m 644 docs/man/httpd.8 %{buildroot}%{_mandir}/man8/
%endif
-ln -sf %{_bindir}/apxs %{buildroot}%{_sbindir}
-#
-# compat symlinks apache2 -> apache
-#
-ln -s ab %{buildroot}/%{_bindir}/ab2
-ln -s ab.1.gz %{buildroot}/%{_mandir}/man1/ab2.1.gz
-ln -s apxs %{buildroot}/%{_bindir}/apxs2
-ln -s apxs.1.gz %{buildroot}/%{_mandir}/man1/apxs2.1.gz
-ln -s apxs-prefork %{buildroot}/%{_bindir}/apxs2-prefork
-ln -s apxs-worker %{buildroot}/%{_bindir}/apxs2-worker
-ln -s apxs-event %{buildroot}/%{_bindir}/apxs2-event
-ln -s dbmmanage %{buildroot}/%{_bindir}/dbmmanage2
-ln -s dbmmanage.1.gz %{buildroot}/%{_mandir}/man1/dbmmanage2.1.gz
-ln -s htdbm %{buildroot}/%{_bindir}/htdbm2
-ln -s htdbm.1.gz %{buildroot}/%{_mandir}/man1/htdbm2.1.gz
-ln -s htdigest %{buildroot}/%{_bindir}/htdigest2
-ln -s htdigest.1.gz %{buildroot}/%{_mandir}/man1/htdigest2.1.gz
-ln -s htpasswd %{buildroot}/%{_bindir}/htpasswd2
-ln -s htpasswd.1.gz %{buildroot}/%{_mandir}/man1/htpasswd2.1.gz
-ln -s check_forensic %{buildroot}/%{_bindir}/check_forensic2
-ln -s logresolve %{buildroot}/%{_bindir}/logresolve2
-ln -s logresolve.1.gz %{buildroot}/%{_mandir}/man1/logresolve2.1.gz
-ln -s log_server_status %{buildroot}/%{_bindir}/log_server_status2
-ln -s split-logfile %{buildroot}/%{_bindir}/split-logfile2
-ln -s apachectl %{buildroot}/%{_sbindir}/apache2ctl
-ln -s apachectl.8.gz %{buildroot}/%{_mandir}/man8/apache2ctl.8.gz
-ln -s apxs %{buildroot}/%{_sbindir}/apxs2
-ln -s httpd-prefork %{buildroot}/%{_sbindir}/httpd2-prefork
-ln -s httpd-worker %{buildroot}/%{_sbindir}/httpd2-worker
-ln -s httpd-event %{buildroot}/%{_sbindir}/httpd2-event
-ln -s httpd.8.gz %{buildroot}/%{_mandir}/man8/httpd2.8.gz
-ln -s logresolve.pl %{buildroot}/%{_sbindir}/logresolve.pl2
-ln -s rotatelogs %{buildroot}/%{_sbindir}/rotatelogs2
-ln -s rotatelogs.8.gz %{buildroot}/%{_mandir}/man8/rotatelogs2.8.gz
-ln -s suexec %{buildroot}/%{_sbindir}/suexec2
-ln -s suexec.8.gz %{buildroot}/%{_mandir}/man8/suexec2.8.gz
-#
-# filelists
-#
->filelist; >filelist-devel
-for mpm in %{mpms_to_build}; do
- echo %dir %{_libdir}/%{name}-$mpm >> filelist
- (
- echo %dir %{includedir}-$mpm
- echo %{_bindir}/apxs-$mpm
- echo %{_bindir}/apxs2-$mpm
- ) >> filelist-devel
+
+# utils install
+%if "%{flavor}" == "utils"
+> utils-filelist
+for utility in %{support_bin}; do
+ install -D -m 755 support/$utility %{buildroot}%{_bindir}/$utility
+ echo %{_bindir}/$utility >> utils-filelist
+ if [ -f docs/man/$utility.1 ]; then
+ install -D -m 644 docs/man/$utility.1 %{buildroot}%{_mandir}/man1/$utility.1
+ echo %{_mandir}/man1/$utility.1.* >> utils-filelist
+ fi
done
-find %{buildroot}/%{includedir}/.. -type f -o -type l \
- | sed "s#%{buildroot}##" \
- >> filelist-devel
-find %{buildroot}/%{installbuilddir} -type f \
- | sed "s#%{buildroot}##" \
- >> filelist-devel
+for utility in %{support_sbin}; do
+ install -D -m 755 support/$utility %{buildroot}%{_sbindir}/$utility
+ echo %{_sbindir}/$utility >> utils-filelist
+ if [ -f docs/man/$utility.8 ]; then
+ install -D -m 644 docs/man/$utility.8 %{buildroot}%{_mandir}/man8/$utility.8
+ echo %{_mandir}/man8/$utility.8.* >> utils-filelist
+ fi
+done
+%endif
+
+# devel install
+%if "%{flavor}" == "devel"
+mkdir -p %{buildroot}/%{_bindir}
+install -D -m 755 support/apxs %{buildroot}%{_bindir}/
+mkdir -p %{buildroot}/%{_mandir}/man1/
+install -D -m 644 docs/man/apxs.1 %{buildroot}%{_mandir}/man1/
+make DESTDIR=%{buildroot} install-build -j1
+make DESTDIR=%{buildroot} install-include -j1
+%endif
+
+# manual install
+%if "%{flavor}" == "manual"
+mkdir -p %{buildroot}%{manualdir}
+cp -ra docs/manual/* %{buildroot}%{manualdir}
+mkdir -p %{buildroot}/%{sysconfdir}/conf.d/
+install -m 644 %{SOURCE154} %{buildroot}/%{sysconfdir}/conf.d/manual.conf
+%endif
+
+%endif
+
#
-# remove files from the build root that we won't package
+# CHECK
#
-rm -f %{buildroot}/%{_libdir}/%{name}-*/*.exp # needed only on AIX
-rm -f %{buildroot}/%{_libdir}/%{name}/*.exp # needed only on AIX
-rm -f %{buildroot}/%{_sbindir}/checkgid # needed only for user installations from tarball
-rm -r %{buildroot}/%{sysconfdir}/extra # it is already in the documentation directory
-#
-# do not ship example configuration files in
-# /etc/apache2, but %doc them later
-#
-mv %{buildroot}/%{sysconfdir}/original .
%check
-# now check wether httpd binary runs properly
-# and validate httpd.conf file
-#
-pushd %{buildroot}/%{sysconfdir}
-for i in *.conf; do
- cp $i $i.test;
+# test basic function of just built MPMs
+%if ! %{test} && "%{mpm}" != ""
+echo "Testing ./httpd-%{mpm}"
+test_dir="$PWD/my-test-%{mpm}"
+mkdir $test_dir
+cat > $test_dir/httpd.conf << EOF
+ServerName my_test
+ErrorLog $test_dir/error_log
+PidFile $test_dir/httpd.pid
+User $(id -un)
+Group $(id -gn)
+Listen 60080
+DocumentRoot $test_dir
+LoadModule authz_core_module $PWD/modules/aaa/.libs/mod_authz_core.so
+EOF
+exit_code=0
+./httpd-%{mpm} -k start -f $test_dir/httpd.conf
+sleep 2
+echo 'HTTPD HELLO' > $test_dir/hello.html
+curl -s http://localhost:60080/hello.html | grep 'HTTPD HELLO' || exit_code=1
+./httpd-%{mpm} -k stop -f $test_dir/httpd.conf
+sleep 1
+# do not continue %%check phase
+exit $exit_code
+%endif
+
+# test just built utils
+%if "%{flavor}" == "utils"
+# htpasswd
+echo "Testing htpasswd"
+exit_code=0
+support/htpasswd -bc htpasswd foo_user foo_password
+support/htpasswd -bv htpasswd foo_user foo_password || exit_code=1
+# htpasswd
+echo "Testing htpasswd"
+exit_code=0
+support/htdbm -bc htpasswd bar_user bar_password
+support/htdbm -bv htpasswd bar_user bar_password || exit_code=2
+# do not continue %%check phase
+exit $exit_code
+%endif
+
+# test _installed_ packages (via test_* flavors)
+%if %{test}
+
+%if "%{flavor}" == "test_main"
+exit_code=0
+# create test configuration, based on default distro one
+# with minimum changes to see it is working
+mkdir -p $PWD{%{_sysconfdir}/sysconfig,%{localstatedir},%{runtimedir},%{logfiledir}}
+# adjust sysconfig file
+cp %{_sysconfdir}/sysconfig/apache2 $PWD%{_sysconfdir}/sysconfig/
+sed -i -e "s:\(APACHE_HTTPD_CONF=\).*:\1$PWD%{sysconfdir}/httpd.conf:" \
+ -e "s:\(%{_localstatedir}\):$PWD\1:" $PWD%{_sysconfdir}/sysconfig/apache2
+# copy and adjust configuration (paths and Listen)
+cp -r %{_sysconfdir}/apache2/ %{_sysconfdir}/mime.types etc 2>/dev/null || true
+find etc/apache2 -name *.conf | xargs sed -i "s:\(%{_localstatedir}\):$PWD\1:"
+find etc/apache2 -name *.conf | xargs sed -i "s:/etc:$PWD/etc:"
+sed -i -e 's:80:60080:' -e 's:443:60443:' etc/apache2/listen.conf
+# /usr/sbin/start_apache2 is 744
+cp %{_sbindir}/start_apache2 .
+export START_APACHE_SYSCONFIG_FILE=$PWD/etc/sysconfig/apache2
+export START_APACHE_RUN_DIR=$PWD/run
+./start_apache2 -k start
+sleep 2
+curl -s http://localhost:60080/manual/ | grep 'Apache.*HTTP Server.*Documentation' || exit_code=1
+curl -s http://localhost:60080/manual/de/ | grep 'Neue Funktionen' || exit_code=2
+./start_apache2 -k stop
+sleep 1
+# do not continue %%check phase
+exit $exit_code
+%endif
+
+# test of devel package
+%if "%{flavor}" == "test_devel"
+# apxs test
+echo "Testing apxs, compiling example module"
+apxs -q CFLAGS | grep "\\%{optflags}"
+cp %{SOURCE21} mod_example.c
+apxs -c mod_example.c
+test_dir="$PWD/my-test-devel"
+echo "Try to load example module"
+mkdir $test_dir
+cat > $test_dir/httpd.conf << EOF
+ServerName my_test
+ErrorLog $test_dir/error_log
+PidFile $test_dir/httpd.pid
+User $(id -un)
+Group $(id -gn)
+Listen 60080
+DocumentRoot $test_dir
+LoadModule authz_core_module %{libexecdir}-%{default_mpm}/mod_authz_core.so
+LoadModule example_module $PWD/.libs/mod_example.so
+
+ SetHandler example-handler
+
+EOF
+exit_code=0
+%{_sbindir}/httpd-%{default_mpm} -k start -f $test_dir/httpd.conf
+sleep 2
+echo "Use example module"
+curl -s http://localhost:60080/hello | grep 'Hello, world!' || exit_code=1
+%{_sbindir}/httpd-%{default_mpm} -k stop -f $test_dir/httpd.conf
+sleep 1
+# do not continue %%check phase
+exit $exit_code
+%endif
+
+# unittest run in test_mpm_* flavors
+echo "Run httpd-framework unittests"
+cd httpd-framework
+perl Makefile.PL -apxs %{apache_apxs}
+function dep()
+{
+ dependee="$1"
+ requirement="$2"
+ # requirement has to be loaded before dependee;
+ # there can be duplicite entries in $modules
+ # string, will be added only once
+ # in load-all-modules.conf
+ if echo "$modules" | grep -q "$dependee"; then
+ modules="$requirement $modules"
+ fi
+}
+# create a conf loading all MPM's modules
+echo > $PWD/load-all-modules.conf
+# hack: sort -u to load mod_proxy before mod_proxy_http, mod_cache before mod_cache_disk, etc.
+modules=$(find %{_libdir}/apache2-%{mpm}/ %{_libdir}/apache2/ -name *.so | sed 's:.*/mod_\(.*\).so:\1:' | sort -u)
+# fix up dependencies
+dep "lbmethod_bybusyness" "proxy"
+dep "lbmethod_byrequests" "proxy"
+dep "lbmethod_bytraffic" "proxy"
+dep "lbmethod_heartbeat" "proxy"
+for m in $modules; do
+ echo "$m" | grep -q 'php' ]] && [ "%{mpm}" == 'worker' -o "%{mpm}" == 'event' ] && continue
+ path=$(find %{_libdir}/apache2-%{mpm}/ %{_libdir}/apache2/ -name mod_$m.so | head -n 1)
+ if ! grep -q "mod_$m.c" $PWD/load-all-modules.conf; then
+ echo "" >> $PWD/load-all-modules.conf
+ echo " LoadModule ${m}_module $path" >> $PWD/load-all-modules.conf
+ echo "" >> $PWD/load-all-modules.conf
+ fi
done
-sed -e 's+%{_libdir}+'%{buildroot}'%{_libdir}+' \
- -e 's+%{_localstatedir}/run+'%{buildroot}'%{_localstatedir}/run+' \
- -e 's+%{sysconfdir}+'%{buildroot}'%{sysconfdir}+' \
- -e 's+%{datadir}+'%{buildroot}'%{datadir}+' \
- -e 's+\.conf$+&.test+' \
- -e 's+%{_localstatedir}/log+'%{buildroot}'%{_localstatedir}/log+' \
- httpd.conf > httpd.conf.test
-sed -e 's+%{sysconfdir}+'%{buildroot}'%{sysconfdir}+' \
- default-server.conf > default-server.conf.test
-sed -i 's+%{_localstatedir}/log+'%{buildroot}'%{_localstatedir}/log+' \
- global.conf.test
-sed -i 's+%{_libdir}+%{buildroot}/%{_libdir}+' loadmodule.conf.test
-popd
+# run the testsuite
+echo '#####################################################'
+echo "# TESTING %{mpm}"
+echo '#'
+exit_code=0
+t/TEST -clean
+t/TEST -httpd /usr/sbin/httpd-%{mpm} -httpd_conf $PWD/load-all-modules.conf -start
+t/TEST -run-tests || exit_code=1
+t/TEST -stop
+exit $exit_code
-LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
-%{buildroot}/%{_sbindir}/httpd-%{default_mpm} \
- -e debug -t -f %{buildroot}/%{sysconfdir}/httpd.conf.test || exit 1
-rm %{buildroot}/%{sysconfdir}/*.test
-
-# taken from kdump/kdump.spec, thanks!
-# Compatibility cruft
-# there is no %%license prior to SLE12
-%if %{undefined _defaultlicensedir}
-%define license %doc
-%else
-# filesystem before SLE12 SP3 lacks /usr/share/licenses
-%if 0%(test ! -d %{_defaultlicensedir} && echo 1)
-%define _defaultlicensedir %{_defaultdocdir}
+# end of installed packages test
%endif
-%endif
-# End of compatibility cruft
+exit 0
-%files -f filelist
-%defattr(-,root,root)
+#
+# FILES
+#
+
+# MPMs files
+%if ! %{test} && "%{mpm}" != ""
+%files
+%{_sbindir}/httpd
+%{_sbindir}/httpd-%{mpm}
+%ghost %{_sysconfdir}/alternatives/httpd
+# %%ghost %%{_sysconfdir}/alternatives/mod_*.so does not work
+%(for module in %{dynamic_modules}; do echo "%ghost %{_sysconfdir}/alternatives/mod_$module.so"; done)
+%dir %{_libdir}/apache2-%{mpm}
+%dir %{_libdir}/apache2
+%{_libdir}/apache2/*.so
+%{libexecdir}/mod_*.so
+%endif
+
+# main package files
+%if "%{flavor}" == ""
+%files
%doc INSTALL READM* ABOUT_APACHE CHANGES
%license LICENSE
-%doc support/SHA1
-%{_mandir}/man?/apachectl.?.*
-%{_mandir}/man?/apache2ctl.?.*
-%{_mandir}/man?/htcacheclean.?.*
-%{_mandir}/man?/httpd.?.*
-%{_mandir}/man?/httpd2.?.*
-%{_mandir}/man?/apxs.?.*
-%{_mandir}/man?/apxs2.?.*
-%{_mandir}/man?/suexec.?.*
-%{_mandir}/man?/suexec2.?.*
-%doc robots.txt
-%doc printenv
-%doc test-cgi
-%doc httpd.conf.default
-%doc original
%attr(750,root,root) %dir %{logfiledir}
%attr(750,%{httpduser},root) %dir %{proxycachedir}
%attr(750,%{httpduser},root) %dir %{localstatedir}
+%dir %{libexecdir}
+%dir %{_libexecdir}
+%attr(755,root,root) %{_libexecdir}/%{name}_MMN
%dir %{sysconfdir}
%config %{sysconfdir}/magic
%config %{sysconfdir}/mime.types
@@ -848,632 +828,134 @@ rm %{buildroot}/%{sysconfdir}/*.test
%{sysconfdir}/ssl.*/README*
%dir %{sysconfdir}/conf.d
%dir %{sysconfdir}/vhosts.d
-%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
-%if 0%{?suse_version} >= 1210
+%{_fillupdir}/sysconfig.apache2
+%config(noreplace) %{_sysconfdir}/logrotate.d/apache2
%{_unitdir}/apache2.service
%{_unitdir}/apache2@.service
%{_unitdir}/apache2.target
%{_sbindir}/apache2-systemd-ask-pass
-%else
-%{_initddir}/%{name}
-%dir %{_sysconfdir}/%{name}/sysconfig.d
-%endif
-%{_sbindir}/rcapache2
-%{_sbindir}/apachectl
-%{_sbindir}/apache2ctl
-%{_sbindir}/envvars
-%{_sbindir}/envvars-std
-%{_sbindir}/htcacheclean
%{_sbindir}/a2enflag
%{_sbindir}/a2enmod
%{_sbindir}/a2disflag
%{_sbindir}/a2dismod
%{_sbindir}/start_apache2
-%{_bindir}/log_server_status
-%{_bindir}/log_server_status2
+%{_datadir}/apache2/script-helpers
%verify(not mode) %attr(0755,root,root) %{_sbindir}/suexec
-%{_sbindir}/suexec2
-%{iconsdir}
-%{errordir}
-%{_fillupdir}/sysconfig.%{name}
-%attr(755,root,root) %{_libdir}/%{name}_MMN
-%dir %{_libdir}/%{name}
-%{_libdir}/%{name}/mod_*.so
-%dir %{installbuilddir}
-%dir %{_datadir}/%{name}
-%{_datadir}/%{name}/apache-22-24-upgrade
-%{_datadir}/%{name}/deprecated-scripts
-%{_datadir}/%{name}/script-helpers
-%{_datadir}/%{name}/sysconf_addword
%if %{use_firewalld}
%dir %{_prefix}/lib/firewalld
%dir %{_prefix}/lib/firewalld/services
-%{_prefix}/lib/firewalld/services/%{name}.xml
-%{_prefix}/lib/firewalld/services/%{name}-ssl.xml
+%{_prefix}/lib/firewalld/services/apache2.xml
+%{_prefix}/lib/firewalld/services/apache2-ssl.xml
%else
-%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
-%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}-ssl
+%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/apache2
+%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/apache2-ssl
%endif
-%if 0%{?suse_version} == 1110
-/usr/share/apache2/find_mpm
-/usr/share/apache2/get_includes
-/usr/share/apache2/get_module_list
-/usr/share/apache2/load_configuration
+%{_datadir}/apache2
+%{iconsdir}
+%{errordir}
+%{_mandir}/man8/httpd.8.*
+%{_mandir}/man8/suexec.8.*
+%doc support/SHA1
%endif
-%files prefork
-%defattr(-,root,root)
-%{_sbindir}/httpd-prefork
-%{_sbindir}/httpd2-prefork
-%dir %{_libdir}/%{name}-prefork
-# hardcoded list so we do not lose mods by accident
-%{_libdir}/%{name}-prefork/mod_access_compat.so
-%{_libdir}/%{name}-prefork/mod_actions.so
-%{_libdir}/%{name}-prefork/mod_alias.so
-%{_libdir}/%{name}-prefork/mod_allowmethods.so
-%{_libdir}/%{name}-prefork/mod_asis.so
-%{_libdir}/%{name}-prefork/mod_auth_basic.so
-%{_libdir}/%{name}-prefork/mod_auth_digest.so
-%{_libdir}/%{name}-prefork/mod_auth_form.so
-%{_libdir}/%{name}-prefork/mod_authn_anon.so
-%{_libdir}/%{name}-prefork/mod_authn_core.so
-%{_libdir}/%{name}-prefork/mod_authn_dbd.so
-%{_libdir}/%{name}-prefork/mod_authn_dbm.so
-%{_libdir}/%{name}-prefork/mod_authn_file.so
-%{_libdir}/%{name}-prefork/mod_authn_socache.so
-%{_libdir}/%{name}-prefork/mod_authnz_ldap.so
-%{_libdir}/%{name}-prefork/mod_authnz_fcgi.so
-%{_libdir}/%{name}-prefork/mod_authz_core.so
-%{_libdir}/%{name}-prefork/mod_authz_dbd.so
-%{_libdir}/%{name}-prefork/mod_authz_dbm.so
-%{_libdir}/%{name}-prefork/mod_authz_groupfile.so
-%{_libdir}/%{name}-prefork/mod_authz_host.so
-%{_libdir}/%{name}-prefork/mod_authz_owner.so
-%{_libdir}/%{name}-prefork/mod_authz_user.so
-%{_libdir}/%{name}-prefork/mod_autoindex.so
-%{_libdir}/%{name}-prefork/mod_bucketeer.so
-%{_libdir}/%{name}-prefork/mod_buffer.so
-%{_libdir}/%{name}-prefork/mod_cache.so
-%{_libdir}/%{name}-prefork/mod_cache_disk.so
-%{_libdir}/%{name}-prefork/mod_cache_socache.so
-%{_libdir}/%{name}-prefork/mod_case_filter.so
-%{_libdir}/%{name}-prefork/mod_case_filter_in.so
-%{_libdir}/%{name}-prefork/mod_cgi.so
-%{_libdir}/%{name}-prefork/mod_charset_lite.so
-%{_libdir}/%{name}-prefork/mod_data.so
-%{_libdir}/%{name}-prefork/mod_dav.so
-%{_libdir}/%{name}-prefork/mod_dav_fs.so
-%{_libdir}/%{name}-prefork/mod_dav_lock.so
-%{_libdir}/%{name}-prefork/mod_dbd.so
-%{_libdir}/%{name}-prefork/mod_deflate.so
-%if 0%{?suse_version} >= 1315
-%{_libdir}/%{name}-prefork/mod_brotli.so
+# utils files
+%if "%{flavor}" == "utils"
+%files -f utils-filelist
%endif
-%{_libdir}/%{name}-prefork/mod_dialup.so
-%{_libdir}/%{name}-prefork/mod_dir.so
-%{_libdir}/%{name}-prefork/mod_dumpio.so
-%{_libdir}/%{name}-prefork/mod_echo.so
-%{_libdir}/%{name}-prefork/mod_env.so
-%{_libdir}/%{name}-prefork/mod_expires.so
-%{_libdir}/%{name}-prefork/mod_ext_filter.so
-%{_libdir}/%{name}-prefork/mod_file_cache.so
-%{_libdir}/%{name}-prefork/mod_filter.so
-%{_libdir}/%{name}-prefork/mod_headers.so
-%{_libdir}/%{name}-prefork/mod_heartmonitor.so
-%if 0%{?build_http2}
-%{_libdir}/%{name}-prefork/mod_http2.so
-%{_libdir}/%{name}-prefork/mod_proxy_http2.so
-%endif
-%{_libdir}/%{name}-prefork/mod_imagemap.so
-%{_libdir}/%{name}-prefork/mod_include.so
-%{_libdir}/%{name}-prefork/mod_info.so
-%{_libdir}/%{name}-prefork/mod_lbmethod_bybusyness.so
-%{_libdir}/%{name}-prefork/mod_lbmethod_byrequests.so
-%{_libdir}/%{name}-prefork/mod_lbmethod_bytraffic.so
-%{_libdir}/%{name}-prefork/mod_lbmethod_heartbeat.so
-%{_libdir}/%{name}-prefork/mod_ldap.so
-%{_libdir}/%{name}-prefork/mod_log_config.so
-%{_libdir}/%{name}-prefork/mod_log_debug.so
-%{_libdir}/%{name}-prefork/mod_log_forensic.so
-%{_libdir}/%{name}-prefork/mod_logio.so
-%{_libdir}/%{name}-prefork/mod_lua.so
-%{_libdir}/%{name}-prefork/mod_macro.so
-%{_libdir}/%{name}-prefork/mod_mime.so
-%{_libdir}/%{name}-prefork/mod_mime_magic.so
-%{_libdir}/%{name}-prefork/mod_negotiation.so
-%{_libdir}/%{name}-prefork/mod_optional_fn_export.so
-%{_libdir}/%{name}-prefork/mod_optional_fn_import.so
-%{_libdir}/%{name}-prefork/mod_optional_hook_export.so
-%{_libdir}/%{name}-prefork/mod_optional_hook_import.so
-%{_libdir}/%{name}-prefork/mod_proxy.so
-%{_libdir}/%{name}-prefork/mod_proxy_ajp.so
-%{_libdir}/%{name}-prefork/mod_proxy_balancer.so
-%{_libdir}/%{name}-prefork/mod_proxy_connect.so
-%{_libdir}/%{name}-prefork/mod_proxy_express.so
-%{_libdir}/%{name}-prefork/mod_proxy_fcgi.so
-%{_libdir}/%{name}-prefork/mod_proxy_fdpass.so
-%{_libdir}/%{name}-prefork/mod_proxy_ftp.so
-%{_libdir}/%{name}-prefork/mod_proxy_hcheck.so
-%{_libdir}/%{name}-prefork/mod_proxy_html.so
-%{_libdir}/%{name}-prefork/mod_proxy_http.so
-%{_libdir}/%{name}-prefork/mod_proxy_scgi.so
-%{_libdir}/%{name}-prefork/mod_proxy_uwsgi.so
-%{_libdir}/%{name}-prefork/mod_proxy_wstunnel.so
-%{_libdir}/%{name}-prefork/mod_ratelimit.so
-%{_libdir}/%{name}-prefork/mod_reflector.so
-%{_libdir}/%{name}-prefork/mod_remoteip.so
-%{_libdir}/%{name}-prefork/mod_reqtimeout.so
-%{_libdir}/%{name}-prefork/mod_request.so
-%{_libdir}/%{name}-prefork/mod_rewrite.so
-%{_libdir}/%{name}-prefork/mod_sed.so
-%{_libdir}/%{name}-prefork/mod_session.so
-%{_libdir}/%{name}-prefork/mod_session_cookie.so
-%{_libdir}/%{name}-prefork/mod_session_crypto.so
-%{_libdir}/%{name}-prefork/mod_session_dbd.so
-%{_libdir}/%{name}-prefork/mod_setenvif.so
-%{_libdir}/%{name}-prefork/mod_slotmem_plain.so
-%{_libdir}/%{name}-prefork/mod_slotmem_shm.so
-%{_libdir}/%{name}-prefork/mod_socache_dbm.so
-%{_libdir}/%{name}-prefork/mod_socache_memcache.so
-%{_libdir}/%{name}-prefork/mod_socache_redis.so
-%{_libdir}/%{name}-prefork/mod_socache_shmcb.so
-%{_libdir}/%{name}-prefork/mod_speling.so
-%{_libdir}/%{name}-prefork/mod_ssl.so
-%{_libdir}/%{name}-prefork/mod_status.so
-%{_libdir}/%{name}-prefork/mod_substitute.so
-%{_libdir}/%{name}-prefork/mod_suexec.so
-%{_libdir}/%{name}-prefork/mod_unique_id.so
-%{_libdir}/%{name}-prefork/mod_userdir.so
-%{_libdir}/%{name}-prefork/mod_usertrack.so
-%{_libdir}/%{name}-prefork/mod_version.so
-%{_libdir}/%{name}-prefork/mod_vhost_alias.so
-%{_libdir}/%{name}-prefork/mod_watchdog.so
-%{_libdir}/%{name}-prefork/mod_xml2enc.so
-%files worker
-%defattr(-,root,root)
-%{_sbindir}/httpd-worker
-%{_sbindir}/httpd2-worker
-%dir %{_libdir}/%{name}-worker
-# hardcoded list so we do not lose mods by accident
-%{_libdir}/%{name}-worker/mod_access_compat.so
-%{_libdir}/%{name}-worker/mod_actions.so
-%{_libdir}/%{name}-worker/mod_alias.so
-%{_libdir}/%{name}-worker/mod_allowmethods.so
-%{_libdir}/%{name}-worker/mod_asis.so
-%{_libdir}/%{name}-worker/mod_auth_basic.so
-%{_libdir}/%{name}-worker/mod_auth_digest.so
-%{_libdir}/%{name}-worker/mod_auth_form.so
-%{_libdir}/%{name}-worker/mod_authn_anon.so
-%{_libdir}/%{name}-worker/mod_authn_core.so
-%{_libdir}/%{name}-worker/mod_authn_dbd.so
-%{_libdir}/%{name}-worker/mod_authn_dbm.so
-%{_libdir}/%{name}-worker/mod_authn_file.so
-%{_libdir}/%{name}-worker/mod_authn_socache.so
-%{_libdir}/%{name}-worker/mod_authnz_ldap.so
-%{_libdir}/%{name}-worker/mod_authnz_fcgi.so
-%{_libdir}/%{name}-worker/mod_authz_core.so
-%{_libdir}/%{name}-worker/mod_authz_dbd.so
-%{_libdir}/%{name}-worker/mod_authz_dbm.so
-%{_libdir}/%{name}-worker/mod_authz_groupfile.so
-%{_libdir}/%{name}-worker/mod_authz_host.so
-%{_libdir}/%{name}-worker/mod_authz_owner.so
-%{_libdir}/%{name}-worker/mod_authz_user.so
-%{_libdir}/%{name}-worker/mod_autoindex.so
-%{_libdir}/%{name}-worker/mod_bucketeer.so
-%{_libdir}/%{name}-worker/mod_buffer.so
-%{_libdir}/%{name}-worker/mod_cache.so
-%{_libdir}/%{name}-worker/mod_cache_disk.so
-%{_libdir}/%{name}-worker/mod_cache_socache.so
-%{_libdir}/%{name}-worker/mod_case_filter.so
-%{_libdir}/%{name}-worker/mod_case_filter_in.so
-%{_libdir}/%{name}-worker/mod_cgid.so
-%{_libdir}/%{name}-worker/mod_charset_lite.so
-%{_libdir}/%{name}-worker/mod_data.so
-%{_libdir}/%{name}-worker/mod_dav.so
-%{_libdir}/%{name}-worker/mod_dav_fs.so
-%{_libdir}/%{name}-worker/mod_dav_lock.so
-%{_libdir}/%{name}-worker/mod_dbd.so
-%{_libdir}/%{name}-worker/mod_deflate.so
-%if 0%{?suse_version} >= 1315
-%{_libdir}/%{name}-worker/mod_brotli.so
-%endif
-%{_libdir}/%{name}-worker/mod_dialup.so
-%{_libdir}/%{name}-worker/mod_dir.so
-%{_libdir}/%{name}-worker/mod_dumpio.so
-%{_libdir}/%{name}-worker/mod_echo.so
-%{_libdir}/%{name}-worker/mod_env.so
-%{_libdir}/%{name}-worker/mod_expires.so
-%{_libdir}/%{name}-worker/mod_ext_filter.so
-%{_libdir}/%{name}-worker/mod_file_cache.so
-%{_libdir}/%{name}-worker/mod_filter.so
-%{_libdir}/%{name}-worker/mod_headers.so
-%{_libdir}/%{name}-worker/mod_heartmonitor.so
-%if 0%{?build_http2}
-%{_libdir}/%{name}-worker/mod_http2.so
-%{_libdir}/%{name}-worker/mod_proxy_http2.so
-%endif
-%{_libdir}/%{name}-worker/mod_imagemap.so
-%{_libdir}/%{name}-worker/mod_include.so
-%{_libdir}/%{name}-worker/mod_info.so
-%{_libdir}/%{name}-worker/mod_lbmethod_bybusyness.so
-%{_libdir}/%{name}-worker/mod_lbmethod_byrequests.so
-%{_libdir}/%{name}-worker/mod_lbmethod_bytraffic.so
-%{_libdir}/%{name}-worker/mod_lbmethod_heartbeat.so
-%{_libdir}/%{name}-worker/mod_ldap.so
-%{_libdir}/%{name}-worker/mod_log_config.so
-%{_libdir}/%{name}-worker/mod_log_debug.so
-%{_libdir}/%{name}-worker/mod_log_forensic.so
-%{_libdir}/%{name}-worker/mod_logio.so
-%{_libdir}/%{name}-worker/mod_lua.so
-%{_libdir}/%{name}-worker/mod_macro.so
-%{_libdir}/%{name}-worker/mod_mime.so
-%{_libdir}/%{name}-worker/mod_mime_magic.so
-%{_libdir}/%{name}-worker/mod_negotiation.so
-%{_libdir}/%{name}-worker/mod_optional_fn_export.so
-%{_libdir}/%{name}-worker/mod_optional_fn_import.so
-%{_libdir}/%{name}-worker/mod_optional_hook_export.so
-%{_libdir}/%{name}-worker/mod_optional_hook_import.so
-%{_libdir}/%{name}-worker/mod_proxy.so
-%{_libdir}/%{name}-worker/mod_proxy_ajp.so
-%{_libdir}/%{name}-worker/mod_proxy_balancer.so
-%{_libdir}/%{name}-worker/mod_proxy_connect.so
-%{_libdir}/%{name}-worker/mod_proxy_express.so
-%{_libdir}/%{name}-worker/mod_proxy_fcgi.so
-%{_libdir}/%{name}-worker/mod_proxy_fdpass.so
-%{_libdir}/%{name}-worker/mod_proxy_ftp.so
-%{_libdir}/%{name}-worker/mod_proxy_hcheck.so
-%{_libdir}/%{name}-worker/mod_proxy_html.so
-%{_libdir}/%{name}-worker/mod_proxy_http.so
-%{_libdir}/%{name}-worker/mod_proxy_scgi.so
-%{_libdir}/%{name}-worker/mod_proxy_uwsgi.so
-%{_libdir}/%{name}-worker/mod_proxy_wstunnel.so
-%{_libdir}/%{name}-worker/mod_ratelimit.so
-%{_libdir}/%{name}-worker/mod_reflector.so
-%{_libdir}/%{name}-worker/mod_remoteip.so
-%{_libdir}/%{name}-worker/mod_reqtimeout.so
-%{_libdir}/%{name}-worker/mod_request.so
-%{_libdir}/%{name}-worker/mod_rewrite.so
-%{_libdir}/%{name}-worker/mod_sed.so
-%{_libdir}/%{name}-worker/mod_session.so
-%{_libdir}/%{name}-worker/mod_session_cookie.so
-%{_libdir}/%{name}-worker/mod_session_crypto.so
-%{_libdir}/%{name}-worker/mod_session_dbd.so
-%{_libdir}/%{name}-worker/mod_setenvif.so
-%{_libdir}/%{name}-worker/mod_slotmem_plain.so
-%{_libdir}/%{name}-worker/mod_slotmem_shm.so
-%{_libdir}/%{name}-worker/mod_socache_dbm.so
-%{_libdir}/%{name}-worker/mod_socache_memcache.so
-%{_libdir}/%{name}-worker/mod_socache_redis.so
-%{_libdir}/%{name}-worker/mod_socache_shmcb.so
-%{_libdir}/%{name}-worker/mod_speling.so
-%{_libdir}/%{name}-worker/mod_ssl.so
-%{_libdir}/%{name}-worker/mod_status.so
-%{_libdir}/%{name}-worker/mod_substitute.so
-%{_libdir}/%{name}-worker/mod_suexec.so
-%{_libdir}/%{name}-worker/mod_unique_id.so
-%{_libdir}/%{name}-worker/mod_userdir.so
-%{_libdir}/%{name}-worker/mod_usertrack.so
-%{_libdir}/%{name}-worker/mod_version.so
-%{_libdir}/%{name}-worker/mod_vhost_alias.so
-%{_libdir}/%{name}-worker/mod_watchdog.so
-%{_libdir}/%{name}-worker/mod_xml2enc.so
-
-%files event
-%defattr(-,root,root)
-%{_sbindir}/httpd-event
-%{_sbindir}/httpd2-event
-%dir %{_libdir}/%{name}-event
-# hardcoded list so we do not lose mods by accident
-%{_libdir}/%{name}-event/mod_access_compat.so
-%{_libdir}/%{name}-event/mod_actions.so
-%{_libdir}/%{name}-event/mod_alias.so
-%{_libdir}/%{name}-event/mod_allowmethods.so
-%{_libdir}/%{name}-event/mod_asis.so
-%{_libdir}/%{name}-event/mod_auth_basic.so
-%{_libdir}/%{name}-event/mod_auth_digest.so
-%{_libdir}/%{name}-event/mod_auth_form.so
-%{_libdir}/%{name}-event/mod_authn_anon.so
-%{_libdir}/%{name}-event/mod_authn_core.so
-%{_libdir}/%{name}-event/mod_authn_dbd.so
-%{_libdir}/%{name}-event/mod_authn_dbm.so
-%{_libdir}/%{name}-event/mod_authn_file.so
-%{_libdir}/%{name}-event/mod_authn_socache.so
-%{_libdir}/%{name}-event/mod_authnz_ldap.so
-%{_libdir}/%{name}-event/mod_authnz_fcgi.so
-%{_libdir}/%{name}-event/mod_authz_core.so
-%{_libdir}/%{name}-event/mod_authz_dbd.so
-%{_libdir}/%{name}-event/mod_authz_dbm.so
-%{_libdir}/%{name}-event/mod_authz_groupfile.so
-%{_libdir}/%{name}-event/mod_authz_host.so
-%{_libdir}/%{name}-event/mod_authz_owner.so
-%{_libdir}/%{name}-event/mod_authz_user.so
-%{_libdir}/%{name}-event/mod_autoindex.so
-%{_libdir}/%{name}-event/mod_bucketeer.so
-%{_libdir}/%{name}-event/mod_buffer.so
-%{_libdir}/%{name}-event/mod_cache.so
-%{_libdir}/%{name}-event/mod_cache_disk.so
-%{_libdir}/%{name}-event/mod_cache_socache.so
-%{_libdir}/%{name}-event/mod_case_filter.so
-%{_libdir}/%{name}-event/mod_case_filter_in.so
-%{_libdir}/%{name}-event/mod_cgid.so
-%{_libdir}/%{name}-event/mod_charset_lite.so
-%{_libdir}/%{name}-event/mod_data.so
-%{_libdir}/%{name}-event/mod_dav.so
-%{_libdir}/%{name}-event/mod_dav_fs.so
-%{_libdir}/%{name}-event/mod_dav_lock.so
-%{_libdir}/%{name}-event/mod_dbd.so
-%if 0%{?suse_version} >= 1315
-%{_libdir}/%{name}-event/mod_brotli.so
-%endif
-%{_libdir}/%{name}-event/mod_deflate.so
-%{_libdir}/%{name}-event/mod_dialup.so
-%{_libdir}/%{name}-event/mod_dir.so
-%{_libdir}/%{name}-event/mod_dumpio.so
-%{_libdir}/%{name}-event/mod_echo.so
-%{_libdir}/%{name}-event/mod_env.so
-%{_libdir}/%{name}-event/mod_expires.so
-%{_libdir}/%{name}-event/mod_ext_filter.so
-%{_libdir}/%{name}-event/mod_file_cache.so
-%{_libdir}/%{name}-event/mod_filter.so
-%{_libdir}/%{name}-event/mod_headers.so
-%if 0%{?build_http2}
-%{_libdir}/%{name}-event/mod_http2.so
-%{_libdir}/%{name}-event/mod_proxy_http2.so
-%endif
-%{_libdir}/%{name}-event/mod_heartmonitor.so
-%{_libdir}/%{name}-event/mod_imagemap.so
-%{_libdir}/%{name}-event/mod_include.so
-%{_libdir}/%{name}-event/mod_info.so
-%{_libdir}/%{name}-event/mod_lbmethod_bybusyness.so
-%{_libdir}/%{name}-event/mod_lbmethod_byrequests.so
-%{_libdir}/%{name}-event/mod_lbmethod_bytraffic.so
-%{_libdir}/%{name}-event/mod_lbmethod_heartbeat.so
-%{_libdir}/%{name}-event/mod_ldap.so
-%{_libdir}/%{name}-event/mod_log_config.so
-%{_libdir}/%{name}-event/mod_log_debug.so
-%{_libdir}/%{name}-event/mod_log_forensic.so
-%{_libdir}/%{name}-event/mod_logio.so
-%{_libdir}/%{name}-event/mod_lua.so
-%{_libdir}/%{name}-event/mod_macro.so
-%{_libdir}/%{name}-event/mod_mime.so
-%{_libdir}/%{name}-event/mod_mime_magic.so
-%{_libdir}/%{name}-event/mod_negotiation.so
-%{_libdir}/%{name}-event/mod_optional_fn_export.so
-%{_libdir}/%{name}-event/mod_optional_fn_import.so
-%{_libdir}/%{name}-event/mod_optional_hook_export.so
-%{_libdir}/%{name}-event/mod_optional_hook_import.so
-%{_libdir}/%{name}-event/mod_proxy.so
-%{_libdir}/%{name}-event/mod_proxy_ajp.so
-%{_libdir}/%{name}-event/mod_proxy_balancer.so
-%{_libdir}/%{name}-event/mod_proxy_connect.so
-%{_libdir}/%{name}-event/mod_proxy_express.so
-%{_libdir}/%{name}-event/mod_proxy_fcgi.so
-%{_libdir}/%{name}-event/mod_proxy_fdpass.so
-%{_libdir}/%{name}-event/mod_proxy_ftp.so
-%{_libdir}/%{name}-event/mod_proxy_hcheck.so
-%{_libdir}/%{name}-event/mod_proxy_html.so
-%{_libdir}/%{name}-event/mod_proxy_http.so
-%{_libdir}/%{name}-event/mod_proxy_scgi.so
-%{_libdir}/%{name}-event/mod_proxy_uwsgi.so
-%{_libdir}/%{name}-event/mod_proxy_wstunnel.so
-%{_libdir}/%{name}-event/mod_ratelimit.so
-%{_libdir}/%{name}-event/mod_reflector.so
-%{_libdir}/%{name}-event/mod_remoteip.so
-%{_libdir}/%{name}-event/mod_reqtimeout.so
-%{_libdir}/%{name}-event/mod_request.so
-%{_libdir}/%{name}-event/mod_rewrite.so
-%{_libdir}/%{name}-event/mod_sed.so
-%{_libdir}/%{name}-event/mod_session.so
-%{_libdir}/%{name}-event/mod_session_cookie.so
-%{_libdir}/%{name}-event/mod_session_crypto.so
-%{_libdir}/%{name}-event/mod_session_dbd.so
-%{_libdir}/%{name}-event/mod_setenvif.so
-%{_libdir}/%{name}-event/mod_slotmem_plain.so
-%{_libdir}/%{name}-event/mod_slotmem_shm.so
-%{_libdir}/%{name}-event/mod_socache_dbm.so
-%{_libdir}/%{name}-event/mod_socache_memcache.so
-%{_libdir}/%{name}-event/mod_socache_redis.so
-%{_libdir}/%{name}-event/mod_socache_shmcb.so
-%{_libdir}/%{name}-event/mod_speling.so
-%{_libdir}/%{name}-event/mod_ssl.so
-%{_libdir}/%{name}-event/mod_status.so
-%{_libdir}/%{name}-event/mod_substitute.so
-%{_libdir}/%{name}-event/mod_suexec.so
-%{_libdir}/%{name}-event/mod_unique_id.so
-%{_libdir}/%{name}-event/mod_userdir.so
-%{_libdir}/%{name}-event/mod_usertrack.so
-%{_libdir}/%{name}-event/mod_version.so
-%{_libdir}/%{name}-event/mod_vhost_alias.so
-%{_libdir}/%{name}-event/mod_watchdog.so
-%{_libdir}/%{name}-event/mod_xml2enc.so
-
-%files devel -f filelist-devel
-%defattr(-,root,root)
-%dir %{_datadir}/%{name}
-%dir %{installbuilddir}
-%dir %{includedir}
+# devel files
+%if "%{flavor}" == "devel"
+%files
%{_bindir}/apxs
-%{_sbindir}/apxs
-%{_bindir}/apxs2
-%{_sbindir}/apxs2
+%{_mandir}/man1/apxs.1.*
+%{_datadir}/apache2
+%{installbuilddir}
+%{includedir}
+%endif
-%files doc
-%defattr(-,root,root)
-%doc %{manualdir}
+# manual files
+%if "%{flavor}" == "manual"
+%files
+%dir %{_datadir}/apache2
+%{manualdir}
%dir %{sysconfdir}
-%dir %{sysconfdir}/conf.d
-%config %{sysconfdir}/conf.d/manual.conf
-
-%files example-pages
-%defattr(-,root,root)
-%config(noreplace) %{htdocsdir}/index.htm*
-%config(noreplace) %{htdocsdir}/favicon.ico
-%config(noreplace) %{htdocsdir}/robots.txt
-
-%files utils
-%defattr(-,root,root)
-%{_mandir}/man?/ab.?.*
-%{_mandir}/man?/ab2.?.*
-%{_mandir}/man?/dbmmanage.?.*
-%{_mandir}/man?/dbmmanage2.?.*
-%{_mandir}/man?/htdbm.?.*
-%{_mandir}/man?/htdbm2.?.*
-%{_mandir}/man?/htdigest.?.*
-%{_mandir}/man?/htdigest2.?.*
-%{_mandir}/man?/htpasswd.?.*
-%{_mandir}/man?/htpasswd2.?.*
-%{_mandir}/man?/httxt2dbm.?.*
-%{_mandir}/man?/logresolve.?.*
-%{_mandir}/man?/logresolve2.?.*
-%{_mandir}/man?/rotatelogs.?.*
-%{_mandir}/man?/rotatelogs2.?.*
-%{_sbindir}/fcgistarter
-%{_mandir}/man8/fcgistarter.8.*
-%{_bindir}/check_forensic
-%{_bindir}/check_forensic2
-%{_bindir}/dbmmanage
-%{_bindir}/dbmmanage2
-%{_bindir}/apache2-find-directives
-%{_bindir}/gensslcert
-%{_bindir}/htdbm
-%{_bindir}/htdbm2
-%{_bindir}/htdigest
-%{_bindir}/htdigest2
-%{_bindir}/htpasswd
-%{_bindir}/htpasswd2
-%{_bindir}/split-logfile
-%{_bindir}/split-logfile2
-%{_bindir}/ab
-%{_bindir}/ab2
-%{_bindir}/httxt2dbm
-%{_sbindir}/logresolve.pl
-%{_sbindir}/logresolve.pl2
-%{_bindir}/logresolve
-%{_bindir}/logresolve2
-%{_sbindir}/rotatelogs
-%{_sbindir}/rotatelogs2
-
-%define install_httpd_link() \
-( \
- # it might happen that apache2 including \
- # %{_datadir}/apache2/script-helpers is not installed \
- # yet even if apache2- has Requires(post): apache2 \
- # because of circular dependency between apache2 \
- # and apache2-MPM \
- if [ -f %{_datadir}/apache2/script-helpers ]; then \
- . %{_datadir}/apache2/script-helpers \
- find_mpm \
- # when this is run in %post(apache2), it may happen \
- # no MPM is installed so far \
- if [ -n "$HTTPD_MPM" ]; then \
- ln -sf $HTTPD_SBIN_BASE-$HTTPD_MPM $HTTPD_SBIN_BASE \
- fi \
- fi \
-)
-
-%post prefork -p /bin/bash
-%install_httpd_link
-exit 0
-
-%postun prefork -p /bin/bash
-if [ "$1" = 1 ]; then
- %apache_request_restart
-fi
-%install_httpd_link
-exit 0
-
-%posttrans prefork
-%apache_restart_if_needed
-exit 0
-
-%post worker -p /bin/bash
-%install_httpd_link
-exit 0
-
-%postun worker -p /bin/bash
-if [ "$1" = 1 ]; then
- %apache_request_restart
-fi
-%install_httpd_link
-exit 0
-
-%posttrans worker
-%apache_restart_if_needed
-exit 0
-
-%post event -p /bin/bash
-%install_httpd_link
-exit 0
-
-%postun event -p /bin/bash
-if [ "$1" = 1 ]; then
- %apache_request_restart
-fi
-%install_httpd_link
-exit 0
-
-%posttrans event
-%apache_restart_if_needed
-exit 0
-
-%pre
-%if 0%{?suse_version} >= 1210
-%service_add_pre apache2.service
+%dir %{sysconfdir}/conf.d/
+%{sysconfdir}/conf.d/manual.conf
%endif
-%preun
-%if 0%{?suse_version} >= 1210
-%service_del_preun apache2.target
-%endif
-# removing the symlink in case of uninstall (not upgrade) [bsc#1041830]
-if [ "$1" = 0 ]; then
- for i in %{_sbindir}/httpd \
- %{installbuilddir}/config_vars.mk
- do
- test -L $i && rm $i
+#
+# SCRIPTLETS
+#
+
+# MPMs scriptlets
+%if ! %{test} && "%{mpm}" != ""
+%post
+%{_sbindir}/update-alternatives --quiet --force --install %{_sbindir}/httpd httpd %{_sbindir}/httpd-%{mpm} %{mpm_alt_prio}
+for module in %{dynamic_modules}; do
+ if [ -e %{libexecdir}/mod_$module.so ]; then
+ %{_sbindir}/update-alternatives --quiet --force --install %{_libdir}/apache2/mod_$module.so mod_$module.so %{libexecdir}/mod_$module.so %{mpm_alt_prio}
+ fi
+done
+exit 0
+
+%postun
+if [ "$1" = 1 ]; then
+ %apache_request_restart
+fi
+if [ "$1" = 0 ]; then
+ %{_sbindir}/update-alternatives --quiet --force --remove httpd %{_sbindir}/httpd
+ for module in %{dynamic_modules}; do
+ %{_sbindir}/update-alternatives --quiet --force --remove mod_$module.so %{_libdir}/apache2/mod_$module.so
done
fi
exit 0
-%postun
-%if 0%{?suse_version} >= 1210
-%service_del_postun_without_restart apache2.target
-if [ "$1" = 1 ]; then
- %apache_request_restart
-fi
-%else
-%insserv_cleanup
+%posttrans
+%apache_restart_if_needed
+exit 0
%endif
+# main package scriptlets
+%if "%{flavor}" == ""
+%pre
+%service_add_pre apache2.service apache2@.service apache2.target
+exit 0
+
%post
-%if 0%{?suse_version} <= 1130
-%run_permissions
-%else
-%set_permissions %{_sbindir}/suexec || echo "Please check %{_sysconfdir}/permissions.local for settings of %{_sbindir}/suexec2 ."
-%endif
# wwwadmin group existed in past remove after openSUSE-13.2 out of support scope
if grep -q "^wwwadmin:" %{_sysconfdir}/group; then
- groupmod -n www wwwadmin 2>/dev/null ||:
- usermod -g %{httpdgroup} %{httpduser} 2>/dev/null ||:
- usermod -s /bin/false %{httpduser} 2>/dev/null ||:
+ groupmod -n www wwwadmin 2>/dev/null ||:
+ usermod -g %{httpdgroup} %{httpduser} 2>/dev/null ||:
+ usermod -s /bin/false %{httpduser} 2>/dev/null ||:
fi
+%service_add_post apache2.service apache2@.service apache2.target
+%set_permissions %{_sbindir}/suexec || \
+ echo "Please check %{_sysconfdir}/permissions.local for settings of %{_sbindir}/suexec2 ."
%{fillup_only apache2}
-%if 0%{?suse_version} >= 1210
-%service_add_post apache2.service
-%else
-%{fillup_and_insserv apache2}
-%endif
%if %{use_firewalld}
%firewalld_reload
%endif
exit 0
%posttrans
-%{_datadir}/%{name}/apache-22-24-upgrade
%apache_restart_if_needed
-
%verifyscript
%verify_permissions -e %{_sbindir}/suexec
+%preun
+%service_del_preun apache2.service apache2@.service apache2.target
+exit 0
+
+%postun
+%if %{defined service_del_postun_without_restart}
+%service_del_postun_without_restart apache2.service apache2@.service apache2.target
+%else
+DISABLE_RESTART_ON_UPDATE='yes'
+%service_del_postun apache2.service apache2@.service apache2.target
+%endif
+if [ "$1" = 1 ]; then
+ %apache_request_restart
+fi
+%endif
+
%changelog
diff --git a/apache2@.service b/apache2@.service
index 537785b..a76e30e 100644
--- a/apache2@.service
+++ b/apache2@.service
@@ -7,7 +7,7 @@ PartOf=apache2.target
[Service]
Type=notify
PrivateTmp=true
-Environment="HTTPD_INSTANCE=%i"
+Environment="START_APACHE_INSTANCE=%i"
ExecStart=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k start
ExecReload=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful
ExecStop=/usr/sbin/start_apache2 -DSYSTEMD -DFOREGROUND -k graceful-stop
diff --git a/deprecated-scripts-arch.patch b/deprecated-scripts-arch.patch
deleted file mode 100644
index 685bcb9..0000000
--- a/deprecated-scripts-arch.patch
+++ /dev/null
@@ -1,85 +0,0 @@
----
- deprecated-scripts/get_module_list | 56 +++++++++++++++++++------------------
- 1 file changed, 30 insertions(+), 26 deletions(-)
-
-Index: httpd-2.4.27/deprecated-scripts/get_module_list
-===================================================================
---- httpd-2.4.27.orig/deprecated-scripts/get_module_list
-+++ httpd-2.4.27/deprecated-scripts/get_module_list
-@@ -4,6 +4,10 @@ pname=apache2
- : ${sysconfdir:=/etc/$pname}
- : ${sysconfig_apache:=/etc/sysconfig/$pname}
- default_APACHE_DOCUMENT_ROOT=/srv/www/htdocs
-+modpath=/usr/lib
-+if [ `/bin/arch` == "x86_64" ]; then
-+ modpath=/usr/lib64
-+fi
-
- test -z "$APACHE_MODULES" && . /usr/share/$pname/load_configuration
- apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
-@@ -61,26 +65,26 @@ for i in ${APACHE_MODULES[*]}; do
- module_path=$i
- ;;
- *)
-- for j in /usr/lib/$pname-$APACHE_MPM/mod_$i.so \
-- /usr/lib/$pname-$APACHE_MPM/$i.so \
-- /usr/lib/$pname-$APACHE_MPM/mod_$i \
-- /usr/lib/$pname-$APACHE_MPM/$i \
-- /usr/lib/$pname-$APACHE_MPM/${i/mod_}.so \
-- /usr/lib/$pname-$APACHE_MPM/${i/mod_} \
-- /usr/lib/$pname-$APACHE_MPM/lib${i/mod_}.so \
-- /usr/lib/$pname-$APACHE_MPM/lib${i/mod_} \
-- /usr/lib/$pname-$APACHE_MPM/lib$i.so \
-- /usr/lib/$pname-$APACHE_MPM/lib$i \
-- /usr/lib/$pname/mod_$i.so \
-- /usr/lib/$pname/$i.so \
-- /usr/lib/$pname/mod_$i \
-- /usr/lib/$pname/$i \
-- /usr/lib/$pname/${i/mod_}.so \
-- /usr/lib/$pname/${i/mod_} \
-- /usr/lib/$pname/lib${i/mod_}.so \
-- /usr/lib/$pname/lib${i/mod_} \
-- /usr/lib/$pname/lib$i.so \
-- /usr/lib/$pname/lib$i
-+ for j in $modpath/$pname-$APACHE_MPM/mod_$i.so \
-+ $modpath/$pname-$APACHE_MPM/$i.so \
-+ $modpath/$pname-$APACHE_MPM/mod_$i \
-+ $modpath/$pname-$APACHE_MPM/$i \
-+ $modpath/$pname-$APACHE_MPM/${i/mod_}.so \
-+ $modpath/$pname-$APACHE_MPM/${i/mod_} \
-+ $modpath/$pname-$APACHE_MPM/lib${i/mod_}.so \
-+ $modpath/$pname-$APACHE_MPM/lib${i/mod_} \
-+ $modpath/$pname-$APACHE_MPM/lib$i.so \
-+ $modpath/$pname-$APACHE_MPM/lib$i \
-+ $modpath/$pname/mod_$i.so \
-+ $modpath/$pname/$i.so \
-+ $modpath/$pname/mod_$i \
-+ $modpath/$pname/$i \
-+ $modpath/$pname/${i/mod_}.so \
-+ $modpath/$pname/${i/mod_} \
-+ $modpath/$pname/lib${i/mod_}.so \
-+ $modpath/$pname/lib${i/mod_} \
-+ $modpath/$pname/lib$i.so \
-+ $modpath/$pname/lib$i
- do
- if [ -f $j ]; then
- module_path=$j
-@@ -105,12 +109,12 @@ done
- echo >&3 -e "#\n"
- exec 3<&-
- chmod 644 $TMPFILE
--if ! mv -Z $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf 2>/dev/null; then
-- mv $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf
-- if selinuxenabled; then
-- restorecon $sysconfdir/sysconfig.d/loadmodule.conf
-- fi
--fi
-+if ! mv -Z $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf 2>/dev/null; then
-+ mv $TMPFILE $sysconfdir/sysconfig.d/loadmodule.conf
-+# if selinuxenabled; then
-+# restorecon $sysconfdir/sysconfig.d/loadmodule.conf
-+# fi
-+fi
- #echo -n ". "
-
-
diff --git a/deprecated-scripts.tar.xz b/deprecated-scripts.tar.xz
deleted file mode 100644
index 42bc9a0..0000000
--- a/deprecated-scripts.tar.xz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:0089226f95d2caac8a06128aaa45170aaf84c79101c2ea7a64f9422b4176766a
-size 3252
diff --git a/favicon.ico b/favicon.ico
deleted file mode 100644
index d8e4026..0000000
Binary files a/favicon.ico and /dev/null differ
diff --git a/apache2.ssl.firewalld b/firewalld-ssl.apache2
similarity index 100%
rename from apache2.ssl.firewalld
rename to firewalld-ssl.apache2
diff --git a/apache2.firewalld b/firewalld.apache2
similarity index 100%
rename from apache2.firewalld
rename to firewalld.apache2
diff --git a/httpd-2.0.54-envvars.dif b/httpd-2.0.54-envvars.dif
deleted file mode 100644
index 85814a1..0000000
--- a/httpd-2.0.54-envvars.dif
+++ /dev/null
@@ -1,17 +0,0 @@
---- httpd-2.4.6.orig/support/envvars-std.in
-+++ httpd-2.4.6/support/envvars-std.in
-@@ -18,11 +18,9 @@
- #
- # This file is generated from envvars-std.in
- #
--if test "x$@SHLIBPATH_VAR@" != "x" ; then
-- @SHLIBPATH_VAR@="@exp_libdir@:$@SHLIBPATH_VAR@"
--else
-- @SHLIBPATH_VAR@="@exp_libdir@"
--fi
-+
-+@SHLIBPATH_VAR@="@exp_libdir@${@SHLIBPATH_VAR@+:$@SHLIBPATH_VAR@}"
-+
- export @SHLIBPATH_VAR@
- #
- @OS_SPECIFIC_VARS@
diff --git a/httpd-2.1.3alpha-layout.dif b/httpd-2.1.3alpha-layout.dif
deleted file mode 100644
index 097bab0..0000000
--- a/httpd-2.1.3alpha-layout.dif
+++ /dev/null
@@ -1,57 +0,0 @@
---- httpd-2.4.6.orig/config.layout
-+++ httpd-2.4.6/config.layout
-@@ -178,6 +178,54 @@
- proxycachedir: /var/cache/httpd
-
-
-+# SuSE >= 8.1 layout (32 bit system)
-+
-+ prefix: /srv/www
-+ exec_prefix: /usr
-+ bindir: ${exec_prefix}/bin
-+ sbindir: ${exec_prefix}/sbin
-+ libdir: ${exec_prefix}/lib
-+ libexecdir: ${exec_prefix}/lib/apache2${mpm_suffix}
-+ mandir: ${exec_prefix}/share/man
-+ sysconfdir: /etc/apache2
-+ datadir: ${prefix}
-+ installbuilddir: ${exec_prefix}/share/apache2/build
-+ errordir: ${exec_prefix}/share/apache2/error
-+ iconsdir: ${exec_prefix}/share/apache2/icons
-+ htdocsdir: ${datadir}/htdocs
-+ manualdir: ${exec_prefix}/share/apache2/manual
-+ cgidir: ${datadir}/cgi-bin
-+ includedir: ${exec_prefix}/include/apache2${mpm_suffix}
-+ localstatedir: /var/lib/apache2
-+ runtimedir: /var/run
-+ logfiledir: /var/log/apache2
-+ proxycachedir: /var/cache/apache2
-+
-+
-+# SuSE >= 8.1 layout (64 bit system)
-+
-+ prefix: /srv/www
-+ exec_prefix: /usr
-+ bindir: ${exec_prefix}/bin
-+ sbindir: ${exec_prefix}/sbin
-+ libdir: ${exec_prefix}/lib64
-+ libexecdir: ${exec_prefix}/lib64/apache2${mpm_suffix}
-+ mandir: ${exec_prefix}/share/man
-+ sysconfdir: /etc/apache2
-+ datadir: ${prefix}
-+ installbuilddir: ${exec_prefix}/share/apache2/build
-+ errordir: ${exec_prefix}/share/apache2/error
-+ iconsdir: ${exec_prefix}/share/apache2/icons
-+ htdocsdir: ${datadir}/htdocs
-+ manualdir: ${exec_prefix}/share/apache2/manual
-+ cgidir: ${datadir}/cgi-bin
-+ includedir: ${exec_prefix}/include/apache2${mpm_suffix}
-+ localstatedir: /var/lib/apache2
-+ runtimedir: /var/run
-+ logfiledir: /var/log/apache2
-+ proxycachedir: /var/cache/apache2
-+
-+
- # BSD/OS layout
-
- prefix: /var/www
diff --git a/httpd-2.2.0-apxs-a2enmod.dif b/httpd-2.2.0-apxs-a2enmod.dif
deleted file mode 100644
index 4ef22e7..0000000
--- a/httpd-2.2.0-apxs-a2enmod.dif
+++ /dev/null
@@ -1,113 +0,0 @@
---- httpd-2.4.6.orig/support/apxs.in
-+++ httpd-2.4.6/support/apxs.in
-@@ -550,108 +550,14 @@ if ($opt_i or $opt_e) {
-
- # activate module via LoadModule/AddModule directive
- if ($opt_a or $opt_A) {
-- if (not -f "$CFG_SYSCONFDIR/$CFG_TARGET.conf") {
-- error("Config file $CFG_SYSCONFDIR/$CFG_TARGET.conf not found");
-- exit(1);
-- }
--
-- open(FP, "<$CFG_SYSCONFDIR/$CFG_TARGET.conf") || die;
-- my $content = join('', );
-- close(FP);
--
-- if ($content !~ m|\n#?\s*LoadModule\s+|) {
-- error("Activation failed for custom $CFG_SYSCONFDIR/$CFG_TARGET.conf file.");
-- error("At least one `LoadModule' directive already has to exist.");
-- exit(1);
-- }
-
- my $lmd;
- my $c = '';
- $c = '#' if ($opt_A);
- foreach $lmd (@lmd) {
-- my $what = $opt_A ? "preparing" : "activating";
-- my $lmd_re = $lmd;
-- $lmd_re =~ s/\s+/\\s+/g;
--
-- if ($content !~ m|\n#?\s*$lmd_re|) {
-- # check for open , so that the new LoadModule
-- # directive always appears *outside* of an .
--
-- my $before = ($content =~ m|^(.*\n)#?\s*LoadModule\s+[^\n]+\n|s)[0];
--
-- # the '()=' trick forces list context and the scalar
-- # assignment counts the number of list members (aka number
-- # of matches) then
-- my $cntopen = () = ($before =~ m|^\s*<[^/].*$|mg);
-- my $cntclose = () = ($before =~ m|^\s*$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) {
-- print FP $content;
-- close(FP);
-- system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " .
-- "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " .
-- "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new");
-- } else {
-- notice("unable to open configuration file");
-- }
-- }
- }
- }
-
diff --git a/httpd-framework-svn1878849.tar.bz2 b/httpd-framework-svn1878849.tar.bz2
new file mode 100644
index 0000000..095c7a1
--- /dev/null
+++ b/httpd-framework-svn1878849.tar.bz2
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b82a6b1020c286dc13616b845dcf5b60a8bb0a062613d968e271f928b997d710
+size 1591311
diff --git a/httpd-implicit-pointer-decl.patch b/httpd-implicit-pointer-decl.patch
deleted file mode 100644
index 27e4db8..0000000
--- a/httpd-implicit-pointer-decl.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- httpd-2.4.6.orig/server/request.c
-+++ httpd-2.4.6/server/request.c
-@@ -46,10 +46,13 @@
- #include "util_script.h"
- #include "ap_expr.h"
- #include "mod_request.h"
--
-+#include "http_connection.h"
- #include "mod_core.h"
- #include "mod_auth.h"
-
-+#include
-+#include
-+
- #if APR_HAVE_STDARG_H
- #include
- #endif
---- httpd-2.4.6.orig/server/config.c
-+++ httpd-2.4.6/server/config.c
-@@ -48,10 +48,14 @@
- #include "http_request.h" /* for default_handler (see invoke_handler) */
- #include "http_main.h"
- #include "http_vhost.h"
-+#include "http_connection.h"
- #include "util_cfgtree.h"
- #include "util_varbuf.h"
- #include "mpm_common.h"
-
-+#include
-+#include
-+
- #define APLOG_UNSET (APLOG_NO_MODULE - 1)
- /* we know core's module_index is 0 */
- #undef APLOG_MODULE_INDEX
diff --git a/httpd-visibility.patch b/httpd-visibility.patch
deleted file mode 100644
index c036fb4..0000000
--- a/httpd-visibility.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-Index: httpd-2.4.43/include/ap_config.h
-===================================================================
---- httpd-2.4.43.orig/include/ap_config.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/include/ap_config.h 2020-04-03 13:38:05.477749175 +0200
-@@ -64,7 +64,7 @@
- * AP_DECLARE(rettype) ap_func(args)
- * @endcode
- */
--#define AP_DECLARE(type) type
-+#define AP_DECLARE(type) __attribute__ ((visibility ("default"))) type
-
- /**
- * Apache Core dso variable argument and hook functions are declared with
-@@ -74,7 +74,7 @@
- * AP_DECLARE_NONSTD(rettype) ap_func(args [...])
- * @endcode
- */
--#define AP_DECLARE_NONSTD(type) type
-+#define AP_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-
- /**
- * Apache Core dso variables are declared with AP_MODULE_DECLARE_DATA.
-@@ -86,7 +86,7 @@
- * AP_DECLARE_DATA type apr_variable
- * @endcode
- */
--#define AP_DECLARE_DATA
-+#define AP_DECLARE_DATA __attribute__ ((visibility ("default")))
-
- #elif defined(AP_DECLARE_STATIC)
- #define AP_DECLARE(type) type __stdcall
-@@ -115,10 +115,10 @@
- #if defined(WIN32)
- #define AP_MODULE_DECLARE(type) type __stdcall
- #else
--#define AP_MODULE_DECLARE(type) type
-+#define AP_MODULE_DECLARE(type) __attribute__ ((visibility ("default"))) type
- #endif
--#define AP_MODULE_DECLARE_NONSTD(type) type
--#define AP_MODULE_DECLARE_DATA
-+#define AP_MODULE_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define AP_MODULE_DECLARE_DATA __attribute__ ((visibility ("default")))
- #else
- /**
- * AP_MODULE_DECLARE_EXPORT is a no-op. Unless contradicted by the
-Index: httpd-2.4.43/modules/cache/mod_cache.h
-===================================================================
---- httpd-2.4.43.orig/modules/cache/mod_cache.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/cache/mod_cache.h 2020-04-03 13:38:05.545749508 +0200
-@@ -37,9 +37,9 @@
- * CACHE_DECLARE_DATA with appropriate export and import tags for the platform
- */
- #if !defined(WIN32)
--#define CACHE_DECLARE(type) type
--#define CACHE_DECLARE_NONSTD(type) type
--#define CACHE_DECLARE_DATA
-+#define CACHE_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define CACHE_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define CACHE_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(CACHE_DECLARE_STATIC)
- #define CACHE_DECLARE(type) type __stdcall
- #define CACHE_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/proxy/mod_proxy.h
-===================================================================
---- httpd-2.4.43.orig/modules/proxy/mod_proxy.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/proxy/mod_proxy.h 2020-04-03 13:38:05.545749508 +0200
-@@ -573,9 +573,9 @@ struct proxy_balancer_method {
- * PROXY_DECLARE_DATA with appropriate export and import tags for the platform
- */
- #if !defined(WIN32)
--#define PROXY_DECLARE(type) type
--#define PROXY_DECLARE_NONSTD(type) type
--#define PROXY_DECLARE_DATA
-+#define PROXY_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define PROXY_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define PROXY_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(PROXY_DECLARE_STATIC)
- #define PROXY_DECLARE(type) type __stdcall
- #define PROXY_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/lua/mod_lua.h
-===================================================================
---- httpd-2.4.43.orig/modules/lua/mod_lua.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/lua/mod_lua.h 2020-04-03 13:38:05.545749508 +0200
-@@ -62,9 +62,9 @@
- * AP_LUA_DECLARE_DATA with appropriate export and import tags for the platform
- */
- #if !defined(WIN32)
--#define AP_LUA_DECLARE(type) type
--#define AP_LUA_DECLARE_NONSTD(type) type
--#define AP_LUA_DECLARE_DATA
-+#define AP_LUA_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define AP_LUA_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define AP_LUA_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(AP_LUA_DECLARE_STATIC)
- #define AP_LUA_DECLARE(type) type __stdcall
- #define AP_LUA_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/core/mod_watchdog.h
-===================================================================
---- httpd-2.4.43.orig/modules/core/mod_watchdog.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/core/mod_watchdog.h 2020-04-03 13:38:05.545749508 +0200
-@@ -83,9 +83,9 @@ typedef struct ap_watchdog_t ap_watchdog
- */
- #if !defined(AP_WD_DECLARE)
- #if !defined(WIN32)
--#define AP_WD_DECLARE(type) type
--#define AP_WD_DECLARE_NONSTD(type) type
--#define AP_WD_DECLARE_DATA
-+#define AP_WD_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define AP_WD_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define AP_WD_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(AP_WD_DECLARE_STATIC)
- #define AP_WD_DECLARE(type) type __stdcall
- #define AP_WD_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/generators/mod_status.h
-===================================================================
---- httpd-2.4.43.orig/modules/generators/mod_status.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/generators/mod_status.h 2020-04-03 13:38:05.545749508 +0200
-@@ -34,9 +34,9 @@
- #define AP_STATUS_EXTENDED (0x4) /* detailed report */
-
- #if !defined(WIN32)
--#define STATUS_DECLARE(type) type
--#define STATUS_DECLARE_NONSTD(type) type
--#define STATUS_DECLARE_DATA
-+#define STATUS_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define STATUS_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define STATUS_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(STATUS_DECLARE_STATIC)
- #define STATUS_DECLARE(type) type __stdcall
- #define STATUS_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/dav/main/mod_dav.h
-===================================================================
---- httpd-2.4.43.orig/modules/dav/main/mod_dav.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/dav/main/mod_dav.h 2020-04-03 13:38:05.549749528 +0200
-@@ -82,9 +82,9 @@ extern "C" {
- * DAV_DECLARE_DATA with appropriate export and import tags for the platform
- */
- #if !defined(WIN32)
--#define DAV_DECLARE(type) type
--#define DAV_DECLARE_NONSTD(type) type
--#define DAV_DECLARE_DATA
-+#define DAV_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define DAV_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define DAV_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(DAV_DECLARE_STATIC)
- #define DAV_DECLARE(type) type __stdcall
- #define DAV_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/session/mod_session.h
-===================================================================
---- httpd-2.4.43.orig/modules/session/mod_session.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/session/mod_session.h 2020-04-03 13:38:05.549749528 +0200
-@@ -21,9 +21,9 @@
- * SESSION_DECLARE_DATA with appropriate export and import tags for the platform
- */
- #if !defined(WIN32)
--#define SESSION_DECLARE(type) type
--#define SESSION_DECLARE_NONSTD(type) type
--#define SESSION_DECLARE_DATA
-+#define SESSION_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define SESSION_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define SESSION_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(SESSION_DECLARE_STATIC)
- #define SESSION_DECLARE(type) type __stdcall
- #define SESSION_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/database/mod_dbd.h
-===================================================================
---- httpd-2.4.43.orig/modules/database/mod_dbd.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/database/mod_dbd.h 2020-04-03 13:38:05.549749528 +0200
-@@ -35,9 +35,9 @@
- * DBD_DECLARE_DATA with appropriate export and import tags for the platform
- */
- #if !defined(WIN32)
--#define DBD_DECLARE(type) type
--#define DBD_DECLARE_NONSTD(type) type
--#define DBD_DECLARE_DATA
-+#define DBD_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define DBD_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define DBD_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(DBD_DECLARE_STATIC)
- #define DBD_DECLARE(type) type __stdcall
- #define DBD_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/filters/mod_xml2enc.h
-===================================================================
---- httpd-2.4.43.orig/modules/filters/mod_xml2enc.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/filters/mod_xml2enc.h 2020-04-03 13:38:05.549749528 +0200
-@@ -25,9 +25,9 @@
-
- /* declarations to deal with WIN32 compile-flag-in-source-code crap */
- #if !defined(WIN32)
--#define XML2ENC_DECLARE(type) type
--#define XML2ENC_DECLARE_NONSTD(type) type
--#define XML2ENC_DECLARE_DATA
-+#define XML2ENC_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define XML2ENC_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define XML2ENC_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(XML2ENC_DECLARE_STATIC)
- #define XML2ENC_DECLARE(type) type __stdcall
- #define XML2ENC_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/filters/mod_ratelimit.h
-===================================================================
---- httpd-2.4.43.orig/modules/filters/mod_ratelimit.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/filters/mod_ratelimit.h 2020-04-03 13:38:05.549749528 +0200
-@@ -21,9 +21,9 @@
- * AP_RL_DECLARE_DATA with appropriate export and import tags for the platform
- */
- #if !defined(WIN32)
--#define AP_RL_DECLARE(type) type
--#define AP_RL_DECLARE_NONSTD(type) type
--#define AP_RL_DECLARE_DATA
-+#define AP_RL_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define AP_RL_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define AP_RL_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(AP_RL_DECLARE_STATIC)
- #define AP_RL_DECLARE(type) type __stdcall
- #define AP_RL_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/modules/aaa/mod_authz_dbd.h
-===================================================================
---- httpd-2.4.43.orig/modules/aaa/mod_authz_dbd.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/modules/aaa/mod_authz_dbd.h 2020-04-03 13:38:05.549749528 +0200
-@@ -22,9 +22,9 @@
- * AUTHZ_DBD_DECLARE_DATA with appropriate export and import tags
- */
- #if !defined(WIN32)
--#define AUTHZ_DBD_DECLARE(type) type
--#define AUTHZ_DBD_DECLARE_NONSTD(type) type
--#define AUTHZ_DBD_DECLARE_DATA
-+#define AUTHZ_DBD_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define AUTHZ_DBD_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define AUTHZ_DBD_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(AUTHZ_DBD_DECLARE_STATIC)
- #define AUTHZ_DBD_DECLARE(type) type __stdcall
- #define AUTHZ_DBD_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/include/httpd.h
-===================================================================
---- httpd-2.4.43.orig/include/httpd.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/include/httpd.h 2020-04-03 13:38:05.549749528 +0200
-@@ -345,7 +345,7 @@ extern "C" {
- * by modules. Its purpose is to allow us to add attributes that
- * particular platforms or compilers require to every exported function.
- */
--# define AP_DECLARE(type) type
-+# define AP_DECLARE(type) __attribute__ ((visibility ("default"))) type
- #endif
-
- #ifndef AP_DECLARE_NONSTD
-@@ -356,20 +356,20 @@ extern "C" {
- * which use varargs or are used via indirect function call. This
- * is to accommodate the two calling conventions in windows dlls.
- */
--# define AP_DECLARE_NONSTD(type) type
-+# define AP_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
- #endif
- #ifndef AP_DECLARE_DATA
--# define AP_DECLARE_DATA
-+# define AP_DECLARE_DATA __attribute__ ((visibility ("default")))
- #endif
-
- #ifndef AP_MODULE_DECLARE
--# define AP_MODULE_DECLARE(type) type
-+# define AP_MODULE_DECLARE(type) __attribute__ ((visibility ("default"))) type
- #endif
- #ifndef AP_MODULE_DECLARE_NONSTD
--# define AP_MODULE_DECLARE_NONSTD(type) type
-+# define AP_MODULE_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
- #endif
- #ifndef AP_MODULE_DECLARE_DATA
--# define AP_MODULE_DECLARE_DATA
-+# define AP_MODULE_DECLARE_DATA __attribute__ ((visibility ("default")))
- #endif
-
- /**
-Index: httpd-2.4.43/include/util_ldap.h
-===================================================================
---- httpd-2.4.43.orig/include/util_ldap.h 2020-04-03 13:38:03.445739206 +0200
-+++ httpd-2.4.43/include/util_ldap.h 2020-04-03 13:38:05.549749528 +0200
-@@ -66,9 +66,9 @@
- * and import tags for the platform
- */
- #if !defined(WIN32)
--#define LDAP_DECLARE(type) type
--#define LDAP_DECLARE_NONSTD(type) type
--#define LDAP_DECLARE_DATA
-+#define LDAP_DECLARE(type) __attribute__ ((visibility ("default"))) type
-+#define LDAP_DECLARE_NONSTD(type) __attribute__ ((visibility ("default"))) type
-+#define LDAP_DECLARE_DATA __attribute__ ((visibility ("default")))
- #elif defined(LDAP_DECLARE_STATIC)
- #define LDAP_DECLARE(type) type __stdcall
- #define LDAP_DECLARE_NONSTD(type) type
-Index: httpd-2.4.43/include/mpm_common.h
-===================================================================
---- httpd-2.4.43.orig/include/mpm_common.h 2018-08-14 22:56:54.000000000 +0200
-+++ httpd-2.4.43/include/mpm_common.h 2020-04-03 13:40:10.698363488 +0200
-@@ -195,7 +195,7 @@ AP_DECLARE(void) ap_wait_or_timeout(apr_
- * Nagle's algorithm that have severe performance penalties.
- * @param s The socket to disable nagle for.
- */
--void ap_sock_disable_nagle(apr_socket_t *s);
-+AP_DECLARE(void) ap_sock_disable_nagle(apr_socket_t *s);
- #else
- #define ap_sock_disable_nagle(s) /* NOOP */
- #endif
diff --git a/apache2.logrotate b/logrotate.apache2
similarity index 100%
rename from apache2.logrotate
rename to logrotate.apache2
diff --git a/rc.apache2 b/rc.apache2
deleted file mode 100644
index ab8f884..0000000
--- a/rc.apache2
+++ /dev/null
@@ -1,404 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 1996, 1997, 1998 S.u.S.E. GmbH
-# Copyright (c) 1998, 1999, 2000, 2001 SuSE GmbH
-# Copyright (c) 2002, 2003, (2004?) SuSE Linux AG
-# Copyright (c) 2004(?), 2005, 2006, 2007, 2008 SUSE Linux Products GmbH
-#
-# Authors: Rolf Haberrecker , 2001
-# Peter Poeml , 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011.
-# Roman Drahtmueller , 2010, 2011, 2012.
-#
-#
-# /etc/init.d/apache2
-#
-### BEGIN INIT INFO
-# Provides: apache apache2 httpd
-# Required-Start: $local_fs $remote_fs $network
-# Should-Start: $named $time postgresql sendmail mysql ypclient dhcp radiusd
-# Should-Stop: $named $time postgresql sendmail mysql ypclient dhcp radiusd
-# Required-Stop: $local_fs $remote_fs $network
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# X-Interactive: true
-# Short-Description: Apache 2 HTTP Server
-# Description: Start the Apache HTTP daemon
-### END INIT INFO
-
-pname=apache2
-: ${sysconfdir:=/etc/$pname}
-: ${apache_link:=/usr/sbin/httpd}
-: ${sysconfig_apache:=/etc/sysconfig/$pname}
-: ${pidfile:=/var/run/httpd.pid}
-: ${logdir:=/var/log/$pname}
-: ${homedir:=/var/lib/$pname}
-
-#
-# load the configuration
-#
-
-#
-# Note about ulimits:
-# if you want to set ulimits, e.g. to increase the max number of open file handle,
-# or to allow core files, you can do so by editing /etc/sysconfig/apache2 and
-# simply write the ulimit commands into that file.
-# Example:
-# ulimit -n 16384
-# ulimit -H -n 16384
-# ulimit -c unlimited
-# See the output of "help ulimit" in the bash, or "man 1 ulimit".
-#
-test -s /etc/rc.status && . /etc/rc.status && rc_reset
-
-. /usr/share/$pname/load_configuration
-export ${!APACHE_*}
-
-httpd_conf=${APACHE_HTTPD_CONF:-$sysconfdir/httpd.conf}
-
-apache_bin=$(/usr/share/$pname/find_mpm 2>/dev/null)
-
-test -L $apache_link && apache_bin=$(readlink $apache_link)
-
-if [ -z "$APACHE_MPM" ]; then
- APACHE_MPM=${apache_bin##*-}
-fi
-
-if ! [ -x $apache_bin ]; then
- echo >&2 ${warn}$apache_bin-$APACHE_MPM is not a valid httpd binary.
- echo >&2 Check your APACHE_MPM setting in /etc/sysconfig/$pname. $norm
- rc_failed 5
- rc_status -v1
- rc_exit
-fi
-
-# a proper home should be set, otherwise the server might end up
-# with HOME=/root and some script might try to use that
-HOME=$homedir
-
-get_server_flags()
-{
- unset server_flags
- case "$action" in startssl) server_flags="-DSSL";; esac
- for i in $APACHE_SERVER_FLAGS; do
- case $i in
- -D) ;;
- -D*) server_flags="$server_flags $i";;
- *) server_flags="$server_flags -D$i";;
- esac
- done
- server_flags="$server_flags -DSYSCONFIG -C 'Include /etc/apache2/sysconfig.d/'"
-}
-
-action="$1"
-case "$action" in
- stop|try-restart|*status*|probe)
- ;;
- *)
- shift; get_server_flags
- ${get_module_list_done:=false} || /usr/share/$pname/get_module_list && export get_module_list_done=true
- ${get_includes:=false} || /usr/share/$pname/get_includes && export get_includes_done=true
- ;;
-esac
-
-#
-# main part
-#
-case "$action" in
- start*)
- if [ -e $pidfile ]; then
- $0 status &>/dev/null
- ret=$?
- if [ $ret = 1 ]; then
- echo "Warning: found stale pidfile (unclean shutdown?)"
- elif [ $ret = 0 ]; then
- echo "Apache is already running ($pidfile)"
- rc_failed $ret
- rc_status -v1
- rc_exit
- fi
- fi
-
- echo -n "Starting httpd (${APACHE_MPM:-${apache_bin#*-}}) "
- cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
- if eval $cmdline -t > $logdir/rc$pname.out 2>&1 ; then
- export -n ${!APACHE_*}
- eval startproc -f -t ${APACHE_START_TIMEOUT:-2} $cmdline
- ret=$?
-
- if test -t 1 && stty -a 2>/dev/null | grep -q -- -echo\ ; then
- # this means that apache was still waiting for a passphrase to be entered
- stty echo 2>/dev/null
- echo;echo
- echo >&2 An SSL passphrase has not been entered within ${APACHE_START_TIMEOUT:-} seconds.
- echo >&2 To increase this timeout, adjust APACHE_START_TIMEOUT in $sysconfig_apache .
- # this surely means that apache won't start, despite it looked good to startproc
- killall $apache_bin
- echo >&2 "Trying to start the server without SSL (-D NOSSL)."
- $0 start "$@" -D NOSSL
- # rc_failed 1
- # rc_status -v1
- # rc_exit
- else
- rc_failed $ret
- rc_status -v
- fi
- else
- if [ "$link" = "$base" ] ; then
- cat $logdir/rc$pname.out
- echo >&2
- echo >&2 The command line was:
- echo >&2 $cmdline
- echo >&2
- else
- echo -e -n "\nsee $logdir/rc$pname.out for details\n";
- fi
- rc_failed 1
- rc_status -v1
- fi
- ;;
- stop)
- echo -n "Shutting down httpd "
- if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
- if ! [ -f $pidfile ]; then
- echo -n "(not running)"
- else
- pid=$(<$pidfile)
- # re-read exe symlink, it could be (deleted) in the meanwhile.
- apache_bin=$(readlink /proc/$pid/exe 2>/dev/null)
- kill -TERM $pid 2>/dev/null
- case $? in
- 1) echo -n "(not running)";;
- 0) # wait until the processes are gone (the parent is the last one)
- echo -n "(waiting for all children to terminate) "
- for ((wait=0; wait<120; wait++)); do
- if test -f $pidfile; then
- usleep 500000
- continue
- fi
- if ! test -f /proc/$pid/exe; then
- break
- fi
- if test "$(readlink /proc/$pid/exe 2>/dev/null)" = "$apache_bin"; then
- usleep 500000
- else
- break
- fi
-
- done
- ;;
- esac
- fi
-
- rc_status -v
- ;;
- stop-graceful)
- echo "Shutting down httpd gracefully (SIGWINCH)"
- if ! [ -f $pidfile ]; then
- echo -n "(not running)"
- else
- pid=$(<$pidfile)
- kill -WINCH $pid 2>/dev/null
- case $? in
- 1) echo -n "(not running)";;
- 0) # wait until the pidfile is gone. The parent stays there, but closes the listen ports.
- echo -n "(waiting for parent to close listen ports and remove pidfile) "
- for ((wait=0; wait<120; wait++)); do
- if test -f $pidfile; then
- usleep 500000
- continue
- else
- break
- fi
- done
- ;;
- esac
- fi
-
- rc_status -v
- ;;
- try-restart)
- ## Do a restart only if the service was active before.
- ## Note: try-restart is now part of LSB (as of 1.9).
- ## RH has a similar command named condrestart.
- $0 status
- if test $? = 0; then
- $0 restart
- else
- rc_reset # Not running is not a failure.
- fi
- # Remember status and be quiet
- rc_status
- ;;
- restart)
- $0 configtest "$@" || { rc_failed $?; rc_exit; }
-
- if $0 status &>/dev/null; then
- $0 stop
- fi
- $0 start "$@"
- # Remember status and be quiet
- rc_status
- ;;
- restart-hup)
- $0 configtest "$@" || { rc_failed $?; rc_exit; }
-
- if $0 status &>/dev/null; then
- echo -n "Restarting httpd (SIGHUP)"
- kill -HUP $(<$pidfile) || return=$rc_failed
- else
- $0 start "$@"
- fi
- # Remember status and be quiet
- rc_status -v
- ;;
- restart-graceful)
- $0 configtest "$@" || { rc_failed $?; rc_exit; }
-
- if $0 status &>/dev/null; then
- $0 stop-graceful "$@"
- $0 start "$@"
- else
- $0 start "$@"
- fi
- # Remember status and be quiet
- rc_status
- ;;
- reload|force-reload|graceful)
- # check if there is a deleted binary. If there is, then logrotate
- # or other occasions will fail to reload, as dlopen(3) of apache
- # modules is prone to fail due to symbol mismatches.
- # in this case, we only complain and fail.
- if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
- executable=$( readlink /proc/$(cat $pidfile)/exe 2> /dev/null )
- case "$executable" in
- *httpd*delete*)
- echo -n "Reload httpd after package update: ignoring request. Please do a manual restart explicitly! "
- rc_failed 1
- rc_status -v
- rc_exit
- ;;
- *)
- ;;
- esac
-
- echo -n "Reload httpd (graceful restart)"
-
- cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
- if eval $cmdline -t &> $logdir/rc$pname.out; then
- killproc -USR1 $apache_bin || return=$rc_failed
- rc_status -v
- else
- if [ "$link" = "$base" ] ; then
- echo -e -n "\n\n"
- cat $logdir/rc$pname.out
- echo >&2
- echo >&2 The command line was:
- echo >&2 $cmdline
- echo >&2
- else
- echo -e -n "\nsee $logdir/rc$pname.out for details\n";
- fi
- rc_failed 6
- rc_status -v1
- fi
- ;;
- status)
- if [ ! -f $pidfile -a -f $pidfile.rpmsave ]; then mv $pidfile.rpmsave $pidfile; fi
- echo -n "Checking for httpd: "
- # we don't use checkproc here since it is confused when we exchange the binaries
- if ! [ -f $pidfile ]; then
- # not running
- rc_failed 3
- elif [ -s $pidfile -a -d /proc/$(<$pidfile) ]; then
- # running
- :
- else
- # stale pid file
- rc_failed 1
- #rm -f $pidfile
- fi
- rc_status -v
- ;;
- probe)
- ## Optional: Probe for the necessity of a reload,
- ## give out the argument which is required for a reload.
-
- for i in $httpd_conf \
- $APACHE_CONF_INCLUDE_FILES \
- $APACHE_CONF_INCLUDE_DIRS
- do
- if [ $i -nt $pidfile ]; then
- echo reload
- break
- fi
- done
- ;;
-
- conf*|test|syntax|check)
- cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
- eval $cmdline -t
- rc_failed $?
- rc_exit
- ;;
-
- extr*)
- cmdline=$(echo $apache_bin -f $httpd_conf $server_flags "$@")
- out=$(su - nobody -c "$cmdline" 2>&1)
- case $out in
- *make_sock:\ could\ not\ bind\ to\ address*) echo Syntax: OK; rc_failed=0;;
- *) echo Syntax: NOT OK:; echo $out; rc_failed=1;;
- esac
- rc_exit
- ;;
-
- server-status)
- apachectl status
- ;;
-
- full-server-status|fullstatus)
- apachectl fullstatus
- ;;
-
- *)
- cat >&2 <<-EOF
- Usage: $0
-
- where is one of:
- start - start httpd
- startssl - start httpd with -DSSL
- stop - stop httpd (sending SIGTERM to parent)
- try-restart - stop httpd and if this succeeds (i.e. if
- it was running before), start it again.
-
- status - check whether httpd is running
-
- restart - stop httpd if running; start httpd
- restart-graceful - stop httpd gracefully if running; start httpd
- reload|graceful - do a graceful restart by sending a SIGUSR1, or
- start if not running
- stop-graceful - stop httpd (sending SIGWINCH to parent)
-
- configtest - do a configuration syntax test
- extreme-configtest - try to run httpd as nobody (detects more errors
- by actually loading the configuration, but cannot
- read SSL certificates)
- probe - probe for the necessity of a reload, give
- out the argument which is required for a reload.
- (by comparing conf files with pidfile timestamp)
-
- full-server-status - dump a full status screen; requires lynx or w3m
- and mod_status enabled
- server-status - dump a short status screen; requires lynx or w3m
- and mod_status enabled
-
- help - this screen
-
- optional server flags are passed through to httpd.
-
- EOF
- exit 1
-esac
-
-
-# Inform the caller not only verbosely and set an exit status.
-rc_exit
diff --git a/robots.txt b/robots.txt
deleted file mode 100644
index 2d702ad..0000000
--- a/robots.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-# exclude help system from robots
-User-agent: *
-Disallow: /manual/
-Disallow: /doc/
-Disallow: /gif/
-# but allow htdig to index our doc-tree
-User-agent: susedig
-Disallow:
-# disallow stress test
-user-agent: stress-agent
-Disallow: /
diff --git a/apache2.ssl.susefirewall b/susefirewall-ssl.apache2
similarity index 100%
rename from apache2.ssl.susefirewall
rename to susefirewall-ssl.apache2
diff --git a/apache2.susefirewall b/susefirewall.apache2
similarity index 100%
rename from apache2.susefirewall
rename to susefirewall.apache2
diff --git a/sysconf_addword b/sysconf_addword
deleted file mode 100644
index 4dcd863..0000000
--- a/sysconf_addword
+++ /dev/null
@@ -1,137 +0,0 @@
-#!/bin/bash
-
-# Copyright 2005 Peter Poeml . All Rights Reserved.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
-
-debug=false
-
-function usage() {
- cat <<-EOF
- usage: $(basename $0) [-r] FILE VAR WORD
-
- Add word WORD to variable VAR in file FILE, or remove
- it if the -r option is given.
-
- Example:
- $(basename $0) /etc/sysconfig/apache2 APACHE_SERVER_FLAGS asdf
- leads to the change:
- -APACHE_SERVER_FLAGS="SSL STATUS ruby"
- +APACHE_SERVER_FLAGS="SSL STATUS ruby asdf"
-
- If multiple lines matching ^VAR= are found (which happens to be a habit of
- mine), only the last one is manipulated.
-
- It does not work for WORD starting with characters like a dash which
- prevent word boundary matching.
-
- EOF
-}
-
-function find_last_occurrence () {
- # takes two arguments, FILE and VAR
- # and return the number of the last line where
- # VAR occurs in FILE (not commented)
- grep -n -- "^[[:space:]]*$1" $2 | tail -n 1 | cut -d: -f1
-}
-
-function word_present () {
- . $file
- case " ${!var} " in
- *" $word "*) true;;
- *) false;;
- esac
-}
-
-function add_word() {
- local word=$1
- local word_quoted=$2
- if ! word_present; then
- $debug && cp $file $tmpf
- sed -i -e "${lineno} {
- s/^[[:space:]]*\($var=\".*\)\(\".*\)/\1 $word_quoted\2/;
- s/=\" /=\"/
- }" $file
- $debug && diff -u $tmpf $file
- else
- echo \"$word\" already present
- fi
- # some balancing for vim"s syntax highlighting
-}
-
-function remove_word() {
- local word=$1
- local word_quoted=$2
- if word_present; then
- $debug && cp $file $tmpf
- sed -i -e "${lineno} {
- s/\(['\" ]\)$word_quoted\(['\" ]\)/\1 \2/g
- s/ / /g
- }" $file
- $debug && diff -u $tmpf $file
- else
- echo \"$word\" not present
- fi
- # some balancing for vim"s syntax highlighting
-
-}
-
-# poor man's option parsing
-
-case "$1" in
--h) usage; exit 0;;
-esac
-
-if [ $# -lt 3 ]; then
- echo not enough arguments
- echo
- usage; exit 1
-fi
-
-action=add
-case "$1" in
--r) action=remove; shift;;
-esac
-
-file=$1; shift
-var=$1; shift
-word=$1
-word_quoted=${1//\//\\\/}
-
-
-if $debug; then
- echo FILE: $file
- echo VAR: $var
- echo WORD: $word
- echo current content:
- grep "^$var=" $file | tail -n 1
- echo
-fi
-
-
-if ! [ -r $file ]; then
- echo ${0##*/}: file $file is not a readable file
- exit 1
-fi
-
-lineno=$(find_last_occurrence $var $file)
-if [ -z $lineno ]; then
- echo ${0##*/}: variable $var does not occur in $file
- exit 1
-fi
-
-$debug && tmpf=$(mktemp /tmp/$(basename $0).XXXXXX)
-
-if [ $action = add ]; then
- add_word $word $word_quoted $lineno
-else
- remove_word $word $word_quoted $lineno
-fi
-
-$debug && rm -f $tmpf
-
-exit 0
diff --git a/sysconfig.apache2 b/sysconfig.apache2
index 38f944e..fb7b4d8 100644
--- a/sysconfig.apache2
+++ b/sysconfig.apache2
@@ -125,13 +125,8 @@ APACHE_HTTPD_CONF=""
#
# MPM (multi-processing module) to use.
#
-# Needed to determine with which MPM apache will run, as well as
-# against which header files modules will be built.
-#
-# If not set, the system will simply pick one of the installed MPMs.
-#
-# The implementation of the logic is in /usr/share/apache2/find_mpm,
-# a script which can be used standalone as well if needed.
+# Needed to determine with which MPM apache will run (when run
+# via systemd service).
#
APACHE_MPM=""