Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

OC-7187 xdarklaunch #16

Merged
merged 2 commits into from Apr 23, 2013

Conversation

Projects
None yet
4 participants
Contributor

hosh commented Apr 4, 2013

  • Added openresty 1.2.6.6

Requires:

@hosh hosh referenced this pull request in chef-boneyard/opscode-omnibus Apr 4, 2013

Closed

OC-7452: xdarklaunch (OLD) #100

@schisamo schisamo commented on an outdated diff Apr 4, 2013

config/software/openresty.rb
+
+dependencies ["pcre", "openssl", "zlib"]
+
+source :url => "http://agentzh.org/misc/nginx/ngx_openresty-1.2.7.1.tar.gz",
+ :md5 => "87e51a962a9cc911ba85dfc95d671117"
+
+relative_path "ngx_openresty-1.2.7.1"
+
+
+# OpenResty has a finicky build process. Below, we are statically-linking pcre, openssl, and zlib
+# As such, it needs to match those deps
+
+build do
+ # Run make clean against statically linked targets
+
+ %w(pcre-8.31 openssl-1.0.1c zlib-1.2.6).each do |lib|
@schisamo

schisamo Apr 4, 2013

Owner

This seems dangerous, we've never needed to do something like that before. You probably don't have your LDFLAGS or CFLAGS set up correctly. For example:
https://github.com/opscode/omnibus-software/blob/master/config/software/postgresql.rb#L31-L35

@schisamo schisamo and 1 other commented on an outdated diff Apr 4, 2013

config/software/openresty.rb
+ command 'make clean', :cwd => File.join(source_dir, lib)
+ end
+ # Configure with statically-linked zlib, openssl, and pcre
+ command ["./configure",
+ "--prefix=#{install_dir}/embedded",
+ "--sbin-path=#{install_dir}/embedded/sbin/nginx",
+ "--conf-path=#{install_dir}/embedded/conf/nginx.conf",
+ "--with-http_ssl_module",
+ "--with-debug",
+ "--with-ld-opt=-L#{install_dir}/embedded/lib",
+ "--with-cc-opt=\"-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include\"",
+ # Merged from Openresty Cookbook
+ '--with-md5-asm',
+ '--with-sha1-asm',
+ '--with-pcre-jit',
+ "--with-pcre=#{File.join(source_dir, 'pcre-8.31')}",
@schisamo

schisamo Apr 4, 2013

Owner

pretty sure you don't want to do this against the source dir..it should be something like:

--with-pcre=#{install_dir}/embedded
--with-openssl=#{install_dir}/embedded
--with-zlib=#{install_dir}/embedded
@sdelano

sdelano Apr 4, 2013

Contributor

👍

@schisamo schisamo and 1 other commented on an outdated diff Apr 4, 2013

config/software/nagios-plugins.rb
@@ -21,7 +21,7 @@
dependencies ["zlib", "openssl", "postgresql", "libiconv"]
# the url is the location of a redirect from sourceforge
-source :url => "http://voxel.dl.sourceforge.net/project/nagiosplug/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz",
+source :url => "http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz",
@schisamo

schisamo Apr 4, 2013

Owner

Have we ensured no other software definitions are hardcoded to a mirror?

@hosh

hosh Apr 10, 2013

Contributor

@schisamo Only zlib. I'll update it and rebase.

@seth seth commented on an outdated diff Apr 11, 2013

config/software/cacerts.rb
@@ -25,6 +25,7 @@
build do
command "mkdir -p #{install_dir}/embedded/ssl/certs"
- command "cp cacert.pem #{install_dir}/embedded/ssl/certs/cacert.pem"
+ # cp from the omnibus cache instead of where fetcher tries to put it
+ command "cp cacert.pem #{install_dir}/embedded/ssl/certs/cacert.pem", :cwd => '/var/cache/omnibus/cache'
@seth

seth Apr 11, 2013

Owner

this is hard to read with the line break there.

@seth seth commented on an outdated diff Apr 11, 2013

config/software/openresty.rb
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name "openresty"
+version "1.2.7.1"
@seth

seth Apr 11, 2013

Owner

Looks like we've moved to 1.2.7.3 in OHC. Let's get those in sync.

@seth seth and 1 other commented on an outdated diff Apr 11, 2013

config/software/openresty.rb
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name "openresty"
+version "1.2.7.1"
+
+dependencies ["pcre", "openssl", "zlib"]
+
+source :url => "http://agentzh.org/misc/nginx/ngx_openresty-1.2.7.1.tar.gz",
+ :md5 => "87e51a962a9cc911ba85dfc95d671117"
+
+relative_path "ngx_openresty-1.2.7.1"
@seth

seth Apr 11, 2013

Owner

This should perhaps use the version from above?

@hosh

hosh Apr 11, 2013

Contributor

Ok, I'll run another one against 1.2.7.3 and update to use version while I am at it.

@schisamo schisamo and 1 other commented on an outdated diff Apr 16, 2013

config/software/cacerts.rb
@@ -25,6 +25,13 @@
build do
command "mkdir -p #{install_dir}/embedded/ssl/certs"
- command "cp cacert.pem #{install_dir}/embedded/ssl/certs/cacert.pem"
+
+ # There is a bug in omnibus-ruby that may or may not have been fixed. Since the source url
+ # does not point to an archive, omnibus-ruby tries to copy cacert.pem into the project working
+ # directory. However, it fails and copies to '/var/cache/omnibus/src/cacerts-2012.12.19\' instead
+ # There is supposed to be a fix in omnibus-ruby, but under further testing, it was unsure if the
+ # fix worked. Rather than trying to fix this now, we're filing a bug and copying the cacert.pem
+ # directly from the cache instead.
+ command "cp cacert.pem #{install_dir}/embedded/ssl/certs/cacert.pem", :cwd => '/var/cache/omnibus/cache'
@schisamo

schisamo Apr 16, 2013

Owner

probably want to make the cwd: :cwd => Omnibus.config.cache_dir since this path differs based on platform.

@hosh

hosh Apr 16, 2013

Contributor

Ahh, good call.

Owner

seth commented Apr 23, 2013

👍

Please to MWR (after your other PR here) Not sure if you'll want to rebase or what, but would be nice to keep the unrelated patches separate in history.

hosh added some commits Apr 4, 2013

@hosh hosh [openresty] Added openresty build based upon nginx.
Added an openresty build definition. It should be a drop-in replacement
for standard nginx.

 - Since openresty is a metapackage, its configure script descends into
   the source files and calls `configure` for nginx. In order to link to
   the embedded shared libraries, we added linker and cc flags to force a
   lookup in the embedded directories first

 - The sbin and nginx.conf had to be explicitly set to the omnibus
   convensions.

 - Openresty cookbook will automatically detect AIO capabilities and
   automatically enable AIO compile flags. It appears that Ubuntu 10.04
   have the necessary kernel version. However, this requires compiling
   additional AIO libraries. This is a possible improvement for future
   builds.
95f8095
@hosh hosh [openresty] Bumped to Openresty 1.2.6.6 68a2ac0

@hosh hosh merged commit 68a2ac0 into master Apr 23, 2013

@hosh hosh deleted the hh/OC-7187/xdarklaunch branch Apr 23, 2013

@hosh hosh referenced this pull request in chef-boneyard/opscode-omnibus Apr 23, 2013

Merged

OC-7452: xdarklaunch #103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment