From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 07 17:04:00 2019 Received: (at submit) by debbugs.gnu.org; 7 Jan 2019 22:04:00 +0000 Received: from localhost ([127.0.0.1]:49029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggd04-0000D6-0h for submit@debbugs.gnu.org; Mon, 07 Jan 2019 17:04:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ggczz-0000Cr-GC for submit@debbugs.gnu.org; Mon, 07 Jan 2019 17:03:59 -0500 Received: from lists.gnu.org ([209.51.188.17]:57777) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ggczu-0006A1-D6 for submit@debbugs.gnu.org; Mon, 07 Jan 2019 17:03:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggczs-00064e-Pe for guix-patches@gnu.org; Mon, 07 Jan 2019 17:03:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggczr-00064h-9V for guix-patches@gnu.org; Mon, 07 Jan 2019 17:03:48 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:51938) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ggczq-00060Y-Vw for guix-patches@gnu.org; Mon, 07 Jan 2019 17:03:47 -0500 Received: from dayas.3.home (77.116.186.240.wireless.dyn.drei.com [77.116.186.240]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 6D63433601FC; Mon, 7 Jan 2019 23:03:44 +0100 (CET) From: Danny Milosavljevic To: guix-patches@gnu.org Subject: [PATCH] gnu: Add xen. Date: Mon, 7 Jan 2019 23:03:41 +0100 Message-Id: <20190107220341.24215-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 85.13.145.193 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: submit Cc: Danny Milosavljevic X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/virtualization.scm (xen): New variable. --- gnu/packages/virtualization.scm | 214 ++++++++++++++++++++++++++++++++ 1 file changed, 214 insertions(+) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualizatio= n.scm index 274f827cd..839e08def 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -29,17 +29,22 @@ (define-module (gnu packages virtualization) #:use-module (gnu packages) #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) #:use-module (gnu packages attr) #:use-module (gnu packages autotools) #:use-module (gnu packages bison) #:use-module (gnu packages check) + #:use-module (gnu packages cmake) #:use-module (gnu packages compression) + #:use-module (gnu packages cross-base) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) #:use-module (gnu packages disk) #:use-module (gnu packages dns) #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) + #:use-module (gnu packages figlet) + #:use-module (gnu packages firmware) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages gettext) @@ -70,6 +75,7 @@ #:use-module (gnu packages textutils) #:use-module (gnu packages tls) #:use-module (gnu packages web) + #:use-module (gnu packages wget) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -1058,3 +1064,211 @@ and the user can specify exactly what parts of th= e filesystem should be visible in the sandbox. Any such directories specified is mounted nodev by defa= ult, and can be made readonly.") (license license:lgpl2.0+))) + +;; TODO: "make world" +(define-public xen + (package + (name "xen") + (version "4.11.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "git://xenbits.xenproject.org/xen.git") + (commit (string-append "RELEASE-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1wv1hyfii14vi9lfjmnv07h2gpm3b7kvh2p55f4yy2b40simksgk"))= )) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list "--enable-rpath" + "--disable-qemu-traditional" ; It tries to do "git clone" + "--disable-rombios" ; would try to "git clone" via etherboo= t. + ;"--disable-seabios" ; It tries to do "git clone" + ;; TODO: Re-enable stubdom (it's "more secure" to use it). + "--disable-stubdom" ; tries to "git clone" old patched newl= ib. + (string-append "--with-initddir=3D" + (assoc-ref %outputs "out") + "/etc/init.d") + (string-append "--with-system-qemu=3D" + (assoc-ref %build-inputs "qemu") + "/bin/qemu-system-i386") + (string-append "--with-system-seabios=3D" + (assoc-ref %build-inputs "seabios") + "/share/firmware/bios.bin") + (string-append "--with-system-ovmf=3D" + (assoc-ref %build-inputs "ovmf") + "/share/firmware/ovmf_ia32.bin")) + #:make-flags (list "-j" "1" + "XEN_BUILD_DATE=3DThu Jan 1 01:00:01 CET 1970= " + "XEN_BUILD_TIME=3D01:00:01" + "XEN_BUILD_HOST=3D" + "ETHERBOOT_NICS=3D" + "SMBIOS_REL_DATE=3D01/01/1970" + "VGABIOS_REL_DATE=3D01 Jan 1970" + ; QEMU_TRADITIONAL_LOC + ; QEMU_UPSTREAM_LOC + "SYSCONFIG_DIR=3D/tmp/etc/default" + (string-append "BASH_COMPLETION_DIR=3D" + (assoc-ref %outputs "out") + "/etc/bash_completion.d") + (string-append "BOOT_DIR=3D" + (assoc-ref %outputs "out") + "/boot") + (string-append "DEBUG_DIR=3D" + (assoc-ref %outputs "out") + "/lib/debug") + (string-append "EFI_DIR=3D" + (assoc-ref %outputs "out") + "/lib/efi") ; TODO lib64 ? + "MINIOS_UPSTREAM_URL=3D" + ;(string-append "DISTDIR=3D" + ; (assoc-ref %outputs "out")) +) + #:test-target "test" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-mini-os + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "mini-os") "extras/mini-= os") + #t)) + (add-after 'unpack-mini-os 'patch + (lambda* (#:key inputs outputs #:allow-other-keys) + (substitute* "tools/firmware/Rules.mk" + (("override XEN_TARGET_ARCH =3D x86_32") + (string-append "override XEN_TARGET_ARCH =3D x86_32 +override CC =3D " (assoc-ref inputs "cross-gcc") "/bin/i686-linux-gnu-gc= c")) + (("^CFLAGS =3D$") + (string-append "CFLAGS=3D-I" (assoc-ref inputs "cross-libc= ") + "/include\n"))) + (substitute* "config/x86_32.mk" + (("CFLAGS +=3D -m32 -march=3Di686") + (string-append "CFLAGS +=3D -march=3Di686 -I" + (assoc-ref inputs "cross-libc") + "/include"))) + ;; Tries to use "git clone". + (substitute* "tools/firmware/Makefile" + (("\\+=3D etherboot") "+=3D")) + ;; /var is not in /gnu/store , so don't try to create it. + (substitute* '("tools/Makefile" + "tools/xenstore/Makefile" + "tools/xenpaging/Makefile") + (("\\$\\(INSTALL_DIR\\) .*XEN_(DUMP|LOG|RUN|LIB|PAGING)_DIR= .*") + "\n") + (("\\$\\(INSTALL_DIR\\) .*XEN_(RUN|LIB)_STORED.*") + "\n")) + ;; Prevent xen from creating /etc . + (substitute* "tools/examples/Makefile" + ((" install-readmes") "") + ((" install-configs") "")) + ;; Set rpath. + (substitute* "tools/pygrub/setup.py" + (("library_dirs =3D") + ; TODO: extra_link_args =3D ['-Wl,-rpath=3D/opt/foo'], + (string-append "runtime_library_dirs =3D ['" + (assoc-ref outputs "out") + "/lib'],\nlibrary_dirs =3D"))) + #t)) + (add-before 'configure 'patch-xen-script-directory + (lambda* (#:key outputs #:allow-other-keys) + (substitute* '("configure" + "tools/configure" + "docs/configure") + (("XEN_SCRIPT_DIR=3D.*") + (string-append "XEN_SCRIPT_DIR=3D" + (assoc-ref outputs "out") + "/etc/xen/scripts"))) + #t)) + (add-before 'configure 'set-environment-up + (lambda* (#:key make-flags #:allow-other-keys) + (define (cross? x) + (string-contains x "cross-i686-linux")) + (define (filter-environment! filter-predicate + environment-variable-names) + (for-each + (lambda (env-name) + (let* ((env-value (getenv env-name)) + (search-path (search-path-as-string->list env-v= alue)) + (new-search-path (filter filter-predicate + search-path)) + (new-env-value (list->search-path-as-string + new-search-path ":"))) + (setenv env-name new-env-value))) + environment-variable-names)) + (setenv "CROSS_C_INCLUDE_PATH" (getenv "C_INCLUDE_PATH")) + (setenv "CROSS_CPLUS_INCLUDE_PATH" (getenv "CPLUS_INCLUDE_P= ATH")) + (setenv "CROSS_LIBRARY_PATH" (getenv "LIBRARY_PATH")) + (filter-environment! cross? + '("CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH" + "CROSS_LIBRARY_PATH")) + (filter-environment! (lambda (e) (not (cross? e))) + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" + "LIBRARY_PATH")) + ;; Guix tries to be helpful and automatically adds + ;; mini-os-git-checkout/include to the include path, + ;; but actually we don't want it to be there (yet). + (filter-environment! (lambda (e) + (not + (string-contains e + "mini-os-git-checkout"))) + '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" + "LIBRARY_PATH")) + (setenv "EFI_VENDOR" "guix") + #t)) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "world" make-flags)))))) + (inputs + `(("acpica" ,acpica) ; TODO: patch iasl invocation. + ("bridge-utils" ,bridge-utils) ; TODO: patch invocations. + ("glib" ,glib) + ("iproute" ,iproute) ; TODO: patch invocations. + ("libaio" ,libaio) + ("libx11" ,libx11) + ("libyajl" ,libyajl) + ("ncurses" ,ncurses) + ("openssl" ,openssl) + ("ovmf" ,ovmf) + ("pixman" ,pixman) + ("qemu" ,qemu-minimal) + ("seabios" ,seabios) + ("util-linux" ,util-linux) ; uuid + ; TODO: ocaml-findlib, ocaml-nox. + ("xz" ,xz) ; for liblzma + ("zlib" ,zlib))) + (native-inputs + `(("dev86" ,dev86) + ("bison" ,bison) + ("cmake" ,cmake) + ("figlet" ,figlet) + ("flex" ,flex) + ("gettext" ,gettext-minimal) + ("libnl" ,libnl) + ("mini-os" + ,(origin + (method git-fetch) + (uri (git-reference + (url "http://xenbits.xen.org/git-http/mini-os.git") + (commit (string-append "xen-RELEASE-" version)))) + (sha256 + (base32 + "1i8pcl19n60i2m9vlg79q3nknpj209c9ic5x10wxaicx45kc107f")) + (file-name "mini-os-git-checkout"))) + ("perl" ,perl) + ; TODO: markdown + ("pkg-config" ,pkg-config) + ("python" ,python-2) + ("wget" ,wget) + ("cross-gcc" ,(cross-gcc "i686-linux-gnu" + #:xbinutils (cross-binutils "i686-linux-= gnu") + #:libc (cross-libc "i686-linux-gnu"))) + ("cross-libc" ,(cross-libc "i686-linux-gnu")) ; header files + ("cross-libc-static" ,(cross-libc "i686-linux-gnu") "static"))) + (home-page "https://xenproject.org/") + (synopsis "Xen Virtual Machine Monitor") + (description "This package provides the Xen Virtual Machine Monitor +which is a hypervisor.") + ;; TODO: Some files are licensed differently. List those. + (license license:gpl2) + (supported-systems '("i686-linux" "x86_64-linux" "armhf-linux")))) From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 21 04:15:34 2019 Received: (at 34012-done) by debbugs.gnu.org; 21 Jan 2019 09:15:34 +0000 Received: from localhost ([127.0.0.1]:39411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glVg5-0005Ug-NR for submit@debbugs.gnu.org; Mon, 21 Jan 2019 04:15:33 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:58468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glVg1-0005UT-W6 for 34012-done@debbugs.gnu.org; Mon, 21 Jan 2019 04:15:32 -0500 Received: from localhost (178.113.240.227.wireless.dyn.drei.com [178.113.240.227]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 522233364980 for <34012-done@debbugs.gnu.org>; Mon, 21 Jan 2019 10:15:28 +0100 (CET) Date: Mon, 21 Jan 2019 10:15:25 +0100 From: Danny Milosavljevic To: 34012-done@debbugs.gnu.org Subject: Re: [PATCH] gnu: Add xen. Message-ID: <20190121101525.13274ee9@scratchpost.org> In-Reply-To: <20190107220341.24215-1-dannym@scratchpost.org> References: <20190107220341.24215-1-dannym@scratchpost.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/69ndOTmFeGS_6N/KLDi=KvF"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 34012-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --Sig_/69ndOTmFeGS_6N/KLDi=KvF Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Pushed to master as 35e8900da092d027528a467d9e1b98c6fab22335. --Sig_/69ndOTmFeGS_6N/KLDi=KvF Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxFja0ACgkQ5xo1VCww uqXBHQgAprS6CU+W57vHQGSSKSem7eUQggl7zAGqAsxpMxpA9FWY1GmjLzTAXoWC NfApkuqmVTBR+VFOzEYayMx+ozEfaSWkbBXF7l2bCUpOvDn3kW7OmFAoNn7yWlDh 5KZew38EG90QjziCyJaOVjcQV7i3fdw0FRjxQolfB8N9BOPRK4Bs3ajOwCqxsGXw +4IeL2PHWTrUCUtE4qAlD/ImZ5upF8pRcig7r8hj8LHaruUr66pgJvwpJD38gaO+ +Pfqd6wUx+PQjVvRI92UhJaQ0sU7Ptveybgh16m5/ZXfKBrU6dwA0f//+0WN0ncs mSGeQ3CpDUmDIkfEBqhE2d6+k94aNQ== =hcDN -----END PGP SIGNATURE----- --Sig_/69ndOTmFeGS_6N/KLDi=KvF-- From unknown Tue Jun 17 22:21:15 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 18 Feb 2019 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator