Skip to content

Commit a60b07a

Browse files
committed
Merge remote-tracking branch 'release-lead/6.0/stage' into 6.0/release
2 parents 6a4542b + 6f87296 commit a60b07a

7 files changed

Lines changed: 111 additions & 93 deletions

File tree

branch.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
# branching.
1212
#
1313

14-
DEFAULT_GIT_BRANCH="6.0/release"
14+
DEFAULT_GIT_BRANCH="6.0/stage"

lib/common.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,26 @@ function fetch_kernel_from_artifactory() {
11161116
url="$url/linux-pkg/linux-prebuilt/${artifactory_deb}"
11171117

11181118
logmust cd "$WORKDIR/artifacts"
1119-
logmust wget -nv "$url"
1119+
fetch_file_from_artifactory "$url"
1120+
}
1121+
1122+
function fetch_file_from_artifactory() {
1123+
local url="$1"
1124+
local sha256_expected="$2"
1125+
local file sha256_actual
1126+
1127+
[[ -n "$url" ]] || die "url argument is missing."
1128+
file="$(basename "$url")"
1129+
1130+
logmust wget -nv "$url" -O "$file"
1131+
1132+
if [[ -n "$sha256_expected" ]]; then
1133+
sha256_actual="$(sha256sum "$file" | awk '{print $1}')"
1134+
if [[ "$sha256_expected" != "$sha256_actual" ]]; then
1135+
die "SHA256 mismatch. Expected: $sha256_expected," \
1136+
"Actual: $sha256_actual"
1137+
fi
1138+
fi
11201139
}
11211140

11221141
#

package-lists/build/main.pkgs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ grub2
1818
libkdumpfile
1919
make-jpkg
2020
makedumpfile
21+
misc-debs
2122
nfs-utils
2223
performance-diagnostics
2324
ptools
@@ -26,4 +27,3 @@ recovery-environment
2627
savedump
2728
sdb
2829
targetcli-fb
29-
td-agent-prebuilt

packages/adoptopenjdk/config.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
DEFAULT_PACKAGE_GIT_URL=none
2020
PACKAGE_DEPENDENCIES="make-jpkg"
2121

22-
tarfile="OpenJDK8U-jdk_x64_linux_hotspot_8u262b10.tar.gz"
23-
jdk_path="/usr/lib/jvm/adoptopenjdk-java8-jdk-amd64"
22+
_tarfile="OpenJDK8U-jdk_x64_linux_hotspot_8u262b10.tar.gz"
23+
_tarfile_sha256="733755fd649fad6ae91fc083f7e5a5a0b56410fb6ac1815cff29f744b128b1b1"
24+
_jdk_path="/usr/lib/jvm/adoptopenjdk-java8-jdk-amd64"
2425

2526
function prepare() {
2627
logmust install_pkgs "$DEPDIR"/make-jpkg/*.deb
@@ -29,15 +30,15 @@ function prepare() {
2930
function fetch() {
3031
logmust cd "$WORKDIR/"
3132

32-
local url="http://artifactory.delphix.com/artifactory"
33+
local url="http://artifactory.delphix.com/artifactory/java-binaries/linux/jdk/8/$_tarfile"
3334

34-
logmust wget -nv "$url/java-binaries/linux/jdk/8/$tarfile" -O "$tarfile"
35+
logmust fetch_file_from_artifactory "$url" "$_tarfile_sha256"
3536
}
3637

3738
function build() {
3839
logmust cd "$WORKDIR/"
3940

40-
logmust env DEB_BUILD_OPTIONS=nostrip fakeroot make-jpkg "$tarfile" <<<y
41+
logmust env DEB_BUILD_OPTIONS=nostrip fakeroot make-jpkg "$_tarfile" <<<y
4142

4243
logmust mv ./*deb "$WORKDIR/artifacts/"
4344
#
@@ -49,7 +50,7 @@ function build() {
4950
# packages, such as the app-gate, decide to fetch and install Java from
5051
# the Linux-pkg bundle.
5152
#
52-
logmust bash -c "echo $jdk_path >'$WORKDIR/artifacts/JDK_PATH'"
53+
logmust bash -c "echo $_jdk_path >'$WORKDIR/artifacts/JDK_PATH'"
5354

54-
echo "Tar file: $tarfile" >"$WORKDIR/artifacts/BUILD_INFO"
55+
echo "Tar file: $_tarfile" >"$WORKDIR/artifacts/BUILD_INFO"
5556
}

packages/java8/config.sh

Lines changed: 0 additions & 50 deletions
This file was deleted.

packages/misc-debs/config.sh

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/bin/bash
2+
#
3+
# Copyright 2021 Delphix
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+
# shellcheck disable=SC2034
18+
19+
DEFAULT_PACKAGE_GIT_URL=none
20+
SKIP_COPYRIGHTS_CHECK=true
21+
22+
#
23+
# IMPORTANT NOTE
24+
# --------------
25+
#
26+
# Debian packages (debs) that are not built from source by linux-pkg can be
27+
# added to this "meta-package". As a general rule, pre-built debs should only
28+
# be added here when they have been fetched from a trusted third-party
29+
# package archive.
30+
#
31+
# Here are some valid reasons for adding new debs here:
32+
# - There are bugs with a recent version of a package provided by Ubuntu and
33+
# we want to pin an older version of that package.
34+
# - Ubuntu provides a version of a package that is too old, and the package's
35+
# maintainers provide a more recent version of the package. Note that in this
36+
# case, you may also look into adding the maintainer's archive to the
37+
# linux-package-mirror PPAs list.
38+
#
39+
# To add a new deb here, upload that deb to the linux-pkg/misc-debs directory
40+
# in artifcatory and note the deb's SHA256. Be explicit on where this deb
41+
# was fetched from and why it was added to this list.
42+
#
43+
# When removing debs from this list, you should not remove them from artifactory
44+
# as they would used when rebuilding older releases.
45+
#
46+
47+
function fetch() {
48+
logmust cd "$WORKDIR/artifacts"
49+
50+
#
51+
# Note about the debs being fetched:
52+
# - td-agent was built by the "td-agent" linux-pkg package, but it
53+
# now fails to build due to broken third party dependencies. See
54+
# DLPX-69338 and DLPX-68211.
55+
# - unzip was added as a temporary workaround to DLPX-73555.
56+
#
57+
local debs=(
58+
"td-agent_3.5.0-delphix-2019.09.18.20_amd64.deb 84dfa2436039ff2a6312484bd7295ebaf570b5f59f100380b57e68b4800855c4"
59+
"unzip_6.0-21ubuntu1_amd64.deb d46069c369ce88c8dd91c52abb8de8d6053606748ef18b3b9bc290fdd8ad2953"
60+
)
61+
62+
local url="http://artifactory.delphix.com/artifactory/linux-pkg/misc-debs"
63+
64+
echo "Fetched debs:" >BUILD_INFO
65+
local entry
66+
for entry in "${debs[@]}"; do
67+
local deb sha256
68+
deb=$(echo "$entry" | awk '{print $1}')
69+
sha256=$(echo "$entry" | awk '{print $2}')
70+
[[ -n "$deb" && -n "$sha256" ]] || die "Invalid entry '$entry'"
71+
72+
logmust fetch_file_from_artifactory "$url/$deb" "$sha256"
73+
74+
echo "$entry" >>BUILD_INFO
75+
done
76+
}
77+
78+
function build() {
79+
return
80+
# Nothing to do, all the logic is done in fetch().
81+
}

packages/td-agent-prebuilt/config.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)