New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
orientdb 2.2.2 #2004
orientdb 2.2.2 #2004
Conversation
This PR makes #1589 obsolete. That PR should be closed (if this passes)... |
@MikeMcQuaid @UniqMartin, I could use a little help here. I was able to work past @arxpoetica's issues with the pid and database locations in #1589. Now |
url "https://orientdb.com/download.php?email=unknown@unknown.com&file=orientdb-community-2.1.16.tar.gz&os=mac" | ||
version "2.1.16" | ||
sha256 "41ad0db53c418459d0efbf6a7f7e2b39f48467f1ec582efa925ceb38de3f3cc6" | ||
url "http://orientdb.com/download.php?email=unknown@unknown.com&file=orientdb-community-2.2.2.tar.gz&os=mac" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't switch back to insecure HTTP if HTTPS works. It also looks like the URL can be simplified (according to the information in the OrientDB documentation):
url "https://orientdb.com/download.php?file=orientdb-community-2.2.2.tar.gz"
@UniqMartin, url has been updated, but I still have a failing build even though tests pass locally.... |
Yes, I noticed. I suspect it's an issue on our end, but I haven't had the time yet to investigate. (I hope to be able to do this shortly.) Meanwhile, the URL change caused an audit error. Please try to keep in mind to re-run |
@UniqMartin, fixed the audit, thanks. |
Alright, it's not a problem with our CI. I tried it locally and the formula still has several issues that need to be resolved for this to work.
That's about as far as I got. Maybe there are more problems and more stuff needs to be adjusted. |
Great, thanks for the input! I'll keep working on it. |
mkpath "#{libexec}/log" | ||
touch "#{libexec}/log/orientdb.err" | ||
touch "#{libexec}/log/orientdb.log" | ||
mkpath "#{var}/db/orientdb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably make this (and the one below)
(var/"db/orientdb").mkpath
@ilovezfs, thanks for the suggestions, I've made those changes. Do you know how I can stop orientdb from writing to |
@austinsmorris That'd be |
Ideally, you would want to make sure that it also has its own PID file and log files as its undesirable that the test modifies these if the test every happens to be run by a user (contrary to our CI that always starts from a clean state). For the parts where you modify the shell scripts, something like that can be achieved by allowing those values to be overridden by environment variables and falling back to the defaults if unset, e.g.: inreplace "#{libexec}/bin/server.sh", "ORIENTDB_PID=$ORIENTDB_HOME/bin", "ORIENTDB_PID=\"${ORIENTDB_PID:-#{var}/run/orientdb}\"" and then setting the environment variable in the ENV["ORIENTDB_PID"] = testpath/"pid" For the other two files that you need to manipulate for the regular installation, you'd need to check how to achieve this. Maybe you can copy the configuration files to the test path and then tell the server to use those files instead of the ones in the usual location. |
@austinsmorris for successful passing of the tests use the following patch: diff --git a/Formula/orientdb.rb b/Formula/orientdb.rb
index fb55488..48764c0 100644
--- a/Formula/orientdb.rb
+++ b/Formula/orientdb.rb
@@ -28,6 +28,7 @@ class Orientdb < Formula
(var/"db/orientdb").mkpath
(var/"log/orientdb").mkpath
+ (var/"run/orientdb").mkpath
touch "#{var}/log/orientdb/orientdb.err"
touch "#{var}/log/orientdb/orientdb.log"
inreplace "#{libexec}/config/orientdb-server-config.xml", "</properties>", " <entry name=\"server.database.path\" value=\"#{var}/db/orientdb\" />\n </properties>"
@@ -46,8 +47,13 @@ class Orientdb < Formula
end
test do
+ ENV["CONFIG_FILE"] = "#{testpath}/orientdb-server-config.xml"
+
+ cp "#{libexec}/config/orientdb-server-config.xml", testpath
+ inreplace "#{testpath}/orientdb-server-config.xml", "</properties>", " <entry name=\"server.database.path\" value=\"#{testpath}\" />\n </properties>"
+
system "#{bin}/orientdb", "start"
- sleep 2
+ sleep 4
begin
assert_match "OrientDB Server v.2.2.2", shell_output("curl -I localhost:2480")
|
Thanks @SlamJam, looks like it's good to go! |
(var/"run/orientdb").mkpath | ||
touch "#{var}/log/orientdb/orientdb.err" | ||
touch "#{var}/log/orientdb/orientdb.log" | ||
inreplace "#{libexec}/config/orientdb-server-config.xml", "</properties>", " <entry name=\"server.database.path\" value=\"#{var}/db/orientdb\" />\n </properties>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use EOS.undent
instead of \n
s. Split this into multiple lines so it wraps at ~80 characters.
Last tiny nit and we should be good to go here 👍 |
I'd love to see this get merged. Anything I could to do expedite the process? |
@BrewTestBot test this please |
Merged and then cleaned up in a795ebd so people could get using this sooner rather than later. |
brew install <formula>
(where<formula>
is the name of the formula you're submitting)?brew audit --strict --online <formula>
(after doingbrew install <formula>
)?