Skip to content

Commit

Permalink
Add depends to p4rt debian package (#4)
Browse files Browse the repository at this point in the history
libswsscommon is actually linked statically, so not
technically a dependency, but it is installed anyway
by the build system so there's no harm either.

libswsscommon pulls in transitive libraries we do need:
  libhiredis, libnl*, libc, libgcc, libstdc++

libgmpxx4ldbl required for p4_symbolic
  • Loading branch information
bocon13 authored Mar 8, 2022
1 parent 36322d3 commit 60d2467
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions p4rt_app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,25 @@ pkg_tar(
visibility = ["//visibility:private"],
)

# Here's how to generate the list of Debian packages that contain the shared
# libraries that the p4rt binary depends on. It's probably better to manually
# manage the "depends" list in p4rt_deb, but this can help in debugging when
# a dependency (or transitive dependency) changes.
#
# ldd bazel-out/k8-fastbuild/bin/p4rt_app/p4rt | \
# sed "s/^[[:space:]]*\([^ ]*\.so[^ ]*\).*$/\1/" | \
# xargs -n1 -I{} bash -c "dpkg -S {} 2>/dev/null || true" | \
# cut -d: -f1 | \
# sort -u
#
pkg_deb(
name = "p4rt_deb",
architecture = "amd64",
data = ":p4rt_binaries",
depends = [
"libswsscommon",
"libgmpxx4ldbl",
],
description = "P4RT service",
maintainer = p4rt_maintainer,
package = "sonic-p4rt",
Expand All @@ -82,6 +97,9 @@ pkg_deb(
name = "p4rt_dbg_deb",
architecture = "amd64",
data = ":p4rt_debug",
depends = [
"sonic-p4rt",
],
description = "P4RT service debug symbols",
maintainer = p4rt_maintainer,
package = "sonic-p4rt-dbgsym",
Expand Down

0 comments on commit 60d2467

Please sign in to comment.