Comparing changes
Open a pull request
base repository: NixOS/nixpkgs
base: c0c04ca1d380
head repository: NixOS/nixpkgs
compare: 528c6ac8eac7
- 11 commits
- 8 files changed
- 1 contributor
Commits on Jan 6, 2017
-
nixos/storage: Generate UUID for each device spec
We want to have deterministic UUIDs for every device specification in order to avoid the need to manually set labels all over the place. Of course, we could internally set labels instead of precomputing UUIDs, but labels have different length restrictions for every file system (for example XFS has a maximum of 12 bytes, for ext4 it's 16 bytes). In addition to that we remove the ability for people to set their own labels during runtime. The UUIDs generated here are based on version 5: https://tools.ietf.org/html/rfc4122#section-4.1.3 Our variant deviates from this a bit in that we use string concatenation to build up the input for the SHA1 hash instead of binaries. The results however are pretty much the same and in our part the most important aspect is determinism rather than having a truly unique value across the whole planet. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for c469816 - Browse repository at this point
Copy the full SHA c469816View commit details -
nixos/storage: Switch to a new mkDeviceSpecOption
Having just a single type for a device specification doesn't work out well if we want to have an apply function, which we do want, because it makes more sense if we want to resolve such a device specification without using builtins.match all over the place. It also improves a lot in readability of the option descriptions, because every such option now has not only a description of what a device specification is but also lists the valid types for the device specification. This has another advantage that instead for something like the following: Type: list of device specification of <type>.<name>s The type description is now just: Type: list of device specifications We're also heading for more consistency, speaking about "device specification" or shortly "devspec". Say if we have something like "storage.foo.bar", "foo.bar" is the "device specification" and "foo" is the "device specification type" and "bar" is the "device specification name". Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for 17d464b - Browse repository at this point
Copy the full SHA 17d464bView commit details -
nixos/storage: Make devspec an attrset internally
So far we passed the device specification as-is to nixpart, but from within the module system it's quite tricky to validate or look up such a string, because we need to parse it every time we need to do a look up an a configuration value in "storage.*". Now a device specification is an attribute set consisting of a `name' and a `type' attribute. We also have a new applyTypeContainer attribute we need to pass to mkDeviceSpecOption so that we can properly convert things such as "listOf devspecType" into a list of valid internal representations of device specifications. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for 8e861d2 - Browse repository at this point
Copy the full SHA 8e861d2View commit details -
nixos/storage/lib: Propagate devspec's config
This is handy if we want to look up configuration options for a specific device specification, so with only the internal representation of a devspec we can simply say devspec.uuid to get a generated UUID. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for 2b00955 - Browse repository at this point
Copy the full SHA 2b00955View commit details -
nixos/storage: Integrate storage UUIDs in fs/swaps
This implements the deterministically generated UUIDs to be used while mounting file systems, but only if there is no label set already. So the user still has a way to set labels (which are also applied by nixpart) and use them accordingly, even though the UUIDs should be more distincive. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for a8952b1 - Browse repository at this point
Copy the full SHA a8952b1View commit details
Commits on Jan 14, 2017
-
nixos/storage: Don't put whole config in devspec
While it may be handy to put the whole configuration of the corresponding device specification into the values of the options referring to them, this unfortunately blows up the size of the JSON output we pass to nixpart. This is unnecessary because we're only interested in the UUID. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for c97a18a - Browse repository at this point
Copy the full SHA c97a18aView commit details -
blivet: Add patch for setting UUIDs
I'm heading for a hybrid approach (using UUIDs and partition layout holes) in nixpart for achieving storage tree determinism, so we need to have support for setting UUIDs. Blivet currently doesn't yet support this, so I've implemented it. Upstream pull request: storaged-project/blivet#537 Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for 3ed7602 - Browse repository at this point
Copy the full SHA 3ed7602View commit details
Commits on Jan 15, 2017
-
nixos/tests/blivet: Add mtools and ntfs3g
These tools are needed in order to run tests for NTFS and for setting the serial of a FAT file system after it has been created. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for 135f831 - Browse repository at this point
Copy the full SHA 135f831View commit details -
blivet: Add patch to set NTFS formattable
Even though the ntfs3g utilities are available inside our test environment, the format didn't get advertised as formattable because the _formattable attribute wasn't set to True. Submitted upstream at: storaged-project/blivet#536 Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for e2a2448 - Browse repository at this point
Copy the full SHA e2a2448View commit details -
nixpart: Update to latest master version
Switches to using a dictionary for devspecs and supports setting UUIDs for every device specification (currently only sets RFC4122-style UUIDs). Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for 74a45d7 - Browse repository at this point
Copy the full SHA 74a45d7View commit details -
nixos/tests/storage/matchers: Remove labels
We no longer need to use labels now that every file system gets assigned an UUID in latest nixpart. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Configuration menu - View commit details
-
Copy full SHA for 528c6ac - Browse repository at this point
Copy the full SHA 528c6acView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff c0c04ca1d380...528c6ac8eac7