Skip to content

Commit 7fc6b3f

Browse files
palash-gandhiprakashsurya
authored andcommitted
DLPX-94086 LTS 24.04: update linux-pkg for Ubuntu 24.04 appliance
PR URL: https://www.github.com/delphix/linux-pkg/pull/349
1 parent 01debae commit 7fc6b3f

File tree

27 files changed

+99
-352
lines changed

27 files changed

+99
-352
lines changed

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

-8
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

+2-7
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ projects.
2929

3030
## System Requirements
3131

32-
This framework is intended to be run on an Ubuntu 20.04 system with some basic
32+
This framework is intended to be run on an Ubuntu 24.04 system with some basic
3333
developer packages installed, such as git, and passwordless sudo enabled. Note
3434
that it will automatically install various build-dependencies on the system, so
3535
as a safety precaution it is currently restricted to only run on an AWS instance
@@ -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

+24-22
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@ function merge_with_upstream() {
3535
# The functions below are specific for the Linux kernel packages
3636
# and contain the majority of their common code.
3737
#
38+
# Ensure that Delphix's version of the rust toolchain is
39+
# installed rather than Ubuntu's version to satisfy the kernel's
40+
# dependency on the rust toolchain. Delphix's rust toolchain is
41+
# supplied via virtual packages and hence must be installed explicitly
42+
# otherwise apt installs the Ubuntu's version of the rust toolchain.
43+
#
3844
function kernel_prepare() {
3945
logmust install_pkgs \
40-
equivs \
46+
"$DEPDIR"/delphix-rust/*.deb \
4147
devscripts \
42-
kernel-wedge
48+
equivs \
49+
kernel-wedge \
50+
gawk
4351
}
4452

4553
#
@@ -53,8 +61,8 @@ function kernel_build() {
5361
local platform="$1"
5462
#
5563
# 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
64+
# For example in this function we default do_dbgsym_package
65+
# to false, but if we pass "do_dbgsym_package=true" as an
5866
# extra argument we will be overwriting this value
5967
# to true. This is because when a variable's value
6068
# is declared multiple times when invoking the
@@ -103,31 +111,29 @@ function kernel_build() {
103111
echo "$kernel_version" >"$WORKDIR/artifacts/KERNEL_VERSION"
104112

105113
#
106-
# skipdbg=false
114+
# do_dbgsym_package=true
107115
# We need debug info for our debugging tools to work.
108116
# Don't skip them.
117+
# do_tools_common=false
118+
# We do not need to build linux-tools-common package and we
119+
# install it directly from our package mirror.
120+
# do_tools_host=false
121+
# We do not need to build linux-tools-host package.
109122
# uefi_signed=false
110123
# This variable defaults to true but since we don't have
111124
# any intention and logic to provide signatures for now
112125
# we set it to false to avoid any misconfigurations down
113126
# 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.
117-
# do_dkms_*=false
127+
# dkms_exclude=*
118128
# This disables the build of various out-of-tree kernel modules
119129
# that we do not use in our product or that we provide separately.
120130
#
121131
local debian_rules_args=(
122-
"skipdbg=false"
132+
"do_dbgsym_package=true"
133+
"do_tools_common=false"
134+
"do_tools_host=false"
123135
"uefi_signed=false"
124-
"disable_d_i=true"
125-
"do_zfs=false"
126-
"do_dkms_nvidia=false"
127-
"do_dkms_nvidia_server=false"
128-
"do_dkms_vbox=false"
129-
"do_dkms_wireguard=false"
130-
"dkms_exclude=v4l2loopback"
136+
"dkms_exclude=zfs ipu6 iwlwifi v4l2loopback usbio"
131137
"flavours=$platform"
132138
"abinum=${delphix_abinum}"
133139
)
@@ -262,11 +268,7 @@ function kernel_update_upstream() {
262268
local tag_prefix_flavour
263269
case "${platform}" in
264270
generic)
265-
if [[ "$UBUNTU_DISTRIBUTION" == focal ]]; then
266-
tag_prefix_flavour="Ubuntu-hwe"
267-
else
268-
tag_prefix_flavour="Ubuntu"
269-
fi
271+
tag_prefix_flavour="Ubuntu"
270272
;;
271273
aws | azure | gcp | oracle)
272274
tag_prefix_flavour="Ubuntu-${platform}"

lib/common.sh

+7-11
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export SUPPORTED_KERNEL_FLAVORS="generic aws gcp azure oracle"
2828
#
2929
export JENKINS_OPS_DIR="${JENKINS_OPS_DIR:-jenkins-ops}"
3030

31-
export UBUNTU_DISTRIBUTION="focal"
31+
export UBUNTU_DISTRIBUTION="noble"
3232

3333
#
3434
# We currently support getting the linux kernel from 3 different sources:
@@ -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

@@ -1109,21 +1113,13 @@ function get_kernel_version_for_platform_from_apt() {
11091113
# image for that particular platform. For instance, Ubuntu has a
11101114
# meta-package for AWS called 'linux-image-aws', which depends on
11111115
# package 'linux-image-4.15.0-1027-aws'. The latter is the linux image
1112-
# for kernel version '4.15.0-1027-aws'. We use this depenency to figure
1116+
# for kernel version '4.15.0-1027-aws'. We use this dependency to figure
11131117
# out the default kernel version for a given platform.
11141118
#
1115-
# The "generic" platform is a special case, since we want to use the
1116-
# hwe kernel image instead of the regular generic image.
1117-
#
11181119
# Note that while the default kernel is usually also the latest
11191120
# available, it is not always the case.
11201121
#
1121-
1122-
if [[ "$platform" != generic ]] && [[ "$UBUNTU_DISTRIBUTION" == focal ]]; then
1123-
package="linux-image-${platform}"
1124-
else
1125-
package="linux-image-${platform}-hwe-20.04"
1126-
fi
1122+
package="linux-image-${platform}"
11271123

11281124
if [[ "$(apt-cache show --no-all-versions "$package" \
11291125
2>/dev/null | grep Depends)" =~ linux-image-([^,]*-${platform}) ]]; then

package-lists/build/main.pkgs

+1-7
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,17 @@ delphix-go
1310
delphix-platform
1411
delphix-rust
1512
delphix-sso-app
16-
drgn
1713
docker-python-image
14+
drgn
1815
dwarves
19-
fio
2016
fluentd-gems
2117
gdb-python
2218
grub2
2319
host-jdks
2420
libkdumpfile
25-
make-jpkg
2621
makedumpfile
2722
masking
2823
misc-debs
29-
mold
3024
nfs-utils
3125
performance-diagnostics
3226
ptools

packages/adoptopenjdk/config.sh

-81
This file was deleted.

packages/bcc/config.sh

-39
This file was deleted.

packages/bpftrace/config.sh

-42
This file was deleted.

packages/connstat/config.sh

+1-1
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

+2-4
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

0 commit comments

Comments
 (0)