This commit is contained in:
parent
7f73104db9
commit
8603182caf
2 changed files with 19 additions and 0 deletions
|
|
@ -293,6 +293,18 @@ jobs:
|
|||
# --delete on content/ is safe: it is regenerated every build. Note it
|
||||
# does NOT touch /deploy-app/media, which must survive.
|
||||
rsync -a --delete content/ /deploy-app/content/
|
||||
# The server links libmsquic as a SHARED lib out of crafter-build's
|
||||
# external cache; the RUNPATH into that cache only exists on this
|
||||
# build machine. The binary carries an $ORIGIN rpath (project.cpp),
|
||||
# so the .so must travel with it. install dereferences the
|
||||
# libmsquic.so.2 -> .so.2.x.y symlink into a regular file.
|
||||
MSQ=$(find ~/.cache/crafter.build/external -name 'libmsquic.so.2*' -type f | head -1)
|
||||
if [ -z "$MSQ" ]; then
|
||||
echo "ERROR: libmsquic.so.2 not found in the external build cache." >&2
|
||||
exit 1
|
||||
fi
|
||||
install -m 0755 "$MSQ" /deploy-app/libmsquic.so.2.new
|
||||
mv -f /deploy-app/libmsquic.so.2.new /deploy-app/libmsquic.so.2
|
||||
# Swap the binary into place atomically, so a request arriving mid-copy
|
||||
# never hits a truncated executable.
|
||||
mv -f /deploy-app/catcrafts-server.new /deploy-app/catcrafts-server
|
||||
|
|
|
|||
|
|
@ -134,6 +134,13 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
|
|||
cfg.linkFlags.push_back("-lssl");
|
||||
cfg.linkFlags.push_back("-lcrypto");
|
||||
|
||||
// libmsquic.so.2 is built in crafter-build's external cache, and the
|
||||
// RUNPATH pointing there only exists on the build machine — the first
|
||||
// deploy to a real host died in the loader (exit 127) because of it.
|
||||
// $ORIGIN makes the loader also look next to the binary itself, and CI
|
||||
// ships the .so alongside it into /srv/catcrafts-app.
|
||||
cfg.linkFlags.push_back("-Wl,-rpath,$ORIGIN");
|
||||
|
||||
ApplyReleaseTrimming(cfg);
|
||||
return cfg;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue