Skip to content

Commit

Permalink
DLPX-92534 linux-pkg changes for LTS upgrade to 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
palash-gandhi committed Dec 5, 2024
1 parent d8c2f8f commit 39ba085
Show file tree
Hide file tree
Showing 20 changed files with 37 additions and 391 deletions.
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
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
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
17 changes: 9 additions & 8 deletions default-package-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,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,25 +103,26 @@ 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.
# 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
# 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"
Expand Down
4 changes: 4 additions & 0 deletions lib/common.sh
Original file line number Diff line number Diff line change
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
8 changes: 0 additions & 8 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,15 @@ delphix-go
delphix-platform
delphix-rust
delphix-sso-app
drgn
docker-python-image
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"
}

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
6 changes: 2 additions & 4 deletions packages/delphix-sso-app/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@
# shellcheck disable=SC2034

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

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

function build() {
local 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"
logmust sudo ./gradlew "-Dorg.gradle.java.home=$java_home" distDeb
logmust sudo mv ./build/distributions/*deb "$WORKDIR/artifacts/"
Expand Down
41 changes: 0 additions & 41 deletions packages/drgn/config.sh

This file was deleted.

Loading

0 comments on commit 39ba085

Please sign in to comment.