diff options
| author | Andreas Enge <andreas@enge.fr> | 2026-02-17 13:32:03 +0100 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-02-17 13:44:24 +0100 |
| commit | dbdc450f55f15d694b966c8561b03040ae189273 (patch) | |
| tree | 786dbeee9c86dc162a779c2472687ec970c391c0 /gnu | |
| parent | 2cec827d769d0ff8e5b112bfb85c923796f6585b (diff) | |
gnu: Remove qemu-for-american-fuzzy-lop.
* gnu/packages/debug.scm (qemu-for-american-fuzzy-lop): Delete variable.
* gnu/packages/patches/qemu-glibc-2.27.patch,
gnu/packages/patches/qemu-glibc-2.30.patch: Remove files.
* gnu/local.mk (dist_patch_DATA): Unregister patches.
Fixes: guix/guix#5668
Change-Id: I860b2c87fb203fc96b715514064c9a229cbc008b
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/local.mk | 2 | ||||
| -rw-r--r-- | gnu/packages/debug.scm | 152 | ||||
| -rw-r--r-- | gnu/packages/patches/qemu-glibc-2.27.patch | 55 | ||||
| -rw-r--r-- | gnu/packages/patches/qemu-glibc-2.30.patch | 57 |
4 files changed, 0 insertions, 266 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index e058536d31e..611c65cca42 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -2243,8 +2243,6 @@ dist_patch_DATA = \ | |||
| 2243 | %D%/packages/patches/qdigidoc-bundle-config-files.patch \ | 2243 | %D%/packages/patches/qdigidoc-bundle-config-files.patch \ |
| 2244 | %D%/packages/patches/qdigidoc-bundle-tsl-files.patch \ | 2244 | %D%/packages/patches/qdigidoc-bundle-tsl-files.patch \ |
| 2245 | %D%/packages/patches/qemu-build-info-manual.patch \ | 2245 | %D%/packages/patches/qemu-build-info-manual.patch \ |
| 2246 | %D%/packages/patches/qemu-glibc-2.27.patch \ | ||
| 2247 | %D%/packages/patches/qemu-glibc-2.30.patch \ | ||
| 2248 | %D%/packages/patches/qemu-fix-agent-paths.patch \ | 2246 | %D%/packages/patches/qemu-fix-agent-paths.patch \ |
| 2249 | %D%/packages/patches/qemu-fix-test-virtio-version.patch \ | 2247 | %D%/packages/patches/qemu-fix-test-virtio-version.patch \ |
| 2250 | %D%/packages/patches/qemu-disable-aarch64-migration-test.patch \ | 2248 | %D%/packages/patches/qemu-disable-aarch64-migration-test.patch \ |
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm index 773da375596..9ccbf9bb9a3 100644 --- a/gnu/packages/debug.scm +++ b/gnu/packages/debug.scm | |||
| @@ -303,158 +303,6 @@ and uses the same efficient LLVM-based C/C++ @code{clang_delta} reduction | |||
| 303 | tool.") | 303 | tool.") |
| 304 | (license license:ncsa))) | 304 | (license license:ncsa))) |
| 305 | 305 | ||
| 306 | (define-public qemu-for-american-fuzzy-lop | ||
| 307 | ;; afl only supports using a single afl-qemu-trace executable, so | ||
| 308 | ;; we only build qemu for the native target. | ||
| 309 | (let ((machine (match (or (%current-target-system) | ||
| 310 | (%current-system)) | ||
| 311 | ("x86_64-linux" "x86_64") | ||
| 312 | ("i686-linux" "i386") | ||
| 313 | ("aarch64-linux" "aarch64") | ||
| 314 | ("armhf-linux" "arm") | ||
| 315 | ("mips64el-linux" "mips64el") | ||
| 316 | ("powerpc-linux" "ppc") | ||
| 317 | ;; Prevent errors when querying this package on unsupported | ||
| 318 | ;; platforms, e.g. when running "guix package --search=" | ||
| 319 | (_ "UNSUPPORTED")))) | ||
| 320 | (hidden-package | ||
| 321 | (package | ||
| 322 | (name "qemu") | ||
| 323 | (version "2.10.2") | ||
| 324 | (source (origin | ||
| 325 | (method url-fetch) | ||
| 326 | (uri (string-append "https://download.qemu.org/qemu-" | ||
| 327 | version ".tar.xz")) | ||
| 328 | (sha256 | ||
| 329 | (base32 | ||
| 330 | "17w21spvaxaidi2am5lpsln8yjpyp2zi3s3gc6nsxj5arlgamzgw")) | ||
| 331 | (patches | ||
| 332 | (search-patches "qemu-glibc-2.27.patch" | ||
| 333 | "qemu-glibc-2.30.patch")))) | ||
| 334 | (build-system gnu-build-system) | ||
| 335 | (arguments | ||
| 336 | `(;; Running tests in parallel can occasionally lead to failures, like: | ||
| 337 | ;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead) | ||
| 338 | #:parallel-tests? #f | ||
| 339 | #:configure-flags | ||
| 340 | (list (string-append "--target-list=" ,machine "-linux-user")) | ||
| 341 | #:make-flags '("V=1") | ||
| 342 | #:phases | ||
| 343 | (modify-phases %standard-phases | ||
| 344 | (replace 'configure | ||
| 345 | (lambda* (#:key inputs outputs (configure-flags '()) | ||
| 346 | #:allow-other-keys) | ||
| 347 | ;; The `configure' script doesn't understand some of the | ||
| 348 | ;; GNU options. Thus, add a new phase that's compatible. | ||
| 349 | (let ((out (assoc-ref outputs "out"))) | ||
| 350 | (setenv "SHELL" (which "bash")) | ||
| 351 | |||
| 352 | ;; While we're at it, patch for tests. | ||
| 353 | (substitute* "tests/libqtest.c" | ||
| 354 | (("/bin/sh") (which "sh"))) | ||
| 355 | |||
| 356 | ;; The binaries need to be linked against -lrt. | ||
| 357 | (setenv "LDFLAGS" "-lrt") | ||
| 358 | (apply invoke | ||
| 359 | `("./configure" | ||
| 360 | ,(string-append "--cc=" (which "gcc")) | ||
| 361 | ;; Some architectures insist on using HOST_CC | ||
| 362 | ,(string-append "--host-cc=" (which "gcc")) | ||
| 363 | "--disable-debug-info" ; save build space | ||
| 364 | "--enable-virtfs" ; just to be sure | ||
| 365 | ,(string-append "--prefix=" out) | ||
| 366 | ,(string-append "--sysconfdir=/etc") | ||
| 367 | ,@configure-flags))))) | ||
| 368 | (add-after | ||
| 369 | 'unpack 'apply-afl-patches | ||
| 370 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 371 | (let* ((afl-src (assoc-ref inputs "afl-source")) | ||
| 372 | (patch-dir "qemu_mode/patches")) | ||
| 373 | (copy-recursively (string-append afl-src "/" | ||
| 374 | patch-dir) | ||
| 375 | patch-dir) | ||
| 376 | (install-file | ||
| 377 | (string-append patch-dir | ||
| 378 | "/afl-qemu-cpu-inl.h") | ||
| 379 | ".") | ||
| 380 | (copy-file (string-append afl-src "/config.h") | ||
| 381 | "./afl-config.h") | ||
| 382 | (install-file (string-append afl-src "/types.h") | ||
| 383 | ".") | ||
| 384 | (substitute* "afl-qemu-cpu-inl.h" | ||
| 385 | (("\\.\\./\\.\\./config.h") "afl-config.h")) | ||
| 386 | (substitute* (string-append patch-dir | ||
| 387 | "/cpu-exec.diff") | ||
| 388 | (("\\.\\./patches/") "")) | ||
| 389 | |||
| 390 | ;; These were already applied to qemu-minimal-2.10. | ||
| 391 | (for-each (lambda (obsolete-patch) | ||
| 392 | (delete-file (string-append | ||
| 393 | patch-dir "/" | ||
| 394 | obsolete-patch))) | ||
| 395 | (list "configure.diff" | ||
| 396 | "memfd.diff")) | ||
| 397 | |||
| 398 | (for-each (lambda (patch-file) | ||
| 399 | (invoke "patch" "--force" "-p1" | ||
| 400 | "--input" patch-file)) | ||
| 401 | (find-files patch-dir | ||
| 402 | "\\.diff$")) | ||
| 403 | #t))) | ||
| 404 | (add-before 'check 'disable-unusable-tests | ||
| 405 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 406 | (substitute* "tests/Makefile.include" | ||
| 407 | ;; Comment out the test-qga test, which needs /sys and | ||
| 408 | ;; fails within the build environment. | ||
| 409 | (("check-unit-.* tests/test-qga" all) | ||
| 410 | (string-append "# " all))) | ||
| 411 | (substitute* "tests/Makefile.include" | ||
| 412 | ;; Comment out the test-char test, which needs networking and | ||
| 413 | ;; fails within the build environment. | ||
| 414 | (("check-unit-.* tests/test-char" all) | ||
| 415 | (string-append "# " all))) | ||
| 416 | #t))))) | ||
| 417 | (native-inputs | ||
| 418 | `(("python-2" ,python-2) ; QEMU 2 needs Python 2 | ||
| 419 | ("glib:bin" ,glib "bin") | ||
| 420 | ("perl" ,perl) | ||
| 421 | ("flex" ,flex) | ||
| 422 | ("bison" ,bison) | ||
| 423 | ("pkg-config" ,pkg-config))) | ||
| 424 | (inputs | ||
| 425 | `(("afl-source" ,(package-source american-fuzzy-lop)) | ||
| 426 | ("alsa-lib" ,alsa-lib) | ||
| 427 | ("attr" ,attr) | ||
| 428 | ("glib" ,glib) | ||
| 429 | ("libaio" ,libaio) | ||
| 430 | ("libattr" ,attr) | ||
| 431 | ("libcap" ,libcap) | ||
| 432 | ("libjpeg" ,libjpeg-turbo) | ||
| 433 | ("libpng" ,libpng) | ||
| 434 | ("ncurses" ,ncurses) | ||
| 435 | ("pixman" ,pixman) | ||
| 436 | ("util-linux" ,util-linux) | ||
| 437 | ("zlib" ,zlib))) | ||
| 438 | (home-page "https://www.qemu.org") | ||
| 439 | (synopsis "Machine emulator and virtualizer (without GUI) for american fuzzy lop") | ||
| 440 | (description | ||
| 441 | "QEMU is a generic machine emulator and virtualizer. This package | ||
| 442 | of QEMU is used only by the american fuzzy lop package. | ||
| 443 | |||
| 444 | When used as a machine emulator, QEMU can run OSes and programs made for one | ||
| 445 | machine (e.g. an ARM board) on a different machine---e.g., your own PC. By | ||
| 446 | using dynamic translation, it achieves very good performance. | ||
| 447 | |||
| 448 | When used as a virtualizer, QEMU achieves near native performances by | ||
| 449 | executing the guest code directly on the host CPU. QEMU supports | ||
| 450 | virtualization when executing under the Xen hypervisor or using | ||
| 451 | the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, | ||
| 452 | server and embedded PowerPC, and S390 guests.") | ||
| 453 | ;; Many files are GPLv2+, but some are GPLv2-only---e.g., `memory.c'. | ||
| 454 | (license license:gpl2) | ||
| 455 | ;; Several tests fail on MIPS. | ||
| 456 | (supported-systems (delete "mips64el-linux" %supported-systems)))))) | ||
| 457 | |||
| 458 | (define-public qemu-for-aflplusplus | 306 | (define-public qemu-for-aflplusplus |
| 459 | (let ((base qemu-minimal) | 307 | (let ((base qemu-minimal) |
| 460 | (commit "60ebd5624c60589e276cf287516b925a9ee35b87") | 308 | (commit "60ebd5624c60589e276cf287516b925a9ee35b87") |
diff --git a/gnu/packages/patches/qemu-glibc-2.27.patch b/gnu/packages/patches/qemu-glibc-2.27.patch deleted file mode 100644 index b1f354ac1ce..00000000000 --- a/gnu/packages/patches/qemu-glibc-2.27.patch +++ /dev/null | |||
| @@ -1,55 +0,0 @@ | |||
| 1 | From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Paolo Bonzini <pbonzini@redhat.com> | ||
| 3 | Date: Tue, 28 Nov 2017 11:51:27 +0100 | ||
| 4 | Subject: [PATCH] memfd: fix configure test | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=utf8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | Recent glibc added memfd_create in sys/mman.h. This conflicts with | ||
| 10 | the definition in util/memfd.c: | ||
| 11 | |||
| 12 | /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration | ||
| 13 | |||
| 14 | Fix the configure test, and remove the sys/memfd.h inclusion since the | ||
| 15 | file actually does not exist---it is a typo in the memfd_create(2) man | ||
| 16 | page. | ||
| 17 | |||
| 18 | Cc: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
| 19 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||
| 20 | --- | ||
| 21 | configure | 2 +- | ||
| 22 | util/memfd.c | 4 +--- | ||
| 23 | 2 files changed, 2 insertions(+), 4 deletions(-) | ||
| 24 | |||
| 25 | diff --git a/configure b/configure | ||
| 26 | index 9c8aa5a..99ccc17 100755 | ||
| 27 | --- a/configure | ||
| 28 | +++ b/configure | ||
| 29 | @@ -3923,7 +3923,7 @@ fi | ||
| 30 | # check if memfd is supported | ||
| 31 | memfd=no | ||
| 32 | cat > $TMPC << EOF | ||
| 33 | -#include <sys/memfd.h> | ||
| 34 | +#include <sys/mman.h> | ||
| 35 | |||
| 36 | int main(void) | ||
| 37 | { | ||
| 38 | diff --git a/util/memfd.c b/util/memfd.c | ||
| 39 | index 4571d1a..412e94a 100644 | ||
| 40 | --- a/util/memfd.c | ||
| 41 | +++ b/util/memfd.c | ||
| 42 | @@ -31,9 +31,7 @@ | ||
| 43 | |||
| 44 | #include "qemu/memfd.h" | ||
| 45 | |||
| 46 | -#ifdef CONFIG_MEMFD | ||
| 47 | -#include <sys/memfd.h> | ||
| 48 | -#elif defined CONFIG_LINUX | ||
| 49 | +#if defined CONFIG_LINUX && !defined CONFIG_MEMFD | ||
| 50 | #include <sys/syscall.h> | ||
| 51 | #include <asm/unistd.h> | ||
| 52 | |||
| 53 | -- | ||
| 54 | 1.8.3.1 | ||
| 55 | |||
diff --git a/gnu/packages/patches/qemu-glibc-2.30.patch b/gnu/packages/patches/qemu-glibc-2.30.patch deleted file mode 100644 index 1b74dee4ac7..00000000000 --- a/gnu/packages/patches/qemu-glibc-2.30.patch +++ /dev/null | |||
| @@ -1,57 +0,0 @@ | |||
| 1 | This patch was taken from NixOS | ||
| 2 | https://raw.githubusercontent.com/Mindavi/nixpkgs/1a737743a829746e48f4869ac517ff29c23c9d09/pkgs/tools/security/afl/qemu-patches/syscall-glibc2_30.diff | ||
| 3 | It is based on an unmerged patch against american-fuzzy-lop and was | ||
| 4 | never merged upstream because the author was unable to sign Google's CLA. | ||
| 5 | Based on https://github.com/google/AFL/commit/6c917e3d63a2a0685d58c3518524f9615b001893.patch | ||
| 6 | |||
| 7 | --- qemu-2.10.0-clean/linux-user/syscall.c 2020-03-12 18:47:47.898592169 +0100 | ||
| 8 | +++ qemu-2.10.0/linux-user/syscall.c 2020-03-13 09:13:42.461809699 +0100 | ||
| 9 | @@ -34,6 +34,7 @@ | ||
| 10 | #include <sys/resource.h> | ||
| 11 | #include <sys/swap.h> | ||
| 12 | #include <linux/capability.h> | ||
| 13 | +#include <linux/sockios.h> // https://lkml.org/lkml/2019/6/3/988 | ||
| 14 | #include <sched.h> | ||
| 15 | #include <sys/timex.h> | ||
| 16 | #ifdef __ia64__ | ||
| 17 | @@ -256,7 +257,9 @@ static type name (type1 arg1,type2 arg2, | ||
| 18 | #endif | ||
| 19 | |||
| 20 | #ifdef __NR_gettid | ||
| 21 | -_syscall0(int, gettid) | ||
| 22 | +// taken from https://patchwork.kernel.org/patch/10862231/ | ||
| 23 | +#define __NR_sys_gettid __NR_gettid | ||
| 24 | +_syscall0(int, sys_gettid) | ||
| 25 | #else | ||
| 26 | /* This is a replacement for the host gettid() and must return a host | ||
| 27 | errno. */ | ||
| 28 | @@ -6219,7 +6222,7 @@ static void *clone_func(void *arg) | ||
| 29 | cpu = ENV_GET_CPU(env); | ||
| 30 | thread_cpu = cpu; | ||
| 31 | ts = (TaskState *)cpu->opaque; | ||
| 32 | - info->tid = gettid(); | ||
| 33 | + info->tid = sys_gettid(); | ||
| 34 | task_settid(ts); | ||
| 35 | if (info->child_tidptr) | ||
| 36 | put_user_u32(info->tid, info->child_tidptr); | ||
| 37 | @@ -6363,9 +6366,9 @@ static int do_fork(CPUArchState *env, un | ||
| 38 | mapping. We can't repeat the spinlock hack used above because | ||
| 39 | the child process gets its own copy of the lock. */ | ||
| 40 | if (flags & CLONE_CHILD_SETTID) | ||
| 41 | - put_user_u32(gettid(), child_tidptr); | ||
| 42 | + put_user_u32(sys_gettid(), child_tidptr); | ||
| 43 | if (flags & CLONE_PARENT_SETTID) | ||
| 44 | - put_user_u32(gettid(), parent_tidptr); | ||
| 45 | + put_user_u32(sys_gettid(), parent_tidptr); | ||
| 46 | ts = (TaskState *)cpu->opaque; | ||
| 47 | if (flags & CLONE_SETTLS) | ||
| 48 | cpu_set_tls (env, newtls); | ||
| 49 | @@ -11402,7 +11405,7 @@ abi_long do_syscall(void *cpu_env, int n | ||
| 50 | break; | ||
| 51 | #endif | ||
| 52 | case TARGET_NR_gettid: | ||
| 53 | - ret = get_errno(gettid()); | ||
| 54 | + ret = get_errno(sys_gettid()); | ||
| 55 | break; | ||
| 56 | #ifdef TARGET_NR_readahead | ||
| 57 | case TARGET_NR_readahead: | ||
