omnibus-software 22.11.239

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. checksums.yaml +7 -0
  2. data/.expeditor/Version_inspector/README.md +21 -0
  3. data/.expeditor/Version_inspector/SW-Version-update.py +243 -0
  4. data/.expeditor/Version_inspector/manual_prod_list.json +29 -0
  5. data/.expeditor/Version_inspector/prod_default_version.json +103 -0
  6. data/.expeditor/Version_inspector/prod_list.json +194 -0
  7. data/.expeditor/Version_inspector/requirements.txt +4 -0
  8. data/.expeditor/Version_inspector/update_prod_default_version.sh +24 -0
  9. data/.expeditor/Version_inspector/update_prod_list.sh +35 -0
  10. data/.expeditor/config.yml +33 -0
  11. data/.expeditor/determine_version.sh +15 -0
  12. data/.expeditor/push_git_tag.sh +12 -0
  13. data/.expeditor/run_linux_tests.sh +16 -0
  14. data/.expeditor/verify.pipeline.yml +52 -0
  15. data/.github/CODEOWNERS +5 -0
  16. data/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md +29 -0
  17. data/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md +40 -0
  18. data/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST_TEMPLATE.md +17 -0
  19. data/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md +11 -0
  20. data/.github/dependabot.yml +9 -0
  21. data/.github/lock.yml +1 -0
  22. data/.gitignore +17 -0
  23. data/CODE_OF_CONDUCT.md +1 -0
  24. data/CONTRIBUTING.md +1 -0
  25. data/Dockerfile +21 -0
  26. data/Gemfile +10 -0
  27. data/LICENSE +201 -0
  28. data/README.md +99 -0
  29. data/Rakefile +56 -0
  30. data/VERSION +1 -0
  31. data/config/patches/bash/race-condition.patch +15 -0
  32. data/config/patches/bzip2/aix_makefile.patch +11 -0
  33. data/config/patches/bzip2/makefile_no_bins.patch +77 -0
  34. data/config/patches/bzip2/makefile_take_env_vars.patch +31 -0
  35. data/config/patches/bzip2/soname_install_dir.patch +11 -0
  36. data/config/patches/curl/curl-aix-disable-alpn.patch +22 -0
  37. data/config/patches/curl/curl-freebsd-hostcheck.patch +10 -0
  38. data/config/patches/erlang/epmd-require-explicitly-adding-loopback-address.patch +84 -0
  39. data/config/patches/erlang/updated-epmd-require-explicitly-adding-loopback-address.patch +75 -0
  40. data/config/patches/expat/configure_xlc_visibility.patch +58 -0
  41. data/config/patches/expat/configure_xlc_visibility_2.4.7.patch +59 -0
  42. data/config/patches/figlet/aix-figlet-cdefs.patch +48 -0
  43. data/config/patches/gdbm/v1.8.3-Makefile.in.patch +32 -0
  44. data/config/patches/git/aix-endian-fix.patch +20 -0
  45. data/config/patches/gtar/aix_extra_case.patch +13 -0
  46. data/config/patches/keepalived/keepalived-1.2.9_opscode_centos_5.patch +15 -0
  47. data/config/patches/libedit/freebsd-vi-fix.patch +24 -0
  48. data/config/patches/libedit/openbsd-weak-alias-fix.patch +48 -0
  49. data/config/patches/libedit/solaris.patch +36 -0
  50. data/config/patches/libffi/libffi-3.2.1-disable-multi-os-directory.patch +83 -0
  51. data/config/patches/libffi/libffi-3.3-arm64.patch +9608 -0
  52. data/config/patches/libxslt/libxslt-solaris-configure.patch +19 -0
  53. data/config/patches/libxslt/libxslt-windows-relocate.patch +12 -0
  54. data/config/patches/libyaml/windows-configure.patch +26 -0
  55. data/config/patches/libzmq/zeromq-4.0.11_mingw_inet_pton.patch +37 -0
  56. data/config/patches/libzmq/zeromq-aix-4.2.2-LARGE_FILES.patch +56 -0
  57. data/config/patches/libzmq/zeromq-aix-4.2.2-atomic-counter-fetch_and_add.patch +59 -0
  58. data/config/patches/logrotate/logrotate_basedir_override.patch +17 -0
  59. data/config/patches/m4/m4-1.4.18-glibc-change-work-around.patch +115 -0
  60. data/config/patches/make/deb-make-glob.patch +31 -0
  61. data/config/patches/ncurses/ncurses-5.9-gcc-5.patch +46 -0
  62. data/config/patches/ncurses/ncurses-5.9-solaris-xopen_source_extended-detection.patch +11 -0
  63. data/config/patches/ncurses/ncurses-clang.patch +43 -0
  64. data/config/patches/ncurses/patch-aa +23 -0
  65. data/config/patches/ncurses/patch-ab +44 -0
  66. data/config/patches/ncurses/patch-ac +40 -0
  67. data/config/patches/ncurses/patch-ad +13 -0
  68. data/config/patches/ncurses/patch-cxx_cursesf.h +22 -0
  69. data/config/patches/ncurses/patch-cxx_cursesm.h +22 -0
  70. data/config/patches/ncurses/patch-ncurses_tinfo_lib__baudrate.c +24 -0
  71. data/config/patches/openssl/openssl-1.0.1f-do-not-build-docs.patch +28 -0
  72. data/config/patches/openssl/openssl-1.0.1j-windows-relocate-dll.patch +20 -0
  73. data/config/patches/openssl/openssl-1.0.1q-fix-compiler-flags-table-for-msys.patch +20 -0
  74. data/config/patches/openssl/openssl-1.0.2x-darwin-arm64.patch +54 -0
  75. data/config/patches/openssl/openssl-1.1.0f-do-not-install-docs.patch +11 -0
  76. data/config/patches/openssl/openssl-3.0.1-do-not-install-docs.patch +22 -0
  77. data/config/patches/openssl-fips/openssl-fips-fix-compiler-flags-table-for-msys.patch +11 -0
  78. data/config/patches/perl/perl-5.18.1-remove_lnsl.patch +441 -0
  79. data/config/patches/perl/perl-5.22.1-remove_lnsl.patch +512 -0
  80. data/config/patches/perl/perl-5.30.0-remove_lnsl.patch +518 -0
  81. data/config/patches/perl/perl-5.32.1-remove_lnsl.patch +456 -0
  82. data/config/patches/perl/perl-5.34.0-remove_lnsl.patch +516 -0
  83. data/config/patches/pkg-config/openbsd-charset.patch +19 -0
  84. data/config/patches/popt/v1.16.ppc64le-configure.patch +18 -0
  85. data/config/patches/redis/password-from-environment.patch +19 -0
  86. data/config/patches/ruby/patch-configure +103 -0
  87. data/config/patches/ruby/remove_nano.patch +10 -0
  88. data/config/patches/ruby/ruby-2.6.7_c99.patch +12 -0
  89. data/config/patches/ruby/ruby-3.0.1-configure.patch +281 -0
  90. data/config/patches/ruby/ruby-3.0.2-configure.patch +251 -0
  91. data/config/patches/ruby/ruby-aix-atomic.patch +11 -0
  92. data/config/patches/ruby/ruby-aix-configure_26_and_later.patch +19 -0
  93. data/config/patches/ruby/ruby-aix-vm-core.patch +14 -0
  94. data/config/patches/ruby/ruby-fast-load_26.patch +16 -0
  95. data/config/patches/ruby/ruby-fast-load_31.patch +16 -0
  96. data/config/patches/ruby/ruby-faster-load_26.patch +11 -0
  97. data/config/patches/ruby/ruby-faster-load_27.patch +11 -0
  98. data/config/patches/ruby/ruby-mkmf.patch +29 -0
  99. data/config/patches/ruby/ruby-no-stack-protector-strong.patch +11 -0
  100. data/config/patches/ruby/ruby-no-stack-protector.patch +13 -0
  101. data/config/patches/ruby/ruby-win32_warning_removal.patch +12 -0
  102. data/config/patches/ruby/ruby_aix_openssl.patch +10 -0
  103. data/config/patches/ruby/ruby_aix_ssl_EAGAIN.patch +19 -0
  104. data/config/patches/ruby/rvm-cflags.patch +27 -0
  105. data/config/patches/stunnel/stunnel-on-windows.patch +42 -0
  106. data/config/patches/zlib/zlib-windows-relocate.patch +20 -0
  107. data/config/software/autoconf.rb +46 -0
  108. data/config/software/automake.rb +49 -0
  109. data/config/software/bash.rb +72 -0
  110. data/config/software/berkshelf-no-depselector.rb +46 -0
  111. data/config/software/berkshelf.rb +34 -0
  112. data/config/software/binutils.rb +47 -0
  113. data/config/software/bundler.rb +38 -0
  114. data/config/software/bzip2.rb +55 -0
  115. data/config/software/cacerts.rb +50 -0
  116. data/config/software/chef-gem.rb +35 -0
  117. data/config/software/chef.rb +112 -0
  118. data/config/software/cmake.rb +94 -0
  119. data/config/software/config_guess.rb +37 -0
  120. data/config/software/cpanminus.rb +49 -0
  121. data/config/software/curl.rb +103 -0
  122. data/config/software/delivery-cli.rb +89 -0
  123. data/config/software/dep-selector-libgecode.rb +48 -0
  124. data/config/software/elasticsearch.rb +61 -0
  125. data/config/software/elixir.rb +35 -0
  126. data/config/software/erlang.rb +134 -0
  127. data/config/software/expat.rb +63 -0
  128. data/config/software/fakeroot.rb +41 -0
  129. data/config/software/ffi-yajl.rb +46 -0
  130. data/config/software/figlet-fonts.rb +31 -0
  131. data/config/software/figlet.rb +44 -0
  132. data/config/software/gcc.rb +60 -0
  133. data/config/software/gdbm.rb +54 -0
  134. data/config/software/gecode.rb +62 -0
  135. data/config/software/gem-permissions.rb +43 -0
  136. data/config/software/git-windows.rb +96 -0
  137. data/config/software/git.rb +138 -0
  138. data/config/software/gmp.rb +48 -0
  139. data/config/software/go-uninstall.rb +33 -0
  140. data/config/software/go.rb +116 -0
  141. data/config/software/google-protobuf.rb +45 -0
  142. data/config/software/gtar.rb +62 -0
  143. data/config/software/help2man.rb +40 -0
  144. data/config/software/highline-gem.rb +37 -0
  145. data/config/software/ibm-jre.rb +59 -0
  146. data/config/software/inspec.rb +43 -0
  147. data/config/software/jre-from-jdk.rb +67 -0
  148. data/config/software/keepalived.rb +68 -0
  149. data/config/software/libarchive.rb +71 -0
  150. data/config/software/libedit.rb +73 -0
  151. data/config/software/libffi.rb +68 -0
  152. data/config/software/libgcc.rb +52 -0
  153. data/config/software/libiconv.rb +55 -0
  154. data/config/software/libintl-perl.rb +56 -0
  155. data/config/software/liblzma.rb +59 -0
  156. data/config/software/libossp-uuid.rb +45 -0
  157. data/config/software/libsodium.rb +40 -0
  158. data/config/software/libtool.rb +56 -0
  159. data/config/software/libuuid.rb +45 -0
  160. data/config/software/libxml2.rb +63 -0
  161. data/config/software/libxslt.rb +64 -0
  162. data/config/software/libyajl2-gem.rb +44 -0
  163. data/config/software/libyaml.rb +50 -0
  164. data/config/software/libzmq.rb +93 -0
  165. data/config/software/logrotate.rb +61 -0
  166. data/config/software/lua.rb +46 -0
  167. data/config/software/m4.rb +40 -0
  168. data/config/software/make.rb +43 -0
  169. data/config/software/makedepend.rb +44 -0
  170. data/config/software/mpc.rb +44 -0
  171. data/config/software/mpfr.rb +45 -0
  172. data/config/software/musl.rb +107 -0
  173. data/config/software/mysql2.rb +50 -0
  174. data/config/software/ncurses.rb +159 -0
  175. data/config/software/nginx.rb +55 -0
  176. data/config/software/nodejs-binary.rb +90 -0
  177. data/config/software/nodejs.rb +58 -0
  178. data/config/software/nokogiri.rb +92 -0
  179. data/config/software/omnibus-ctl.rb +42 -0
  180. data/config/software/openresty.rb +94 -0
  181. data/config/software/opensearch.rb +54 -0
  182. data/config/software/openssl-customization.rb +81 -0
  183. data/config/software/openssl-fips.rb +81 -0
  184. data/config/software/openssl.rb +185 -0
  185. data/config/software/patch.rb +46 -0
  186. data/config/software/patchelf.rb +66 -0
  187. data/config/software/pcre.rb +53 -0
  188. data/config/software/perl-extutils-embed.rb +37 -0
  189. data/config/software/perl-extutils-makemaker.rb +46 -0
  190. data/config/software/perl-thread-queue.rb +40 -0
  191. data/config/software/perl.rb +78 -0
  192. data/config/software/perl_pg_driver.rb +45 -0
  193. data/config/software/pg-gem.rb +36 -0
  194. data/config/software/pkg-config-lite.rb +46 -0
  195. data/config/software/pkg-config.rb +66 -0
  196. data/config/software/popt.rb +54 -0
  197. data/config/software/postgresql.rb +70 -0
  198. data/config/software/preparation.rb +31 -0
  199. data/config/software/python.rb +79 -0
  200. data/config/software/rabbitmq.rb +58 -0
  201. data/config/software/rb-readline.rb +33 -0
  202. data/config/software/rbnacl-libsodium.rb +42 -0
  203. data/config/software/rbzmq.rb +44 -0
  204. data/config/software/rebar.rb +42 -0
  205. data/config/software/redis-gem.rb +36 -0
  206. data/config/software/redis.rb +51 -0
  207. data/config/software/relx.rb +39 -0
  208. data/config/software/rsync.rb +55 -0
  209. data/config/software/ruby-cleanup.rb +254 -0
  210. data/config/software/ruby-msys2-devkit.rb +77 -0
  211. data/config/software/ruby-windows-devkit-bash.rb +41 -0
  212. data/config/software/ruby-windows-devkit.rb +84 -0
  213. data/config/software/ruby.rb +306 -0
  214. data/config/software/rubygems.rb +73 -0
  215. data/config/software/runit.rb +67 -0
  216. data/config/software/rust-uninstall.rb +32 -0
  217. data/config/software/rust.rb +97 -0
  218. data/config/software/sequel-gem.rb +36 -0
  219. data/config/software/server-jre.rb +125 -0
  220. data/config/software/server-open-jre.rb +112 -0
  221. data/config/software/setuptools.rb +48 -0
  222. data/config/software/shebang-cleanup.rb +101 -0
  223. data/config/software/sqitch.rb +87 -0
  224. data/config/software/stunnel.rb +86 -0
  225. data/config/software/util-macros.rb +42 -0
  226. data/config/software/version-manifest.rb +33 -0
  227. data/config/software/xproto.rb +42 -0
  228. data/config/software/zlib.rb +85 -0
  229. data/config/templates/git/config.mak.erb +31 -0
  230. data/config/templates/rubygems/register_devtools.rb.erb +33 -0
  231. data/config/templates/runit/runsvdir-start.erb +42 -0
  232. data/docker-compose.yml +15 -0
  233. data/lib/omnibus-software/version.rb +3 -0
  234. data/lib/omnibus-software.rb +115 -0
  235. data/omnibus-software.gemspec +20 -0
  236. data/test/Gemfile +10 -0
  237. data/test/config/projects/test.rb +14 -0
  238. data/test/generate_steps.rb +55 -0
  239. data/test/omnibus-build.sh +50 -0
  240. data/test/omnibus.rb +55 -0
  241. metadata +296 -0
