From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id OPwRFIbDBWabcAEA62LTzQ:P1 (envelope-from ) for ; Thu, 28 Mar 2024 20:22:46 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id OPwRFIbDBWabcAEA62LTzQ (envelope-from ) for ; Thu, 28 Mar 2024 20:22:46 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=zsBKF5rv; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1711653766; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kmjPTAzh5tGvtj+vgxow9t787ukGifhJBvwBBxP93V4=; b=NHOxHCut9IZ+5MtatDnc8hHmxVkpyEBd/1/jH+yAVEklD9rlYbDK6Q3d4zZHIWdHwIZX2h ayXswatzz7eSfMwYv4ZRq5vIPyG64jGKu2AD4c8rX8oThZ/WY/Ivqjez3/XSYfnfLKpUeV OYSdmHIWY4+k66YcNuRBqXNyiwfxAR5II5KV+sSw1bhtmoGdQoqjZr63+KEyO1KLWn/bYv GUv3e2X8BtHmVWCqttssfd2CQGJ4S90v2aeoAbLqZg1vFX9UR85ae2LdkVxJK9udXEekNH LmlunZhBdx876T4klc4Bk68wT/gT2SRnRCkq3F7JIlw93CsioowGoA6P0/i/Lg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=zsBKF5rv; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1711653766; a=rsa-sha256; cv=none; b=BBlqVwZxKZ1h6rFCD0CyV2bug1OCeF/QqbK864athwkPRSR800Ptpc59Ahg9STG8I68ckG itFJIjXkFoyHjBfdn/xN3ew39SZj7swTVB2VqYjAhEHtxnFsKBXJ9KNFscAGk1KD9RdEq3 nNJ/8GTn5EbG19QbJZFlrU4SLEohkpTzlWB365HOo2j3ZR58qFwYiCEZi0PV/hYx5bJVEU S7UksNASjurDdXoZ3vrIBg4Idjce0gQfMFK+RS5mI7YEqSs4YAQj/44jOWD7uuCmyAi7ru fAdKkXrwyGTg8Y7VhCVkHjPZvaYazcRyTsnE5yFNf8s0HcGBpqusq9KAXOYHfw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1F77F133DF for ; Thu, 28 Mar 2024 20:22:45 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpvK7-0007mB-Ni; Thu, 28 Mar 2024 15:22:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpvK5-0007lR-UR for guix-patches@gnu.org; Thu, 28 Mar 2024 15:22:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpvK5-0000wt-MT for guix-patches@gnu.org; Thu, 28 Mar 2024 15:22:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rpvK6-00082k-76 for guix-patches@gnu.org; Thu, 28 Mar 2024 15:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#68296] [PATCH v4 1/2] gnu: Add klee-uclibc. References: <890dc6595ccef88cb60ff0a380be9d323df479aa.1704573641.git.soeren@soeren-tempel.net> In-Reply-To: <890dc6595ccef88cb60ff0a380be9d323df479aa.1704573641.git.soeren@soeren-tempel.net> Resent-From: soeren@soeren-tempel.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Mar 2024 19:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68296 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68296@debbugs.gnu.org Cc: julien@lepiller.eu Received: via spool by 68296-submit@debbugs.gnu.org id=B68296.171165366230759 (code B ref 68296); Thu, 28 Mar 2024 19:22:02 +0000 Received: (at 68296) by debbugs.gnu.org; 28 Mar 2024 19:21:02 +0000 Received: from localhost ([127.0.0.1]:41176 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpvJ7-0007zo-Mk for submit@debbugs.gnu.org; Thu, 28 Mar 2024 15:21:02 -0400 Received: from magnesium.8pit.net ([45.76.88.171]:35282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rpvJ3-0007zL-QU; Thu, 28 Mar 2024 15:21:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=opensmtpd; bh=kmjPTAzh 5tGvtj+vgxow9t787ukGifhJBvwBBxP93V4=; h=date:subject:cc:to:from; d=soeren-tempel.net; b=zsBKF5rvtoipfStWyhbiwCEz0eU8a9WlkFWvWWhq3nrorfq OD13PcU5PTPD4oPYRR9uki1Xl3duqkFN+MP1XLdUUTTCH0fzLfbOWm3XrgfowXPQh08Q1v YifkDi/jyzIlY0IxnPDHgol8LSWT5hL5czgMIOU1huZ+T+y7FkgAhY= Received: from localhost (dynamic-2a02-3102-49da-001b-e01a-5b4b-a2ca-2e2f.310.pool.telefonica.de [2a02:3102:49da:1b:e01a:5b4b:a2ca:2e2f]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id 6c6d7a50 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Thu, 28 Mar 2024 20:20:54 +0100 (CET) From: soeren@soeren-tempel.net Date: Thu, 28 Mar 2024 20:20:18 +0100 Message-ID: X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: 3.65 X-Migadu-Queue-Id: 1F77F133DF X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: 3.65 X-TUID: fEq6quoFI3PK From: Sören Tempel * gnu/packages/check.scm (klee-uclibc): New variable. Signed-off-by: Sören Tempel --- Change since v3: Resolve merge conflict, update KLEE website. gnu/packages/check.scm | 62 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 7fd28c3ac7..9beba88788 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -51,6 +51,7 @@ ;;; Copyright © 2024 Giacomo Leidi ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Navid Afkhami +;;; Copyright © 2024 Sören Tempel ;;; ;;; This file is part of GNU Guix. ;;; @@ -84,6 +85,7 @@ (define-module (gnu packages check) #:use-module (gnu packages gtk) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) + #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -3705,3 +3707,63 @@ (define-public subunit command line filters to process a subunit stream and language bindings for Python, C, C++ and shell. Bindings are easy to write for other languages.") (license (list license:asl2.0 license:bsd-3)))) ;user can pick + +(define-public klee-uclibc + (let ((commit "955d502cc1f0688e82348304b053ad787056c754")) + (package + (name "klee-uclibc") + (version (git-version "20230612" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/klee/klee-uclibc") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "12fnr5mq80cxwvv09gi844mi31jgi8067swagxnlxlhxj4mi125j")))) + (build-system gnu-build-system) + ;; Only x86_64 is presently supported by KLEE upstream. + (supported-systems '("x86_64-linux")) + (arguments + `(#:tests? #f ;upstream uClibc tests do not work in the fork + #:phases (modify-phases %standard-phases + ;; Disable locales as these would have to be downloaded and + ;; shouldn't really be needed for symbolic execution either. + (add-after 'unpack 'patch-config + (lambda _ + (substitute* "klee-premade-configs/x86_64/config" + (("UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y") + "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=n") + (("UCLIBC_PREGENERATED_LOCALE_DATA=y") + "UCLIBC_PREGENERATED_LOCALE_DATA=n") + (("UCLIBC_HAS_LOCALE=y") + "UCLIBC_HAS_LOCALE=n") + (("UCLIBC_HAS_XLOCALE=y") + "UCLIBC_HAS_XLOCALE=n")))) + + ;; Upstream uses a custom non-GNU configure script written + ;; in Python, replace the default configure phase accordingly. + (replace 'configure + (lambda _ + (invoke "./configure" + "--make-llvm-lib" + "--enable-release"))) + + ;; Custom install phase to only install the libc.a file manually. + ;; This is the only file which is used/needed by KLEE itself. + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (install-file "lib/libc.a" + (string-append (assoc-ref outputs "out") + "/lib"))))))) + (inputs (list clang-toolchain-13)) + ;; ncurses is only needed for the `make menuconfig` interface. + (native-inputs (list python ncurses)) + (synopsis "Variant of uClibc tailored to symbolic execution") + (description + "Modified version of uClibc for symbolic execution of +Unix userland software. This library can only be used in conjunction +with the @code{klee} package.") + (home-page "https://klee-se.org/") + (license license:lgpl2.1)))) base-commit: daab3da5042a5803ffa13ee759b3f8895dd92de4