remove old stuff
Hanno Böck

Hanno Böck commited on 2014-07-24 12:13:27
Zeige 19 geänderte Dateien mit 0 Einfügungen und 1303 Löschungen.

... ...
@@ -1,14 +0,0 @@
1
-AUX proftpd-tmpfiles.d.conf 34 SHA256 75288bb0c76392ae10e7ef3ff27e7b665742cdac8ce4c70dff9f29d645d0f0f3 SHA512 aa6ffbf15e4275941837306259fb426608e82e45a2da4b99c5d7778d11b8c9341e3a12ae9b751d0e173635239b6f1b20f0431be17296c005a83525a48327fa52 WHIRLPOOL d3ef47f4e2abc178c2d153599e7b13148345a470c76410b499e41912f9e90a48c1217e7fdee3d6777b1598dd09840f8bffbd208fa9addbeaaaf9c64058d8df93
2
-AUX proftpd.conf.sample 1275 SHA256 a214b3937f319c70976d29cfcd47c2cd937d1d70b7274c2b241b1e97606e89c0 SHA512 1c26f3e98ed07d89192c640f7823af168c045abee6ab076791aee9d50be5446be870a189979df4b828e7ae907dd40a346f1b92998fa39195195bfada4061c5df WHIRLPOOL a9f71cf50926ccdf5fe1116250c29a4048e7eb7fc7eb73732023b7c6e78c56b02356c001c203d9dc8c46f817471116977f76e961a6b2a60c03ae1d4722d9e3e1
3
-AUX proftpd.initd 1544 SHA256 aed3dd4cbbf1db8a1bd0cbadee66a808b430bbbcc436610407a9911df208f668 SHA512 f11ce49440341633ea4287e8887f8127d954207c5c25b0ae08b6ca1b8f42e90e693f657e45abc465c2c86c1b43a04776c9fb68b04c97a5a43fa17a05ff5ef5c6 WHIRLPOOL 0a8fe89a575491954fa177d6db85792eb5b6639abc9fd2c88358c0a7b64dc300602f5b75e4d90ba984e5d21831d2a5c2d39e98230f138cba463f3680eba49948
4
-AUX proftpd.service 196 SHA256 165235565ca2029c6c33d9e4b73f6da2b0ee08a662fd368dc9260761997b7277 SHA512 12ee7893d37a9d06140b5b6492be74308fe1165a741d4c1b6b690ab4b973f074cad8517fd36af54f2aa452494759d1534c11e70f7212cd55a37cfa439b953062 WHIRLPOOL 3d8f01d1c22a99d2410d492364833a718a008143c76856145372fa15a0cfc5727b1e744ed45e2fcc8303d90b7e10641662342c1b7d0a50c3bdbc3bd5958d8969
5
-AUX proftpd.xinetd 295 SHA256 150a5701f5c2788ecdf2c6ec228ce674963c9dc7bc1c511ad1eba8dfe05e2d5d SHA512 a13d29ca2289f8bd58b4eb317683d57dfb7d608c53f163844349bbf0b896790f5e9f47a27eafda3b8fc78e60f4a0d6859da7c7ced7df852166cf0b8bcad876d4 WHIRLPOOL 8fa187fe6aff903952257013d06f8953159787f03e6a1b1cd105f55bc6ed8fb70f03e02d4600c593152f9fc418b96fd7ac92555cdd6b9a8c59392e7852b8c186
6
-AUX tls-protocol-versions-bug4024.patch 5088 SHA256 b05f8f2e8bacae13b830c0af4aadfbb607c17ec0e4f118718c7fb2663847e807 SHA512 b7cfb3a2796c1ad191796b37c9a0511d6af0a0dd03b02099615a948716cdbfca94f36d01784546bc3136ac2191361c602f86efb2ad19364453f27eb65ec31803 WHIRLPOOL 4a790090a4da7d6c1ade4164cf4d0644b25e1474f8a098175cc0757c69b8da548be218b37f6b2075f1bbd7df693ed79d1c49fd0e51a77676a53fa5e4bc159ae1
7
-DIST mod_clamav-0.11rc.tar.gz 5115 SHA256 87630eb1866066d6320ee711897d8998b8f4915c0498b2e78cc0464abd34855a SHA512 6d33ee7b1c9c8e3fb0a0014dde90cfb1d37daa0f4914f147bb800a8318bcf0e03c7c6748d84cda36c5e5c7cd11ee8114bad9978362f581f367db54d3563f4636 WHIRLPOOL b15024d1011a83a10ce52fb676f1f2162d67750dc137600b624cd04ebd498bb3c9242e4889fd7b73c18224eb483286cb543fc627b27e6a8ff4c9bf35468218b9
8
-DIST mod_gss-1.3.3.tar.gz 115098 SHA256 24702cf0333720730cc269eb30529061365b1384fdce274bc3d46ccfc300934e SHA512 61473f3102e2204a27d691907482a3e86108bb423be54ba47a79ef0d2a0313bcdc022529f8e620bd868453bee1b1169fce74cc454d835fdfd4be964e342bdedb WHIRLPOOL 90a15ca919326fa2b2e21fb2928e5ac39b912681bce015f3bff0b0b0c47241f41cc3c78789797ba2d8a61dafc24a9f1d18bf085808350301c228b6ed62721e80
9
-DIST mod_vroot-0.9.3.tar.gz 28352 SHA256 f16c61ed7fe2d7231e1421f8f1a484f29972e0efe0e8e065ab373c388b0c073c SHA512 08a3e5df26bb4d5875b57af9e97e7e7cf27b2ad6983bfae0fac8a21f4a5be0a487cf0d9d03e9e1c08701eb3f22f2cb51a14c05fe1cba5f4085eb8a31d5142776 WHIRLPOOL be30931f117fc4f0b7de87579b483e41d86ad3ecd2999267a726664b32090cd32e6a7e748d66ddec525ee784ee2974212fd2455af313c13b67ab61625efa29d0
10
-DIST proftpd-1.3.5rc4.tar.gz 7580690 SHA256 bf87251d81acf872bd26c56efb519183eadbb0a4a9446ab689188416edd6e1e4 SHA512 2bee9acca165b4f41c5f151ef9265f7618581149d11c54467caf17be1b9a2745c8cfe60acf0a91dc0547501cf06c1f2f28a7a7a6bc38a107f368b572e2f84e83 WHIRLPOOL ec3ceec673fbf88cc8e044c515616b621d80bdc20831bd023c1abd05e19b848c0975e461840fdbc0450e2d8591d9372667d1d6bff9519720fd4bf04f64bdec5f
11
-DIST proftpd-mod-case-0.7.tar.gz 13184 SHA256 c3f65588250fea7771439933fa754927794f664e99b8d20f99b1e400fea62111 SHA512 c08d13ef82fec36ae75aa3213dd02e0ce4045904849f422e152f039a9da66a45e4423751074b8bcf8ce347a40ce0e7bde798a85cbadc962fd872aeaa898261fc WHIRLPOOL 27f49e9f34099c081add803aa679fd9abe7afa652dffe5d8e42889fef49aeaefd499e1009fc564d6c8f882b3c6dc31d4c6dd08cc06a42b770e7ef76a2ebfcf8a
12
-DIST proftpd-mod-diskuse-0.9.tar.gz 18596 SHA256 424f3fd49237245ec176d27ade0965fe21a0db1d645979d5ae3e55497e3da036 SHA512 d41976bf2810e4b783e775e8c767ca2030c3b5df116219fd31cbbac7feaf9922c315bf4ea092881b0d6cf43f2f4c5dbcae61be3c3a833058d12f962a3024b975 WHIRLPOOL aabd1dc23d6c38d308e859ff778beffd0dabfe70d3530c093cf2f95e80b5e9c94b97b6b5ae5109d031f76ff94dffc3822a7aa60fa30df04523d37ebed99730d6
13
-DIST proftpd-mod-msg-0.4.1.tar.gz 8082 SHA256 255b79d31dc509ffad5d0fbcd469f833a8481e880aa962910c2bc8aa608ca6da SHA512 38ea63b1d355e1e10a6a4477596bf3fa28529a871c9fb8dbf093b5317f0743ef9cb59b986d0b8c1c7ed932dad5d5d571883d596fad2d3b793431824db4487012 WHIRLPOOL ff907e26a354f53231fed94515eb60050dec77118be6f49147e0eb8b79e50c9d73354618bca19d98d32a3fb79d7ba87507cc6c8b269f259c5fcf23d44ad3a906
14
-EBUILD proftpd-1.3.5_rc4.ebuild 7804 SHA256 49e6bf151346bad9dfcb9668f90d5f7f8091295d47589fb29608aecfedf4a070 SHA512 108c819f49ac3d3a7a179fb26654911dc37775a3668cb6531cf2bd8a94e935e1335ac02c6c16a3bce9cd458dc6c8b3e9a5ceb42b97f4cb15cc1d7357aeb10885 WHIRLPOOL 92ef10853e70e82bbe2da248a2f4c29ea4ccbcecd2da1ae50b798d047030a61bb32cde32501246947b34dba91b8cefe3c916d4ad4b411b5fb9e57baddd9bc82a
... ...
@@ -1 +0,0 @@
1
-d /var/run/proftpd 0755 root root
... ...
@@ -1,53 +0,0 @@
1
-# This is a sample ProFTPD configuration file for Gentoo Linux (rename
2
-# it to 'proftpd.conf' for actual use). It establishes a single server
3
-# and a single anonymous login.
4
-
5
-ServerName "ProFTPD Default Server"
6
-ServerType standalone
7
-DefaultServer on
8
-RequireValidShell off
9
-AuthPAM off
10
-AuthPAMConfig ftp
11
-
12
-# Listen on the standard FTP port 21.
13
-Port 21
14
-
15
-# New directories and files should not be group or world writable.
16
-Umask 022
17
-
18
-# To prevent DoS attacks set the maximum number of child processes
19
-# to 30. If you need to allow more than 30 concurrent connections
20
-# at once simply increase this value.
21
-MaxInstances 30
22
-
23
-# The server will run under ftp/ftp.
24
-User ftp
25
-Group ftp
26
-
27
-# Every FTP sessions is "jailed" into the user's home directory.
28
-DefaultRoot ~
29
-
30
-# Generally files are overwritable.
31
-AllowOverwrite on
32
-
33
-# Disallow the use of the SITE CHMOD command.
34
-<Limit SITE_CHMOD>
35
-  DenyAll
36
-</Limit>
37
-
38
-# A basic anonymous FTP account without an upload directory.
39
-<Anonymous ~ftp>
40
-  User ftp
41
-  Group ftp
42
-
43
-  # Clients can login with the username "anonymous" and "ftp".
44
-  UserAlias anonymous ftp
45
-
46
-  # Limit the maximum number of parallel anonymous logins to 10.
47
-  MaxClients 10
48
-
49
-  # Prohibit the WRITE command for the anonymous users.
50
-  <Limit WRITE>
51
-    DenyAll
52
-  </Limit>
53
-</Anonymous>
... ...
@@ -1,52 +0,0 @@
1
-#!/sbin/runscript
2
-# Copyright 1999-2013 Gentoo Foundation
3
-# Distributed under the terms of the GNU General Public License v2
4
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.initd,v 1.5 2013/01/14 02:58:52 floppym Exp $
5
-
6
-extra_started_commands="reload"
7
-
8
-depend() {
9
-	need net
10
-	use logger dns mysql postgresql antivirus
11
-}
12
-
13
-check_configuration() {
14
-	if [ ! -e /etc/proftpd/proftpd.conf ] ; then
15
-		eerror "To execute the ProFTPD server you need a /etc/proftpd/proftpd.conf configuration"
16
-		eerror "file. In /etc/proftpd you can find a sample configuration."
17
-		return 1
18
-	fi
19
-	/usr/sbin/proftpd -t &>/dev/null
20
-	if [ $? -ne 0 ] ; then
21
-		eerror "The ProFTPD configuration file /etc/proftpd/proftpd.conf is invalid! You have to"
22
-		eerror "fix your configuration in order to run the ProFTPD server. For more information"
23
-		eerror "you may execute the ProFTPD configuration check '/usr/sbin/proftpd -t'."
24
-		return 2
25
-	fi
26
-}
27
-
28
-start() {
29
-	checkpath -d /var/run/proftpd
30
-	[ "${RC_CMD}" = "restart" ] || check_configuration || return 1
31
-	ebegin "Starting ProFTPD"
32
-	start-stop-daemon --start --quiet \
33
-		--exec /usr/sbin/proftpd \
34
-		--pidfile /var/run/proftpd/proftpd.pid
35
-	eend $?
36
-}
37
-
38
-stop() {
39
-	[ "${RC_CMD}" != "restart" ] || check_configuration || return 1
40
-	ebegin "Stopping ProFTPD"
41
-	start-stop-daemon --stop --quiet --retry 20 \
42
-		--pidfile /var/run/proftpd/proftpd.pid
43
-	eend $?
44
-}
45
-
46
-reload() {
47
-	check_configuration || return 1
48
-	ebegin "Reloading ProFTPD"
49
-	start-stop-daemon --quiet --signal HUP \
50
-		--pidfile /var/run/proftpd/proftpd.pid
51
-	eend $?
52
-}
... ...
@@ -1,12 +0,0 @@
1
-[Unit]
2
-Description=ProFTPd FTP daemon
3
-
4
-[Service]
5
-Type=simple
6
-ExecStart=/usr/sbin/proftpd --nodaemon
7
-StandardOutput=syslog
8
-StandardError=syslog
9
-Restart=always
10
-
11
-[Install]
12
-WantedBy=multi-user.target
... ...
@@ -1,15 +0,0 @@
1
-#
2
-# ProFTPd FTP daemon - http://www.proftpd.org
3
-#
4
-service ftp
5
-{
6
-       flags		= REUSE
7
-       socket_type	= stream
8
-       instances	= 30
9
-       wait		= no
10
-       user		= root
11
-       server		= /usr/sbin/proftpd
12
-       log_on_success	= HOST PID
13
-       log_on_failure	= HOST
14
-       disable		= yes
15
-}
... ...
@@ -1,148 +0,0 @@
1
-Index: contrib/mod_tls.c
2
-===================================================================
3
-RCS file: /cvsroot/proftp/proftpd/contrib/mod_tls.c,v
4
-retrieving revision 1.333
5
-diff -u -r1.333 mod_tls.c
6
---- contrib/mod_tls.c	28 Feb 2014 15:18:50 -0000	1.333
7
-+++ contrib/mod_tls.c	2 Mar 2014 19:38:19 -0000
8
-@@ -390,7 +390,7 @@
9
- #define TLS_PROTO_TLS_V1		0x0002
10
- #define TLS_PROTO_TLS_V1_1		0x0004
11
- #define TLS_PROTO_TLS_V1_2		0x0008
12
--#define TLS_PROTO_DEFAULT		TLS_PROTO_SSL_V3|TLS_PROTO_TLS_V1
13
-+#define TLS_PROTO_DEFAULT		(TLS_PROTO_SSL_V3|TLS_PROTO_TLS_V1)
14
- 
15
- #ifdef SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
16
- static int tls_ssl_opts = (SSL_OP_ALL|SSL_OP_NO_SSLv2|SSL_OP_SINGLE_DH_USE)^SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
17
-@@ -2751,6 +2751,32 @@
18
-   return 0;
19
- }
20
- 
21
-+static const char *tls_get_proto_str(pool *p, unsigned int protos) {
22
-+  char *proto_str = "";
23
-+
24
-+  if (protos & TLS_PROTO_SSL_V3) {
25
-+    proto_str = pstrcat(p, proto_str, *proto_str ? ", " : "",
26
-+      "SSLv3", NULL);
27
-+  }
28
-+
29
-+  if (protos & TLS_PROTO_TLS_V1) {
30
-+    proto_str = pstrcat(p, proto_str, *proto_str ? ", " : "",
31
-+      "TLSv1", NULL);
32
-+  }
33
-+
34
-+  if (protos & TLS_PROTO_TLS_V1_1) {
35
-+    proto_str = pstrcat(p, proto_str, *proto_str ? ", " : "",
36
-+      "TLSv1.1", NULL);
37
-+  }
38
-+
39
-+  if (protos & TLS_PROTO_TLS_V1_2) {
40
-+    proto_str = pstrcat(p, proto_str, *proto_str ? ", " : "",
41
-+      "TLSv1.2", NULL);
42
-+  }
43
-+
44
-+  return proto_str;
45
-+}
46
-+
47
- static int tls_init_server(void) {
48
-   config_rec *c = NULL;
49
-   char *tls_ca_cert = NULL, *tls_ca_path = NULL, *tls_ca_chain = NULL;
50
-@@ -2763,8 +2789,7 @@
51
-     tls_protocol = *((unsigned int *) c->argv[0]);
52
-   }
53
- 
54
--  if ((tls_protocol & TLS_PROTO_SSL_V3) &&
55
--      (tls_protocol & TLS_PROTO_TLS_V1)) {
56
-+  if (tls_protocol == TLS_PROTO_DEFAULT) {
57
-     /* This is the default, so there is no need to do anything. */
58
- #if OPENSSL_VERSION_NUMBER >= 0x10001000L
59
-     pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting SSLv3, TLSv1, TLSv1.1, TLSv1.2 protocols");
60
-@@ -2772,26 +2797,75 @@
61
-     pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting SSLv3, TLSv1 protocols");
62
- #endif /* OpenSSL-1.0.1 or later */
63
- 
64
--  } else if (tls_protocol & TLS_PROTO_SSL_V3) {
65
-+  } else if (tls_protocol == TLS_PROTO_SSL_V3) {
66
-     SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_server_method());
67
-     pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting SSLv3 protocol only");
68
- 
69
--  } else if (tls_protocol & TLS_PROTO_TLS_V1) {
70
-+  } else if (tls_protocol == TLS_PROTO_TLS_V1) {
71
-     SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_server_method());
72
-     pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting TLSv1 protocol only");
73
- 
74
- #if OPENSSL_VERSION_NUMBER >= 0x10001000L
75
--  } else if (tls_protocol & TLS_PROTO_TLS_V1_1) {
76
-+  } else if (tls_protocol == TLS_PROTO_TLS_V1_1) {
77
-     SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_1_server_method());
78
-     pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting TLSv1.1 protocol only");
79
- 
80
--  } else if (tls_protocol & TLS_PROTO_TLS_V1_2) {
81
-+  } else if (tls_protocol == TLS_PROTO_TLS_V1_2) {
82
-     SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_2_server_method());
83
-     pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting TLSv1.2 protocol only");
84
- 
85
- #endif /* OpenSSL-1.0.1 or later */
86
-+
87
-+  } else {
88
-+    int disable_proto = (SSL_OP_NO_SSLv3|SSL_OP_NO_TLSv1);
89
-+
90
-+#ifdef SSL_OP_NO_TLSv1_1
91
-+    disable_proto |= SSL_OP_NO_TLSv1_1;
92
-+#endif
93
-+#ifdef SSL_OP_NO_TLSv1_2
94
-+    disable_proto |= SSL_OP_NO_TLSv1_2;
95
-+#endif
96
-+
97
-+    /* For any other value of tls_protocol, it will be a combination of
98
-+     * protocol versions.  Thus we MUST use SSLv23_server_method(), and then
99
-+     * try to use SSL_CTX_set_options() to restrict/disable the protocol
100
-+     * versions which are NOT requested.
101
-+     */
102
-+
103
-+    if (tls_protocol & TLS_PROTO_SSL_V3) {
104
-+      /* Clear the "no SSLv3" option. */
105
-+      disable_proto &= ~SSL_OP_NO_SSLv3;
106
-+    }
107
-+
108
-+    if (tls_protocol & TLS_PROTO_TLS_V1) {
109
-+      /* Clear the "no TLSv1" option. */
110
-+      disable_proto &= ~SSL_OP_NO_TLSv1;
111
-+    }
112
-+
113
-+    if (tls_protocol & TLS_PROTO_TLS_V1_1) {
114
-+#ifdef SSL_OP_NO_TLSv1_1
115
-+      /* Clear the "no TLSv1.1" option. */
116
-+      disable_proto &= ~SSL_OP_NO_TLSv1_1;
117
-+#endif
118
-+    }
119
-+
120
-+    if (tls_protocol & TLS_PROTO_TLS_V1_2) {
121
-+#ifdef SSL_OP_NO_TLSv1_2
122
-+      /* Clear the "no TLSv1.2" option. */
123
-+      disable_proto &= ~SSL_OP_NO_TLSv1_2;
124
-+#endif
125
-+    }
126
-+
127
-+    /* Per the comments in <ssl/ssl.h>, SSL_CTX_set_options() uses |= on
128
-+     * the previous value.  This means we can easily OR in our new option
129
-+     * values with any previously set values.
130
-+     */
131
-+    pr_log_debug(DEBUG8, MOD_TLS_VERSION ": supporting %s protocols only",
132
-+      tls_get_proto_str(main_server->pool, tls_protocol));
133
-+    SSL_CTX_set_options(ssl_ctx, disable_proto);
134
-   }
135
- 
136
-+
137
-   tls_ca_cert = get_param_ptr(main_server->conf, "TLSCACertificateFile", FALSE);
138
-   tls_ca_path = get_param_ptr(main_server->conf, "TLSCACertificatePath", FALSE);
139
- 
140
-@@ -2817,7 +2891,7 @@
141
- 
142
-     if (SSL_CTX_set_default_verify_paths(ssl_ctx) != 1) {
143
-       tls_log("error setting default verification locations: %s",
144
--          tls_get_errors());
145
-+        tls_get_errors());
146
-     }
147
-   }
148
- 
... ...
@@ -1,241 +0,0 @@
1
-# Copyright 1999-2013 Gentoo Foundation
2
-# Distributed under the terms of the GNU General Public License v2
3
-# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/proftpd-1.3.4d.ebuild,v 1.10 2013/09/14 10:37:51 ago Exp $
4
-
5
-EAPI=5
6
-inherit eutils multilib systemd
7
-
8
-MOD_CASE="0.7"
9
-MOD_CLAMAV="0.11rc"
10
-MOD_DISKUSE="0.9"
11
-MOD_GSS="1.3.3"
12
-MOD_MSG="0.4.1"
13
-MOD_VROOT="0.9.3"
14
-
15
-DESCRIPTION="An advanced and very configurable FTP server."
16
-HOMEPAGE="http://www.proftpd.org/
17
-	http://www.castaglia.org/proftpd/
18
-	http://www.thrallingpenguin.com/resources/mod_clamav.htm
19
-	http://gssmod.sourceforge.net/"
20
-SRC_URI="ftp://ftp.proftpd.org/distrib/source/${P/_/}.tar.gz
21
-	case? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-case-${MOD_CASE}.tar.gz )
22
-	clamav? ( https://secure.thrallingpenguin.com/redmine/attachments/download/1/mod_clamav-${MOD_CLAMAV}.tar.gz )
23
-	diskuse? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-diskuse-${MOD_DISKUSE}.tar.gz )
24
-	kerberos? ( mirror://sourceforge/gssmod/mod_gss-${MOD_GSS}.tar.gz )
25
-	msg? ( http://www.castaglia.org/${PN}/modules/${PN}-mod-msg-${MOD_MSG}.tar.gz )
26
-	vroot? ( https://github.com/Castaglia/${PN}-mod_vroot/archive/mod_vroot-${MOD_VROOT}.tar.gz )"
27
-LICENSE="GPL-2"
28
-
29
-SLOT="0"
30
-KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 sparc x86 ~x86-fbsd"
31
-IUSE="acl authfile ban +caps case clamav copy ctrls deflate diskuse doc dso dynmasq exec ifsession ifversion ident ipv6
32
-	kerberos ldap linguas_bg_BG linguas_en_US linguas_fr_FR linguas_it_IT linguas_ja_JP linguas_ko_KR
33
-	linguas_ru_RU linguas_zh_CN linguas_zh_TW memcache msg mysql ncurses nls openssl pam +pcre postgres qos radius
34
-	ratio readme rewrite selinux sftp shaper sitemisc softquota sqlite ssl tcpd test trace vroot xinetd"
35
-REQUIRED_USE="ban? ( ctrls )
36
-	msg? ( ctrls )
37
-	sftp? ( openssl )
38
-	shaper? ( ctrls )
39
-	ssl? ( openssl )"
40
-
41
-CDEPEND="acl? ( virtual/acl )
42
-	caps? ( sys-libs/libcap )
43
-	clamav? ( app-antivirus/clamav )
44
-	kerberos? ( virtual/krb5 )
45
-	ldap? ( net-nds/openldap )
46
-	memcache? ( >=dev-libs/libmemcached-0.41 )
47
-	mysql? ( virtual/mysql )
48
-	nls? ( virtual/libiconv )
49
-	ncurses? ( sys-libs/ncurses )
50
-	openssl? ( dev-libs/openssl )
51
-	pam? ( virtual/pam )
52
-	pcre? ( dev-libs/libpcre )
53
-	postgres? ( dev-db/postgresql-base )
54
-	sqlite? ( dev-db/sqlite:3 )
55
-	xinetd? ( virtual/inetd )"
56
-DEPEND="${CDEPEND}
57
-	test? ( dev-libs/check )"
58
-RDEPEND="${CDEPEND}
59
-	net-ftp/ftpbase
60
-	selinux? ( sec-policy/selinux-ftp )"
61
-
62
-S="${WORKDIR}/${P/_/}"
63
-
64
-__prepare_module() {
65
-	local mod_name=$1
66
-	local mod_topdir=${WORKDIR}/${2:-${mod_name}}
67
-
68
-	mv "${mod_topdir}/${mod_name}.c" contrib || die
69
-	mv "${mod_topdir}/${mod_name}.html" doc/contrib || die
70
-	rm -r "${mod_topdir}" || die
71
-}
72
-
73
-src_prepare() {
74
-#	epatch "${FILESDIR}"/${P}-sftp-kbdint-max-responses-bug3973.patch
75
-#	epatch "${FILESDIR}"/${P}-memset-fix.patch
76
-	epatch "${FILESDIR}//tls-protocol-versions-bug4024.patch"
77
-
78
-	# Skip 'install-conf' / Support LINGUAS
79
-	sed -i -e "/install-all/s/ install-conf//" Makefile.in
80
-	sed -i -e "s/^LANGS=.*$/LANGS=${LINGUAS}/" locale/Makefile.in
81
-
82
-	# Prepare external modules
83
-	use case && __prepare_module mod_case
84
-	if use clamav ; then
85
-		mv "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/mod_clamav.{c,h} contrib
86
-		epatch "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}/${PN}.patch
87
-		rm -r "${WORKDIR}"/mod_clamav-${MOD_CLAMAV}
88
-	fi
89
-	use msg && __prepare_module mod_msg
90
-	use vroot && __prepare_module mod_vroot ${PN}-mod_vroot-mod_vroot-${MOD_VROOT}
91
-
92
-	# Prepare external kerberos module
93
-	if use kerberos ; then
94
-		cd "${WORKDIR}"/mod_gss-${MOD_GSS}
95
-
96
-		# Support app-crypt/heimdal / Gentoo Bug #284853
97
-		sed -i -e "s/krb5_principal2principalname/_\0/" mod_auth_gss.c.in
98
-
99
-		# Remove obsolete DES / Gentoo Bug #324903
100
-		# Replace 'rpm' lookups / Gentoo Bug #391021
101
-		sed -i -e "/ac_gss_libs/s/ -ldes425//" \
102
-			-e "s/ac_libdir=\`rpm -q -l.*$/ac_libdir=\/usr\/$(get_libdir)\//" \
103
-			-e "s/ac_includedir=\`rpm -q -l.*$/ac_includedir=\/usr\/include\//" configure{,.in}
104
-	fi
105
-}
106
-
107
-src_configure() {
108
-	local c m
109
-
110
-	use acl && m="${m}:mod_facl"
111
-	use ban && m="${m}:mod_ban"
112
-	use case && m="${m}:mod_case"
113
-	use clamav && m="${m}:mod_clamav"
114
-	use copy && m="${m}:mod_copy"
115
-	use ctrls && m="${m}:mod_ctrls_admin"
116
-	use deflate && m="${m}:mod_deflate"
117
-	if use diskuse ; then
118
-		cd "${WORKDIR}"/mod_diskuse
119
-		econf
120
-		mv mod_diskuse.{c,h} "${S}"/contrib
121
-		mv mod_diskuse.html "${S}"/doc/contrib
122
-		cd "${S}"
123
-		rm -r "${WORKDIR}"/mod_diskuse
124
-		m="${m}:mod_diskuse"
125
-	fi
126
-	use dynmasq && mym="${mym}:mod_dynmasq"
127
-	use exec && m="${m}:mod_exec"
128
-	use ifsession && m="${m}:mod_ifsession"
129
-	use ifversion && m="${m}:mod_ifversion"
130
-	if use kerberos ; then
131
-		cd "${WORKDIR}"/mod_gss-${MOD_GSS}
132
-		if has_version app-crypt/mit-krb5 ; then
133
-			econf --enable-mit
134
-		else
135
-			econf --enable-heimdal
136
-		fi
137
-		mv mod_{auth_gss,gss}.c "${S}"/contrib
138
-		mv mod_gss.h "${S}"/include
139
-		mv README.mod_{auth_gss,gss} "${S}"
140
-		mv mod_gss.html "${S}"/doc/contrib
141
-		mv rfc{1509,2228}.txt "${S}"/doc/rfc
142
-		cd "${S}"
143
-		rm -r "${WORKDIR}"/mod_gss-${MOD_GSS}
144
-		m="${m}:mod_gss:mod_auth_gss"
145
-	fi
146
-	use ldap && m="${m}:mod_ldap"
147
-	use msg && mym="${mym}:mod_msg"
148
-	if use mysql || use postgres || use sqlite ; then
149
-		m="${m}:mod_sql:mod_sql_passwd"
150
-		use mysql && m="${m}:mod_sql_mysql"
151
-		use postgres && m="${m}:mod_sql_postgres"
152
-		use sqlite && m="${m}:mod_sql_sqlite"
153
-	fi
154
-	use qos && m="${m}:mod_qos"
155
-	use radius && m="${m}:mod_radius"
156
-	use ratio && m="${m}:mod_ratio"
157
-	use readme && m="${m}:mod_readme"
158
-	use rewrite && m="${m}:mod_rewrite"
159
-	if use sftp ; then
160
-		m="${m}:mod_sftp"
161
-		use pam && m="${m}:mod_sftp_pam"
162
-		use mysql || use postgres || use sqlite && m="${m}:mod_sftp_sql"
163
-	fi
164
-	use shaper && m="${m}:mod_shaper"
165
-	use sitemisc && m="${m}:mod_site_misc"
166
-	if use softquota ; then
167
-		m="${m}:mod_quotatab:mod_quotatab_file"
168
-		use ldap && m="${m}:mod_quotatab_ldap"
169
-		use radius && m="${m}:mod_quotatab_radius"
170
-		use mysql || use postgres || use sqlite && m="${m}:mod_quotatab_sql"
171
-	fi
172
-	if use ssl ; then
173
-		m="${m}:mod_tls:mod_tls_shmcache"
174
-		use memcache && m="${m}:mod_tls_memcache"
175
-	fi
176
-	if use tcpd ; then
177
-		m="${m}:mod_wrap2:mod_wrap2_file"
178
-		use mysql || use postgres || use sqlite && m="${m}:mod_wrap2_sql"
179
-	fi
180
-	use vroot && m="${m}:mod_vroot"
181
-
182
-	[ -z ${m} ] || c="${c} --with-modules=${m:1}"
183
-	econf --localstatedir=/var/run/proftpd --sysconfdir=/etc/proftpd --disable-strip \
184
-		$(use_enable acl facl) \
185
-		$(use_enable authfile auth-file) \
186
-		$(use_enable caps cap) \
187
-		$(use_enable ctrls) \
188
-		$(use_enable dso) \
189
-		$(use_enable ident) \
190
-		$(use_enable ipv6) \
191
-		$(use_enable memcache) \
192
-		$(use_enable ncurses) \
193
-		$(use_enable nls) \
194
-		$(use_enable openssl) \
195
-		$(use_enable pam auth-pam) \
196
-		$(use_enable pcre) \
197
-		$(use_enable test tests) \
198
-		$(use_enable trace) \
199
-		$(use_enable userland_GNU shadow) \
200
-		$(use_enable userland_GNU autoshadow) \
201
-		${c:1}
202
-}
203
-
204
-src_test() {
205
-	emake api-tests -C tests
206
-}
207
-
208
-src_install() {
209
-	default
210
-	[ -z ${LINGUAS} ] && rm -r "${ED}"/usr/share/locale
211
-	newinitd "${FILESDIR}"/proftpd.initd proftpd
212
-	insinto /etc/proftpd
213
-	doins "${FILESDIR}"/proftpd.conf.sample
214
-
215
-	if use xinetd ; then
216
-		insinto /etc/xinetd.d
217
-		newins "${FILESDIR}"/proftpd.xinetd proftpd
218
-	fi
219
-
220
-	dodoc ChangeLog CREDITS INSTALL NEWS README* RELEASE_NOTES
221
-	if use doc ; then
222
-		dohtml doc/*.html doc/contrib/*.html doc/howto/*.html doc/modules/*.html
223
-		docinto rfc
224
-		dodoc doc/rfc/*.txt
225
-	fi
226
-
227
-	systemd_dounit       "${FILESDIR}"/${PN}.service
228
-	systemd_newtmpfilesd "${FILESDIR}"/${PN}-tmpfiles.d.conf ${PN}.conf
229
-}
230
-
231
-pkg_postinst() {
232
-	if use tcpd ; then
233
-		ewarn
234
-		ewarn "Important: Since ProFTPD 1.3.4rc2 the module mod_wrap for TCP Wrapper"
235
-		ewarn "support has been replaced by mod_wrap2 which is more configurable and"
236
-		ewarn "portable.  But you have to adjust your configuration before restaring"
237
-		ewarn "ProFTPD. On the following website you can find more information:"
238
-		ewarn "  http://proftpd.org/docs/contrib/mod_wrap2.html"
239
-		ewarn
240
-	fi
241
-}
... ...
@@ -1,13 +0,0 @@
1
-AUX 00_systemd.conf 88 SHA256 487e7451ce2d834d8af09a1db09bfe235fbc87b17b13a88bf849f0739b023ce3 SHA512 c510b77450f45d8ca5b8f00ebae5de9e3dc0ecb45f9857e391ac923dadb6b5193b13e9bc372790de20bb8829f2bee5bfc0e85ad03b3a72818c5dd6a0d7f45353 WHIRLPOOL 35ff7234f1ac513a522481ed08d2281dc331835cccd1049dbbadd9f2dff7fce1700a3ae9fd8f2f490f09d82edd960f4a0b4f00a91db2bafb7c647e3b54733cef
2
-AUX 2.2.22-envvars-std.in 1071 SHA256 1721b424f2335640e49d71e671a4be15424d29fe90f55fe4f52bd241a998d3ee SHA512 c18fd461f02ab79fc456a1ad99bf91c8891ecdabd90f41437ebf87e20b3d28d2006a10d6726164c2f0333e7aee350bd125838abaff3a188d8ab2f5f34d3e5466 WHIRLPOOL 59cbee68fc8012df01229b8d5e38045eb974bab3f08ebf5b01097dabb5275bb83e28cd09a058ce71949ca4a2439811cff457d4c7df88d7b3fc5318c6b7ef0075
3
-AUX apache-fix-sni.diff 621 SHA256 272ea68c8af38fb48a805124e5e467448cfc9e1c4a00b8ceef7d84677c8eb1b7 SHA512 865f1148fd5f38dbbea1960275ac29764cfd36369d5df81e7c1029c4363fafdda8dacce760d6424664649df20f4e3bbc15afaa1de693e79605ce2472f721d38e WHIRLPOOL ef1dfd348871d0dd13071fddc74f348ab4ea5114b78fb8db22ccefb781f2f3ca600c18752c284ccb0c7f77783a7e2332865f35a38d4766636c772628874e459e
4
-AUX apache.conf 55 SHA256 ea616c5cc37979a006d69c51bda43fca15a4327d33175762652b29f5cdea1c7b SHA512 3a53beb7a283d17c14383f16ad14c0602681ac1b193cce8f5aca50ae9d9af3a71054ce4a9ab11cbcb72fe913459e1b306fd54660154e66afe10272f8c0f149f3 WHIRLPOOL fa348414f320a9f70001386dfb77d57ca4836c3ef3d251976077b7ad545d7f6752e534efadbf28c7dcb777388e3d844eba84b939dcf48881983388daf6ac23f0
5
-AUX apache2.2.service 716 SHA256 e850ad73585fbba52ade58a39ca91adbfd52f56a0bbd426ebcadb340a7dcb62b SHA512 5f736c803772077598248bbb41f76dff396dfd2f11a60d1ba929a619275efb8c1b4c0dab78cbcdf83b9ec94db67b958b3333b01f67d71eb3b2e07dba4bca2a7c WHIRLPOOL 776a928422b8f37a12099111a1503674ca901934b60dca8596dc8bc287390be9a0e912d7ba6226dcb22eb7c669fa298ddc20fd7bf5c275b0cf019bae0d594839
6
-AUX apache2.4.service 728 SHA256 4420af10d1237f90ae519e56e75f1cc84e9f7c7b63aca9decf91a77f88ae0390 SHA512 6b43e5638d5da68a5408d45befd10a9e42197c1a393764e945ba22d47d0736e2b28bad36a96f4f4ad4ff928db6f2c1377bd22ce401056b2f21fb38933a3cd972 WHIRLPOOL 5526995c5f4772353fcccbd83ed93c8186cb47f80f5d1244dc454ca886189ac92539572c43978d2868b77002a2397ff4794b3c8f6c655fecb432b8013afaf38e
7
-AUX gentoo-apache-2.2.23-initd_fixups.patch 963 SHA256 ea8cdb5ad98416fcc3daf496bc996d23c09212f325980e0328da5e76deb8ad5d SHA512 3250d94e9fc5c3f921c756d3d5cfc670b0221a06dab376ef162cc8ecec8d1300cb95266b2a96d5a608a710326de2144662d450c8a2142a12200b1210fbc9cdb0 WHIRLPOOL 314e1d2c6d156cbf1a0330ab822f64a32d2b6b52adf46e1db4d8f148eb1e471712ebd65948056e4e2e85585499cbc1f9a0d0616f2a6c1ec9b382af35bdf8f194
8
-AUX httpd-2.4.3-mod_systemd.patch 5396 SHA256 d8f5c76dd5eb0edc9759ea300d3b320ee96b6e6f9fabb8a4043f8d1b77b646a2 SHA512 0db785fac6034aa431e9d816bd06020a5b287dbdae794f8b94eb267805981a1d2a97fdb92bd13e32d35329e6db3f799a03e98456329f6a80c5863e72a26e5c59 WHIRLPOOL 4016b9626af1a8ca001518e8a45262ca4dd27a998727db988a8f1234aa7c5d56d439f4ecfdc6219510f57c97991884a7f57eaa83535988cb72e9fd8ffdee7b6e
9
-DIST gentoo-apache-2.4.9-r2-20140421.tar.bz2 24952 SHA256 0494a3e2fbcfc2139b2edeeb04fa87e66d31e0335c22a47e93dbb24289f13a10 SHA512 19dabea049730ab0ea177ec95cc34364835ec11185e87851e1ad31a4b08e3a2855a79d4be0eef2c72fe07bc4647fcf1ffc444be57f7af92b798decc20270552f WHIRLPOOL 96210b689696214d689e4842da4b3795f02732abedb5b9508a3e0c881b8f8bf67a41cf06a8cb6a353f267ddad1af9202a32a0b1b41c9ad49dbc98e5c0841f1d5
10
-DIST gentoo-apache-2.4.9-r3-20140522.tar.bz2 24978 SHA256 65714f27eb1d3c125ff9cd9ef71159ca5592d4336c8d7807e55c826f3a317920 SHA512 0a35a8bf4af399ac4c203db7ac0b60b66550317734fd72e4ce7640dd27648f679ba02100c2384e6dd79fc97bbef25889dfd8c481a2ca0593d06b5df13a762f5d WHIRLPOOL 97085dfb7703187d4a1c873a3dab96ff0b92a36578da000ee9ade6d7762c21e80b4452d4496d60f2918a3818e4137c5717a68eda43b0fa675823b02ba114cd19
11
-DIST httpd-2.4.9.tar.bz2 4994460 SHA256 f78cc90dfa47caf3d83ad18fd6b4e85f237777c1733fc9088594b70ce2847603 SHA512 3a66302e18a2d165b3851665dc73be7d3849fc3359c1ff9dd9e2eaebf1f1d8fb89b7b0a05929d6247750bf0ed1abf9cf3c236a373b2d99635c8ca41698719c96 WHIRLPOOL 735677695d3b1497d554dd3e8d97733359140f3bb524335ab474275ca2b5546ceab8f5f3778948fabee2d152bf5b096d99b3dabb1011a4b68905c7cd5012a648
12
-EBUILD apache-2.4.9-r2.ebuild 7545 SHA256 091b49a8545fca2d4cdc487e7df224a3d9006e899d7e8aa9f91aa7f87edd7467 SHA512 28c9cb35ab96a69b63f19ec62d5b95737da329981591502b1e4fed1038d203ef1a77673e446ee6cdff37e300bf5cbf8129f056550b05c2fa3553df068c9a6e8c WHIRLPOOL 5d55e4130a30261a0827f1a2f5925c7321a03b915b2f8cf9464762751d97b415e13f0cb6c42698b3d030e093d1021a038ee4dec6541493e4f5c401a146f568ad
13
-EBUILD apache-2.4.9-r3.ebuild 7509 SHA256 1cd0492e54f5afb3201ee08ae801ed676860b3d06b8817c6bfa30fdb400e9dde SHA512 5d23cb0aee97b4fc3d4bc855955fb68772ceca02c7d10ee2dbc8c73039da097a881b5a54e5f8a9610760d10f4528a66988ebeb2f93a1adb602bcf72f88854f5a WHIRLPOOL e970730f4727cfa005bdceb2350519297d1a8b5c1b8228a4396e82342a5a05ecc28495c81ef606e89d4132266fd1d228cd55ffef6b6a8ddc4525e363467743e8
... ...
@@ -1,235 +0,0 @@
1
-# Copyright 1999-2014 Gentoo Foundation
2
-# Distributed under the terms of the GNU General Public License v2
3
-# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/apache-2.4.9-r2.ebuild,v 1.1 2014/04/21 09:45:27 polynomial-c Exp $
4
-
5
-EAPI=5
6
-
7
-# latest gentoo apache files
8
-GENTOO_PATCHSTAMP="20140421"
9
-GENTOO_DEVELOPER="polynomial-c"
10
-GENTOO_PATCHNAME="gentoo-apache-2.4.9-r2"
11
-
12
-# IUSE/USE_EXPAND magic
13
-IUSE_MPMS_FORK="itk peruser prefork"
14
-IUSE_MPMS_THREAD="event worker"
15
-
16
-# << obsolete modules:
17
-# authn_default authz_default mem_cache
18
-# mem_cache is replaced by cache_disk
19
-# ?? buggy modules
20
-# proxy_scgi: startup error: undefined symbol "ap_proxy_release_connection", no fix found
21
-# >> added modules for reason:
22
-# compat: compatibility with 2.2 access control
23
-# authz_host: new module for access control
24
-# authn_core: functionality provided by authn_alias in previous versions
25
-# authz_core: new module, provides core authorization capabilities
26
-# cache_disk: replacement for mem_cache
27
-# lbmethod_byrequests: Split off from mod_proxy_balancer in 2.3
28
-# lbmethod_bytraffic: Split off from mod_proxy_balancer in 2.3
29
-# lbmethod_bybusyness: Split off from mod_proxy_balancer in 2.3
30
-# lbmethod_heartbeat: Split off from mod_proxy_balancer in 2.3
31
-# slotmem_shm: Slot-based shared memory provider (for lbmethod_byrequests).
32
-# socache_shmcb: shared object cache provider. Default config with ssl needs it
33
-# unixd: fixes startup error: Invalid command 'User'
34
-IUSE_MODULES="access_compat actions alias asis auth_basic auth_digest authn_alias authn_anon
35
-authn_core authn_dbd authn_dbm authn_file authz_core authz_dbm
36
-authz_groupfile authz_host authz_owner authz_user autoindex cache cache_disk cern_meta
37
-charset_lite cgi cgid dav dav_fs dav_lock dbd deflate dir dumpio
38
-env expires ext_filter file_cache filter headers ident imagemap include info
39
-lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat
40
-log_config log_forensic logio mime mime_magic negotiation proxy
41
-proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi proxy_fcgi
42
-rewrite ratelimit remoteip reqtimeout setenvif slotmem_shm speling socache_shmcb status substitute
43
-unique_id userdir usertrack unixd version vhost_alias"
44
-# The following are also in the source as of this version, but are not available
45
-# for user selection:
46
-# bucketeer case_filter case_filter_in echo http isapi optional_fn_export
47
-# optional_fn_import optional_hook_export optional_hook_import
48
-
49
-# inter-module dependencies
50
-# TODO: this may still be incomplete
51
-MODULE_DEPENDS="
52
-	dav_fs:dav
53
-	dav_lock:dav
54
-	deflate:filter
55
-	cache_disk:cache
56
-	ext_filter:filter
57
-	file_cache:cache
58
-	lbmethod_byrequests:proxy_balancer
59
-	lbmethod_byrequests:slotmem_shm
60
-	lbmethod_bytraffic:proxy_balancer
61
-	lbmethod_bybusyness:proxy_balancer
62
-	lbmethod_heartbeat:proxy_balancer
63
-	log_forensic:log_config
64
-	logio:log_config
65
-	cache_disk:cache
66
-	mime_magic:mime
67
-	proxy_ajp:proxy
68
-	proxy_balancer:proxy
69
-	proxy_balancer:slotmem_shm
70
-	proxy_connect:proxy
71
-	proxy_ftp:proxy
72
-	proxy_http:proxy
73
-	proxy_scgi:proxy
74
-	proxy_fcgi:proxy
75
-	substitute:filter
76
-"
77
-
78
-# module<->define mappings
79
-MODULE_DEFINES="
80
-	auth_digest:AUTH_DIGEST
81
-	authnz_ldap:AUTHNZ_LDAP
82
-	cache:CACHE
83
-	cache_disk:CACHE
84
-	dav:DAV
85
-	dav_fs:DAV
86
-	dav_lock:DAV
87
-	file_cache:CACHE
88
-	info:INFO
89
-	ldap:LDAP
90
-	proxy:PROXY
91
-	proxy_ajp:PROXY
92
-	proxy_balancer:PROXY
93
-	proxy_connect:PROXY
94
-	proxy_ftp:PROXY
95
-	proxy_http:PROXY
96
-	proxy_fcgi:PROXY
97
-	proxy_scgi:PROXY
98
-	socache_shmcb:SSL
99
-	ssl:SSL
100
-	status:STATUS
101
-	suexec:SUEXEC
102
-	userdir:USERDIR
103
-"
104
-
105
-# critical modules for the default config
106
-MODULE_CRITICAL="
107
-	authn_core
108
-	authz_core
109
-	authz_host
110
-	dir
111
-	mime
112
-	unixd
113
-"
114
-inherit eutils apache-2 systemd toolchain-funcs
115
-
116
-DESCRIPTION="The Apache Web Server."
117
-HOMEPAGE="http://httpd.apache.org/"
118
-
119
-# some helper scripts are Apache-1.1, thus both are here
120
-LICENSE="Apache-2.0 Apache-1.1"
121
-SLOT="2"
122
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
123
-IUSE=""
124
-
125
-DEPEND="${DEPEND}
126
-	>=dev-libs/openssl-0.9.8m
127
-	apache2_modules_deflate? ( sys-libs/zlib )"
128
-
129
-# dependency on >=dev-libs/apr-1.5.0 for bug #492578
130
-RDEPEND="${RDEPEND}
131
-	>=dev-libs/apr-1.5.0
132
-	>=dev-libs/openssl-0.9.8m
133
-	apache2_modules_mime? ( app-misc/mime-types )"
134
-
135
-pkg_setup() {
136
-	# dependend critical modules which are not allowed in global scope due
137
-	# to USE flag conditionals (bug #499260)
138
-	use ssl && MODULE_CRITICAL+=" socache_shmcb"
139
-	use doc && MODULE_CRITICAL+=" alias negotiation setenvif"
140
-	apache-2_pkg_setup
141
-}
142
-
143
-src_prepare() {
144
-	epatch "${FILESDIR}/apache-fix-sni.diff"
145
-	apache-2_src_prepare
146
-}
147
-
148
-src_configure() {
149
-	# Brain dead check.
150
-	tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no"
151
-
152
-	apache-2_src_configure
153
-}
154
-
155
-src_compile() {
156
-	if tc-is-cross-compiler; then
157
-		# This header is the same across targets, so use the build compiler.
158
-		pushd server >/dev/null
159
-		emake gen_test_char
160
-		tc-export_build_env BUILD_CC
161
-		${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \
162
-			gen_test_char.c -o gen_test_char $(apr-1-config --includes) || die
163
-		popd >/dev/null
164
-	fi
165
-
166
-	default
167
-}
168
-
169
-src_install() {
170
-	apache-2_src_install
171
-	for i in /usr/bin/{htdigest,logresolve,htpasswd,htdbm,ab,httxt2dbm}; do
172
-		rm "${D}"/$i || die "Failed to prune apache-tools bits"
173
-	done
174
-	for i in /usr/share/man/man8/{rotatelogs.8,htcacheclean.8}; do
175
-		rm "${D}"/$i || die "Failed to prune apache-tools bits"
176
-	done
177
-	for i in /usr/share/man/man1/{logresolve.1,htdbm.1,htdigest.1,htpasswd.1,dbmmanage.1,ab.1}; do
178
-		rm "${D}"/$i || die "Failed to prune apache-tools bits"
179
-	done
180
-	for i in /usr/sbin/{checkgid,fcgistarter,htcacheclean,rotatelogs}; do
181
-		rm "${D}/"$i || die "Failed to prune apache-tools bits"
182
-	done
183
-
184
-	# well, actually installing things makes them more installed, I guess?
185
-	cp "${S}"/support/apxs "${D}"/usr/sbin/apxs || die "Failed to install apxs"
186
-	chmod 0755 "${D}"/usr/sbin/apxs
187
-
188
-	# Note: wait for mod_systemd to be included in the next release,
189
-	# then apache2.4.service can be used and systemd support controlled
190
-	# through --enable-systemd
191
-	systemd_newunit "${FILESDIR}/apache2.2.service" "apache2.service"
192
-	systemd_dotmpfilesd "${FILESDIR}/apache.conf"
193
-	#insinto /etc/apache2/modules.d
194
-	#doins "${FILESDIR}/00_systemd.conf"
195
-}
196
-
197
-pkg_postinst()
198
-{
199
-	apache-2_pkg_postinst || die "apache-2_pkg_postinst failed"
200
-	# warnings that default config might not work out of the box
201
-	for mod in $MODULE_CRITICAL; do
202
-		if ! use "apache2_modules_${mod}"; then
203
-			echo
204
-			ewarn "Warning: Critical module not installed!"
205
-			ewarn "Modules 'authn_core', 'authz_core' and 'unixd'"
206
-			ewarn "are highly recomended but might not be in the base profile yet."
207
-			ewarn "Default config for ssl needs module 'socache_shmcb'."
208
-			ewarn "Enabling the following flags is highly recommended:"
209
-			for cmod in $MODULE_CRITICAL; do
210
-				use "apache2_modules_${cmod}" || \
211
-					ewarn "+ apache2_modules_${cmod}"
212
-			done
213
-			echo
214
-			break
215
-		fi
216
-	done
217
-	# warning for proxy_balancer and missing load balancing scheduler
218
-	if use apache2_modules_proxy_balancer; then
219
-		local lbset=
220
-		for mod in lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat; do
221
-			if use "apache2_modules_${mod}"; then
222
-				lbset=1 && break
223
-			fi
224
-		done
225
-		if [ ! $lbset ]; then
226
-			echo
227
-			ewarn "Info: Missing load balancing scheduler algorithm module"
228
-			ewarn "(They were split off from proxy_balancer in 2.3)"
229
-			ewarn "In order to get the ability of load balancing, at least"
230
-			ewarn "one of these modules has to be present:"
231
-			ewarn "lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat"
232
-			echo
233
-		fi
234
-	fi
235
-}
... ...
@@ -1,232 +0,0 @@
1
-# Copyright 1999-2014 Gentoo Foundation
2
-# Distributed under the terms of the GNU General Public License v2
3
-# $Header: /var/cvsroot/gentoo-x86/www-servers/apache/apache-2.4.9-r3.ebuild,v 1.1 2014/05/22 14:02:43 polynomial-c Exp $
4
-
5
-EAPI=5
6
-
7
-# latest gentoo apache files
8
-GENTOO_PATCHSTAMP="20140522"
9
-GENTOO_DEVELOPER="polynomial-c"
10
-GENTOO_PATCHNAME="gentoo-apache-2.4.9-r3"
11
-
12
-# IUSE/USE_EXPAND magic
13
-IUSE_MPMS_FORK="peruser prefork"
14
-IUSE_MPMS_THREAD="event worker"
15
-
16
-# << obsolete modules:
17
-# authn_default authz_default mem_cache
18
-# mem_cache is replaced by cache_disk
19
-# ?? buggy modules
20
-# proxy_scgi: startup error: undefined symbol "ap_proxy_release_connection", no fix found
21
-# >> added modules for reason:
22
-# compat: compatibility with 2.2 access control
23
-# authz_host: new module for access control
24
-# authn_core: functionality provided by authn_alias in previous versions
25
-# authz_core: new module, provides core authorization capabilities
26
-# cache_disk: replacement for mem_cache
27
-# lbmethod_byrequests: Split off from mod_proxy_balancer in 2.3
28
-# lbmethod_bytraffic: Split off from mod_proxy_balancer in 2.3
29
-# lbmethod_bybusyness: Split off from mod_proxy_balancer in 2.3
30
-# lbmethod_heartbeat: Split off from mod_proxy_balancer in 2.3
31
-# slotmem_shm: Slot-based shared memory provider (for lbmethod_byrequests).
32
-# socache_shmcb: shared object cache provider. Default config with ssl needs it
33
-# unixd: fixes startup error: Invalid command 'User'
34
-IUSE_MODULES="access_compat actions alias asis auth_basic auth_digest
35
-authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core
36
-authz_dbd authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex
37
-cache cache_disk cern_meta charset_lite cgi cgid dav dav_fs dav_lock dbd deflate
38
-dir dumpio env expires ext_filter file_cache filter headers ident imagemap
39
-include info lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness
40
-lbmethod_heartbeat log_config log_forensic logio mime mime_magic negotiation
41
-proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi
42
-proxy_fcgi  proxy_wstunnel rewrite ratelimit remoteip reqtimeout setenvif
43
-slotmem_shm speling socache_shmcb status substitute unique_id userdir usertrack
44
-unixd version vhost_alias"
45
-# The following are also in the source as of this version, but are not available
46
-# for user selection:
47
-# bucketeer case_filter case_filter_in echo http isapi optional_fn_export
48
-# optional_fn_import optional_hook_export optional_hook_import
49
-
50
-# inter-module dependencies
51
-# TODO: this may still be incomplete
52
-MODULE_DEPENDS="
53
-	dav_fs:dav
54
-	dav_lock:dav
55
-	deflate:filter
56
-	cache_disk:cache
57
-	ext_filter:filter
58
-	file_cache:cache
59
-	lbmethod_byrequests:proxy_balancer
60
-	lbmethod_byrequests:slotmem_shm
61
-	lbmethod_bytraffic:proxy_balancer
62
-	lbmethod_bybusyness:proxy_balancer
63
-	lbmethod_heartbeat:proxy_balancer
64
-	log_forensic:log_config
65
-	logio:log_config
66
-	cache_disk:cache
67
-	mime_magic:mime
68
-	proxy_ajp:proxy
69
-	proxy_balancer:proxy
70
-	proxy_balancer:slotmem_shm
71
-	proxy_connect:proxy
72
-	proxy_ftp:proxy
73
-	proxy_http:proxy
74
-	proxy_scgi:proxy
75
-	proxy_fcgi:proxy
76
-	proxy_wstunnel:proxy
77
-	substitute:filter
78
-"
79
-
80
-# module<->define mappings
81
-MODULE_DEFINES="
82
-	auth_digest:AUTH_DIGEST
83
-	authnz_ldap:AUTHNZ_LDAP
84
-	cache:CACHE
85
-	cache_disk:CACHE
86
-	dav:DAV
87
-	dav_fs:DAV
88
-	dav_lock:DAV
89
-	file_cache:CACHE
90
-	info:INFO
91
-	ldap:LDAP
92
-	proxy:PROXY
93
-	proxy_ajp:PROXY
94
-	proxy_balancer:PROXY
95
-	proxy_connect:PROXY
96
-	proxy_ftp:PROXY
97
-	proxy_http:PROXY
98
-	proxy_fcgi:PROXY
99
-	proxy_scgi:PROXY
100
-	proxy_wstunnel:PROXY
101
-	socache_shmcb:SSL
102
-	ssl:SSL
103
-	status:STATUS
104
-	suexec:SUEXEC
105
-	userdir:USERDIR
106
-"
107
-
108
-# critical modules for the default config
109
-MODULE_CRITICAL="
110
-	authn_core
111
-	authz_core
112
-	authz_host
113
-	dir
114
-	mime
115
-	unixd
116
-"
117
-inherit eutils apache-2 systemd toolchain-funcs
118
-
119
-DESCRIPTION="The Apache Web Server."
120
-HOMEPAGE="http://httpd.apache.org/"
121
-
122
-# some helper scripts are Apache-1.1, thus both are here
123
-LICENSE="Apache-2.0 Apache-1.1"
124
-SLOT="2"
125
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
126
-IUSE=""
127
-
128
-pkg_setup() {
129
-	# dependend critical modules which are not allowed in global scope due
130
-	# to USE flag conditionals (bug #499260)
131
-	use ssl && MODULE_CRITICAL+=" socache_shmcb"
132
-	use doc && MODULE_CRITICAL+=" alias negotiation setenvif"
133
-	apache-2_pkg_setup
134
-}
135
-
136
-src_prepare() {
137
-	epatch "${FILESDIR}/apache-fix-sni.diff"
138
-	apache-2_src_prepare
139
-}
140
-
141
-src_configure() {
142
-	# Brain dead check.
143
-	tc-is-cross-compiler && export ap_cv_void_ptr_lt_long="no"
144
-
145
-	apache-2_src_configure
146
-}
147
-
148
-src_compile() {
149
-	if tc-is-cross-compiler; then
150
-		# This header is the same across targets, so use the build compiler.
151
-		pushd server >/dev/null
152
-		emake gen_test_char
153
-		tc-export_build_env BUILD_CC
154
-		${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} \
155
-			gen_test_char.c -o gen_test_char $(apr-1-config --includes) || die
156
-		popd >/dev/null
157
-	fi
158
-
159
-	default
160
-}
161
-
162
-src_install() {
163
-	apache-2_src_install
164
-	for i in /usr/bin/{htdigest,logresolve,htpasswd,htdbm,ab,httxt2dbm}; do
165
-		rm "${D}"/$i || die "Failed to prune apache-tools bits"
166
-	done
167
-	for i in /usr/share/man/man8/{rotatelogs.8,htcacheclean.8}; do
168
-		rm "${D}"/$i || die "Failed to prune apache-tools bits"
169
-	done
170
-	for i in /usr/share/man/man1/{logresolve.1,htdbm.1,htdigest.1,htpasswd.1,dbmmanage.1,ab.1}; do
171
-		rm "${D}"/$i || die "Failed to prune apache-tools bits"
172
-	done
173
-	for i in /usr/sbin/{checkgid,fcgistarter,htcacheclean,rotatelogs}; do
174
-		rm "${D}/"$i || die "Failed to prune apache-tools bits"
175
-	done
176
-
177
-	# install apxs in /usr/bin (bug #502384) and put a symlink into the 
178
-	# old location until all ebuilds and eclasses have been modified to
179
-	# use the new location.
180
-	local apxs="/usr/bin/apxs"
181
-	cp "${S}"/support/apxs "${D}"${apxs} || die "Failed to install apxs"
182
-	ln -s ../bin/apxs "${D}"/usr/sbin/apxs || die
183
-	chmod 0755 "${D}"${apxs} || die
184
-
185
-	# Note: wait for mod_systemd to be included in the next release,
186
-	# then apache2.4.service can be used and systemd support controlled
187
-	# through --enable-systemd
188
-	systemd_newunit "${FILESDIR}/apache2.2.service" "apache2.service"
189
-	systemd_dotmpfilesd "${FILESDIR}/apache.conf"
190
-	#insinto /etc/apache2/modules.d
191
-	#doins "${FILESDIR}/00_systemd.conf"
192
-}
193
-
194
-pkg_postinst()
195
-{
196
-	apache-2_pkg_postinst || die "apache-2_pkg_postinst failed"
197
-	# warnings that default config might not work out of the box
198
-	for mod in $MODULE_CRITICAL; do
199
-		if ! use "apache2_modules_${mod}"; then
200
-			echo
201
-			ewarn "Warning: Critical module not installed!"
202
-			ewarn "Modules 'authn_core', 'authz_core' and 'unixd'"
203
-			ewarn "are highly recomended but might not be in the base profile yet."
204
-			ewarn "Default config for ssl needs module 'socache_shmcb'."
205
-			ewarn "Enabling the following flags is highly recommended:"
206
-			for cmod in $MODULE_CRITICAL; do
207
-				use "apache2_modules_${cmod}" || \
208
-					ewarn "+ apache2_modules_${cmod}"
209
-			done
210
-			echo
211
-			break
212
-		fi
213
-	done
214
-	# warning for proxy_balancer and missing load balancing scheduler
215
-	if use apache2_modules_proxy_balancer; then
216
-		local lbset=
217
-		for mod in lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat; do
218
-			if use "apache2_modules_${mod}"; then
219
-				lbset=1 && break
220
-			fi
221
-		done
222
-		if [ ! $lbset ]; then
223
-			echo
224
-			ewarn "Info: Missing load balancing scheduler algorithm module"
225
-			ewarn "(They were split off from proxy_balancer in 2.3)"
226
-			ewarn "In order to get the ability of load balancing, at least"
227
-			ewarn "one of these modules has to be present:"
228
-			ewarn "lbmethod_byrequests lbmethod_bytraffic lbmethod_bybusyness lbmethod_heartbeat"
229
-			echo
230
-		fi
231
-	fi
232
-}
... ...
@@ -1,2 +0,0 @@
1
-# This file configures systemd module:
2
-LoadModule systemd_module modules/mod_systemd.so
... ...
@@ -1,28 +0,0 @@
1
-# Licensed to the Apache Software Foundation (ASF) under one or more
2
-# contributor license agreements.  See the NOTICE file distributed with
3
-# this work for additional information regarding copyright ownership.
4
-# The ASF licenses this file to You under the Apache License, Version 2.0
5
-# (the "License"); you may not use this file except in compliance with
6
-# the License.  You may obtain a copy of the License at
7
-#
8
-#     http://www.apache.org/licenses/LICENSE-2.0
9
-#
10
-# Unless required by applicable law or agreed to in writing, software
11
-# distributed under the License is distributed on an "AS IS" BASIS,
12
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
-# See the License for the specific language governing permissions and
14
-# limitations under the License.
15
-#
16
-#
17
-# envvars-std - default environment variables for apachectl
18
-#
19
-# This file is generated from envvars-std.in
20
-#
21
-if test "x$@SHLIBPATH_VAR@" != "x" ; then
22
-  @SHLIBPATH_VAR@="@exp_libdir@:$@SHLIBPATH_VAR@"
23
-else
24
-  @SHLIBPATH_VAR@="@exp_libdir@"
25
-fi
26
-export @SHLIBPATH_VAR@
27
-#
28
-@OS_SPECIFIC_VARS@
... ...
@@ -1,13 +0,0 @@
1
-Index: modules/ssl/ssl_engine_config.c
2
-===================================================================
3
---- modules/ssl/ssl_engine_config.c	(revision 1585379)
4
-+++ modules/ssl/ssl_engine_config.c	(working copy)
5
-@@ -243,7 +243,7 @@
6
- }
7
- 
8
- #define cfgMerge(el,unset)  mrg->el = (add->el == (unset)) ? base->el : add->el
9
--#define cfgMergeArray(el)   mrg->el = apr_array_append(p, add->el, base->el)
10
-+#define cfgMergeArray(el)   mrg->el = apr_array_append(p, base->el, add->el)
11
- #define cfgMergeString(el)  cfgMerge(el, NULL)
12
- #define cfgMergeBool(el)    cfgMerge(el, UNSET)
13
- #define cfgMergeInt(el)     cfgMerge(el, UNSET)
... ...
@@ -1,2 +0,0 @@
1
-d /run/apache2 710 root apache
2
-d /run/apache_ssl_mutex
... ...
@@ -1,19 +0,0 @@
1
-[Unit]
2
-Description=The Apache HTTP Server
3
-After=network.target remote-fs.target nss-lookup.target
4
-
5
-[Service]
6
-EnvironmentFile=/etc/conf.d/apache2
7
-ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND
8
-ExecReload=/usr/sbin/apache2 $APACHE2_OPTS -k graceful
9
-ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop
10
-# We want systemd to give httpd some time to finish gracefully, but still want
11
-# it to kill httpd after TimeoutStopSec if something went wrong during the
12
-# graceful stop. Normally, Systemd sends SIGTERM signal right after the
13
-# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
14
-# httpd time to finish.
15
-KillSignal=SIGCONT
16
-PrivateTmp=true
17
-
18
-[Install]
19
-WantedBy=multi-user.target
... ...
@@ -1,20 +0,0 @@
1
-[Unit]
2
-Description=The Apache HTTP Server
3
-After=network.target remote-fs.target nss-lookup.target
4
-
5
-[Service]
6
-Type=notify
7
-EnvironmentFile=/etc/conf.d/apache2
8
-ExecStart=/usr/sbin/apache2 $APACHE2_OPTS -DFOREGROUND
9
-ExecReload=/usr/sbin/apache2 $APACHE2_OPTS -k graceful
10
-ExecStop=/usr/sbin/apache2 $APACHE2_OPTS -k graceful-stop
11
-# We want systemd to give httpd some time to finish gracefully, but still want
12
-# it to kill httpd after TimeoutStopSec if something went wrong during the
13
-# graceful stop. Normally, Systemd sends SIGTERM signal right after the
14
-# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give
15
-# httpd time to finish.
16
-KillSignal=SIGCONT
17
-PrivateTmp=true
18
-
19
-[Install]
20
-WantedBy=multi-user.target
... ...
@@ -1,40 +0,0 @@
1
---- gentoo-apache-2.2.23/init/apache2.initd
2
-+++ gentoo-apache-2.2.23/init/apache2.initd
3
-@@ -77,12 +77,16 @@
4
- 	# Use start stop daemon to apply system limits #347301 
5
- 	start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start
6
- 
7
--	i=0
8
--	while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
9
-+	local i=0 retval=1
10
-+	while [ $i -lt ${TIMEOUT} ] ; do
11
-+		if [ -e "${PIDFILE}" ] ; then
12
-+			retval=0
13
-+			break
14
-+		fi
15
- 		sleep 1 && i=$(expr $i + 1)
16
- 	done
17
- 
18
--	eend $(test $i -lt ${TIMEOUT})
19
-+	eend ${retval}
20
- }
21
- 
22
- stop() {
23
-@@ -101,13 +105,14 @@
24
- 	ebegin "Stopping ${SVCNAME}"
25
- 	${APACHE2} ${APACHE2_OPTS} -k stop
26
- 
27
--	i=0
28
--	while ( ! test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \
29
-+	local i=0 retval=0
30
-+	while ( test -f "${PIDFILE}" && pgrep -P ${PID} apache2 >/dev/null ) \
31
- 		&& [ $i -lt ${TIMEOUT} ]; do
32
- 		sleep 1 && i=$(expr $i + 1)
33
- 	done
34
-+	[ -e "${PIDFILE}" ] && retval=1
35
- 
36
--	eend $(test $i -lt ${TIMEOUT})
37
-+	eend ${retval}
38
- }
39
- 
40
- reload() {
... ...
@@ -1,163 +0,0 @@
1
---- httpd-2.4.3/modules/arch/unix/config5.m4.systemd
2
-+++ httpd-2.4.3/modules/arch/unix/config5.m4
3
-@@ -18,6 +18,19 @@ APACHE_MODULE(privileges, Per-virtualhos
4
-   fi
5
- ])
6
- 
7
-+
8
-+APACHE_MODULE(systemd, Systemd support, , , $unixd_mods_enabled, [
9
-+  AC_CHECK_LIB(systemd-daemon, sd_notify, SYSTEMD_LIBS="-lsystemd-daemon")
10
-+  AC_CHECK_HEADERS(systemd/sd-daemon.h, [ap_HAVE_SD_DAEMON_H="yes"], [ap_HAVE_SD_DAEMON_H="no"])
11
-+  if test $ap_HAVE_SD_DAEMON_H = "no" || test -z "${SYSTEMD_LIBS}"; then
12
-+    AC_MSG_WARN([Your system does not support systemd.])
13
-+    enable_systemd="no"
14
-+  else
15
-+    APR_ADDTO(MOD_SYSTEMD_LDADD, [$SYSTEMD_LIBS])
16
-+    enable_systemd="yes"
17
-+  fi
18
-+])
19
-+
20
- APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current])
21
- 
22
- APACHE_MODPATH_FINISH
23
---- httpd-2.4.3/modules/arch/unix/mod_systemd.c.systemd
24
-+++ httpd-2.4.3/modules/arch/unix/mod_systemd.c
25
-@@ -0,0 +1,138 @@
26
-+/* Licensed to the Apache Software Foundation (ASF) under one or more
27
-+ * contributor license agreements.  See the NOTICE file distributed with
28
-+ * this work for additional information regarding copyright ownership.
29
-+ * The ASF licenses this file to You under the Apache License, Version 2.0
30
-+ * (the "License"); you may not use this file except in compliance with
31
-+ * the License.  You may obtain a copy of the License at
32
-+ *
33
-+ *     http://www.apache.org/licenses/LICENSE-2.0
34
-+ *
35
-+ * Unless required by applicable law or agreed to in writing, software
36
-+ * distributed under the License is distributed on an "AS IS" BASIS,
37
-+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38
-+ * See the License for the specific language governing permissions and
39
-+ * limitations under the License.
40
-+ * 
41
-+ */
42
-+
43
-+#include <stdint.h>
44
-+#include <ap_config.h>
45
-+#include "ap_mpm.h"
46
-+#include <http_core.h>
47
-+#include <http_log.h>
48
-+#include <apr_version.h>
49
-+#include <apr_pools.h>
50
-+#include <apr_strings.h>
51
-+#include "unixd.h"
52
-+#include "scoreboard.h"
53
-+#include "mpm_common.h"
54
-+
55
-+#include "systemd/sd-daemon.h"
56
-+
57
-+#if APR_HAVE_UNISTD_H
58
-+#include <unistd.h>
59
-+#endif
60
-+
61
-+#define KBYTE 1024
62
-+
63
-+static pid_t pid;	/* PID of the main httpd instance */
64
-+static int server_limit, thread_limit, threads_per_child, max_servers;
65
-+static time_t last_update_time;
66
-+static unsigned long last_update_access;
67
-+static unsigned long last_update_kbytes;
68
-+
69
-+static int systemd_pre_mpm(apr_pool_t *p, ap_scoreboard_e sb_type)
70
-+{
71
-+    int rv;
72
-+    last_update_time = time(0);
73
-+
74
-+    ap_mpm_query(AP_MPMQ_HARD_LIMIT_THREADS, &thread_limit);
75
-+    ap_mpm_query(AP_MPMQ_HARD_LIMIT_DAEMONS, &server_limit);
76
-+    ap_mpm_query(AP_MPMQ_MAX_THREADS, &threads_per_child);
77
-+    /* work around buggy MPMs */
78
-+    if (threads_per_child == 0)
79
-+        threads_per_child = 1;
80
-+    ap_mpm_query(AP_MPMQ_MAX_DAEMONS, &max_servers);
81
-+
82
-+    pid = getpid();
83
-+    
84
-+    rv = sd_notifyf(0, "READY=1\n"
85
-+                    "STATUS=Processing requests...\n"
86
-+                    "MAINPID=%lu",
87
-+                    (unsigned long) pid);
88
-+    if (rv < 0) {
89
-+        ap_log_perror(APLOG_MARK, APLOG_ERR, 0, p, 
90
-+                     "sd_notifyf returned an error %d", rv);
91
-+    }
92
-+
93
-+    return OK;
94
-+}
95
-+
96
-+static int systemd_monitor(apr_pool_t *p, server_rec *s)
97
-+{
98
-+    int i, j, res, rv;
99
-+    process_score *ps_record;
100
-+    worker_score *ws_record;
101
-+    unsigned long access = 0;
102
-+    unsigned long bytes = 0;
103
-+    unsigned long kbytes = 0;
104
-+    char bps[5];
105
-+    time_t now = time(0);
106
-+    time_t elapsed = now - last_update_time;
107
-+
108
-+    for (i = 0; i < server_limit; ++i) {
109
-+        ps_record = ap_get_scoreboard_process(i);
110
-+        for (j = 0; j < thread_limit; ++j) {
111
-+            ws_record = ap_get_scoreboard_worker_from_indexes(i, j);
112
-+            if (ap_extended_status && !ps_record->quiescing && ps_record->pid) {
113
-+                res = ws_record->status;
114
-+                if (ws_record->access_count != 0 || 
115
-+                    (res != SERVER_READY && res != SERVER_DEAD)) {
116
-+                    access += ws_record->access_count;
117
-+                    bytes += ws_record->bytes_served;
118
-+                    if (bytes >= KBYTE) {
119
-+                        kbytes += (bytes >> 10);
120
-+                        bytes = bytes & 0x3ff;
121
-+                    }
122
-+                }
123
-+            }
124
-+        }
125
-+    }
126
-+
127
-+    apr_strfsize((unsigned long)(KBYTE *(float) (kbytes - last_update_kbytes)
128
-+                                 / (float) elapsed), bps);
129
-+
130
-+    rv = sd_notifyf(0, "READY=1\n"
131
-+                    "STATUS=Total requests: %lu; Current requests/sec: %.3g; "
132
-+                    "Current traffic: %sB/sec\n", access,
133
-+                    ((float)access - last_update_access) / (float) elapsed, bps);
134
-+    if (rv < 0) {
135
-+        ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00000)
136
-+                     "sd_notifyf returned an error %d", rv);
137
-+    }
138
-+
139
-+    last_update_access = access;
140
-+    last_update_kbytes = kbytes;
141
-+    last_update_time = now;
142
-+
143
-+    return DECLINED;
144
-+}
145
-+
146
-+static void systemd_register_hooks(apr_pool_t *p)
147
-+{
148
-+    /* We know the PID in this hook ... */
149
-+    ap_hook_pre_mpm(systemd_pre_mpm, NULL, NULL, APR_HOOK_LAST);
150
-+    /* Used to update httpd's status line using sd_notifyf */
151
-+    ap_hook_monitor(systemd_monitor, NULL, NULL, APR_HOOK_MIDDLE);
152
-+}
153
-+
154
-+module AP_MODULE_DECLARE_DATA systemd_module =
155
-+{
156
-+    STANDARD20_MODULE_STUFF,
157
-+    NULL,
158
-+    NULL,
159
-+    NULL,
160
-+    NULL,
161
-+    NULL,
162
-+    systemd_register_hooks,
163
-+};
164 0