Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

xen_4_10: drop

+3 -373
-16
pkgs/applications/virtualization/xen/0000-fix-install-python.4.10.patch
··· 1 - tools/python/install-wrap script brakes shebangs patching, disable 2 - 3 - diff --git a/tools/Rules.mk b/tools/Rules.mk 4 - index 87a56dc..a7da869 100644 5 - --- a/tools/Rules.mk 6 - +++ b/tools/Rules.mk 7 - @@ -90,8 +90,7 @@ CFLAGS += $(CFLAGS-y) 8 - 9 - CFLAGS += $(EXTRA_CFLAGS_XEN_TOOLS) 10 - 11 - -INSTALL_PYTHON_PROG = \ 12 - - $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG) 13 - +INSTALL_PYTHON_PROG = $(INSTALL_PROG) 14 - 15 - %.opic: %.c 16 - $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) $(CFLAGS_$*.opic) -fPIC -c -o $@ $< $(APPEND_CFLAGS)
-27
pkgs/applications/virtualization/xen/0000-fix-ipxe-src.4.10.patch
··· 1 - hack to make etherboot use prefetched ipxe 2 - 3 - diff --git a/tools/firmware/etherboot/Makefile b/tools/firmware/etherboot/Makefile 4 - index a0578d2..64428a0 100644 5 - --- a/tools/firmware/etherboot/Makefile 6 - +++ b/tools/firmware/etherboot/Makefile 7 - @@ -16,6 +16,7 @@ IPXE_TARBALL_URL ?= $(XEN_EXTFILES_URL)/ipxe-git-$(IPXE_GIT_TAG).tar.gz 8 - 9 - D=ipxe 10 - T=ipxe.tar.gz 11 - +G=ipxe.git 12 - 13 - ROMS = $(addprefix $D/src/bin/, $(addsuffix .rom, $(ETHERBOOT_NICS))) 14 - 15 - @@ -36,9 +37,9 @@ $T: 16 - fi 17 - mv _$T $T 18 - 19 - -$D/src/arch/i386/Makefile: $T Config 20 - - rm -rf $D 21 - - gzip -dc $T | tar xf - 22 - +$D/src/arch/i386/Makefile: $G Config 23 - + mkdir $D 24 - + cp -a $G/* $D 25 - for i in $$(cat patches/series) ; do \ 26 - patch -d $D -p1 --quiet <patches/$$i || exit 1 ; \ 27 - done
-36
pkgs/applications/virtualization/xen/0004-makefile-use-efi-ld.4.10.patch
··· 1 - diff -Naur xen-4.10.4-orig/xen/arch/x86/Makefile xen-4.10.4-patched/xen/arch/x86/Makefile 2 - --- xen-4.10.4-orig/xen/arch/x86/Makefile 2019-07-04 01:28:50.000000000 +1000 3 - +++ xen-4.10.4-patched/xen/arch/x86/Makefile 2020-03-03 13:32:34.607951507 +1100 4 - @@ -166,7 +166,7 @@ 5 - # Check if the compiler supports the MS ABI. 6 - export XEN_BUILD_EFI := $(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CFLAGS)) -c efi/check.c -o efi/check.o 2>/dev/null && echo y) 7 - # Check if the linker supports PE. 8 - -XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y)) 9 - +XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(EFI_LD) -mi386pep --subsystem=10 -o efi/check.efi efi/check.o 2>/dev/null && echo y)) 10 - CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI 11 - 12 - $(TARGET).efi: VIRT_BASE = 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's, A VIRT_START$$,,p') 13 - @@ -188,20 +188,20 @@ 14 - 15 - $(TARGET).efi: prelink-efi.o $(note_file) efi.lds efi/relocs-dummy.o $(BASEDIR)/common/symbols-dummy.o efi/mkreloc 16 - $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ 17 - - $(guard) $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< efi/relocs-dummy.o \ 18 - + $(guard) $(EFI_LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< efi/relocs-dummy.o \ 19 - $(BASEDIR)/common/symbols-dummy.o $(note_file) -o $(@D)/.$(@F).$(base).0 &&) : 20 - $(guard) efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).0) >$(@D)/.$(@F).0r.S 21 - $(guard) $(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).0 \ 22 - | $(guard) $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s.S 23 - $(guard) $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o 24 - $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ 25 - - $(guard) $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \ 26 - + $(guard) $(EFI_LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \ 27 - $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file) -o $(@D)/.$(@F).$(base).1 &&) : 28 - $(guard) efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).1) >$(@D)/.$(@F).1r.S 29 - $(guard) $(NM) -pa --format=sysv $(@D)/.$(@F).$(VIRT_BASE).1 \ 30 - | $(guard) $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s.S 31 - $(guard) $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o 32 - - $(guard) $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \ 33 - + $(guard) $(EFI_LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \ 34 - $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file) -o $@ 35 - if $(guard) false; then rm -f $@; echo 'EFI support disabled'; \ 36 - else $(NM) -pa --format=sysv $(@D)/$(@F) \
-35
pkgs/applications/virtualization/xen/0005-makefile-fix-efi-mountdir-use.4.10.patch
··· 1 - EFI_MOUNTPOINT is conventionally /boot/efi or /boot/EFI or something 2 - like that, and (on my machine) has directories within that called 3 - {Boot, nixos, gummiboot}. 4 - 5 - This patch does two things: 6 - 7 - 1) Xen apparently wants to put files in 8 - $(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR) - we remove the duplicate 'efi' name 9 - because I can't see why we have it 10 - 11 - 2) Ensures the said directory exists 12 - 13 - 14 - --- a/xen/Makefile 2016-01-08 01:50:58.028045657 +0000 15 - +++ b/xen/Makefile 2016-01-08 01:51:33.560268718 +0000 16 - @@ -49,7 +49,9 @@ 17 - ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi; \ 18 - ln -sf $(T)-$(XEN_FULLVERSION).efi $(D)$(EFI_DIR)/$(T).efi; \ 19 - if [ -n '$(EFI_MOUNTPOINT)' -a -n '$(EFI_VENDOR)' ]; then \ 20 - - $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \ 21 - + [ -d $(D)$(EFI_MOUNTPOINT)/$(EFI_VENDOR) ] || \ 22 - + $(INSTALL_DIR) $(D)$(EFI_MOUNTPOINT)/$(EFI_VENDOR) ;\ 23 - + $(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_MOUNTPOINT)/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi; \ 24 - elif [ "$(D)" = "$(patsubst $(shell cd $(XEN_ROOT) && pwd)/%,%,$(D))" ]; then \ 25 - echo 'EFI installation only partially done (EFI_VENDOR not set)' >&2; \ 26 - fi; \ 27 - @@ -69,7 +69,7 @@ 28 - rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi 29 - rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi 30 - rm -f $(D)$(EFI_DIR)/$(T).efi 31 - - rm -f $(D)$(EFI_MOUNTPOINT)/efi/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi 32 - + rm -f $(D)$(EFI_MOUNTPOINT)/$(EFI_VENDOR)/$(T)-$(XEN_FULLVERSION).efi 33 - 34 - .PHONY: _debug 35 - _debug:
-204
pkgs/applications/virtualization/xen/4.10.nix
··· 1 - { lib, callPackage, fetchurl, fetchpatch, fetchgit 2 - , ocaml-ng 3 - , withInternalQemu ? true 4 - , withInternalTraditionalQemu ? true 5 - , withInternalSeabios ? true 6 - , withSeabios ? !withInternalSeabios, seabios ? null 7 - , withInternalOVMF ? false # FIXME: tricky to build 8 - , withOVMF ? false, OVMF 9 - , withLibHVM ? true 10 - 11 - # xen 12 - , lvm2, ncurses, python2Packages 13 - 14 - # qemu 15 - , udev, pciutils, xorg, SDL, pixman, acl, glusterfs, spice-protocol, usbredir 16 - , alsa-lib, glib, python2 17 - , ... } @ args: 18 - 19 - assert withInternalSeabios -> !withSeabios; 20 - assert withInternalOVMF -> !withOVMF; 21 - 22 - with lib; 23 - 24 - # Patching XEN? Check the XSAs at 25 - # https://xenbits.xen.org/xsa/ 26 - # and try applying all the ones we don't have yet. 27 - 28 - let 29 - xsa = import ./xsa-patches.nix { inherit fetchpatch; }; 30 - 31 - qemuMemfdBuildFix = fetchpatch { 32 - name = "xen-4.8-memfd-build-fix.patch"; 33 - url = "https://github.com/qemu/qemu/commit/75e5b70e6b5dcc4f2219992d7cffa462aa406af0.patch"; 34 - sha256 = "0gaz93kb33qc0jx6iphvny0yrd17i8zhcl3a9ky5ylc2idz0wiwa"; 35 - }; 36 - 37 - qemuDeps = [ 38 - udev pciutils xorg.libX11 SDL pixman acl glusterfs spice-protocol usbredir 39 - alsa-lib glib python2 40 - ]; 41 - in 42 - 43 - callPackage (import ./generic.nix (rec { 44 - version = "4.10.4"; 45 - 46 - src = fetchurl { 47 - url = "https://downloads.xenproject.org/release/xen/${version}/xen-${version}.tar.gz"; 48 - sha256 = "0ipkr7b3v3y183n6nfmz7q3gnzxa20011df4jpvxi6pmr8cpnkwh"; 49 - }; 50 - 51 - # Sources needed to build tools and firmwares. 52 - xenfiles = optionalAttrs withInternalQemu { 53 - qemu-xen = { 54 - src = fetchgit { 55 - url = "https://xenbits.xen.org/git-http/qemu-xen.git"; 56 - # rev = "refs/tags/qemu-xen-${version}"; 57 - # use revision hash - reproducible but must be updated with each new version 58 - rev = "qemu-xen-${version}"; 59 - sha256 = "0laxvhdjz1njxjvq3jzw2yqvdr9gdn188kqjf2gcrfzgih7xv2ym"; 60 - }; 61 - buildInputs = qemuDeps; 62 - postPatch = '' 63 - # needed in build but /usr/bin/env is not available in sandbox 64 - substituteInPlace scripts/tracetool.py \ 65 - --replace "/usr/bin/env python" "${python2}/bin/python" 66 - ''; 67 - meta.description = "Xen's fork of upstream Qemu"; 68 - }; 69 - } // optionalAttrs withInternalTraditionalQemu { 70 - qemu-xen-traditional = { 71 - src = fetchgit { 72 - url = "https://xenbits.xen.org/git-http/qemu-xen-traditional.git"; 73 - # rev = "refs/tags/xen-${version}"; 74 - # use revision hash - reproducible but must be updated with each new version 75 - rev = "c8ea0457495342c417c3dc033bba25148b279f60"; 76 - sha256 = "0v5nl3c08kpjg57fb8l191h1y57ykp786kz6l525jgplif28vx13"; 77 - }; 78 - buildInputs = qemuDeps; 79 - patches = [ 80 - ]; 81 - postPatch = '' 82 - substituteInPlace xen-hooks.mak \ 83 - --replace /usr/include/pci ${pciutils}/include/pci 84 - ''; 85 - meta.description = "Xen's fork of upstream Qemu that uses old device model"; 86 - }; 87 - } // optionalAttrs withInternalSeabios { 88 - "firmware/seabios-dir-remote" = { 89 - src = fetchgit { 90 - url = "https://xenbits.xen.org/git-http/seabios.git"; 91 - rev = "f0cdc36d2f2424f6b40438f7ee7cc502c0eff4df"; 92 - sha256 = "1wq5pjkjrfzqnq3wyr15mcn1l4c563m65gdyf8jm97kgb13pwwfm"; 93 - }; 94 - patches = [ ./0000-qemu-seabios-enable-ATA_DMA.patch ]; 95 - meta.description = "Xen's fork of Seabios"; 96 - }; 97 - } // optionalAttrs withInternalOVMF { 98 - "firmware/ovmf-dir-remote" = { 99 - src = fetchgit { 100 - url = "https://xenbits.xen.org/git-http/ovmf.git"; 101 - rev = "173bf5c847e3ca8b42c11796ce048d8e2e916ff8"; 102 - sha256 = "07zmdj90zjrzip74fvd4ss8n8njk6cim85s58mc6snxmqqv7gmcr"; 103 - }; 104 - meta.description = "Xen's fork of OVMF"; 105 - }; 106 - } // { 107 - # TODO: patch Xen to make this optional? 108 - "firmware/etherboot/ipxe.git" = { 109 - src = fetchgit { 110 - url = "https://git.ipxe.org/ipxe.git"; 111 - rev = "356f6c1b64d7a97746d1816cef8ca22bdd8d0b5d"; 112 - sha256 = "15n400vm3id5r8y3k6lrp9ab2911a9vh9856f5gvphkazfnmns09"; 113 - }; 114 - meta.description = "Xen's fork of iPXE"; 115 - }; 116 - } // optionalAttrs withLibHVM { 117 - xen-libhvm-dir-remote = { 118 - src = fetchgit { 119 - name = "xen-libhvm"; 120 - url = "https://github.com/michalpalka/xen-libhvm"; 121 - rev = "83065d36b36d6d527c2a4e0f5aaf0a09ee83122c"; 122 - sha256 = "1jzv479wvgjkazprqdzcdjy199azmx2xl3pnxli39kc5mvjz3lzd"; 123 - }; 124 - buildPhase = '' 125 - make 126 - cd biospt 127 - cc -Wall -g -D_LINUX -Wstrict-prototypes biospt.c -o biospt -I../libhvm -L../libhvm -lxenhvm 128 - ''; 129 - installPhase = '' 130 - make install 131 - cp biospt/biospt $out/bin/ 132 - ''; 133 - meta = { 134 - description = '' 135 - Helper library for reading ACPI and SMBIOS firmware values 136 - from the host system for use with the HVM guest firmware 137 - pass-through feature in Xen''; 138 - license = licenses.bsd2; 139 - }; 140 - }; 141 - }; 142 - 143 - configureFlags = [] 144 - ++ optional (!withInternalQemu) "--with-system-qemu" # use qemu from PATH 145 - ++ optional (withInternalTraditionalQemu) "--enable-qemu-traditional" 146 - ++ optional (!withInternalTraditionalQemu) "--disable-qemu-traditional" 147 - 148 - ++ optional (withSeabios) "--with-system-seabios=${seabios}" 149 - ++ optional (!withInternalSeabios && !withSeabios) "--disable-seabios" 150 - 151 - ++ optional (withOVMF) "--with-system-ovmf=${OVMF.fd}/FV/OVMF.fd" 152 - ++ optional (withInternalOVMF) "--enable-ovmf"; 153 - 154 - env.NIX_CFLAGS_COMPILE = toString [ 155 - # Fix build on Glibc 2.24. 156 - "-Wno-error=deprecated-declarations" 157 - # Fix build with GCC 8 158 - "-Wno-error=maybe-uninitialized" 159 - "-Wno-error=stringop-truncation" 160 - "-Wno-error=format-truncation" 161 - "-Wno-error=array-bounds" 162 - # Fix build with GCC 9 163 - "-Wno-error=address-of-packed-member" 164 - "-Wno-error=format-overflow" 165 - "-Wno-error=absolute-value" 166 - # Fix build with GCC 10 167 - "-Wno-error=enum-conversion" 168 - "-Wno-error=zero-length-bounds" 169 - ]; 170 - 171 - patches = [ 172 - ./0000-fix-ipxe-src.4.10.patch 173 - ./0000-fix-install-python.4.10.patch 174 - ./0004-makefile-use-efi-ld.4.10.patch 175 - ./0005-makefile-fix-efi-mountdir-use.4.10.patch 176 - ]; 177 - 178 - postPatch = '' 179 - substituteInPlace tools/blktap2/lvm/lvm-util.c \ 180 - --replace /usr/sbin/vgs ${lvm2}/bin/vgs \ 181 - --replace /usr/sbin/lvs ${lvm2}/bin/lvs 182 - 183 - substituteInPlace tools/xenstat/Makefile \ 184 - --replace /usr/include/curses.h ${ncurses.dev}/include/curses.h 185 - 186 - # Avoid a glibc >= 2.25 deprecation warnings that get fatal via -Werror. 187 - sed 1i'#include <sys/sysmacros.h>' \ 188 - -i tools/blktap2/control/tap-ctl-allocate.c \ 189 - -i tools/libxl/libxl_device.c 190 - # Makefile didn't include previous PKG_CONFIG_PATH so glib wasn't found 191 - substituteInPlace tools/Makefile \ 192 - --replace 'PKG_CONFIG_PATH=$(XEN_ROOT)/tools/pkg-config' 'PKG_CONFIG_PATH=$(XEN_ROOT)/tools/pkg-config:$(PKG_CONFIG_PATH)' 193 - ''; 194 - 195 - passthru = { 196 - qemu-system-i386 = if withInternalQemu 197 - then "lib/xen/bin/qemu-system-i386" 198 - else throw "this xen has no qemu builtin"; 199 - }; 200 - 201 - })) ({ 202 - ocamlPackages = ocaml-ng.ocamlPackages_4_05; 203 - pythonPackages = python2Packages; 204 - } // args)
+3 -49
pkgs/applications/virtualization/xen/packages.nix
··· 6 6 # light] for each ./<version>.nix. 7 7 8 8 rec { 9 - xen_4_10-vanilla = callPackage ./4.10.nix { 10 - meta = { 11 - description = "vanilla"; 12 - longDescription = '' 13 - Vanilla version of Xen. Uses forks of Qemu and Seabios bundled 14 - with Xen. This gives vanilla experince, but wastes space and 15 - build time: typical NixOS setup that runs lots of VMs will 16 - build three different versions of Qemu when using this (two 17 - forks and upstream). 18 - ''; 19 - }; 20 - }; 21 - 22 - xen_4_10-slim = xen_4_10-vanilla.override { 23 - withInternalQemu = false; 24 - withInternalTraditionalQemu = true; 25 - withInternalSeabios = false; 26 - withSeabios = true; 27 - 28 - meta = { 29 - description = "slim"; 30 - longDescription = '' 31 - Slimmed-down version of Xen that reuses nixpkgs packages as 32 - much as possible. Different parts may get out of sync, but 33 - this builds faster and uses less space than vanilla. Use with 34 - `qemu_xen` from nixpkgs. 35 - ''; 36 - }; 37 - }; 38 - 39 - xen_4_10-light = xen_4_10-vanilla.override { 40 - withInternalQemu = false; 41 - withInternalTraditionalQemu = false; 42 - withInternalSeabios = false; 43 - withSeabios = true; 44 - 45 - meta = { 46 - description = "light"; 47 - longDescription = '' 48 - Slimmed-down version of Xen without `qemu-traditional` (you 49 - don't need it if you don't know what it is). Use with 50 - `qemu_xen-light` from nixpkgs. 51 - ''; 52 - }; 53 - }; 54 - 55 9 xen_4_15-vanilla = callPackage ./4.15.nix { 56 10 meta = { 57 11 description = "vanilla"; ··· 98 52 }; 99 53 }; 100 54 101 - xen-vanilla = xen_4_10-vanilla; 102 - xen-slim = xen_4_10-slim; 103 - xen-light = xen_4_10-light; 55 + xen-vanilla = xen_4_15-vanilla; 56 + xen-slim = xen_4_15-slim; 57 + xen-light = xen_4_15-light; 104 58 }
-6
pkgs/top-level/all-packages.nix
··· 26839 26839 # Building with `xen` instead of `xen-slim` is possible, but makes no sense. 26840 26840 qemu_xen = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen-slim; }); 26841 26841 qemu_xen-light = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen-light; }); 26842 - qemu_xen_4_10 = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen_4_10-slim; }); 26843 - qemu_xen_4_10-light = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen_4_10-light; }); 26844 26842 qemu_xen_4_15 = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen_4_15-slim; }); 26845 26843 qemu_xen_4_15-light = lowPrio (qemu.override { hostCpuOnly = true; xenSupport = true; xen = xen_4_15-light; }); 26846 26844 ··· 34549 34547 xen = xenPackages.xen-vanilla; 34550 34548 xen-slim = xenPackages.xen-slim; 34551 34549 xen-light = xenPackages.xen-light; 34552 - 34553 - xen_4_10 = xenPackages.xen_4_10-vanilla; 34554 - xen_4_10-slim = xenPackages.xen_4_10-slim; 34555 - xen_4_10-light = xenPackages.xen_4_10-light; 34556 34550 34557 34551 xen_4_15 = xenPackages.xen_4_15-vanilla; 34558 34552 xen_4_15-slim = xenPackages.xen_4_15-slim;