From ab58e299fd6dae92ea274fe7d0ad685d888a51b7 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 11 Oct 2017 17:17:51 +0100 Subject: gentoo resync : 11.10.2017 --- www-servers/nginx/Manifest | 3 + www-servers/nginx/nginx-1.13.6.ebuild | 1000 ++++++++++++++++++++ www-servers/tomcat/Manifest | 14 +- .../tomcat/files/tomcat-8.0.47-build.xml.patch | 258 +++++ .../tomcat/files/tomcat-8.5.23-build.xml.patch | 249 +++++ .../tomcat/files/tomcat-9.0.1_beta-build.xml.patch | 249 +++++ www-servers/tomcat/tomcat-8.0.46.ebuild | 2 +- www-servers/tomcat/tomcat-8.0.47.ebuild | 157 +++ www-servers/tomcat/tomcat-8.5.23.ebuild | 157 +++ www-servers/tomcat/tomcat-9.0.1_beta.ebuild | 158 ++++ 10 files changed, 2242 insertions(+), 5 deletions(-) create mode 100644 www-servers/nginx/nginx-1.13.6.ebuild create mode 100644 www-servers/tomcat/files/tomcat-8.0.47-build.xml.patch create mode 100644 www-servers/tomcat/files/tomcat-8.5.23-build.xml.patch create mode 100644 www-servers/tomcat/files/tomcat-9.0.1_beta-build.xml.patch create mode 100644 www-servers/tomcat/tomcat-8.0.47.ebuild create mode 100644 www-servers/tomcat/tomcat-8.5.23.ebuild create mode 100644 www-servers/tomcat/tomcat-9.0.1_beta.ebuild (limited to 'www-servers') diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest index c0188940a24c..e46ef82926fb 100644 --- a/www-servers/nginx/Manifest +++ b/www-servers/nginx/Manifest @@ -17,6 +17,7 @@ DIST nginx-1.12.1.tar.gz 981093 SHA256 8793bf426485a30f91021b6b945a9fd8a84d87d17 DIST nginx-1.13.3.tar.gz 985931 SHA256 5b73f98004c302fb8e4a172abf046d9ce77739a82487e4873b39f9b0dcbb0d72 SHA512 4a8924b1edd0b8476437680ea548a0bc983d360e73f2d5797f60cebc3ef7d6fb64e56b6aaf5a4fc1707d24519dc70d466a7bf1d336c463651928d65c2f7b5380 WHIRLPOOL 9cb1f77a60945d9c1df6e2589116406f31939882131759d3aa95b25edfe86bc5fe712a517a3b0f77a5fca2b3706884984b90e293a4e791faa824bbf0e964518e DIST nginx-1.13.4.tar.gz 988415 SHA256 de21f3c49ba65c611329d8759a63d72e5fcf719bc6f2a3270e2541348ef1fbba SHA512 068f59f0dfe68a9a20a141bf5416551bc758fe50a38b2576f0e1c9df2ec674c7348b151f3ce80b614ac20610bc85374be7cef69f95b925f4fde351716c1da740 WHIRLPOOL 333cf2542fef05a0709259e6c8ea363a2eaaade00e1e1f0f50df081af023826d452b7b5fd3e826a63cad1753949f469424723b0a9731a34418c06517e14d6f3a DIST nginx-1.13.5.tar.gz 988821 SHA256 0e75b94429b3f745377aeba3aff97da77bf2b03fcb9ff15b3bad9b038db29f2e SHA512 ffd0406a75a35da427522f58c9b710cde86acb1ebf48f4e6b7f6a44e04ccd83950fedc6dceed9e2ab5132e06559f3bf45935d5011fc436e7c2efd46ac1e86459 WHIRLPOOL 94703bff57b0c701709974748f07ba444143707ecfb98beb9ca0d30d66913cde07725f3ae82a44d5585709c35b0ff600eccab37f0b5df904b67cee8e2085207d +DIST nginx-1.13.6.tar.gz 989760 SHA256 8512fc6f986a20af293b61f33b0e72f64a72ea5b1acbcc790c4c4e2d6f63f8f8 SHA512 9ae218396e94f0e165d4d573a979354045ac579f0dcc702a37bde3ec5764e21161efc90fc1ff66bd402047c41a16ca0ff02423eaeb8d89b397e970df246f419e WHIRLPOOL e219846d7a15de9239d4c26eab4e8ec783bbc715e84eee0f6a8591a1d0dae0eeb828b15ccf622638c14a943758b3bb02e23355e129c16178d9aca72c4733b80f DIST nginx-auth-ldap-49a8b4d28fc4a518563c82e0b52821e5f37db1fc.tar.gz 17159 SHA256 3c11c32f05da04f1a4647dc4e35dd8d8aeacd5a2e763ba349feba3dba8663132 SHA512 323abd0ca8e90f5afcaf81a8ff1a8abe3dfcbff3d69f0dd4a1c005fe6436acbf3076c4c57a4df877b3d8e388cbea085d46301bb2df9c0752e2567817ff7cca92 WHIRLPOOL ad65e8182b2634db5fa06055ef7d91c7d8aabd0fa986d8402a4845977354d6edb329621b6f9f96c90ce2d158cff20e42ae50fba06a088a84de3e3f414205dbc2 DIST nginx_http_sticky_module_ng-1.2.6-10-g08a395c66e42.tar.bz2 124047 SHA256 6f9102321d8c68df6d67e9bde145a8de3f45f99f6cb47c08735a86f003234d31 SHA512 6c1bfdcf89884b2855d51ae7da0f6e53a4ca3629e1aaf58433b70c07dcb2af797ba6e87d9b3eb4fe2fb6d4d697e862f2b4c2f8d8b3fdaea201740c97ec936529 WHIRLPOOL 38abe56e177e22dad68ac7d6570425ecd763d2e891627a75156a6f39bd7edc54f664c3d2f638e1ea57c743dadc6a8c9889be087abbdb4c98b5641c299f7fbc07 DIST ngx_devel_kit-0.3.0-r1.tar.gz 66455 SHA256 88e05a99a8a7419066f5ae75966fb1efc409bad4522d14986da074554ae61619 SHA512 558764c9be913a4f61d0e277d07bf3c272e1ce086b3fadb85b693a7e92805cd9fca4da7a8d29c96e53fc0d23b331327d3b2561ff61f19d2330e7d5d35ac7d614 WHIRLPOOL 5f6ed4e6850d2ce7e8c65e0570a7e2c74a1fe360e167644ed405fff682ab178b09c722c99c1df9af552fb816219b9fc04dcdf638b3e4af68c688434cdb33aa59 @@ -36,6 +37,7 @@ DIST ngx_http_push_stream-0.5.2.tar.gz 182008 SHA256 1d07f38acdb8194bd49344b0ba2 DIST ngx_http_slowfs_cache-1.10.tar.gz 11809 SHA256 1e81453942e5b0877de1f1f06c56ae82918ea9818255cb935bcb673c95a758a1 SHA512 fbc9609a8d6913aeefe535f206b9e53477503f131934ead2ae5a6169e395af2f5fb54778704824d5eeb22a4ef40a11ebbcde580db62a631f70edcc2cfc06b15d WHIRLPOOL a02ed77422c47d9e476f8746186d19d632ddb953635d8d9dd51ff076225a78044286ee7e114478bc02e4b2a422e4fdc207154fc287629dd2cd7c3f9a634dad18 DIST ngx_http_upload_progress-0.9.2-r1.tar.gz 17268 SHA256 b286689355442657650421d8e8398bd4abf9dbbaade65947bb0cb74a349cc497 SHA512 c31c46344d49704389722325a041b9cd170fa290acefe92cfc572c07f711cd3039de78f28df48ca7dcb79b2e4bbe442580aaaf4d92883fd3a14bf41d66dd9d8c WHIRLPOOL e847603f1445c7e1471a5570e2774a448be880eb71eeb21e27361586bcee9aae31cb0a8a80cd5abfc8d14e2c356fabfa7293e6a4d5f6782d41521a7bdc124066 DIST ngx_http_upstream_check-0.3.0-10-gf3bdb7b.tar.gz 129060 SHA256 9e0835e8c1550033e74c7eaeebf94d41ab1617cff152dd076da976e0eba30bfc SHA512 5b2ae6d305d24d0c64dc118fd3b0c23f5bf0e9a282e70e8d2c4eb946ed510263b5e845f64ca352784e34708cf9d98804cacf64b6c9efd712a395076dd0ba7c29 WHIRLPOOL 8dab8aa1bf3f7c9adbf2952148d76cc627682876b5e64dc789582b573a4b6fa73910043325fc664784b68966bcb1e8ba9ae6bfa457133bde0d52e39b7d3c09e0 +DIST ngx_http_upstream_check-31b1b42873fa56620d8a873ac13f5f26b52d0cd6.tar.gz 130052 SHA256 c7241b15ba20779d8d465dfe05e8e53f9e62b069b4165c9e8001eb795b870ff4 SHA512 e7ea6712c27fd2610e8681b7f687e24c94cd7558d6f19f87568d4c2169115678a61c58b1cd3686a927173b566ff1e10cb1fb767fe63db61f860a77bac9792f9b WHIRLPOOL 932a51c8911053e301a7efa3006bf994622b79f3a9f39c317f33f2243c77dde06c7b8387bf0969943512afe049f0e55c8aad5c89d4fd0f4c84939b20927c52ed DIST ngx_memc_module-0.18.tar.gz 37113 SHA256 4e280d1dcb8b312bc7875604c1e35b17879279126d3d5fbf482aa9cc7c11276d SHA512 8087bd361fb4e522493e66f93d59c9b13245d6eef0fe4a53f619d1826feb02af60769c0a04f87f2faf5308a44b794ef146a445bdbe7cbc7f21c0edaaba08c706 WHIRLPOOL 9570bf7fb4e925d1794f3af0914efca036fe65696e7e380969133b89878e5f46f71cd5ffb7b5ea94085aced26d289abca77d7ef805f03ff614bc12a47d7aab3f DIST ngx_metrics-0.1.1.tar.gz 2964 SHA256 1c62ebb31e3caafad91720962770b0e7a4287f195520cf12471c262ac19b154e SHA512 d36a8fb0104c83b6b564e03b351aa750cab08650264c74d6f786af357bfb7006b531a93270dd961896ea8dafe27e5db8548ede714c5f52c4742876bc73af4b5e WHIRLPOOL 2796f5a97e76dfcc91133240e8e90ba493f0356f781a173d8cacdd09eba64b75ef531db398c0566fda395124700de8c991b771433e376ca0d5898c2ea6f82868 DIST ngx_mogilefs_module-1.0.4.tar.gz 11208 SHA256 7ac230d30907f013dff8d435a118619ea6168aa3714dba62c6962d350c6295ae SHA512 b8cb7eaf6274f4e2247dbcb39db05072d2b2d4361256a325fafab5533d7ce0c4ae9e2905b954dfcfa4789c9cab5cccf2ac1c3a1f02f6a327ed95b562d7773ed1 WHIRLPOOL 64c9b11ad938e6dbe5ba31298f1cd46f6e6bb4ba039c96b1e43bd85919d1606326f74b677f789ecabe0b0f4e0f08ac5aaf8148bf820de65aaa1e9966a28b9f61 @@ -44,6 +46,7 @@ EBUILD nginx-1.12.1.ebuild 37447 SHA256 2477ca64039f20ac1bca067199a20beea17ee7db EBUILD nginx-1.13.3.ebuild 37449 SHA256 32838376e6479d1f23bd1d0f500129df8d6c9bac8306fdf0c78bbc0829fc1ea6 SHA512 0adc9b68fb63bf90773fbc08d9a8c9f358cf447b54ff122f6069ffcf725af9dbf34deefa23fe8b4817044578cf1f47c0ca1857e4208bc30761c45a67ef964fe1 WHIRLPOOL d8548150c12049999f515657a91e645a249ad4eaca51485b8900f9e8bfbc633b08ec3d1e34855a3df2779054474782f531d7097fe78ec2617dc1ed54bf4d3b79 EBUILD nginx-1.13.4.ebuild 36979 SHA256 3bcaaf3a338d9f835a123972ceb5c850d65f4202a344eff387e3585db8e59d6c SHA512 e37db661b34783e2888a1dbb41dc056a4dde164e98679f64d79bea49b8241186cd845429bd025b31787d81a8ba464325955607490335d125529e8c82ff84f381 WHIRLPOOL 39da88134ed266beec030be3504630b22d1d5b8291223b82821ca2dfc0599285f78b682140f003ac93755f79d386b56d8d209ff6d639942deeb07e2d8c539320 EBUILD nginx-1.13.5.ebuild 36986 SHA256 2776b48e3377e64310dd3a27a0a7073c309ef2b6420a02ef7286f7f5dad9c676 SHA512 38717303b8e653edcabcfa080b3afa8188c5f6fed6b7c7f4ee512f05b2c572be99bf1ed91c1ee9b80958103eea1a91192faed3cd7c1d42bb80a02e8370226c4f WHIRLPOOL 339b305c223c2fd7ef7a11d614d871cecec7125c60e322dc4126c04222e7569f2434e2f8b1a0b99fcde72dc25ea623bba74ea195cb5d154270e5825ceacdb991 +EBUILD nginx-1.13.6.ebuild 37000 SHA256 ee6ff2cf5b365059c2f5fe410d33761bc96bada332a07ce9fb687a9634d4c971 SHA512 c235a260e17c68ba15596e79c1b12086aaaeb21a7f179821c20292cb29366c26fa0c31a847ac3792de07bbc60ec9810b03b205c8cd05a76a56e069e67cd1f376 WHIRLPOOL 06531ff19d00a2c8126ac391f3af8c963a725aa20f66c5abc52575178092e44b8fce64ca6e934bf805c121ed1a23b1f3ac9f8211db903f84eb744265ed5de682 MISC ChangeLog 20921 SHA256 6daa8e175ce89e3bcc1d0ce14ca52fd82bda991200624c46830e680614e494d6 SHA512 f3f2d93714c35d1ebc04d9aa2e0b6605334bcae88cc8a58c24eed9d479292d9288801dcbf224144914f8715092be69617b6e4c5fe837eeea87e8d499c4e91366 WHIRLPOOL bbb44c9e3e3e8a7ea93b358054266b593083ce38dbdac404dc54f8fdfdf83ef5ab54b5e3978a0c1597e6ed0a0005f064a271f83c3abc27e4598066efede3c563 MISC ChangeLog-2015 69680 SHA256 10720899590f9065076fca43d949a1fc45b04562b93ca1b47f8bce211bc26a50 SHA512 2c149e4a9a2d37127b9520aa09fe789216a1498d73351b0563c45d8838abdc7788ad3d34ccddfd8b27d7eb386a1344e1726f2ee93a29c886e018057d0ade5546 WHIRLPOOL fcb612cb6854cd2644344220c0fabd8cffeb548008327920eb535986af33c7ad3ae4c31ac57497d9f35bfeabb10cbca1e9897d42009dcfd8a8a7b1dfc0fb9d30 MISC metadata.xml 1484 SHA256 c7ee4adf7c78b790d017b86fcac77615c3e4202e9304957da891b17e530b2f43 SHA512 5d17d3074acd6b5df642ab4f0e70a3db593e0e09198b98dba0c177951abc8e9b9bfc088a0428ad15717d77598cc54e453092f9e6485009373372535c88588aed WHIRLPOOL b27eb87db6471c5314cc9fffce167b09634084061a84e974775137f001b9ef2ad7afe5796e2ad8c87b9c13e8c1e91fb368459bee9db20f481585f09d6eaaf328 diff --git a/www-servers/nginx/nginx-1.13.6.ebuild b/www-servers/nginx/nginx-1.13.6.ebuild new file mode 100644 index 000000000000..f2844ff8505d --- /dev/null +++ b/www-servers/nginx/nginx-1.13.6.ebuild @@ -0,0 +1,1000 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +# Maintainer notes: +# - http_rewrite-independent pcre-support makes sense for matching locations without an actual rewrite +# - any http-module activates the main http-functionality and overrides USE=-http +# - keep the following requirements in mind before adding external modules: +# * alive upstream +# * sane packaging +# * builds cleanly +# * does not need a patch for nginx core +# - TODO: test the google-perftools module (included in vanilla tarball) + +# prevent perl-module from adding automagic perl DEPENDs +GENTOO_DEPEND_ON_PERL="no" + +# devel_kit (https://github.com/simpl/ngx_devel_kit, BSD license) +DEVEL_KIT_MODULE_PV="0.3.0" +DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}-r1" +DEVEL_KIT_MODULE_URI="https://github.com/simpl/ngx_devel_kit/archive/v${DEVEL_KIT_MODULE_PV}.tar.gz" +DEVEL_KIT_MODULE_WD="${WORKDIR}/ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" + +# http_uploadprogress (https://github.com/masterzen/nginx-upload-progress-module, BSD-2 license) +HTTP_UPLOAD_PROGRESS_MODULE_PV="0.9.2" +HTTP_UPLOAD_PROGRESS_MODULE_P="ngx_http_upload_progress-${HTTP_UPLOAD_PROGRESS_MODULE_PV}-r1" +HTTP_UPLOAD_PROGRESS_MODULE_URI="https://github.com/masterzen/nginx-upload-progress-module/archive/v${HTTP_UPLOAD_PROGRESS_MODULE_PV}.tar.gz" +HTTP_UPLOAD_PROGRESS_MODULE_WD="${WORKDIR}/nginx-upload-progress-module-${HTTP_UPLOAD_PROGRESS_MODULE_PV}" + +# http_headers_more (https://github.com/agentzh/headers-more-nginx-module, BSD license) +HTTP_HEADERS_MORE_MODULE_PV="0.32" +HTTP_HEADERS_MORE_MODULE_P="ngx_http_headers_more-${HTTP_HEADERS_MORE_MODULE_PV}" +HTTP_HEADERS_MORE_MODULE_URI="https://github.com/agentzh/headers-more-nginx-module/archive/v${HTTP_HEADERS_MORE_MODULE_PV}.tar.gz" +HTTP_HEADERS_MORE_MODULE_WD="${WORKDIR}/headers-more-nginx-module-${HTTP_HEADERS_MORE_MODULE_PV}" + +# http_cache_purge (http://labs.frickle.com/nginx_ngx_cache_purge/, https://github.com/FRiCKLE/ngx_cache_purge, BSD-2 license) +HTTP_CACHE_PURGE_MODULE_PV="2.3" +HTTP_CACHE_PURGE_MODULE_P="ngx_http_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" +HTTP_CACHE_PURGE_MODULE_URI="http://labs.frickle.com/files/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}.tar.gz" +HTTP_CACHE_PURGE_MODULE_WD="${WORKDIR}/ngx_cache_purge-${HTTP_CACHE_PURGE_MODULE_PV}" + +# http_slowfs_cache (http://labs.frickle.com/nginx_ngx_slowfs_cache/, BSD-2 license) +HTTP_SLOWFS_CACHE_MODULE_PV="1.10" +HTTP_SLOWFS_CACHE_MODULE_P="ngx_http_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" +HTTP_SLOWFS_CACHE_MODULE_URI="http://labs.frickle.com/files/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}.tar.gz" +HTTP_SLOWFS_CACHE_MODULE_WD="${WORKDIR}/ngx_slowfs_cache-${HTTP_SLOWFS_CACHE_MODULE_PV}" + +# http_fancyindex (https://github.com/aperezdc/ngx-fancyindex, BSD license) +HTTP_FANCYINDEX_MODULE_PV="0.4.2" +HTTP_FANCYINDEX_MODULE_P="ngx_http_fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" +HTTP_FANCYINDEX_MODULE_URI="https://github.com/aperezdc/ngx-fancyindex/archive/v${HTTP_FANCYINDEX_MODULE_PV}.tar.gz" +HTTP_FANCYINDEX_MODULE_WD="${WORKDIR}/ngx-fancyindex-${HTTP_FANCYINDEX_MODULE_PV}" + +# http_lua (https://github.com/openresty/lua-nginx-module, BSD license) +HTTP_LUA_MODULE_PV="0.10.10" +HTTP_LUA_MODULE_P="ngx_http_lua-${HTTP_LUA_MODULE_PV}" +HTTP_LUA_MODULE_URI="https://github.com/openresty/lua-nginx-module/archive/v${HTTP_LUA_MODULE_PV}.tar.gz" +HTTP_LUA_MODULE_WD="${WORKDIR}/lua-nginx-module-${HTTP_LUA_MODULE_PV}" + +# http_auth_pam (https://github.com/stogh/ngx_http_auth_pam_module/, http://web.iti.upv.es/~sto/nginx/, BSD-2 license) +HTTP_AUTH_PAM_MODULE_PV="1.5.1" +HTTP_AUTH_PAM_MODULE_P="ngx_http_auth_pam-${HTTP_AUTH_PAM_MODULE_PV}" +HTTP_AUTH_PAM_MODULE_URI="https://github.com/stogh/ngx_http_auth_pam_module/archive/v${HTTP_AUTH_PAM_MODULE_PV}.tar.gz" +HTTP_AUTH_PAM_MODULE_WD="${WORKDIR}/ngx_http_auth_pam_module-${HTTP_AUTH_PAM_MODULE_PV}" + +# http_upstream_check (https://github.com/yaoweibin/nginx_upstream_check_module, BSD license) +HTTP_UPSTREAM_CHECK_MODULE_PV="31b1b42873fa56620d8a873ac13f5f26b52d0cd6" +HTTP_UPSTREAM_CHECK_MODULE_P="ngx_http_upstream_check-${HTTP_UPSTREAM_CHECK_MODULE_PV}" +HTTP_UPSTREAM_CHECK_MODULE_URI="https://github.com/yaoweibin/nginx_upstream_check_module/archive/${HTTP_UPSTREAM_CHECK_MODULE_PV}.tar.gz" +HTTP_UPSTREAM_CHECK_MODULE_WD="${WORKDIR}/nginx_upstream_check_module-${HTTP_UPSTREAM_CHECK_MODULE_PV}" + +# http_metrics (https://github.com/zenops/ngx_metrics, BSD license) +HTTP_METRICS_MODULE_PV="0.1.1" +HTTP_METRICS_MODULE_P="ngx_metrics-${HTTP_METRICS_MODULE_PV}" +HTTP_METRICS_MODULE_URI="https://github.com/madvertise/ngx_metrics/archive/v${HTTP_METRICS_MODULE_PV}.tar.gz" +HTTP_METRICS_MODULE_WD="${WORKDIR}/ngx_metrics-${HTTP_METRICS_MODULE_PV}" + +# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) +HTTP_NAXSI_MODULE_PV="0.55.3" +HTTP_NAXSI_MODULE_P="ngx_http_naxsi-${HTTP_NAXSI_MODULE_PV}" +HTTP_NAXSI_MODULE_URI="https://github.com/nbs-system/naxsi/archive/${HTTP_NAXSI_MODULE_PV}.tar.gz" +HTTP_NAXSI_MODULE_WD="${WORKDIR}/naxsi-${HTTP_NAXSI_MODULE_PV}/naxsi_src" + +# nginx-rtmp-module (https://github.com/arut/nginx-rtmp-module, BSD license) +RTMP_MODULE_PV="1.2.0" +RTMP_MODULE_P="ngx_rtmp-${RTMP_MODULE_PV}" +RTMP_MODULE_URI="https://github.com/arut/nginx-rtmp-module/archive/v${RTMP_MODULE_PV}.tar.gz" +RTMP_MODULE_WD="${WORKDIR}/nginx-rtmp-module-${RTMP_MODULE_PV}" + +# nginx-dav-ext-module (https://github.com/arut/nginx-dav-ext-module, BSD license) +HTTP_DAV_EXT_MODULE_PV="0.1.0" +HTTP_DAV_EXT_MODULE_P="ngx_http_dav_ext-${HTTP_DAV_EXT_MODULE_PV}" +HTTP_DAV_EXT_MODULE_URI="https://github.com/arut/nginx-dav-ext-module/archive/v${HTTP_DAV_EXT_MODULE_PV}.tar.gz" +HTTP_DAV_EXT_MODULE_WD="${WORKDIR}/nginx-dav-ext-module-${HTTP_DAV_EXT_MODULE_PV}" + +# echo-nginx-module (https://github.com/openresty/echo-nginx-module, BSD license) +HTTP_ECHO_MODULE_PV="0.61" +HTTP_ECHO_MODULE_P="ngx_http_echo-${HTTP_ECHO_MODULE_PV}" +HTTP_ECHO_MODULE_URI="https://github.com/openresty/echo-nginx-module/archive/v${HTTP_ECHO_MODULE_PV}.tar.gz" +HTTP_ECHO_MODULE_WD="${WORKDIR}/echo-nginx-module-${HTTP_ECHO_MODULE_PV}" + +# mod_security for nginx (https://modsecurity.org/, Apache-2.0) +# keep the MODULE_P here consistent with upstream to avoid tarball duplication +HTTP_SECURITY_MODULE_PV="2.9.2" +HTTP_SECURITY_MODULE_P="modsecurity-${HTTP_SECURITY_MODULE_PV}" +HTTP_SECURITY_MODULE_URI="https://www.modsecurity.org/tarball/${HTTP_SECURITY_MODULE_PV}/${HTTP_SECURITY_MODULE_P}.tar.gz" +HTTP_SECURITY_MODULE_WD="${WORKDIR}/${HTTP_SECURITY_MODULE_P}" + +# push-stream-module (http://www.nginxpushstream.com, https://github.com/wandenberg/nginx-push-stream-module, GPL-3) +HTTP_PUSH_STREAM_MODULE_PV="0.5.2" +HTTP_PUSH_STREAM_MODULE_P="ngx_http_push_stream-${HTTP_PUSH_STREAM_MODULE_PV}" +HTTP_PUSH_STREAM_MODULE_URI="https://github.com/wandenberg/nginx-push-stream-module/archive/${HTTP_PUSH_STREAM_MODULE_PV}.tar.gz" +HTTP_PUSH_STREAM_MODULE_WD="${WORKDIR}/nginx-push-stream-module-${HTTP_PUSH_STREAM_MODULE_PV}" + +# sticky-module (https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng, BSD-2) +HTTP_STICKY_MODULE_PV="1.2.6-10-g08a395c66e42" +HTTP_STICKY_MODULE_P="nginx_http_sticky_module_ng-${HTTP_STICKY_MODULE_PV}" +HTTP_STICKY_MODULE_URI="https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/get/${HTTP_STICKY_MODULE_PV}.tar.bz2" +HTTP_STICKY_MODULE_WD="${WORKDIR}/nginx-goodies-nginx-sticky-module-ng-08a395c66e42" + +# mogilefs-module (https://github.com/vkholodkov/nginx-mogilefs-module, BSD-2) +HTTP_MOGILEFS_MODULE_PV="1.0.4" +HTTP_MOGILEFS_MODULE_P="ngx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" +HTTP_MOGILEFS_MODULE_URI="https://github.com/vkholodkov/nginx-mogilefs-module/archive/${HTTP_MOGILEFS_MODULE_PV}.tar.gz" +HTTP_MOGILEFS_MODULE_WD="${WORKDIR}/nginx_mogilefs_module-${HTTP_MOGILEFS_MODULE_PV}" + +# memc-module (https://github.com/openresty/memc-nginx-module, BSD-2) +HTTP_MEMC_MODULE_PV="0.18" +HTTP_MEMC_MODULE_P="ngx_memc_module-${HTTP_MEMC_MODULE_PV}" +HTTP_MEMC_MODULE_URI="https://github.com/openresty/memc-nginx-module/archive/v${HTTP_MEMC_MODULE_PV}.tar.gz" +HTTP_MEMC_MODULE_WD="${WORKDIR}/memc-nginx-module-${HTTP_MEMC_MODULE_PV}" + +# nginx-ldap-auth-module (https://github.com/kvspb/nginx-auth-ldap, BSD-2) +HTTP_LDAP_MODULE_PV="49a8b4d28fc4a518563c82e0b52821e5f37db1fc" +HTTP_LDAP_MODULE_P="nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" +HTTP_LDAP_MODULE_URI="https://github.com/kvspb/nginx-auth-ldap/archive/${HTTP_LDAP_MODULE_PV}.tar.gz" +HTTP_LDAP_MODULE_WD="${WORKDIR}/nginx-auth-ldap-${HTTP_LDAP_MODULE_PV}" + +# We handle deps below ourselves +SSL_DEPS_SKIP=1 +AUTOTOOLS_AUTO_DEPEND="no" + +inherit autotools ssl-cert toolchain-funcs perl-module flag-o-matic user systemd versionator multilib + +DESCRIPTION="Robust, small and high performance http and reverse proxy server" +HOMEPAGE="https://nginx.org" +SRC_URI="https://nginx.org/download/${P}.tar.gz + ${DEVEL_KIT_MODULE_URI} -> ${DEVEL_KIT_MODULE_P}.tar.gz + nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) + nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) + nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_MODULE_P}.tar.gz ) + nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) + nginx_modules_http_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) + nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) + nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) + nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) + nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) + nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz ) + rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_MODULE_P}.tar.gz ) + nginx_modules_http_dav_ext? ( ${HTTP_DAV_EXT_MODULE_URI} -> ${HTTP_DAV_EXT_MODULE_P}.tar.gz ) + nginx_modules_http_echo? ( ${HTTP_ECHO_MODULE_URI} -> ${HTTP_ECHO_MODULE_P}.tar.gz ) + nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) + nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) + nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) + nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz ) + nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz ) + nginx_modules_http_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz )" + +LICENSE="BSD-2 BSD SSLeay MIT GPL-2 GPL-2+ + nginx_modules_http_security? ( Apache-2.0 ) + nginx_modules_http_push_stream? ( GPL-3 )" + +SLOT="mainline" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux" + +# Package doesn't provide a real test suite +RESTRICT="test" + +NGINX_MODULES_STD="access auth_basic autoindex browser charset empty_gif + fastcgi geo gzip limit_req limit_conn map memcached mirror proxy + referer rewrite scgi ssi split_clients upstream_hash + upstream_ip_hash upstream_keepalive upstream_least_conn + upstream_zone userid uwsgi" +NGINX_MODULES_OPT="addition auth_request dav degradation flv geoip gunzip + gzip_static image_filter mp4 perl random_index realip secure_link + slice stub_status sub xslt" +NGINX_MODULES_STREAM_STD="access geo limit_conn map return split_clients + upstream_hash upstream_least_conn upstream_zone" +NGINX_MODULES_STREAM_OPT="geoip realip ssl_preread" +NGINX_MODULES_MAIL="imap pop3 smtp" +NGINX_MODULES_3RD=" + http_upload_progress + http_headers_more + http_cache_purge + http_slowfs_cache + http_fancyindex + http_lua + http_auth_pam + http_upstream_check + http_metrics + http_naxsi + http_dav_ext + http_echo + http_security + http_push_stream + http_sticky + http_mogilefs + http_memc + http_auth_ldap" + +IUSE="aio debug +http +http2 +http-cache +ipv6 libatomic libressl luajit +pcre + pcre-jit rtmp selinux ssl threads userland_GNU vim-syntax" + +for mod in $NGINX_MODULES_STD; do + IUSE="${IUSE} +nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_OPT; do + IUSE="${IUSE} nginx_modules_http_${mod}" +done + +for mod in $NGINX_MODULES_STREAM_STD; do + IUSE="${IUSE} nginx_modules_stream_${mod}" +done + +for mod in $NGINX_MODULES_STREAM_OPT; do + IUSE="${IUSE} nginx_modules_stream_${mod}" +done + +for mod in $NGINX_MODULES_MAIL; do + IUSE="${IUSE} nginx_modules_mail_${mod}" +done + +for mod in $NGINX_MODULES_3RD; do + IUSE="${IUSE} nginx_modules_${mod}" +done + +# Add so we can warn users updating about config changes +# @TODO: jbergstroem: remove on next release series +IUSE="${IUSE} nginx_modules_http_spdy" + +CDEPEND=" + pcre? ( dev-libs/libpcre:= ) + pcre-jit? ( dev-libs/libpcre:=[jit] ) + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + http2? ( + !libressl? ( >=dev-libs/openssl-1.0.1c:0= ) + libressl? ( dev-libs/libressl:= ) + ) + http-cache? ( + userland_GNU? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + ) + nginx_modules_http_geoip? ( dev-libs/geoip ) + nginx_modules_http_gunzip? ( sys-libs/zlib ) + nginx_modules_http_gzip? ( sys-libs/zlib ) + nginx_modules_http_gzip_static? ( sys-libs/zlib ) + nginx_modules_http_image_filter? ( media-libs/gd:=[jpeg,png] ) + nginx_modules_http_perl? ( >=dev-lang/perl-5.8:= ) + nginx_modules_http_rewrite? ( dev-libs/libpcre:= ) + nginx_modules_http_secure_link? ( + userland_GNU? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:= ) + ) + ) + nginx_modules_http_xslt? ( dev-libs/libxml2:= dev-libs/libxslt ) + nginx_modules_http_lua? ( !luajit? ( dev-lang/lua:0= ) luajit? ( dev-lang/luajit:2= ) ) + nginx_modules_http_auth_pam? ( virtual/pam ) + nginx_modules_http_metrics? ( dev-libs/yajl:= ) + nginx_modules_http_dav_ext? ( dev-libs/expat ) + nginx_modules_http_security? ( + dev-libs/apr:= + dev-libs/apr-util:= + dev-libs/libxml2:= + net-misc/curl + www-servers/apache + ) + nginx_modules_http_auth_ldap? ( net-nds/openldap[ssl?] )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nginx ) + !www-servers/nginx:0" +DEPEND="${CDEPEND} + nginx_modules_http_security? ( ${AUTOTOOLS_DEPEND} ) + arm? ( dev-libs/libatomic_ops ) + libatomic? ( dev-libs/libatomic_ops )" +PDEPEND="vim-syntax? ( app-vim/nginx-syntax )" + +REQUIRED_USE="pcre-jit? ( pcre ) + nginx_modules_http_lua? ( nginx_modules_http_rewrite ) + nginx_modules_http_naxsi? ( pcre ) + nginx_modules_http_dav_ext? ( nginx_modules_http_dav ) + nginx_modules_http_metrics? ( nginx_modules_http_stub_status ) + nginx_modules_http_security? ( pcre ) + nginx_modules_http_push_stream? ( ssl )" + +pkg_setup() { + NGINX_HOME="/var/lib/nginx" + NGINX_HOME_TMP="${NGINX_HOME}/tmp" + + ebegin "Creating nginx user and group" + enewgroup ${PN} + enewuser ${PN} -1 -1 "${NGINX_HOME}" ${PN} + eend $? + + if use libatomic; then + ewarn "GCC 4.1+ features built-in atomic operations." + ewarn "Using libatomic_ops is only needed if using" + ewarn "a different compiler or a GCC prior to 4.1" + fi + + if [[ -n $NGINX_ADD_MODULES ]]; then + ewarn "You are building custom modules via \$NGINX_ADD_MODULES!" + ewarn "This nginx installation is not supported!" + ewarn "Make sure you can reproduce the bug without those modules" + ewarn "_before_ reporting bugs." + fi + + if use !http; then + ewarn "To actually disable all http-functionality you also have to disable" + ewarn "all nginx http modules." + fi + + if use nginx_modules_http_mogilefs && use threads; then + eerror "mogilefs won't compile with threads support." + eerror "Please disable either flag and try again." + die "Can't compile mogilefs with threads support" + fi +} + +src_prepare() { + eapply "${FILESDIR}/${PN}-1.4.1-fix-perl-install-path.patch" + eapply "${FILESDIR}/${PN}-httpoxy-mitigation-r1.patch" + + if use nginx_modules_http_upstream_check; then + #eapply -p0 "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/check_1.11.1+.patch + eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch + fi + + if use nginx_modules_http_security; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + + eautoreconf + + if use luajit ; then + sed -i \ + -e 's|^\(LUA_PKGNAMES\)=.*|\1="luajit"|' \ + configure || die + fi + + cd "${S}" || die + fi + + if use nginx_modules_http_upload_progress; then + cd "${HTTP_UPLOAD_PROGRESS_MODULE_WD}" || die + eapply "${FILESDIR}"/http_uploadprogress-issue_50-r1.patch + cd "${S}" || die + fi + + find auto/ -type f -print0 | xargs -0 sed -i 's:\&\& make:\&\& \\$(MAKE):' || die + # We have config protection, don't rename etc files + sed -i 's:.default::' auto/install || die + # remove useless files + sed -i -e '/koi-/d' -e '/win-/d' auto/install || die + + # don't install to /etc/nginx/ if not in use + local module + for module in fastcgi scgi uwsgi ; do + if ! use nginx_modules_http_${module}; then + sed -i -e "/${module}/d" auto/install || die + fi + done + + eapply_user +} + +src_configure() { + # mod_security needs to generate nginx/modsecurity/config before including it + if use nginx_modules_http_security; then + cd "${HTTP_SECURITY_MODULE_WD}" || die + + ./configure \ + --enable-standalone-module \ + --disable-mlogc \ + --with-ssdeep=no \ + $(use_enable pcre-jit) \ + $(use_with nginx_modules_http_lua lua) || die "configure failed for mod_security" + + cd "${S}" || die + fi + + local myconf=() http_enabled= mail_enabled= stream_enabled= + + use aio && myconf+=( --with-file-aio ) + use debug && myconf+=( --with-debug ) + use http2 && myconf+=( --with-http_v2_module ) + use libatomic && myconf+=( --with-libatomic ) + use pcre && myconf+=( --with-pcre ) + use pcre-jit && myconf+=( --with-pcre-jit ) + use threads && myconf+=( --with-threads ) + + # HTTP modules + for mod in $NGINX_MODULES_STD; do + if use nginx_modules_http_${mod}; then + http_enabled=1 + else + myconf+=( --without-http_${mod}_module ) + fi + done + + for mod in $NGINX_MODULES_OPT; do + if use nginx_modules_http_${mod}; then + http_enabled=1 + myconf+=( --with-http_${mod}_module ) + fi + done + + if use nginx_modules_http_fastcgi; then + myconf+=( --with-http_realip_module ) + fi + + # third-party modules + if use nginx_modules_http_upload_progress; then + http_enabled=1 + myconf+=( --add-module=${HTTP_UPLOAD_PROGRESS_MODULE_WD} ) + fi + + if use nginx_modules_http_headers_more; then + http_enabled=1 + myconf+=( --add-module=${HTTP_HEADERS_MORE_MODULE_WD} ) + fi + + if use nginx_modules_http_cache_purge; then + http_enabled=1 + myconf+=( --add-module=${HTTP_CACHE_PURGE_MODULE_WD} ) + fi + + if use nginx_modules_http_slowfs_cache; then + http_enabled=1 + myconf+=( --add-module=${HTTP_SLOWFS_CACHE_MODULE_WD} ) + fi + + if use nginx_modules_http_fancyindex; then + http_enabled=1 + myconf+=( --add-module=${HTTP_FANCYINDEX_MODULE_WD} ) + fi + + if use nginx_modules_http_lua; then + http_enabled=1 + if use luajit; then + export LUAJIT_LIB=$(pkg-config --variable libdir luajit) + export LUAJIT_INC=$(pkg-config --variable includedir luajit) + else + export LUA_LIB=$(pkg-config --variable libdir lua) + export LUA_INC=$(pkg-config --variable includedir lua) + fi + myconf+=( --add-module=${DEVEL_KIT_MODULE_WD} ) + myconf+=( --add-module=${HTTP_LUA_MODULE_WD} ) + fi + + if use nginx_modules_http_auth_pam; then + http_enabled=1 + myconf+=( --add-module=${HTTP_AUTH_PAM_MODULE_WD} ) + fi + + if use nginx_modules_http_upstream_check; then + http_enabled=1 + myconf+=( --add-module=${HTTP_UPSTREAM_CHECK_MODULE_WD} ) + fi + + if use nginx_modules_http_metrics; then + http_enabled=1 + myconf+=( --add-module=${HTTP_METRICS_MODULE_WD} ) + fi + + if use nginx_modules_http_naxsi ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_NAXSI_MODULE_WD} ) + fi + + if use rtmp ; then + http_enabled=1 + myconf+=( --add-module=${RTMP_MODULE_WD} ) + fi + + if use nginx_modules_http_dav_ext ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_DAV_EXT_MODULE_WD} ) + fi + + if use nginx_modules_http_echo ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_ECHO_MODULE_WD} ) + fi + + if use nginx_modules_http_security ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_SECURITY_MODULE_WD}/nginx/modsecurity ) + fi + + if use nginx_modules_http_push_stream ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_PUSH_STREAM_MODULE_WD} ) + fi + + if use nginx_modules_http_sticky ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_STICKY_MODULE_WD} ) + fi + + if use nginx_modules_http_mogilefs ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_MOGILEFS_MODULE_WD} ) + fi + + if use nginx_modules_http_memc ; then + http_enabled=1 + myconf+=( --add-module=${HTTP_MEMC_MODULE_WD} ) + fi + + if use nginx_modules_http_auth_ldap; then + http_enabled=1 + myconf+=( --add-module=${HTTP_LDAP_MODULE_WD} ) + fi + + if use http || use http-cache || use http2; then + http_enabled=1 + fi + + if [ $http_enabled ]; then + use http-cache || myconf+=( --without-http-cache ) + use ssl && myconf+=( --with-http_ssl_module ) + else + myconf+=( --without-http --without-http-cache ) + fi + + # Stream modules + for mod in $NGINX_MODULES_STREAM_STD; do + if use nginx_modules_stream_${mod}; then + stream_enabled=1 + else + myconf+=( --without-stream_${mod}_module ) + fi + done + + for mod in $NGINX_MODULES_STREAM_OPT; do + if use nginx_modules_stream_${mod}; then + stream_enabled=1 + myconf+=( --with-stream_${mod}_module ) + fi + done + + if [ $stream_enabled ]; then + myconf+=( --with-stream ) + use ssl && myconf+=( --with-stream_ssl_module ) + fi + + # MAIL modules + for mod in $NGINX_MODULES_MAIL; do + if use nginx_modules_mail_${mod}; then + mail_enabled=1 + else + myconf+=( --without-mail_${mod}_module ) + fi + done + + if [ $mail_enabled ]; then + myconf+=( --with-mail ) + use ssl && myconf+=( --with-mail_ssl_module ) + fi + + # custom modules + for mod in $NGINX_ADD_MODULES; do + myconf+=( --add-module=${mod} ) + done + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + tc-export CC + + if ! use prefix; then + myconf+=( --user=${PN} ) + myconf+=( --group=${PN} ) + fi + + local WITHOUT_IPV6= + if ! use ipv6; then + WITHOUT_IPV6=" -DNGX_HAVE_INET6=0" + fi + + ./configure \ + --prefix="${EPREFIX}"/usr \ + --conf-path="${EPREFIX}"/etc/${PN}/${PN}.conf \ + --error-log-path="${EPREFIX}"/var/log/${PN}/error_log \ + --pid-path="${EPREFIX}"/run/${PN}.pid \ + --lock-path="${EPREFIX}"/run/lock/${PN}.lock \ + --with-cc-opt="-I${EROOT}usr/include${WITHOUT_IPV6}" \ + --with-ld-opt="-L${EROOT}usr/$(get_libdir)" \ + --http-log-path="${EPREFIX}"/var/log/${PN}/access_log \ + --http-client-body-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/client \ + --http-proxy-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/proxy \ + --http-fastcgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/fastcgi \ + --http-scgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/scgi \ + --http-uwsgi-temp-path="${EPREFIX}${NGINX_HOME_TMP}"/uwsgi \ + --with-compat \ + "${myconf[@]}" || die "configure failed" + + # A purely cosmetic change that makes nginx -V more readable. This can be + # good if people outside the gentoo community would troubleshoot and + # question the users setup. + sed -i -e "s|${WORKDIR}|external_module|g" objs/ngx_auto_config.h || die +} + +src_compile() { + use nginx_modules_http_security && emake -C "${HTTP_SECURITY_MODULE_WD}" + + # https://bugs.gentoo.org/286772 + export LANG=C LC_ALL=C + emake LINK="${CC} ${LDFLAGS}" OTHERLDFLAGS="${LDFLAGS}" +} + +src_install() { + emake DESTDIR="${D%/}" install + + cp "${FILESDIR}"/nginx.conf-r2 "${ED}"etc/nginx/nginx.conf || die + + newinitd "${FILESDIR}"/nginx.initd-r4 nginx + newconfd "${FILESDIR}"/nginx.confd nginx + + systemd_newunit "${FILESDIR}"/nginx.service-r1 nginx.service + + doman man/nginx.8 + dodoc CHANGES* README + + # just keepdir. do not copy the default htdocs files (bug #449136) + keepdir /var/www/localhost + rm -rf "${D}"usr/html || die + + # set up a list of directories to keep + local keepdir_list="${NGINX_HOME_TMP}"/client + local module + for module in proxy fastcgi scgi uwsgi; do + use nginx_modules_http_${module} && keepdir_list+=" ${NGINX_HOME_TMP}/${module}" + done + + keepdir /var/log/nginx ${keepdir_list} + + # this solves a problem with SELinux where nginx doesn't see the directories + # as root and tries to create them as nginx + fperms 0750 "${NGINX_HOME_TMP}" + fowners ${PN}:0 "${NGINX_HOME_TMP}" + + fperms 0700 ${keepdir_list} + fowners ${PN}:${PN} ${keepdir_list} + + fperms 0710 /var/log/nginx + fowners 0:${PN} /var/log/nginx + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/nginx.logrotate-r1 nginx + + if use nginx_modules_http_perl; then + cd "${S}"/objs/src/http/modules/perl/ || die + emake DESTDIR="${D}" INSTALLDIRS=vendor + perl_delete_localpod + cd "${S}" || die + fi + + if use nginx_modules_http_cache_purge; then + docinto ${HTTP_CACHE_PURGE_MODULE_P} + dodoc "${HTTP_CACHE_PURGE_MODULE_WD}"/{CHANGES,README.md,TODO.md} + fi + + if use nginx_modules_http_slowfs_cache; then + docinto ${HTTP_SLOWFS_CACHE_MODULE_P} + dodoc "${HTTP_SLOWFS_CACHE_MODULE_WD}"/{CHANGES,README.md} + fi + + if use nginx_modules_http_fancyindex; then + docinto ${HTTP_FANCYINDEX_MODULE_P} + dodoc "${HTTP_FANCYINDEX_MODULE_WD}"/README.rst + fi + + if use nginx_modules_http_lua; then + docinto ${HTTP_LUA_MODULE_P} + dodoc "${HTTP_LUA_MODULE_WD}"/README.markdown + fi + + if use nginx_modules_http_auth_pam; then + docinto ${HTTP_AUTH_PAM_MODULE_P} + dodoc "${HTTP_AUTH_PAM_MODULE_WD}"/{README.md,ChangeLog} + fi + + if use nginx_modules_http_upstream_check; then + docinto ${HTTP_UPSTREAM_CHECK_MODULE_P} + dodoc "${HTTP_UPSTREAM_CHECK_MODULE_WD}"/{README,CHANGES} + fi + + if use nginx_modules_http_naxsi; then + insinto /etc/nginx + doins "${HTTP_NAXSI_MODULE_WD}"/../naxsi_config/naxsi_core.rules + fi + + if use rtmp; then + docinto ${RTMP_MODULE_P} + dodoc "${RTMP_MODULE_WD}"/{AUTHORS,README.md,stat.xsl} + fi + + if use nginx_modules_http_dav_ext; then + docinto ${HTTP_DAV_EXT_MODULE_P} + dodoc "${HTTP_DAV_EXT_MODULE_WD}"/README.rst + fi + + if use nginx_modules_http_echo; then + docinto ${HTTP_ECHO_MODULE_P} + dodoc "${HTTP_ECHO_MODULE_WD}"/README.markdown + fi + + if use nginx_modules_http_security; then + docinto ${HTTP_SECURITY_MODULE_P} + dodoc "${HTTP_SECURITY_MODULE_WD}"/{CHANGES,README.TXT,authors.txt} + fi + + if use nginx_modules_http_push_stream; then + docinto ${HTTP_PUSH_STREAM_MODULE_P} + dodoc "${HTTP_PUSH_STREAM_MODULE_WD}"/{AUTHORS,CHANGELOG.textile,README.textile} + fi + + if use nginx_modules_http_sticky; then + docinto ${HTTP_STICKY_MODULE_P} + dodoc "${HTTP_STICKY_MODULE_WD}"/{README.md,Changelog.txt,docs/sticky.pdf} + fi + + if use nginx_modules_http_memc; then + docinto ${HTTP_MEMC_MODULE_P} + dodoc "${HTTP_MEMC_MODULE_WD}"/README.markdown + fi + + if use nginx_modules_http_auth_ldap; then + docinto ${HTTP_LDAP_MODULE_P} + dodoc "${HTTP_LDAP_MODULE_WD}"/example.conf + fi +} + +pkg_postinst() { + if use ssl; then + if [[ ! -f "${EROOT}"etc/ssl/${PN}/${PN}.key ]]; then + install_cert /etc/ssl/${PN}/${PN} + use prefix || chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/${PN}.{crt,csr,key,pem} + fi + fi + + if use nginx_modules_http_spdy; then + ewarn "" + ewarn "In nginx 1.9.5 the spdy module was superseded by http2." + ewarn "Update your configs and package.use accordingly." + fi + + if use nginx_modules_http_lua; then + ewarn "" + ewarn "While you can build lua 3rd party module against ${P}" + ewarn "the author warns that >=${PN}-1.11.11 is still not an" + ewarn "officially supported target yet. You are on your own." + ewarn "Expect runtime failures, memory leaks and other problems!" + fi + + if use nginx_modules_http_lua && use http2; then + ewarn "" + ewarn "Lua 3rd party module author warns against using ${P} with" + ewarn "NGINX_MODULES_HTTP=\"lua http2\". For more info, see http://git.io/OldLsg" + fi + + local _n_permission_layout_checks=0 + local _has_to_adjust_permissions=0 + local _has_to_show_permission_warning=0 + + # Defaults to 1 to inform people doing a fresh installation + # that we ship modified {scgi,uwsgi,fastcgi}_params files + local _has_to_show_httpoxy_mitigation_notice=1 + + local _replacing_version= + for _replacing_version in ${REPLACING_VERSIONS}; do + _n_permission_layout_checks=$((${_n_permission_layout_checks}+1)) + + if [[ ${_n_permission_layout_checks} -gt 1 ]]; then + # Should never happen: + # Package is abusing slots but doesn't allow multiple parallel installations. + # If we run into this situation it is unsafe to automatically adjust any + # permission... + _has_to_show_permission_warning=1 + + ewarn "Replacing multiple ${PN}' versions is unsupported! " \ + "You will have to adjust permissions on your own." + + break + fi + + local _replacing_version_branch=$(get_version_component_range 1-2 "${_replacing_version}") + debug-print "Updating an existing installation (v${_replacing_version}; branch '${_replacing_version_branch}') ..." + + # Do we need to adjust permissions to fix CVE-2013-0337 (bug #458726, #469094)? + # This was before we introduced multiple nginx versions so we + # do not need to distinguish between stable and mainline + local _need_to_fix_CVE2013_0337=1 + + if version_is_at_least "1.4.1-r2" "${_replacing_version}"; then + # We are updating an installation which should already be fixed + _need_to_fix_CVE2013_0337=0 + debug-print "Skipping CVE-2013-0337 ... existing installation should not be affected!" + else + _has_to_adjust_permissions=1 + debug-print "Need to adjust permissions to fix CVE-2013-0337!" + fi + + # Do we need to inform about HTTPoxy mitigation? + # In repository since commit 8be44f76d4ac02cebcd1e0e6e6284bb72d054b0f + if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then + # Updating from <1.10 + _has_to_show_httpoxy_mitigation_notice=1 + debug-print "Need to inform about HTTPoxy mitigation!" + else + # Updating from >=1.10 + local _fixed_in_pvr= + case "${_replacing_version_branch}" in + "1.10") + _fixed_in_pvr="1.10.1-r2" + ;; + "1.11") + _fixed_in_pvr="1.11.3-r1" + ;; + *) + # This should be any future branch. + # If we run this code it is safe to assume that the user has + # already seen the HTTPoxy mitigation notice because he/she is doing + # an update from previous version where we have already shown + # the warning. Otherwise, we wouldn't hit this code path ... + _fixed_in_pvr= + esac + + if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then + # We are updating an installation where we already informed + # that we are mitigating HTTPoxy per default + _has_to_show_httpoxy_mitigation_notice=0 + debug-print "No need to inform about HTTPoxy mitigation ... information was already shown for existing installation!" + else + _has_to_show_httpoxy_mitigation_notice=1 + debug-print "Need to inform about HTTPoxy mitigation!" + fi + fi + + # Do we need to adjust permissions to fix CVE-2016-1247 (bug #605008)? + # All branches up to 1.11 are affected + local _need_to_fix_CVE2016_1247=1 + + if ! version_is_at_least "1.10" "${_replacing_version_branch}"; then + # Updating from <1.10 + _has_to_adjust_permissions=1 + debug-print "Need to adjust permissions to fix CVE-2016-1247!" + else + # Updating from >=1.10 + local _fixed_in_pvr= + case "${_replacing_version_branch}" in + "1.10") + _fixed_in_pvr="1.10.2-r3" + ;; + "1.11") + _fixed_in_pvr="1.11.6-r1" + ;; + *) + # This should be any future branch. + # If we run this code it is safe to assume that we have already + # adjusted permissions or were never affected because user is + # doing an update from previous version which was safe or did + # the adjustments. Otherwise, we wouldn't hit this code path ... + _fixed_in_pvr= + esac + + if [[ -z "${_fixed_in_pvr}" ]] || version_is_at_least "${_fixed_in_pvr}" "${_replacing_version}"; then + # We are updating an installation which should already be adjusted + # or which was never affected + _need_to_fix_CVE2016_1247=0 + debug-print "Skipping CVE-2016-1247 ... existing installation should not be affected!" + else + _has_to_adjust_permissions=1 + debug-print "Need to adjust permissions to fix CVE-2016-1247!" + fi + fi + done + + if [[ ${_has_to_adjust_permissions} -eq 1 ]]; then + # We do not DIE when chmod/chown commands are failing because + # package is already merged on user's system at this stage + # and we cannot retry without losing the information that + # the existing installation needs to adjust permissions. + # Instead we are going to a show a big warning ... + + if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2013_0337} -eq 1 ]]; then + ewarn "" + ewarn "The world-readable bit (if set) has been removed from the" + ewarn "following directories to mitigate a security bug" + ewarn "(CVE-2013-0337, bug #458726):" + ewarn "" + ewarn " ${EPREFIX%/}/var/log/nginx" + ewarn " ${EPREFIX%/}${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi}" + ewarn "" + ewarn "Check if this is correct for your setup before restarting nginx!" + ewarn "This is a one-time change and will not happen on subsequent updates." + ewarn "Furthermore nginx' temp directories got moved to '${EPREFIX%/}${NGINX_HOME_TMP}'" + chmod o-rwx \ + "${EPREFIX%/}"/var/log/nginx \ + "${EPREFIX%/}"${NGINX_HOME_TMP}/{,client,proxy,fastcgi,scgi,uwsgi} || \ + _has_to_show_permission_warning=1 + fi + + if [[ ${_has_to_show_permission_warning} -eq 0 ]] && [[ ${_need_to_fix_CVE2016_1247} -eq 1 ]]; then + ewarn "" + ewarn "The permissions on the following directory have been reset in" + ewarn "order to mitigate a security bug (CVE-2016-1247, bug #605008):" + ewarn "" + ewarn " ${EPREFIX%/}/var/log/nginx" + ewarn "" + ewarn "Check if this is correct for your setup before restarting nginx!" + ewarn "Also ensure that no other log directory used by any of your" + ewarn "vhost(s) is not writeable for nginx user. Any of your log files" + ewarn "used by nginx can be abused to escalate privileges!" + ewarn "This is a one-time change and will not happen on subsequent updates." + chown 0:nginx "${EPREFIX%/}"/var/log/nginx || _has_to_show_permission_warning=1 + chmod 710 "${EPREFIX%/}"/var/log/nginx || _has_to_show_permission_warning=1 + fi + + if [[ ${_has_to_show_permission_warning} -eq 1 ]]; then + # Should never happen ... + ewarn "" + ewarn "*************************************************************" + ewarn "*************** W A R N I N G ***************" + ewarn "*************************************************************" + ewarn "The one-time only attempt to adjust permissions of the" + ewarn "existing nginx installation failed. Be aware that we will not" + ewarn "try to adjust the same permissions again because now you are" + ewarn "using a nginx version where we expect that the permissions" + ewarn "are already adjusted or that you know what you are doing and" + ewarn "want to keep custom permissions." + ewarn "" + fi + fi + + # Sanity check for CVE-2016-1247 + # Required to warn users who received the warning above and thought + # they could fix it by unmerging and re-merging the package or have + # unmerged a affected installation on purpose in the past leaving + # /var/log/nginx on their system due to keepdir/non-empty folder + # and are now installing the package again. + local _sanity_check_testfile=$(mktemp --dry-run "${EPREFIX%/}"/var/log/nginx/.CVE-2016-1247.XXXXXXXXX) + su -s /bin/sh -c "touch ${_sanity_check_testfile}" nginx >&/dev/null + if [ $? -eq 0 ] ; then + # Cleanup -- no reason to die here! + rm -f "${_sanity_check_testfile}" + + ewarn "" + ewarn "*************************************************************" + ewarn "*************** W A R N I N G ***************" + ewarn "*************************************************************" + ewarn "Looks like your installation is vulnerable to CVE-2016-1247" + ewarn "(bug #605008) because nginx user is able to create files in" + ewarn "" + ewarn " ${EPREFIX%/}/var/log/nginx" + ewarn "" + ewarn "Also ensure that no other log directory used by any of your" + ewarn "vhost(s) is not writeable for nginx user. Any of your log files" + ewarn "used by nginx can be abused to escalate privileges!" + fi + + if [[ ${_has_to_show_httpoxy_mitigation_notice} -eq 1 ]]; then + # HTTPoxy mitigation + ewarn "" + ewarn "This nginx installation comes with a mitigation for the HTTPoxy" + ewarn "vulnerability for FastCGI, SCGI and uWSGI applications by setting" + ewarn "the HTTP_PROXY parameter to an empty string per default when you" + ewarn "are sourcing one of the default" + ewarn "" + ewarn " - 'fastcgi_params' or 'fastcgi.conf'" + ewarn " - 'scgi_params'" + ewarn " - 'uwsgi_params'" + ewarn "" + ewarn "files in your server block(s)." + ewarn "" + ewarn "If this is causing any problems for you make sure that you are sourcing the" + ewarn "default parameters _before_ you set your own values." + ewarn "If you are relying on user-supplied proxy values you have to remove the" + ewarn "correlating lines from the file(s) mentioned above." + ewarn "" + fi +} diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 1280937c7b60..9d9dedcc8655 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -2,8 +2,10 @@ AUX tomcat-7.0.79-build.xml.patch 5271 SHA256 e680116c918918aafdec9dd7d022c9d8bf AUX tomcat-7.0.81-build.xml.patch 5271 SHA256 e680116c918918aafdec9dd7d022c9d8bfca63f7b0b19904c8ab2c92bc61e1b8 SHA512 160c0117e89a2ef5caae95004b426d155c64e19e6c708a9cc11a53308cba037799a60e4f901c3a5bb5af2d2ca8452246d7dd66283b91fad4a339004026148fe4 WHIRLPOOL 6a04f539b5c5798f8014b1e044eec682c61deac904fd1c9cb5d859c12c89f9191ac4a904f68644ecba1ccbd01f9c668540811f35bacf03415d81175c79109116 AUX tomcat-8.0.45-build.xml.patch 10753 SHA256 e1d6ca8eb6cbdb172d8d99d6d4d95b2d72d5f0d7275db80589e39fbb6fb60993 SHA512 205d25cc93712f255021bed6d544a3a5a71fb7367756851b71fdb59696368eab6960085e9abe9337699359cd3ddc55c595e1242bac8675a3f6a666aaf4e7c351 WHIRLPOOL 4e658dd4bc8d5719ee5a26136055f970e74906358989619397b7cb94e34c80c800d3c357dd60a4c7be2d035b490472bfd9f426177cbefe8f57d7bd32a58a7f49 AUX tomcat-8.0.46-build.xml.patch 10753 SHA256 e1d6ca8eb6cbdb172d8d99d6d4d95b2d72d5f0d7275db80589e39fbb6fb60993 SHA512 205d25cc93712f255021bed6d544a3a5a71fb7367756851b71fdb59696368eab6960085e9abe9337699359cd3ddc55c595e1242bac8675a3f6a666aaf4e7c351 WHIRLPOOL 4e658dd4bc8d5719ee5a26136055f970e74906358989619397b7cb94e34c80c800d3c357dd60a4c7be2d035b490472bfd9f426177cbefe8f57d7bd32a58a7f49 +AUX tomcat-8.0.47-build.xml.patch 10703 SHA256 10984417cbee6b878839a8d6a5224e27616aa90f8ec1a5a029e11239a970d937 SHA512 ffea8c47e066573571050130f1c6fd03e18af872f814d9bb23c1f0866ae8184039828500c1fd7d5c8186a47625baa3c9db3653608e31d19fc110129d32262001 WHIRLPOOL e0dc2715ee8e167115f7d3ce5574b0e15515e411c31f2965dbf5e3f4a3fd37ce1bfdb93014174dbd1d23ad9fd65b71d5b5d5728a779c44468558ec752cd58ee0 AUX tomcat-8.5.20-build.xml.patch 10369 SHA256 73f7cbe2f8ab48308cba515b209b4f9fa29803e93e1c980e0385355736cb100c SHA512 571e53427840be6c5a20b94239f7288c3b276190f8d4cf7a33a3b67c54cf9879f0a810c7a09abc4712228c21366bf83642c984234e472fb7a6c6bcc0faba66a0 WHIRLPOOL e5dc309194fe0f5f8c60dae438a64317925195c52ac484bfad79fb7011a9e54cb65931062bdfb5a951fec4b6a8f00f40432dc9df41624d02e83bd3cef91f9e4b -AUX tomcat-9.0.0_alpha26-build.xml.patch 10381 SHA256 edea97610d66367e66b6562b28773eda4ae45dfd3266769e3f0f1358231a87f8 SHA512 89a3413671b6b1446fd203798124395d12c50ced414fe773aa511bff4b147e3167694f11ec94da69494ad7bafcc182c7da7b38f5ed81af2477b9d3bfb7dab4b2 WHIRLPOOL fbdd8bb8ffad81849d6bba057cdd77bd4e09a22cdf12e241de26338051228df0e268509e7524f05fc3e262b0e24a484db2125b1210e59db0f68270f53acce83b +AUX tomcat-8.5.23-build.xml.patch 10323 SHA256 58e11d7538e48507503eb7256b9e05bbb48d48740e8f9a6a05dfe8e496ef7c87 SHA512 1d322b74acb363310566d6f5c35f83326c6504a8a75721f24536db0d650104765d6402f454843c38f816eb8f290ccd0273b559116ea62df433bd59a38ec29b72 WHIRLPOOL 29f053fcf35585e7c3a90b352fb4ffc489515bfb74db5f4905de7797518f1fce2f076f26ab4fcec632fc4333f5636b3723e4afe6c3b5c64a8bff24eff0f4a5be +AUX tomcat-9.0.1_beta-build.xml.patch 10319 SHA256 c2d296495529774fbb143fc5cef93c828ed17e45637b72905c17142eb6d37211 SHA512 cdfd3c04b1f4014d44be7d6af40bcc959120af78d4a1976ec17434da72fd514e4c4c18b9e21e1e67134db74c2465f51094cf5962da4807a6e8ac2086564fcbfb WHIRLPOOL a0d1b2317c9c44f0225e71e8a3d88a0a6b3d84c0973c0e2814ed61e18754109e903b24c538fd3ade1d34f1ea852745305918ef50ecd0b58eadc7e99ce807a817 AUX tomcat-instance-manager-r1.bash 6451 SHA256 28990e664007e6eab91d1f90f58009457f683c4c9d37ef78f9065b4b6c87add2 SHA512 3c8f994519d1ca5ff24229798786ad3d75dd20dbf8b3b81f6c0ccd121b978d2cb12633270f463a39ed5c4097e5869b1a4bfbf867994a64c5e41916e378038570 WHIRLPOOL 3be20ac95b1b2e80d62cecbd5e47d0b7c768e78ec38c5ec5661e4d563962196eb45fae82d54349a9202323f5a464ac922930b1b01e197ed6e83f03a3d38f79af AUX tomcat-instance-manager-r2.bash 6999 SHA256 cdd0465eac2ba108f4b10dec6331c1660b2bdaa5d379cd2964b3c6118646fe1b SHA512 c30c156cbf2b53cf8498288bacaedd48872dce52f461ff32071310b438bdb5015c1cd1d512a2905c4db01e2b22342590e1b8aeadbd44f29062606fabbb2f2fed WHIRLPOOL 468db420f25653111bd20fa49df780187fa117661d5d884f5e1a5f010b22208bea295ec1d7b15b6d6b1cf777334a1e5ab1b6bc133e654837f4ce51266a03d0fb AUX tomcat-r1.init 3200 SHA256 dda32538287e0075e10857b1e60b0be5b5c8db55849fda753d39ed346c808377 SHA512 3d32e2ad998adfbaea5fe0ffcbbe6659dcb530a110faed5f2712ae2fd767353b1fc3f1ac83a24d43138c1bfc55949e645833a428ab982be14415887fc46d9fab WHIRLPOOL 4281ce1b7e05f19ebb47ae27eb4ed07fca535617122326ddbb0a8ed69121bac30c33a247681157620c7f8b536adda5cd7b611a23b98bfda326f080815cd38a27 @@ -12,14 +14,18 @@ DIST apache-tomcat-7.0.79-src.tar.gz 4682119 SHA256 b5373951afe41ffd27348bb57cff DIST apache-tomcat-7.0.81-src.tar.gz 4689428 SHA256 fca79afb210cfbc8f9ebcdebdd048ecb7ea370ac0f94040cbcc0287fe5d85e66 SHA512 25e237aa7189cf9a9617badf8936fd7ec64550bcac3bab2e2afe51d5e199eddfe17e0d6d27ac7ebf3543d1601467fcd8362ddf9a5b708c50b223d7c8d18bbb3b WHIRLPOOL 1016a02b4a30b7e02eb2f7fad3080153012dd3e3f84df34d006c89bc2c89b7b3d370334800170008482d3dbf339c62f249064eb48ab24ca17588026ba515d487 DIST apache-tomcat-8.0.45-src.tar.gz 4978313 SHA256 450fd2890b12e56692cb203f95651f9a873dce056b7b4362e142bc817032b291 SHA512 80e4281f5b6e4d6bf607179840bc6cb923ea9f57ec8231a451c3b5a1f8938f72ec1097290059afba0ef7b56edeb56d63636849517b69b91c7093cb15ff0eaa04 WHIRLPOOL c893cd5c26637f8881c19353e269145e33fa11e02eb10ef93a41590ad2e1e6c6ffa1b3f6c3c7c318630765f666be07447fd3a21c70c2c381e75c458b60383ea0 DIST apache-tomcat-8.0.46-src.tar.gz 4985079 SHA256 b5b9e560b3f75dd68b3103915c754ac47cf526f26f18cd6e9baba9580be25161 SHA512 9adbea9faf61f782ede1c657e833dea55ad1b4a874a1eb9801eab82ac9999de847e7f08ff7a49b3389b9d0683d185c6d4981f9f8d2f607f68c077a682af508d5 WHIRLPOOL eafb2768555261836b04f12f95ba2755d2a7ef98754a5a009099e377220dff1251c6ad1cbe672764787c485b3f922bf1fda8db663890db36e356e7a5139b83e9 +DIST apache-tomcat-8.0.47-src.tar.gz 4996505 SHA256 a2e34a707f1d2ab03aae194db2aed7aa525e62ee3cd648e7058bee49ac1b578c SHA512 135de73b8ca7d4003fcecc19a17a8a86ab85fc1054e89638d26e57263249438d8e8aebfca0a2791eaec2bc835baa57e6a05b60e11595aa373fdc03e278b31702 WHIRLPOOL 7add2b564ca9dfac647cd8338ef90229dd61e97d2ad7420f883c98b62760952904ad170f72029153da592a6f2c8c003d7229b4b32a1e870b6e7c2c99d34566c8 DIST apache-tomcat-8.5.20-src.tar.gz 5063310 SHA256 6bc40ae61b77906325bf8bdb2b0767aeb96f4c5a7a9b618aa496db59387d6610 SHA512 dea3095792de76a3a56bd6fd6c9ed5702ca539856d0e07a5de2600f456e7255929d14748a2dc9b3c626b3a67aaac8795ef3f5a6a1351991a0e89443e0c9d0807 WHIRLPOOL 1924f12c5068574424587d5b8b7261efb7496dbc53915d8cb2558b4a643aedecc98823ac7dec238fe7cb1a1874734e05de2dc6b7b28e48ffdae9e8c5c586e895 -DIST apache-tomcat-9.0.0.M26-src.tar.gz 5011957 SHA256 02ba2c9a3a2d78994fc14f2b304c3b3f46615538a48a9193e475b08565cb9b7e SHA512 8c25932aa244edb46eee26aa837636e78c8104ca6617cb5ba924e0e45c2f9dbcd7d196ddf69ee2f1c1b6053dda818a3b92f8f46c156f3048c46cee919fc22c13 WHIRLPOOL 11e00a6e6a5822bd4e357e375b026dd732bf33319e30dde25f11bc1b99994617be3ce6d4976870f725e56646e5ffee92acb6fc23f46b53a46ebbf6c53707ea07 +DIST apache-tomcat-8.5.23-src.tar.gz 5086043 SHA256 eaaf35752841356dec976fa6250cd71680b8b5b9c0bdf4df9a86ac38630bcbd4 SHA512 2848331553f2c1bc51a4113960c6fe7e2beddf9146341dbfde1a27e2232802cfc364c8e8b988ae862371ca1a3be34665a56a28be9eadf80f8b317e0e2525cbef WHIRLPOOL 77b35de4ede2beecab71dcd7c5494bded1516deac4b5c2cbd2f48e1ae728cfa41f4193369bd464946869e9ba4565c0e6f1c7ad57578459d3be67159ea8cd9a64 +DIST apache-tomcat-9.0.1-src.tar.gz 5029499 SHA256 f4da8ef7a03dd7280a9a4b6c66cc9bd34dddc6429c33d9db1a8acfc1596c4e90 SHA512 6116b05f448c24e691c4b56372a41cfd8900adc5e759f2f5026c808de48d65705763236fca46f69321d351f37f5dbc7aa49db8c097b8a3155e367fe21aa0d384 WHIRLPOOL 2e0f05001b9f0d57a241db8ddf0212d3adce2c1b829a03318b5cc1b5a250ae32a50d801e23d9b6a2943c208a478dd00d1f5ae07d1c3c736fbf059554a40caf66 EBUILD tomcat-7.0.79.ebuild 4277 SHA256 6fe27e4ad83139012dfc38a223f41fa92386d11444e2e661ca3aecc3bcbde66d SHA512 587c011ceac66d3f8cd7789ce891c9ccf9cfed8a8dcbddf8a2b62db48f5f481c6406ceb1645a1288fa07892409ddbb255b45f8c3edadb8eda55e4bce53800dfc WHIRLPOOL 5da2e08c809c4d73dedd1feab499420434db0b4493e885a662cadecaca91059d328cc59b39ef2edb867cc783f70d3c72e69790a381fc44da6f12323d99a6cc44 EBUILD tomcat-7.0.81.ebuild 4278 SHA256 2564c796b7c24c58dcf6f76c98a4ece41668427d198303b51189cbf4afd592bb SHA512 c09066b72cefed346687999a52f7243a1fd050ecef0cbd8bd0dc6d5f5f758ff815fd4eb0009c5ea3591b792a90a20010a4b0517fbc504a320f06b97834d59404 WHIRLPOOL 428304d9afe8c9f8f781cd31f64bdb502b1f9561b06d7c0cab9671d345df57b61b5f06f6d5bebf58271031cee2314aaa3956d56ba7a8a6bcf88a314c7a50208a EBUILD tomcat-8.0.45.ebuild 4469 SHA256 018b246f0f044399fa8f54111f824e055110bbcbec3a2a025298c228b635836a SHA512 71536b2dc1d12ccc4c5756014ffe78b4849cf237405c21c667a2484106962a3be05a9299723b30b611f552c8f9315c1542e3ea1ea6ae9eb4f8b3b42817fe6e14 WHIRLPOOL 06876a98afabcbf64d988738eb9172d0545f97f2cca24f5f04f18c29c4d6e7dcb9057d429f6c658a5a06f6d3f6697d0447c8286e71e5cd049766f4cde1078a2c -EBUILD tomcat-8.0.46.ebuild 4472 SHA256 1730ca77b5ada123b193b4a0cd23c409efdcfe0fcf847160ad7eb9165390870c SHA512 6eb897fb6fd1692b778bb8c80ea2e879690aee6d12af0db1b1dbd3a8fbdb01443af9e404694a35613a3be68e53ecbe5b259cc06feeee94c10d8460495d36c620 WHIRLPOOL 0feb0864162ab3a5c246a7aeb1fa313a42af3e6df7ee803f2bfd1154aa5a464f1c5d7f54d048d8346862e0e59f62ffc559b6af2901852512efa5c79959f87d93 +EBUILD tomcat-8.0.46.ebuild 4471 SHA256 82d5b04ffe2da0c759191927680cd957fc13f43f93102932fb6d47a50d0abc18 SHA512 e97bc0a73e8a1384c30915d42e1cfcfa4431ae63dccf85b997c30333a464b3042ec5aee48678c2dbcb045d30532d7aa17ec00ecff14f0d8d7caeaeff9cd3f5b2 WHIRLPOOL 030fcb6a46a5235bae11331c1df56bdfe0407c71d205023d0f2ebfb373eec76116e4bea5a6f1f539bc93657224510b6c6d94231cba0a4046b7d11df1d5407e1d +EBUILD tomcat-8.0.47.ebuild 4472 SHA256 1730ca77b5ada123b193b4a0cd23c409efdcfe0fcf847160ad7eb9165390870c SHA512 6eb897fb6fd1692b778bb8c80ea2e879690aee6d12af0db1b1dbd3a8fbdb01443af9e404694a35613a3be68e53ecbe5b259cc06feeee94c10d8460495d36c620 WHIRLPOOL 0feb0864162ab3a5c246a7aeb1fa313a42af3e6df7ee803f2bfd1154aa5a464f1c5d7f54d048d8346862e0e59f62ffc559b6af2901852512efa5c79959f87d93 EBUILD tomcat-8.5.20.ebuild 4493 SHA256 6676d000efae3a0cbda2cd292f39777355a50bcd17c42df67540b806cac37b69 SHA512 a66ec0c604c03d3cb4f3c411153ee828edadc74be3779a4860db47b0c51d5e20d8747846117f823f0ce1d5a97ae85e410e6d37a97a25cd0a18ac032946ece344 WHIRLPOOL 2a95579aae815556c51dd931885f113b72bf7865be5807cb976030415709f491c7bfee4a0ebde9fcb077cdfc12f48a542d1ce1302dcda78f8175c5268d7f60cf -EBUILD tomcat-9.0.0_alpha26.ebuild 4529 SHA256 e0a0f85ec6a225faa2b340358390bf12627e729823a19f49fe9917751ca71fc5 SHA512 404e670d0387a392dc28b79efaa630f5885c16baa83225e227a29b0f0f73abb5546347d73c80f3b28a96bdea43de2e5d0c9b6cf03bf474025dbbb0a4b9f6eece WHIRLPOOL 1c23029392c630909649f6fbfadc1ee138bd915f1498bb021dce53d840ca280df2c9207272fc964db456950cdbd23eb43296c06ae074c99bdf384f3e15a52310 +EBUILD tomcat-8.5.23.ebuild 4520 SHA256 bb23067433f566b429ebd54da35f7508bed1b8a8bd3565d12166f1424a434ddb SHA512 2c50bbd367df38f7214d3bb04606e5a5f10f68a2d305a939477f2686d26ff4b9596dd4703a9979179919ad9ee9f034db2dc7dff5d0fba0c0b75b00abe6c3c918 WHIRLPOOL 6e2bb7b4b5db2089b17935f30ca6004a43c3cebf4a0ccb389f0e800f8d19210560cd9fe290441abd824ebf073c336c26e1e6e4406d5b257f7bf0b11761693872 +EBUILD tomcat-9.0.1_beta.ebuild 4526 SHA256 7889045f013d59737195eacaef638eb104389ea23f169eeedec95cfb69fe0fc7 SHA512 3e2de06a64f56d72999eb75834c7905e7b9cf80d750843a404990de21b2a3b5a19a0e9bcee261abebc5e85a777070892a4764b49ad9af12900d88ff06ddc317d WHIRLPOOL 4602822e1b25247bc613693016d405926b71fa6737024ab1e6ae509b65d45cb9072af836d50d2303f6855134a3567204a9ddf9dc7bd041a0910f376b6f038f66 MISC ChangeLog 23709 SHA256 69787b6934873b8d5181a4adabbae3837afd2b90ba9a1d97f05f1e237b689ec1 SHA512 95ca8b3a20e2d2a4e7faafb21aa172e2a9f2440d74a8e68c155b161912ae1cd480e522cf36c58356fe81a26ca9b07078654fd41b1f69ff3020a75465e4ad7895 WHIRLPOOL db15e61ff1f3856b4ee873a0bdedb0bba4ead6bd3cdf849a6f479166ad0c361208767fdcb448791a764f87515dc3b52a92aac23c34540ab0992dd8130455e129 MISC ChangeLog-2015 86707 SHA256 573994c7c1bfb96c06a98636b5268a15ce73043b6903916365143eedc73b712b SHA512 d9c8bb2023377860f30ff0c9dbd83393c4569729cdc75506da6c7bdb320d69bb3ed65835746429ec73de02c683cf7bb7e667883ea7c6bd9ded17eeeec80ef071 WHIRLPOOL ccf7e8088ca9502b6dab16f12b804a314e62abfa95a2a0e734df0d805fb4c5fbaff6b72c922e6c5d58b8109d85d942f05ce1c52693bbdc3fc9041c21fdbe19cb MISC metadata.xml 735 SHA256 92d90d5e0f4ea5092c910632a7281ac937789b7da4860aa23c1d6cde68ea270c SHA512 f1f9894fadd399aa791d4b6befa1366ef2be350ff28bdfb9e24c9ff03de4f01c016c654dbd3b5bd23d0580d8515a3866a645aff0357ff37a177abfefe27158a6 WHIRLPOOL 3ae0d573a611a706342d9473584c840aa50710f2f76bd6785884f59789883aa65884eac137294bd5e27adba27e713c11f2dc976e383605de4560fc054d63245a diff --git a/www-servers/tomcat/files/tomcat-8.0.47-build.xml.patch b/www-servers/tomcat/files/tomcat-8.0.47-build.xml.patch new file mode 100644 index 000000000000..b0862aef305e --- /dev/null +++ b/www-servers/tomcat/files/tomcat-8.0.47-build.xml.patch @@ -0,0 +1,258 @@ +diff --git a/apache-tomcat-8.0.47-src/build.xml b/apache-tomcat-8.0.47-src/build.xml +index 6b4465a..ab4008d 100644 +--- a/apache-tomcat-8.0.47-src/build.xml ++++ b/apache-tomcat-8.0.47-src/build.xml +@@ -715,24 +715,29 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + ++ + ++ + + ++ + + + +- ++ + + + +@@ -1067,7 +1072,7 @@ + + + +- ++ + + + +@@ -1101,7 +1106,7 @@ + + + +- ++ + + + + + +- ++ + + + + ++ + + + + + + ++ + + + +@@ -2781,7 +2792,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download (and build) components necessary to compile" unless="noget"> + + + +@@ -2815,7 +2826,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for the tests" unless="noget"> + + + +@@ -2872,7 +2883,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for a distribution" unless="noget"> + + + +@@ -2898,18 +2909,18 @@ skip.installer property in build.properties" /> + + + +- ++ + + + + +- ++ + + + + +- ++ + + + +@@ -2921,7 +2932,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2940,7 +2951,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2951,7 +2962,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2969,7 +2980,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2979,7 +2990,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3002,7 +3013,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3013,7 +3024,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -3024,7 +3035,7 @@ skip.installer property in build.properties" /> + + ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + + diff --git a/www-servers/tomcat/files/tomcat-8.5.23-build.xml.patch b/www-servers/tomcat/files/tomcat-8.5.23-build.xml.patch new file mode 100644 index 000000000000..d83440c0c4d6 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-8.5.23-build.xml.patch @@ -0,0 +1,249 @@ +diff --git a/apache-tomcat-8.5.23-src/build.xml b/apache-tomcat-8.5.23-src/build.xml +index b1b2666..263800c 100644 +--- a/apache-tomcat-8.5.23-src/build.xml ++++ b/apache-tomcat-8.5.23-src/build.xml +@@ -714,24 +714,29 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + ++ + ++ + + ++ + + + +- ++ + + + +@@ -1072,7 +1077,7 @@ + + + +- ++ + + + +@@ -1106,7 +1111,7 @@ + + + +- ++ + + + + + +- ++ + + + + ++ + + + + + + ++ + + + +@@ -2607,7 +2618,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download (and build) components necessary to compile" unless="noget"> + + + +@@ -2641,7 +2652,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for the tests" unless="noget"> + + + +@@ -2698,7 +2709,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for a distribution" unless="noget"> + + + +@@ -2724,18 +2735,18 @@ skip.installer property in build.properties" /> + + + +- ++ + + + + +- ++ + + + + +- ++ + + + +@@ -2747,7 +2758,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2766,7 +2777,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2777,7 +2788,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2795,7 +2806,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2805,7 +2816,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2828,7 +2839,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2839,7 +2850,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2850,7 +2861,7 @@ skip.installer property in build.properties" /> + + ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + + diff --git a/www-servers/tomcat/files/tomcat-9.0.1_beta-build.xml.patch b/www-servers/tomcat/files/tomcat-9.0.1_beta-build.xml.patch new file mode 100644 index 000000000000..3f55c285e230 --- /dev/null +++ b/www-servers/tomcat/files/tomcat-9.0.1_beta-build.xml.patch @@ -0,0 +1,249 @@ +diff --git a/apache-tomcat-9.0.1-src/build.xml b/apache-tomcat-9.0.1-src/build.xml +index aa29b28..a9ac6bd 100644 +--- a/apache-tomcat-9.0.1-src/build.xml ++++ b/apache-tomcat-9.0.1-src/build.xml +@@ -715,24 +715,30 @@ + manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> + + ++ + + ++ + + ++ + + + +- ++ + + + +@@ -1073,7 +1079,7 @@ + + + +- ++ + + + +@@ -1107,7 +1113,7 @@ + + + +- ++ + + + + + +- ++ + + + + ++ + + + + + + ++ + + + +@@ -2608,7 +2620,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download (and build) components necessary to compile" unless="noget"> + + + +@@ -2642,7 +2654,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for the tests" unless="noget"> + + + +@@ -2699,7 +2711,7 @@ skip.installer property in build.properties" /> + + + ++ description="Download additional components for a distribution" unless="noget"> + + + +@@ -2725,18 +2737,18 @@ skip.installer property in build.properties" /> + + + +- ++ + + + + +- ++ + + + + +- ++ + + + +@@ -2748,7 +2760,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2767,7 +2779,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2778,7 +2790,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2796,7 +2808,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2806,7 +2818,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2829,7 +2841,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2840,7 +2852,7 @@ skip.installer property in build.properties" /> + + + +- ++ + + + +@@ -2851,7 +2863,7 @@ skip.installer property in build.properties" /> + + ++ description="Prepares the source tree to be built in Eclipse" unless="noget"> + + + diff --git a/www-servers/tomcat/tomcat-8.0.46.ebuild b/www-servers/tomcat/tomcat-8.0.46.ebuild index 424ec1de47d9..0275eef00644 100644 --- a/www-servers/tomcat/tomcat-8.0.46.ebuild +++ b/www-servers/tomcat/tomcat-8.0.46.ebuild @@ -15,7 +15,7 @@ SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" LICENSE="Apache-2.0" SLOT="8" -KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +KEYWORDS="amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" IUSE="extra-webapps" RESTRICT="test" # can we run them on a production system? diff --git a/www-servers/tomcat/tomcat-8.0.47.ebuild b/www-servers/tomcat/tomcat-8.0.47.ebuild new file mode 100644 index 000000000000..424ec1de47d9 --- /dev/null +++ b/www-servers/tomcat/tomcat-8.0.47.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="8" +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.1" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/tomcat-servlet-api:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + !=virtual/jre-1.7" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=virtual/jdk-1.7 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw="$(pwgen -s -B 15 1)" + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tomcat/tomcat-8.5.23.ebuild b/www-servers/tomcat/tomcat-8.5.23.ebuild new file mode 100644 index 000000000000..b00d9e34c116 --- /dev/null +++ b/www-servers/tomcat/tomcat-8.5.23.ebuild @@ -0,0 +1,157 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="8.5" +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="3.1" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + >=dev-java/tomcat-servlet-api-${SLOT}:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + !=virtual/jre-1.7" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=virtual/jdk-1.7 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dexecute.validate=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw="$(pwgen -s -B 15 1)" + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} diff --git a/www-servers/tomcat/tomcat-9.0.1_beta.ebuild b/www-servers/tomcat/tomcat-9.0.1_beta.ebuild new file mode 100644 index 000000000000..4fc6821dab5a --- /dev/null +++ b/www-servers/tomcat/tomcat-9.0.1_beta.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_PV="${PV/_beta/}" +MY_P="apache-${PN}-${MY_PV}-src" + +DESCRIPTION="Tomcat Servlet-4.0/JSP-2.4?/EL-3.1?/WebSocket-1.2?/JASPIC-1.1 Container" +HOMEPAGE="http://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-9/v${MY_PV}/src/${MY_P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="9" +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.5" +SAPI_SLOT="4.0" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + =dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + !=virtual/jre-1.8" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=virtual/jdk-1.8 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + java-pkg-2_pkg_setup + enewgroup tomcat 265 + enewuser tomcat 265 -1 /dev/null tomcat +} + +src_prepare() { + default + + find -name '*.jar' -type f -delete -print || die + + # Remove bundled servlet-api + rm -rv java/javax/{el,servlet} || die + + epatch "${FILESDIR}/${P}-build.xml.patch" + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die + + java-pkg-2_src_prepare +} + +JAVA_ANT_REWRITE_CLASSPATH="true" + +EANT_BUILD_TARGET="deploy" +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" +EANT_NEEDS_TOOLS="true" +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" + java-pkg-2_src_compile +} + +src_test() { + java-pkg-2_src_test +} + +src_install() { + local dest="/usr/share/${PN}-${SLOT}" + + java-pkg_jarinto "${dest}"/bin + java-pkg_dojar output/build/bin/*.jar + exeinto "${dest}"/bin + doexe output/build/bin/*.sh + + java-pkg_jarinto "${dest}"/lib + java-pkg_dojar output/build/lib/*.jar + + dodoc RELEASE-NOTES RUNNING.txt + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api + use source && java-pkg_dosrc java/* + + ### Webapps ### + + # add missing docBase + local apps="host-manager manager" + for app in ${apps}; do + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ + output/build/webapps/${app}/META-INF/context.xml || die + done + + insinto "${dest}"/webapps + doins -r output/build/webapps/{host-manager,manager,ROOT} + use extra-webapps && doins -r output/build/webapps/{docs,examples} + + ### Config ### + + # create "logs" directory in $CATALINA_BASE + # and set correct perms, see #458890 + dodir "${dest}"/logs + fperms 0750 "${dest}"/logs + + # replace the default pw with a random one, see #92281 + local randpw="$(pwgen -s -B 15 1)" + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die + + # prepend gentoo.classpath to common.loader, see #453212 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die + + insinto "${dest}" + doins -r output/build/conf + + ### rc ### + + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die + + insinto "${dest}"/gentoo + doins "${T}"/tomcat.conf + exeinto "${dest}"/gentoo + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash +} + +pkg_postinst() { + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" + + elog "To manage Tomcat instances, run:" + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" + ewarn "from upstream binary if you need it. Gentoo Bug # 144276" + +# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." +} -- cgit v1.2.3