From d1c14e94a73fba924761cdad7298f3e48c6bc160 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 1 Jul 2024 08:00:51 +0100 Subject: gentoo auto-resync : 01:07:2024 - 08:00:50 --- www-servers/Manifest.gz | Bin 4697 -> 4695 bytes www-servers/lighttpd/Manifest | 5 +- www-servers/lighttpd/files/conf/lighttpd.conf-r3 | 307 +++++++++++++++++++++++ www-servers/lighttpd/lighttpd-1.4.76-r1.ebuild | 223 ++++++++++++++++ www-servers/lighttpd/lighttpd-9999.ebuild | 223 ++++++++++++++++ www-servers/lighttpd/metadata.xml | 3 +- www-servers/tomcat/Manifest | 2 + www-servers/tomcat/tomcat-10.1.25-r1.ebuild | 177 +++++++++++++ www-servers/tomcat/tomcat-9.0.90-r1.ebuild | 170 +++++++++++++ 9 files changed, 1108 insertions(+), 2 deletions(-) create mode 100644 www-servers/lighttpd/files/conf/lighttpd.conf-r3 create mode 100644 www-servers/lighttpd/lighttpd-1.4.76-r1.ebuild create mode 100644 www-servers/lighttpd/lighttpd-9999.ebuild create mode 100644 www-servers/tomcat/tomcat-10.1.25-r1.ebuild create mode 100644 www-servers/tomcat/tomcat-9.0.90-r1.ebuild (limited to 'www-servers') diff --git a/www-servers/Manifest.gz b/www-servers/Manifest.gz index c09a642fea83..58b74dd51848 100644 Binary files a/www-servers/Manifest.gz and b/www-servers/Manifest.gz differ diff --git a/www-servers/lighttpd/Manifest b/www-servers/lighttpd/Manifest index e2cb96dd0ee3..6856266ab4cf 100644 --- a/www-servers/lighttpd/Manifest +++ b/www-servers/lighttpd/Manifest @@ -1,5 +1,6 @@ AUX conf/lighttpd.conf-r1 7623 BLAKE2B 51805756814ed7ea8770419fa98009b1ecf6e963c9f1b9d7694ad307fd3c3f6f9c1c167a41b6048910e4cd89af4211b6a8f48382a9adadb10b76ab61f55b6115 SHA512 8985c77d2dc22cca8caf7a484619d2712dd1fa7ecd4a71c19b8c5d09af471c6b42ab0cf131d40d2c61440d4d3053a86285fb90209204d2ba711868513c800722 AUX conf/lighttpd.conf-r2 7357 BLAKE2B f3dc2253aadc690528e9ec7c423d5f8cff518906b327b2e6095a24215c86a3274c145ec4acbffe27dfbd4e28dd907b815ae73dcb55072888ca385bde316526e1 SHA512 48469113f7a6e5459d1eec3387f3da71125f50895b845cb76e9edb6a2f4f93bbd9b772afc593a055c4e168708b7f0eb534e721c6f26a29465727369a2a71bdf4 +AUX conf/lighttpd.conf-r3 7828 BLAKE2B 0a1a2687c781f93955a62af7d71625e37c8c5fc6cbbe4f121b322a3bcbae780142b47678c766312397085fd6d1421265f135d2eac96db966d483907dfb837809 SHA512 1319ff2182f756f812d6fb626665a7bd7c1a1a45b48baf0445aad49a029faf06a65fa178993bd221ebaa31196903120e0ce92b789f69cd179d5ce1eccb74a691 AUX conf/mime-types.conf 5802 BLAKE2B 894906c67176dfb98819fe0d61e66905d873ad96907c14684a1b6284796ea69950606c950a72f16ffa9fdd46675ac79050cc39456ae66c91a38a50e1ef5449e9 SHA512 28fb746307daa92ae8077850627097d8ed4f24ad6f1c1963a3397a052add17282292e6f230550fb65d2fef969af0448f2f86e36afb5b15dc92b00fd80821c54a AUX conf/mod_cgi.conf 625 BLAKE2B 9d10f74566edd260a9160a7b3588aa08903603dafe412b73e0a28ce57b3e45c4bbebd0443daeb7e922c66bca66947f79c24eb65256cd5f6011ea2ad140c3f16f SHA512 39cba5cc14be21356c7038a8436a4dd7da80d18e3db2ba0527669f2ce9e9ca1a99a985e931e92cd7ea550f2b79467adc92b0803291f6d55084cca901919ea0da AUX conf/mod_fastcgi.conf 425 BLAKE2B 5c78303b686677bc77a6c9c51f295a023f4854ce351cf41e8984f84f6d8520fee93db4c96b25495bb935ed53d57090e481516c3fd4862401cea174fa2bccc0d2 SHA512 0847a55736dd86f6589086614331a54d1656214ab918638a319b69825ef67bfc8003fa567dc8b82c1c1611d2b4d2771dce4bdd337ecb9b277758a5dcf6c12331 @@ -17,5 +18,7 @@ DIST lighttpd-1.4.76.tar.xz 847132 BLAKE2B 497e2dd802718dac10fdcd49bc917f44ddc1e DIST lighttpd-1.4.76.tar.xz.asc 833 BLAKE2B b46b3543e694c132d6e49ee239ef2d71718b5257cfc33506208b0b28bb318ffaf04fcf6282e3b54b08eedf4a3ef6da2ef2c4fd84da89316ce02d70b8f9f26faf SHA512 5a9bc460584479212ac2adddbc4dd5d4374cb08f703fdebd60471cee9c93f6cf4c7bf431a183d615aa9d1a25e237b8dd0f4f06e7249d6bb61a341565a29e2bb9 EBUILD lighttpd-1.4.75-r1.ebuild 5331 BLAKE2B 9bbaf77c6ca099309104e54d3259d24e4c257bec824cea7130f9f928102b4b11cc19bbfb6545153d90fbd228281ec2966a0e0b9f8cfa32de1cd3ae39b7c7999c SHA512 f92527e7d305fa6c078df7ba90246e4a0c5abf83a23ad738d60aae39b6581a6339a301d2e47c6ef2ea0421907765dcdfaf939d7e920e196240a3d45d1a532555 EBUILD lighttpd-1.4.75.ebuild 5687 BLAKE2B 64288bb588482ae52ee638ec3ef6518d95aeca22b72e0b47340195ff86690c8aedd54d1cff23dc6ce252a9b35f717219f8c192c4d0b499eef11be81eec788e6a SHA512 b05ba9c875e606b1941f47b7b153f6e22064351589ae5ea593b4e6d7d9b9f936da7c8cee9dc93472d2b0d0100b31eb1e08f195ca7309fc9c9cabb0f00cc4658c +EBUILD lighttpd-1.4.76-r1.ebuild 5593 BLAKE2B 696097729f6dc5bb471d4a1bc82ed2fffdf179b7eb60784153ebc1664974896f2854d815822f9bd4e44751973a92b94697dfac5952971d84c2a445264fe2640e SHA512 72e7ed36ca5e68cdb9e516fe246f00c1d83122573ce81564ed11ddfd987b30f54363b5512d5561739a01b202e3357d0d2b66b40c919ed88ae685dd96574a0b7f EBUILD lighttpd-1.4.76.ebuild 5273 BLAKE2B 9982041e0d3f0d1d87089bea5c714f2b90523adda8e22b984a05a443b18989cf1e9e0412fb2491026dab3af4fe4db46696f3c45cfb8e8218df0c50a4ad6de7c0 SHA512 7fa06818b5c12e93da52080a2a84f8300ab4ff493199dafe29202c711fe1da10fe3bb0187ed4b9922c3bdb2f7b11f0742778f830be76adec1a888b05272e3e2b -MISC metadata.xml 1745 BLAKE2B f6a7eaffade01e450eb3d0ba03fed393a246fc167b356825e3823ba88fb130a397d5467a85cad2e13f652d67caaa33f97e1604252e104e2d91b916e9c54e7966 SHA512 28a25ec791392c8b53de8af01e1920175fa758f752e3110ffdaa5f9e2c01ca087c1e5c0e11cac7a1cfdcf55dea265e72dd3ea68e2f08f4d1ec14ffc1162fd53b +EBUILD lighttpd-9999.ebuild 5593 BLAKE2B 696097729f6dc5bb471d4a1bc82ed2fffdf179b7eb60784153ebc1664974896f2854d815822f9bd4e44751973a92b94697dfac5952971d84c2a445264fe2640e SHA512 72e7ed36ca5e68cdb9e516fe246f00c1d83122573ce81564ed11ddfd987b30f54363b5512d5561739a01b202e3357d0d2b66b40c919ed88ae685dd96574a0b7f +MISC metadata.xml 1839 BLAKE2B 1d3bb5474c1bf9f16d84013bec3c0b43d2e2c5d44535e80b2a225bc64345155ba812d0ed9826f8f4072b9a9a113ede7ab5de05b0442bd8968fcad0916edba9fb SHA512 bb491fac80fd3e92b38f35fdd75e09ca6574819eba0d9fd8bed7256be603a113a3127d2ca32c42b9dc4e3a3359f55f62d44650768844cae374d7aa81432a7983 diff --git a/www-servers/lighttpd/files/conf/lighttpd.conf-r3 b/www-servers/lighttpd/files/conf/lighttpd.conf-r3 new file mode 100644 index 000000000000..0ba2b6e69ee3 --- /dev/null +++ b/www-servers/lighttpd/files/conf/lighttpd.conf-r3 @@ -0,0 +1,307 @@ +############################################################################### +# Default lighttpd.conf for Gentoo. +############################################################################### + +# {{{ variables +var.basedir = "/var/www/localhost" +var.logdir = "/var/log/lighttpd" +var.statedir = "/var/lib/lighttpd" +# }}} + +# {{{ modules +# At the very least, mod_access and mod_accesslog should be enabled. +# All other modules should only be loaded if necessary. +# NOTE: the order of modules is important. +server.modules = ( +# "mod_rewrite", +# "mod_redirect", +# "mod_alias", + "mod_access", +# "mod_magnet", +# "mod_auth", +# "mod_status", +# "mod_setenv", +# "mod_proxy", +# "mod_simple_vhost", +# "mod_evhost", +# "mod_userdir", +# "mod_deflate", +# "mod_ssi", +# "mod_expire", +# "mod_rrdtool", +# "mod_webdav", + "mod_accesslog" +) +# }}} + +# {{{ includes +# Map file extensions to mime types for Content-Type using mime.conf +# shipped with lighttpd code, based on Fedora /etc/mime.types mapping. +# Option: comment out on embedded systems to save some memory and use +# lighttpd built-in defaults, which include a subset of common web mime types. +# Option: use lighttpd doc/scripts/create-mime.conf.pl to generate mapping +# from Gentoo /etc/mime.types at lighttpd startup. +include "/etc/lighttpd/mime.conf" +# }}} + +# {{{ server settings +server.username = "lighttpd" +server.groupname = "lighttpd" + +server.document-root = var.basedir + "/htdocs" +server.pid-file = "/run/lighttpd.pid" + +server.errorlog = var.logdir + "/error.log" +# log errors to syslog instead +# server.errorlog-use-syslog = "enable" + +server.indexfiles = ("index.php", "index.html", + "index.htm", "default.htm") + +# server.tag = "lighttpd" + +# event handler +# see performance.txt +# +# for >= linux-2.6 +# server.event-handler = "epoll" # default on Linux +# for FreeBSD +# server.event-handler = "kqueue" # default on FreeBSD + +# chroot to directory (defaults to no chroot) +# server.chroot = "/" + +# bind to port (defaults to 80) +# server.port = 81 + +# bind to name (defaults to all interfaces) +# server.bind = "grisu.home.kneschke.de" + +# error-handler for status 404 +# server.error-handler-404 = "/error-handler.html" +# server.error-handler-404 = "/error-handler.php" + +# Format: .html +# -> ..../status-404.html for 'File not found' +# server.errorfile-prefix = var.basedir + "/error/status-" + +# support for caching stat() calls +# server.stat-cache-engine = "inotify" + +# If lighttpd was build with IPv6 support, and you would like to listen on IPv6, +# uncomment the following: +# server.use-ipv6 = "enable" + +# }}} + +# {{{ mod_staticfile + +# which extensions should not be handled via static-file transfer +# (extensions that are usually handled by mod_cgi, mod_fastcgi, etc). +static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi") +# }}} + +# {{{ mod_accesslog +accesslog.filename = var.logdir + "/access.log" +# }}} + +# {{{ mod_dirlisting +# enable directory listings +# dir-listing.activate = "enable" +# +# don't list hidden files/directories +# dir-listing.hide-dotfiles = "enable" +# +# use a different css for directory listings +# dir-listing.external-css = "/path/to/dir-listing.css" +# +# list of regular expressions. files that match any of the +# specified regular expressions will be excluded from directory +# listings. +# dir-listing.exclude = ("^\.", "~$") +# }}} + +# {{{ mod_access +# see access.txt + +url.access-deny = ("~", ".inc") +# }}} + +# {{{ mod_userdir +# see userdir.txt +# +# userdir.path = "public_html" +# userdir.exclude-user = ("root") +# }}} + +# {{{ mod_ssi +# see ssi.txt +# +# ssi.extension = (".shtml") +# }}} + +# {{{ mod_ssl +# see ssl.txt +# +# ssl.engine = "enable" +# ssl.pemfile = "server.pem" +# }}} + +# {{{ mod_status +# see status.txt +# +# status.status-url = "/server-status" +# status.config-url = "/server-config" +# }}} + +# {{{ mod_simple_vhost +# see simple-vhost.txt +# +# If you want name-based virtual hosting add the next three settings and load +# mod_simple_vhost +# +# document-root = +# virtual-server-root + virtual-server-default-host + virtual-server-docroot +# or +# virtual-server-root + http-host + virtual-server-docroot +# +# simple-vhost.server-root = "/home/weigon/wwwroot/servers/" +# simple-vhost.default-host = "grisu.home.kneschke.de" +# simple-vhost.document-root = "/pages/" +# }}} + +# {{{ mod_deflate +# see compress.txt +# +# deflate.cache-dir = var.statedir + "/cache/compress" +# deflate.mimetypes = ("text/plain", "text/html") +# }}} + +# {{{ mod_proxy +# see proxy.txt +# +# proxy.server = ( ".php" => +# ( "localhost" => +# ( +# "host" => "192.168.0.101", +# "port" => 80 +# ) +# ) +# ) +# }}} + +# {{{ mod_auth +# see authentication.txt +# +# auth.backend = "plain" +# auth.backend.plain.userfile = "lighttpd.user" +# auth.backend.plain.groupfile = "lighttpd.group" + +# auth.backend.ldap.hostname = "localhost" +# auth.backend.ldap.base-dn = "dc=my-domain,dc=com" +# auth.backend.ldap.filter = "(uid=$)" + +# auth.require = ( "/server-status" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "user=jan" +# ), +# "/server-info" => +# ( +# "method" => "digest", +# "realm" => "download archiv", +# "require" => "valid-user" +# ) +# ) +# }}} + +# {{{ mod_rewrite +# see rewrite.txt +# +# url.rewrite = ( +# "^/$" => "/server-status" +# ) +# }}} + +# {{{ mod_redirect +# see redirect.txt +# +# url.redirect = ( +# "^/wishlist/(.+)" => "http://www.123.org/$1" +# ) +# }}} + +# {{{ mod_evhost +# define a pattern for the host url finding +# %% => % sign +# %0 => domain name + tld +# %1 => tld +# %2 => domain name without tld +# %3 => subdomain 1 name +# %4 => subdomain 2 name +# +# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/" +# }}} + +# {{{ mod_expire +# expire.url = ( +# "/buggy/" => "access 2 hours", +# "/asdhas/" => "access plus 1 seconds 2 minutes" +# ) +# }}} + +# {{{ mod_rrdtool +# see rrdtool.txt +# +# rrdtool.binary = "/usr/bin/rrdtool" +# rrdtool.db-name = var.statedir + "/lighttpd.rrd" +# }}} + +# {{{ mod_setenv +# see setenv.txt +# +# setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" ) +# setenv.add-response-header = ( "X-Secret-Message" => "42" ) +# }}} + +# {{{ mod_webdav +# see webdav.txt +# +# $HTTP["url"] =~ "^/dav($|/)" { +# webdav.activate = "enable" +# webdav.is-readonly = "enable" +# } +# }}} + +# {{{ extra rules +# +# set Content-Encoding and reset Content-Type for browsers that +# support decompressing on-thy-fly (requires mod_setenv) +# $HTTP["url"] =~ "\.gz$" { +# setenv.add-response-header = ("Content-Encoding" => "x-gzip") +# mimetype.assign = (".gz" => "text/plain") +# } + +# $HTTP["url"] =~ "\.bz2$" { +# setenv.add-response-header = ("Content-Encoding" => "x-bzip2") +# mimetype.assign = (".bz2" => "text/plain") +# } +# +# }}} + +# {{{ debug +# debug.log-request-header = "enable" +# debug.log-response-header = "enable" +# debug.log-request-handling = "enable" +# debug.log-file-not-found = "enable" +# }}} + +# {{{ cgi includes +# uncomment for cgi support +# include "mod_cgi.conf" +# uncomment for php/fastcgi support +# include "mod_fastcgi.conf" +# }}} + +# vim: set ft=conf foldmethod=marker et : diff --git a/www-servers/lighttpd/lighttpd-1.4.76-r1.ebuild b/www-servers/lighttpd/lighttpd-1.4.76-r1.ebuild new file mode 100644 index 000000000000..5ee62d4b151a --- /dev/null +++ b/www-servers/lighttpd/lighttpd-1.4.76-r1.ebuild @@ -0,0 +1,223 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} ) +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/lighttpd.asc +inherit lua-single meson readme.gentoo-r1 systemd tmpfiles verify-sig + +DESCRIPTION="Lightweight high-performance web server" +HOMEPAGE="https://www.lighttpd.net https://github.com/lighttpd" +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="https://git.lighttpd.net/lighttpd/lighttpd1.4.git" + inherit git-r3 +else + SRC_URI=" + https://download.lighttpd.net/lighttpd/releases-1.4.x/${P}.tar.xz + verify-sig? ( https://download.lighttpd.net/lighttpd/releases-$(ver_cut 1-2).x/${P}.tar.xz.asc ) + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="BSD GPL-2" +SLOT="0" +IUSE="+brotli dbi gnutls kerberos ldap libdeflate +lua maxminddb mbedtls +nettle nss +pcre php sasl selinux ssl test unwind webdav xattr +zlib zstd" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) +" + +# Match the bundled xxhash version for the minimum version +COMMON_DEPEND=" + acct-group/lighttpd + acct-user/lighttpd + >=dev-libs/xxhash-0.8.2 + virtual/libcrypt:= + brotli? ( app-arch/brotli:= ) + dbi? ( + dev-db/libdbi + ) + gnutls? ( net-libs/gnutls ) + kerberos? ( virtual/krb5 ) + ldap? ( >=net-nds/openldap-2.1.26:= ) + libdeflate? ( app-arch/libdeflate ) + lua? ( ${LUA_DEPS} ) + maxminddb? ( dev-libs/libmaxminddb ) + mbedtls? ( net-libs/mbedtls ) + nettle? ( dev-libs/nettle:= ) + nss? ( dev-libs/nss ) + pcre? ( dev-libs/libpcre2 ) + php? ( dev-lang/php:*[cgi] ) + sasl? ( dev-libs/cyrus-sasl ) + ssl? ( >=dev-libs/openssl-0.9.7:= ) + unwind? ( sys-libs/libunwind:= ) + webdav? ( + dev-libs/libxml2 + dev-db/sqlite + ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + zlib? ( >=sys-libs/zlib-1.1 ) + zstd? ( app-arch/zstd:= ) +" +DEPEND=" + ${COMMON_DEPEND} + elibc_musl? ( sys-libs/queue-standalone ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-apache ) +" +BDEPEND=" + virtual/pkgconfig + test? ( virtual/perl-Test-Harness ) + verify-sig? ( sec-keys/openpgp-keys-lighttpd ) +" + +# update certain parts of lighttpd.conf based on conditionals +update_config() { + local config="${ED}/etc/lighttpd/lighttpd.conf" + + # Enable php/mod_fastcgi settings + if use php; then + sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die + fi + + # Automatically listen on IPv6 if built with USE=ipv6 (which we now always do) + # bug #234987 + sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die +} + +pkg_setup() { + if use lua; then + lua-single_pkg_setup + fi + + if ! use pcre ; then + ewarn "It is highly recommended that you build ${PN}" + ewarn "with perl regular expressions support via USE=pcre." + ewarn "Otherwise you lose support for some core options such" + ewarn "as conditionals and modules such as mod_re{write,direct}." + fi + + DOC_CONTENTS="IPv6 migration guide:\n + https://wiki.lighttpd.net/IPv6-Config + " +} + +src_configure() { + # (One specific library might be preferred on embedded systems via + # MYMESONARGS with e.g. -DFORCE_blah_CRYPTO) + local emesonargs=( + -Dmoduledir="$(get_libdir)"/${PN} + + ${c_args} + + $(meson_feature brotli with_brotli) + + # TODO: revisit (was off in autotools ebuild) + -Dwith_bzip=disabled + + $(meson_feature dbi with_dbi) + + # Obsolete + -Dwith_fam=disabled + + $(meson_use gnutls with_gnutls) + $(meson_feature kerberos with_krb5) + $(meson_feature ldap with_ldap) + + $(meson_feature libdeflate with_libdeflate) + + $(meson_feature unwind with_libunwind) + + $(meson_use lua with_lua) + -Dlua_version=${ELUA} + + $(meson_feature maxminddb with_maxminddb) + $(meson_use mbedtls with_mbedtls) + + $(meson_use nettle with_nettle) + $(meson_use nss with_nss) + + # Obsolete + -Dwith_pcre=disabled + + $(meson_use pcre with_pcre2) + + $(meson_feature sasl with_sasl) + $(meson_use ssl with_openssl) + + -Dwith_xxhash=enabled + $(meson_feature webdav with_webdav_props) + + # Unpackaged in Gentoo + -Dwith_wolfssl=false + + $(meson_use xattr with_xattr) + $(meson_feature zlib with_zlib) + $(meson_feature zstd with_zstd) + ) + + meson_src_configure +} + +src_install() { + meson_src_install + + # Init script stuff + newinitd "${FILESDIR}"/lighttpd.initd-r2 lighttpd + newconfd "${FILESDIR}"/lighttpd.confd lighttpd + + # Configs + insinto /etc/lighttpd + newins "${FILESDIR}"/conf/lighttpd.conf-r3 lighttpd.conf + doins "${FILESDIR}"/conf/mod_cgi.conf + doins "${FILESDIR}"/conf/mod_fastcgi.conf + doins doc/config/conf.d/mime.conf + + # Update lighttpd.conf directives based on conditionals + update_config + + # Docs + dodoc AUTHORS README NEWS doc/scripts/*.sh + newdoc doc/config/lighttpd.conf lighttpd.conf.distrib + readme.gentoo_create_doc + + docinto txt + dodoc doc/outdated/*.txt + + doman doc/*.8 + + # Logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd + + keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs + fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd + fperms 0750 /var/l{ib,og}/lighttpd + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.conf ${PN}.conf +} + +pkg_postinst() { + tmpfiles_process ${PN}.conf + + readme.gentoo_print_elog + + if [[ -f ${EROOT}/etc/lighttpd.conf ]] ; then + elog + elog "Gentoo has a customized configuration," + elog "which is now located in ${EROOT}/etc/lighttpd. Please migrate your" + elog "existing configuration." + fi + + if use brotli || use zstd || use zlib ; then + elog + elog "Remember to clean your cache directory when using" + elog "output compression!" + elog "https://wiki.lighttpd.net/Docs_ModDeflate" + fi +} diff --git a/www-servers/lighttpd/lighttpd-9999.ebuild b/www-servers/lighttpd/lighttpd-9999.ebuild new file mode 100644 index 000000000000..5ee62d4b151a --- /dev/null +++ b/www-servers/lighttpd/lighttpd-9999.ebuild @@ -0,0 +1,223 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1..4} ) +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/lighttpd.asc +inherit lua-single meson readme.gentoo-r1 systemd tmpfiles verify-sig + +DESCRIPTION="Lightweight high-performance web server" +HOMEPAGE="https://www.lighttpd.net https://github.com/lighttpd" +if [[ ${PV} == *9999* ]] ; then + EGIT_REPO_URI="https://git.lighttpd.net/lighttpd/lighttpd1.4.git" + inherit git-r3 +else + SRC_URI=" + https://download.lighttpd.net/lighttpd/releases-1.4.x/${P}.tar.xz + verify-sig? ( https://download.lighttpd.net/lighttpd/releases-$(ver_cut 1-2).x/${P}.tar.xz.asc ) + " + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi + +LICENSE="BSD GPL-2" +SLOT="0" +IUSE="+brotli dbi gnutls kerberos ldap libdeflate +lua maxminddb mbedtls +nettle nss +pcre php sasl selinux ssl test unwind webdav xattr +zlib zstd" +RESTRICT="!test? ( test )" + +REQUIRED_USE=" + lua? ( ${LUA_REQUIRED_USE} ) +" + +# Match the bundled xxhash version for the minimum version +COMMON_DEPEND=" + acct-group/lighttpd + acct-user/lighttpd + >=dev-libs/xxhash-0.8.2 + virtual/libcrypt:= + brotli? ( app-arch/brotli:= ) + dbi? ( + dev-db/libdbi + ) + gnutls? ( net-libs/gnutls ) + kerberos? ( virtual/krb5 ) + ldap? ( >=net-nds/openldap-2.1.26:= ) + libdeflate? ( app-arch/libdeflate ) + lua? ( ${LUA_DEPS} ) + maxminddb? ( dev-libs/libmaxminddb ) + mbedtls? ( net-libs/mbedtls ) + nettle? ( dev-libs/nettle:= ) + nss? ( dev-libs/nss ) + pcre? ( dev-libs/libpcre2 ) + php? ( dev-lang/php:*[cgi] ) + sasl? ( dev-libs/cyrus-sasl ) + ssl? ( >=dev-libs/openssl-0.9.7:= ) + unwind? ( sys-libs/libunwind:= ) + webdav? ( + dev-libs/libxml2 + dev-db/sqlite + ) + xattr? ( kernel_linux? ( sys-apps/attr ) ) + zlib? ( >=sys-libs/zlib-1.1 ) + zstd? ( app-arch/zstd:= ) +" +DEPEND=" + ${COMMON_DEPEND} + elibc_musl? ( sys-libs/queue-standalone ) +" +RDEPEND=" + ${COMMON_DEPEND} + selinux? ( sec-policy/selinux-apache ) +" +BDEPEND=" + virtual/pkgconfig + test? ( virtual/perl-Test-Harness ) + verify-sig? ( sec-keys/openpgp-keys-lighttpd ) +" + +# update certain parts of lighttpd.conf based on conditionals +update_config() { + local config="${ED}/etc/lighttpd/lighttpd.conf" + + # Enable php/mod_fastcgi settings + if use php; then + sed -i -e 's|#.*\(include.*fastcgi.*$\)|\1|' ${config} || die + fi + + # Automatically listen on IPv6 if built with USE=ipv6 (which we now always do) + # bug #234987 + sed -i -e 's|# server.use-ipv6|server.use-ipv6|' ${config} || die +} + +pkg_setup() { + if use lua; then + lua-single_pkg_setup + fi + + if ! use pcre ; then + ewarn "It is highly recommended that you build ${PN}" + ewarn "with perl regular expressions support via USE=pcre." + ewarn "Otherwise you lose support for some core options such" + ewarn "as conditionals and modules such as mod_re{write,direct}." + fi + + DOC_CONTENTS="IPv6 migration guide:\n + https://wiki.lighttpd.net/IPv6-Config + " +} + +src_configure() { + # (One specific library might be preferred on embedded systems via + # MYMESONARGS with e.g. -DFORCE_blah_CRYPTO) + local emesonargs=( + -Dmoduledir="$(get_libdir)"/${PN} + + ${c_args} + + $(meson_feature brotli with_brotli) + + # TODO: revisit (was off in autotools ebuild) + -Dwith_bzip=disabled + + $(meson_feature dbi with_dbi) + + # Obsolete + -Dwith_fam=disabled + + $(meson_use gnutls with_gnutls) + $(meson_feature kerberos with_krb5) + $(meson_feature ldap with_ldap) + + $(meson_feature libdeflate with_libdeflate) + + $(meson_feature unwind with_libunwind) + + $(meson_use lua with_lua) + -Dlua_version=${ELUA} + + $(meson_feature maxminddb with_maxminddb) + $(meson_use mbedtls with_mbedtls) + + $(meson_use nettle with_nettle) + $(meson_use nss with_nss) + + # Obsolete + -Dwith_pcre=disabled + + $(meson_use pcre with_pcre2) + + $(meson_feature sasl with_sasl) + $(meson_use ssl with_openssl) + + -Dwith_xxhash=enabled + $(meson_feature webdav with_webdav_props) + + # Unpackaged in Gentoo + -Dwith_wolfssl=false + + $(meson_use xattr with_xattr) + $(meson_feature zlib with_zlib) + $(meson_feature zstd with_zstd) + ) + + meson_src_configure +} + +src_install() { + meson_src_install + + # Init script stuff + newinitd "${FILESDIR}"/lighttpd.initd-r2 lighttpd + newconfd "${FILESDIR}"/lighttpd.confd lighttpd + + # Configs + insinto /etc/lighttpd + newins "${FILESDIR}"/conf/lighttpd.conf-r3 lighttpd.conf + doins "${FILESDIR}"/conf/mod_cgi.conf + doins "${FILESDIR}"/conf/mod_fastcgi.conf + doins doc/config/conf.d/mime.conf + + # Update lighttpd.conf directives based on conditionals + update_config + + # Docs + dodoc AUTHORS README NEWS doc/scripts/*.sh + newdoc doc/config/lighttpd.conf lighttpd.conf.distrib + readme.gentoo_create_doc + + docinto txt + dodoc doc/outdated/*.txt + + doman doc/*.8 + + # Logrotate + insinto /etc/logrotate.d + newins "${FILESDIR}"/lighttpd.logrotate-r1 lighttpd + + keepdir /var/l{ib,og}/lighttpd /var/www/localhost/htdocs + fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd + fperms 0750 /var/l{ib,og}/lighttpd + + systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service + newtmpfiles "${FILESDIR}"/${PN}.tmpfiles.conf ${PN}.conf +} + +pkg_postinst() { + tmpfiles_process ${PN}.conf + + readme.gentoo_print_elog + + if [[ -f ${EROOT}/etc/lighttpd.conf ]] ; then + elog + elog "Gentoo has a customized configuration," + elog "which is now located in ${EROOT}/etc/lighttpd. Please migrate your" + elog "existing configuration." + fi + + if use brotli || use zstd || use zlib ; then + elog + elog "Remember to clean your cache directory when using" + elog "output compression!" + elog "https://wiki.lighttpd.net/Docs_ModDeflate" + fi +} diff --git a/www-servers/lighttpd/metadata.xml b/www-servers/lighttpd/metadata.xml index 33390f7e2be2..9e9e76560d95 100644 --- a/www-servers/lighttpd/metadata.xml +++ b/www-servers/lighttpd/metadata.xml @@ -16,9 +16,10 @@ Enable output compression via app-arch/brotli (recommended) Build module for TLS via net-libs/gnutls + Enable output compression via app-arch/libdeflate Add support for geolocation using dev-libs/libmaxminddb Build module for TLS via net-libs/mbedtls - Use dev-libs/nettle as crypto backend + Use dev-libs/nettle as crypto library Build module for TLS via Mozilla's Network Security Services Enable webdav properties Enable output compression via gzip or deflate algorithms from sys-libs/zlib diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 90248417e89a..6a3e5bb6333a 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -14,7 +14,9 @@ DIST apache-tomcat-9.0.89-src.tar.gz.asc 833 BLAKE2B 7629f94f4d036a6fc307bc6d157 DIST apache-tomcat-9.0.90-src.tar.gz 6311070 BLAKE2B 0e585a798f3bc476e826296a4fb77fde479dd88be7ea4c7f94982714a16ffca7b57ffa4cb527322192631a4eb617c6a3a19d338e592e9642c7e771cc77f7d9a7 SHA512 ade9eda20fe137080eb4fb43a36e510025822acabaf5564a950d24eded491e3f8846dff6ab6382716cd2f3aa676e4f134d28d7c1fa5f9d89230aa600d18071cb DIST apache-tomcat-9.0.90-src.tar.gz.asc 833 BLAKE2B d8c145bc9d13f79dfe3515a0dad0d389803a1e4353a0d4a164d8837fc037319b04d632db7b4c3aca55e493b9e0e1e0267d5d34f22c3bede143937c0702721d08 SHA512 74ed315b748be390e7a74705a209316625a811d163d0ed1149d58f93c02558953023836422fffbfe9b9bb68036563ad7e764d07dd65fe531fd361dda5ce8192c EBUILD tomcat-10.1.24-r1.ebuild 5432 BLAKE2B 2e9055517a60dc7fecabd030a009f793bcc8e641f1b83ce7062a0cf210d96ddfed230ed148756b88ae833bf5494af23c25a2055a4a3a512ecb8077683e1c9303 SHA512 fcafe813db6e2923369122830bde914702862e730ab23a38582df0964a703a97699c84b41e8aab06b678702fc1b94dc6a1cde5b4f2a826ceb1d09439ab56d13a +EBUILD tomcat-10.1.25-r1.ebuild 5390 BLAKE2B 4e763cf6e5f4ae77c245bc574962c1290396bb08ed77bc19eadabc0c7f72f676b6ac61c2156eb947c92decbacc0d21bdc77907e85dbcf5def3a2148115f2bd98 SHA512 b19d4c462dea2b30d9a6ecf2341bc50f84f6f678d6f902a3e46adc0c4f8c9f7ff4d6511d9f955d9ecc160350178f529e1ec4326bf00a2d5b72fa050672d5a4e5 EBUILD tomcat-10.1.25.ebuild 5433 BLAKE2B 6fb5e32c417ff83e4d353c1ee39e2a09ed020ce73998aea453c0f10c14340454e0ce04d2956da6c23e0d67e43a25596d8986dd3f8dc762ddcf63917a5cef08b4 SHA512 9b60f4a068d0382d9b5f03dec67af1a546f529a7a9bd54d713c499070bce25742101d9783c157dc325181330b466f61911bab0f91f33ce95c67ce0fbe57d1495 EBUILD tomcat-9.0.89.ebuild 5017 BLAKE2B ae1262dfd897258a71616cbf732c9ebf609380fbb674e10ae53aef3d71174f0655578be5f2c985367df6ccf0eeb96b8907e0e7f3025b0a4db8f55f899ab33152 SHA512 443117958bc417f019b4e32a300b528a86abd77c32b1abba305ca4940fb159eaa31b80ae4c6862baf827948b7c761ca554e6070a4b495abac00660a0ab8d9eb8 +EBUILD tomcat-9.0.90-r1.ebuild 4975 BLAKE2B c385929c798e8bebc7b5d0aa9066eb7dcfddc4c00bbec221232e5728a4a21fb54afcc141cc47f2b49ee5d8a6348447b17406142b4a377452fcbdb30c414c53f3 SHA512 e67ee75ddfd8aa955efc9678f56567643a51efcce7e768c393e742d44af61c4496bdde8c56de93d44c9b1dc0d9e0009a7ed64b8072afd54083d7b7abb1e2303c EBUILD tomcat-9.0.90.ebuild 5018 BLAKE2B 18aa3279abebfcbcfeb8e6c09ea0a36ab61a8041ce1105770739a79646de699089ffe530b6e85e6b07f9c7c007ba921f722dcce3d25a4a8e45bc2a988c32aa6c SHA512 e69a060a97ffeb2aae1428e87630d9ce87bb31681eb6b04d5723a32afda44e21d4996babd4f98bb42e0abe5f0a1851a46b95982d4d75b45dcd605a6acd2f2584 MISC metadata.xml 699 BLAKE2B 66aff1137e5d4ad92749176a5375c1c27c1e6cde936e05ce904d965eb71a985c421235917742d4065765e1ebf9f9e3faa51c3de109a9e5a169000b4263c3cd97 SHA512 b50874d1e741835bf8cb839517241465018254eba1ddb0e691f2b5b188eca97dd27394c29d2082654049d9ee0898c1e5e4e625666cf8abe029b8e6085122d9a0 diff --git a/www-servers/tomcat/tomcat-10.1.25-r1.ebuild b/www-servers/tomcat/tomcat-10.1.25-r1.ebuild new file mode 100644 index 000000000000..0cf5d3b43e3e --- /dev/null +++ b/www-servers/tomcat/tomcat-10.1.25-r1.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" + +inherit java-pkg-2 prefix verify-sig + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-6.0/JSP-3.1/EL-5.0/WebSocket-2.1/JASPIC-3.0 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-10/v${PV}/src/${MY_P}.tar.gz + verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/${MY_P}.tar.gz.asc )" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="10.1" +KEYWORDS="~amd64 ~arm ~arm64 ~amd64-linux" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.26" + +COMMON_DEP="dev-java/bnd-annotation:0 + dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/jax-rpc-api:0 + >=dev-java/jakartaee-migration-1.0.7-r2:0 + dev-java/wsdl4j:0" +RDEPEND="${COMMON_DEP} + acct-group/tomcat + acct-user/tomcat + >=virtual/jre-11:*" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=dev-java/ant-1.10.14-r3:0 + dev-java/bnd-ant:0 + dev-java/bnd-util:0 + dev-java/bndlib:0 + dev-java/libg:0 + dev-java/osgi-cmpn:8 + dev-java/osgi-core:0 + dev-java/slf4j-api:0 + >=virtual/jdk-17:* + test? ( + >=dev-java/ant-1.10.14-r3:0[junit] + dev-java/easymock:3.2 + )" + +BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-${PV}:${PV} )" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc" + +PATCHES=( + "${FILESDIR}/tomcat-10.1.20-do-not-copy.patch" + "${FILESDIR}/tomcat-10.1.20-offline.patch" + "${FILESDIR}/tomcat-9.0.87-gentoo-bnd.patch" +) + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + java-pkg_clean + + cat > build.properties <<-EOF || die + compile.debug=false + execute.download=false + exist=true # skip target="downloadfile-2" + version=${PV}-gentoo + version.number=${PV} + ant.jar=$(java-pkg_getjar --build-only ant ant.jar) + bnd-annotation.jar=$(java-pkg_getjars bnd-annotation) + bnd-ant.jar=$(java-pkg_getjars --build-only bnd-ant) + bnd-util.jar=$(java-pkg_getjars --build-only bnd-util) + bnd.jar=$(java-pkg_getjars --build-only bnd) + bndlib.jar=$(java-pkg_getjars --build-only bndlib) + jaxrpc-lib.jar=$(java-pkg_getjars jax-rpc-api) + jdt.jar=$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT}) + libg.jar=$(java-pkg_getjars --build-only libg) + migration-lib.jar=$(java-pkg_getjars jakartaee-migration) + osgi-cmpn.jar=$(java-pkg_getjars --build-only osgi-cmpn-8) + osgi-core.jar=$(java-pkg_getjars --build-only osgi-core) + slf4j-api.jar=$(java-pkg_getjars --build-only slf4j-api) + wsdl4j-lib.jar=$(java-pkg_getjars wsdl4j) + EOF + if use test; then + echo "easymock.jar=$(java-pkg_getjars --build-only easymock-3.2)" \ + >> build.properties || die "easymock" + fi + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die +} + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + LC_ALL=C eant +} + +src_test() { + eant 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() { + einfo "Ebuilds of Tomcat support running multiple instances. To manage Tomcat instances, run:" + einfo " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + ewarn "Please note that since version 10 the primary package for all implemented APIs" + ewarn "has changed from javax.* to jakarta.*. This will almost certainly require code" + ewarn "changes to enable applications to migrate from Tomcat 9 and earlier to Tomcat 10 and later." + + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat" +} diff --git a/www-servers/tomcat/tomcat-9.0.90-r1.ebuild b/www-servers/tomcat/tomcat-9.0.90-r1.ebuild new file mode 100644 index 000000000000..7b448f073a63 --- /dev/null +++ b/www-servers/tomcat/tomcat-9.0.90-r1.ebuild @@ -0,0 +1,170 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +JAVA_PKG_IUSE="doc source test" + +inherit java-pkg-2 prefix verify-sig + +MY_P="apache-${P}-src" + +DESCRIPTION="Tomcat Servlet-4.0/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" +HOMEPAGE="https://tomcat.apache.org/" +SRC_URI="mirror://apache/${PN}/tomcat-9/v${PV}/src/${MY_P}.tar.gz + verify-sig? ( https://downloads.apache.org/tomcat/tomcat-$(ver_cut 1)/v${PV}/src/${MY_P}.tar.gz.asc )" +S=${WORKDIR}/${MY_P} + +LICENSE="Apache-2.0" +SLOT="9" +KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux" +IUSE="extra-webapps" + +RESTRICT="test" # can we run them on a production system? + +ECJ_SLOT="4.20" + +COMMON_DEP="dev-java/bnd-annotation:0 + dev-java/eclipse-ecj:${ECJ_SLOT} + dev-java/jax-rpc-api:0 + dev-java/wsdl4j:0" +RDEPEND="${COMMON_DEP} + acct-group/tomcat + acct-user/tomcat + >=virtual/jre-1.8:*" +DEPEND="${COMMON_DEP} + app-admin/pwgen + >=dev-java/ant-1.10.14-r3:0 + dev-java/bnd-ant:0 + dev-java/bnd-util:0 + dev-java/bndlib:0 + dev-java/libg:0 + dev-java/osgi-cmpn:8 + dev-java/osgi-core:0 + dev-java/slf4j-api:0 + >=virtual/jdk-17:* + test? ( + >=dev-java/ant-1.10.14-r3:0[junit] + dev-java/easymock:3.2 + )" + +BDEPEND="verify-sig? ( ~sec-keys/openpgp-keys-apache-tomcat-${PV}:${PV} )" +VERIFY_SIG_OPENPGP_KEY_PATH="/usr/share/openpgp-keys/tomcat-${PV}.apache.org.asc" + +PATCHES=( + "${FILESDIR}/tomcat-9.0.87-build.xml.patch" + "${FILESDIR}/tomcat-9.0.87-gentoo-bnd.patch" +) + +src_prepare() { + default #780585 + java-pkg-2_src_prepare + java-pkg_clean + + cat > build.properties <<-EOF || die + compile.debug=false + execute.download=false + exist=true # skip target="downloadfile-2" + version=${PV}-gentoo + version.number=${PV} + ant.jar=$(java-pkg_getjar --build-only ant ant.jar) + bnd-annotation.jar=$(java-pkg_getjars bnd-annotation) + bnd-ant.jar=$(java-pkg_getjars --build-only bnd-ant) + bnd-util.jar=$(java-pkg_getjars --build-only bnd-util) + bnd.jar=$(java-pkg_getjars --build-only bnd) + bndlib.jar=$(java-pkg_getjars --build-only bndlib) + jaxrpc-lib.jar=$(java-pkg_getjars jax-rpc-api) + jdt.jar=$(java-pkg_getjars eclipse-ecj-${ECJ_SLOT}) + libg.jar=$(java-pkg_getjars --build-only libg) + osgi-cmpn.jar=$(java-pkg_getjars --build-only osgi-cmpn-8) + osgi-core.jar=$(java-pkg_getjars --build-only osgi-core) + slf4j-api.jar=$(java-pkg_getjars --build-only slf4j-api) + wsdl4j-lib.jar=$(java-pkg_getjars wsdl4j) + EOF + if use test; then + echo "easymock.jar=$(java-pkg_getjars --build-only easymock-3.2)" \ + >> build.properties || die "easymock" + fi + + # For use of catalina.sh in netbeans + sed -i -e "/^# ----- Execute The Requested Command/ a\ + CLASSPATH=\`java-config --with-dependencies --classpath ${PN}-${SLOT}\`" \ + bin/catalina.sh || die +} + +# revisions of the scripts +IM_REV="-r2" +INIT_REV="-r1" + +src_compile() { + LC_ALL=C eant +} + +src_test() { + eant 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() { + einfo "Ebuilds of Tomcat support running multiple instances. To manage Tomcat instances, run:" + einfo " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" + + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat" +} -- cgit v1.2.3