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,306 @@
1
+ #
2
+ # Copyright:: Copyright (c) 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
+ # do_not_auto_update
17
+
18
+ name "ruby"
19
+
20
+ license "BSD-2-Clause"
21
+ license_file "BSDL"
22
+ license_file "COPYING"
23
+ license_file "LEGAL"
24
+ skip_transitive_dependency_licensing true
25
+
26
+ # the default versions should always be the latest release of ruby
27
+ # if you consume this definition it is your responsibility to pin
28
+ # to the desired version of ruby. don't count on this not changing.
29
+ default_version "3.1.2"
30
+
31
+ dependency "zlib"
32
+ dependency "openssl"
33
+ dependency "libffi"
34
+ dependency "libyaml"
35
+
36
+ # we build omnibus packages on freebsd 11 and use the packages on freebsd 11, 12 and 13.
37
+ # the ruby executable has been linking to freebsds system's ncurses library files.
38
+ # freebsd 13 system's ncurses library files have a different name than freebsd 11 and 12
39
+ # which causes the ruby executable to fail.
40
+ # adding ncurses as a dependency for freebsd prevents the ruby executable from linking to the
41
+ # system's ncurses library files thereby allowing the package built on freebsd 11 to work on freebsd 13.
42
+ dependency "ncurses" if freebsd?
43
+
44
+ # version_list: url=https://cache.ruby-lang.org/pub/ruby/ filter=*.tar.gz
45
+ version("3.1.2") { source sha256: "61843112389f02b735428b53bb64cf988ad9fb81858b8248e22e57336f24a83e" }
46
+ version("3.1.1") { source sha256: "fe6e4782de97443978ddba8ba4be38d222aa24dc3e3f02a6a8e7701c0eeb619d" }
47
+ version("3.0.4") { source sha256: "70b47c207af04bce9acea262308fb42893d3e244f39a4abc586920a1c723722b" }
48
+ version("3.0.3") { source sha256: "3586861cb2df56970287f0fd83f274bd92058872d830d15570b36def7f1a92ac" }
49
+ version("3.0.2") { source sha256: "5085dee0ad9f06996a8acec7ebea4a8735e6fac22f22e2d98c3f2bc3bef7e6f1" }
50
+ version("3.0.1") { source sha256: "369825db2199f6aeef16b408df6a04ebaddb664fb9af0ec8c686b0ce7ab77727" }
51
+
52
+ version("2.7.6") { source sha256: "e7203b0cc09442ed2c08936d483f8ac140ec1c72e37bb5c401646b7866cb5d10" }
53
+ version("2.7.5") { source sha256: "2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1" }
54
+ version("2.7.4") { source sha256: "3043099089608859fc8cce7f9fdccaa1f53a462457e3838ec3b25a7d609fbc5b" }
55
+ version("2.7.3") { source sha256: "8925a95e31d8f2c81749025a52a544ea1d05dad18794e6828709268b92e55338" }
56
+
57
+ version("2.6.10") { source sha256: "0dc609f263d49c4176d5725deefc337273676395985b5e017789373e8cadf16e" }
58
+ version("2.6.9") { source sha256: "eb7bae7aac64bf9eb2153710a4cafae450ccbb62ae6f63d573e1786178b0efbb" }
59
+ version("2.6.8") { source sha256: "1807b78577bc08596a390e8a41aede37b8512190e05c133b17d0501791a8ca6d" }
60
+ version("2.6.7") { source sha256: "e4227e8b7f65485ecb73397a83e0d09dcd39f25efd411c782b69424e55c7a99e" }
61
+
62
+ source url: "https://cache.ruby-lang.org/pub/ruby/#{version.match(/^(\d+\.\d+)/)[0]}/ruby-#{version}.tar.gz"
63
+
64
+ # In order to pass notarization we need to sign any binaries and libraries included in the package.
65
+ # This makes sure we include and bins and libs that are brought in by gems.
66
+ semver = Gem::Version.create(version).segments
67
+ ruby_mmv = "#{semver[0..1].join(".")}.0"
68
+ ruby_dir = "#{install_dir}/embedded/lib/ruby/#{ruby_mmv}"
69
+ gem_dir = "#{install_dir}/embedded/lib/ruby/gems/#{ruby_mmv}"
70
+ bin_dirs bin_dirs.concat ["#{gem_dir}/gems/*/bin/**"]
71
+ lib_dirs ["#{ruby_dir}/**", "#{gem_dir}/extensions/**", "#{gem_dir}/gems/*", "#{gem_dir}/gems/*/lib/**", "#{gem_dir}/gems/*/ext/**"]
72
+
73
+ relative_path "ruby-#{version}"
74
+
75
+ env = with_standard_compiler_flags(with_embedded_path)
76
+
77
+ if mac_os_x?
78
+ # -Qunused-arguments suppresses "argument unused during compilation"
79
+ # warnings. These can be produced if you compile a program that doesn't
80
+ # link to anything in a path given with -Lextra-libs. Normally these
81
+ # would be harmless, except that autoconf treats any output to stderr as
82
+ # a failure when it makes a test program to check your CFLAGS (regardless
83
+ # of the actual exit code from the compiler).
84
+ arch = intel? ? "x86_64" : "arm64"
85
+ env["CFLAGS"] << " -I#{install_dir}/embedded/include/ncurses -arch #{arch} -m64 -O3 -g -pipe -Qunused-arguments"
86
+ env["LDFLAGS"] << " -arch #{arch}"
87
+ elsif freebsd?
88
+ # Stops "libtinfo.so.5.9: could not read symbols: Bad value" error when
89
+ # compiling ext/readline. See the following for more info:
90
+ #
91
+ # https://lists.freebsd.org/pipermail/freebsd-current/2013-October/045425.html
92
+ # http://mailing.freebsd.ports-bugs.narkive.com/kCgK8sNQ/ports-183106-patch-sysutils-libcdio-does-not-build-on-10-0-and-head
93
+ #
94
+ env["LDFLAGS"] << " -ltinfow"
95
+ elsif aix?
96
+ # this magic per IBM
97
+ env["LDSHARED"] = "xlc -G"
98
+ env["CFLAGS"] = "-I#{install_dir}/embedded/include/ncurses -I#{install_dir}/embedded/include"
99
+ # this magic per IBM
100
+ env["XCFLAGS"] = "-DRUBY_EXPORT"
101
+ # need CPPFLAGS set so ruby doesn't try to be too clever
102
+ env["CPPFLAGS"] = "-I#{install_dir}/embedded/include/ncurses -I#{install_dir}/embedded/include"
103
+ env["SOLIBS"] = "-lm -lc"
104
+ # need to use GNU m4, default m4 doesn't work
105
+ env["M4"] = "/opt/freeware/bin/m4"
106
+ elsif solaris2?
107
+ env["CXXFLAGS"] = "#{env["CXXFLAGS"]} -std=c++0x"
108
+ elsif windows?
109
+ # this forces ruby >= 3.0 to pick up the gcc in the devkit rather than the cc in /opt/omnibus-toolchain
110
+ # which is necessary for mkmf.rb to be able to correctly build native gems. in an ideal world the compilation
111
+ # environment in omnibus-toolchain would probably need to look a little more identical to the devkit.
112
+ env["CC"] = "gcc"
113
+ env["CFLAGS"] = "-I#{install_dir}/embedded/include -DFD_SETSIZE=2048"
114
+ if windows_arch_i386?
115
+ env["CFLAGS"] << " -m32 -march=i686 -O3"
116
+ else
117
+ env["CFLAGS"] << " -m64 -march=x86-64 -O3"
118
+ end
119
+ env["CPPFLAGS"] = env["CFLAGS"]
120
+ env["CXXFLAGS"] = env["CFLAGS"]
121
+ else # including linux
122
+ env["CFLAGS"] << " -O3 -g -pipe"
123
+ end
124
+
125
+ build do
126
+ # AIX needs /opt/freeware/bin only for patch
127
+ patch_env = env.dup
128
+ patch_env["PATH"] = "/opt/freeware/bin:#{env["PATH"]}" if aix?
129
+
130
+ if version.satisfies?("~> 3.0.0")
131
+ case version
132
+ when "3.0.1"
133
+ patch source: "ruby-3.0.1-configure.patch", plevel: 1, env: patch_env
134
+ else
135
+ patch source: "ruby-3.0.2-configure.patch", plevel: 1, env: patch_env
136
+ end
137
+ end
138
+
139
+ # remove the warning that the win32 api is going away.
140
+ if windows? && version.satisfies?("< 3.0")
141
+ patch source: "ruby-win32_warning_removal.patch", plevel: 1, env: patch_env
142
+ end
143
+
144
+ # RHEL6 has a base compiler that does not support -fstack-protector-strong, but we
145
+ # cannot build modern ruby on the RHEL6 base compiler, and the configure script
146
+ # determines that it supports that flag and so includes it and then ultimately
147
+ # pushes that into native gem compilations which then blows up for end users when
148
+ # they try to install native gems. So, we have to hack this up to avoid using
149
+ # that flag on RHEL6.
150
+ #
151
+ if rhel? && platform_version.satisfies?("< 7")
152
+ patch source: "ruby-no-stack-protector-strong.patch", plevel: 1, env: patch_env
153
+ end
154
+
155
+ # accelerate requires of c-extension.
156
+ #
157
+ # this would break code which did `require "thing"` and loaded thing.so and
158
+ # then fiddled with the libpath and did `require "thing"` and loaded thing.rb
159
+ # over the top of it. AFAIK no sane ruby code should need to do that, and the
160
+ # cost of this behavior in core ruby is enormous.
161
+ #
162
+ if version.satisfies?("< 3.1")
163
+ patch source: "ruby-fast-load_26.patch", plevel: 1, env: patch_env
164
+ else
165
+ patch source: "ruby-fast-load_31.patch", plevel: 1, env: patch_env
166
+ end
167
+
168
+ # this removes a checks for windows nano in the win32-ole files.
169
+ # windows nano is a dead platform and not supported by chef so we can avoid
170
+ # registry lookups by patching away this code
171
+ if windows?
172
+ patch source: "remove_nano.patch", plevel: 1, env: patch_env
173
+ end
174
+
175
+ # accelerate requires by removing a File.expand_path
176
+ #
177
+ # the expand_path here seems to be largely useless and produces a large amount
178
+ # of lstat(2) calls on unix, and increases the runtime of a chef-client --version
179
+ # test by 33% on windows. on modern linuxen that have openat(2) it is totally
180
+ # useless. this patch breaks no built-in tests on ruby on old platforms, and
181
+ # it is unclear why or if it is necessary (hand crafted tests designed to try to
182
+ # abuse it all succeeded after this test).
183
+ #
184
+ if version.satisfies?("~> 2.6.0")
185
+ patch source: "ruby-faster-load_26.patch", plevel: 1, env: patch_env
186
+ end
187
+ if version.satisfies?(">= 2.7")
188
+ patch source: "ruby-faster-load_27.patch", plevel: 1, env: patch_env
189
+ end
190
+
191
+ # disable libpath in mkmf across all platforms, it trolls omnibus and
192
+ # breaks the postgresql cookbook. i'm not sure why ruby authors decided
193
+ # this was a good idea, but it breaks our use case hard. AIX cannot even
194
+ # compile without removing it, and it breaks some native gem installs on
195
+ # other platforms. generally you need to have a condition where the
196
+ # embedded and non-embedded libs get into a fight (libiconv, openssl, etc)
197
+ # and ruby trying to set LD_LIBRARY_PATH itself gets it wrong.
198
+ #
199
+ # Also, fix paths emitted in the makefile on windows on both msys and msys2.
200
+ patch source: "ruby-mkmf.patch", plevel: 1, env: patch_env
201
+
202
+ configure_command = ["--with-out-ext=dbm,readline",
203
+ "--enable-shared",
204
+ "--disable-install-doc",
205
+ "--without-gmp",
206
+ "--without-gdbm",
207
+ "--without-tk",
208
+ "--disable-dtrace",
209
+ "--disable-jit-support"]
210
+ configure_command << "--with-bundled-md5" if fips_mode?
211
+
212
+ # resolve C99 code accidentally introduced in Ruby 2.6.7 and it's still in 2.6.8 :(
213
+ patch source: "ruby-2.6.7_c99.patch", plevel: 1, env: patch_env if version.satisfies?("~> 2.6.7", "< 2.6.10")
214
+
215
+ if aix?
216
+ # need to patch ruby's configure file so it knows how to find shared libraries
217
+ patch source: "ruby-aix-configure_26_and_later.patch", plevel: 1, env: patch_env
218
+
219
+ # have ruby use zlib on AIX correctly
220
+ patch source: "ruby_aix_openssl.patch", plevel: 1, env: patch_env
221
+ # AIX has issues with ssl retries, need to patch to have it retry
222
+ patch source: "ruby_aix_ssl_EAGAIN.patch", plevel: 1, env: patch_env
223
+ # the next two patches are because xlc doesn't deal with long vs int types well
224
+ patch source: "ruby-aix-atomic.patch", plevel: 1, env: patch_env if version.satisfies?("< 3.0")
225
+ patch source: "ruby-aix-vm-core.patch", plevel: 1, env: patch_env if version.satisfies?("< 3.0")
226
+
227
+ # per IBM, just enable pthread
228
+ configure_command << "--enable-pthread"
229
+
230
+ elsif freebsd?
231
+ # Disable optional support C level backtrace support. This requires the
232
+ # optional devel/libexecinfo port to be installed.
233
+ configure_command << "ac_cv_header_execinfo_h=no"
234
+ configure_command << "--with-opt-dir=#{install_dir}/embedded"
235
+ elsif smartos?
236
+ # Patches taken from RVM.
237
+ # http://bugs.ruby-lang.org/issues/5384
238
+ # https://www.illumos.org/issues/1587
239
+ # https://github.com/wayneeseguin/rvm/issues/719
240
+ patch source: "rvm-cflags.patch", plevel: 1, env: patch_env
241
+
242
+ # From RVM forum
243
+ # https://github.com/wayneeseguin/rvm/commit/86766534fcc26f4582f23842a4d3789707ce6b96
244
+ configure_command << "ac_cv_func_dl_iterate_phdr=no"
245
+ configure_command << "--with-opt-dir=#{install_dir}/embedded"
246
+ elsif solaris2?
247
+ # In ruby-2.5.0 on Solaris 11 Random.urandom defaults to arc4random_buf() as
248
+ # its implementation which is buggy and returns nothing but zeros. We therefore
249
+ # force that API off.
250
+ configure_command << "ac_cv_func_arc4random_buf=no"
251
+ elsif windows?
252
+ configure_command << "debugflags=-g"
253
+ configure_command << "--with-winnt-ver=0x0602" # the default is 0x0600 which is Vista. 602 is Windows 8 (2012)
254
+ else
255
+ configure_command << "--with-opt-dir=#{install_dir}/embedded"
256
+ end
257
+
258
+ # FFS: works around a bug that infects AIX when it picks up our pkg-config
259
+ # AFAIK, ruby does not need or use this pkg-config it just causes the build to fail.
260
+ # The alternative would be to patch configure to remove all the pkg-config garbage entirely
261
+ env["PKG_CONFIG"] = "/bin/true" if aix?
262
+
263
+ configure(*configure_command, env: env)
264
+
265
+ make "-j #{workers}", env: env
266
+ make "-j #{workers} install", env: env
267
+
268
+ if windows?
269
+ # Needed now that we switched to msys2 and have not figured out how to tell
270
+ # it how to statically link yet
271
+ dlls = [
272
+ "libwinpthread-1",
273
+ "libstdc++-6",
274
+ ]
275
+
276
+ if windows_arch_i386?
277
+ dlls << "libgcc_s_dw2-1"
278
+ else
279
+ dlls << "libgcc_s_seh-1"
280
+ end
281
+
282
+ dlls.each do |dll|
283
+ mingw = ENV["MSYSTEM"].downcase
284
+ # Starting omnibus-toolchain version 1.1.115 we do not build msys2 as a part of omnibus-toolchain anymore, but pre install it in image
285
+ # so here we set the path to default install of msys2 first and default to OMNIBUS_TOOLCHAIN_INSTALL_DIR for backward compatibility
286
+ msys_path = ENV["MSYS2_INSTALL_DIR"] ? "#{ENV["MSYS2_INSTALL_DIR"]}" : "#{ENV["OMNIBUS_TOOLCHAIN_INSTALL_DIR"]}/embedded/bin"
287
+ windows_path = "#{msys_path}/#{mingw}/bin/#{dll}.dll"
288
+ if File.exist?(windows_path)
289
+ copy windows_path, "#{install_dir}/embedded/bin/#{dll}.dll"
290
+ else
291
+ raise "Cannot find required DLL needed for dynamic linking: #{windows_path}"
292
+ end
293
+ end
294
+
295
+ %w{ erb gem irb rdoc ri bundle }.each do |cmd|
296
+ copy "#{project_dir}/bin/#{cmd}", "#{install_dir}/embedded/bin/#{cmd}"
297
+ end
298
+
299
+ # Ruby seems to mark rake.bat as read-only.
300
+ # Mark it as writable so that we can install other version of rake without
301
+ # running into permission errors.
302
+ command "attrib -r #{install_dir}/embedded/bin/rake.bat"
303
+
304
+ end
305
+
306
+ end
@@ -0,0 +1,73 @@
1
+ #
2
+ # Copyright 2012-2016 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
+ # expeditor/ignore: deprecated 2021-04
17
+
18
+ name "rubygems"
19
+
20
+ license "MIT"
21
+ license_file "https://raw.githubusercontent.com/rubygems/rubygems/master/LICENSE.txt"
22
+ skip_transitive_dependency_licensing true
23
+
24
+ dependency "ruby"
25
+
26
+ if version && !source
27
+ known_tarballs = {
28
+ "2.4.1" => "7e39c31806bbf9268296d03bd97ce718",
29
+ "2.4.4" => "440a89ad6a3b1b7a69b034233cc4658e",
30
+ "2.4.5" => "5918319a439c33ac75fbbad7fd60749d",
31
+ "2.4.8" => "dc77b51449dffe5b31776bff826bf559",
32
+ "2.6.7" => "9cd4c5bdc70b525dfacd96e471a64605",
33
+ "2.6.8" => "40b3250f28c1d0d5cb9ff5ab2b17df6e",
34
+ }
35
+ known_tarballs.each do |vsn, md5|
36
+ version vsn do
37
+ source md5: md5, url: "https://rubygems.org/rubygems/rubygems-#{vsn}.tgz"
38
+ relative_path "rubygems-#{vsn}"
39
+ end
40
+ end
41
+ end
42
+
43
+ # If we still don't have a source (if it's a tarball) grab from ruby ...
44
+ if version && !source
45
+ # If the version is a gem version, we"ll just be using rubygems.
46
+ # If it's a branch or SHA (i.e. v1.2.3) we use github.
47
+ begin
48
+ Gem::Version.new(version)
49
+ rescue ArgumentError
50
+ source git: "https://github.com/rubygems/rubygems.git"
51
+ end
52
+ end
53
+
54
+ # git repo is always expanded to "rubygems"
55
+ if source && source.include?(:git)
56
+ relative_path "rubygems"
57
+ end
58
+
59
+ build do
60
+ env = with_standard_compiler_flags(with_embedded_path)
61
+
62
+ if source
63
+ # Building from source:
64
+ command "git submodule init", env: env
65
+ command "git submodule update", env: env
66
+ ruby "setup.rb --no-document", env: env
67
+ else
68
+ # Installing direct from rubygems:
69
+ # If there is no version, this will get latest.
70
+ gem "update --no-document --system #{version}", env: env
71
+ gem "uninstall rubygems-update -ax"
72
+ end
73
+ end
@@ -0,0 +1,67 @@
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
+ name "runit"
18
+ default_version "2.1.2"
19
+
20
+ license "BSD-3-Clause"
21
+ license_file "../package/COPYING"
22
+ skip_transitive_dependency_licensing true
23
+
24
+ # version_list: url=http://smarden.org/runit/ filter=*.tar.gz
25
+
26
+ version("2.1.2") { source sha256: "6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18" }
27
+ version("2.1.1") { source sha256: "ffcf2d27b32f59ac14f2d4b0772a3eb80d9342685a2042b7fbbc472c07cf2a2c" }
28
+
29
+ source url: "http://smarden.org/runit/runit-#{version}.tar.gz"
30
+
31
+ relative_path "admin/runit-#{version}/src"
32
+
33
+ build do
34
+ env = with_standard_compiler_flags(with_embedded_path)
35
+
36
+ # Put runit where we want it, not where they tell us to
37
+ command 'sed -i -e "s/^char\ \*varservice\ \=\"\/service\/\";$/char\ \*varservice\ \=\"' + install_dir.gsub("/", "\\/") + '\/service\/\";/" sv.c', env: env
38
+
39
+ # TODO: the following is not idempotent
40
+ command "sed -i -e s:-static:: Makefile", env: env
41
+
42
+ # Build it
43
+ make env: env
44
+ make "check", env: env
45
+
46
+ # Move it
47
+ mkdir "#{install_dir}/embedded/bin"
48
+ copy "#{project_dir}/chpst", "#{install_dir}/embedded/bin"
49
+ copy "#{project_dir}/runit", "#{install_dir}/embedded/bin"
50
+ copy "#{project_dir}/runit-init", "#{install_dir}/embedded/bin"
51
+ copy "#{project_dir}/runsv", "#{install_dir}/embedded/bin"
52
+ copy "#{project_dir}/runsvchdir", "#{install_dir}/embedded/bin"
53
+ copy "#{project_dir}/runsvdir", "#{install_dir}/embedded/bin"
54
+ copy "#{project_dir}/sv", "#{install_dir}/embedded/bin"
55
+ copy "#{project_dir}/svlogd", "#{install_dir}/embedded/bin"
56
+ copy "#{project_dir}/utmpset", "#{install_dir}/embedded/bin"
57
+
58
+ erb source: "runsvdir-start.erb",
59
+ dest: "#{install_dir}/embedded/bin/runsvdir-start",
60
+ mode: 0755,
61
+ vars: { install_dir: install_dir }
62
+
63
+ # Setup service directories
64
+ touch "#{install_dir}/service/.gitkeep"
65
+ touch "#{install_dir}/sv/.gitkeep"
66
+ touch "#{install_dir}/init/.gitkeep"
67
+ end
@@ -0,0 +1,32 @@
1
+ # Copyright 2016 Chef Software, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+ #
15
+ # expeditor/ignore: deprecated 2022-02
16
+
17
+ name "rust-uninstall"
18
+ default_version "0.0.1"
19
+
20
+ license :project_license
21
+
22
+ dependency "rust"
23
+
24
+ build do
25
+ env = with_standard_compiler_flags(with_embedded_path)
26
+
27
+ # Until Omnibus has full support for build depedencies (see chef/omnibus#483)
28
+ # we don't want to ship the Rust and Cargo in our final artifact. Luckily
29
+ # Rust ships with a nice uninstall script which makes it easy to strip
30
+ # everything out.
31
+ command "sh #{install_dir}/embedded/lib/rustlib/uninstall.sh", env: env
32
+ end
@@ -0,0 +1,97 @@
1
+ #
2
+ # Copyright 2016-2019 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
+ # expeditor/ignore: deprecated 2022-02
17
+
18
+ name "rust"
19
+ default_version "1.37.0"
20
+
21
+ license "Apache-2.0"
22
+ license_file "LICENSE-APACHE"
23
+
24
+ # Nightly releases use a slighty different URL and TARBALL naming convention
25
+ if version =~ /\d{4}-\d{2}-\d{2}/
26
+ relative_path_template = "rust-nightly-%{arch}-%{host_triple}"
27
+ url_template = "https://static.rust-lang.org/dist/#{version}/rust-nightly-%{arch}-%{host_triple}.tar.gz"
28
+ else
29
+ relative_path_template = "rust-#{version}-%{arch}-%{host_triple}"
30
+ url_template = "https://static.rust-lang.org/dist/rust-#{version}-%{arch}-%{host_triple}.tar.gz"
31
+ end
32
+
33
+ # Default architecture is x86_64
34
+ arch = "x86_64"
35
+
36
+ if windows?
37
+ host_triple = "pc-windows-gnu"
38
+
39
+ if windows_arch_i386?
40
+ arch = "i686"
41
+
42
+ version "1.37.0" do
43
+ source sha256: "52ad8448fd612b50ade0dd2a957115a2e386d1f34a81341b787018f26df0c307",
44
+ url: url_template % { host_triple: host_triple, arch: arch }
45
+ end
46
+
47
+ version "1.32.0" do
48
+ source sha256: "226b00e61095fe1b8a7f1f186087731a294235b4da53601b709517ca9dc624f0",
49
+ url: url_template % { host_triple: host_triple, arch: arch }
50
+ end
51
+ else
52
+ version "1.37.0" do
53
+ source sha256: "607ecc8c1f9886956ca694a65fcc096bfe00c7776a5e88bb947786e941752e68",
54
+ url: url_template % { host_triple: host_triple, arch: arch }
55
+ end
56
+
57
+ version "1.32.0" do
58
+ source sha256: "358e1435347c67dbf33aa9cad6fe501a833d6633ed5d5aa1863d5dffa0349be9",
59
+ url: url_template % { host_triple: host_triple, arch: arch }
60
+ end
61
+ end
62
+
63
+ elsif mac_os_x?
64
+ host_triple = "apple-darwin"
65
+
66
+ version "1.37.0" do
67
+ source sha256: "b2310c97ffb964f253c4088c8d29865f876a49da2a45305493af5b5c7a3ca73d",
68
+ url: url_template % { host_triple: host_triple, arch: arch }
69
+ end
70
+
71
+ version "1.32.0" do
72
+ source sha256: "f0dfba507192f9b5c330b5984ba71d57d434475f3d62bd44a39201e36fa76304",
73
+ url: url_template % { host_triple: host_triple, arch: arch }
74
+ end
75
+ else
76
+ host_triple = "unknown-linux-gnu"
77
+
78
+ version "1.37.0" do
79
+ source sha256: "cb573229bfd32928177c3835fdeb62d52da64806b844bc1095c6225b0665a1cb",
80
+ url: url_template % { host_triple: host_triple, arch: arch }
81
+ end
82
+
83
+ version "1.32.0" do
84
+ source sha256: "e024698320d76b74daf0e6e71be3681a1e7923122e3ebd03673fcac3ecc23810",
85
+ url: url_template % { host_triple: host_triple, arch: arch }
86
+ end
87
+ end
88
+
89
+ relative_path relative_path_template % { host_triple: host_triple, arch: arch }
90
+
91
+ build do
92
+ env = with_standard_compiler_flags(with_embedded_path)
93
+
94
+ command "sh install.sh" \
95
+ " --prefix=#{install_dir}/embedded" \
96
+ " --verbose", env: env
97
+ end
@@ -0,0 +1,36 @@
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
+ # expeditor/ignore: deprecated 2021-04
17
+
18
+ name "sequel-gem"
19
+ default_version "4.47.0"
20
+
21
+ license "MIT"
22
+ license_file "https://raw.githubusercontent.com/jeremyevans/sequel/master/MIT-LICENSE"
23
+ # sequel gem does not have any dependencies. We only install it from
24
+ # rubygems here.
25
+ skip_transitive_dependency_licensing true
26
+
27
+ dependency "ruby"
28
+
29
+ build do
30
+ env = with_standard_compiler_flags(with_embedded_path)
31
+
32
+ gem "install sequel" \
33
+ " --version '#{version}'" \
34
+ " --bindir '#{install_dir}/embedded/bin'" \
35
+ " --no-document", env: env
36
+ end