-
-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
iso-image: normalize volumeID #83551
Conversation
This is per the advice of the osinfo-db maintainers https://gitlab.com/libosinfo/osinfo-db/-/merge_requests/107#note_313094852
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.
Looking good:+1:
Are we be able to distinguish unstable from release? If I understand correctly, current unstable has version == 20.09
.
Would be nice if someone (@wkennington?) checked whether #2838 is still a problem. Looking at the other ISOs in osinfo-db it probably shouldn't be.
nixos/modules/installer/cd-dvd/installation-cd-graphical-plasma5-new-kernel.nix
Outdated
Show resolved
Hide resolved
I think the issue with windows will be fixed with using the joliet extension. |
69081e3
to
48168d0
Compare
The volumeID will now be in the format of: nixos-$EDITON-$RELEASE-$ARCH an example for the minimal image would look like: nixos-minimal-20.09-x86-64-linux
Installation in virt-manager working fine:) |
I made a vm in gnome-boxes. I'll see if I can install nixos to a usb and windows and start it eventually, since there was the issue in #2838. |
Looking at the wiki page Volume Identifier is |
I guess a regex would work for this. Does it not support the dash? |
No it does not: https://wiki.osdev.org/ISO_9660#String_format Maybe implementations follow Postel’s law but if the wiki is correct, we can only use |
Perhaps https://wiki.osdev.org/ISO_9660#Rock_Ridge_and_Joliet has something to do with it. I see there's various improvements and extensions. For that matter, I see fedora has volume id's with dashes https://gitlab.com/libosinfo/osinfo-db/-/blob/master/data/os/fedoraproject.org/fedora-31.xml.in#L36. So perhaps there's something we're missing here. |
It seems ubuntu even has spaces https://gitlab.com/libosinfo/osinfo-db/-/blob/master/data/os/ubuntu.com/ubuntu-19.04.xml.in#L37 so maybe that documentation isn't an account of improvements |
Briefly looking at the ECMA document, it looks like the Joliet format only adds enhanced volume descriptor, which mainly loosens the file and directory identifiers but not the volume identifier. |
Not sure if this part of the standard is mostly ignored or Joliet/Rockridge relaxes the constraint but it seems minority of the ISOs found in osinfo-db conform:
(Ok, the content of the tag can be regex, but still only a minority are actual Also from
|
Actually, I was reading the ECMA doc wrong. The Volume Identifier described in 8.4.6 is only relevant for Primary Volume Descriptor. Joliet’s Enhanced Volume Descriptor has its Volume Identifier described in section 8.5.5, which specifies it as
So if I am reading it right, we are indeed not limited by character range in Joliet format, only by the 32 byte size of the field. |
@jtojnar Great, thank you for the research. This kind of PR is one that could go wrong in the worst ways without it. |
Motivation for this change
The volumeID of nixos images will now be in the format of:
We're trying to get nixos into osinfo-db, see https://gitlab.com/libosinfo/osinfo-db/-/merge_requests/107 and https://gitlab.com/libosinfo/osinfo-db/-/merge_requests/107#note_313094852 as motivation.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)