-
-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Homebrew/brew
#6040Labels
outdatedPR was locked due to agePR was locked due to age
Description
- are reporting a bug others will be able to reproduce and not asking a question or requesting software. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh. To get software added or changed in Homebrew please file a Pull Request
- have a problem with
brew install(orupgrade,reinstall) a single, Homebrew/homebrew-core formula (not cask) on macOS? If it's a generalbrewproblem please file this issue at Homebrew/brew: https://github.com/Homebrew/brew/issues/new/choose. If it's a Linux problem please file this issue at https://github.com/Homebrew/linuxbrew-core/issues/new/choose. If it's abrew caskproblem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap. - ran
brew updateand can still reproduce the problem? - ran
brew doctor, fixed all issues and can still reproduce the problem? - ran
brew gist-logs <formula>(where<formula>is the name of the formula that failed) and included the output link? -
ifbrew gist-logsdidn't work: ranbrew configandbrew doctorand included their output with your issue?
What you were trying to do (and why)
I'm trying to install Jenkins on a fresh Homebrew installation.
What happened (include command output)
Jenkins fails to install, as Java 1.8 is required, but no longer installable (see homebrew-cask-versions/issues/7253)
$ brew install jenkins
jenkins: Java 1.8 is required to install this formula.
JavaRequirement unsatisfied!
You can install with Homebrew Cask:
brew cask install homebrew/cask-versions/java8
You can download from:
https://www.oracle.com/technetwork/java/javase/downloads/index.html
Error: An unsatisfied requirement failed this build.
What you expected to happen
Have Jenkins installed with a supported JVM
Step-by-step reproduction instructions (by running brew install commands)
$ brew install jenkins
jenkins: Java 1.8 is required to install this formula.
JavaRequirement unsatisfied!
You can install with Homebrew Cask:
brew cask install homebrew/cask-versions/java8
You can download from:
https://www.oracle.com/technetwork/java/javase/downloads/index.html
Error: An unsatisfied requirement failed this build.
$ brew cask install homebrew/cask-versions/java8
==> Caveats
Installing java8 means you have AGREED to the license at:
https://www.oracle.com/technetwork/java/javase/terms/license/javase-license.html
==> Satisfying dependencies
==> Downloading https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-macosx-x64.dmg
==> Downloading from https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-macosx-x64.dmg?AuthPara
curl: (22) The requested URL returned error: 404 Not Found
Error: Download failed on Cask 'java8' with message: Download failed: https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-macosx-x64.dmg
Workaround
Change the formula to switch to Java 11 (Java 12 is not supported) to avoid users having to deal with outdated Java 1.8 or using an unlicensed copy by accident.
The following is my proposed changes that work fine for me:
diff --git a/Formula/jenkins.rb b/Formula/jenkins.rb
index c224540791..0ee01bdee0 100644
--- a/Formula/jenkins.rb
+++ b/Formula/jenkins.rb
@@ -11,7 +11,7 @@ class Jenkins < Formula
bottle :unneeded
- depends_on :java => "1.8"
+ depends_on :java => "11"
def install
if build.head?
@@ -20,8 +20,8 @@ class Jenkins < Formula
system "jar", "xvf", "jenkins.war"
end
libexec.install Dir["**/jenkins.war", "**/jenkins-cli.jar"]
- bin.write_jar_script libexec/"jenkins.war", "jenkins", :java_version => "1.8"
- bin.write_jar_script libexec/"jenkins-cli.jar", "jenkins-cli", :java_version => "1.8"
+ bin.write_jar_script libexec/"jenkins.war", "jenkins", :java_version => "11"
+ bin.write_jar_script libexec/"jenkins-cli.jar", "jenkins-cli", :java_version => "11"
end
def caveats; <<~EOS
@@ -42,7 +42,7 @@ class Jenkins < Formula
<array>
<string>/usr/libexec/java_home</string>
<string>-v</string>
- <string>1.8</string>
+ <string>11</string>
<string>--exec</string>
<string>java</string>
<string>-Dmail.smtp.starttls.enable=true</string>
Metadata
Metadata
Assignees
Labels
outdatedPR was locked due to agePR was locked due to age