Skip to content

DLPX-94086 LTS 24.04: update linux-pkg for Ubuntu 24.04 appliance #349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/scripts/verify-query-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ read -r -a fields <<<"$(./query-packages.sh single -o git-url zfs 2>&1)"
test ${#fields[@]} -eq 1
test "${fields[0]}" == 'https://github.com/delphix/zfs.git'

# Expect: "bpftrace bcc true https://github.com/delphix/bpftrace.git"
read -r -a fields <<<"$(./query-packages.sh single -o name,dependencies,can-update,git-url bpftrace 2>&1)"
test ${#fields[@]} -eq 4
test "${fields[0]}" == 'bpftrace'
test "${fields[1]}" == 'bcc'
test "${fields[2]}" == 'true'
test "${fields[3]}" == 'https://github.com/delphix/bpftrace.git'

# Expect that "list all" outputs all directory names under packages/
diff <(ls -1 packages | sort) <(./query-packages.sh list all 2>&1 | sort)

Expand Down
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ projects.

## System Requirements

This framework is intended to be run on an Ubuntu 20.04 system with some basic
This framework is intended to be run on an Ubuntu 24.04 system with some basic
developer packages installed, such as git, and passwordless sudo enabled. Note
that it will automatically install various build-dependencies on the system, so
as a safety precaution it is currently restricted to only run on an AWS instance
Expand Down Expand Up @@ -280,12 +280,7 @@ of some of the scripts defined above.

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

* **DELPHIX_PACKAGE_MIRROR_MAIN, DELPHIX_PACKAGE_MIRROR_SECONDARY**: When
the [setup.sh](#setupsh) script is run, it will configure the apt sources
Expand Down
48 changes: 27 additions & 21 deletions default-package-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,19 @@ function merge_with_upstream() {
# The functions below are specific for the Linux kernel packages
# and contain the majority of their common code.
#
# Ensure that Delphix's version of the rust toolchain is
# installed rather than Ubuntu's version to satisfy the kernel's
# dependency on the rust toolchain. Delphix's rust toolchain is
# supplied via virtual packages and hence must be installed explicitly
# otherwise apt installs the Ubuntu's version of the rust toolchain.
#
function kernel_prepare() {
logmust install_pkgs \
equivs \
"$DEPDIR"/delphix-rust/*.deb \
devscripts \
kernel-wedge
equivs \
kernel-wedge \
gawk
}

#
Expand All @@ -53,8 +61,8 @@ function kernel_build() {
local platform="$1"
#
# Note: Extra arguments can overwrite default arguments.
# For example in this function we default skipdbg
# to false, but if we pass "skipdbg=true" as an
# For example in this function we default do_dbgsym_package
# to false, but if we pass "do_dbgsym_package=true" as an
# extra argument we will be overwriting this value
# to true. This is because when a variable's value
# is declared multiple times when invoking the
Expand Down Expand Up @@ -103,31 +111,33 @@ function kernel_build() {
echo "$kernel_version" >"$WORKDIR/artifacts/KERNEL_VERSION"

#
# skipdbg=false
# do_dbgsym_package=true
# We need debug info for our debugging tools to work.
# Don't skip them.
# do_tools_common=false
# We do not need to build linux-tools-common package and we
# install it directly from our package mirror.
# do_tools_host=false
# We do not need to build linux-tools-host package.
# uefi_signed=false
# This variable defaults to true but since we don't have
# any intention and logic to provide signatures for now
# we set it to false to avoid any misconfigurations down
# the line.
# disable_d_i=true
# This prevents udeb packages from being built as they are
# not consumed by the Delphix Appliance.
# do_dkms_*=false
# do_<module>=false
# This disables the build of various out-of-tree kernel modules
# that we do not use in our product or that we provide separately.
#
local debian_rules_args=(
"skipdbg=false"
"do_dbgsym_package=true"
"do_tools_common=false"
"do_tools_host=false"
"uefi_signed=false"
"disable_d_i=true"
"do_zfs=false"
"do_dkms_nvidia=false"
"do_dkms_nvidia_server=false"
"do_dkms_vbox=false"
"do_dkms_wireguard=false"
"dkms_exclude=v4l2loopback"
"do_ipu6=false"
"do_iwlwifi=false"
"do_v4l2loopback=false"
"do_usbio=false"
"flavours=$platform"
"abinum=${delphix_abinum}"
)
Expand Down Expand Up @@ -262,11 +272,7 @@ function kernel_update_upstream() {
local tag_prefix_flavour
case "${platform}" in
generic)
if [[ "$UBUNTU_DISTRIBUTION" == focal ]]; then
tag_prefix_flavour="Ubuntu-hwe"
else
tag_prefix_flavour="Ubuntu"
fi
tag_prefix_flavour="Ubuntu"
;;
aws | azure | gcp | oracle)
tag_prefix_flavour="Ubuntu-${platform}"
Expand Down
18 changes: 7 additions & 11 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export SUPPORTED_KERNEL_FLAVORS="generic aws gcp azure oracle"
#
export JENKINS_OPS_DIR="${JENKINS_OPS_DIR:-jenkins-ops}"

export UBUNTU_DISTRIBUTION="focal"
export UBUNTU_DISTRIBUTION="noble"

#
# We currently support getting the linux kernel from 3 different sources:
Expand Down Expand Up @@ -616,6 +616,10 @@ function delphix_revision() {
echo "delphix.$(date '+%Y.%m.%d.%H.%M')"
}

function compare_versions() {
dpkg --compare-versions "$@"
}

function determine_dependencies_base_url() {
[[ -n "$DEPENDENCIES_BASE_URL" ]] && return

Expand Down Expand Up @@ -1109,21 +1113,13 @@ function get_kernel_version_for_platform_from_apt() {
# image for that particular platform. For instance, Ubuntu has a
# meta-package for AWS called 'linux-image-aws', which depends on
# package 'linux-image-4.15.0-1027-aws'. The latter is the linux image
# for kernel version '4.15.0-1027-aws'. We use this depenency to figure
# for kernel version '4.15.0-1027-aws'. We use this dependency to figure
# out the default kernel version for a given platform.
#
# The "generic" platform is a special case, since we want to use the
# hwe kernel image instead of the regular generic image.
#
# Note that while the default kernel is usually also the latest
# available, it is not always the case.
#

if [[ "$platform" != generic ]] && [[ "$UBUNTU_DISTRIBUTION" == focal ]]; then
package="linux-image-${platform}"
else
package="linux-image-${platform}-hwe-20.04"
fi
package="linux-image-${platform}"

if [[ "$(apt-cache show --no-all-versions "$package" \
2>/dev/null | grep Depends)" =~ linux-image-([^,]*-${platform}) ]]; then
Expand Down
8 changes: 1 addition & 7 deletions package-lists/build/main.pkgs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# List of non-kernel packages to be included in the Delphix Appliance.
#

adoptopenjdk
bcc
bpftrace
challenge-response
cloud-init
crash-python
Expand All @@ -13,20 +10,17 @@ delphix-go
delphix-platform
delphix-rust
delphix-sso-app
drgn
docker-python-image
drgn
dwarves
fio
fluentd-gems
gdb-python
grub2
host-jdks
libkdumpfile
make-jpkg
makedumpfile
masking
misc-debs
mold
nfs-utils
performance-diagnostics
ptools
Expand Down
81 changes: 0 additions & 81 deletions packages/adoptopenjdk/config.sh

This file was deleted.

39 changes: 0 additions & 39 deletions packages/bcc/config.sh

This file was deleted.

42 changes: 0 additions & 42 deletions packages/bpftrace/config.sh

This file was deleted.

2 changes: 1 addition & 1 deletion packages/connstat/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function prepare() {
logmust install_pkgs \
debhelper \
dpkg-dev \
llvm-12
llvm-14
logmust install_kernel_headers
logmust install_pkgs "$DEPDIR"/dwarves/*.deb
}
Expand Down
6 changes: 2 additions & 4 deletions packages/containerized-masking/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@ source "$PWD/lib/common.sh"

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

PACKAGE_DEPENDENCIES="adoptopenjdk"
SKIP_COPYRIGHTS_CHECK=true

function prepare() {
logmust install_pkgs "$DEPDIR"/adoptopenjdk/*.deb
echo "Nothing to prepare"
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right thing to do? If there's nothing to do during the prepare stage, wouldn't removing the hook be the right thing to do?


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

logmust cd "$WORKDIR/repo"

Expand Down
Loading