Skip to content

Fix invalid underscore in Debian package version string#16852

Merged
NikolaMilosavljevic merged 1 commit into
dotnet:mainfrom
NikolaMilosavljevic:fix/debian-version-separator
May 21, 2026
Merged

Fix invalid underscore in Debian package version string#16852
NikolaMilosavljevic merged 1 commit into
dotnet:mainfrom
NikolaMilosavljevic:fix/debian-version-separator

Conversation

@NikolaMilosavljevic
Copy link
Copy Markdown
Member

@NikolaMilosavljevic NikolaMilosavljevic commented May 19, 2026

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.targets

  1. Changelog version (line 174): Changed separator from _ to -

    • Before: InstallerPackageVersion_InstallerPackageRelease10.0.1_1
    • After: InstallerPackageVersion-InstallerPackageRelease10.0.1-1
  2. Control file version (line 213): Added missing release number with - separator

    • Before: InstallerPackageVersion10.0.1
    • After: InstallerPackageVersion-InstallerPackageRelease10.0.1-1

This also fixes a version mismatch between the changelog and control file — they now both use the same Debian-standard upstream_version-debian_revision format.

Impact Analysis

  • Deb: Fixed — produces valid Debian version strings
  • RPM: No impact — uses separate PackageVersion/PackageRelease parameters
  • macOS .pkg: No impact — uses only InstallerPackageVersion
  • MSI/exe: No impact — does not use these targets

References

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>
Copilot AI review requested due to automatic review settings May 19, 2026 18:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 _ between InstallerPackageVersion and InstallerPackageRelease.
  • Update Debian control file to include the release number (also using -) so it matches the changelog and Debian conventions.

@NikolaMilosavljevic NikolaMilosavljevic merged commit 4288d5a into dotnet:main May 21, 2026
13 checks passed
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.

Version 10.0.1_1, 10.0.2_1 contains invalid character _ for Debian package versioning

4 participants