Skip to content

Commit 853d743

Browse files
DLPX-92534 linux-pkg changes for LTS upgrade to 24.04 (#325)
PR URL: https://www.github.com/delphix/linux-pkg/pull/325
1 parent 812147e commit 853d743

File tree

19 files changed

+41
-365
lines changed

19 files changed

+41
-365
lines changed

.github/scripts/verify-query-packages.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ read -r -a fields <<<"$(./query-packages.sh single -o git-url zfs 2>&1)"
3030
test ${#fields[@]} -eq 1
3131
test "${fields[0]}" == 'https://github.com/delphix/zfs.git'
3232

33-
# Expect: "bpftrace bcc true https://github.com/delphix/bpftrace.git"
34-
read -r -a fields <<<"$(./query-packages.sh single -o name,dependencies,can-update,git-url bpftrace 2>&1)"
35-
test ${#fields[@]} -eq 4
36-
test "${fields[0]}" == 'bpftrace'
37-
test "${fields[1]}" == 'bcc'
38-
test "${fields[2]}" == 'true'
39-
test "${fields[3]}" == 'https://github.com/delphix/bpftrace.git'
40-
4133
# Expect that "list all" outputs all directory names under packages/
4234
diff <(ls -1 packages | sort) <(./query-packages.sh list all 2>&1 | sort)
4335

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,7 @@ of some of the scripts defined above.
280280

281281
* **package_S3_URL**: Similar to the package_VAR variables above. This is used
282282
to override the default S3 location for where package build-dependencies are
283-
fetched for a given linux-pkg package. For instance, if you are building
284-
bpftrace, which has `PACKAGE_DEPENDENCIES="bcc"` in its config, the
285-
`fetch_dependencies()` stage in the build will fetch the latest build
286-
artifacts of the bcc package from a predetermined S3 location. If you pass
287-
`BCC_S3_URL=s3://path/to/custom/bcc/artifacts` then those artifacts will be
288-
fetched insteasd.
283+
fetched for a given linux-pkg package.
289284

290285
* **DELPHIX_PACKAGE_MIRROR_MAIN, DELPHIX_PACKAGE_MIRROR_SECONDARY**: When
291286
the [setup.sh](#setupsh) script is run, it will configure the apt sources

default-package-config.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ function kernel_build() {
5353
local platform="$1"
5454
#
5555
# Note: Extra arguments can overwrite default arguments.
56-
# For example in this function we default skipdbg
57-
# to false, but if we pass "skipdbg=true" as an
56+
# For example in this function we default do_dbgsym_package
57+
# to false, but if we pass "do_dbgsym_package=true" as an
5858
# extra argument we will be overwriting this value
5959
# to true. This is because when a variable's value
6060
# is declared multiple times when invoking the
@@ -103,25 +103,28 @@ function kernel_build() {
103103
echo "$kernel_version" >"$WORKDIR/artifacts/KERNEL_VERSION"
104104

105105
#
106-
# skipdbg=false
106+
# do_dbgsym_package=true
107107
# We need debug info for our debugging tools to work.
108108
# Don't skip them.
109+
# do_tools_common=false
110+
# We do not need to build linux-tools-common package and we
111+
# install it directly from our package mirror.
112+
# do_tools_host=false
113+
# We do not need to build linux-tools-host package.
109114
# uefi_signed=false
110115
# This variable defaults to true but since we don't have
111116
# any intention and logic to provide signatures for now
112117
# we set it to false to avoid any misconfigurations down
113118
# the line.
114-
# disable_d_i=true
115-
# This prevents udeb packages from being built as they are
116-
# not consumed by the Delphix Appliance.
117119
# do_dkms_*=false
118120
# This disables the build of various out-of-tree kernel modules
119121
# that we do not use in our product or that we provide separately.
120122
#
121123
local debian_rules_args=(
122-
"skipdbg=false"
124+
"do_dbgsym_package=true"
125+
"do_tools_common=false"
126+
"do_tools_host=false"
123127
"uefi_signed=false"
124-
"disable_d_i=true"
125128
"do_zfs=false"
126129
"do_dkms_nvidia=false"
127130
"do_dkms_nvidia_server=false"

lib/common.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ function install_shfmt() {
559559
arch="arm"
560560
fi
561561
logmust sudo wget -nv -O /usr/local/bin/shfmt \
562-
https://github.com/mvdan/sh/releases/download/v2.4.0/shfmt_v2.4.0_linux_$arch
562+
"https://github.com/mvdan/sh/releases/download/v2.4.0/shfmt_v2.4.0_linux_$arch"
563563
logmust sudo chmod +x /usr/local/bin/shfmt
564564
fi
565565
echo "shfmt version $(shfmt -version) is installed."
@@ -616,6 +616,10 @@ function delphix_revision() {
616616
echo "delphix.$(date '+%Y.%m.%d.%H.%M')"
617617
}
618618

619+
function compare_versions() {
620+
dpkg --compare-versions "$@"
621+
}
622+
619623
function determine_dependencies_base_url() {
620624
[[ -n "$DEPENDENCIES_BASE_URL" ]] && return
621625

package-lists/build/main.pkgs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
# List of non-kernel packages to be included in the Delphix Appliance.
33
#
44

5-
adoptopenjdk
6-
bcc
7-
bpftrace
85
challenge-response
96
cloud-init
107
crash-python
@@ -13,20 +10,16 @@ delphix-go
1310
delphix-platform
1411
delphix-rust
1512
delphix-sso-app
16-
drgn
1713
docker-python-image
1814
dwarves
19-
fio
2015
fluentd-gems
2116
gdb-python
2217
grub2
2318
host-jdks
24-
libkdumpfile
2519
make-jpkg
2620
makedumpfile
2721
masking
2822
misc-debs
29-
mold
3023
nfs-utils
3124
performance-diagnostics
3225
ptools

packages/adoptopenjdk/config.sh

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

packages/bcc/config.sh

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

packages/bpftrace/config.sh

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

packages/connstat/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function prepare() {
2323
logmust install_pkgs \
2424
debhelper \
2525
dpkg-dev \
26-
llvm-12
26+
llvm-14
2727
logmust install_kernel_headers
2828
logmust install_pkgs "$DEPDIR"/dwarves/*.deb
2929
}

packages/containerized-masking/config.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,15 @@ source "$PWD/lib/common.sh"
2929

3030
DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/dms-core-gate.git"
3131

32-
PACKAGE_DEPENDENCIES="adoptopenjdk"
3332
SKIP_COPYRIGHTS_CHECK=true
3433

3534
function prepare() {
36-
logmust install_pkgs "$DEPDIR"/adoptopenjdk/*.deb
35+
echo "Nothing to prepare"
3736
}
3837

3938
function build() {
4039
export JAVA_HOME
41-
JAVA_HOME=$(cat "$DEPDIR/adoptopenjdk/JDK_PATH") ||
42-
die "Failed to read $DEPDIR/adoptopenjdk/JDK_PATH"
40+
JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/"
4341

4442
logmust cd "$WORKDIR/repo"
4543

packages/delphix-sso-app/config.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@
1717
# shellcheck disable=SC2034
1818

1919
DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/saml-app.git"
20-
PACKAGE_DEPENDENCIES="adoptopenjdk"
2120

2221
function prepare() {
23-
logmust install_pkgs "$DEPDIR"/adoptopenjdk/*.deb
22+
echo "Nothing to prepare"
2423
}
2524

2625
function build() {
2726
local java_home
28-
java_home=$(cat "$DEPDIR/adoptopenjdk/JDK_PATH") ||
29-
die "Failed to read $DEPDIR/adoptopenjdk/JDK_PATH"
27+
java_home="/usr/lib/jvm/java-8-openjdk-amd64/"
3028
logmust cd "$WORKDIR/repo"
3129
logmust sudo ./gradlew "-Dorg.gradle.java.home=$java_home" distDeb
3230
logmust sudo mv ./build/distributions/*deb "$WORKDIR/artifacts/"

packages/drgn/config.sh

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

0 commit comments

Comments
 (0)