Skip to content

Commit

Permalink
Hopefully fixup packaging?
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixMcFelix committed Jul 19, 2024
1 parent 00b27b6 commit c02b84b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
36 changes: 17 additions & 19 deletions .github/buildomat/jobs/p5p.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#: name = "opte.p5p.sha256"
#: from_output = "/out/opte.p5p.sha256"
#:
#: [dependencies.xde]
#: job = "opte-xde"

set -o errexit
set -o pipefail
set -o xtrace

pfexec pkg install clang-15

#
# TGT_BASE allows one to run this more easily in their local
# environment:
Expand All @@ -37,32 +37,30 @@ pfexec pkg install clang-15
#
TGT_BASE=${TGT_BASE:=/work}

REL_SRC=target/x86_64-illumos/release
REL_TGT=$TGT_BASE/release

mkdir -p $REL_TGT

function header {
echo "# ==== $* ==== #"
}

cargo --version
rustc --version

# TODO: shouldn't these be copied as a dependency/output of xde.sh?
header "build xde and opteadm (release+debug)"
ptime -m cargo xtask build
header "move artifacts for packaging"
# Copy in just-built artifacts
DBG_SRC=target/x86_64-illumos/debug
DBG_LINK_SRC=target/i686-unknown-illumos/debug

# TODO: doesn't this dupe xde.sh?
REL_SRC=target/x86_64-illumos/release
REL_LINK_SRC=target/i686-unknown-illumos/release

#
# Inspect the kernel module for bad relocations in case the old
# codegen issue ever shows its face again.
#
if elfdump $REL_SRC/xde | grep GOTPCREL; then
echo "found GOTPCREL relocation in release build"
exit 1
fi
mkdir -p $REL_SRC
cp /input/xde/work/release/xde $REL_SRC
mkdir -p $DBG_SRC
cp /input/xde/work/debug/xde $DBG_SRC

mkdir -p $REL_LINK_SRC
cp /input/xde/work/release/xde_link.so $REL_LINK_SRC/libxde_link.so
mkdir -p $DBG_LINK_SRC
cp /input/xde/work/debug/xde_link.dbg.so $DBG_LINK_SRC/libxde_link.so

header "package opte"
cargo xtask package --skip-build
Expand Down
4 changes: 2 additions & 2 deletions pkg/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ mkdir -p proto/kernel/drv/amd64
mkdir -p proto/opt/oxide/opte/bin
mkdir -p proto/usr/lib/devfsadm/linkmod
cp ../target/release/opteadm proto/opt/oxide/opte/bin/
cp ../target/x86_64-unknown-unknown/release/xde proto/kernel/drv/amd64
cp ../target/x86_64-illumos/release/xde proto/kernel/drv/amd64
cp ../xde/xde.conf proto/kernel/drv/
cp ../target/i686-unknown-illumos/release/libxde_link.so proto/usr/lib/devfsadm/linkmod/SUNW_xde_link.so

if [ -z ${RELEASE_ONLY+x} ]; then
cp ../target/debug/opteadm proto/opt/oxide/opte/bin/opteadm.dbg
cp ../target/x86_64-unknown-unknown/debug/xde.dbg proto/kernel/drv/amd64/xde.dbg
cp ../target/x86_64-illumos/debug/xde.dbg proto/kernel/drv/amd64/xde.dbg
INC_DEBUG=""
else
INC_DEBUG="#"
Expand Down

0 comments on commit c02b84b

Please sign in to comment.