Skip to content

Commit

Permalink
Merge pull request #201311 from Homebrew/bump-tomcat-11.0.2
Browse files Browse the repository at this point in the history
tomcat 11.0.2 tomcat@10 10.1.34 (new formula)
  • Loading branch information
BrewTestBot authored Dec 16, 2024
2 parents 6e96485 + 631f582 commit 2d6ad05
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3055,6 +3055,7 @@ tofuenv
toipe
tomcat
tomcat-native
tomcat@10
tomcat@9
tomee-plume
tomee-plus
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions Formula/t/tomcat.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
class Tomcat < Formula
desc "Implementation of Java Servlet and JavaServer Pages"
homepage "https://tomcat.apache.org/"
url "https://www.apache.org/dyn/closer.lua?path=tomcat/tomcat-10/v10.1.34/bin/apache-tomcat-10.1.34.tar.gz"
mirror "https://archive.apache.org/dist/tomcat/tomcat-10/v10.1.34/bin/apache-tomcat-10.1.34.tar.gz"
sha256 "f799541380bfff2b674cefd86c5376d2d7d566b3a2e7c4579d2b491de8ec6c36"
url "https://www.apache.org/dyn/closer.lua?path=tomcat/tomcat-11/v11.0.2/bin/apache-tomcat-11.0.2.tar.gz"
mirror "https://archive.apache.org/dist/tomcat/tomcat-11/v11.0.2/bin/apache-tomcat-11.0.2.tar.gz"
sha256 "c1b31a6989d30a7344c1a3655da74679ce9f9b48a271e864647a141de3b78cb8"
license "Apache-2.0"

bottle do
sha256 cellar: :any_skip_relocation, all: "87735143f1cd9368f75dba7a7b394f436ebc737343a777d892bec7d64926c1a5"
sha256 cellar: :any_skip_relocation, all: "71c14e8939230e4b7b4b9e8e716a5920c89c68c68ffa16288574d156355f1461"
end

depends_on "openjdk"
Expand Down
63 changes: 63 additions & 0 deletions Formula/t/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
class TomcatAT10 < Formula
desc "Implementation of Java Servlet and JavaServer Pages"
homepage "https://tomcat.apache.org/"
url "https://www.apache.org/dyn/closer.lua?path=tomcat/tomcat-10/v10.1.34/bin/apache-tomcat-10.1.34.tar.gz"
mirror "https://archive.apache.org/dist/tomcat/tomcat-10/v10.1.34/bin/apache-tomcat-10.1.34.tar.gz"
sha256 "f799541380bfff2b674cefd86c5376d2d7d566b3a2e7c4579d2b491de8ec6c36"
license "Apache-2.0"

livecheck do
url :stable
end

bottle do
sha256 cellar: :any_skip_relocation, all: "6c8fc0955ba8d245c8d66c1e8192ef2f08ad9bd12e6a3e511b1034e5b9f089e8"
end

keg_only :versioned_formula

depends_on "openjdk"

def install
# Remove Windows scripts
rm_r(Dir["bin/*.bat"])

# Install files
prefix.install %w[NOTICE LICENSE RELEASE-NOTES RUNNING.txt]

pkgetc.install Dir["conf/*"]
(buildpath/"conf").rmdir
libexec.install_symlink pkgetc => "conf"

libexec.install Dir["*"]
(bin/"catalina").write_env_script "#{libexec}/bin/catalina.sh", JAVA_HOME: Formula["openjdk"].opt_prefix
end

def caveats
<<~EOS
Configuration files: #{pkgetc}
EOS
end

service do
run [opt_bin/"catalina", "run"]
keep_alive true
end

test do
ENV["CATALINA_BASE"] = testpath
cp_r Dir["#{libexec}/*"], testpath
rm Dir["#{libexec}/logs/*"]

pid = fork do
exec bin/"catalina", "start"
end
sleep 3
begin
system bin/"catalina", "stop"
ensure
Process.wait pid
end
assert_predicate testpath/"logs/catalina.out", :exist?
end
end

0 comments on commit 2d6ad05

Please sign in to comment.