Skip to content

Commit 88d0c6b

Browse files
authored
Merge pull request ocaml#22494 from jonahbeckford/release-dkml-component-offline-opam-v2.2.0-alpha-20221104
[new release] dkml-component-staging-opam64, dkml-component-staging-opam32 and dkml-component-offline-opam (2.2.0~alpha0~20221104)
2 parents 1f561ab + c3223c3 commit 88d0c6b

File tree

3 files changed

+767
-0
lines changed
  • packages
    • dkml-component-offline-opam/dkml-component-offline-opam.2.2.0~alpha0~20221104
    • dkml-component-staging-opam32/dkml-component-staging-opam32.2.2.0~alpha0~20221104
    • dkml-component-staging-opam64/dkml-component-staging-opam64.2.2.0~alpha0~20221104

3 files changed

+767
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
opam-version: "2.0"
2+
synopsis: "Offline install of Opam"
3+
description: """
4+
Offline install that places opam in the installation directory.
5+
6+
Depending on the end-user's integer size, as reported by Sys.int_size, either 32-bit or 64-bit opam will be installed.
7+
8+
On macOS the end-user target ABI can be either darwin_arm64 or darwin_x86_64 when you have both dkml-base-compiler and
9+
conf-dkml-cross-toolchain installed in your switch, regardless whether your host's ABI is darwin_arm64 or darwin_x86.64.
10+
Otherwise on macOS the target ABI must match the host ABI.
11+
12+
The package version, and what [opam --version] returns, are closely associated with the Opam version from the Opam
13+
source code. The only modifications are to ensure that the package version can be ordered using semver. In particular:
14+
15+
* 2.2.0~alpha~dev -> 2.2.0~alpha0~20221231
16+
* 2.2.0~alpha~1 -> 2.2.0~alpha1~20230601
17+
* 2.2.0 -> 2.2.0
18+
19+
The dates (YYYYMMDD) are the Git commit dates in the Opam source code, and simply replacing the tildes (~) with dashes (-) is
20+
sufficient to be a semver version.
21+
"""
22+
maintainer: ["[email protected]"]
23+
authors: ["Diskuv, Inc. <[email protected]>"]
24+
license: "Apache-2.0"
25+
homepage: "https://github.com/diskuv/dkml-component-opam"
26+
bug-reports: "https://github.com/diskuv/dkml-component-opam/issues"
27+
depends: [
28+
"dune" {>= "2.9"}
29+
"dkml-component-staging-opam32" {= version}
30+
"dkml-component-staging-opam64" {= version}
31+
"dkml-component-staging-ocamlrun" {>= "4.12.1~"}
32+
"dkml-install" {>= "0.2.0"}
33+
"diskuvbox" {>= "0.1.0"}
34+
"odoc" {with-doc}
35+
]
36+
build: [
37+
["dune" "subst"] {dev}
38+
[
39+
"dune"
40+
"build"
41+
"-p"
42+
name
43+
"-j"
44+
jobs
45+
"--promote-install-files=false"
46+
"@install"
47+
"@runtest" {with-test}
48+
"@doc" {with-doc}
49+
]
50+
["dune" "install" "-p" name "--create-install-files" name]
51+
]
52+
dev-repo: "git+https://github.com/diskuv/dkml-component-opam.git"
53+
install: [
54+
[
55+
"diskuvbox"
56+
"copy-dir"
57+
"assets/staging-files/win32"
58+
"%{_:share}%/staging-files/windows_x86"
59+
]
60+
[
61+
"diskuvbox"
62+
"copy-dir"
63+
"assets/staging-files/win32"
64+
"%{_:share}%/staging-files/windows_x86_64"
65+
]
66+
]
67+
url {
68+
src:
69+
"https://github.com/diskuv/dkml-component-opam/releases/download/v2.2.0-alpha-20221104/dkml-component-offline-opam-2.2.0.alpha0.20221104.tbz"
70+
checksum: [
71+
"sha256=0c87a32663eaa7c6b603817b2fa57d209e795ea3573b35042d78a0cab1260667"
72+
"sha512=596088a892e84c1b6473502606a4840b22f87aa9ee6f7db0617aeef7c19f87bb3df0c5a27b3083b9f15805173b04ff11f5cfb0724db9674973916ab31d8509c6"
73+
]
74+
}
75+
x-commit-hash: "abaac32bebe809c4a450dcc4802da1b125d0566d"
Lines changed: 322 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,322 @@
1+
opam-version: "2.0"
2+
synopsis: "DKML component for 32-bit versions of opam"
3+
description: """
4+
For 32-bit capable platforms, opam, opam-putenv and opam-installer will be in <share>/staging-files/<platform>.
5+
But for any platform that does not support 32-bit, this package will install nothing (aka. be a no-op).
6+
Consumers of the component should place both tools/opam64 and tools/opam32 into the PATH, so that whichever is available can be used.
7+
8+
The package version, and what [opam --version] returns, are closely associated with the Opam version from the Opam
9+
source code. The only modifications are to ensure that the package version can be ordered using semver. In particular:
10+
11+
* 2.2.0~alpha~dev -> 2.2.0~alpha0~20221231
12+
* 2.2.0~alpha~1 -> 2.2.0~alpha1~20230601
13+
* 2.2.0 -> 2.2.0
14+
15+
The dates (YYYYMMDD) are the Git commit dates in the Opam source code, and simply replacing the tildes (~) with dashes (-) is
16+
sufficient to be a semver version.
17+
"""
18+
maintainer: ["[email protected]"]
19+
authors: ["Diskuv, Inc. <[email protected]>"]
20+
license: "Apache-2.0"
21+
homepage: "https://github.com/diskuv/dkml-component-opam"
22+
bug-reports: "https://github.com/diskuv/dkml-component-opam/issues"
23+
depends: [
24+
"dune" {>= "2.9"}
25+
"dkml-install" {>= "0.2.0"}
26+
"cmdliner" {>= "1.0.4"}
27+
"diskuvbox" {>= "0.1.0"}
28+
"odoc" {with-doc}
29+
]
30+
depopts: [
31+
"ocaml-system"
32+
"dkml-base-compiler"
33+
"ocaml-base-compiler"
34+
"ocaml-variants"
35+
"ocaml-option-32bit"
36+
]
37+
dev-repo: "git+https://github.com/diskuv/dkml-component-opam.git"
38+
build: [
39+
# Homebrew's bundle tap, needed for reproducible build auditing in drc's crossplatform-functions.sh.
40+
["sh" "src/opamtime/brewbundle.sh"] {os = "macos"}
41+
42+
# Opam source code
43+
["install" "-d" "dl/opam"]
44+
["tar" "xCfz" "dl/opam" "dl/opam.tar.gz" "--strip-components=1"]
45+
46+
# Create a DKMLDIR. Its structure mimics a git submodule setup.
47+
48+
# <dkmldir>/vendor/drc/
49+
["install" "-d" "dkmldir/vendor/drc"]
50+
["tar" "xCfz" "dkmldir/vendor/drc" "dl/dkml-runtime-common.tar.gz" "--strip-components=1"]
51+
# <dkmldir>/.dkmlroot
52+
["install" "dkmldir/vendor/drc/.template.dkmlroot" "dkmldir/.dkmlroot"]
53+
54+
# <dkmldir>/vendor/drd/ (dkml-runtime-distribution)
55+
["diskuvbox" "copy-dir" "src/repro" "dkmldir/vendor/drd/src/unix/private"]
56+
57+
# <dkmldir>/vendor/dkml-compiler/
58+
["install" "-d" "dkmldir/vendor/dkml-compiler/src"]
59+
["tar" "xCfz" "dkmldir/vendor/dkml-compiler" "dl/dkml-compiler.tar.gz" "--strip-components=1"]
60+
61+
# Run r-c-opam-1-setup
62+
[
63+
"env" "TOPDIR=dkmldir/vendor/drc/all/emptytop"
64+
"DKML_REPRODUCIBLE_SYSTEM_BREWFILE=%{_:build}%/Brewfile"
65+
"dkmldir/vendor/drd/src/unix/private/r-c-opam-1-setup.sh"
66+
"-d" "dkmldir"
67+
"-t" "_w"
68+
"-v" "dl/opam"
69+
"-p" "%{_:version}%"
70+
# Instead of letting Opam bootstrap its own OCaml compiler, we can just
71+
# tell it to use the OCaml home (ie. compiler in %{prefix}%/bin/ocamlc).
72+
# We don't have a "home" if ocaml-system is installed, but we do for
73+
# the base compilers. This will save time, reduce build errors and
74+
# dkml-base-compiler gives access to a cross compiler.
75+
"-c" { ocaml-base-compiler:installed | dkml-base-compiler:installed | ocaml-variants:installed }
76+
"%{prefix}%" { ocaml-base-compiler:installed | dkml-base-compiler:installed | ocaml-variants:installed }
77+
"-f" { ocaml-system:installed }
78+
"%{ocaml-system:path}%" { ocaml-system:installed }
79+
# Target ABIs
80+
"-awindows_x86" { os = "win32" & (ocaml-option-32bit:installed | arch = "x86_32") }
81+
"-alinux_x86" { os = "linux" & arch = "x86_32" }
82+
] { (os = "linux" & arch = "x86_32") |
83+
(os = "win32" & (ocaml-option-32bit:installed | arch = "x86_32") ) }
84+
85+
# Run r-c-opam-2-build-noargs.sh
86+
[
87+
"sh" "-eufc"
88+
"cd _w && share/dkml/repro/110co/vendor/drd/src/unix/private/r-c-opam-2-build-noargs.sh"
89+
] { (os = "linux" & arch = "x86_32") |
90+
(os = "win32" & (ocaml-option-32bit:installed | arch = "x86_32") ) }
91+
92+
# --------------
93+
# Build install library
94+
# --------------
95+
96+
["dune" "subst"] {dev}
97+
[
98+
"dune"
99+
"build"
100+
"-p"
101+
name
102+
"-j"
103+
jobs
104+
"--promote-install-files=false"
105+
"@install"
106+
"@runtest" {with-test}
107+
"@doc" {with-doc}
108+
]
109+
["dune" "install" "-p" name "--create-install-files" name]
110+
]
111+
install: [
112+
[
113+
"diskuvbox"
114+
"copy-file-into"
115+
"_w/bin/opam"
116+
"_w/bin/opam-installer"
117+
"%{_:share}%/staging-files/linux_x86/bin"
118+
] { (os = "linux" & arch = "x86_32") }
119+
[
120+
"diskuvbox"
121+
"copy-file-into"
122+
"_w/bin/opam.exe"
123+
"_w/bin/opam-installer.exe"
124+
"%{_:share}%/staging-files/windows_x86/bin"
125+
] { (os = "win32" & (ocaml-option-32bit:installed | arch = "x86_32") ) }
126+
127+
[
128+
"diskuvbox"
129+
"copy-file-into"
130+
"_w/bin/opam-putenv.exe"
131+
"%{_:share}%/staging-files/windows_x86/bin"
132+
] { (os = "win32" & (ocaml-option-32bit:installed | arch = "x86_32") ) }
133+
134+
[
135+
"diskuvbox"
136+
"copy-dir"
137+
"_w/share/man"
138+
"%{_:share}%/staging-files/generic/man"
139+
] { (os = "linux" & arch = "x86_32") |
140+
(os = "win32" & (ocaml-option-32bit:installed | arch = "x86_32") ) }
141+
]
142+
extra-source "dl/dkml-compiler.tar.gz" {
143+
src: "https://github.com/diskuv/dkml-compiler/releases/download/4.12.1-v1.0.2-prerel0/src.tar.gz"
144+
checksum: [
145+
"sha256=f2f30f7cf668be60e3c3db86cb50f790195da88b330bc764e16bc5b877038f98"
146+
]
147+
}
148+
extra-source "dl/opam.tar.gz" {
149+
# https://github.com/ocaml/opam/tree/351dd7f5561e78d5f4b103c39a208d1840d98229 Nov 4, 2022
150+
src: "https://github.com/ocaml/opam/archive/351dd7f5561e78d5f4b103c39a208d1840d98229.tar.gz"
151+
checksum: [
152+
"sha256=3641564016a0e87ed62553575df3a68c26cfccfd3d2bb9ea3af2c4f4c29fd443"
153+
]
154+
}
155+
extra-source "dl/homebrew-bundle.tar.gz" {
156+
src: "https://github.com/Homebrew/homebrew-bundle/archive/4756e4c4cf95485c5ea4da27375946c1dac2c71d.tar.gz"
157+
checksum: [
158+
"sha256=10c024ca7871cea36b4c27b2601971d3fa6cba6f37855613baf0026d0f555e76"
159+
]
160+
}
161+
162+
# -------------------
163+
# BEGIN OPAM ARCHIVES
164+
#
165+
# Since we don't have network access in sandboxes, we can't let `make -C src_ext cache-archives`
166+
# actual download. Use extra-source instead.
167+
#
168+
# This section can be autogenerated within dl/opam using:
169+
# join <(awk '$1~/^URL_[a-z]/{sub(/URL_/,"",$1); print $1,"URL",$NF}' src_ext/Makefile src_ext/Makefile.sources) <(awk '$1~/^MD5_[a-z]/{sub(/MD5_/,"",$1); print $1,"MD5",$NF}' src_ext/Makefile src_ext/Makefile.sources) | awk -v dq='"' '$2=="URL" && $4=="MD5"{name=$3; sub(".*/", "",name); printf "extra-source %sdl/opam/src_ext/archives/%s%s {\n src: %s%s%s\n checksum: [\n %smd5=%s%s\n ]\n}\n", dq,name,dq, dq,$3,dq, dq,$5,dq }'
170+
171+
extra-source "dl/opam/src_ext/archives/ocaml-4.14.0.tar.gz" {
172+
src: "https://caml.inria.fr/pub/distrib/ocaml-4.14/ocaml-4.14.0.tar.gz"
173+
checksum: [
174+
"md5=57a4fa799114b3addbf31e42c4f4a7b3"
175+
]
176+
}
177+
extra-source "dl/opam/src_ext/archives/0.40.tar.gz" {
178+
src: "https://github.com/alainfrisch/flexdll/archive/0.40.tar.gz"
179+
checksum: [
180+
"md5=e68f7311179fa7e09408825b362c5c5a"
181+
]
182+
}
183+
extra-source "dl/opam/src_ext/archives/v1.6.8.tar.gz" {
184+
src: "https://github.com/ocaml-community/cppo/archive/v1.6.8.tar.gz"
185+
checksum: [
186+
"md5=fed401197d86f9089e89f6cbdf1d660d"
187+
]
188+
}
189+
extra-source "dl/opam/src_ext/archives/extlib-1.7.8.tar.gz" {
190+
src: "https://ygrek.org/p/release/ocaml-extlib/extlib-1.7.8.tar.gz"
191+
checksum: [
192+
"md5=7e0df072af4e2daa094e5936a661cb11"
193+
]
194+
}
195+
extra-source "dl/opam/src_ext/archives/base64-v3.5.0.tbz" {
196+
src: "https://github.com/mirage/ocaml-base64/releases/download/v3.5.0/base64-v3.5.0.tbz"
197+
checksum: [
198+
"md5=0179af18d6c1cf13d77671ee23901433"
199+
]
200+
}
201+
extra-source "dl/opam/src_ext/archives/re-1.10.3.tbz" {
202+
src: "https://github.com/ocaml/ocaml-re/releases/download/1.10.3/re-1.10.3.tbz"
203+
checksum: [
204+
"md5=a36347dcfaf71c95916f96f72b0cf2ce"
205+
]
206+
}
207+
extra-source "dl/opam/src_ext/archives/cmdliner-1.1.1.tbz" {
208+
src: "http://erratique.ch/software/cmdliner/releases/cmdliner-1.1.1.tbz"
209+
checksum: [
210+
"md5=26b9af55a7456290b710e1c96a0ca231"
211+
]
212+
}
213+
extra-source "dl/opam/src_ext/archives/ocamlgraph-2.0.0.tbz" {
214+
src: "https://github.com/backtracking/ocamlgraph/releases/download/2.0.0/ocamlgraph-2.0.0.tbz"
215+
checksum: [
216+
"md5=2d07fcf3501e1d4997c03fa94cea22f0"
217+
]
218+
}
219+
extra-source "dl/opam/src_ext/archives/cudf-v0.10.tar.gz" {
220+
# src: "https://gitlab.com/irill/cudf/-/archive/v0.10/cudf-v0.10.tar.gz"
221+
# checksum: [
222+
# "md5=ed8fea314d0c6dc0d8811ccf860c53dd"
223+
# ]
224+
src: "https://github.com/diskuv/dkml-component-opam/releases/download/v0.0.0-dependencies/cudf-v0.10.tar.gz"
225+
checksum: [
226+
"sha256=7b9d7390fca822afd8b35197814616088edfb3fa3cb44903dfa49399e9fefb50"
227+
]
228+
}
229+
extra-source "dl/opam/src_ext/archives/dose3-7.0.0.tar.gz" {
230+
# src: "https://gitlab.com/irill/dose3/-/archive/7.0.0/dose3-7.0.0.tar.gz"
231+
# checksum: [
232+
# "md5=bc99cbcea8fca29dca3ebbee54be45e1"
233+
# ]
234+
src: "https://github.com/diskuv/dkml-component-opam/releases/download/v0.0.0-dependencies/dose3-7.0.0.tar.gz"
235+
checksum: [
236+
"sha256=02db6104db2683483f8309c76e77705b2606803fc5b58ea0a402f9da30a56029"
237+
]
238+
}
239+
extra-source "dl/opam/src_ext/archives/1.1+13.tar.gz" {
240+
src: "https://github.com/AltGr/ocaml-mccs/archive/1.1+13.tar.gz"
241+
checksum: [
242+
"md5=13504d3b5dcbf0bdc6d95a62de20af4a"
243+
]
244+
}
245+
extra-source "dl/opam/src_ext/archives/opam-0install-cudf-v0.4.2.tbz" {
246+
src: "https://github.com/ocaml-opam/opam-0install-solver/releases/download/v0.4.2/opam-0install-cudf-v0.4.2.tbz"
247+
checksum: [
248+
"md5=8e1494e8b97fc6f9a463966c394e9bdd"
249+
]
250+
}
251+
extra-source "dl/opam/src_ext/archives/0install-v2.17.tbz" {
252+
src: "https://github.com/0install/0install/releases/download/v2.17/0install-v2.17.tbz"
253+
checksum: [
254+
"md5=50daf035b04b29399a3c6e6f965ac447"
255+
]
256+
}
257+
extra-source "dl/opam/src_ext/archives/2.1.4.tar.gz" {
258+
src: "https://github.com/ocaml/opam-file-format/archive/2.1.4.tar.gz"
259+
checksum: [
260+
"md5=cd9dac41c2153d07067c5f30cdcf77db"
261+
]
262+
}
263+
extra-source "dl/opam/src_ext/archives/result-1.5.tbz" {
264+
src: "https://github.com/janestreet/result/releases/download/1.5/result-1.5.tbz"
265+
checksum: [
266+
"md5=1b82dec78849680b49ae9a8a365b831b"
267+
]
268+
}
269+
extra-source "dl/opam/src_ext/archives/0.2.2.tar.gz" {
270+
src: "https://github.com/c-cube/seq/archive/0.2.2.tar.gz"
271+
checksum: [
272+
"md5=9033e02283aa3bde9f97f24e632902e3"
273+
]
274+
}
275+
extra-source "dl/opam/src_ext/archives/stdlib-shims-0.3.0.tbz" {
276+
src: "https://github.com/ocaml/stdlib-shims/releases/download/0.3.0/stdlib-shims-0.3.0.tbz"
277+
checksum: [
278+
"md5=09db7af8b4a3a96048a61cb6ae2496ef"
279+
]
280+
}
281+
extra-source "dl/opam/src_ext/archives/spdx_licenses-v1.1.0.tbz" {
282+
src: "https://github.com/kit-ty-kate/spdx_licenses/releases/download/v1.1.0/spdx_licenses-v1.1.0.tbz"
283+
checksum: [
284+
"md5=af8493759aa35b629a324caa3f5ced65"
285+
]
286+
}
287+
extra-source "dl/opam/src_ext/archives/uutf-1.0.3.tbz" {
288+
src: "https://erratique.ch/software/uutf/releases/uutf-1.0.3.tbz"
289+
checksum: [
290+
"md5=a308285514259d20b48abc92f00a3708"
291+
]
292+
}
293+
extra-source "dl/opam/src_ext/archives/jsonm-1.0.1.tbz" {
294+
src: "http://erratique.ch/software/jsonm/releases/jsonm-1.0.1.tbz"
295+
checksum: [
296+
"md5=e2ca39eaefd55b8d155c4f1ec5885311"
297+
]
298+
}
299+
extra-source "dl/opam/src_ext/archives/sha-1.15.2.tbz" {
300+
src: "https://github.com/djs55/ocaml-sha/releases/download/1.15.2/sha-1.15.2.tbz"
301+
checksum: [
302+
"md5=b78eea17a52b705b5a068fc7f5b6c6ae"
303+
]
304+
}
305+
306+
# END OPAM ARCHIVES
307+
# -------------------
308+
extra-source "dl/dkml-runtime-common.tar.gz" {
309+
src: "https://github.com/diskuv/dkml-runtime-common/archive/refs/tags/v1.0.1.tar.gz"
310+
checksum: [
311+
"sha256=35a88827e3e02665a6ed5abf1c1aa457fbb3c2a78ff61c4211d24bec8d8b757d"
312+
]
313+
}
314+
url {
315+
src:
316+
"https://github.com/diskuv/dkml-component-opam/releases/download/v2.2.0-alpha-20221104/dkml-component-offline-opam-2.2.0.alpha0.20221104.tbz"
317+
checksum: [
318+
"sha256=0c87a32663eaa7c6b603817b2fa57d209e795ea3573b35042d78a0cab1260667"
319+
"sha512=596088a892e84c1b6473502606a4840b22f87aa9ee6f7db0617aeef7c19f87bb3df0c5a27b3083b9f15805173b04ff11f5cfb0724db9674973916ab31d8509c6"
320+
]
321+
}
322+
x-commit-hash: "abaac32bebe809c4a450dcc4802da1b125d0566d"

0 commit comments

Comments
 (0)