Skip to content

Commit

Permalink
Add debug symbols to packages (Azure#587)
Browse files Browse the repository at this point in the history
Currently, we provide symbol packages for all the distros we build, with the exception of Mariner (disabled due to a rust issue, then never reverted). However, the packages don't contain our symbols because we instruct rustc to build the release configuration, which doesn't emit debug information by default.

This change updates Cargo.toml to enable full debug information in release builds. It also reverts the config that was supressing symbol packages in Mariner. The deb/rpm packaging tools already strip symbols from release binaries and generate symbol packages, so no further changes are needed.
  • Loading branch information
damonbarry authored Feb 7, 2024
1 parent 55efa60 commit 98419ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ panic = "abort"

[profile.release]
panic = "abort"
# Release builds will have full symbols. The packaging phase will strip symbols from binaries and
# make them available in a separate package.
debug = 2
1 change: 1 addition & 0 deletions ci/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ EOF
mkdir -p "/src/packages/$TARGET_DIR"
cp \
"$MarinerRPMBUILDDIR/out/RPMS/$MarinerArch/aziot-identity-service-$PACKAGE_VERSION-$PACKAGE_RELEASE.$PackageExtension.$MarinerArch.rpm" \
"$MarinerRPMBUILDDIR/out/RPMS/$MarinerArch/aziot-identity-service-debuginfo-$PACKAGE_VERSION-$PACKAGE_RELEASE.$PackageExtension.$MarinerArch.rpm" \
"$MarinerRPMBUILDDIR/out/RPMS/$MarinerArch/aziot-identity-service-devel-$PACKAGE_VERSION-$PACKAGE_RELEASE.$PackageExtension.$MarinerArch.rpm" \
"/src/packages/$TARGET_DIR"
;;
Expand Down
6 changes: 0 additions & 6 deletions contrib/mariner/aziot-identity-service.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
# Copyright (c) Microsoft. All rights reserved.


# TODO:
# Building debuginfo package fails due to https://github.com/rust-lang/rust/issues/82006
# Remove this once that's fixed.
%define debug_package %{nil}


Name: aziot-identity-service
Version: @@VERSION@@
Release: @@RELEASE@@%{?dist}
Expand Down

0 comments on commit 98419ce

Please sign in to comment.