-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Conversation
Here's a demo of one way the JSON format can be used. $ docker run --rm -it ubuntu:24.04
root@243a281eaab7:/# curl -s https://raw.githubusercontent.com/dotnet/core/linux-packages/release-notes/9.0/linux-packages.json | jq -r .distributions[2].releases[1].packages[0:7][].name | xargs echo
libc6 libgcc-s1 ca-certificates libssl3t64 libstdc++6 libicu74 tzdata
root@243a281eaab7:/# apt install $(curl -s https://raw.githubusercontent.com/dotnet/core/linux-packages/release-notes/9.0/linux-packages.json | jq -r .distributions[2].releases[1].packages[0:7][].name | xargs echo)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libc6 is already the newest version (2.39-0ubuntu8.2).
libgcc-s1 is already the newest version (14-20240412-0ubuntu1).
ca-certificates is already the newest version (20240203).
ca-certificates set to manually installed.
libssl3t64 is already the newest version (3.0.13-0ubuntu3.1).
libstdc++6 is already the newest version (14-20240412-0ubuntu1).
The following NEW packages will be installed:
libicu74 tzdata
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 11.1 MB of archives.
After this operation, 38.5 MB of additional disk space will be used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My expectation is that this file would eventually be used as the source for generating more than just the release markdown file.
For other reviewers: what is being proposed here is essentially an implementation of #5646 which is part of a larger epic: #5651. There are a multitude of areas that need to derive this dependency data (read about them in the #5651 epic).
I'm fine with constraining the scope here for now to just target the release markdown files.
I'm wondering if now is a good time to rename these files as required-packages.json or runtime-deps.json or similar.
I don't have too much of an opinion here other than to say the naming should be specific to Linux and not Windows since that's the scope of this file. My schema in #5646 had attempted to combine Linux and Windows dependencies with a combined description but, looking back, it seemed unnecessary and made things ugly. If we ever want to describe Windows dependencies, that should be done in a separate file with its own schema.
I really just meant that it would be good to have the option to include FreeBSD (and the like) in this list. I agree that including Windows is a step too far. Also, the product doesn't have dependencies on macOS or Windows. Yes, there are other opportunities to use dependency lists. One of the things I learned from my other efforts is that generating markdown is sufficient for validating the schema and ensuring that the data is maintained. |
Co-authored-by: Matt Thalman <[email protected]>
This comment was marked as off-topic.
This comment was marked as off-topic.
Good question for @leecow. |
Co-authored-by: Matt Thalman <[email protected]>
This comment was marked as off-topic.
This comment was marked as off-topic.
I added a new core/release-notes/9.0/os-packages.json Line 40 in 3a8b35f
FYI: There still needs to be an issue posts on this OpenSSL min-version change. This PR isn't the disclosure / public conversation for that. I intend to merge this PR as-is and see where there process goes. |
This comment was marked as off-topic.
This comment was marked as off-topic.
I plan to merge this PR on Monday. |
] | ||
}, | ||
{ | ||
"name": "Debian", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of Debian 11 made me realize that this content should be in sync with https://github.com/dotnet/core/blob/main/release-notes/9.0/supported-os.json. In other words, one could imagine a validation script that checks that all the distros listed here can be cross-referenced to supported-os.json. I see that supported-os.json has both an id
and name
for each distro. What's the need for both? Should this file reference by id
instead?
Similarly for the release, you list a friendly name like Debian 12 (Bookworm)
. Why is that detailed information presented here (for a file that is package-centric) when that information isn't even contained in supported-os.json? Really, I see that information as being superfluous. You just need to know the distro id/name and version. In fact, I would argue that release
should be renamed to version
to more clearly indicate the relationship between these two files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The friendly name is so that it is easy to generate markdown. Certainly, we could use the following implementation: $"{distro} {version}". I like having the codenames in the markdown since we use both the version numbers and codenames in different parts of our infra. It also enables a long distro name like "Red Hat Enterprise Linux", which doesn't fit very nicely in an "id" field.
In the other file, the id
field can be thought of as endoflifedate-id
. Those values match what endoflife.date uses: https://endoflife.date/. The tools we wrote query that database extensively. The name
field is what is used in the generated markdown.
Excellent point on keeping in sync. I'm going to be writing some more tools related to staying in sync. That's a good scenario to include.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't published a schema for supported-os.json
yet. I'll make sure the connection with endoflife.date is documented.
Co-authored-by: Matt Thalman <[email protected]>
On FreeBSD we have |
@arrowd -- I don't think that will be a problem. The nominal packages list is intended to be a superset view of packages. Each distro then is able to subscribe to that list, with a partial or full set. When the markdown is generated, it uses the distro packages only. So, I think the scheme already works as you need. Feel free to contribute to FreeBSD packages and I think it will just work. On |
Sure, I'll try to find time for a follow-up after this PR lands. |
We have a packages file in markdown format currently. The JSON file is intended to be the source of truth and to be used to generate the markdown file (proposal in place for both formats).
I made a few design choices:
The intent is that any distro can be added here. NuGet packages are missing. We can add those, too.
I started with .NET 9 to prove out the idea. Adding the other .NET versions is trivial since the packages are all the same. The only difference is that the distro versions may fully, partially or not at all overlap. It's another example of a historical document.
I named this
linux-packages.json
to matchlinux-packages.md
. It would be good to add platforms like FreeBSD here, too. I'm wondering if now is a good time to rename these files asrequired-packages.json
orruntime-deps.json
or similar.Note: Here is a very similar past effort: https://github.com/dotnet/core/blob/main/release-notes/6.0/runtime-deps.json
@mthalman @ashnaga @Falco20019 @omajid @leecow