@@ -0,0 +1,85 @@
1
+ #
2
+ # Copyright 2012-2018 Chef Software, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ name "zlib"
18
+ default_version "1.2.12"
19
+
20
+ # version_list: url=https://zlib.net/fossils/ filter=*.tar.gz
21
+
22
+ version("1.2.12") { source sha256: "91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9" }
23
+ version("1.2.11") { source sha256: "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1" }
24
+ version("1.2.8") { source sha256: "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d" }
25
+ version("1.2.6") { source sha256: "21235e08552e6feba09ea5e8d750805b3391c62fb81c71a235c0044dc7a8a61b" }
26
+
27
+ source url: "https://zlib.net/fossils/zlib-#{version}.tar.gz"
28
+
29
+ license "Zlib"
30
+ license_file "README"
31
+ skip_transitive_dependency_licensing true
32
+
33
+ relative_path "zlib-#{version}"
34
+
35
+ build do
36
+ if windows?
37
+ env = with_standard_compiler_flags(with_embedded_path)
38
+
39
+ patch source: "zlib-windows-relocate.patch", env: env
40
+
41
+ # We can't use the top-level Makefile. Instead, the developers have made
42
+ # an organic, artisanal, hand-crafted Makefile.gcc for us which takes a few
43
+ # variables.
44
+ env["BINARY_PATH"] = "/bin"
45
+ env["LIBRARY_PATH"] = "/lib"
46
+ env["INCLUDE_PATH"] = "/include"
47
+ env["DESTDIR"] = "#{install_dir}/embedded"
48
+
49
+ make_args = [
50
+ "-fwin32/Makefile.gcc",
51
+ "SHARED_MODE=1",
52
+ "CFLAGS=\"#{env["CFLAGS"]} -Wall\"",
53
+ "ASFLAGS=\"#{env["CFLAGS"]} -Wall\"",
54
+ "LDFLAGS=\"#{env["LDFLAGS"]}\"",
55
+ # The win32 makefile for zlib does not handle parallel make correctly.
56
+ # In particular, see its rule for IMPLIB and SHAREDLIB. The ld step in
57
+ # SHAREDLIB will generate both the dll and the dll.a files. The step to
58
+ # strip the dll occurs next but since the dll.a file is already present,
59
+ # make will attempt to link example_d.exe and minigzip_d.exe in parallel
60
+ # with the strip step - causing gcc to freak out when a source file is
61
+ # rewritten part way through the linking stage.
62
+ # "-j #{workers}",
63
+ ]
64
+
65
+ make(*make_args, env: env)
66
+ make("install", *make_args, env: env)
67
+ else
68
+ # We omit the omnibus path here because it breaks mac_os_x builds by picking
69
+ # up the embedded libtool instead of the system libtool which the zlib
70
+ # configure script cannot handle.
71
+ # TODO: Do other OSes need this? Is this strictly a mac thing?
72
+ env = with_standard_compiler_flags
73
+ if freebsd? || solaris2?
74
+ # FreeBSD 10+ gets cranky if zlib is not compiled in a
75
+ # position-independent way.
76
+ # zlib 1.2.12 introduced the same problem on Solaris.
77
+ env["CFLAGS"] << " -fPIC"
78
+ end
79
+
80
+ configure env: env
81
+
82
+ make "-j #{workers}", env: env
83
+ make "-j #{workers} install", env: env
84
+ end
85
+ end
@@ -0,0 +1,31 @@
1
+ <%- if cc -%>
2
+ CC=<%= cc %>
3
+ <%- end -%>
4
+ <%- if ld -%>
5
+ LD=<%= ld %>
6
+ <%- end -%>
7
+ <%- if cflags -%>
8
+ CFLAGS=<%= cflags %>
9
+ <%- end -%>
10
+ <%- if cppflags -%>
11
+ CPPFLAGS=<%= cppflags %>
12
+ <%- end -%>
13
+ <%- if ldflags -%>
14
+ LDFLAGS=<%= ldflags %>
15
+ <%- end -%>
16
+ <%- if install -%>
17
+ INSTALL=<%= install %>
18
+ <%- end -%>
19
+ <%- if shell_path -%>
20
+ SHELL_PATH=<%= shell_path %>
21
+ <%- end -%>
22
+ CURLDIR=<%= install_dir %>/embedded
23
+ EXPATDIR=<%= install_dir %>/embedded
24
+ ICONVDIR=<%= install_dir %>/embedded
25
+ LIBPCREDIR=<%= install_dir %>/embedded
26
+ OPENSSLDIR=<%= install_dir %>/embedded
27
+ ZLIB_PATH=<%= install_dir %>/embedded
28
+
29
+ <%- config_hash.each_pair do |k, v| -%>
30
+ <%= k.to_s %>=<%= v %>
31
+ <%- end -%>
@@ -0,0 +1,33 @@
1
+ require 'fileutils'
2
+ require 'pathname'
3
+
4
+ os_file_path = 'rubygems/defaults/operating_system.rb'
5
+
6
+ def registration_snippet(file_path)
7
+ relative_paths = <%= paths %>.map do |p|
8
+ Pathname.new(p).relative_path_from(Pathname.new(file_path)).to_s
9
+ end
10
+
11
+ <<EOF
12
+ Gem.pre_install do |gem_installer|
13
+ unless gem_installer.spec.extensions.empty?
14
+ tool_paths = #{relative_paths}.map do |p|
15
+ File.expand_path(p, __FILE__).gsub(File::SEPARATOR, File::ALT_SEPARATOR)
16
+ end
17
+ tool_path = tool_paths.join(File::PATH_SEPARATOR)
18
+ unless ENV['PATH'].include?(tool_path)
19
+ Gem.ui.say("Adding native build tools to path: " + tool_path) if Gem.configuration.verbose
20
+ ENV['PATH'] = [tool_path, ENV['PATH']].join(File::PATH_SEPARATOR)
21
+ end
22
+ end
23
+ end
24
+ EOF
25
+ end
26
+
27
+ ['rubylibdir', 'sitelibdir'].each do |rubygems_path|
28
+ file_path = File.join(RbConfig::CONFIG[rubygems_path], os_file_path)
29
+ FileUtils.mkdir_p(File.dirname(file_path))
30
+ File.open(file_path, 'w') do |file|
31
+ file.write(registration_snippet(file_path))
32
+ end
33
+ end
@@ -0,0 +1,42 @@
1
+ #!/bin/bash
2
+ #
3
+ # Copyright 2012-<%= Time.now.year %> Chef Software, Inc.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ PATH=<%= install_dir %>/bin:<%= install_dir %>/embedded/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
19
+
20
+ ulimit -c 0
21
+ ulimit -d unlimited
22
+ ulimit -e 0
23
+ ulimit -f unlimited
24
+ ulimit -i 62793
25
+ ulimit -l 64
26
+ ulimit -m unlimited
27
+ # WARNING: Increasing the global file descriptor limit increases RAM
28
+ # consumption on startup dramatically!
29
+ ulimit -n 50000
30
+ ulimit -q 819200
31
+ ulimit -r 0
32
+ ulimit -s 10240
33
+ ulimit -t unlimited
34
+ ulimit -u unlimited
35
+ ulimit -v unlimited
36
+ ulimit -x unlimited
37
+ echo "1000000" > /proc/sys/fs/file-max
38
+
39
+ umask 022
40
+
41
+ exec env - PATH=$PATH \
42
+ runsvdir -P <%= install_dir %>/service 'log: <%= '.'*395 %>'
@@ -0,0 +1,15 @@
1
+ services:
2
+ builder:
3
+ build: .
4
+ volumes:
5
+ - ./:/omnibus-software
6
+ - ./test:/test
7
+ working_dir: /test
8
+ command: bash --init-file omnibus-build.sh
9
+
10
+ # Multiple concurrent "docker-compose run" commands on the same system in the CI pipeline caused intermittent failures
11
+ # while creating the network.
12
+ # Using "network_mode: bridge" forces compose to use docker's legacy default bridge network instead.
13
+ # We considered namespacing the network using COMPOSE_PROJECT_NAME=$BUILDKITE_JOB_ID but using the legacy bridge network
14
+ # means we can avoid worrying about any impact and management overhead that multiple networks might create.
15
+ network_mode: bridge
@@ -0,0 +1,3 @@
1
+ module OmnibusSoftware
2
+ VERSION = File.read(File.join(__dir__, "../../VERSION")).strip.freeze
3
+ end
@@ -0,0 +1,115 @@
1
+ #
2
+ # Copyright 2012-2014 Chef Software, Inc.
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+ #
16
+
17
+ require "pathname" unless defined?(Pathname)
18
+ require "omnibus"
19
+ require "highline"
20
+
21
+ module OmnibusSoftware
22
+ class << self
23
+ #
24
+ # The root where Omnibus Software lives.
25
+ #
26
+ # @return [Pathname]
27
+ #
28
+ def root
29
+ @root ||= Pathname.new(File.expand_path("..", __dir__))
30
+ end
31
+
32
+ #
33
+ # Verify the given software definitions, iterating over each software and
34
+ # loading it. This is probably the most primitive test ever - just load the
35
+ # DSL files - but it is the best thing we have for CI in omnibus-software.
36
+ #
37
+ # @return [void]
38
+ #
39
+ def verify!
40
+ for_each_software do |_software|
41
+ $stdout.print "."
42
+ end
43
+ end
44
+
45
+ def fetch(name, path)
46
+ fetch_software(load_software(name), path)
47
+ end
48
+
49
+ def fetch_all(path)
50
+ for_each_software do |software|
51
+ # only fetch net_fetcher sources for now
52
+ next if software.source.nil? || software.source[:url].nil?
53
+
54
+ fetch_software(software, path)
55
+ end
56
+ end
57
+
58
+ def fetch_software(software, path)
59
+ Omnibus::Config.cache_dir File.expand_path(path)
60
+ Omnibus::Config.use_s3_caching false
61
+ Omnibus.logger.level = :debug
62
+ puts "Fetching #{software.name}"
63
+ software.fetcher.fetch
64
+ end
65
+
66
+ def list
67
+ Omnibus.logger.level = :fatal
68
+ h = HighLine.new
69
+ for_output = ["Name", "Default Version", "Source"]
70
+ for_each_software do |software|
71
+ for_output += [software.name, software.default_version, maybe_source(software.source)]
72
+ end
73
+ puts h.list(for_output, :uneven_columns_across, 3)
74
+ end
75
+
76
+ private
77
+
78
+ def maybe_source(source)
79
+ if source
80
+ if source[:git]
81
+ "GIT #{source[:git]}"
82
+ elsif source[:url]
83
+ "NET #{source[:url]}"
84
+ else
85
+ "OTHER"
86
+ end
87
+ else
88
+ "NONE"
89
+ end
90
+ end
91
+
92
+ def fake_project
93
+ @fake_project ||= Omnibus::Project.new.evaluate do
94
+ name "project.sample"
95
+ install_dir "tmp/project.sample"
96
+ end
97
+ end
98
+
99
+ def software_dir
100
+ OmnibusSoftware.root.join("config/software")
101
+ end
102
+
103
+ def load_software(software_name)
104
+ Omnibus::Config.local_software_dirs(OmnibusSoftware.root)
105
+ Omnibus::Software.load(fake_project, software_name, nil)
106
+ end
107
+
108
+ def for_each_software
109
+ Dir.glob("#{software_dir}/*.rb").each do |filepath|
110
+ name = File.basename(filepath, ".rb")
111
+ yield load_software(name)
112
+ end
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,20 @@
1
+ $:.push File.expand_path("lib", __dir__)
2
+ require "omnibus-software/version"
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "omnibus-software"
6
+ s.version = OmnibusSoftware::VERSION
7
+ s.authors = ["Chef Software, Inc."]
8
+ s.email = ["info@chef.io"]
9
+ s.license = "Apache-2.0"
10
+ s.homepage = "https://github.com/chef/omnibus-software"
11
+ s.summary = "Open Source software for use with Omnibus"
12
+ s.description = "Open Source software build descriptions for use with Omnibus"
13
+
14
+ # Software definitions in this bundle require at least this version of
15
+ # omnibus because of the dsl methods they are using.
16
+ s.add_dependency "omnibus", ">= 9.0.0"
17
+
18
+ s.files = `git ls-files`.split("\n")
19
+ s.require_paths = ["lib"]
20
+ end
data/test/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "omnibus", github: "chef/omnibus", branch: "main"
4
+ gem "omnibus-software", path: "/omnibus-software"
5
+
6
+ group :development do
7
+ gem "pry"
8
+ gem "pry-byebug"
9
+ gem "pry-stack_explorer"
10
+ end
@@ -0,0 +1,14 @@
1
+ name "test"
2
+ maintainer "Chef Software, Inc."
3
+ homepage "https://www.chef.io"
4
+
5
+ install_dir "#{default_root}/#{name}"
6
+
7
+ build_version Omnibus::BuildVersion.semver
8
+ build_iteration 1
9
+
10
+ dependency ENV["SOFTWARE"]
11
+
12
+ if ENV["VERSION"]
13
+ override ENV["SOFTWARE"].to_sym, version: ENV["VERSION"]
14
+ end
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "open3"
4
+
5
+ # Get the branch to compare against (rename default to 'main' once migration occurs)
6
+ BRANCH = ENV["BUILDKITE_PULL_REQUEST_BASE_BRANCH"] || "main"
7
+
8
+ # Read in all the versions that are specified by SOFTWARE
9
+ def version(version = nil)
10
+ $versions << version
11
+ end
12
+
13
+ def default_version(version = nil)
14
+ $versions << version
15
+ end
16
+
17
+ # Get a list of all the config/software definitions that have been added or modified
18
+ _, status = Open3.capture2e("git config --global --add safe.directory /workdir")
19
+ exit 1 if status != 0
20
+ _, status = Open3.capture2e("git fetch origin #{BRANCH}")
21
+ exit 1 if status != 0
22
+ stdout, status = Open3.capture2("git diff --name-status origin/#{BRANCH}...HEAD config/software | awk 'match($1, \"A\"){print $2; next} match($1, \"M\"){print $2}'")
23
+ exit 1 if status != 0
24
+
25
+ files = stdout.lines.compact.uniq.map(&:chomp)
26
+ exit 0 if files.empty?
27
+
28
+ puts "steps:"
29
+ files.each do |file|
30
+ software = File.basename(file, ".rb")
31
+ $versions = []
32
+
33
+ File.readlines(file).each do |line|
34
+ # match if line starts with "default_version" or "version"
35
+ if line.match(/^\s*(default_)?version/)
36
+ # remove the beginning of any ruby block if it exists
37
+ line.sub!(/\s*(do|{).*/, "")
38
+
39
+ # rubocop:disable Security/Eval
40
+ eval(line)
41
+ end
42
+ end
43
+
44
+ $versions.compact.uniq.each do |version|
45
+ puts <<~EOH
46
+ - label: "test-build (#{software} #{version})"
47
+ command: docker-compose run --rm -e SOFTWARE=#{software} -e VERSION=#{version} -e CI builder
48
+ timeout_in_minutes: 30
49
+ expeditor:
50
+ executor:
51
+ linux:
52
+ privileged: true
53
+ EOH
54
+ end
55
+ end
@@ -0,0 +1,50 @@
1
+ #!/bin/bash
2
+
3
+ # shellcheck disable=SC1090
4
+ . ~/.bashrc
5
+
6
+ echo "--- Setting Omnibus build environment variables"
7
+
8
+ export PATH="/opt/omnibus-toolchain/bin:${PATH}"
9
+ echo "PATH=${PATH}"
10
+
11
+ if [[ -f "/opt/omnibus-toolchain/embedded/ssl/certs/cacert.pem" ]]; then
12
+ export SSL_CERT_FILE="/opt/omnibus-toolchain/embedded/ssl/certs/cacert.pem"
13
+ echo "SSL_CERT_FILE=${SSL_CERT_FILE}"
14
+ fi
15
+
16
+ ###################################################################
17
+ # Query tool versions
18
+ ###################################################################
19
+ echo ""
20
+ echo ""
21
+ echo "========================================"
22
+ echo "= Tool Versions"
23
+ echo "========================================"
24
+ echo ""
25
+ echo "Bash.........$(bash --version | head -1)"
26
+ echo "Bundler......$(bundle --version | head -1)"
27
+ echo "GCC..........$(gcc --version | head -1)"
28
+ echo "Git..........$(git --version | head -1)"
29
+ echo "Make.........$(make --version | head -1)"
30
+ echo "Ruby.........$(ruby --version | head -1)"
31
+ echo "RubyGems.....$(gem --version | head -1)"
32
+ echo ""
33
+ echo "========================================"
34
+
35
+ rm -f Gemfile.lock
36
+ rm -rf .bundle
37
+
38
+ if [[ $CI == true ]]; then
39
+ DEBUG=1 bundle config set --local without development
40
+ fi
41
+
42
+ echo "--- Running bundle install"
43
+
44
+ DEBUG=1 bundle install
45
+
46
+ if [[ $CI == true ]]; then
47
+ echo "--- Building"
48
+ bundle exec omnibus build test
49
+ exit $?
50
+ fi
data/test/omnibus.rb ADDED
@@ -0,0 +1,55 @@
1
+ #
2
+ # This file is used to configure the harmony project. It contains
3
+ # some minimal configuration examples for working with Omnibus. For a full list
4
+ # of configurable options, please see the documentation for +omnibus/config.rb+.
5
+ #
6
+
7
+ # Build internally
8
+ # ------------------------------
9
+ # By default, Omnibus uses system folders (like +/var+ and +/opt+) to build and
10
+ # cache components. If you would to build everything internally, you can
11
+ # uncomment the following options. This will prevent the need for root
12
+ # permissions in most cases. You will also need to update the harmony
13
+ # project configuration to build at +./local/omnibus/build+ instead of
14
+ # +/opt/harmony+
15
+ #
16
+ # Uncomment this line to change the default base directory to "local"
17
+ # -------------------------------------------------------------------
18
+ # base_dir './local'
19
+ #
20
+ # Alternatively you can tune the individual values
21
+ # ------------------------------------------------
22
+ # cache_dir './local/omnibus/cache'
23
+ # git_cache_dir './local/omnibus/cache/git_cache'
24
+ # source_dir './local/omnibus/src'
25
+ # build_dir './local/omnibus/build'
26
+ # package_dir './local/omnibus/pkg'
27
+ # package_tmp './local/omnibus/pkg-tmp'
28
+
29
+ # Windows architecture defaults - set to x86 unless otherwise specified.
30
+ # ------------------------------
31
+ env_omnibus_windows_arch = (ENV["OMNIBUS_WINDOWS_ARCH"] || "").downcase
32
+ env_omnibus_windows_arch = :x64 unless %w{x86 x64}.include?(env_omnibus_windows_arch)
33
+
34
+ windows_arch env_omnibus_windows_arch
35
+
36
+ # Disable git caching
37
+ # ------------------------------
38
+ use_git_caching false
39
+
40
+ # Enable S3 asset caching
41
+ # ------------------------------
42
+ use_s3_caching false
43
+
44
+ # Customize compiler bits
45
+ # ------------------------------
46
+ # solaris_compiler 'gcc'
47
+
48
+ # Do not retry builds
49
+ # ------------------------------
50
+ build_retries 0
51
+
52
+ # Load additional software
53
+ # ------------------------------
54
+ # software_gems ['omnibus-software', 'my-company-software']
55
+ # local_software_dirs ['/path/to/local/software']