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

Linux packages JSON format #9412

Merged
merged 35 commits into from
Jul 22, 2024
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3f99a91
Add packages JSON file
richlander Jul 15, 2024
8b7ee12
Reformat document
richlander Jul 15, 2024
893f323
Remove zlib
richlander Jul 15, 2024
41671da
Remove 'Extra' concept
richlander Jul 16, 2024
095aef4
Add reference doc
richlander Jul 16, 2024
2139d47
Generate markdown
richlander Jul 16, 2024
4450ffc
Add trailing CR
richlander Jul 16, 2024
0aa6b09
Apply suggestions from code review
richlander Jul 16, 2024
d513a42
Update schema per feedback
richlander Jul 16, 2024
b1d75dc
Remove commands property
richlander Jul 16, 2024
827b472
Update markdown to commands schemea change
richlander Jul 17, 2024
489d5cd
Add formats description
richlander Jul 17, 2024
e0f943a
Change title
richlander Jul 17, 2024
c5a68e8
Add more examples
richlander Jul 17, 2024
bd86084
Add formats link to README
richlander Jul 17, 2024
1ce34c5
Apply suggestions from code review
richlander Jul 17, 2024
03af9b6
Update schema with descriptions
richlander Jul 17, 2024
0d3bf12
Apply suggestions from code review
richlander Jul 19, 2024
77f97ac
Rename files
richlander Jul 19, 2024
c502763
Add eol-date
richlander Jul 19, 2024
6f99007
Update README files
richlander Jul 19, 2024
9c90a9f
Update schema links
richlander Jul 19, 2024
837b149
Update link titles
richlander Jul 19, 2024
5ffe062
Update per feedback
richlander Jul 19, 2024
f46f070
Update per feedback
richlander Jul 19, 2024
00ad51b
Updates per feedback
richlander Jul 19, 2024
bf18e05
Update description
richlander Jul 19, 2024
0babb5d
Sort packages
richlander Jul 19, 2024
27ac344
Remove Debian 11
richlander Jul 20, 2024
1b75a09
Add min-version information
richlander Jul 20, 2024
45c0093
Change to link
richlander Jul 20, 2024
3a8b35f
Update markdown
richlander Jul 20, 2024
1a82e29
Update schema per feedback
richlander Jul 20, 2024
608f264
Apply suggestions from code review
richlander Jul 22, 2024
cb34996
Update markdown
richlander Jul 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -31,9 +31,9 @@ You can find release notes for all releases, including out-of-support releases,
## Release Information

* [Download .NET](https://dotnet.microsoft.com/download/dotnet)
* [Releases Index][releases-index.json] -- Index for all release channels in JSON format
* [dotnet-install scripts](https://learn.microsoft.com/dotnet/core/tools/dotnet-install-script)
* [Installation docs](https://learn.microsoft.com/dotnet/core/install/)
* [dotnet-install scripts](https://learn.microsoft.com/dotnet/core/tools/dotnet-install-script)
* [Releases Index][releases-index.json] -- Index for all release channels in JSON format

[releases-index.json]: https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json
[policies]: release-policies.md
1 change: 1 addition & 0 deletions release-notes/9.0/README.md
Original file line number Diff line number Diff line change
@@ -6,6 +6,7 @@
- [Linux Package Managers](https://learn.microsoft.com/dotnet/core/install/linux)
- [Containers](https://hub.docker.com/_/microsoft-dotnet)
- [Supported OSes](supported-os.md)
- [OS packages](./os-packages.md)
- [Known Issues](known-issues.md)
- [Installation instructions](install.md)

120 changes: 0 additions & 120 deletions release-notes/9.0/linux-packages.md

This file was deleted.

421 changes: 421 additions & 0 deletions release-notes/9.0/os-packages.json

Large diffs are not rendered by default.

139 changes: 139 additions & 0 deletions release-notes/9.0/os-packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# .NET 9 Required Packages

Various packages must be installed to run .NET apps and the .NET SDK. This is handled automatically if .NET is [installed through archive packages](../../linux.md).

This file is generated from [os-packages.json](os-packages.json).

## Package Overview

The following table lists required packages, including the scenarios by which they are needed.

Id | Name | Required scenarios | Notes
--------------- | --------- | ------------- | ------------------------------
[libc][0] | C Library | All | https://github.com/dotnet/core/blob/main/release-notes/9.0/supported-os.md#linux-compatibility<br>https://www.gnu.org/software/libc/libc.html<br>https://musl.libc.org/
[libgcc][1] | GCC low-level runtime library | All | https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html
[ca-certificates][2] | CA Certificates | Https | https://www.redhat.com/sysadmin/ca-certificates-cli
[openssl][3] | OpenSSL | Https<br>Cryptography | Minimum required version 1.1.1<br>https://www.openssl.org/
[libstdc++][4] | C++ Library | Runtime | https://gcc.gnu.org/onlinedocs/libstdc++/
[libicu][5] | ICU | Globalization | https://icu.unicode.org<br>https://github.com/dotnet/runtime/blob/main/docs/design/features/globalization-invariant-mode.md
[tzdata][6] | tz database | Globalization | https://data.iana.org/time-zones/tz-link.html
[krb5][7] | Kerberos | Kerberos | https://web.mit.edu/kerberos

[0]: https://pkgs.org/search/?q=libc
[1]: https://pkgs.org/search/?q=libgcc
[2]: https://pkgs.org/search/?q=ca-certificates
[3]: https://pkgs.org/search/?q=openssl
[4]: https://pkgs.org/search/?q=libstdc++
[5]: https://pkgs.org/search/?q=libicu
[6]: https://pkgs.org/search/?q=tzdata
[7]: https://pkgs.org/search/?q=krb5

## Alpine

### Alpine 3.20

```bash
sudo apk add \
ca-certificates \
icu-data-full \
icu-libs \
krb5 \
libgcc \
libssl3 \
libstdc++ \
tzdata
```

### Alpine 3.19

```bash
sudo apk add \
ca-certificates \
icu-data-full \
icu-libs \
krb5 \
libgcc \
libssl3 \
libstdc++ \
tzdata
```

## Debian

### Debian 12 (Bookworm)

```bash
sudo apt-get update && \
sudo apt-get install -y \
ca-certificates \
libc6 \
libgcc-s1 \
libgssapi-krb5-2 \
libicu72 \
libssl3 \
libstdc++6 \
tzdata
```

## Fedora

### Fedora 40

```bash
sudo dnf install -y \
ca-certificates \
glibc \
krb5-libs \
libgcc \
libicu \
libstdc++ \
openssl-libs \
tzdata
```

## Ubuntu

### Ubuntu 24.10 (Oracular Oriole)

```bash
sudo apt-get update && \
sudo apt-get install -y \
ca-certificates \
libc6 \
libgcc-s1 \
libgssapi-krb5-2 \
libicu74 \
libssl3t64 \
libstdc++6 \
tzdata
```

### Ubuntu 24.04 (Noble Numbat)

```bash
sudo apt-get update && \
sudo apt-get install -y \
ca-certificates \
libc6 \
libgcc-s1 \
libgssapi-krb5-2 \
libicu74 \
libssl3t64 \
libstdc++6 \
tzdata
```

### Ubuntu 22.04.4 LTS (Jammy Jellyfish)

```bash
sudo apt-get update && \
sudo apt-get install -y \
ca-certificates \
libc6 \
libgcc-s1 \
libgssapi-krb5-2 \
libicu70 \
libssl3 \
libstdc++6 \
tzdata
```
8 changes: 5 additions & 3 deletions release-notes/README.md
Original file line number Diff line number Diff line change
@@ -14,12 +14,14 @@ You can find release notes for all releases, including out-of-support releases,
[8.0.7]: 8.0/8.0.7/8.0.7.md
[6.0.32]: 6.0/6.0.32/6.0.32.md

## Release Information
* [Release note formats](./formats.md)
* [Releases index][releases-index.json]

## Download .NET

* [Download .NET](https://dotnet.microsoft.com/download/dotnet)
* [Releases Index][releases-index.json] -- Index for all release channels in JSON format
* [dotnet-install scripts](https://learn.microsoft.com/dotnet/core/tools/dotnet-install-script)
* [Installation docs](https://learn.microsoft.com/dotnet/core/install/)
* [dotnet-install scripts](https://learn.microsoft.com/dotnet/core/tools/dotnet-install-script)

[releases-index.json]: https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json
[policies]: ../release-policies.md
99 changes: 99 additions & 0 deletions release-notes/formats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Release note formats

Release notes are available in a combination of markdown and JSON formats. The intent is to make all release notes available in markdown and also in JSON if there is a scenario that requires structured data. This content is [licensed](./license-information.md) for broad use.

Our approach has evolved over time. The following descriptions are for our latest practices.

## Monthly patch release notes (markdown)

We typically release an update each month. These often include security fixes for vulnerabilities (AKA CVEs) disclosed on the same day.

Examples:

- [6.0.32](./6.0/6.0.32/6.0.32.md)
- [8.0.1](./8.0/8.0.1/8.0.1.md)

These markdown files include the following information:

- Links to binaries
- Notable changes, including CVEs
- Compatibility information
- Updates packages

## Monthly preview release notes (markdown)

We typically release a preview for the next major version each month. These are much the same as the monthly patches; however, they will not include CVE information until the new major release is supported (starting with RC1).

Examples:

- [.NET 9 Preview 1](./9.0/preview/preview1/README.md)
- [.NET 9 Preview 6](./9.0/preview/preview6/README.md)

These markdown files are primarily composed of dense feature descriptions. This content is used as source material for [What's New](https://learn.microsoft.com/dotnet/core/whats-new/dotnet-9/overview) pages in official Microsoft docs, which are [often updated](https://github.com/dotnet/docs/pulls?q=is%3Apr+What%27s+New) on the same day as a preview release.

Preview release notes are always in a `preview` folder. This approach was adopted so that preview releases do not distract from stable releases once preview releases are no longer relevant.

## Releases Index (json)

The `releases-index.json` file is the entrypoint into all other JSON files. This file is relatively small, about a dozen lines per major version. The file includes support phase, latest version, and whether the latest version included CVE fixes.

- File: [`releases-index.json`](./releases-index.json)
- Schema: [`dotnet-releases-index.json`](https://json.schemastore.org/dotnet-releases-index.json)

The following example demonstrates a version object from the file.

```json
{
"channel-version": "8.0",
"latest-release": "8.0.7",
"latest-release-date": "2024-07-09",
"security": true,
"latest-runtime": "8.0.7",
"latest-sdk": "8.0.303",
"product": ".NET",
"support-phase": "active",
"eol-date": "2026-11-10",
"release-type": "lts",
"releases.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/releases.json",
"supported-os.json": "https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/8.0/supported-os.json"
}
```

Each version object includes links to more detailed release-specific information.

The links are to a blob storage location, not to GitHub. We chose the blog storage links as the default because we knew some users were using the JSON files from within Azure and we also better understood the reliability characteristics of Azure.

`releases-index.json` and all the files it references are stored in blob storage and in GitHub. It is straightforward to programmatically transform the [blob storage links](https://dotnetcli.blob.core.windows.net/dotnet/release-metadata/releases-index.json) to [`raw` GitHub links](https://raw.githubusercontent.com/dotnet/core/main/release-notes/releases-index.json) should that be desired.

## Releases (json)

The `releases.json` file contains expansive release information for the life of a major release. It includes much the same information as the Monthly and preview markdown release notes.

Examples:

- [.NET 8 `releases.json`](./8.0/releases.json)
- [.NET 9 `releases.json`](./9.0/releases.json)

These files can grow to be quite large. We are considering producing release-specific versions of this file, for example for `8.0/8.0.1/release.json`.

## Supported OS (json and markdown)

Supported OS information is published for each release. This information indicates to users which OSes they can expect an app (or the .NET SDK) to run on for a given .NET version. It also indicates which OSes are supported and when they transitioned to EOL status.

Examples:

- [.NET 8 Supported OSes (json)](./8.0/supported-os.json)
- [.NET 8 Supported OSes (markdown)](./8.0/supported-os.md)
- [.NET 9 Supported OSes (json)](./9.0/supported-os.json)
- [.NET 9 Supported OSes (markdown)](./9.0/supported-os.md)

## OS packages (json and markdown)

OS package information is published for each release. This information indicates which packages must be installed on a given distro for a .NET app (or the .NET SDK) to run. [.NET packages](../linux.md) are available for multiple distros, which automatically install all required packages

Examples:

- [.NET 9 OS packages (json)](./9.0/os-packages.json)
- [.NET 9 OS packages (markdown)](./9.0/os-packages.md)

Schema: [dotnet-requires-packages](./schemas/dotnet-os-packages.json)
2 changes: 1 addition & 1 deletion release-notes/license-information.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# License information for release notes

Release notes include detailed information that may be useful in other forums or mediums, such as blogs, courses, or videos. The release notes are in markdown format, enabling flexible re-use. Starting with .NET 9, you will find more detailed release notes.
Release notes include detailed information that may be useful in other forums or mediums, such as blogs, courses, or videos. The release notes are in markdown and JSON formats.

The [dotnet/core](https://github.com/dotnet/core) repo uses the [MIT license](../LICENSE.TXT). You are free to use release note content under that license.

192 changes: 192 additions & 0 deletions release-notes/schemas/dotnet-os-packages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
{
"description": "The set of packages required by a given product version for a set of distros.",
"type": [
"object",
"null"
Copy link
Member

Choose a reason for hiding this comment

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

What does this null stuff even mean for the type? Does that mean its nullable? How would that be represented in the JSON? Is it applicable in all cases?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know how that works. @eiriktsarpalis can likely explain.

Copy link
Member

Choose a reason for hiding this comment

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

It means that the underlying .NET type is a reference type and reflects the fact that the serializer will accept null JSON values when deserializing. There was a long debate as to whether we should be exposing null in the schema and ultimately we chose correctness over conciseness.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Requiredness and nullability are orthogonal traits. This is true both in JSON schema and in C# semantics where you can have required fields that are nullable.

Copy link
Member

@eiriktsarpalis eiriktsarpalis Jul 19, 2024

Choose a reason for hiding this comment

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

You can have nullable parameters that are required:

record MyRecord(string? value);

Conversely, you can have non-nullable parameters that are optional, e.g.

record MyRecord(string value = "default");

Or you can combine both traits into one schema:

record MyRecord(string? value = "default");

Copy link
Member Author

Choose a reason for hiding this comment

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

I get it now. It's not exactly intuitive, but I guess it makes sense. In any case, your suggested pattern works. Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

This PR doesn't include the code that was used to generate this schema, correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

],
"properties": {
"channel-version": {
"description": "Major (or major.minor) version of product.",
"type": "string"
},
"packages": {
"description": "Set of nominal packages used by product, with descriptions.",
"type": "array",
"items": {
"description": "A nominal package is a distro-agnostic representation of a package, including the scenarios for which the package is required. A nominal package will be referenced by a distribution package, with a distribution-specific package name.",
"type": [
"object",
"null"
],
"properties": {
"id": {
"description": "ID of nominal package.",
"type": "string"
},
"name": {
"description": "Display name of nominal package.",
"type": "string"
},
"required-scenarios": {
"description": "Required scenarios for which the package must be used.",
"type": "array",
"items": {
"description": "Scenarios relating to package dependencies. \u0027All\u0027 includes both CoreCLR and NativeAOT while \u0027Runtime\u0027 is intended to cover CoreCLR, only.",
"enum": [
"all",
"runtime",
"https",
"cryptography",
"globalization",
"kerberos"
]
}
},
"min-version": {
"description": "Minimum required version of library.",
"type": [
"string",
"null"
],
"default": null
},
"references": {
"description": "Related references.",
"type": [
"array",
"null"
],
"items": {
"type": [
"string",
"null"
]
},
"default": null
}
},
"required": [
"id",
"name",
"required-scenarios"
]
}
},
"distributions": {
"description": "Set of distributions where the product can be used.",
"type": "array",
"items": {
"description": "An operating system distribution, with required package install commands and specific packages for distribution releases.",
"type": [
"object",
"null"
],
"properties": {
"name": {
"description": "Name of the distribution, matching ID in /etc/os-release, however, the expectation is that this value starts with a capital letter (proper noun).",
"type": "string"
},
"install-commands": {
"description": "Commands required to install packages within the distribution.",
"type": "array",
"items": {
"description": "A command to be run to install packages",
"type": [
"object",
"null"
],
"properties": {
"run-under-sudo": {
"description": "Whether the command needs to be run under sudo.",
"type": "boolean"
},
"command-root": {
"description": "The command to be run, like apt.",
"type": "string"
},
"command-parts": {
"description": "The command parts or arguments that need to be used.",
"type": [
"array",
"null"
],
"items": {
"type": [
"string",
"null"
]
},
"default": null
}
},
"required": [
"run-under-sudo",
"command-root"
]
}
},
"releases": {
"description": "Releases for that distribution.",
"type": "array",
"items": {
"description": "A distribution release with a list of packages to install.",
"type": [
"object",
"null"
],
"properties": {
"name": {
"description": "The name of the release, matching PRETTY_NAME in /etc/os-release.",
"type": "string"
},
"release": {
"description": "The version number for the release, matching VERSION_ID in /etc/os-release.",
"type": "string"
},
"packages": {
"type": "array",
"items": {
"description": "A distro archive package to install, with a reference to a logical package with more information.",
"type": [
"object",
"null"
],
"properties": {
"id": {
"description": "Reference to nominal package ID, providing access to required scenarios and other information.",
"type": "string"
},
"name": {
"description": "Package name in the distro archive.",
"type": "string"
}
},
"required": [
"id",
"name"
]
}
}
},
"required": [
"name",
"release",
"packages"
]
}
}
},
"required": [
"name",
"install-commands",
"releases"
]
}
}
},
"required": [
"channel-version",
"packages",
"distributions"
]
}