From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBIT1-0004dO-Hb for guix-patches@gnu.org; Wed, 25 Apr 2018 07:20:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBISx-0004wo-12 for guix-patches@gnu.org; Wed, 25 Apr 2018 07:20:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:59120) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBISw-0004w5-RX for guix-patches@gnu.org; Wed, 25 Apr 2018 07:20:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fBISw-0005dI-LQ for guix-patches@gnu.org; Wed, 25 Apr 2018 07:20:02 -0400 Subject: [bug#31254] gnu: qemu: Build with Python 3 and SDL 2. (+ GTK 3 frontend) Resent-Message-ID: From: Marius Bakke In-Reply-To: <20180425083346.29a434e9@mykolab.com> References: <20180425083346.29a434e9@mykolab.com> Date: Wed, 25 Apr 2018 13:19:13 +0200 Message-ID: <87lgdb8rf2.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Rutger Helling , 31254@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello! Rutger Helling writes: > Hey Guix, > > I saw QEMU was just updated to 2.12. I noticed a few things in the > release notes, namely: > * QEMU can now be built with Python 3. > * Support for SDL 1.2 is considered deprecated and will be removed > entirely in a future release. > > As a result, the first patch builds QEMU with Python 3 and SDL 2. Thanks for looking after this. I didn't realize it was using SDL1! > The second patch is optional and adds the GTK 3 frontend, which IMO > is a nice alternative to the SDL frontend. > This does increase the size of QEMU a bit. OTOH it seems unlikely that > most people who use QEMU don't already have GTK 3 installed in some > form. Using `guix size`, stock qemu is ~916MiB, and adding gtk+ brings it to ~1131MiB. I'm not familiar with the GTK+ frontend, would it make sense to add it in a separate output? Alternatively, could we replace the SDL frontend with it? > From 2f1626d4526fee5e7a2836d811c96cc2c823ce71 Mon Sep 17 00:00:00 2001 > From: Rutger Helling > Date: Wed, 25 Apr 2018 08:13:44 +0200 > Subject: [PATCH 1/2] gnu: qemu: Build with Python 3 and SDL 2. > > * gnu/packages/virtualization.scm (qemu)[arguments]: Add configure-flag t= o build > with Python 3. > [inputs]: Use sdl2 instead of sdl. > [native-inputs]: Use python instead of python@2. > * gnu/packages/virtualization.scm (qemu-minimal)[native-inputs]: Remove p= ython > from inherited packages and use python@2 instead. > [inputs]: Remove sdl2 instead of sdl from inherited packages. [...] > @@ -101,6 +101,11 @@ > ;; boot_sector_test: assertion failed (signature =3D=3D SIGNATURE= ): (0x00000000 =3D=3D 0x0000dead) > #:parallel-tests? #f > #:configure-flags (list "--enable-usb-redir" "--enable-opengl" > + ;; Remove below once Python 3 becomes the= default > + ;; 'python' binary. > + (string-append "--python=3D" > + (assoc-ref %build-inputs "= python") > + "/bin/python3") Note: You can use the 'python-wrapper' package, which has python3 as "/bin/python". Then this won't be necessary. > (string-append "--smbd=3D" > (assoc-ref %outputs "out") > "/libexec/samba-wrapper") > @@ -187,7 +192,7 @@ exec smbd $@"))) > ;; ("pciutils" ,pciutils) > ("pixman" ,pixman) > ("pulseaudio" ,pulseaudio) > - ("sdl" ,sdl) > + ("sdl2" ,sdl2) > ("spice" ,spice) > ("usbredir" ,usbredir) > ("util-linux" ,util-linux) > @@ -197,7 +202,7 @@ exec smbd $@"))) > (native-inputs `(("glib:bin" ,glib "bin") ; gtester, etc. > ("perl" ,perl) > ("pkg-config" ,pkg-config) > - ("python" ,python-2) ; incompatible with Python 3 a= ccording to error message > + ("python" ,python) > ("texinfo" ,texinfo))) > (home-page "https://www.qemu.org") > (synopsis "Machine emulator and virtualizer") > @@ -231,9 +236,13 @@ server and embedded PowerPC, and S390 guests.") > ;; Restrict to the targets supported by Guix. > ''("--target-list=3Di386-softmmu,x86_64-softmmu,mips64el-softmmu= ,arm-softmmu,aarch64-softmmu")))) >=20=20 > + ;; qemu-minimal-2.10 needs Python 2. Remove below once no longer nec= essary. > + (native-inputs `(("python-2" ,python-2) > + ,@(fold alist-delete (package-native-inputs qemu) > + '("python")))) It's better to do this in the actual Qemu 2.10 package instead of arbitrarily using a different Python version in "qemu-minimal" IMO. Perhaps we should move "qemu@2.10" from (gnu packages bootloaders) into here and make this change in that package. WDYT? Ideally as a public "hidden-package" so it's not visible to end users. Can you try it? [...] > From a0cc0f8f5632374567ee760d629d80703ec0f41e Mon Sep 17 00:00:00 2001 > From: Rutger Helling > Date: Wed, 25 Apr 2018 08:14:33 +0200 > Subject: [PATCH 2/2] gnu: qemu: Enable GTK 3 frontend. > > * gnu/packages/virtualization.scm (qemu)[inputs]: Add "gettext", "gtk+" to > inputs. > * gnu/packages/virtualization.scm (qemu-minimal)[inputs]: Remove "gettext= ", > "gtk+" from inherited inputs. 'gettext' should probably be a native-input. That said I wonder if the GTK frontend should be a separate output due to the ~21% size increase, but no strong opinion. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlrgZDEACgkQoqBt8qM6 VPq/KggA1WBupMV8Fa1CARVuKlNsJc2DnYF9PRm2nGQC/54xp8BRhBmRSM1YgRm5 JOdux3Z1yYK3MWtvXiLXXEGyr6c+XWMeVeT/UF8saAOOFiIK+l7bmDhPxDJ1G/Va 52PziI4lFm1KsXpyGKHBgRg97SDJb0DPw/LAQTXk4MXwH/oZSed+AG32n5Won524 9/2oucJS/F0BjGjI8S7R5ds5jpUdzc2aikoocOhPntLhN5aNI1wCsJYmAoAKWGsC 1BrS8U4kqd+enl2Hx8xwob/uv0Na2IWaoeG0t99SHHBCoLlyHpw03Fva7NtoMkTB uTtlgwvqAL+8xw1RMIb4EvLI0ZQK0Q== =N9jy -----END PGP SIGNATURE----- --=-=-=--