Fix invalid underscore in Debian package version string#16852
Merged
NikolaMilosavljevic merged 1 commit intoMay 21, 2026
Merged
Conversation
The Debian changelog version was constructed as InstallerPackageVersion_InstallerPackageRelease (e.g., 10.0.1_1), but underscores are not valid in Debian version strings. Per Debian policy, the upstream version and debian revision must be separated by a hyphen (e.g., 10.0.1-1). Additionally, the control file was missing the release number entirely, causing a version mismatch between changelog and control. Both now consistently use the Debian-standard format: upstream_version-debian_revision Fixes: dotnet/sdk#52602 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Debian package version generation to comply with Debian’s versioning rules by removing underscores and ensuring a consistent upstream_version-debian_revision format across generated metadata. This change lives in the Arcade installer build targets that generate .deb artifacts.
Changes:
- Update Debian changelog version formatting to use
-instead of_betweenInstallerPackageVersionandInstallerPackageRelease. - Update Debian control file to include the release number (also using
-) so it matches the changelog and Debian conventions.
joeloff
approved these changes
May 21, 2026
akoeplinger
approved these changes
May 21, 2026
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.
Summary
Fixes dotnet/sdk#52602
Debian package versions were constructed with an underscore separator (e.g.,
10.0.1_1), which violates Debian versioning policy. The underscore character is not in the set of allowed characters (A-Za-z0-9.+-:~), causing packaging and dependency resolution failures on Debian-based systems.Changes
File:
src/Microsoft.DotNet.Build.Tasks.Installers/build/installer.build.targetsChangelog version (line 174): Changed separator from
_to-InstallerPackageVersion_InstallerPackageRelease→10.0.1_1InstallerPackageVersion-InstallerPackageRelease→10.0.1-1Control file version (line 213): Added missing release number with
-separatorInstallerPackageVersion→10.0.1InstallerPackageVersion-InstallerPackageRelease→10.0.1-1This also fixes a version mismatch between the changelog and control file — they now both use the same Debian-standard
upstream_version-debian_revisionformat.Impact Analysis
PackageVersion/PackageReleaseparametersInstallerPackageVersionReferences
Version: 2.1.104-1format (dotnet/sdkGivenDotNetLinuxInstallers.cs)