3
3
set -euo pipefail
4
4
5
5
# This will be set to 1 if we instruct the user to manually verify signatures,
6
- # when they have GPG but don't have the BinTray public key. Would be super confusing
7
- # to tell the user to use files that we've cleaned up.
6
+ # when they have GPG but don't have the public key of the signer . Would be super
7
+ # confusing to tell the user to use files that we've cleaned up.
8
8
DO_CLEANUP=0
9
9
10
10
# shellcheck disable=SC2015
@@ -15,6 +15,8 @@ color_bad=$(tput setaf 1 || true)
15
15
color_warn=$( tput setaf 3 || true)
16
16
color_reset=$( tput sgr0 || true)
17
17
18
+ repo=https://repo.maven.apache.org/maven2
19
+
18
20
usage () {
19
21
cat << EOF
20
22
${color_title} $0 ${color_reset}
@@ -25,16 +27,16 @@ Downloads the "VERSION" version of GROUP:ARTIFACT with classifier "CLASSIFIER"
25
27
to path "TARGET" on the local file system. "VERSION" can take the special value
26
28
"LATEST", in which case the latest Zipkin release will be used. For example:
27
29
28
- ${color_title} $0 io.zipkin.java :zipkin-autoconfigure-collector-scribe :LATEST:module scribe .jar${color_reset}
30
+ ${color_title} $0 io.zipkin.aws :zipkin-autoconfigure-collector-kinesis :LATEST:module kinesis .jar${color_reset}
29
31
downloads the latest version of the artifact with group "io.zipkin.aws",
30
- artifact id "zipkin-autoconfigure-collector-scribe ", and classifier "module"
31
- to PWD/scribe .jar
32
+ artifact id "zipkin-autoconfigure-collector-kinesis ", and classifier "module"
33
+ to PWD/kinesis .jar
32
34
EOF
33
35
}
34
36
35
37
welcome () {
36
38
cat << EOF
37
- ${color_title} Thank you for trying OpenZipkin !${color_reset}
39
+ ${color_title} Thank you for trying Zipkin !${color_reset}
38
40
This installer is provided as a quick-start helper, so you can try Zipkin out
39
41
without a lengthy installation process.
40
42
@@ -64,7 +66,7 @@ cleanup() {
64
66
local base_filename=" $1 " ; shift
65
67
if [[ " $DO_CLEANUP " -eq 0 ]]; then
66
68
printf ' \n%s\n' " ${color_title} Cleaning up checksum and signature files${color_reset} "
67
- execute_and_log rm -f " $base_filename " {.md5,.asc,.md5.asc }
69
+ execute_and_log rm -f " $base_filename " {.md5,.asc}
68
70
DO_CLEANUP=1
69
71
fi
70
72
}
@@ -79,15 +81,15 @@ handle_shutdown() {
79
81
${color_bad}
80
82
It looks like quick-start setup has failed. Please run the command again
81
83
with the debug flag like below, and open an issue on
82
- https://github.com/openzipkin/ zipkin/issues/new. Make sure to include the
83
- full output of the run.
84
+ https://github.com/apache/incubator- zipkin-website /issues/new. Make sure
85
+ to include the full output of the run.
84
86
${color_reset}
85
- \\ curl -sSL http ://zipkin.io /quickstart.sh | bash -sx -- $@
87
+ \\ curl -sSL https ://zipkin.apache.org /quickstart.sh | bash -sx -- $@
86
88
87
89
In the meanwhile, you can manually download and run the latest executable jar
88
90
from the following URL:
89
91
90
- https://dl.bintray.com/openzipkin/maven/io/ zipkin/java/ zipkin-server/
92
+ https://search.maven.org/remote_content?g=org.apache. zipkin&a= zipkin-server&v=LATEST&c=exec
91
93
EOF
92
94
fi
93
95
}
@@ -107,48 +109,8 @@ fetch() {
107
109
fetch_latest_version () {
108
110
local artifact_group=" $1 " ; shift
109
111
local artifact_id=" $1 " ; shift
110
- local url=" https://api.bintray.com/search/packages/maven?g=${artifact_group} &a=${artifact_id} &subject=openzipkin"
111
- local package_data
112
- local package_count
113
- local have_jq
114
-
115
- # We'll have more robustness if jq is present, but will do our best without it as well
116
- if command -v jq > /dev/null 2>&1 ; then
117
- have_jq=0
118
- else
119
- have_jq=1
120
- printf >&2 ' %s\n' \
121
- " ${color_warn} jq not found on path. This script will still do its best, but installing jq" \
122
- " will allow it to parse data from Bintray in a more robust fashion.${color_reset} "
123
- fi
124
-
125
- # Call the Bintray API to search for releases
126
- package_data=" $( execute_and_log curl -SL " '$url '" ) "
127
-
128
- # Count how many packages we got from the search
129
- if [[ $have_jq -eq 0 ]]; then
130
- package_count=" $( jq length <<< " $package_data" ) "
131
- else
132
- package_count=" $( grep -c latest_version <<< " ${package_data//,/$'\n'}" ) "
133
- fi
134
- # We want exactly one result.
135
- if [[ " $package_count " -eq 0 ]]; then
136
- printf >&2 ' %s%s%s\n' \
137
- " ${color_bad} " \
138
- ' No package information found; the provided group or artifact ID may be invalid.' \
139
- " ${color_reset} "
140
- exit 1
141
- elif [[ " $package_count " -gt 1 ]]; then
142
- printf >&2 ' %s\n' " ${color_bad} More than one package returned from search by Maven group and artifact ID.${color_reset} "
143
- exit 1
144
- fi
145
-
146
- # Finally, extract the actual package version
147
- if [[ $have_jq -eq 0 ]]; then
148
- jq ' .[0].latest_version' -r <<< " $package_data"
149
- else
150
- grep latest_version <<< " ${package_data//,/$'\n'}" | sed ' s/^.*"latest_version" *: *"*\([^"]*\)".*$/\1/'
151
- fi
112
+ local url=" ${repo} /${artifact_group_with_slashes} /${artifact_id} /maven-metadata.xml"
113
+ printf $( curl -sSL $url | sed -n ' /<version>/s/.*<version>\([^<]*\)<\/version>.*/\1/p' | tail -1)
152
114
}
153
115
154
116
artifact_part () {
@@ -198,22 +160,21 @@ verify_signature() {
198
160
199
161
printf ' \n%s\n' " ${color_title} Verifying GPG signature of $filename ...${color_reset} "
200
162
201
- local bintray_gpg_key =' D401AB61'
163
+ local gpg_key =' D401AB61'
202
164
203
165
if command -v gpg > /dev/null 2>&1 ; then
204
166
fetch " $url .asc" " $filename .asc"
205
- if gpg --list-keys " $bintray_gpg_key " > /dev/null 2>&1 ; then
167
+ if gpg --list-keys " $gpg_key " > /dev/null 2>&1 ; then
206
168
execute_and_log gpg --verify " $filename .asc" " $filename "
207
169
printf ' %s\n' " ${color_good} GPG signature for ${filename} passes verification${color_reset} "
208
170
else
209
171
cat << EOF
210
172
${color_warn}
211
- JFrog BinTray GPG signing key is not known, skipping signature verification.
212
- You can import it, then verify the signature of $filename , using the following
213
- commands:
173
+ GPG signing key is not known, skipping signature verification.
174
+ Use the following commands to manually verify the signature of $filename :
214
175
215
- gpg --keyserver keyserver.ubuntu.com --recv $bintray_gpg_key
216
- # Optionally trust the key via 'gpg --edit-key $bintray_gpg_key ', then typing 'trust',
176
+ gpg --keyserver keyserver.ubuntu.com --recv $gpg_key
177
+ # Optionally trust the key via 'gpg --edit-key $gpg_key ', then typing 'trust',
217
178
# choosing a trust level, and exiting the interactive GPG session by 'quit'
218
179
gpg --verify $filename .asc $filename
219
180
${color_reset}
226
187
}
227
188
228
189
main () {
229
- local artifact_group=io.zipkin.java
190
+ local artifact_group=org.apache.zipkin
230
191
local artifact_id=zipkin-server
231
192
local artifact_version=LATEST
232
193
local artifact_version_lowercase=latest
@@ -263,6 +224,7 @@ main() {
263
224
264
225
welcome
265
226
227
+ artifact_group_with_slashes=" ${artifact_group// .// } "
266
228
artifact_version_lowercase=" $( tr ' [:upper:]' ' [:lower:]' <<< " $artifact_version" ) "
267
229
if [ " ${artifact_version_lowercase} " = ' latest' ]; then
268
230
printf ' %s\n' " ${color_title} Fetching version number of latest ${artifact_group} :${artifact_id} release...${color_reset} "
@@ -272,12 +234,12 @@ main() {
272
234
printf ' %s\n\n' " ${color_good} Latest release of ${artifact_group} :${artifact_id} seems to be ${artifact_version}${color_reset} "
273
235
274
236
printf ' %s\n' " ${color_title} Downloading $artifact_group :$artifact_id :$artifact_version :$artifact_classifier to $filename ...${color_reset} "
275
- artifact_group_with_slashes=" ${artifact_group// .// } "
276
- artifact_url=" https://dl.bintray.com/openzipkin/maven/${artifact_group_with_slashes} /${artifact_id} /$artifact_version /${artifact_id} -${artifact_version}${artifact_classifier_suffix} .jar"
237
+ artifact_url=" ${repo} /${artifact_group_with_slashes} /${artifact_id} /$artifact_version /${artifact_id} -${artifact_version}${artifact_classifier_suffix} .jar"
277
238
fetch " $artifact_url " " $filename "
278
239
verify_checksum " $artifact_url " " $filename "
279
- verify_signature " $artifact_url " " $filename "
280
- verify_signature " $artifact_url .md5" " $filename .md5"
240
+ # Disabled as it is assuming the GPG key is from Bintray, which it won't be. This is better than
241
+ # scaring people. In the future, we can do fancy things to determine which of the ASF keys it is.
242
+ # verify_signature "$artifact_url" "$filename"
281
243
282
244
cleanup " $filename "
283
245
farewell " $artifact_classifier " " $filename "
0 commit comments