Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure .deb files are created consistently across all CMake presets #142

Merged
merged 2 commits into from
Jan 31, 2024

Conversation

abeltrano
Copy link
Contributor

Type

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

Side Effects

  • Breaking change
  • Non-functional change

Goals

  • Ensure .deb files are created consistently across all CMake presets.

Technical Details

  • Move setting CPACK_PACKAGING_INSTALL_PREFIX and CPACK_SET_DESTDIR into CMakePresets.json.
  • Add new hidden CMake presets for packaging, dev-packaging-base and release-packaging-base.
  • Explicitly specify install destination for libwpa_client.so instead of relying on TYPE default.
  • Replace ${CMAKE_INSTALL_FULL_RUNSTATEDIR} with `${CMAKE_INSTALL_RUNSTATEDIR}) for hostapd run state directory staging.
  • Rename release-linux configure preset to Release for consistency.

Test Results

  • Ran cpack -C Debug with both Development and Release configure presets, then dumped contents of netremote-hostapd_0.0.1_amd64.deb and netremote-server_0.0.1_amd64.deb and ensured contents were identical and contained all expected filesystem location targets:
shadowfax@mrstux:~/src/microsoft/netremote-cmake/build/release-linux$ dpkg --contents ./netremote-server_0.0.1_amd64.deb
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/bin/
-rwxr-xr-x root/root 134507128 2024-01-31 20:11 ./usr/local/bin/netremote-server
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/lib/
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/lib/systemd/
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/lib/systemd/system/
-rw-r--r-- root/root       241 2024-01-31 20:09 ./usr/local/lib/systemd/system/netremote-server.service

shadowfax@mrstux:~/src/microsoft/netremote-cmake/build/release-linux$ dpkg --contents ./netremote-hostapd_0.0.1_amd64.deb
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/etc/
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/etc/hostapd/
-rw-r--r-- root/root       545 2024-01-31 20:09 ./usr/local/etc/hostapd/hostapd.example.conf
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/lib/
-rw-r--r-- root/root    138480 2024-01-31 20:11 ./usr/local/lib/libwpa_client.so
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/lib/systemd/
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/lib/systemd/system/
-rw-r--r-- root/root       298 2024-01-31 20:09 ./usr/local/lib/systemd/system/[email protected]
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/sbin/
-rwxr-xr-x root/root   8647456 2024-01-31 20:11 ./usr/local/sbin/hostapd
-rwxr-xr-x root/root    347840 2024-01-31 20:11 ./usr/local/sbin/hostapd_cli
drwxrwxr-x root/root         0 2024-01-31 20:11 ./usr/local/var/
drwxr-xr-x root/root         0 2024-01-31 20:11 ./usr/local/var/run/

Reviewer Focus

  • None

Future Work

  • None

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 31, 2024 20:18
@abeltrano abeltrano merged commit 0c5a885 into develop Jan 31, 2024
5 checks passed
@abeltrano abeltrano deleted the packagingtweaks branch January 31, 2024 20:28
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.

1 participant