Skip to content

Enable building a .deb for Linux installation#137

Merged
abeltrano merged 8 commits into
developfrom
debpack
Jan 27, 2024
Merged

Enable building a .deb for Linux installation#137
abeltrano merged 8 commits into
developfrom
debpack

Conversation

@abeltrano
Copy link
Copy Markdown
Contributor

@abeltrano abeltrano commented Jan 26, 2024

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

  • Allow installation of a release package onto Linux distributions supporting .deb package format.

Technical Details

  • Add CPack support using the DEB generator to build a .deb package.
  • Set project version for use in packaging and CMake internals from latest git tag.

Test Results

Generated a .deb package for the debug configuration using cpack per below:

shadowfax@mrstux:~/src/microsoft/netremote-cmake/out/build/dev-linux$ cpack -C Debug
CPack: Create package using DEB
CPack: Install projects
CPack: - Install project: netremote [Debug]
CPack: -   Install component: server
CPack: Create package
CPackDeb: - Generating dependency list
CPack: - package: /home/shadowfax/src/microsoft/netremote-cmake/out/build/dev-linux/netremote-server_0.0.1_amd64.deb generated.

Which shows contents to be:

shadowfax@mrstux:~/src/microsoft/netremote-cmake/out/build/dev-linux$ dpkg --contents ./netremote-server_0.0.1_amd64.deb 
drwxrwxr-x root/root         0 2024-01-26 23:18 ./bin/
-rwxr-xr-x root/root 134337128 2024-01-26 23:18 ./bin/netremote-server
drwxrwxr-x root/root         0 2024-01-26 23:18 ./etc/
drwxrwxr-x root/root         0 2024-01-26 23:18 ./etc/systemd/
drwxrwxr-x root/root         0 2024-01-26 23:18 ./etc/systemd/system/
-rw-r--r-- root/root       298 2024-01-17 19:35 ./etc/systemd/system/netremote-server.service

Reviewer Focus

  • None

Future Work

  • The server binary is being installed to /bin instead of /usr/bin. While this will work, it should be fixed.

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@abeltrano abeltrano requested a review from a team as a code owner January 26, 2024 23:22
Comment thread packaging/deb/CMakeLists.txt Outdated
@abeltrano abeltrano merged commit c6c6211 into develop Jan 27, 2024
@abeltrano abeltrano deleted the debpack branch January 27, 2024 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants