-
-
Notifications
You must be signed in to change notification settings - Fork 251
/
makejdk-any-platform.1
executable file
·232 lines (218 loc) · 9.36 KB
/
makejdk-any-platform.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
.\" Manpage for makejdk-any-platform.sh
.TH "2.0.0" "Apache 2"
.SH NAME
makejdk-any-platform.sh
.SH SYNOPSIS
"./makejdk-any-platform.sh [options] version"
.SH DESCRIPTION
This script is the entry point for building (Adoptium) OpenJDK binaries. Building
natively or in a docker container are both supported. This script (and its
supporting scripts) have defaults, but you can override these as needed.
makejdk-any-platform.sh and it's supporting scripts will auto detect the
platform and architecture it is running on and configures the OpenJDK build
accordingly. The supporting scripts will also download and locally install any
required dependencies for the OpenJDK build, e.g. The ALSA sound and Freetype
font libraries.
Many of the configuration options are passed through to the \fBconfigure\fR and
\fBmake\fR commands that OpenJDK uses to build binaries. Please see the
appropriate \fIREADME-builds.html\fR file for the OpenJDK source repository
that you are building for further details.
\fBExample:\fR The simplest use case to run is:
"./makejdk-any-platform.sh -D fedora:latest jdk8u"
This will start a Docker container and build you the latest Java 8 Temurin
binary from the source at https://github.com/adoptium/openjdk-jdk8u
Note that the main argument, in this case jdk8, is compared and enforced
against an enumeration - jdk8, jdk8u, ... jdk21, jdk21u, ...jdk. Nothing else.
You can workaround this by \-\-version switch.
"./makejdk-any-platform.sh -l my/dir/or/archive.tar.gz jdk22u"
This will start a build of Java 22 from your local sources
Please visit https://www.adoptium.net for further support
.SH VERSIONS
.TP
.BR jdk8u
Build Java 8, defaults to https://github.com/adoptium/jdk8u
.TP
.BR jdk11u
Build Java 11, defaults to https://github.com/adoptium/jdk11u
.TP
.BR jdk16u
Build Java 16, defaults to https://github.com/adoptium/jdk16u
.TP
.BR jdk
Build JDK (tip), defaults to https://github.com/adoptium/jdk
.SH OPTIONS
.TP
.BR \-A ", " \-\-skip-alsa
Skip downloading of alsa automatically.
If you do so, the underlying configure will detect system lib and headers.
If you wish to point to some custom build/install pass it via \fI\-C, \-\-configure-args <args>\fR
Presence of \-\-with-alsa in \-\-configure-args will also not include freshly installed alsa to build.
.TP
.BR \-b ", " \-\-branch " " \fI<branch>\fR
specify a custom branch to build from, e.g. dev.
For reference, Adoptium GitHub source repos default to the \fI<dev>\fR
branch which may contain a very small diff set to the \fI<master>\fR branch
(which is a clone from the OpenJDK mercurial forest).
.TP
.BR \-B ", " \-\-build-number " " \fI<build_number>\fR
specify the OpenJDK build number to build from, e.g. b12.
For reference, OpenJDK version numbers look like 1.8.0_162-b12 (for Java 8) or
9.0.4+11 (for Java 9+) with the build number being the suffix at the end.
.TP
.BR \-\-build-variant " " \fI<variant_name>\fR
specify a OpenJDK build variant, e.g. openj9 or temurin.
For reference, the default variant is \fBhotspot\fR and does not need to be specified.
.TP
.BR \-c ", " \-\-clean-docker-build
removes the existing docker container and persistent volume before starting
a new docker based build.
.TP
.BR \-C ", " \-\-configure-args " " \fI<args>\fR
specify any custom user configuration arguments.
.TP
.BR \-\-clean-git-repo
clean out any 'bad' local git repo you already have.
.TP
.BR \-\-create-jre-image
create the legacy JRE image in addition to the JDK image.
.TP
.BR \-\-create-sbom
create the CycloneDX System Bill of Materials (JSON artifact).
.TP
.BR \-\-create-source-archive
create an archive of the sources which got used to build OpenJDK
.TP
.BR \-d ", " \-\-destination " " \fI<path>\fR
specify the location for the built binary, e.g. /path/.
This is typically used in conjunction with \fB<-T>\fR to create a custom path
/ file name for the resulting binary.
.TP
.BR \-D ", " \-\-docker ", " \-\-podman " " \fI[base_to_use]\fR
build OpenJDK in a docker/podman container. -D will autodetect, using podman if found, docker otherwise.
You can optionally set base image to use. Default is ubuntu:18.04. Dnf/apt is determined by hardcoded list.
When podman is used, there is bug requiring \fI--custom-cacerts\fR to be used under some circumstances.
It is known issue: https://github.com/adoptium/temurin-build/issues/3862
.TP
.BR \-\-debug-docker
debug OpenJDK build script in a docker container. Only valid if \fB-D\fR is selected.
.TP
.BR \-\-disable-adopt-branch-safety
disable the default check for correct tags and README.JAVASE in case of \fBtemurin\fR as --build-variant.
This is mandatory, when you are building \fBtemurin\fR variant from archive or directory without repository metadata.
.TP
.BR \-\-disable-shallow-git-clone
disable the default \fB--depth=1\fR shallow cloning of git repo(s).
.TP
.BR \-f ", " \-\-freetype-dir " " \fI<path>\fR
specify the location of an existing FreeType library.
This is typically used in conjunction with \fB<-F>\fR.
.TP
.BR \-\-freetype-build-param " " \fI<parameter>\fR
specify any special freetype build parameters (required for some OS's).
.TP
.BR \-\-freetype-version " " \fI<version>\fR
specify the version of freetype you are building.
.TP
.BR \-F ", " \-\-skip-freetype
skip building Freetype automatically.
This is typically used in conjunction with \fB<-f>\fR.
.TP
.BR \-h ", " \-\-help
print this help.
.TP
.BR \-i ", " \-\-ignore-container
ignore the existing docker container if you have one already.
.TP
.BR \-J ", " \-\-jdk-boot-dir " " \fI<jdk_boot_dir>\fR "; " \-J ", " \-\-jdk-boot-dir " " \fIdownload\fR
specify the JDK boot dir.
For reference, OpenJDK needs the previous version of a JDK in order to build
itself. You should select the path to a JDK install that is N-1 versions below
the one you are trying to build. On some platforms, you can use magic keyword
of `download`, and boot jdk will be downloaded for you in best attempt. It will
be reused as long as you keep workspace or clean libs.
.TP
.BR \-k ", " \-\-keep
if using docker, keep the container after the build.
.TP
.BR \-l ", " \-\-openjdk\-source\-location " " \fI<dir/archive>\fR
If set, must point to directory or archive with valid OpenJDK source code.
This local source code will be used instead of cloning from a git repository and without any git tag or git reset.
You still have to set the version argument though, and it is recommended that you add \-\-tag too so that the top level directory names in the output, as well as the details in "java -version" are created correctly.
.TP
.BR \-\-make-args " " \fI<args>\fR
specify any custom user make arguments.
.TP
.BR \-\-no\-adopt\-patches
This indicates to the build script that the build does not have Temurin's additional patches applied.
.TP
.BR \-p ", " \-\-processors " " \fI<args>\fR
specify the number of processors to use for the docker build.
.TP
.BR \-r ", " \-\-repository " " \fI<repository>\fR
specify the repository to clone OpenJDK source from,
e.g. https://github.com/karianna/openjdk-jdk8u.
.TP
.BR \-s ", " \-\-source " " \fI<path>\fR
specify the location to clone the OpenJDK source (and dependencies) to.
.TP
.BR \-S ", " \-\-ssh
use ssh when cloning git.
In case of docker build add github.com to ~/.ssh/known_hosts (e.g.: ssh github.com)
if your ssh key has a passphrase, add it to ssh-agent (e.g.: ssh-add ~/.ssh/id_rsa)
.TP
.BR \-\-sign \fI<path>\fR
specify the location for the certificate. For windows this is the p12
certificate to sign the DLL.
.TP
.BR \-\-sudo
run the docker container as root.
.TP
.BR \-t ", " \-\-tag " " \fI<tag>\fR
specify the repository tag that you want to build OpenJDK from.
.TP
.BR \-\-tmp-space-build
use a temporary workspace if the main one is unavailable.
.TP
.BR \-T ", " \-\-target-file-name " " \fI<file_name>\fR
specify the final name of the OpenJDK binary.
This is typically used in conjunction with \fB<-D>\fR to create a custom file
name for the resulting binary.
.TP
.BR \-u ", " \-\-update-version " " \fI<update_version>\fR
specify the update version to build OpenJDK from, e.g. 162.
For reference, OpenJDK version numbers look like 1.8.0_162-b12 (for Java 8) or
9.0.4+11 (for Java 9+) with the update number being the number after the '_'
(162) or the 3rd position in the semVer version string (4).
This is typically used in conjunction with \fB<-b>\fR.
.TP
.BR \-\-use-jep319-certs
Use certs defined in JEP319 in Java 8/9. Deprecated, has no effect.
.TP
.BR \-\-custom-cacerts " " \fI<true|false>\fR
If true (default), a custom cacerts file will be generated based on Mozilla's
list of CA certificates (see folder security/). If false, the file shipped by
OpenJDK will be used.
.TP
.BR \-\-vendor " " \fI<vendor>\fR
specify the vendor name
.TP
.BR \-\-vendor-url " " \fI<vendor url>\fR
specify the vendor url
.TP
.BR \-\-vendor-bug-url " " \fI<vendor bug url>\fR
specify the vendor bug url
.TP
.BR \-\-vendor-vm-bug-url " " \fI<vendor vm bug url>\fR
specify the vendor vm bug url
.TP
.BR \-v ", " \-\-version " " \fI<version>\fR
specify the OpenJDK version to build e.g. jdk8u. Left for backwards compatibility.
Useful, when cloning a repo with a non-uniform name, e.g., shenandoah-jdk8u (main version argument),
to tell the build that you are effectively building a jdk8u binary.
.TP
.BR \-V ", " \-\-jvm-variant " " \fI<jvm_variant>\fR
specify the JVM variant (server or client), defaults to server.
.SH EXAMPLE USAGE
Some common example usages:
"./makejdk-any-platform --sudo --docker jdk8u"
"./makejdk-any-platform -s /home/openjdk10/src -d /home/openjdk/target -T MyOpenJDK10.tar.gz jdk10"