Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: c0c04ca1d380
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 528c6ac8eac7
Choose a head ref
  • 11 commits
  • 8 files changed
  • 1 contributor

Commits on Jan 6, 2017

  1. 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>
    aszlig committed Jan 6, 2017
    Configuration menu
    Copy the full SHA
    c469816 View commit details
    Browse the repository at this point in the history
  2. 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>
    aszlig committed Jan 6, 2017
    Configuration menu
    Copy the full SHA
    17d464b View commit details
    Browse the repository at this point in the history
  3. 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>
    aszlig committed Jan 6, 2017
    Configuration menu
    Copy the full SHA
    8e861d2 View commit details
    Browse the repository at this point in the history
  4. 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>
    aszlig committed Jan 6, 2017
    Configuration menu
    Copy the full SHA
    2b00955 View commit details
    Browse the repository at this point in the history
  5. 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>
    aszlig committed Jan 6, 2017
    Configuration menu
    Copy the full SHA
    a8952b1 View commit details
    Browse the repository at this point in the history

Commits on Jan 14, 2017

  1. 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>
    aszlig committed Jan 14, 2017
    Configuration menu
    Copy the full SHA
    c97a18a View commit details
    Browse the repository at this point in the history
  2. 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>
    aszlig committed Jan 14, 2017
    Configuration menu
    Copy the full SHA
    3ed7602 View commit details
    Browse the repository at this point in the history

Commits on Jan 15, 2017

  1. 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>
    aszlig committed Jan 15, 2017
    Configuration menu
    Copy the full SHA
    135f831 View commit details
    Browse the repository at this point in the history
  2. 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>
    aszlig committed Jan 15, 2017
    Configuration menu
    Copy the full SHA
    e2a2448 View commit details
    Browse the repository at this point in the history
  3. 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>
    aszlig committed Jan 15, 2017
    Configuration menu
    Copy the full SHA
    74a45d7 View commit details
    Browse the repository at this point in the history
  4. 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>
    aszlig committed Jan 15, 2017
    Configuration menu
    Copy the full SHA
    528c6ac View commit details
    Browse the repository at this point in the history