Skip to content
Merged
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: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,16 @@ jobs:
cmake -B build -DCMAKE_BUILD_TYPE=Release -DUSE_LIBSODIUM=ON
cmake --build build --parallel

# cpack reports a failed install step as "CMake Error" and still exits 0
# with a package missing the files that step should have put there.
- name: Create Debian package
run: |
cd build
cpack -G DEB
cpack -G DEB 2>&1 | tee cpack.log
if grep -q 'CMake Error' cpack.log; then
echo "::error::cpack reported install errors; the package is incomplete"
exit 1
fi

# Upgrades a host staged from the v0.6.2 tag and checks it converges.
# It needs docker and a package, which only this job has; on the build jobs
Expand Down
23 changes: 13 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -513,11 +513,14 @@ install(PROGRAMS ${CMAKE_SOURCE_DIR}/scripts/ob-bastion-setup
# ob-standalone-setup is a symlink to ob-bastion-setup: invoked under that name
# the script defaults --node-role to "standalone", giving admins a clearer,
# self-documenting command for combined bastion+backend hosts.
install(CODE "
set(_sbindir \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_SBINDIR}\")
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
ob-bastion-setup \"\${_sbindir}/ob-standalone-setup\")
")
# The link is made in the build tree and installed like any other file, so it
# follows the install-time prefix: cpack installs under /usr, not the
# configure-time /usr/local a CMAKE_INSTALL_FULL_* path would bake in.
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
ob-bastion-setup "${CMAKE_BINARY_DIR}/ob-standalone-setup")
install(FILES ${CMAKE_BINARY_DIR}/ob-standalone-setup
DESTINATION ${CMAKE_INSTALL_SBINDIR}
)

# Install auditd templates (consumed by `ob-bastion-setup --enable-audit-trace`).
# Read-only templates under /usr/share/open-bastion/audit/. The setup function
Expand Down Expand Up @@ -565,11 +568,11 @@ install(FILES
)

# Man page for the ob-standalone-setup symlink (points at ob-bastion-setup.8).
install(CODE "
set(_man8dir \"\$ENV{DESTDIR}${CMAKE_INSTALL_FULL_MANDIR}/man8\")
execute_process(COMMAND \"${CMAKE_COMMAND}\" -E create_symlink
ob-bastion-setup.8 \"\${_man8dir}/ob-standalone-setup.8\")
")
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
ob-bastion-setup.8 "${CMAKE_BINARY_DIR}/ob-standalone-setup.8")
install(FILES ${CMAKE_BINARY_DIR}/ob-standalone-setup.8
DESTINATION ${CMAKE_INSTALL_MANDIR}/man8
)

# Install man pages (section 1 - user commands)
install(FILES
Expand Down