unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Leo Famulari <leo@famulari.name>, 40178@debbugs.gnu.org
Subject: [bug#40178] [PATCH 2/2] gnu: Remove qemu-minimal-2.10.
Date: Sun, 22 Mar 2020 15:22:44 +0100	[thread overview]
Message-ID: <87fte04ggb.fsf@devup.no> (raw)
In-Reply-To: <7f0ce820d4edbf883af3ea2d96c23706858a5b34.1584829446.git.leo@famulari.name>

[-- Attachment #1: Type: text/plain, Size: 4238 bytes --]

Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/virtualization.scm (qemu-minimal-2.10): Remove variable.
> * gnu/packages/debug.scm (qemu-for-american-fuzzy-lop): New variable.
> (american-fuzzy-lop)[inputs]: Remove custom-qemu and add
> qemu-for-american-fuzzy-lop.
> [arguments]: Adjust reference to QEMU in the 'install-qemu' phase.

Thanks for this.  A couple of suggestions:

> -             ;; afl only supports using a single afl-qemu-trace executable, so
> -             ;; we only build qemu for the native target.

Perhaps preserve this comment close to the (let ((machine ...))) line?

> +         (add-after 'install 'install-info
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             ;; Install the Info manual, unless Texinfo is missing.
> +             (when (assoc-ref inputs "texinfo")
> +               (let* ((out  (assoc-ref outputs "out"))
> +                      (dir (string-append out "/share/info")))
> +                 (invoke "make" "info")
> +                 (for-each (lambda (info)
> +                             (install-file info dir))
> +                           (find-files "." "\\.info"))))
> +             #t))
> +         ;; Create a wrapper for Samba. This allows QEMU to use Samba without
> +         ;; pulling it in as an input. Note that you need to explicitly install
> +         ;; Samba in your Guix profile for Samba support.
> +         (add-after 'install-info 'create-samba-wrapper
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out    (assoc-ref %outputs "out"))
> +                    (libexec (string-append out "/libexec")))
> +               (call-with-output-file "samba-wrapper"
> +                 (lambda (port)
> +                   (format port "#!/bin/sh
> +exec smbd $@")))
> +               (chmod "samba-wrapper" #o755)
> +               (install-file "samba-wrapper" libexec))
> +             #t))
> +         (add-before 'configure 'prevent-network-configuration
> +           (lambda _
> +             ;; Prevent the build from trying to use git to fetch from the net.
> +             (substitute* "Makefile"
> +               (("@./config.status")
> +                "")) #t))

I think we can remove all the phases above for simplicity.

> +    (native-inputs
> +     `(("python-2" ,python-2) ; QEMU 2 needs Python 2
> +       ("glib:bin" ,glib "bin")
> +       ("perl" ,perl)
> +       ("flex" ,flex)
> +       ("bison" ,bison)
> +       ("pkg-config" ,pkg-config)
> +       ("texinfo" ,texinfo)))

As well as the texinfo input.

> +    (inputs
> +     `(("afl-source" ,(package-source american-fuzzy-lop))
> +       ("alsa-lib" ,alsa-lib)
> +       ("attr" ,attr)
> +       ("glib" ,glib)
> +       ("libaio" ,libaio)
> +       ("libattr" ,attr)
> +       ("libcap" ,libcap)
> +       ("libjpeg" ,libjpeg-turbo)
> +       ("libpng" ,libpng)
> +       ("ncurses" ,ncurses)
> +       ("pixman" ,pixman)
> +       ("util-linux" ,util-linux)
> +       ("zlib" ,zlib)))

It's good to keep a list of explicit inputs here instead of having to
delete any new inputs to 'qemu-minimal'.  However...


> +    (home-page "https://www.qemu.org")
> +    (synopsis "Machine emulator and virtualizer (without GUI)")
> +    (description
> +     "QEMU is a generic machine emulator and virtualizer.
> +
> +When used as a machine emulator, QEMU can run OSes and programs made for one
> +machine (e.g. an ARM board) on a different machine---e.g., your own PC.  By
> +using dynamic translation, it achieves very good performance.
> +
> +When used as a virtualizer, QEMU achieves near native performances by
> +executing the guest code directly on the host CPU.  QEMU supports
> +virtualization when executing under the Xen hypervisor or using
> +the KVM kernel module in Linux.  When using KVM, QEMU can virtualize x86,
> +server and embedded PowerPC, and S390 guests.")
> +    ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'.
> +    (license license:gpl2)
> +    ;; Several tests fail on MIPS.
> +    (supported-systems (delete "mips64el-linux" %supported-systems))))))

This section can be removed, as it gets inherited and does not affect
the derivation.

In any case LGTM, too!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2020-03-22 14:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-21 22:21 [bug#40178] QEMU for american fuzzy lop Leo Famulari
2020-03-21 22:24 ` [bug#40178] [PATCH 1/2] gnu: Prefix licenses in (gnu packages debug) Leo Famulari
2020-03-21 22:24   ` [bug#40178] [PATCH 2/2] gnu: Remove qemu-minimal-2.10 Leo Famulari
2020-03-22 13:16     ` Danny Milosavljevic
2020-03-22 14:22     ` Marius Bakke [this message]
2020-03-22 18:29       ` Leo Famulari
2020-03-31 21:07         ` bug#40178: " Christopher Baines
2020-03-22 13:12   ` [bug#40178] [PATCH 1/2] gnu: Prefix licenses in (gnu packages debug) Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fte04ggb.fsf@devup.no \
    --to=mbakke@fastmail.com \
    --cc=40178@debbugs.gnu.org \
    --cc=leo@famulari.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).