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

Init Centos 7.4 vmTools diskImage #32278

Merged
merged 1 commit into from Dec 4, 2017

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Dec 3, 2017

This commit adds the CentOS 7.4 base image from the CentOS mirror, for use with
building RPMs or evaluating Nix expressions in a CentOS image.

When CentOS 7.5 comes out, I will swap this URL to the permanently vaulted image.

Motivation for this change

Would like to get Nix tools building on the latest stable CentOS release for use in enterprise environments.

See related:
#31801
NixOS/nix#1141

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

λ brh vm →  nix-build -I nixpkgs=/home/bhipple/src/nixpkgs -K -E 'with import <nixpkgs> { }; pkgs.vmTools.runInLinuxImage (pkgs.runCommand "rel" { diskImage = pkgs.vmTools.diskImages.centos74x86_64; } "cat  /etc/redhat-release" )'
these derivations will be built:
  /nix/store/njqjsdb1n9iaj2fwpbmi0yaz67lwhz8q-rel.drv
building '/nix/store/njqjsdb1n9iaj2fwpbmi0yaz67lwhz8q-rel.drv'...
Formatting '/build/disk-image.qcow2', fmt=qcow2 size=4294967296 backing_file=/nix/store/7la80fwry803z5y8r7564vzln0aynavw-centos-7.4-x86_64/disk-image.qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16
loading kernel modules...
[    0.439143] EXT4-fs (vda): couldn't mount as ext3 due to feature incompatibilities
mounting Nix store...
mounting host's temporary directory...
starting stage 2 (/nix/store/awj1ykj7kcijxcq6csinp6ly08amh6q2-vm-run-stage2)
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
**CentOS Linux release 7.4.1708 (Core)**
[    0.607279] reboot: Power down
/nix/store/j2vz24k5d0kid261s5w7hhkjkx7zr8kw-rel

This commit adds the CentOS 7.4 base image from the CentOS mirror, for use with
building RPMs or evaluating Nix expressions in a CentOS image.

When CentOS 7.5 comes out, I will swap this URL to the permanently vaulted image.
name = "centos-7.4-x86_64";
fullName = "CentOS 7.4 (x86_64)";
# N.B. Switch to vault.centos.org when the next release comes out
urlPrefix = http://mirror.centos.org/centos-7/7.4.1708/os/x86_64;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what the NixPkg convention is for handling these sorts of things is. When CentOS > 7.4 comes out, this URL is going to be moved to their permanent vault; and even though this upstream image is immutable they haven't put it in the vault yet, because it's the most recent snapshot release.

When it does move I can update the pkg expression, but older checkouts of NixPkgs will be broken. Is that an OK compromise or should we let this PR sit until we have a vaulted url in ~1 year?

Copy link
Member

Choose a reason for hiding this comment

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

I actually made this change as well during the weekend.

I think it is fine to keep this url because a) its the only option currently and b) urls sometimes simply break and need to be replaced. We do not and can not expects resources to be forever available.

name = "centos-7.4-x86_64";
fullName = "CentOS 7.4 (x86_64)";
# N.B. Switch to vault.centos.org when the next release comes out
urlPrefix = http://mirror.centos.org/centos-7/7.4.1708/os/x86_64;
Copy link
Member

Choose a reason for hiding this comment

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

I actually made this change as well during the weekend.

I think it is fine to keep this url because a) its the only option currently and b) urls sometimes simply break and need to be replaced. We do not and can not expects resources to be forever available.

@FRidh FRidh merged commit 2766291 into NixOS:master Dec 4, 2017
@bhipple bhipple deleted the centos-7.4-vmtools.image branch February 24, 2018 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants