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.3 vmTools diskImage #31801

Merged
merged 1 commit into from Nov 23, 2017

Conversation

bhipple
Copy link
Contributor

@bhipple bhipple commented Nov 18, 2017

Motivation for this change

I'm looking to start building Nix RPMs for CentOS. I've been studying the work of @abbradar here and, in an effort to learn more about the qemu build tools Nix provides and their interaction with RPM builds I packaged this up and tested it.

nix-repl> :b pkgs.vmTools.runInLinuxImage (pkgs.runCommand "echo-release" { diskImage = pkgs.vmTools.diskImages.centos73x86_64; } "cat /etc/redhat-release ")

building '/nix/store/i4l9ff2df2xlkcg2mppvap4myzwf485j-echo-release.drv'...
Formatting '/tmp/nix-build-echo-release.drv-0/disk-image.qcow2', fmt=qcow2 size=4294967296 backing_file=/nix/store/pqlkwpjq9ib7mm4zm5vym0pak8cngrnh-centos-7.3-x86_64/disk-image.qcow2 cluster_s
<snip>
CentOS Linux release 7.3.1611 (Core)
[    0.656767] reboot: Power down

And testing with a patchelf build (after modifying its release.nix to have this attribute):

$ nix-build -I nixpkgs=/home/bhipple/src/nixpkgs release.nix -A rpm_centos73x86_64
$ tree result/rpms
result/rpms
└── centos-7.3-x86_64
    ├── patchelf-0.10pre1234_abcdef-1.src.rpm
    ├── patchelf-0.10pre1234_abcdef-1.x86_64.rpm
    └── patchelf-debuginfo-0.10pre1234_abcdef-1.x86_64.rpm

If there's anything else I should test let me know!

Not related to this PR, but ideally I'd also like to add CentOS 7.4, but it appears that the upstream project keeps the latest release at http://mirror.centos.org and doesn't archive them into the permanent vault location until the following release comes out, so if I put a link to 7.4 it'll eventually end up like this. Perhaps someone who knows more about the CentOS release schedule can enlighten me?

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.

This commit adds the CentOS 7.3 base image from the CentOS vault, for use with
building RPMs or evaluating Nix expressions.
@grahamc grahamc merged commit 1f0a09f into NixOS:master Nov 23, 2017
@bhipple bhipple deleted the centos-7.3-vmtools-image branch November 28, 2017 03:57
@bhipple bhipple mentioned this pull request Dec 3, 2017
8 tasks
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