fix(pkg): install the ob-standalone-setup links under the install-time prefix - #273
Merged
Merged
Conversation
…e prefix The two links were made by install(CODE) against CMAKE_INSTALL_FULL_SBINDIR and CMAKE_INSTALL_FULL_MANDIR, which are baked at configure time (/usr/local/...). cpack installs under /usr, so the parent directory did not exist in its staging tree, create_symlink failed with ENOENT, execute_process ignored it, and cpack still exited 0: the CI .deb shipped without ob-standalone-setup and its man page. dpkg-buildpackage and rpmbuild configure with prefix /usr, so the paths matched there and the released packages were not affected. The links are now made in the build tree and installed with install(FILES) and a relative DESTINATION, which follows the install-time prefix and DESTDIR. The CI package job fails when cpack reports a CMake Error, since cpack itself does not. Claude-Session: https://claude.ai/code/session_01Bh9aBGroMwsqpv4q5foHT3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reported by @orontee on #272: the "Build Debian Package" job logs two
CMake Errors and still passes.It is not specific to #272 — main has the same two lines.
Cause
The two links were made by
install(CODE)againstCMAKE_INSTALL_FULL_SBINDIR/CMAKE_INSTALL_FULL_MANDIR. Those are baked at configure time (/usr/local/...), but cpack installs under/usr. The parent directory does not exist in the staging tree,create_symlinkfails,execute_processignores the result, and cpack exits 0 — with a.debthat has noob-standalone-setupand noob-standalone-setup.8.dpkg-buildpackage(dh, prefix/usr) andrpmbuild(%cmake) configure with/usr, so the paths matched there: the released packages were not affected (and both list the link explicitly, so their builds would fail without it).Fix
install(FILES … DESTINATION ${CMAKE_INSTALL_SBINDIR})(resp.${CMAKE_INSTALL_MANDIR}/man8). A relative destination follows the install-time prefix andDESTDIR. Works with ourcmake_minimum_required(3.10).CMake Error, since cpack itself does not.Verified locally
and
cmake -DCMAKE_INSTALL_PREFIX=/usr+DESTDIR=… cmake --install(the dh/rpm path) installs both as symlinks.https://claude.ai/code/session_01Bh9aBGroMwsqpv4q5foHT3