From deba8115d2c2af26df42966b91ef04ff4dd79cde Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 14 May 2020 11:09:11 +0100 Subject: gentoo resync : 14.05.2020 --- www-servers/Manifest.gz | Bin 5210 -> 5206 bytes www-servers/cherokee/Manifest | 2 +- www-servers/cherokee/cherokee-1.2.104-r1.ebuild | 196 ---- www-servers/cherokee/cherokee-1.2.104-r2.ebuild | 196 ++++ www-servers/h2o/Manifest | 4 +- www-servers/h2o/h2o-2.2.5.ebuild | 106 -- www-servers/h2o/h2o-2.2.6.ebuild | 2 +- www-servers/nginx-unit/Manifest | 6 +- www-servers/nginx-unit/files/auto-make.patch | 14 - www-servers/nginx-unit/files/auto-os-conf.patch | 109 -- www-servers/nginx-unit/nginx-unit-1.17.0.ebuild | 2 +- www-servers/nginx-unit/nginx-unit-1.8.0.ebuild | 65 -- www-servers/nginx/Manifest | 8 +- www-servers/nginx/nginx-1.17.10-r1.ebuild | 1093 ++++++++++++++++++++ www-servers/nginx/nginx-1.17.10.ebuild | 1093 -------------------- www-servers/nginx/nginx-1.17.9-r2.ebuild | 1093 -------------------- www-servers/nginx/nginx-1.18.0.ebuild | 1093 ++++++++++++++++++++ www-servers/tomcat/Manifest | 15 +- .../tomcat/files/tomcat-7.0.94-build.xml.patch | 163 --- www-servers/tomcat/tomcat-7.0.100.ebuild | 146 --- www-servers/tomcat/tomcat-8.5.51.ebuild | 158 --- www-servers/tomcat/tomcat-8.5.53.ebuild | 158 --- www-servers/tomcat/tomcat-8.5.54.ebuild | 2 +- www-servers/tomcat/tomcat-8.5.55.ebuild | 158 +++ www-servers/tomcat/tomcat-9.0.33.ebuild | 181 ---- www-servers/tomcat/tomcat-9.0.35.ebuild | 181 ++++ www-servers/tornado/Manifest | 3 +- www-servers/tornado/tornado-6.0.3-r1.ebuild | 56 - www-servers/tornado/tornado-6.0.4.ebuild | 2 +- www-servers/uwsgi/Manifest | 9 +- www-servers/uwsgi/metadata.xml | 1 - www-servers/uwsgi/uwsgi-2.0.17.1-r1.ebuild | 28 +- www-servers/uwsgi/uwsgi-2.0.17.1.ebuild | 408 -------- www-servers/uwsgi/uwsgi-2.0.17.ebuild | 28 +- www-servers/uwsgi/uwsgi-2.0.18.ebuild | 28 +- www-servers/varnish/Manifest | 8 +- www-servers/varnish/varnish-6.0.1.ebuild | 2 +- www-servers/varnish/varnish-6.0.6.ebuild | 2 +- www-servers/varnish/varnish-6.1.1.ebuild | 2 +- www-servers/varnish/varnish-6.3.2.ebuild | 2 +- 40 files changed, 2759 insertions(+), 4064 deletions(-) delete mode 100644 www-servers/cherokee/cherokee-1.2.104-r1.ebuild create mode 100644 www-servers/cherokee/cherokee-1.2.104-r2.ebuild delete mode 100644 www-servers/h2o/h2o-2.2.5.ebuild delete mode 100644 www-servers/nginx-unit/files/auto-make.patch delete mode 100644 www-servers/nginx-unit/files/auto-os-conf.patch delete mode 100644 www-servers/nginx-unit/nginx-unit-1.8.0.ebuild create mode 100644 www-servers/nginx/nginx-1.17.10-r1.ebuild delete mode 100644 www-servers/nginx/nginx-1.17.10.ebuild delete mode 100644 www-servers/nginx/nginx-1.17.9-r2.ebuild create mode 100644 www-servers/nginx/nginx-1.18.0.ebuild delete mode 100644 www-servers/tomcat/files/tomcat-7.0.94-build.xml.patch delete mode 100644 www-servers/tomcat/tomcat-7.0.100.ebuild delete mode 100644 www-servers/tomcat/tomcat-8.5.51.ebuild delete mode 100644 www-servers/tomcat/tomcat-8.5.53.ebuild create mode 100644 www-servers/tomcat/tomcat-8.5.55.ebuild delete mode 100644 www-servers/tomcat/tomcat-9.0.33.ebuild create mode 100644 www-servers/tomcat/tomcat-9.0.35.ebuild delete mode 100644 www-servers/tornado/tornado-6.0.3-r1.ebuild delete mode 100644 www-servers/uwsgi/uwsgi-2.0.17.1.ebuild (limited to 'www-servers') diff --git a/www-servers/Manifest.gz b/www-servers/Manifest.gz index d1da6c23c0d8..70dc262db88b 100644 Binary files a/www-servers/Manifest.gz and b/www-servers/Manifest.gz differ diff --git a/www-servers/cherokee/Manifest b/www-servers/cherokee/Manifest index 59f914b71aa1..7ce6d740dca3 100644 --- a/www-servers/cherokee/Manifest +++ b/www-servers/cherokee/Manifest @@ -4,5 +4,5 @@ AUX cherokee-initd-1.2.99 1186 BLAKE2B 3c4d0bbc378940e425bcc8ae4f451e44ded8bc4d4 AUX cherokee.logrotate-r1 255 BLAKE2B 33d6c7dca525e424d1a88c0248595d011215cebae749a5d6aacc9eecd2b6e8d447d67655570baf62b23db96c5f5611d4a98b99bfcb6be9e194b52794264fcf49 SHA512 73be4a46f217302b3e7969f0a5acf7f83357a831331f85c89c17320c594eb9e6fd87da111b7d8eb06840e0b1bb094106a5bb6f7dbf7923e834164a367f85d5ad AUX cherokee.service 184 BLAKE2B 76a55b38f5a7d78df80fd57f9461f68dc360b5efafe19338cc242c71f625b6900c5872283c32a97b6234f58621b89616e123983dec027d3bb1f797d388cf743b SHA512 e05cfe0805bcd7f133fc0bf485fbf781b9cc5e6f9e222b8ea89bdc4e9d4531caa6049100670b67d12bdb73c1e93ed5d949cc1828241213cfcd60a39b7424d8ec DIST cherokee-1.2.104.zip 6200164 BLAKE2B 55ff5b5475c478078727ec072da4f1205209701b972efa420fbee4133cb83cf2ebd4a0f49165e4653c4a6b6f9e0f6ef633258e6ee4732d998b19863e99e6e2f2 SHA512 9c9f44643d0d2636f2e3e61ef8e2918d91d9bb6099be761826c8ffad01d339739ed40984d01151044c2e536d4754b5157d6d20c37627ce49eecdb404a716cd9d -EBUILD cherokee-1.2.104-r1.ebuild 4931 BLAKE2B 98f63e4168517d99ec58fab1d228c5468edf5e3150e583d07be4b67af950cb352c8ae753c1361cfaed7f37e06e361ee1278626736564e218b450c82d3bb2dcd5 SHA512 7e79d16dd394a2dc97c5cf33264d726fe8359742b15fb4e5674d03209f20e5e650dc1c31c2e59e5aead42eb8b49244e030a984d89839786a2c0647340b610160 +EBUILD cherokee-1.2.104-r2.ebuild 4935 BLAKE2B 1a94d38311894aba8fe4bfb39341223dac09e85a66afffb3156c9b114fff79483e294957395fc5e924a8b403887fb3bf8041dc5e0c6d804ebb86d1ccacdc5647 SHA512 495e5f4446519afb74b62e4dfd23110f5f3554dfbc4dfb4303efeba86fff6df0ee02bb716072cfa1030ab61a65ddad9c10255fdb29d3ed0c4e450f1770855bee MISC metadata.xml 468 BLAKE2B cbf0b56c17065b7281b4a762cd2390deb3af8c4388c46488d07c0ba39eee46224ee6420075e587345fbaba4a0cfa160daac8fd59b0343dd7cf25d313bee8aac7 SHA512 bfd1c8c432210025dd9b29ec89b383d3211ee9d1aabec4d59c2ec5801feccebcee3c55f7b6ed4e02daab9e72f42ab12517f957f396d0fd410ad3eee4fd05520d diff --git a/www-servers/cherokee/cherokee-1.2.104-r1.ebuild b/www-servers/cherokee/cherokee-1.2.104-r1.ebuild deleted file mode 100644 index 89557f2f8b98..000000000000 --- a/www-servers/cherokee/cherokee-1.2.104-r1.ebuild +++ /dev/null @@ -1,196 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -WANT_AUTOMAKE="1.11" - -PYTHON_COMPAT=( python2_7 ) - -inherit autotools python-r1 pam systemd user - -DESCRIPTION="An extremely fast and tiny web server" -SRC_URI="https://github.com/cherokee/webserver/archive/v${PV}.zip -> ${P}.zip" -HOMEPAGE="http://www.cherokee-project.com/" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" -IUSE="admin ffmpeg debug geoip ipv6 kernel_linux ldap libressl mysql nls pam php rrdtool ssl static static-libs" -RDEPEND="" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -COMMON_DEPEND=" - ${PYTHON_DEPS} - dev-libs/libpcre - >=sys-libs/zlib-1.1.4-r1 - ffmpeg? ( virtual/ffmpeg ) - geoip? ( dev-libs/geoip ) - ldap? ( net-nds/openldap ) - mysql? ( dev-db/mysql-connector-c:0= ) - nls? ( virtual/libintl ) - pam? ( sys-libs/pam ) - php? ( || ( - dev-lang/php:*[fpm] - dev-lang/php:*[cgi] - ) ) - ssl? ( - !libressl? ( po/admin/POTFILES.in - eautoreconf -} - -src_configure() { - local myconf - - if use admin ; then - myconf="${myconf} --enable-admin --with-python=/usr/bin/python" - else - myconf="${myconf} --disable-admin" - fi - - # Uses autodetect because --with-php requires path to php-{fpm,cgi}. - if ! use php ; then - myconf="${myconf} --without-php" - fi - - if use static ; then - myconf="${myconf} --enable-static-module=all" - fi - - local os="Unknown" - case "${CHOST}" in - *-freebsd*) - os="FreeBSD" ;; - *-netbsd*) - os="NetBSD" ;; - *-openbsd*) - os="OpenBSD" ;; - *) - os="Linux" ;; - esac - - econf \ - $(use_enable debug trace) \ - $(use_enable debug backtraces) \ - $(use_enable ipv6) \ - $(use_enable kernel_linux epoll) \ - $(use_enable nls) \ - $(use_enable pam) \ - $(use_enable static-libs static) \ - $(use_with ffmpeg) \ - $(use_with geoip) \ - $(use_with ldap) \ - $(use_with mysql) \ - $(use_with ssl libssl) \ - --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ - --enable-os-string="Gentoo ${os}" \ - --enable-tmpdir="${EPREFIX}/var/tmp" \ - --localstatedir="${EPREFIX}/var" \ - --with-wwwroot="${EPREFIX}${WEBROOT}/htdocs" \ - --with-cgiroot="${EPREFIX}${WEBROOT}/cgi-bin" \ - --with-wwwuser=cherokee \ - --with-wwwgroup=cherokee \ - ${myconf} -} - -src_install() { - default - - if ! use static-libs ; then - find "${ED}" -name '*.la' -delete || die - elif ! use static ; then - find "${ED}/usr/$(get_libdir)/cherokee" '(' -name '*.la' -o -name '*.a' ')' -delete || die - fi - - dodoc AUTHORS NEWS README.rst - - if use pam ; then - pamd_mimic system-auth cherokee auth account session || die - fi - - newinitd "${FILESDIR}/${PN}-initd-1.2.99" ${PN} - newconfd "${FILESDIR}/${PN}-confd-1.2.98" ${PN} - - if ! use admin ; then - rm -r \ - "${ED}"/usr/bin/cherokee-admin-launcher \ - "${ED}"/usr/bin/CTK-run \ - "${ED}"/usr/sbin/cherokee-admin \ - "${ED}"/usr/share/cherokee/admin || die - fi - - exeinto /usr/share/doc/${PF}/contrib - doexe contrib/{bin2buffer.py,make-cert.sh,make-dh_params.sh,tracelor.py} - - #move the htdocs to docdir, bug #429632 - docompress -x /usr/share/doc/"${PF}"/htdocs.dist - mv "${ED}"${WEBROOT}/htdocs \ - "${ED}"/usr/share/doc/"${PF}"/htdocs.dist - mkdir "${ED}"${WEBROOT}/htdocs - - keepdir \ - "${WEBROOT}"/htdocs \ - /var/log/cherokee \ - /var/lib/cherokee/graphs/images - fowners cherokee:cherokee \ - /var/log/cherokee \ - /var/lib/cherokee/graphs \ - /var/lib/cherokee/graphs/images - - # logrotate - insinto /etc/logrotate.d - newins "${FILESDIR}"/${PN}.logrotate-r1 ${PN} - - systemd_dounit "${FILESDIR}"/cherokee.service - - # Fix QA error - not important if it fails - rmdir "${ED}"/var/run -} - -pkg_postinst() { - elog - if use admin ; then - elog "Just run '/usr/sbin/cherokee-admin' and go to: http://localhost:9090" - elog - elog "Cherokee currently supports configuration versioning, so from now on," - elog "whenever a change is made to the configuration file format," - elog "Cherokee-Admin will be able to automatically convert yours to the new" - elog "release. You simply have to load Cherokee-Admin and it will be converted" - elog "once you proceed to saving it." - elog - elog "There is also a command line utility that you can use to do the exact" - elog "same thing. Config format can change in different versions. It is" - elog "provided under:" - elog " ${EPREFIX}/usr/share/cherokee/admin/upgrade_config.py" - else - elog "Try USE=admin if you want an easy way to configure cherokee." - fi - elog - elog "emerge www-servers/spawn-fcgi if you use Ruby on Rails with ${PN}." - elog -} diff --git a/www-servers/cherokee/cherokee-1.2.104-r2.ebuild b/www-servers/cherokee/cherokee-1.2.104-r2.ebuild new file mode 100644 index 000000000000..c93835e180e9 --- /dev/null +++ b/www-servers/cherokee/cherokee-1.2.104-r2.ebuild @@ -0,0 +1,196 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +WANT_AUTOMAKE="1.11" + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools python-r1 pam systemd user + +DESCRIPTION="An extremely fast and tiny web server" +SRC_URI="https://github.com/cherokee/webserver/archive/v${PV}.zip -> ${P}.zip" +HOMEPAGE="http://www.cherokee-project.com/" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" +IUSE="admin ffmpeg debug geoip ipv6 kernel_linux ldap libressl mysql nls pam php rrdtool ssl static static-libs" +RDEPEND="" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +COMMON_DEPEND=" + ${PYTHON_DEPS} + dev-libs/libpcre + >=sys-libs/zlib-1.1.4-r1 + ffmpeg? ( media-video/ffmpeg ) + geoip? ( dev-libs/geoip ) + ldap? ( net-nds/openldap ) + mysql? ( dev-db/mysql-connector-c:0= ) + nls? ( virtual/libintl ) + pam? ( sys-libs/pam ) + php? ( || ( + dev-lang/php:*[fpm] + dev-lang/php:*[cgi] + ) ) + ssl? ( + !libressl? ( po/admin/POTFILES.in + eautoreconf +} + +src_configure() { + local myconf + + if use admin ; then + myconf="${myconf} --enable-admin --with-python=/usr/bin/python" + else + myconf="${myconf} --disable-admin" + fi + + # Uses autodetect because --with-php requires path to php-{fpm,cgi}. + if ! use php ; then + myconf="${myconf} --without-php" + fi + + if use static ; then + myconf="${myconf} --enable-static-module=all" + fi + + local os="Unknown" + case "${CHOST}" in + *-freebsd*) + os="FreeBSD" ;; + *-netbsd*) + os="NetBSD" ;; + *-openbsd*) + os="OpenBSD" ;; + *) + os="Linux" ;; + esac + + econf \ + $(use_enable debug trace) \ + $(use_enable debug backtraces) \ + $(use_enable ipv6) \ + $(use_enable kernel_linux epoll) \ + $(use_enable nls) \ + $(use_enable pam) \ + $(use_enable static-libs static) \ + $(use_with ffmpeg) \ + $(use_with geoip) \ + $(use_with ldap) \ + $(use_with mysql) \ + $(use_with ssl libssl) \ + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \ + --enable-os-string="Gentoo ${os}" \ + --enable-tmpdir="${EPREFIX}/var/tmp" \ + --localstatedir="${EPREFIX}/var" \ + --with-wwwroot="${EPREFIX}${WEBROOT}/htdocs" \ + --with-cgiroot="${EPREFIX}${WEBROOT}/cgi-bin" \ + --with-wwwuser=cherokee \ + --with-wwwgroup=cherokee \ + ${myconf} +} + +src_install() { + default + + if ! use static-libs ; then + find "${ED}" -name '*.la' -delete || die + elif ! use static ; then + find "${ED}/usr/$(get_libdir)/cherokee" '(' -name '*.la' -o -name '*.a' ')' -delete || die + fi + + dodoc AUTHORS NEWS README.rst + + if use pam ; then + pamd_mimic system-auth cherokee auth account session || die + fi + + newinitd "${FILESDIR}/${PN}-initd-1.2.99" ${PN} + newconfd "${FILESDIR}/${PN}-confd-1.2.98" ${PN} + + if ! use admin ; then + rm -r \ + "${ED}"/usr/bin/cherokee-admin-launcher \ + "${ED}"/usr/bin/CTK-run \ + "${ED}"/usr/sbin/cherokee-admin \ + "${ED}"/usr/share/cherokee/admin || die + fi + + exeinto /usr/share/doc/${PF}/contrib + doexe contrib/{bin2buffer.py,make-cert.sh,make-dh_params.sh,tracelor.py} + + #move the htdocs to docdir, bug #429632 + docompress -x /usr/share/doc/"${PF}"/htdocs.dist + mv "${ED}"${WEBROOT}/htdocs \ + "${ED}"/usr/share/doc/"${PF}"/htdocs.dist + mkdir "${ED}"${WEBROOT}/htdocs + + keepdir \ + "${WEBROOT}"/htdocs \ + /var/log/cherokee \ + /var/lib/cherokee/graphs/images + fowners cherokee:cherokee \ + /var/log/cherokee \ + /var/lib/cherokee/graphs \ + /var/lib/cherokee/graphs/images + + # logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate-r1 ${PN} + + systemd_dounit "${FILESDIR}"/cherokee.service + + # Fix QA error - not important if it fails + rmdir "${ED}"/var/run +} + +pkg_postinst() { + elog + if use admin ; then + elog "Just run '/usr/sbin/cherokee-admin' and go to: http://localhost:9090" + elog + elog "Cherokee currently supports configuration versioning, so from now on," + elog "whenever a change is made to the configuration file format," + elog "Cherokee-Admin will be able to automatically convert yours to the new" + elog "release. You simply have to load Cherokee-Admin and it will be converted" + elog "once you proceed to saving it." + elog + elog "There is also a command line utility that you can use to do the exact" + elog "same thing. Config format can change in different versions. It is" + elog "provided under:" + elog " ${EPREFIX}/usr/share/cherokee/admin/upgrade_config.py" + else + elog "Try USE=admin if you want an easy way to configure cherokee." + fi + elog + elog "emerge www-servers/spawn-fcgi if you use Ruby on Rails with ${PN}." + elog +} diff --git a/www-servers/h2o/Manifest b/www-servers/h2o/Manifest index 5e8729534e11..d73e0724afa4 100644 --- a/www-servers/h2o/Manifest +++ b/www-servers/h2o/Manifest @@ -5,9 +5,7 @@ AUX h2o.conf 350 BLAKE2B 948c90451fd76cb55f3b42eaa9ddc01564b2bd2c46437649fb639d6 AUX h2o.initd 845 BLAKE2B f420962962517051c695f00e11a3b6edb899a672d0984db3d68b88545064767e7059cd9b3ec60b7cb70469b403e0927dbaea4e9f7b7a00979b4f036f945585d5 SHA512 9fdfde2857d97937939b1dd591b94f26f77b6fd6061d385c807738be508f1df740acf36c38ca95c22a36f13caed5d537b6fc1f6cceaf1beda8f8f48ef452c177 AUX h2o.logrotate 230 BLAKE2B 44eeaf3b0e60104d4f87c7110815a30f907a6fd676e75a2068fb9cddd8192d3e75729aaeabc89d6430eef7c075b21271918fd65b086de188f7df0c6ceb332141 SHA512 88d36e272c52c5df765d8ebac8f2acca378c8b096af7fa8eda68e1ec5597cba6096286f0ab634f128329148e65980128f0612e90a185de781c5d109653e096dd AUX h2o.service 364 BLAKE2B 9995cde4d79e5998624a2cadfc6ec3e954d4609458cc267628c2fbcb44dccd78277bddc032a784a00445c6b399fafc1ee629920355bf7aa84d26b1010bd103b0 SHA512 475b1e7b616eae335e094451532b0de5aa9cf9abc4999aaa44a9a35c43def4fb060ee5e728409bc33960f8ad3a81e6f549783906ac7ebad5b72cb7422ffb96a2 -DIST h2o-2.2.5.tar.gz 16257295 BLAKE2B 3c13796eaf9a0aca29bbff7c35fb36d0b5ef47da91f39f71614a89f2d4fea5b1ebbc8f4e3e50bf37a02a84c0fcd96d5ac0be20c83add274157af966134b2d185 SHA512 24b07140d24fbb7796038aab44f44be5ffabc6f2841954273e2ad9f1a864e5482051dd7abfa6446297a46b6868763114695fa4f123ee3175bdac53b4c1868bc2 DIST h2o-2.2.6.tar.gz 16257760 BLAKE2B 8474751ca9832ddae2022710654ca58a93ebf9ca01afe934950209b04357b7548b05c598c49fe92684b2910fd6309d6fc3923a0b01cdeeb4b0dc65b08842255f SHA512 f2f28905c01782a0432c9dfdb2f21054e0a4741ac4c5f26802d4b439d0172840aa215aba5dc7c9af62275dcc24de105674a3819384dc38246e43ce3e8263eb20 -EBUILD h2o-2.2.5.ebuild 2296 BLAKE2B bf478f3521de1b79f5f363cbe99c1fea42a02cec2469425f087c6aea4d75604790b4af27ae4a2c6137bbeca7f3198de9682ae40f0adc9384b3246916d64c9786 SHA512 607a74f1a20504d00b99273deb05f1337dcdc488409b390965aef6f644ba84bb59ccb47e17afc02710ce5204207dfbeb3ed49a90c7db795d51a8d34f4466617c -EBUILD h2o-2.2.6.ebuild 2298 BLAKE2B 481ba29d437d03406d5cacc04bbb51c54f1fb1270c306c11a9fe80fee47b30c74392cc15333c7a6163bcd36dea9706970622220a49b180e780c8b85a80facd54 SHA512 112566eec3e9b4255f5b67cdae1511abd50037e782fc1779bb078a25498ca36838cceb4b2fc1bf8c41127f34dfd8b5d1e893e2b2e64abb4208b0393933786b44 +EBUILD h2o-2.2.6.ebuild 2296 BLAKE2B bf478f3521de1b79f5f363cbe99c1fea42a02cec2469425f087c6aea4d75604790b4af27ae4a2c6137bbeca7f3198de9682ae40f0adc9384b3246916d64c9786 SHA512 607a74f1a20504d00b99273deb05f1337dcdc488409b390965aef6f644ba84bb59ccb47e17afc02710ce5204207dfbeb3ed49a90c7db795d51a8d34f4466617c EBUILD h2o-9999.ebuild 2222 BLAKE2B a18cad7fa7eb9b52bda573494c6e65980703d2038dca8dcf05e034bed51a3e878dce26dc343eb98dc2a3d74394e7da433aa1a7e770238c547010f9b6c9e3f381 SHA512 53bb53d2a77db61d550dfc0123361922891c74cb3179b3258543d9e0557e8693cbe996a828b2127edf096dae640c4dbfe176cacf062f4f7abd6c5a5e045a9002 MISC metadata.xml 664 BLAKE2B 8b54065efeaf5a0506a1a2a3c0b6cfd803812c25b27fba925c5bc88c5cf5062eb7b56a6240f8461d6874f9aeff7f42c3b8b6d80561714106405ee4c7d5cc266b SHA512 171a99429df373753f72898d7b51399738e0c4b792aadec4a74ec0ca64d1651ee2947878db455bb48587b02165d6ec440a14e1c0a567c2e002e2805585086415 diff --git a/www-servers/h2o/h2o-2.2.5.ebuild b/www-servers/h2o/h2o-2.2.5.ebuild deleted file mode 100644 index 090cb8025bb1..000000000000 --- a/www-servers/h2o/h2o-2.2.5.ebuild +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" -CMAKE_MAKEFILE_GENERATOR="emake" -SSL_DEPS_SKIP=1 -USE_RUBY="ruby24 ruby25 ruby26" - -inherit cmake-utils ruby-single ssl-cert systemd toolchain-funcs user - -DESCRIPTION="H2O - the optimized HTTP/1, HTTP/2 server" -HOMEPAGE="https://h2o.examp1e.net/" -SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="libh2o libressl +mruby" - -RDEPEND="dev-lang/perl - sys-libs/zlib - libh2o? ( dev-libs/libuv ) - !libressl? ( dev-libs/openssl:0= ) - libressl? ( dev-libs/libressl:0= )" -DEPEND="${RDEPEND} - libh2o? ( virtual/pkgconfig ) - mruby? ( - ${RUBY_DEPS} - || ( - dev-libs/onigmo - dev-libs/oniguruma - ) - sys-devel/bison - virtual/pkgconfig - )" - -PATCHES=( - "${FILESDIR}"/${PN}-2.2-libressl-2.7.patch - "${FILESDIR}"/${PN}-2.2-mruby.patch -) - -pkg_setup() { - enewgroup ${PN} - enewuser ${PN} -1 -1 -1 ${PN} -} - -src_prepare() { - cmake-utils_src_prepare - - local ruby="ruby" - if use mruby; then - for ruby in ${RUBY_TARGETS_PREFERENCE}; do - if has_version dev-lang/ruby:${ruby:4:1}.${ruby:5}; then - break - fi - ruby= - done - [[ -z ${ruby} ]] && die "no suitable ruby version found" - fi - - sed -i \ - -e "/INSTALL/s:\(/doc/${PN}\) :\1/html :" \ - -e "/INSTALL/s:\(/doc\)/${PN}:\1/${PF}:" \ - -e "s: ruby: ${ruby}:" \ - CMakeLists.txt - - sed -i "s:pkg-config:$(tc-getPKG_CONFIG):g" deps/mruby/lib/mruby/gem.rb - tc-export CC - export LD="$(tc-getCC)" -} - -src_configure() { - local mycmakeargs=( - -DCMAKE_INSTALL_SYSCONFDIR="${EPREFIX}"/etc/${PN} - -DWITH_MRUBY=$(usex mruby) - -DWITHOUT_LIBS=$(usex !libh2o) - -DBUILD_SHARED_LIBS=$(usex libh2o) - ) - cmake-utils_src_configure -} - -src_install() { - cmake-utils_src_install - - keepdir /var/www/localhost/htdocs - - insinto /etc/${PN} - doins "${FILESDIR}"/${PN}.conf - - newinitd "${FILESDIR}"/${PN}.initd ${PN} - systemd_dounit "${FILESDIR}"/${PN}.service - - insinto /etc/logrotate.d - newins "${FILESDIR}"/${PN}.logrotate ${PN} - - keepdir /var/log/${PN} - fowners ${PN}:${PN} /var/log/${PN} - fperms 0750 /var/log/${PN} -} - -pkg_postinst() { - if [[ ! -f "${EROOT}"etc/ssl/${PN}/server.key ]]; then - install_cert /etc/ssl/${PN}/server - chown ${PN}:${PN} "${EROOT}"etc/ssl/${PN}/server.* - fi -} diff --git a/www-servers/h2o/h2o-2.2.6.ebuild b/www-servers/h2o/h2o-2.2.6.ebuild index b059185c8fb4..090cb8025bb1 100644 --- a/www-servers/h2o/h2o-2.2.6.ebuild +++ b/www-servers/h2o/h2o-2.2.6.ebuild @@ -14,7 +14,7 @@ SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" IUSE="libh2o libressl +mruby" RDEPEND="dev-lang/perl diff --git a/www-servers/nginx-unit/Manifest b/www-servers/nginx-unit/Manifest index 820b9ccf39a1..a2064903d19c 100644 --- a/www-servers/nginx-unit/Manifest +++ b/www-servers/nginx-unit/Manifest @@ -1,8 +1,4 @@ -AUX auto-make.patch 368 BLAKE2B ca9b0f4fe616edefb11806a6919835ad215e5b1bf4f0ca678737f1ecff787af11cc9ecd6624e6bc27548917545c72fb09df600900d7b5bbabdf766f653e17646 SHA512 507ed06a1e57d466e9e99a1bc56694211f21cb688f68450ec138b0983e0d5bf80ad426ff07e6865f66abf417200c177846211db95ea261054dbdb296deae1b95 -AUX auto-os-conf.patch 3777 BLAKE2B 759053595665eea70d7119a31e49d9dc234b7684078781eef234e6cb2a50a401729edc7380cd7ffd64826a900167badb5bf3922c6e395a999ede1e15d2e3a28f SHA512 5e156343aa65e4c08ca3b6f6721d8564dde9ed2903a03165d8c96036cdba6f0bcd813b45a394b8684f9e06281d5a28ea0d161611c470280e639158e63816f319 AUX nginx-unit.initd 288 BLAKE2B 94caaeee62d93cdb3b9240bc6563fabe9b273b2125f9ec0c1ae0a2b079bef89b94f7e3a748d649a0840595f46047cee7ea388bd9514d1da88bb4a041a4a2c8ef SHA512 52a788e21a9aaa90a470a7861cd9856e3c2d2c52e3b4a23276c8b43e2a22f6f5aaec78caaf5f449463f1b856e0ffd83515e583f0ced00eada2d0afc00949ca77 DIST nginx-unit-1.17.0.tar.gz 726928 BLAKE2B d171f2f818302cb0f491ccc3ca93596ee52817647cf1f2f176ebed075cb1dd5772f133d9e925075fe72d826a63b4c4debddace8784612196ebe6b6655d70571b SHA512 4175fc6dd84ad8a3bbdc117d3ce0c7a11c708a7a204ade0bb40f5606f6923e351bb1a8f1f8394c09cdf12fdc20bc927920412dc4b41d3141f76482db047c4bed -DIST nginx-unit-1.8.0.tar.gz 511226 BLAKE2B e396b27954840a5f1ad3a4cd9501a5e5fe769a754c51043da784a2c4596e6acc33089f495bf412a0db086e5c715a51292c7dece004a6512564421a431b6c339e SHA512 1d0ad05343ff70aff4c6e221a36c20df95fa2e2262ae5c69963a9bcb9ef883151e8a2fa9fef29f43ac5489aa5cbb3e9dfd10cf5e7f6d7a98742b490ebf3a0413 -EBUILD nginx-unit-1.17.0.ebuild 1954 BLAKE2B a889f8b1f34ea66df35e682bf26f7e22462076efad22cc6f6cb41c182ee80bd4c7687c8742b5364ecfac3dd5a04d148fedbef3b6ad70ba123aa7697060603f87 SHA512 21ec634694b9761493395d4ca72193840e152e16888f777ca382e96a6e3743583a0368854081373b6730e0ceea212a6100ab7c5c8938285afc617a206788cd67 -EBUILD nginx-unit-1.8.0.ebuild 1602 BLAKE2B c35777bed33ab33da0458037c03702d91a6596d6b5b5a1a11197cb3961d53b523a5a8be7a8a4d52735fa66aabb430467913d0e9f122930e69b44302e764145c2 SHA512 3c500bf702ce9e09118d68339fff0eabd7cf01be05e25bd3179d21a32f13e39a7513f10480da3595d462392572f36a2a1ef4698a8b51a8adb1e44177b0f408fa +EBUILD nginx-unit-1.17.0.ebuild 1953 BLAKE2B 8942de82799f70fae7997d63d34a9fe2f5ea056d288c3b07ca83e1dc36b68604959fd847bb291838a8bcffbd0bef0e084ec097c70e6c9368859437f79dcda3a7 SHA512 27ca570d72ebabaa53584dfcb66757692aa49b13133dde98a60dda1ec67b9cfb0d3ce78e3ea884e7355d3f55510179d5bb509d73ad793a03a6939aed4d14ffe4 MISC metadata.xml 949 BLAKE2B 47faacf65d957c617419ef5183d99b77421bd45dd4499263eda7097fecc73633a085c05833e5b375e70865c4b12e6e02e224fdded5fed0e9eee19d44eb525e26 SHA512 c8073b3eea6233733ac01329aab48e51dd43fc6deb9c8ca8b482dbcb3df781069d750d0002f203309cebf64890d517b1ed900a9cda62e4a028fd2fd721a7f5c7 diff --git a/www-servers/nginx-unit/files/auto-make.patch b/www-servers/nginx-unit/files/auto-make.patch deleted file mode 100644 index 9a157ed6a86d..000000000000 --- a/www-servers/nginx-unit/files/auto-make.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/auto/make 2019-10-03 16:08:32.000000000 +0200 -+++ b/auto/make 2019-10-31 16:57:43.354566956 +0100 -@@ -13,10 +13,9 @@ - - cat << END > $NXT_MAKEFILE - -+AR = $AR - CC = $CC - --CFLAGS = $NXT_CFLAGS $NXT_CC_OPT $CFLAGS -- - NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT - NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT - NXT_MODULE_LINK = $NXT_MODULE_LINK diff --git a/www-servers/nginx-unit/files/auto-os-conf.patch b/www-servers/nginx-unit/files/auto-os-conf.patch deleted file mode 100644 index e1d6775f9350..000000000000 --- a/www-servers/nginx-unit/files/auto-os-conf.patch +++ /dev/null @@ -1,109 +0,0 @@ ---- a/auto/os/conf 2019-10-31 17:17:33.194445276 +0100 -+++ b/auto/os/conf 2019-10-31 17:19:51.780033224 +0100 -@@ -21,7 +21,7 @@ - Linux) - nxt_have=NXT_LINUX . auto/have - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared \ - -Wl,-soname,\\\$\$ORIGIN/libnxt.so" -@@ -44,7 +44,7 @@ - FreeBSD) - nxt_have=NXT_FREEBSD . auto/have - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared \ - -Wl,-soname,\\\$\$ORIGIN/libnxt.so" -@@ -71,14 +71,14 @@ - case "$NXT_CC_NAME" in - - SunC): -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -G -h libnxt.so" - NXT_SHARED_LOCAL_LINK="\$(CC) -G -h \\\$\$ORIGIN/libnxt.so" - NXT_MODULE_LINK="\$(CC) -G" - ;; - - *) -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared -Wl,-soname,libnxt.so" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared \ - -Wl,-soname,\\\$\$ORIGIN/libnxt.so" -@@ -106,7 +106,7 @@ - # HFS+ volumes are caseless by default. - nxt_have=NXT_HAVE_CASELESS_FILESYSTEM . auto/have - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -dynamiclib" - NXT_SHARED_LOCAL_LINK="\$(CC) -dynamiclib \ - -install_name @executable_path/libnxt.dylib" -@@ -130,7 +130,7 @@ - NetBSD) - nxt_have=NXT_NETBSD . auto/have - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared" - NXT_MODULE_LINK="\$(CC) -shared" -@@ -152,7 +152,7 @@ - OpenBSD) - nxt_have=NXT_OPENBSD . auto/have - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared" - NXT_MODULE_LINK="\$(CC) -shared" -@@ -174,7 +174,7 @@ - DragonFly) - nxt_have=NXT_DRAGONFLY . auto/have - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared" - NXT_MODULE_LINK="\$(CC) -shared" -@@ -196,7 +196,7 @@ - AIX) - nxt_have=NXT_AIX . auto/have - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -G" - NXT_SHARED_LOCAL_LINK="\$(CC) -G" - NXT_MODULE_LINK="\$(CC) -G" -@@ -220,7 +220,7 @@ - NXT_EXEC_LINK="\$(CC)" - NXT_SHARED_LOCAL_EXEC_LINK= - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared" - NXT_MODULE_LINK="\$(CC) -shared" -@@ -238,7 +238,7 @@ - QNX) - nxt_have=NXT_QNX . auto/have - -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared" - NXT_MODULE_LINK="\$(CC) -shared" -@@ -257,7 +257,7 @@ - ;; - - *) -- NXT_STATIC_LINK="ar -r -c" -+ NXT_STATIC_LINK="\$(AR) -r -c" - NXT_SHARED_LINK="\$(CC) -shared" - NXT_SHARED_LOCAL_LINK="\$(CC) -shared" - NXT_MODULE_LINK="\$(CC) -shared" diff --git a/www-servers/nginx-unit/nginx-unit-1.17.0.ebuild b/www-servers/nginx-unit/nginx-unit-1.17.0.ebuild index ac0c6c8fc956..49c2f106174a 100644 --- a/www-servers/nginx-unit/nginx-unit-1.17.0.ebuild +++ b/www-servers/nginx-unit/nginx-unit-1.17.0.ebuild @@ -14,7 +14,7 @@ SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~amd64" +KEYWORDS="amd64" MY_USE="perl python ruby" MY_USE_PHP="php7-2 php7-3 php7-4" IUSE="${MY_USE} ${MY_USE_PHP} ssl" diff --git a/www-servers/nginx-unit/nginx-unit-1.8.0.ebuild b/www-servers/nginx-unit/nginx-unit-1.8.0.ebuild deleted file mode 100644 index ac86712d6623..000000000000 --- a/www-servers/nginx-unit/nginx-unit-1.8.0.ebuild +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=(python3_{6,7}) - -inherit python-single-r1 - -MY_P="unit-${PV}" -DESCRIPTION="A dynamic web and application server" -HOMEPAGE="https://unit.nginx.org" -SRC_URI="https://unit.nginx.org/download/${MY_P}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64" -MY_USE="perl python ruby" -MY_USE_PHP="php7-2 php7-3" -IUSE="${MY_USE} ${MY_USE_PHP}" -REQUIRED_USE="|| ( ${IUSE} ) python? ( ${PYTHON_REQUIRED_USE} )" - -DEPEND="perl? ( dev-lang/perl:= ) - php7-2? ( dev-lang/php:7.2[embed] ) - php7-3? ( dev-lang/php:7.3[embed] ) - python? ( ${PYTHON_DEPS} ) - ruby? ( dev-lang/ruby:= )" -RDEPEND="${DEPEND}" -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_configure() { - ./configure \ - --control=unix:/run/${PN}.sock \ - --ld-opt="${LDFLAGS}" \ - --log=/var/log/${PN} \ - --modules=$(get_libdir)/${PN} \ - --pid=/run/${PN}.pid \ - --prefix=/usr \ - --state=/var/lib/${PN} || die "Core configuration failed" - for flag in ${MY_USE} ; do - if use ${flag} ; then - ./configure ${flag} || die "Module configuration failed: ${flag}" - fi - done - for flag in ${MY_USE_PHP} ; do - if use ${flag} ; then - local php_slot="/usr/$(get_libdir)/${flag/-/.}" - ./configure php \ - --module=${flag} \ - --config=${php_slot}/bin/php-config \ - --lib-path=${php_slot}/$(get_libdir) || die "Module configuration failed: ${flag}" - fi - done -} - -src_install() { - default - diropts -m 0770 - keepdir /var/lib/${PN} - newinitd "${FILESDIR}/${PN}.initd" ${PN} -} diff --git a/www-servers/nginx/Manifest b/www-servers/nginx/Manifest index d70fa5e69051..d0024d607f62 100644 --- a/www-servers/nginx/Manifest +++ b/www-servers/nginx/Manifest @@ -13,7 +13,7 @@ AUX nginx.service-r1 356 BLAKE2B 05d89efcc73b70a26655f306f1e074e61c81063cb4e9491 DIST modsecurity-2.9.3.tar.gz 4307670 BLAKE2B 337ea15cc8805af7ab43aed8aecf4c72ccc586d0d7e9d9b91f036a61baa70d1ac8b4ad8045a2bb7a13515912a15fba7d3cdb9670ae6730de43b1e44ee90ded6d SHA512 4e1ea5dd8edadf8f630e4fe92a200d3a8e78963fce3128b5975a1e1ecd0e8bf9ceecd9905c95f8c508932ccd837f1d8ae8bb2ba423307718c3c6a4ae9b783ddd DIST nginx-1.16.1.tar.gz 1032630 BLAKE2B 838c5f08b56378dd3ef3940a979eb1449c4ed7ef5b4b112da2531c0996d121ae32ae4e94d3b4ba198fefcdc1b06683e4b0cfa0087db82fcab13bffb5f67f8aa4 SHA512 17e95b43fa47d4fef5e652dea587518e16ab5ec562c9c94355c356440166d4b6a6a41ee520d406e5a34791a327d2e3c46b3f9b105ac9ce07afdd495c49eca437 DIST nginx-1.17.10.tar.gz 1039541 BLAKE2B 5e86be6c6aebfd336579269ecfa09eab9ff5c0185e0bd36f993b5ccac4d13f64ef3d10cad4d0ac00c7fb67e3ecb048b7b0f4c74cf5c5376fdc643b5cecee28ac SHA512 0b49169bc49e07733862e09ec5bfa93601ffa57379f98d52a115e511502905baf4cd33b73a03d74416f8c6ffa95ebf4459fc934bd40bfdf54d5b6d35ac4f8756 -DIST nginx-1.17.9.tar.gz 1039136 BLAKE2B bc4cb6fa93288f936ee36b86846b9eb864406799bd1cbc14b2e924e30b0490858e573100ea1e6ca506e1353c71176ebaa5e0109e3d5395e9029a41fa899c60ef SHA512 9d6af46bc575763d5d2c279451919a491bdfafb927a8c0783ccc8326a86ed66f9183c900a9844bf31dcde015f36ea6a8e0d3817b77f9b17aebae701c759fe9b6 +DIST nginx-1.18.0.tar.gz 1039530 BLAKE2B a8962a6af96acb043ff0c3dc4ad5192083773c449950aff53b01f6f7c46a2a540eb061a43432acccd753fa71067b1451d75f440ba5526575b78608be9d40a50b SHA512 8c21eeb62ab6e32e436932500f700bd2fb99fd2d29e43c08a5bfed4714c189c29c7141db551fcd5d2437303b7439f71758f7407dfd3e801e704e45e7daa78ddb DIST nginx-auth-ldap-42d195d7a7575ebab1c369ad3fc5d78dc2c2669c.tar.gz 18457 BLAKE2B 22225ca9e5299b20ab5a93a001cac48e446bd86b3a24ac49e716bc975b128890bdb4b0dbbf5730fbaaeadfd958160093c7a6af798dd0e6de27062f149a760333 SHA512 ec59637fda5acac053e815cb1d04b545fc6b765e5ec63d8c2c9c301abad87afaa2698145acac08e9e14c91e1423ebff7aff0cca2b940b19ccccbf4cf53973269 DIST nginx_http_sticky_module_ng-1.2.6-10-g08a395c66e42.tar.bz2 124047 BLAKE2B d37ef9a15c91abe3c6258e420d1f99fa452f9d9966a0e13102174973314a3bac5413957a5fe632a9dcb1163b3be5df8116e05cc053ee061e19319ec25f341570 SHA512 6c1bfdcf89884b2855d51ae7da0f6e53a4ca3629e1aaf58433b70c07dcb2af797ba6e87d9b3eb4fe2fb6d4d697e862f2b4c2f8d8b3fdaea201740c97ec936529 DIST ngx_brotli-8104036af9cff4b1d34f22d00ba857e2a93a243c.tar.gz 12672 BLAKE2B fa2febfa63b98303f8890c6774de6ccb09475ccd639d3b74493a4ffd97c90febdc22755c5928018bdac24a537bd13cde165f97e5d2b50bebf598c3fb22ec0206 SHA512 169566b8764bb2b82e029f954a99063a9c61e2cbf982861c5f6818b389a5f37bf5389afb1b5627de9bd3f7af7b3c404be0230f943d47ab621c2a2bd825cc8203 @@ -39,8 +39,8 @@ DIST ngx_metrics-0.1.1.tar.gz 2964 BLAKE2B 95d71ea26c949c345b83e353bd66a20df18cc DIST ngx_mogilefs_module-1.0.4.tar.gz 11208 BLAKE2B e0729b66554c8890727190a624d4c9aef6499dfc2e301541a9bfc15690caf6d3155c8a4b8f7a1555a7655b47aa0cd1b797aeb8ba82efa92ab80808218a0bdcff SHA512 b8cb7eaf6274f4e2247dbcb39db05072d2b2d4361256a325fafab5533d7ce0c4ae9e2905b954dfcfa4789c9cab5cccf2ac1c3a1f02f6a327ed95b562d7773ed1 DIST ngx_rtmp-1.2.1.tar.gz 519919 BLAKE2B 744ccb8031eb9653f158f9eceba64fc9c8af7b9a42e64ef996ab3bbbe1402e5ffd3efcc8e4aaca437eb5e208e4b6f2d8643fcca953b32f32543eaa1ae4d9505c SHA512 4a0af5e9afa4deb0b53de8de7ddb2cfa6430d372e1ef9e421f01b509548bd134d427345442ac1ce667338cc2a1484dc2ab732e316e878ac7d3537dc527d5f922 DIST njs-0.3.5.tar.gz 339177 BLAKE2B 6327be0b7c8077870408722376782bca579a6cfdf1fe2a4950fc0d289311ad21f671bc2b47d06f70d95d4f68d99e8c70fd4598dcc167b79c57704d99a098d284 SHA512 236e0284f251856f74eb51d8251bb5be725d2ca90056f2feef7677eb636a4e97e203f3bba81fb6b677158d615dc2d6ffcb0dc1059fb678ab12b7d14cc4ea7241 -DIST njs-0.3.9.tar.gz 412279 BLAKE2B 9e27e59e56b6d5c9d48717552aa373265c6e513e55049a94f1df25a558ef3253be89b8e7e00a3fdcaa93c66f8da8d1d654d4d279e0b4c05b769775a862dfc0a4 SHA512 a1d734db7325de3055d3034777ebfe03b1205bdb6648da45ac7f68698d32427da741a88872c8f713ec6258e79d9cfdcdb89e4429571ba3e3e723a5777024dcab +DIST njs-0.4.0.tar.gz 418439 BLAKE2B e4b9f529a10f90ece864a6b1969507e9573296288ef85f4a71163644415404d4541129326ef9635fe5b8aff3b59ab76c2b3995894c41a53ffb632b6bee8b8e5f SHA512 ea9a063ef83791dd7a7896c584d1b8c635c3ff81792c6e5bad61bdfe8185c6f9ce436ad5e360b267b42bf0d5986553bbdf3c0f1264627f82550aadc361be0a3c EBUILD nginx-1.16.1-r1.ebuild 40600 BLAKE2B 931ea50efb0f16fb667c9a703874245f2776d391a0031220c58d5b5e7d891ca28b1ba12e79e65bdac3918e33ef1ed2dc434d60ee171e597a6f8c64f487552d70 SHA512 5d522120b8533dfea348b6d452d1f32c04d8dc40165799c71cfd968bf34e2d816dfbd5bb167b7d09445a2406cfcbe1dc488300745c2065471bbb564caa521233 -EBUILD nginx-1.17.10.ebuild 40663 BLAKE2B 42132213e5cb6541f14e66b593a8faba1f0e5034ac1adb334ac6cc8249da55928a5a2cce00bb09c5e4691b19339ad19d0a12f1264bdd69d0b2354cee483f4a9b SHA512 8e2b381a24358f783862407ae2afdfb1fe9b7e9a3e7f24c66103104a72f2b4c80ee62a2193b15f99c4e8158a88ec0888bd14712c4359614266a53d1d5427aedf -EBUILD nginx-1.17.9-r2.ebuild 40663 BLAKE2B 42132213e5cb6541f14e66b593a8faba1f0e5034ac1adb334ac6cc8249da55928a5a2cce00bb09c5e4691b19339ad19d0a12f1264bdd69d0b2354cee483f4a9b SHA512 8e2b381a24358f783862407ae2afdfb1fe9b7e9a3e7f24c66103104a72f2b4c80ee62a2193b15f99c4e8158a88ec0888bd14712c4359614266a53d1d5427aedf +EBUILD nginx-1.17.10-r1.ebuild 40663 BLAKE2B 442eb68f6a4470f8fe4e8ccf6a9cbe42f1ad684fcbc84765f22a1e6e8eb90fa9969106b4d1fb007641856edadfe005e1e83803bbd98d649cd13606e24ec2bc8f SHA512 3731d281d4992ffe3ae1883c00ad2515bc70e11015e0a6bd6bb1a5b27b4684491581f0096c8cbdb7b3e970128ec28c66dbf5b1629bbede175e5fa6a5ab0fefea +EBUILD nginx-1.18.0.ebuild 40663 BLAKE2B 2784ae716ed48a69375f430c6d975d3e0faf37cfc789dca6eda7a4cae6d8a138d2ca1f285fa09af248d5e3f18a45df9ec632436f0cc1075f04358d69380ecd51 SHA512 6d37ef4738680866a8645ba30e02ebd20572446112d0bf06860220a20032395fd8d783a1ceec8bbe45e44ff76693fe7878b49c879e8e328ae17bf0f0dfe5167e MISC metadata.xml 1193 BLAKE2B aeb293cf75ed650c946910222d6396f726dc5ed49f1213e6a5664613d78e3b27616399bc1c9f0a360f5303b16931da7016cdf540b24601afafc3ada4428b33a9 SHA512 a96002bc9845bc465542c753c738899b77ad7a32fac7f5f9a7049336868bc41199e926422e3dc23e47f34656c9aaea255511d2ef91e9d59f48c9cd0b4a3c4903 diff --git a/www-servers/nginx/nginx-1.17.10-r1.ebuild b/www-servers/nginx/nginx-1.17.10-r1.ebuild new file mode 100644 index 000000000000..32a846e8e56d --- /dev/null +++ b/www-servers/nginx/nginx-1.17.10-r1.ebuild @@ -0,0 +1,1093 @@ +# Copyright 1999-2020 Gentoo Authors +# 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.1" +DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" +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}" + +# ngx_brotli (https://github.com/eustas/ngx_brotli, BSD-2) +HTTP_BROTLI_MODULE_PV="8104036af9cff4b1d34f22d00ba857e2a93a243c" +HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}" +HTTP_BROTLI_MODULE_URI="https://github.com/eustas/ngx_brotli/archive/${HTTP_BROTLI_MODULE_PV}.tar.gz" +HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_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.33" +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.3" +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.15" +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="9aecf15ec379fe98f62355c57b60c0bc83296f04" +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}" + +# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license) +HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="46d85558e344dfe2b078ce757fd36c69a1ec2dd3" +HTTP_VHOST_TRAFFIC_STATUS_MODULE_P="ngx_http_vhost_traffic_status-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" +HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI="https://github.com/vozlt/nginx-module-vts/archive/${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}.tar.gz" +HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD="${WORKDIR}/nginx-module-vts-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" + +# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) +HTTP_NAXSI_MODULE_PV="0.56" +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.1" +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="3.0.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.62rc1" +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.3" +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.4" +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.19" +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="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c" +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}" + +# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2) +GEOIP2_MODULE_PV="3.3" +GEOIP2_MODULE_P="ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" +GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOIP2_MODULE_PV}.tar.gz" +GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" + +# njs-module (https://github.com/nginx/njs, as-is) +NJS_MODULE_PV="0.4.0" +NJS_MODULE_P="njs-${NJS_MODULE_PV}" +NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" +NJS_MODULE_WD="${WORKDIR}/njs-${NJS_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 pax-utils + +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_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz ) + nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) + nginx_modules_http_brotli? ( ${HTTP_BROTLI_MODULE_URI} -> ${HTTP_BROTLI_MODULE_P}.tar.gz ) + nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_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_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) + nginx_modules_http_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) + nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) + nginx_modules_http_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) + nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) + nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz ) + nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) + nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz ) + nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz ) + nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) + nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) + nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) + nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) + nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) + nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) + nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz ) + nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) + nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) + rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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 ~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 grpc 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_auth_ldap + http_auth_pam + http_brotli + http_cache_purge + http_dav_ext + http_echo + http_fancyindex + http_geoip2 + http_headers_more + http_javascript + http_lua + http_memc + http_metrics + http_mogilefs + http_naxsi + http_push_stream + http_security + http_slowfs_cache + http_sticky + http_upload_progress + http_upstream_check + http_vhost_traffic_status + stream_geoip2 + stream_javascript +" + +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_brotli? ( app-arch/brotli:= ) + nginx_modules_http_geoip? ( dev-libs/geoip ) + nginx_modules_http_geoip2? ( dev-libs/libmaxminddb:= ) + 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? ( dev-lang/luajit:2= ) + nginx_modules_http_auth_pam? ( sys-libs/pam ) + nginx_modules_http_metrics? ( dev-libs/yajl:= ) + nginx_modules_http_dav_ext? ( dev-libs/libxml2 ) + 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?] ) + nginx_modules_stream_geoip? ( dev-libs/geoip ) + nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nginx ) + !www-servers/nginx:0" +DEPEND="${CDEPEND} + nginx_modules_http_brotli? ( virtual/pkgconfig ) + 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_fancyindex? ( nginx_modules_http_addition ) + nginx_modules_http_grpc? ( http2 ) + nginx_modules_http_lua? ( + luajit + nginx_modules_http_rewrite + ) + nginx_modules_http_naxsi? ( pcre ) + nginx_modules_http_dav_ext? ( nginx_modules_http_dav nginx_modules_http_xslt ) + 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_auth_pam; then + cd "${HTTP_AUTH_PAM_MODULE_WD}" || die + eapply "${FILESDIR}"/http_auth_pam-1.5.1-adjust-loglevel-for-authentication-failures.patch + cd "${S}" || die + fi + + if use nginx_modules_http_brotli; then + cd "${HTTP_BROTLI_MODULE_WD}" || die + eapply "${FILESDIR}"/http_brotli-detect-brotli-r2.patch + cd "${S}" || die + fi + + if use nginx_modules_http_upstream_check; then + eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch + fi + + if use nginx_modules_http_cache_purge; then + cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die + eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch + cd "${S}" || die + 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 + export LUAJIT_LIB=$(pkg-config --variable libdir luajit) + export LUAJIT_INC=$(pkg-config --variable includedir luajit) + 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 nginx_modules_http_vhost_traffic_status; then + http_enabled=1 + myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} ) + fi + + if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then + myconf+=( --add-module=${GEOIP2_MODULE_WD} ) + fi + + if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then + myconf+=( --add-module="${NJS_MODULE_WD}/nginx" ) + fi + + if use nginx_modules_http_brotli; then + http_enabled=1 + myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} ) + fi + + if use http || use http-cache || use http2 || use nginx_modules_http_javascript; 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 use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then + stream_enabled=1 + fi + + 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 + + if [[ -n "${EXTRA_ECONF}" ]]; then + myconf+=( ${EXTRA_ECONF} ) + ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!" + 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 "${ED%/}"/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 + + # Don't create /run + rm -rf "${ED%/}"/run || die + + if use luajit; then + pax-mark m "${ED%/}/usr/sbin/nginx" + fi + + 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.md,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 https://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/nginx/nginx-1.17.10.ebuild b/www-servers/nginx/nginx-1.17.10.ebuild deleted file mode 100644 index 6cda406abe2b..000000000000 --- a/www-servers/nginx/nginx-1.17.10.ebuild +++ /dev/null @@ -1,1093 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# 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.1" -DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" -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}" - -# ngx_brotli (https://github.com/eustas/ngx_brotli, BSD-2) -HTTP_BROTLI_MODULE_PV="8104036af9cff4b1d34f22d00ba857e2a93a243c" -HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}" -HTTP_BROTLI_MODULE_URI="https://github.com/eustas/ngx_brotli/archive/${HTTP_BROTLI_MODULE_PV}.tar.gz" -HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_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.33" -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.3" -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.15" -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="9aecf15ec379fe98f62355c57b60c0bc83296f04" -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}" - -# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license) -HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="46d85558e344dfe2b078ce757fd36c69a1ec2dd3" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_P="ngx_http_vhost_traffic_status-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI="https://github.com/vozlt/nginx-module-vts/archive/${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}.tar.gz" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD="${WORKDIR}/nginx-module-vts-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" - -# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) -HTTP_NAXSI_MODULE_PV="0.56" -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.1" -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="3.0.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.62rc1" -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.3" -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.4" -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.19" -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="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c" -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}" - -# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2) -GEOIP2_MODULE_PV="3.3" -GEOIP2_MODULE_P="ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" -GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOIP2_MODULE_PV}.tar.gz" -GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" - -# njs-module (https://github.com/nginx/njs, as-is) -NJS_MODULE_PV="0.3.9" -NJS_MODULE_P="njs-${NJS_MODULE_PV}" -NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" -NJS_MODULE_WD="${WORKDIR}/njs-${NJS_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 pax-utils - -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_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz ) - nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) - nginx_modules_http_brotli? ( ${HTTP_BROTLI_MODULE_URI} -> ${HTTP_BROTLI_MODULE_P}.tar.gz ) - nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_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_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) - nginx_modules_http_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) - nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) - nginx_modules_http_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) - nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) - nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz ) - nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) - nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz ) - nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz ) - nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) - nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) - nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) - nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) - nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) - nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) - nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz ) - nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) - nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) - rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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 ~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 grpc 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_auth_ldap - http_auth_pam - http_brotli - http_cache_purge - http_dav_ext - http_echo - http_fancyindex - http_geoip2 - http_headers_more - http_javascript - http_lua - http_memc - http_metrics - http_mogilefs - http_naxsi - http_push_stream - http_security - http_slowfs_cache - http_sticky - http_upload_progress - http_upstream_check - http_vhost_traffic_status - stream_geoip2 - stream_javascript -" - -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_brotli? ( app-arch/brotli:= ) - nginx_modules_http_geoip? ( dev-libs/geoip ) - nginx_modules_http_geoip2? ( dev-libs/libmaxminddb:= ) - 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? ( dev-lang/luajit:2= ) - nginx_modules_http_auth_pam? ( sys-libs/pam ) - nginx_modules_http_metrics? ( dev-libs/yajl:= ) - nginx_modules_http_dav_ext? ( dev-libs/libxml2 ) - 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?] ) - nginx_modules_stream_geoip? ( dev-libs/geoip ) - nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-nginx ) - !www-servers/nginx:0" -DEPEND="${CDEPEND} - nginx_modules_http_brotli? ( virtual/pkgconfig ) - 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_fancyindex? ( nginx_modules_http_addition ) - nginx_modules_http_grpc? ( http2 ) - nginx_modules_http_lua? ( - luajit - nginx_modules_http_rewrite - ) - nginx_modules_http_naxsi? ( pcre ) - nginx_modules_http_dav_ext? ( nginx_modules_http_dav nginx_modules_http_xslt ) - 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_auth_pam; then - cd "${HTTP_AUTH_PAM_MODULE_WD}" || die - eapply "${FILESDIR}"/http_auth_pam-1.5.1-adjust-loglevel-for-authentication-failures.patch - cd "${S}" || die - fi - - if use nginx_modules_http_brotli; then - cd "${HTTP_BROTLI_MODULE_WD}" || die - eapply "${FILESDIR}"/http_brotli-detect-brotli-r2.patch - cd "${S}" || die - fi - - if use nginx_modules_http_upstream_check; then - eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch - fi - - if use nginx_modules_http_cache_purge; then - cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die - eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch - cd "${S}" || die - 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 - export LUAJIT_LIB=$(pkg-config --variable libdir luajit) - export LUAJIT_INC=$(pkg-config --variable includedir luajit) - 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 nginx_modules_http_vhost_traffic_status; then - http_enabled=1 - myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} ) - fi - - if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then - myconf+=( --add-module=${GEOIP2_MODULE_WD} ) - fi - - if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then - myconf+=( --add-module="${NJS_MODULE_WD}/nginx" ) - fi - - if use nginx_modules_http_brotli; then - http_enabled=1 - myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} ) - fi - - if use http || use http-cache || use http2 || use nginx_modules_http_javascript; 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 use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then - stream_enabled=1 - fi - - 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 - - if [[ -n "${EXTRA_ECONF}" ]]; then - myconf+=( ${EXTRA_ECONF} ) - ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!" - 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 "${ED%/}"/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 - - # Don't create /run - rm -rf "${ED%/}"/run || die - - if use luajit; then - pax-mark m "${ED%/}/usr/sbin/nginx" - fi - - 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.md,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 https://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/nginx/nginx-1.17.9-r2.ebuild b/www-servers/nginx/nginx-1.17.9-r2.ebuild deleted file mode 100644 index 6cda406abe2b..000000000000 --- a/www-servers/nginx/nginx-1.17.9-r2.ebuild +++ /dev/null @@ -1,1093 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# 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.1" -DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" -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}" - -# ngx_brotli (https://github.com/eustas/ngx_brotli, BSD-2) -HTTP_BROTLI_MODULE_PV="8104036af9cff4b1d34f22d00ba857e2a93a243c" -HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}" -HTTP_BROTLI_MODULE_URI="https://github.com/eustas/ngx_brotli/archive/${HTTP_BROTLI_MODULE_PV}.tar.gz" -HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_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.33" -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.3" -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.15" -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="9aecf15ec379fe98f62355c57b60c0bc83296f04" -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}" - -# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license) -HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="46d85558e344dfe2b078ce757fd36c69a1ec2dd3" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_P="ngx_http_vhost_traffic_status-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI="https://github.com/vozlt/nginx-module-vts/archive/${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}.tar.gz" -HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD="${WORKDIR}/nginx-module-vts-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" - -# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) -HTTP_NAXSI_MODULE_PV="0.56" -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.1" -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="3.0.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.62rc1" -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.3" -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.4" -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.19" -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="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c" -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}" - -# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2) -GEOIP2_MODULE_PV="3.3" -GEOIP2_MODULE_P="ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" -GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOIP2_MODULE_PV}.tar.gz" -GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" - -# njs-module (https://github.com/nginx/njs, as-is) -NJS_MODULE_PV="0.3.9" -NJS_MODULE_P="njs-${NJS_MODULE_PV}" -NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" -NJS_MODULE_WD="${WORKDIR}/njs-${NJS_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 pax-utils - -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_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz ) - nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) - nginx_modules_http_brotli? ( ${HTTP_BROTLI_MODULE_URI} -> ${HTTP_BROTLI_MODULE_P}.tar.gz ) - nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_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_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) - nginx_modules_http_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) - nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) - nginx_modules_http_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) - nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) - nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz ) - nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) - nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz ) - nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz ) - nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) - nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) - nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) - nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) - nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) - nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) - nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz ) - nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) - nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) - rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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 ~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 grpc 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_auth_ldap - http_auth_pam - http_brotli - http_cache_purge - http_dav_ext - http_echo - http_fancyindex - http_geoip2 - http_headers_more - http_javascript - http_lua - http_memc - http_metrics - http_mogilefs - http_naxsi - http_push_stream - http_security - http_slowfs_cache - http_sticky - http_upload_progress - http_upstream_check - http_vhost_traffic_status - stream_geoip2 - stream_javascript -" - -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_brotli? ( app-arch/brotli:= ) - nginx_modules_http_geoip? ( dev-libs/geoip ) - nginx_modules_http_geoip2? ( dev-libs/libmaxminddb:= ) - 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? ( dev-lang/luajit:2= ) - nginx_modules_http_auth_pam? ( sys-libs/pam ) - nginx_modules_http_metrics? ( dev-libs/yajl:= ) - nginx_modules_http_dav_ext? ( dev-libs/libxml2 ) - 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?] ) - nginx_modules_stream_geoip? ( dev-libs/geoip ) - nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-nginx ) - !www-servers/nginx:0" -DEPEND="${CDEPEND} - nginx_modules_http_brotli? ( virtual/pkgconfig ) - 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_fancyindex? ( nginx_modules_http_addition ) - nginx_modules_http_grpc? ( http2 ) - nginx_modules_http_lua? ( - luajit - nginx_modules_http_rewrite - ) - nginx_modules_http_naxsi? ( pcre ) - nginx_modules_http_dav_ext? ( nginx_modules_http_dav nginx_modules_http_xslt ) - 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_auth_pam; then - cd "${HTTP_AUTH_PAM_MODULE_WD}" || die - eapply "${FILESDIR}"/http_auth_pam-1.5.1-adjust-loglevel-for-authentication-failures.patch - cd "${S}" || die - fi - - if use nginx_modules_http_brotli; then - cd "${HTTP_BROTLI_MODULE_WD}" || die - eapply "${FILESDIR}"/http_brotli-detect-brotli-r2.patch - cd "${S}" || die - fi - - if use nginx_modules_http_upstream_check; then - eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch - fi - - if use nginx_modules_http_cache_purge; then - cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die - eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch - cd "${S}" || die - 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 - export LUAJIT_LIB=$(pkg-config --variable libdir luajit) - export LUAJIT_INC=$(pkg-config --variable includedir luajit) - 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 nginx_modules_http_vhost_traffic_status; then - http_enabled=1 - myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} ) - fi - - if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then - myconf+=( --add-module=${GEOIP2_MODULE_WD} ) - fi - - if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then - myconf+=( --add-module="${NJS_MODULE_WD}/nginx" ) - fi - - if use nginx_modules_http_brotli; then - http_enabled=1 - myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} ) - fi - - if use http || use http-cache || use http2 || use nginx_modules_http_javascript; 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 use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then - stream_enabled=1 - fi - - 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 - - if [[ -n "${EXTRA_ECONF}" ]]; then - myconf+=( ${EXTRA_ECONF} ) - ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!" - 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 "${ED%/}"/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 - - # Don't create /run - rm -rf "${ED%/}"/run || die - - if use luajit; then - pax-mark m "${ED%/}/usr/sbin/nginx" - fi - - 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.md,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 https://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/nginx/nginx-1.18.0.ebuild b/www-servers/nginx/nginx-1.18.0.ebuild new file mode 100644 index 000000000000..58f5c9d92b29 --- /dev/null +++ b/www-servers/nginx/nginx-1.18.0.ebuild @@ -0,0 +1,1093 @@ +# Copyright 1999-2020 Gentoo Authors +# 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.1" +DEVEL_KIT_MODULE_P="ngx_devel_kit-${DEVEL_KIT_MODULE_PV}" +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}" + +# ngx_brotli (https://github.com/eustas/ngx_brotli, BSD-2) +HTTP_BROTLI_MODULE_PV="8104036af9cff4b1d34f22d00ba857e2a93a243c" +HTTP_BROTLI_MODULE_P="ngx_brotli-${HTTP_BROTLI_MODULE_PV}" +HTTP_BROTLI_MODULE_URI="https://github.com/eustas/ngx_brotli/archive/${HTTP_BROTLI_MODULE_PV}.tar.gz" +HTTP_BROTLI_MODULE_WD="${WORKDIR}/ngx_brotli-${HTTP_BROTLI_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.33" +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.3" +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.15" +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="9aecf15ec379fe98f62355c57b60c0bc83296f04" +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}" + +# http_vhost_traffic_status (https://github.com/vozlt/nginx-module-vts, BSD license) +HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV="46d85558e344dfe2b078ce757fd36c69a1ec2dd3" +HTTP_VHOST_TRAFFIC_STATUS_MODULE_P="ngx_http_vhost_traffic_status-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" +HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI="https://github.com/vozlt/nginx-module-vts/archive/${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}.tar.gz" +HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD="${WORKDIR}/nginx-module-vts-${HTTP_VHOST_TRAFFIC_STATUS_MODULE_PV}" + +# naxsi-core (https://github.com/nbs-system/naxsi, GPLv2+) +HTTP_NAXSI_MODULE_PV="0.56" +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.1" +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="3.0.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.62rc1" +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.3" +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.4" +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.19" +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="42d195d7a7575ebab1c369ad3fc5d78dc2c2669c" +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}" + +# geoip2 (https://github.com/leev/ngx_http_geoip2_module, BSD-2) +GEOIP2_MODULE_PV="3.3" +GEOIP2_MODULE_P="ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" +GEOIP2_MODULE_URI="https://github.com/leev/ngx_http_geoip2_module/archive/${GEOIP2_MODULE_PV}.tar.gz" +GEOIP2_MODULE_WD="${WORKDIR}/ngx_http_geoip2_module-${GEOIP2_MODULE_PV}" + +# njs-module (https://github.com/nginx/njs, as-is) +NJS_MODULE_PV="0.4.0" +NJS_MODULE_P="njs-${NJS_MODULE_PV}" +NJS_MODULE_URI="https://github.com/nginx/njs/archive/${NJS_MODULE_PV}.tar.gz" +NJS_MODULE_WD="${WORKDIR}/njs-${NJS_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 pax-utils + +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_auth_ldap? ( ${HTTP_LDAP_MODULE_URI} -> ${HTTP_LDAP_MODULE_P}.tar.gz ) + nginx_modules_http_auth_pam? ( ${HTTP_AUTH_PAM_MODULE_URI} -> ${HTTP_AUTH_PAM_MODULE_P}.tar.gz ) + nginx_modules_http_brotli? ( ${HTTP_BROTLI_MODULE_URI} -> ${HTTP_BROTLI_MODULE_P}.tar.gz ) + nginx_modules_http_cache_purge? ( ${HTTP_CACHE_PURGE_MODULE_URI} -> ${HTTP_CACHE_PURGE_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_fancyindex? ( ${HTTP_FANCYINDEX_MODULE_URI} -> ${HTTP_FANCYINDEX_MODULE_P}.tar.gz ) + nginx_modules_http_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) + nginx_modules_http_headers_more? ( ${HTTP_HEADERS_MORE_MODULE_URI} -> ${HTTP_HEADERS_MORE_MODULE_P}.tar.gz ) + nginx_modules_http_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) + nginx_modules_http_lua? ( ${HTTP_LUA_MODULE_URI} -> ${HTTP_LUA_MODULE_P}.tar.gz ) + nginx_modules_http_memc? ( ${HTTP_MEMC_MODULE_URI} -> ${HTTP_MEMC_MODULE_P}.tar.gz ) + nginx_modules_http_metrics? ( ${HTTP_METRICS_MODULE_URI} -> ${HTTP_METRICS_MODULE_P}.tar.gz ) + nginx_modules_http_mogilefs? ( ${HTTP_MOGILEFS_MODULE_URI} -> ${HTTP_MOGILEFS_MODULE_P}.tar.gz ) + nginx_modules_http_naxsi? ( ${HTTP_NAXSI_MODULE_URI} -> ${HTTP_NAXSI_MODULE_P}.tar.gz ) + nginx_modules_http_push_stream? ( ${HTTP_PUSH_STREAM_MODULE_URI} -> ${HTTP_PUSH_STREAM_MODULE_P}.tar.gz ) + nginx_modules_http_security? ( ${HTTP_SECURITY_MODULE_URI} -> ${HTTP_SECURITY_MODULE_P}.tar.gz ) + nginx_modules_http_slowfs_cache? ( ${HTTP_SLOWFS_CACHE_MODULE_URI} -> ${HTTP_SLOWFS_CACHE_MODULE_P}.tar.gz ) + nginx_modules_http_sticky? ( ${HTTP_STICKY_MODULE_URI} -> ${HTTP_STICKY_MODULE_P}.tar.bz2 ) + nginx_modules_http_upload_progress? ( ${HTTP_UPLOAD_PROGRESS_MODULE_URI} -> ${HTTP_UPLOAD_PROGRESS_MODULE_P}.tar.gz ) + nginx_modules_http_upstream_check? ( ${HTTP_UPSTREAM_CHECK_MODULE_URI} -> ${HTTP_UPSTREAM_CHECK_MODULE_P}.tar.gz ) + nginx_modules_http_vhost_traffic_status? ( ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_URI} -> ${HTTP_VHOST_TRAFFIC_STATUS_MODULE_P}.tar.gz ) + nginx_modules_stream_geoip2? ( ${GEOIP2_MODULE_URI} -> ${GEOIP2_MODULE_P}.tar.gz ) + nginx_modules_stream_javascript? ( ${NJS_MODULE_URI} -> ${NJS_MODULE_P}.tar.gz ) + rtmp? ( ${RTMP_MODULE_URI} -> ${RTMP_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="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~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 grpc 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_auth_ldap + http_auth_pam + http_brotli + http_cache_purge + http_dav_ext + http_echo + http_fancyindex + http_geoip2 + http_headers_more + http_javascript + http_lua + http_memc + http_metrics + http_mogilefs + http_naxsi + http_push_stream + http_security + http_slowfs_cache + http_sticky + http_upload_progress + http_upstream_check + http_vhost_traffic_status + stream_geoip2 + stream_javascript +" + +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_brotli? ( app-arch/brotli:= ) + nginx_modules_http_geoip? ( dev-libs/geoip ) + nginx_modules_http_geoip2? ( dev-libs/libmaxminddb:= ) + 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? ( dev-lang/luajit:2= ) + nginx_modules_http_auth_pam? ( sys-libs/pam ) + nginx_modules_http_metrics? ( dev-libs/yajl:= ) + nginx_modules_http_dav_ext? ( dev-libs/libxml2 ) + 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?] ) + nginx_modules_stream_geoip? ( dev-libs/geoip ) + nginx_modules_stream_geoip2? ( dev-libs/libmaxminddb:= )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-nginx ) + !www-servers/nginx:mainline" +DEPEND="${CDEPEND} + nginx_modules_http_brotli? ( virtual/pkgconfig ) + 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_fancyindex? ( nginx_modules_http_addition ) + nginx_modules_http_grpc? ( http2 ) + nginx_modules_http_lua? ( + luajit + nginx_modules_http_rewrite + ) + nginx_modules_http_naxsi? ( pcre ) + nginx_modules_http_dav_ext? ( nginx_modules_http_dav nginx_modules_http_xslt ) + 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_auth_pam; then + cd "${HTTP_AUTH_PAM_MODULE_WD}" || die + eapply "${FILESDIR}"/http_auth_pam-1.5.1-adjust-loglevel-for-authentication-failures.patch + cd "${S}" || die + fi + + if use nginx_modules_http_brotli; then + cd "${HTTP_BROTLI_MODULE_WD}" || die + eapply "${FILESDIR}"/http_brotli-detect-brotli-r2.patch + cd "${S}" || die + fi + + if use nginx_modules_http_upstream_check; then + eapply -p0 "${FILESDIR}"/http_upstream_check-nginx-1.11.5+.patch + fi + + if use nginx_modules_http_cache_purge; then + cd "${HTTP_CACHE_PURGE_MODULE_WD}" || die + eapply "${FILESDIR}"/http_cache_purge-1.11.6+.patch + cd "${S}" || die + 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 + export LUAJIT_LIB=$(pkg-config --variable libdir luajit) + export LUAJIT_INC=$(pkg-config --variable includedir luajit) + 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 nginx_modules_http_vhost_traffic_status; then + http_enabled=1 + myconf+=( --add-module=${HTTP_VHOST_TRAFFIC_STATUS_MODULE_WD} ) + fi + + if use nginx_modules_http_geoip2 || use nginx_modules_stream_geoip2; then + myconf+=( --add-module=${GEOIP2_MODULE_WD} ) + fi + + if use nginx_modules_http_javascript || use nginx_modules_stream_javascript; then + myconf+=( --add-module="${NJS_MODULE_WD}/nginx" ) + fi + + if use nginx_modules_http_brotli; then + http_enabled=1 + myconf+=( --add-module=${HTTP_BROTLI_MODULE_WD} ) + fi + + if use http || use http-cache || use http2 || use nginx_modules_http_javascript; 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 use nginx_modules_stream_geoip2 || use nginx_modules_stream_javascript; then + stream_enabled=1 + fi + + 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 + + if [[ -n "${EXTRA_ECONF}" ]]; then + myconf+=( ${EXTRA_ECONF} ) + ewarn "EXTRA_ECONF applied. Now you are on your own, good luck!" + 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 "${ED%/}"/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 + + # Don't create /run + rm -rf "${ED%/}"/run || die + + if use luajit; then + pax-mark m "${ED%/}/usr/sbin/nginx" + fi + + 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.md,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 https://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 9698553fae91..db7da41c4b40 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -1,4 +1,3 @@ -AUX tomcat-7.0.94-build.xml.patch 5966 BLAKE2B 01e253b0597e7353eaa38b5af29f4f6db4161fbe91aa1a46e2b8412f37cb66a10c06a14291e1c49ea108f7fbbff538e1c605829de8ee20d85a57d9c6122e4436 SHA512 66e001d705a7081461a3ddb9477e857b7fb87676b1ebc3eaa4bbf7f6a1e8f88f7eae4fc49a8a5b7a7baebc2258acc2bd0fe11d3683716021430e4a9dcd367b43 AUX tomcat-7.0.99-build.xml.patch 5913 BLAKE2B 21316c4ce76bd3e87c2749354cbd455c1322431649b276b59a93f10b97f59d03690f3531c2fd3a8ce67b81969544d498bf04e829407005dbed867067f8970347 SHA512 f8d0cb4ba0effdeea3db4049381efc84513551a1e28551b59a254340a8add306824d1dba344f6eaddc93e8b61fc0b71e1a8d0bcfc860500134cc19072deef30e AUX tomcat-8.5.47-build.xml.patch 10363 BLAKE2B 8f851b5eaa4ffb3073ee526122ef278f8e975e263b439140748ba774152a72712b6bc78d6568d097befac4ba56bc6a1721f14dd0a85d288e88621f49819e1a97 SHA512 236df8ce63e7e48293584868c140d4ba5160172cc19bd90eeacd6f14e08663b7c750f95fb24ab1eddf7c7a2a80e2f05e5470261159f3c95d3b22bd790b2f6b89 AUX tomcat-9.0.27-build.xml.patch 10936 BLAKE2B a75c4635744b1815d5f4df29ac6bbb2afebf752c7b43cda2cd69c2cbe66100b10e04fe8a4306e2c166a6b2159091a7c7a4b88d299ea7d408e6af04c8b552ea8f SHA512 e1a68955dc6a89e1751cb429d44a19501644425b1a7553c0021255016bf69c58b64059267dab91457e78573e9dce01c3f3abe0f776d69bbf35d1c36c0535e1ce @@ -6,20 +5,16 @@ AUX tomcat-instance-manager-r1.bash 6451 BLAKE2B 3bcd9dd4d3360a91f4a548c050eab6f AUX tomcat-instance-manager-r2.bash 6999 BLAKE2B f1c771678bd8b894ecf242d5a8fb22f5b2f0f33445a1ff158c242b5154edc4483a5707ce33a5dcee53a3106e631ad8218243d8b72a32a10cd99e9646fa54085d SHA512 c30c156cbf2b53cf8498288bacaedd48872dce52f461ff32071310b438bdb5015c1cd1d512a2905c4db01e2b22342590e1b8aeadbd44f29062606fabbb2f2fed AUX tomcat-r1.init 3200 BLAKE2B eb913d32bb8c1883e58551a25ff9516337d947c6fd2c7b449601a89a4518286d61dbca76417265289782a7a08540d8e78a3ea1cd1427d43d87e24813261c0fee SHA512 3d32e2ad998adfbaea5fe0ffcbbe6659dcb530a110faed5f2712ae2fd767353b1fc3f1ac83a24d43138c1bfc55949e645833a428ab982be14415887fc46d9fab AUX tomcat.conf 1811 BLAKE2B a92606e113172c6f0f73e18ab8ad8796f38bd8c741bb2fd1f6c43d7682728729d0198d4150e42282c7e732750231b7cdbfb51de9b24f2ba780a22700965113c5 SHA512 0747dd2fdad6c68123425adce39f625d34924ae3e7c9d5a00361565a593047d7a4d01dee64c1ef831e5ad79b51750babaf642b0588d4b5948bbed441d53d654d -DIST apache-tomcat-7.0.100-src.tar.gz 5265444 BLAKE2B 9c706e6a50e13cd8f542669e2d80f8940816976cfb84f62c3e17bbe6f0cc6d76d6fcdd18ec69e706ce27552aa66041833f6ae7bba8e671e187de3246e90a25c5 SHA512 53ef64c64263d0f25d72ed179bd7b7beed3f73cd63010988ba740ff7328b00a5ec09fe1d4575188ecacf258c891e022a0f1ae07d2957d9830a56881170bb1a57 DIST apache-tomcat-7.0.103-src.tar.gz 5279592 BLAKE2B a8ab36fb84cf158fcd8b888276576cd523d211ab0f6fe0933f600d1990a8f68076f192177a574987e52440037c0ebefd3edaf3c84fee541afb076c5ad33cce9b SHA512 812fce83c7242ebc16dc2365f0b363f1fb2691cd6a2f19f1209ea467557c42ee2d108c8bef89f23bb4a20c800d0ecdb4afc37567ef8079966b4eec0331a2ef9b -DIST apache-tomcat-8.5.51-src.tar.gz 5661227 BLAKE2B 711de5678903941a5261693972906f2d0fca2c9d3219e62d3186e5d71a2e3cb4da0a5028e62790a26dad2d244246c2f41c74f18e17d52ec0af070f0d5842ca3f SHA512 8529d2e7d83a863fe88ed4ee8ec29b673e5df4bea53231412c0d89e2384d3939b9d1f29350a4ca46966ab5d4a0d3178ed5d2caa50aa766092a3ab8f28dd27592 -DIST apache-tomcat-8.5.53-src.tar.gz 5676477 BLAKE2B 284ddc3b3d491a57aac31fc59a9c7d80bdb11efb410ab53eea5d3a0a754507203de287eff0a621d02bfea581b45b860598c8ab95d529ad18790fe381f5518cca SHA512 d78613042a9e4caa5b5eeebd2589383ef10312698e535e2c8f82e40c7b3d793ea6cac50f346316a84f4b47ad330f82c7a4f0e4a3d2f0d449f1d4dad9c6d5e267 DIST apache-tomcat-8.5.54-src.tar.gz 5689648 BLAKE2B 7d4c80cb86261bba46b1879d8f2b9218a63cfb069d32dfe72bd5d73baf87887cdff37c5841c44196ded1dbafcfe2d525cb09d8a15905c24600caf107255416cf SHA512 fe4a82fc58aed0df203abf03367f840d7ac498a3ba317eb2b08826e8ab5e705ea13b99f3af1e17878b2cf96271c5d9ff4e7cecf3b2631e061f1b02988449f9e2 -DIST apache-tomcat-9.0.33-src.tar.gz 5831264 BLAKE2B 7ef5b28dfc4f24003075012cfe6403060dfc908386577ea3dbab3d7a4eca1d22cdcaab3f821079a90d9407030bedf657f5abd9829d643f699ba875b7b702f0a3 SHA512 73ffb36dc7331bf9e455b599b128c51da8f90222bd3cb296e211d266c18964bf66004524725acd6d3e29099d2fdc3180892c228b2a00b06544455240bf05c9b0 +DIST apache-tomcat-8.5.55-src.tar.gz 5719386 BLAKE2B 4d5d20cf81e0a9aba1fe2b0fc2e9641696a2c7b4bfe1cefd1e86025612484ef06a8171e28722bcde91b671df5bd6e148b22c2fc267828109c6af762fe35f8fdb SHA512 214758bf4dc868c38fd92a19e405f3cd8e47008dee82610f8f7373d92ab5f8800c160a42c96c293f599b702c1c9d2967ca40d3410c1f6a14745edac4739f177d DIST apache-tomcat-9.0.34-src.tar.gz 5843244 BLAKE2B e4124c5986b0be26f17cf5e62443fa945ebea6dd713db6a7f96c8e4c7eed7d8e38610763adda928a7099c1574b00e072635576d9d29cc8ae1b98658f0e341acb SHA512 8ac8a916bfe2d3daf679dab9f299bc50f138f3cc9a6e8679a22862d122dea1e5ce3b9101472295398366f5b5d8477097a3cfb536f01136e72ff09d69b2f6c3df +DIST apache-tomcat-9.0.35-src.tar.gz 5887816 BLAKE2B 8103a50a62aa527861fdc35ce8256d9ff0b7185bfa647e25c30c226f9850e88632e0c1e3575bac3a07513fe9c9777b4ef230275e685f48b0bbc733bc68ff7dad SHA512 8931c0f7c30f50d352879f8dfddc02fa59d7128813399e4eca3994be7cf2448e32e726a3cb8b387a5470ccbfa3fb74d0192c825b5f68bbb9fb6b43a9353cb24a DIST biz.aQute.bnd-4.1.0.jar 9263260 BLAKE2B e251a9d8b653f3e815e6c2f7774d64f1d594f3ce4b2f77956c806698df4d873310067cece68663324b11fcef8d90796b087abb289dbe2a13164a9038da4a6260 SHA512 f5d230358840f4909e35de40343fb7ee50a2d4d4691691f5ea896cfe212a086ad4859e0ee6ed4c315211223663b2fb2c07af7ea88786cedbcd4f891e5a4589ef DIST biz.aQute.bndlib-4.1.0.jar 2897463 BLAKE2B c29a55e07cc103919dca1e938722bf94b107e2989a4a8ae887998152a93b641a659a5209129b992432bcb2673dd4b56ec9a929627530a631db10666f2177c0e4 SHA512 2acccbb323f3d740506e89a74c5affab85e628f9062ee0d799ccd09efe0b55436d8887a46d7d94ad636a2c793632635974f1bbb045e4789391937222c8d00d30 -EBUILD tomcat-7.0.100.ebuild 4204 BLAKE2B 933c63117433e3c57c394bfedbaf75c808f79d5b811a0d3580281658298d62c81a81b35c20be389d8135391a14cb68942749927f8b3c02063fdd89411a53f70b SHA512 8a5e1571002872eb6bd972c50ebfb721ad05a78a9176c7215f0ad9d4422109a2206d24d68ff7b82f62745c67d2416b5771af14f24e809a8c097aaaa44e7fd8e5 EBUILD tomcat-7.0.103.ebuild 4204 BLAKE2B 933c63117433e3c57c394bfedbaf75c808f79d5b811a0d3580281658298d62c81a81b35c20be389d8135391a14cb68942749927f8b3c02063fdd89411a53f70b SHA512 8a5e1571002872eb6bd972c50ebfb721ad05a78a9176c7215f0ad9d4422109a2206d24d68ff7b82f62745c67d2416b5771af14f24e809a8c097aaaa44e7fd8e5 -EBUILD tomcat-8.5.51.ebuild 4556 BLAKE2B 6a67a362e8fd98f7b233857abbcc2e85e3ce6911c795db4ba899932e62848c060f607b9bff66426dd0fbec9df91dcae959258ad813d4629ddede5c4986204ffb SHA512 de5dfd04a260674bab8c6d6dfbedc9684ad26a98994796472e694a1fa6105f55f721f97eb5ff3331a5c71182aa6874aa9be4bb0ee1fba427a6d7a0e2bdb25154 -EBUILD tomcat-8.5.53.ebuild 4556 BLAKE2B 6a67a362e8fd98f7b233857abbcc2e85e3ce6911c795db4ba899932e62848c060f607b9bff66426dd0fbec9df91dcae959258ad813d4629ddede5c4986204ffb SHA512 de5dfd04a260674bab8c6d6dfbedc9684ad26a98994796472e694a1fa6105f55f721f97eb5ff3331a5c71182aa6874aa9be4bb0ee1fba427a6d7a0e2bdb25154 -EBUILD tomcat-8.5.54.ebuild 4557 BLAKE2B f51f8359dd552c5ea5c0816062c91c29d68ffaaff765241f17cd037187ca8fd03c9c39f7c05a95a51a57d24bfe2445ef50434f3614c9b1c9e8c01ce6a42287cd SHA512 910c1f7cf60c79dc4f7546e7d153bb239f44cd5eac7021bd78d49205f8199d3d30cca8bcc21df171fa0663d88ae504e6f237184787d923a335bf64f6e2d0b4ae -EBUILD tomcat-9.0.33.ebuild 5479 BLAKE2B f9ca5f12da777e5a7c4022324f5dbd5e7c62607e1afd2888b9903307ae3af7a6b17fdc8ee7e82011291b4ca39fa59334754189e9abee646453bacbd497a92a03 SHA512 ce012dea0e52c29533191fc08436779309c6ce053d620c018c82d31fe26a8e5da9f39ebc64902ccd642577351c4093e23055306b3790ef107a512c01b0cdc639 +EBUILD tomcat-8.5.54.ebuild 4556 BLAKE2B 6a67a362e8fd98f7b233857abbcc2e85e3ce6911c795db4ba899932e62848c060f607b9bff66426dd0fbec9df91dcae959258ad813d4629ddede5c4986204ffb SHA512 de5dfd04a260674bab8c6d6dfbedc9684ad26a98994796472e694a1fa6105f55f721f97eb5ff3331a5c71182aa6874aa9be4bb0ee1fba427a6d7a0e2bdb25154 +EBUILD tomcat-8.5.55.ebuild 4557 BLAKE2B f51f8359dd552c5ea5c0816062c91c29d68ffaaff765241f17cd037187ca8fd03c9c39f7c05a95a51a57d24bfe2445ef50434f3614c9b1c9e8c01ce6a42287cd SHA512 910c1f7cf60c79dc4f7546e7d153bb239f44cd5eac7021bd78d49205f8199d3d30cca8bcc21df171fa0663d88ae504e6f237184787d923a335bf64f6e2d0b4ae EBUILD tomcat-9.0.34.ebuild 5479 BLAKE2B f9ca5f12da777e5a7c4022324f5dbd5e7c62607e1afd2888b9903307ae3af7a6b17fdc8ee7e82011291b4ca39fa59334754189e9abee646453bacbd497a92a03 SHA512 ce012dea0e52c29533191fc08436779309c6ce053d620c018c82d31fe26a8e5da9f39ebc64902ccd642577351c4093e23055306b3790ef107a512c01b0cdc639 +EBUILD tomcat-9.0.35.ebuild 5479 BLAKE2B f9ca5f12da777e5a7c4022324f5dbd5e7c62607e1afd2888b9903307ae3af7a6b17fdc8ee7e82011291b4ca39fa59334754189e9abee646453bacbd497a92a03 SHA512 ce012dea0e52c29533191fc08436779309c6ce053d620c018c82d31fe26a8e5da9f39ebc64902ccd642577351c4093e23055306b3790ef107a512c01b0cdc639 MISC metadata.xml 712 BLAKE2B 3e0a9b1bd07334015006678c0e1d933dc3d7b65291425754f7bcaec673f2316ba85b2e7df2c79a90f0d53dfbc443329cbea8ddfde7d4c93a1635b6140a3b18b6 SHA512 bc7c894d5f945a732078cc4d9a7fa9d0374ebb6aec449487f8968b22aed07bc5e20094448fda9be7516206121d0dfec8c6d6e48ee818786999703ea778a82109 diff --git a/www-servers/tomcat/files/tomcat-7.0.94-build.xml.patch b/www-servers/tomcat/files/tomcat-7.0.94-build.xml.patch deleted file mode 100644 index 832ce0be4a23..000000000000 --- a/www-servers/tomcat/files/tomcat-7.0.94-build.xml.patch +++ /dev/null @@ -1,163 +0,0 @@ -diff --git a/build.xml b/build.xml -index 92d8b92..790d8fd 100644 ---- a/build.xml -+++ b/build.xml -@@ -685,12 +685,14 @@ - - - -+ - - - -@@ -741,26 +743,32 @@ - manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> - - -+ - - -+ - - -+ - - - - - -- -+ filesId="files.tomcat-dbcp" /> --> - - - -- -+ - - - -@@ -1083,7 +1091,7 @@ - - - -- -+ - - - -@@ -1728,7 +1736,7 @@ - - -+ description="Prepare to build web services extras package" unless="noget"> - - - -@@ -1925,11 +1933,12 @@ - - - -+ - - - Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. -@@ -1941,6 +1950,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. - description="Create the Tomcat javadoc" > - -+ - - - -+ - - - -@@ -2658,7 +2671,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. - - - -+ description="Download components necessary to compile" unless="noget" > - - - -@@ -2683,7 +2696,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. - - - -+ description="Download additional components for the tests" unless="noget"> - - - -@@ -2747,7 +2760,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. - - - -+ description="Download additional components for a distribution" unless="noget"> - - - diff --git a/www-servers/tomcat/tomcat-7.0.100.ebuild b/www-servers/tomcat/tomcat-7.0.100.ebuild deleted file mode 100644 index 8fa804171b41..000000000000 --- a/www-servers/tomcat/tomcat-7.0.100.ebuild +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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.0/JSP-2.2 Container" -HOMEPAGE="https://tomcat.apache.org/" -SRC_URI="mirror://apache/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="7" -KEYWORDS="amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" -IUSE="extra-webapps websockets" - -RESTRICT="test" # can we run them on a production system? - -ECJ_SLOT="4.5" -SAPI_SLOT="3.0" - -COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} - ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT}" -RDEPEND="${COMMON_DEP} - virtual/jre" -DEPEND="${COMMON_DEP} - virtual/jdk:1.8 - test? ( dev-java/ant-junit:0 )" - -S=${WORKDIR}/${MY_P} - -pkg_setup() { - java-pkg-2_pkg_setup - enewgroup tomcat 265 - enewuser tomcat 265 -1 /dev/null tomcat -} - -src_prepare() { - default - - # Remove bundled servlet-api - rm -rv java/javax/{el,servlet} || die - - java-pkg_clean - - eapply "${FILESDIR}/${PN}-7.0.99-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_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="-r1" -INIT_REV="-r1" - -src_compile() { - use websockets && EANT_EXTRA_ARGS+=" -Djava.7.home=${JAVA_HOME}" - 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 ### - - 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=$(echo ${RANDOM}|md5sum|cut -c 1-15) - 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://wiki.gentoo.org/wiki/Apache_Tomcat and" - einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." -} diff --git a/www-servers/tomcat/tomcat-8.5.51.ebuild b/www-servers/tomcat/tomcat-8.5.51.ebuild deleted file mode 100644 index 688cb7615768..000000000000 --- a/www-servers/tomcat/tomcat-8.5.51.ebuild +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~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-${PV}:${SAPI_SLOT}" -RDEPEND="${COMMON_DEP} - virtual/jre" -DEPEND="${COMMON_DEP} - app-admin/pwgen - >=dev-java/ant-core-1.9.13 - 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 - - eapply "${FILESDIR}/${PN}-8.5.47-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://wiki.gentoo.org/wiki/Apache_Tomcat and" - einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." -} diff --git a/www-servers/tomcat/tomcat-8.5.53.ebuild b/www-servers/tomcat/tomcat-8.5.53.ebuild deleted file mode 100644 index 688cb7615768..000000000000 --- a/www-servers/tomcat/tomcat-8.5.53.ebuild +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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 ~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-${PV}:${SAPI_SLOT}" -RDEPEND="${COMMON_DEP} - virtual/jre" -DEPEND="${COMMON_DEP} - app-admin/pwgen - >=dev-java/ant-core-1.9.13 - 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 - - eapply "${FILESDIR}/${PN}-8.5.47-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://wiki.gentoo.org/wiki/Apache_Tomcat and" - einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." -} diff --git a/www-servers/tomcat/tomcat-8.5.54.ebuild b/www-servers/tomcat/tomcat-8.5.54.ebuild index 4bdde891a689..688cb7615768 100644 --- a/www-servers/tomcat/tomcat-8.5.54.ebuild +++ b/www-servers/tomcat/tomcat-8.5.54.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.5" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" +KEYWORDS="amd64 ~x86 ~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.5.55.ebuild b/www-servers/tomcat/tomcat-8.5.55.ebuild new file mode 100644 index 000000000000..4bdde891a689 --- /dev/null +++ b/www-servers/tomcat/tomcat-8.5.55.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +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 ~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-${PV}:${SAPI_SLOT}" +RDEPEND="${COMMON_DEP} + virtual/jre" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=dev-java/ant-core-1.9.13 + 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 + + eapply "${FILESDIR}/${PN}-8.5.47-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://wiki.gentoo.org/wiki/Apache_Tomcat and" + einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." +} diff --git a/www-servers/tomcat/tomcat-9.0.33.ebuild b/www-servers/tomcat/tomcat-9.0.33.ebuild deleted file mode 100644 index b0c29cb19e68..000000000000 --- a/www-servers/tomcat/tomcat-9.0.33.ebuild +++ /dev/null @@ -1,181 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -JAVA_PKG_IUSE="doc source test" - -inherit eutils java-pkg-2 java-ant-2 prefix user - -MY_P="apache-${PN}-${PV}-src" - -# Currently we bundle binary versions of bnd.jar and bndlib.jar -# See bugs #203080 and #676116 -BND_VERSION="4.1.0" -BND="biz.aQute.bnd-${BND_VERSION}.jar" -BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" - -DESCRIPTION="Tomcat Servlet-4.0/JSP-2.4?/EL-3.1?/WebSocket-1.2?/JASPIC-1.1 Container" -HOMEPAGE="https://tomcat.apache.org/" -SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz - https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND} - https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}" - -LICENSE="Apache-2.0" -SLOT="9" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" -IUSE="extra-webapps" - -RESTRICT="test" # can we run them on a production system? - -ECJ_SLOT="4.13" -SAPI_SLOT="4.0" - -COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} - dev-java/glassfish-xmlrpc-api:0 - ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT} - dev-java/wsdl4j:0" -RDEPEND="${COMMON_DEP} - virtual/jre" -DEPEND="${COMMON_DEP} - app-admin/pwgen - >=dev-java/ant-core-1.9.13 - virtual/jdk:1.8 - test? ( - >=dev-java/ant-junit-1.9:0 - dev-java/easymock:3.2 - )" - -S=${WORKDIR}/${MY_P} - -BND_HOME="${S}/tomcat-build-libs/bnd" -BNDLIB_HOME="${S}/tomcat-build-libs/bndlib" -BND_JAR="${BND_HOME}/${BND}" -BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}" - -src_unpack() { - unpack ${MY_P}.tar.gz - - mkdir -p "${BND_HOME}" "${BNDLIB_HOME}" || die "Failed to create dir" - ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar" - ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar" -} - -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 - - eapply "${FILESDIR}/${PN}-9.0.27-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},glassfish-xmlrpc-api,wsdl4j" -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 -Dbnd.jar=${BND_JAR} -Dbndlib.jar=${BNDLIB_JAR}" - -# 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://wiki.gentoo.org/wiki/Apache_Tomcat and" - einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." -} diff --git a/www-servers/tomcat/tomcat-9.0.35.ebuild b/www-servers/tomcat/tomcat-9.0.35.ebuild new file mode 100644 index 000000000000..b0c29cb19e68 --- /dev/null +++ b/www-servers/tomcat/tomcat-9.0.35.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils java-pkg-2 java-ant-2 prefix user + +MY_P="apache-${PN}-${PV}-src" + +# Currently we bundle binary versions of bnd.jar and bndlib.jar +# See bugs #203080 and #676116 +BND_VERSION="4.1.0" +BND="biz.aQute.bnd-${BND_VERSION}.jar" +BNDLIB="biz.aQute.bndlib-${BND_VERSION}.jar" + +DESCRIPTION="Tomcat Servlet-4.0/JSP-2.4?/EL-3.1?/WebSocket-1.2?/JASPIC-1.1 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz + https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bnd/${BND_VERSION}/${BND} + https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/${BND_VERSION}/${BNDLIB}" + +LICENSE="Apache-2.0" +SLOT="9" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.13" +SAPI_SLOT="4.0" + +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/glassfish-xmlrpc-api:0 + ~dev-java/tomcat-servlet-api-${PV}:${SAPI_SLOT} + dev-java/wsdl4j:0" +RDEPEND="${COMMON_DEP} + virtual/jre" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=dev-java/ant-core-1.9.13 + virtual/jdk:1.8 + test? ( + >=dev-java/ant-junit-1.9:0 + dev-java/easymock:3.2 + )" + +S=${WORKDIR}/${MY_P} + +BND_HOME="${S}/tomcat-build-libs/bnd" +BNDLIB_HOME="${S}/tomcat-build-libs/bndlib" +BND_JAR="${BND_HOME}/${BND}" +BNDLIB_JAR="${BNDLIB_HOME}/${BND_LIB}" + +src_unpack() { + unpack ${MY_P}.tar.gz + + mkdir -p "${BND_HOME}" "${BNDLIB_HOME}" || die "Failed to create dir" + ln -s "${DISTDIR}/${BND}" "${BND_HOME}/" || die "Failed to symlink bnd-*.jar" + ln -s "${DISTDIR}/${BND}" "${BNDLIB_HOME}/" || die "Failed to symlink bndlib-*.jar" +} + +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 + + eapply "${FILESDIR}/${PN}-9.0.27-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},glassfish-xmlrpc-api,wsdl4j" +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 -Dbnd.jar=${BND_JAR} -Dbndlib.jar=${BNDLIB_JAR}" + +# 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://wiki.gentoo.org/wiki/Apache_Tomcat and" + einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information." +} diff --git a/www-servers/tornado/Manifest b/www-servers/tornado/Manifest index f4058a0f81dd..b23c8328f0d7 100644 --- a/www-servers/tornado/Manifest +++ b/www-servers/tornado/Manifest @@ -4,7 +4,6 @@ DIST tornado-6.0.3.tar.gz 482444 BLAKE2B 1dda4baae52034d779879fef507d5764894f4aa DIST tornado-6.0.4.tar.gz 496204 BLAKE2B 6c092214d03baf5cf7615b780043e2fa40a4ed623b7ca59a2528cc3625ba904b21ef93c528278adedaf83e3b6e5a6311d867833dfe9826637e97918dee6fa334 SHA512 d29d69cf40f8b34fb2c55d81b6ecd9bc7c6fdf644eb4ff35452829510c0d5ec185da0a6067fec3e8afb2bedf9f5f08b06adb0ad53dcab04cb791a75abc304d6e EBUILD tornado-4.5.3.ebuild 1272 BLAKE2B 803fffb9d8b1568ad02836612c73aa1b9d4c8ab409aba395d6a7a44adb786f03145936328b650536c88564f66a5dbf337b587a30e03d092753fbc104d2dcab3c SHA512 089dacaeeb8fe14380d3afcf5a9ba91b580d9bd67559433f3143e5b73a7ad879367a199862e81494df279a38b4bb631718dbc8bf22dfbda65734bf8b5481c7e4 EBUILD tornado-5.1-r1.ebuild 1287 BLAKE2B 6ebf14bd2fbb026f6676b884745620f30090b5419602927c69130b2e521a3eec9ecf02784c27e9808fb616b4b795a0d364d2874caf647344d25705f874a4554c SHA512 466e8f0ccdb601067b44dd294e50340e9887b5fa2631057f66ef43dc69f10adea870587f538905f0987208e33e82c71bbf31811e34490204d730b1aad0efb2fc -EBUILD tornado-6.0.3-r1.ebuild 1279 BLAKE2B 99a5a175f48d1f507fc5e2d76515f6ee9e98521cc355b8bed407d13bc2eed4702229e455bd417e01b6d3a50d4c6c2bf1c3a8ee81ff8ef5a67905fd0e029d5554 SHA512 132dbff80f6e73df348a94b608e2dcf285043f56d3f694660103e6287f43ff75485461658b139bc86f885bcda38918a7f87d9818c1e141431db18cd460a28be7 EBUILD tornado-6.0.3.ebuild 1249 BLAKE2B bfeb399ddfa718b8ea27cd79ec32b5c786c18f89931f71ee789d096b62716879d989bfa48cdbbaab27648d5e2edd690260dd17d163d2bb59476b1463adab2521 SHA512 0c2d9e879252d47238178deee370d48572349e8191364e8a873895f69a63795e4118f905520be57a8550bcb9b19551caabe3d9637d6f9d433dbf1167d405925b -EBUILD tornado-6.0.4.ebuild 1100 BLAKE2B b078a24108471232ae853c020224407ea09fc4ce61ffc011051cea871d6c017813de945a99e629f292ed0c3cbf01e49c2c6eedeea1f32f2faa71e5f7db9852b6 SHA512 5a509feb95c55a4f4ae2c64a312b08f349a8affae3ac4652655beda269b17450170f8a547f768fdd5cf8b994f8ae9b233bf7b90ada697e740038d790eefd103c +EBUILD tornado-6.0.4.ebuild 1095 BLAKE2B d1d79303c2a82bdf456f575b3298708bfee5384abbd89dd2ac28fadf5c829bbc268b2d74f74034df02499da1ef8765a929bdf90bd3d7ee3a0d48a595dbf8a0c0 SHA512 310465f7dcf5ee318305a9192dc436d95debe4fb4c35931e3f5e5f60ffb84a8718ce61b68c04a2e8acfb677f1ffdc102a760608ea0cc5a2675c0f975fe4e8b8a MISC metadata.xml 380 BLAKE2B 16a28ca707ba911df09dfad39b269bd888734c1f5e54fdc57d84f62b541e284f248137a01c13055f5e9fa1e1da0a2c9e1382006119cc11ec19302516262b7dc1 SHA512 e790429d61042b60a9011710e96df0044c64cc5ac941ab6268386138d3a66e46d40ed1098ec8bc164d9f4341040946ec7231e8f28dda11790ecc482b06978771 diff --git a/www-servers/tornado/tornado-6.0.3-r1.ebuild b/www-servers/tornado/tornado-6.0.3-r1.ebuild deleted file mode 100644 index 971f3a1c5572..000000000000 --- a/www-servers/tornado/tornado-6.0.3-r1.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{6,7,8} ) -PYTHON_REQ_USE="threads(+)" - -inherit distutils-r1 - -DESCRIPTION="Python web framework and asynchronous networking library" -HOMEPAGE="https://www.tornadoweb.org/" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86" -IUSE="examples test" -RESTRICT="!test? ( test )" - -CDEPEND=" - >=dev-python/pycurl-7.19.3.1[${PYTHON_USEDEP}] - >=dev-python/twisted-16.0.0[${PYTHON_USEDEP}] -" -DEPEND=" - dev-python/setuptools[${PYTHON_USEDEP}] - test? ( - ${CDEPEND} - dev-python/mock[${PYTHON_USEDEP}] - ) -" -RDEPEND="${CDEPEND}" - -distutils_enable_sphinx docs \ - dev-python/sphinx_rtd_theme \ - dev-python/sphinxcontrib-asyncio - -# doc without intersphinx does not build (asyncio error) -#PATCHES=( -# "${FILESDIR}"/4.5.1-drop-intersphinx.patch -#) - -python_test() { - local -x ASYNC_TEST_TIMEOUT=60 - "${PYTHON}" -m tornado.test.runtests --verbose || - die "tests failed under ${EPYTHON}" -} - -python_install_all() { - if use examples; then - insinto /usr/share/doc/${PF}/examples - doins -r demos/. - docompress -x /usr/share/doc/${PF}/examples - fi - distutils-r1_python_install_all -} diff --git a/www-servers/tornado/tornado-6.0.4.ebuild b/www-servers/tornado/tornado-6.0.4.ebuild index 766d414ad37e..002e85d1fac7 100644 --- a/www-servers/tornado/tornado-6.0.4.ebuild +++ b/www-servers/tornado/tornado-6.0.4.ebuild @@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~x86" +KEYWORDS="amd64 arm ~arm64 ~ia64 ppc ppc64 x86" IUSE="examples test" RESTRICT="!test? ( test )" diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest index 1dedd2b8b469..30ddfca72b4f 100644 --- a/www-servers/uwsgi/Manifest +++ b/www-servers/uwsgi/Manifest @@ -6,8 +6,7 @@ AUX uwsgi.initd-r7 3746 BLAKE2B a56c5f4e32ccb415fab10f357e2a7404179285e656d9f886 DIST uwsgi-2.0.17.1.tar.gz 800156 BLAKE2B a8697263e6e7689c0062a06a9fdb1101a2df72e0ac9122b5f8a0acc78bbdbdeaa96faa1c8870b9c3a43e2e1fb5fc835e708e1bc3d0171ae746467b4734dc299d SHA512 10d357961fde3a3f5f8e77986cc647313f95a33243e24c2afc482fce21df68a8ae48f90e7b5b76d7edc3cf8fd474d99823d6d60ef7477349abc65a319222f11b DIST uwsgi-2.0.17.tar.gz 798642 BLAKE2B 86efb2103efaeedb37ebb00de4c01477162d119ae3dea0dc0696385216e30ff2c74eb48576f86eb181b8ada4b9eaa63b0aa761e966e3301597633d33b81142e1 SHA512 639427fbb89a1c2610c1cafb6ff009398a3c0a8e27c3de3f00829428271ba97b64b1253368dd6150912cf44441052be2a63cbe81613bbe964be27ee2e570d2b2 DIST uwsgi-2.0.18.tar.gz 801555 BLAKE2B d8008e751fd699474a1b7d6276c10b3d2f1ebd0ca325e45bfb3b13f81e88de20e4e7389cd6aa9c8b3daa964d9b11524ee71e93717ed9762bf021471f6a2c09fa SHA512 6561703279bcc4a81311d033810ac066d0f113bab13b0942f3eef86cac29c584a6641b52476840d6895151aee5ed064ae2d03b18932cf7f47e62f4eeed76da61 -EBUILD uwsgi-2.0.17.1-r1.ebuild 12191 BLAKE2B d7ab12397b816896b57bab1ccde1dea3c8e6da96c46df34af9c310dadc4222fcd05b3a6cbea6b2b1b003fdc83134f945997e77f3f6d178e7bbc65510e9c19ddc SHA512 02dc72afa5d62c47973c9e12eece1c05f73f499e4e4106519feca70641f15162564dc9c5fabc4d81d508a88d3c205a452f70b5d465ecf37c46359315bfeb65f5 -EBUILD uwsgi-2.0.17.1.ebuild 12672 BLAKE2B 21f1de6bde8b0ff2b362943a37adad4623f5d4aad12ffcee4bffaff4d57dbc2fd16f58450d1546373310ea0ad1af6ce1d23e1cb46e6168d16cc5d92675ff133e SHA512 fa9d4f62d61d020ca357028e567c25dd27fde70f9c0f939ffbd63fe3fe694e3f60ad652f628acb303b8b9c9eabbf8a292e13949ccac5fc74a263e7296fa2a15e -EBUILD uwsgi-2.0.17.ebuild 12755 BLAKE2B 9493a15a342627ff591a67757c3432e79778eb6e72a21a4da8e27cc1e5d50c3c8242796e254cc122251a1ee60dacd88fb6975abc50a02ba50ac86aa62ce9b041 SHA512 c68306630b78bc38644b05813c6dde574b5f4fead034f72f857ac4b7392a9b544bf91247cee235da79fbf72ff2bf23fe13de11889ac37e69ee1377176acf8a3f -EBUILD uwsgi-2.0.18.ebuild 12216 BLAKE2B ab020176ef043c5d439bfa239a3df4ffb803e5299a1265af34b7b5b0910406d7101d2fe22d6f4e33037fae7a3de2637edef855087f896bce96065b68f0fce100 SHA512 a70511e686faf9091b256cce9b3e9b1b9a471bf8dd6d9a68a0c936286ce6d144aba10720c6fe728bc4e7cec3f20319dd1a28a78ac4158ae05bfc226fc5a5bdd7 -MISC metadata.xml 1511 BLAKE2B dc9a5942621322903f70f9ea20db930050fb9a973fd32cd9ce0e68e053379fd19b464fa6d877b32259a5689d521fa172990f03107ae01efa54afd484df8fd73d SHA512 09cbbe3f5ef811544ba9b256256c4e34378a8346c8d54c8366d14f11e676aebf3a203c9bcd13b05ed632fec845895ea5bf00270a586bd3837541dfc79e28c2ff +EBUILD uwsgi-2.0.17.1-r1.ebuild 11492 BLAKE2B 20f9302f47087f75797131894f42c8d4503463267d44fed2bc98a7b5c291c74a452cd6c74bccf534dd8a4cffec1f4d7971ec77e7e283eed3a39641a1b51fefa3 SHA512 837ded7ecdd38bf5925bb7c907519eb890c70e0b490654b967776d55f40ec4b2b056e4644d5cd78edf07932c3780798437eada14f059289d57d5cbca8dd8db83 +EBUILD uwsgi-2.0.17.ebuild 12056 BLAKE2B f19d427823781ec885165e602c56c7d03d2efeab2e4a3f64089f8f99970300cd32d802f0df080063a82040292286f21c744223afbfcebc2720cdcaa437894c2d SHA512 cfed8ca4e578b818ecc94c71d316d68aad37d1a863be745161643589cbc29f8b1a6670f135ed0aa4e94686d2061b8600130a36499ebf9751820a19ba273d88de +EBUILD uwsgi-2.0.18.ebuild 11517 BLAKE2B 067fc80def6e8ef151d0c7c3df3687df2472adbeaf63e8e237e41be67d6211e62ce3440a3aa1685b64f017821836c6c9d224b726ab95b3e9897ae01c2c3f47c8 SHA512 1e44c353fb6d2a7075e3a0f3ebfdc0ce50a2884e946822cc7032ba4107dd91ce564bdbd612780fd9d33c3763365566e5a68e07cb44f1609d0fa6875dbcabf010 +MISC metadata.xml 1411 BLAKE2B 5dcdf8a1555c44c0219991a8860f54a4d13a6cebf9bec5aca56644eeaf3c03fdc9f7ca8ab4c61c7119134edc4c80a4381bc2ca7fc6e09002543adb7f398643e2 SHA512 d6f1b9ac01238e1a1f2870df25961f4f5e0d4dcdeb1456c045da47d90b5a28eba0914f3f505c8d3977be5737537a47264e742c67a78d1a7d060a289a6d63bae0 diff --git a/www-servers/uwsgi/metadata.xml b/www-servers/uwsgi/metadata.xml index d7c339a2f35c..8981ee1518d8 100644 --- a/www-servers/uwsgi/metadata.xml +++ b/www-servers/uwsgi/metadata.xml @@ -8,7 +8,6 @@ Embed plugins instead of building them as real plugins. When disabling this USE flag make sure you specify all used plugins in your uWSGI configuration. Note: Language plugins will always be built as real plugins. Build the gccgo plugin to run Go applications. Support json as a configuration file format. - Build the pypy plugin to run your code using dev-python/pypy. Use the EXPERIMENTAL asyncio (tulip) for python3.4 async request dispatching and as LoopEngine (see http://uwsgi-docs.readthedocs.org/en/latest/asyncio.html). Use dev-python/gevent for async request dispatching and as LoopEngine (see http://projects.unbit.it/uwsgi/wiki/Gevent). Enable routing support diff --git a/www-servers/uwsgi/uwsgi-2.0.17.1-r1.ebuild b/www-servers/uwsgi/uwsgi-2.0.17.1-r1.ebuild index 92346204f3c1..e0ae7ed0b2c4 100644 --- a/www-servers/uwsgi/uwsgi-2.0.17.1-r1.ebuild +++ b/www-servers/uwsgi/uwsgi-2.0.17.1-r1.ebuild @@ -12,7 +12,7 @@ USE_RUBY="ruby23 ruby24 ruby25" PHP_EXT_INI="no" PHP_EXT_NAME="dummy" PHP_EXT_OPTIONAL_USE="php" -USE_PHP="php5-6 php7-1 php7-2 php7-3" # deps must be registered separately below +USE_PHP="php7-2 php7-3 php7-4" # deps must be registered separately below MY_P="${P/_/-}" @@ -42,7 +42,7 @@ UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process -LANG_SUPPORT_EXTENDED=( go lua php pypy python python_asyncio python_gevent ruby ) +LANG_SUPPORT_EXTENDED=( go lua php python python_asyncio python_gevent ruby ) # plugins to be ignored (for now): # cheaper_backlog2: example plugin @@ -67,7 +67,6 @@ REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) uwsgi_plugins_emperor_zeromq? ( zeromq ) uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) uwsgi_plugins_router_xmldir? ( xml !expat ) - pypy? ( python_targets_python2_7 ) python? ( ${PYTHON_REQUIRED_USE} ) python_asyncio? ( || ( $(python_gen_useflags -3) ) ) python_gevent? ( python ) @@ -116,12 +115,10 @@ CDEPEND=" mono? ( dev-lang/mono:= ) perl? ( dev-lang/perl:= ) php? ( - php_targets_php5-6? ( dev-lang/php:5.6[embed] ) - php_targets_php7-1? ( dev-lang/php:7.1[embed] ) php_targets_php7-2? ( dev-lang/php:7.2[embed] ) php_targets_php7-3? ( dev-lang/php:7.3[embed] ) + php_targets_php7-4? ( dev-lang/php:7.4[embed] ) ) - pypy? ( dev-python/pypy ) python? ( ${PYTHON_DEPS} ) python_asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] ) python_gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] ) @@ -245,11 +242,6 @@ python_compile_plugins() { EPYV=${EPYTHON/.} PYV=${EPYV/python} - if [[ ${EPYTHON} == pypy* ]]; then - einfo "skipping because pypy is not meant to build plugins on its own" - return - fi - ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" if use python_asyncio ; then @@ -265,15 +257,6 @@ python_compile_plugins() { if use python_gevent || use python_asyncio; then ${PYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed" fi - - if use pypy ; then - if [[ "${PYV}" == "27" ]] ; then - # TODO: do some proper patching ? The wiki didn't help... I gave up for now. - # QA: RWX --- --- usr/lib64/uwsgi/pypy_plugin.so - append-ldflags -Wl,-z,noexecstack - ${PYTHON} uwsgiconfig.py --plugin plugins/pypy gentoo pypy || die "building plugin for pypy-support in ${EPYTHON} failed" - fi - fi } python_install_symlinks() { @@ -367,11 +350,6 @@ pkg_postinst() { EPYV=${EPYTHON/.} PYV=${EPYV/python} - if [[ ${EPYTHON} == pypy* ]] ; then - elog " '--plugins pypy' for pypy" - return - fi - elog " " elog " '--plugins ${EPYV}' for ${EPYTHON}" if use python_asyncio ; then diff --git a/www-servers/uwsgi/uwsgi-2.0.17.1.ebuild b/www-servers/uwsgi/uwsgi-2.0.17.1.ebuild deleted file mode 100644 index 27d9201c28b9..000000000000 --- a/www-servers/uwsgi/uwsgi-2.0.17.1.ebuild +++ /dev/null @@ -1,408 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 python3_{6,7} ) -PYTHON_REQ_USE="threads(+)" - -RUBY_OPTIONAL="yes" -USE_RUBY="ruby23 ruby24" - -PHP_EXT_INI="no" -PHP_EXT_NAME="dummy" -PHP_EXT_OPTIONAL_USE="php" -USE_PHP="php5-6 php7-1 php7-2 php7-3" # deps must be registered separately below - -MY_P="${P/_/-}" - -inherit apache-module eutils flag-o-matic multilib pax-utils php-ext-source-r3 python-r1 ruby-ng versionator - -DESCRIPTION="uWSGI server for Python web applications" -HOMEPAGE="http://projects.unbit.it/uwsgi/" -SRC_URI="https://github.com/unbit/uwsgi/archive/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~x86 ~amd64-linux" - -UWSGI_PLUGINS_STD=( ping cache carbon nagios rpc rrdtool - http ugreen signal syslog rsyslog - router_{uwsgi,redirect,basicauth,rewrite,http,cache,static,memcached,redis,hash,expires,metrics} - {core,fast,raw,ssl}router - redislog mongodblog log{file,socket} - spooler cheaper_busyness symcall - transformation_{chunked,gzip,offload,tofile} - zergpool ) -UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron - dumbloop echo emperor_{amqp,pg,zeromq} forkptyrouter - geoip graylog2 legion_cache_fetch ldap log{crypto,pipe} notfound pam - rados router_{access,radius,spnego,xmldir} - sqlite ssi stats_pusher_statsd - systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) - -LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process -LANG_SUPPORT_EXTENDED=( go lua php pypy python python_asyncio python_gevent ruby ) - -# plugins to be ignored (for now): -# cheaper_backlog2: example plugin -# coroae: TODO -# cplusplus: partially example code, needs explicit class -# dummy: no idea -# example: example plugin -# exception_log: example plugin -# *java*: TODO -# v8: TODO -# matheval: TODO -IUSE="apache2 +caps debug +embedded expat jemalloc json libressl +pcre +routing selinux +ssl +xml yajl yaml zeromq" - -for plugin in ${UWSGI_PLUGINS_STD[@]}; do IUSE="${IUSE} +uwsgi_plugins_${plugin}"; done -for plugin in ${UWSGI_PLUGINS_OPT[@]}; do IUSE="${IUSE} uwsgi_plugins_${plugin}"; done -IUSE="${IUSE} ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]}" - -REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) - uwsgi_plugins_logcrypto? ( ssl ) - uwsgi_plugins_sslrouter? ( ssl ) - routing? ( pcre ) - uwsgi_plugins_emperor_zeromq? ( zeromq ) - uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) - uwsgi_plugins_router_xmldir? ( xml !expat ) - pypy? ( python_targets_python2_7 ) - python? ( ${PYTHON_REQUIRED_USE} ) - python_asyncio? ( || ( $(python_gen_useflags -3) ) python_gevent ) - python_gevent? ( python ) - expat? ( xml )" - -# util-linux is required for libuuid when requesting zeromq support -# Order: -# 1. Unconditional -# 2. General features -# 3. Plugins -# 4. Language/app support -CDEPEND="sys-libs/zlib - caps? ( sys-libs/libcap ) - json? ( !yajl? ( dev-libs/jansson ) - yajl? ( dev-libs/yajl ) ) - pcre? ( dev-libs/libpcre:3 ) - ssl? ( - !libressl? ( dev-libs/openssl:0 ) - libressl? ( dev-libs/libressl ) - ) - xml? ( !expat? ( dev-libs/libxml2 ) - expat? ( dev-libs/expat ) ) - yaml? ( dev-libs/libyaml ) - zeromq? ( net-libs/zeromq sys-apps/util-linux ) - uwsgi_plugins_alarm_curl? ( net-misc/curl ) - uwsgi_plugins_alarm_xmpp? ( net-libs/gloox ) - uwsgi_plugins_curl_cron? ( net-misc/curl ) - uwsgi_plugins_emperor_pg? ( dev-db/postgresql:= ) - uwsgi_plugins_geoip? ( dev-libs/geoip ) - uwsgi_plugins_ldap? ( net-nds/openldap ) - uwsgi_plugins_pam? ( sys-libs/pam ) - uwsgi_plugins_sqlite? ( dev-db/sqlite:3 ) - uwsgi_plugins_rados? ( sys-cluster/ceph ) - uwsgi_plugins_router_access? ( sys-apps/tcp-wrappers ) - uwsgi_plugins_router_spnego? ( virtual/krb5 ) - uwsgi_plugins_systemd_logger? ( sys-apps/systemd ) - uwsgi_plugins_webdav? ( dev-libs/libxml2 ) - uwsgi_plugins_xslt? ( dev-libs/libxslt ) - go? ( sys-devel/gcc:=[go] ) - lua? ( dev-lang/lua:= ) - mono? ( =dev-lang/mono-4* ) - perl? ( dev-lang/perl:= ) - php? ( - php_targets_php5-6? ( dev-lang/php:5.6[embed] ) - php_targets_php7-1? ( dev-lang/php:7.1[embed] ) - php_targets_php7-2? ( dev-lang/php:7.2[embed] ) - php_targets_php7-3? ( dev-lang/php:7.3[embed] ) - ) - pypy? ( dev-python/pypy ) - python? ( ${PYTHON_DEPS} ) - python_gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] ) - ruby? ( $(ruby_implementations_depend) )" -DEPEND="${CDEPEND} - virtual/pkgconfig" -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-uwsgi ) - uwsgi_plugins_rrdtool? ( net-analyzer/rrdtool )" - -want_apache2 - -S="${WORKDIR}/${MY_P}" -APXS2_S="${S}/apache2" -APACHE2_MOD_CONF="42_mod_uwsgi-r2 42_mod_uwsgi" - -src_unpack() { - default -} - -pkg_setup() { - python_setup - use ruby && ruby-ng_pkg_setup - depend.apache_pkg_setup -} - -src_prepare() { - default - - sed -i \ - -e "s|'-O2', ||" \ - -e "s|'-Werror', ||" \ - -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ - uwsgiconfig.py || die "sed failed" - - sed -i \ - -e "s|/lib|/$(get_libdir)|" \ - plugins/php/uwsgiplugin.py || die "sed failed" -} - -src_configure() { - local embedded_plugins=() - local plugins=() - local malloc_impl="libc" - local json="false" - local xml="false" - - for p in ${UWSGI_PLUGINS_STD[@]} ${UWSGI_PLUGINS_OPT[@]} ; do - use uwsgi_plugins_${p} && embedded_plugins+=("${p}") - done - for p in ${LANG_SUPPORT_SIMPLE[@]} ; do - use ${p} && plugins+=("${p}") - done - - # do not embed any plugins - if ! use embedded; then - plugins=( ${plugins[@]} ${embedded_plugins[@]} ) - embedded_plugins=() - fi - - # flatten the arrays - plugins=${plugins[@]} - embedded_plugins=${embedded_plugins[@]} - - # rename some of the use flags, language plugins are always real plugins - plugins="${plugins/perl/psgi}" - plugins="${plugins/sqlite/sqlite3}" - embedded_plugins="${embedded_plugins/sqlite/sqlite3}" - - # override defaults as requested by the user - if use xml; then - use expat && xml="expat" || xml="libxml2" - fi - if use json; then - use yajl && json="yajl" || json="jansson" - fi - use jemalloc && malloc_impl="jemalloc" - - # prepare the buildconf for gentoo - cp "${FILESDIR}"/gentoo.buildconf buildconf/gentoo.ini || die - sed -i \ - -e "s|VAR_XML|${xml}|" \ - -e "s|VAR_YAML|$(usex yaml libyaml true)|" \ - -e "s|VAR_JSON|${json}|" \ - -e "s|VAR_SSL|$(usex ssl true false)|" \ - -e "s|VAR_PCRE|$(usex pcre true false)|" \ - -e "s|VAR_ZMQ|$(usex zeromq true false)|" \ - -e "s|VAR_ROUTING|$(usex routing true false)|" \ - -e "s|VAR_DEBUG|$(usex debug true false)|" \ - -e "s|VAR_MALLOC|${malloc_impl}|" \ - -e "s|VAR_PLUGINS|${plugins// /, }|" \ - -e "s|VAR_PLUGIN_DIR|${EPREFIX}/usr/$(get_libdir)/uwsgi|" \ - -e "s|VAR_BUILD_DIR|${T}/plugins|" \ - -e "s|VAR_EMBEDDED|${embedded_plugins// /, }|" \ - buildconf/gentoo.ini || die "sed failed" - - if ! use caps; then - sed -i -e 's|sys/capability.h|DISABLED|' uwsgiconfig.py || die "sed failed" - fi - - if ! use zeromq; then - sed -i -e 's|uuid/uuid.h|DISABLED|' uwsgiconfig.py || die "sed failed" - fi - - if use uwsgi_plugins_emperor_pg ; then - PGPV="$(best_version dev-db/postgresql)" - PGSLOT="$(get_version_component_range 1-2 ${PGPV##dev-db/postgresql-})" - sed -i \ - -e "s|pg_config|pg_config${PGSLOT/.}|" \ - plugins/emperor_pg/uwsgiplugin.py || die "sed failed" - fi -} - -each_ruby_compile() { - cd "${WORKDIR}/${MY_P}" || die "sed failed" - - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/fiber gentoo fiber_${RUBY##*/}|| die "building fiber plugin for ${RUBY} failed" - UWSGICONFIG_RUBYPATH="${RUBY}" python uwsgiconfig.py --plugin plugins/rbthreads gentoo rbthreads_${RUBY##*/}|| die "building rbthreads plugin for ${RUBY} failed" -} - -python_compile_plugins() { - local EPYV - local PYV - EPYV=${EPYTHON/.} - PYV=${EPYV/python} - - if [[ ${EPYTHON} == pypy* ]]; then - einfo "skipping because pypy is not meant to build plugins on its own" - return - fi - - ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" - - if use python_asyncio ; then - if [[ "${PYV}" == "34" || "${PYV}" == "35" ]] ; then - ${PYTHON} uwsgiconfig.py --plugin plugins/asyncio gentoo asyncio${PYV} || die "building plugin for asyncio-support in ${EPYTHON} failed" - fi - fi - - if use python_gevent ; then - ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" - fi - - if use pypy ; then - if [[ "${PYV}" == "27" ]] ; then - # TODO: do some proper patching ? The wiki didn't help... I gave up for now. - # QA: RWX --- --- usr/lib64/uwsgi/pypy_plugin.so - append-ldflags -Wl,-z,noexecstack - ${PYTHON} uwsgiconfig.py --plugin plugins/pypy gentoo pypy || die "building plugin for pypy-support in ${EPYTHON} failed" - fi - fi -} - -python_install_symlinks() { - dosym uwsgi /usr/bin/uwsgi_${EPYTHON/.} -} - -src_compile() { - mkdir -p "${T}/plugins" || die - - python uwsgiconfig.py --build gentoo || die "building uwsgi failed" - - if use go ; then - python uwsgiconfig.py --plugin plugins/gccgo gentoo || die "building plugin for go failed" - fi - - if use lua ; then - # setting the name for the pkg-config file to lua, since we don't have - # slotted lua - UWSGICONFIG_LUAPC="lua" python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plugin for lua failed" - fi - - if use php ; then - for s in $(php_get_slots); do - UWSGICONFIG_PHPDIR="/usr/$(get_libdir)/${s}" python uwsgiconfig.py --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} failed" - done - fi - - if use python ; then - python_foreach_impl python_compile_plugins - fi - - if use ruby ; then - ruby-ng_src_compile - fi - - if use apache2 ; then - for m in proxy_uwsgi Ruwsgi uwsgi ; do - APXS2_ARGS="-c mod_${m}.c" - apache-module_src_compile - done - fi -} - -src_install() { - dobin uwsgi - pax-mark m "${D}"/usr/bin/uwsgi - - insinto /usr/$(get_libdir)/uwsgi - doins "${T}/plugins"/*.so - - use cgi && dosym uwsgi /usr/bin/uwsgi_cgi - use go && dosym uwsgi /usr/bin/uwsgi_go - use lua && dosym uwsgi /usr/bin/uwsgi_lua - use mono && dosym uwsgi /usr/bin/uwsgi_mono - use perl && dosym uwsgi /usr/bin/uwsgi_psgi - - if use php ; then - for s in $(php_get_slots); do - dosym uwsgi /usr/bin/uwsgi_${s/.} - done - fi - - if use python ; then - python_foreach_impl python_install_symlinks - python_foreach_impl python_domodule uwsgidecorators.py - fi - - if use apache2; then - for m in proxy_uwsgi Ruwsgi uwsgi ; do - APACHE2_MOD_FILE="${APXS2_S}/.libs/mod_${m}.so" - apache-module_src_install - done - fi - - newinitd "${FILESDIR}"/uwsgi.initd-r7 uwsgi - newconfd "${FILESDIR}"/uwsgi.confd-r4 uwsgi - keepdir /etc/"${PN}".d - use uwsgi_plugins_spooler && keepdir /var/spool/"${PN}" -} - -pkg_postinst() { - if use apache2 ; then - elog "Three Apache modules have been installed: mod_proxy_uwsgi, mod_uwsgi and mod_Ruwsgi." - elog "You can enable them with -D PROXY_UWSGI, -DUWSGI or -DRUWSGI in /etc/conf.d/apache2." - elog "mod_uwsgi and mod_Ruwsgi have the same configuration interface and define the same symbols." - elog "Therefore you can enable only one of them at a time." - elog "mod_uwsgi is commercially supported by Unbit and stable but a bit hacky." - elog "mod_Ruwsgi is newer and more Apache-API friendly but not commercially supported." - elog "mod_proxy_uwsgi is a proxy module, considered stable and is now the recommended module." - fi - - elog "Append the following options to the uwsgi call to load the respective language plugin:" - use cgi && elog " '--plugins cgi' for cgi" - use lua && elog " '--plugins lua' for lua" - use mono && elog " '--plugins mono' for mono" - use perl && elog " '--plugins psgi' for perl" - - if use php ; then - for s in $(php_get_slots); do - elog " '--plugins ${s/.}' for ${s}" - done - fi - - python_pkg_postinst() { - local EPYV - local PYV - EPYV=${EPYTHON/.} - PYV=${EPYV/python} - - if [[ ${EPYTHON} == pypy* ]] ; then - elog " '--plugins pypy' for pypy" - return - fi - - elog " " - elog " '--plugins ${EPYV}' for ${EPYTHON}" - if use python_asyncio ; then - if [[ ${EPYV} == python34 ]] ; then - elog " '--plugins ${EPYV},asyncio${PYV}' for asyncio support in ${EPYTHON}" - else - elog " (asyncio is only supported in python3.4)" - fi - fi - if use python_gevent ; then - elog " '--plugins ${EPYV},gevent${PYV}' for gevent support in ${EPYTHON}" - fi - } - - use python && python_foreach_impl python_pkg_postinst - - if use ruby ; then - for ruby in $(ruby_get_use_implementations) ; do - elog " '--plugins rack_${ruby/.}' for ${ruby}" - elog " '--plugins fiber_${ruby/.}' for ${ruby} fibers" - elog " '--plugins rbthreads_${ruby/.}' for ${ruby} rbthreads" - done - fi -} diff --git a/www-servers/uwsgi/uwsgi-2.0.17.ebuild b/www-servers/uwsgi/uwsgi-2.0.17.ebuild index 3f85d6aa41a0..f1a7b478018b 100644 --- a/www-servers/uwsgi/uwsgi-2.0.17.ebuild +++ b/www-servers/uwsgi/uwsgi-2.0.17.ebuild @@ -12,7 +12,7 @@ USE_RUBY="ruby23 ruby24" PHP_EXT_INI="no" PHP_EXT_NAME="dummy" PHP_EXT_OPTIONAL_USE="php" -USE_PHP="php5-6 php7-1 php7-2 php7-3" # deps must be registered separately below +USE_PHP="php7-2 php7-3 php7-4" # deps must be registered separately below MY_P="${P/_/-}" @@ -42,7 +42,7 @@ UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process -LANG_SUPPORT_EXTENDED=( go lua php pypy python python_asyncio python_gevent ruby ) +LANG_SUPPORT_EXTENDED=( go lua php python python_asyncio python_gevent ruby ) # plugins to be ignored (for now): # cheaper_backlog2: example plugin @@ -67,7 +67,6 @@ REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) uwsgi_plugins_emperor_zeromq? ( zeromq ) uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) uwsgi_plugins_router_xmldir? ( xml !expat ) - pypy? ( python_targets_python2_7 ) python? ( ${PYTHON_REQUIRED_USE} ) python_asyncio? ( || ( $(python_gen_useflags -3) ) python_gevent ) python_gevent? ( python ) @@ -111,12 +110,10 @@ CDEPEND="sys-libs/zlib mono? ( =dev-lang/mono-4* ) perl? ( dev-lang/perl:= ) php? ( - php_targets_php5-6? ( dev-lang/php:5.6[embed] ) - php_targets_php7-1? ( dev-lang/php:7.1[embed] ) php_targets_php7-2? ( dev-lang/php:7.2[embed] ) php_targets_php7-3? ( dev-lang/php:7.3[embed] ) + php_targets_php7-4? ( dev-lang/php:7.4[embed] ) ) - pypy? ( dev-python/pypy ) python? ( ${PYTHON_DEPS} ) python_gevent? ( >=dev-python/gevent-1.2.1[${PYTHON_USEDEP}] ) ruby? ( $(ruby_implementations_depend) )" @@ -248,11 +245,6 @@ python_compile_plugins() { EPYV=${EPYTHON/.} PYV=${EPYV/python} - if [[ ${EPYTHON} == pypy* ]]; then - einfo "skipping because pypy is not meant to build plugins on its own" - return - fi - ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" if use python_asyncio ; then @@ -264,15 +256,6 @@ python_compile_plugins() { if use python_gevent ; then ${PYTHON} uwsgiconfig.py --plugin plugins/gevent gentoo gevent${PYV} || die "building plugin for gevent-support in ${EPYTHON} failed" fi - - if use pypy ; then - if [[ "${PYV}" == "27" ]] ; then - # TODO: do some proper patching ? The wiki didn't help... I gave up for now. - # QA: RWX --- --- usr/lib64/uwsgi/pypy_plugin.so - append-ldflags -Wl,-z,noexecstack - ${PYTHON} uwsgiconfig.py --plugin plugins/pypy gentoo pypy || die "building plugin for pypy-support in ${EPYTHON} failed" - fi - fi } python_install_symlinks() { @@ -382,11 +365,6 @@ pkg_postinst() { EPYV=${EPYTHON/.} PYV=${EPYV/python} - if [[ ${EPYTHON} == pypy* ]] ; then - elog " '--plugins pypy' for pypy" - return - fi - elog " " elog " '--plugins ${EPYV}' for ${EPYTHON}" if use python_asyncio ; then diff --git a/www-servers/uwsgi/uwsgi-2.0.18.ebuild b/www-servers/uwsgi/uwsgi-2.0.18.ebuild index 90852dcf06c3..53316bf30aa2 100644 --- a/www-servers/uwsgi/uwsgi-2.0.18.ebuild +++ b/www-servers/uwsgi/uwsgi-2.0.18.ebuild @@ -12,7 +12,7 @@ USE_RUBY="ruby23 ruby24 ruby25 ruby26" PHP_EXT_INI="no" PHP_EXT_NAME="dummy" PHP_EXT_OPTIONAL_USE="php" -USE_PHP="php5-6 php7-1 php7-2 php7-3" # deps must be registered separately below +USE_PHP="php7-2 php7-3 php7-4" # deps must be registered separately below MY_P="${P/_/-}" @@ -42,7 +42,7 @@ UWSGI_PLUGINS_OPT=( alarm_{curl,xmpp} clock_{monotonic,realtime} curl_cron systemd_logger transformation_toupper tuntap webdav xattr xslt zabbix ) LANG_SUPPORT_SIMPLE=( cgi mono perl ) # plugins which can be built in the main build process -LANG_SUPPORT_EXTENDED=( go lua php pypy python python_asyncio python_gevent ruby ) +LANG_SUPPORT_EXTENDED=( go lua php python python_asyncio python_gevent ruby ) # plugins to be ignored (for now): # cheaper_backlog2: example plugin @@ -67,7 +67,6 @@ REQUIRED_USE="|| ( ${LANG_SUPPORT_SIMPLE[@]} ${LANG_SUPPORT_EXTENDED[@]} ) uwsgi_plugins_emperor_zeromq? ( zeromq ) uwsgi_plugins_forkptyrouter? ( uwsgi_plugins_corerouter ) uwsgi_plugins_router_xmldir? ( xml !expat ) - pypy? ( python_targets_python2_7 ) python? ( ${PYTHON_REQUIRED_USE} ) python_asyncio? ( || ( $(python_gen_useflags -3) ) ) python_gevent? ( python ) @@ -117,12 +116,10 @@ CDEPEND=" perl? ( dev-lang/perl:= ) php? ( net-libs/libnsl - php_targets_php5-6? ( dev-lang/php:5.6[embed] ) - php_targets_php7-1? ( dev-lang/php:7.1[embed] ) php_targets_php7-2? ( dev-lang/php:7.2[embed] ) php_targets_php7-3? ( dev-lang/php:7.3[embed] ) + php_targets_php7-4? ( dev-lang/php:7.4[embed] ) ) - pypy? ( dev-python/pypy ) python? ( ${PYTHON_DEPS} ) python_asyncio? ( virtual/python-greenlet[${PYTHON_USEDEP}] ) python_gevent? ( >=dev-python/gevent-1.3.5[${PYTHON_USEDEP}] ) @@ -246,11 +243,6 @@ python_compile_plugins() { EPYV=${EPYTHON/.} PYV=${EPYV/python} - if [[ ${EPYTHON} == pypy* ]]; then - einfo "skipping because pypy is not meant to build plugins on its own" - return - fi - ${PYTHON} uwsgiconfig.py --plugin plugins/python gentoo ${EPYV} || die "building plugin for ${EPYTHON} failed" if use python_asyncio ; then @@ -266,15 +258,6 @@ python_compile_plugins() { if use python_gevent || use python_asyncio; then ${PYTHON} uwsgiconfig.py --plugin plugins/greenlet gentoo greenlet${PYV} || die "building plugin for greenlet-support in ${EPYTHON} failed" fi - - if use pypy ; then - if [[ "${PYV}" == "27" ]] ; then - # TODO: do some proper patching ? The wiki didn't help... I gave up for now. - # QA: RWX --- --- usr/lib64/uwsgi/pypy_plugin.so - append-ldflags -Wl,-z,noexecstack - ${PYTHON} uwsgiconfig.py --plugin plugins/pypy gentoo pypy || die "building plugin for pypy-support in ${EPYTHON} failed" - fi - fi } python_install_symlinks() { @@ -368,11 +351,6 @@ pkg_postinst() { EPYV=${EPYTHON/.} PYV=${EPYV/python} - if [[ ${EPYTHON} == pypy* ]] ; then - elog " '--plugins pypy' for pypy" - return - fi - elog " " elog " '--plugins ${EPYV}' for ${EPYTHON}" if use python_asyncio ; then diff --git a/www-servers/varnish/Manifest b/www-servers/varnish/Manifest index 864a0af09715..06bc696cc510 100644 --- a/www-servers/varnish/Manifest +++ b/www-servers/varnish/Manifest @@ -14,10 +14,10 @@ DIST varnish-6.1.1.tgz 3135623 BLAKE2B c39904fe2745ab601e7c1f6d85850fe1a83c19e8d DIST varnish-6.3.1.tgz 3306392 BLAKE2B d34e52567fc0a9c57ac894c79155b43279a7b1549651494053f3eca3ddf83d234e41cffa4fed4833535b3c07e2a62ec0f54a1cc69c1bd689fee4ab90252f6588 SHA512 2fee11bcd01f53464b53e8271c2aec08233af078f2e9a2600cd82efbf646b3fd48160ebb2add09e1fb4f43e18e61f21a2408e351eeb2a567179733a3efbc3ddc DIST varnish-6.3.2.tgz 3323908 BLAKE2B 5bde1b2ececeb8aed884db22ed75bfd74f82d68416e71400a4c0d27483fcceb029fe8e724e30754899c872d7028da5cb759545f0743a11d0e90b0fd604af0ad7 SHA512 0f476c642df834737d446b3bc6ac8afa5981d1de5810dc6e8556eb22b2ca26d64eb531f4ad3332eb86e231a7443fe35393177ec6dbee97a837f405d1aa9d03cd DIST varnish-6.4.0.tgz 3404617 BLAKE2B 0ef0f7303f5c926bb1b80ec14cdd9755d65c1938fa8645240800ac2997f954022133625a74dd9c30ce21850674c3b00777fcc896309f528e6ba90d347333d7f7 SHA512 cda8f9e1d301a2b79db14685a23e25e36225f37065a1b7f37c5ae12fbb0483be51be9ffcc8ba72c1f65f5a022d1e408825694daed6780e206b9ba91feb2a07a1 -EBUILD varnish-6.0.1.ebuild 2226 BLAKE2B 9c1542546a0de87b46d02509b4f6f7db4c04124e0c2913c21b8c6cab6e2e0608b25b5ed11f8e372cec576ce829d441ad98f2f3da8e2b49c719f31d00713d653b SHA512 393e0d76d2fa76f10a08525a4f549a1719c64ff73a4688d256efeff1c99ef8b7e1c48a58ef24c4ab7cc97d98ddef64fb0218adb2bb6d603a4531ac3e3b4ee829 -EBUILD varnish-6.0.6.ebuild 2231 BLAKE2B 2d997c70dd440f624703f837a163a0453b73d416e15d882c9137c5fe5bfbdf615c7c8194b81647fba01a7a5367fe1973c0176287322fd968b85ce00b48d0d779 SHA512 198fda6004477bd3f0fe27b24739e2fdc6da6558eaa8bfce7f21d25e40316646a6c73d45b12fecce986c9c9d9f9e0925bc43664c2286ce4a0eb8953e14c40300 -EBUILD varnish-6.1.1.ebuild 2245 BLAKE2B 982205e36c37146d84bbba87f8620965e188c5cf75d4ae303dfd3c4b50fe8b313541a0433a108ff88c442106fe537022fabce9a893e2e2d8a855b67560c55e72 SHA512 4b9eced42abdcc18b3081e5c89943267eb1765d43e490487490dfabb58fa88aed2c6fa0e703c59f89f40abfdf63a86d89d02bb29f3cfbd951c46bca2723bc5d5 +EBUILD varnish-6.0.1.ebuild 2220 BLAKE2B 8b655e1efd38479a0b892b276e639b504666367131df90fbf2adc78e126d919b2a239428f882d0220b50606ea67a45e49a6bd8de75e8ae888ec3ae17aefe4f52 SHA512 b914ff43a7056d239160622766711d15b00dfe585861a5d81b82369662c6b9956d822ff36b3bf20ef4a2a2c4a129b22f15ce45763c0ab0344f161ec41be0cc58 +EBUILD varnish-6.0.6.ebuild 2230 BLAKE2B a3138959a81d665d620573d00a99c3b2f3c2ae1ef1f3859c6252135800c1ae57b6e581659afa2f299ded295fae57e5d4c8670a6083013ee1cbd47174099377b4 SHA512 fa82538ed6c1522e30c8256c7e60001c5a2143ed603ef89b4462fbbe74ed8cd9407b6d6d0ac0c2c1281cdf9021a0a754bf2bdad31a4e85e0a07f56cc3a91973f +EBUILD varnish-6.1.1.ebuild 2239 BLAKE2B d513baa325546deeb6cabd3e3e2f05a878a26c8f2013c6eac80ab84b25b36c8c503817bb36b25de40ceaeecdb078e2dde9a258a2534f58b8a34b5a2fae5761c6 SHA512 e23202f78fb6815ebbee44e8f1e90102e99538d43389815ec46dbfb332741554aea6d4ce97aea376e634eb1f7394d370ff098093fe2c6f969adb93c9c80cb026 EBUILD varnish-6.3.1.ebuild 2144 BLAKE2B 34b15924407cdb82b30199c2364fa696e012316bc79ef897fe86adbf66ee837bbe7f814dc3f38ef8221c37f59531f978e44a137ed454efe4f305092909d34114 SHA512 92b40fe87b7ac11ecb858663f9eaf320dc87fb3cd17b2c18e35c63e91d945ae1716ed5412b495470d81aab15f6a96e6724c58d92a302139ee9f9fec0af34a098 -EBUILD varnish-6.3.2.ebuild 2148 BLAKE2B 060ae37acce1bd79ea03e5cff43a392cbe9d9faa6e0d95cf56a7130d87d82239cd5d6f1885e2b32f88facfc03d4cdca3a52fee70e7784a5b9a1666510a62ad5f SHA512 b68f4d34ab27927c1d34dd9a5cc98a781d7d9be4194213a94a21ce3f9aa70162fbcdfeab9e77cae8937dfcba657f8629ff6548ef3d9c42fb3cc67cdbf9bf50f3 +EBUILD varnish-6.3.2.ebuild 2147 BLAKE2B a9d41a75096d9567bec7eb2ecb232e06e4d9346816ede8a6327482bc1adc22db5b810468d2b45676ea65b8b098d49c0a784796fb3c6d1b40475efbf31ada6863 SHA512 9d5543eb22aed1a154355ef127f5cc553ccf54e77bd535cef9e52dfe843cc02de3feb6dce2766568fda5256d2c65aa025570c241db1a28e508caeba412b0a854 EBUILD varnish-6.4.0.ebuild 2145 BLAKE2B 2f0aec0428b1fe2ebf852edb16c1b10ec0f9c7c7839188a54dfe1412e43ae65f0425d198f14e13fdd4d5e2a13a66da1c7e4fe2a4ebdfc87e560ef4eb27d9975d SHA512 90df906ce9a8d51a432d3077a86f14f103b44853eda277a27762a9c6e07c61f5f01ae13a0dff82b82181022aa53bf2040f48e292fbc4dc5d2cf4606bc8714ace MISC metadata.xml 1154 BLAKE2B eef29e16772e06a4b08bb7c2de3c02570a698eafe1eb9f3d1d6708cbf4ea3ef2644642b3040ebea108477e331aff164e4e540dc7f5620f15643b385d1523fd7f SHA512 a429d2e7604fb1e1f1d3ef48c13ab2151f7e2adab6a81021f473d7b56bdc9fc8d7700370125908b0278c2b0621afb3cccb73c4f3284b288cbceac05294e70f99 diff --git a/www-servers/varnish/varnish-6.0.1.ebuild b/www-servers/varnish/varnish-6.0.1.ebuild index 8f8ce746c0ba..b259b36b803d 100644 --- a/www-servers/varnish/varnish-6.0.1.ebuild +++ b/www-servers/varnish/varnish-6.0.1.ebuild @@ -3,7 +3,7 @@ EAPI="6" -PYTHON_COMPAT=( python{2_7,3_6} ) +PYTHON_COMPAT=( python3_6 ) inherit user autotools systemd python-r1 diff --git a/www-servers/varnish/varnish-6.0.6.ebuild b/www-servers/varnish/varnish-6.0.6.ebuild index ff890decad93..b2aedc3e93d1 100644 --- a/www-servers/varnish/varnish-6.0.6.ebuild +++ b/www-servers/varnish/varnish-6.0.6.ebuild @@ -13,7 +13,7 @@ SRC_URI="http://varnish-cache.org/_downloads/${P}.tgz" LICENSE="BSD-2 GPL-2" SLOT="0/1" -KEYWORDS="amd64 ~mips ~ppc ~ppc64 ~x86" +KEYWORDS="amd64 ~mips ~ppc ~ppc64 x86" IUSE="jemalloc jit static-libs" CDEPEND=" diff --git a/www-servers/varnish/varnish-6.1.1.ebuild b/www-servers/varnish/varnish-6.1.1.ebuild index 01cc35179636..a335a46245c0 100644 --- a/www-servers/varnish/varnish-6.1.1.ebuild +++ b/www-servers/varnish/varnish-6.1.1.ebuild @@ -3,7 +3,7 @@ EAPI="6" -PYTHON_COMPAT=( python{2_7,3_6} ) +PYTHON_COMPAT=( python3_6 ) inherit user autotools systemd python-r1 diff --git a/www-servers/varnish/varnish-6.3.2.ebuild b/www-servers/varnish/varnish-6.3.2.ebuild index 757d67ff20f5..5d12afb64590 100644 --- a/www-servers/varnish/varnish-6.3.2.ebuild +++ b/www-servers/varnish/varnish-6.3.2.ebuild @@ -13,7 +13,7 @@ SRC_URI="http://varnish-cache.org/_downloads/${P}.tgz" LICENSE="BSD-2 GPL-2" SLOT="0/2" -KEYWORDS="amd64 ~mips ~ppc ~ppc64 ~x86" +KEYWORDS="amd64 ~mips ~ppc ~ppc64 x86" IUSE="jemalloc jit static-libs" CDEPEND=" -- cgit v1.2.3