From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 23 14:18:48 2024 Received: (at submit) by debbugs.gnu.org; 23 Jul 2024 18:18:48 +0000 Received: from localhost ([127.0.0.1]:60722 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWK63-0003Qw-QN for submit@debbugs.gnu.org; Tue, 23 Jul 2024 14:18:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:45198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWK60-0003Ql-5n for submit@debbugs.gnu.org; Tue, 23 Jul 2024 14:18:47 -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 1sWK5u-0000q7-9F for guix-patches@gnu.org; Tue, 23 Jul 2024 14:18:39 -0400 Received: from mail-am7eur03olkn2011.outbound.protection.outlook.com ([40.92.59.11] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sWK5r-0003OZ-QV for guix-patches@gnu.org; Tue, 23 Jul 2024 14:18:37 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sKgvNnL1d9mYq7S+Snj/LQyZ8SZMMIAjMUQpfalja9SPNSHAr9MNMLVKq+71rzcN/twFauBZJL1a810No/4VMHUFG30UEoVaqGC5kkNZXeKMNAScHtR+6jSHq7bg+Ysf1I8KZSPTahR7mGDrxU0tm2ez7km4/tme6WfUm5FHYAjStYLX55eSqT9N7cJ0SReKaZ0bxieZFtej7jgxbDvrHT44vGMYLiUPXo2IK9YWywzbzkbHO6fT4e1lhCNPoViDLTSBZYh4SsDL+4iSwhmUHl10RoHkXLul4HeydaA3R5y/rNI3BwSvGf+pGOGCk2p3jEdLazRg4tGhgxr4CmpzBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=83dbKEzsYoz9xFaEoGJFB77Yuu1jIo8xXV2Gu2CuTtQ=; b=lMS5OYJiwjhUSoWECjiM9u6pyp2IY53Oi9CWYruad0pNOp94LCz/G/rAFNUybTo5g2LwtE6yvzVcJs1JhquTcxIfjohcrpLLopZt1cwlXWIL8uW4B6XTCdEP7+NNtknL2CtijeVPPjysU5pJ3e+kJB+0Q6guI9AX8k2ZegfjMitaTcHEJpkH8wvY1vgas4q2KruTENzpLgH5bJ/a2GM8Hv04gCVc+G8DgOMlUIhqd11YnzSZAflZJUtqFBfonUeC8b+/9v5IBiU96sfj7u70RC6E3o06ddZIdSF+pTZh1g/yBy5DJPCh6OtD+N+2eVKPSctIGWiEi0kDFEDEfgU61A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=OUTLOOK.ES; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=83dbKEzsYoz9xFaEoGJFB77Yuu1jIo8xXV2Gu2CuTtQ=; b=u8KQXfpMeURpLoOsbSP1WtL7EpefHcSWw39UT/SMPQqdrzDMk2Ezn1UBFcIoZm/5M2zWLGnwWvcY/jrVDGBWhfmjI0acC+G1A4X8u2Yk7Q80pGOSSrGEXNqR2BKpJGylBk52i5XyqYKuQqxKqbk8eLkNpsJzaaH3gZGVxklY93oog2iQy761/5jHTFZU8S6LLPVCzn9sh3u3j1GLqZlBUzSPXvxDSldIPr0VcQaZNl3ji+APPqYNqrlFxYCdWItG/sM5Y8Kkv+opFJyQB1naoTtxvRIUWY+8tSRR28Y0YpDeIkX6/LWRVtiaSyJMx1vzryrvgs24fLuyZ3b9fGGUMA== Received: from PAXP251MB0348.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:20b::10) by AS1P251MB0677.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:48d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.16; Tue, 23 Jul 2024 18:16:48 +0000 Received: from PAXP251MB0348.EURP251.PROD.OUTLOOK.COM ([fe80::1f4f:1f6b:1817:f03f]) by PAXP251MB0348.EURP251.PROD.OUTLOOK.COM ([fe80::1f4f:1f6b:1817:f03f%7]) with mapi id 15.20.7762.020; Tue, 23 Jul 2024 18:16:48 +0000 From: =?UTF-8?q?Sergio=20Pastor=20P=C3=A9rez?= To: guix-patches@gnu.org Subject: [PATCH] gnu: criu: Update to 3.19. Date: Tue, 23 Jul 2024 20:09:39 +0200 Message-ID: X-Mailer: git-send-email 2.45.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-TMN: [M7szcUF8zpcaLwp5rZsnbVyQs1aELmDo] X-ClientProxiedBy: MA2P292CA0005.ESPP292.PROD.OUTLOOK.COM (2603:10a6:250:1::8) To PAXP251MB0348.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:20b::10) X-Microsoft-Original-Message-ID: <2c576dc7b052751ad8a6eb2b4d5163fa9bac4073.1721758178.git.sergio.pastorperez@outlook.es> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXP251MB0348:EE_|AS1P251MB0677:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e560b52-6975-4ec3-eca9-08dcab439e28 X-Microsoft-Antispam: BCL:0; ARA:14566002|19110799003|8060799006|461199028|1602099012|440099028|3412199025|4302099013|1710799026; X-Microsoft-Antispam-Message-Info: oR+PwN9z+wBJgOpLPLpIIhEKXZJgLC5DJZ1yvjTReI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?us-ascii?Q?H4F3at3AC+Z10qh+5gPDGLOfdcvsjsbEC/Mrj7Mbm2+F/cwhgCzEVLl3Y081?= =?us-ascii?Q?4CC7Oyl0Yro7qKXFdkQ8r6UqgpNVnONbDG9i6IaViqwh7Gsanf7TmnlByuX/?= =?us-ascii?Q?X6RLsw21x8oLG9ry51ADjk+PZpfooqsens2e+SZTbSnS6aCOYdRprpkjCPZp?= =?us-ascii?Q?OWbxoGVhvkSVRO1Tgg6b?= X-OriginatorOrg: sct-15-20-7741-18-msonline-outlook-53ebb.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 8e560b52-6975-4ec3-eca9-08dcab439e28 X-MS-Exchange-CrossTenant-AuthSource: PAXP251MB0348.EURP251.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2024 18:16:48.7604 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1P251MB0677 Received-SPF: pass client-ip=40.92.59.11; envelope-from=sergio.pastorperez@outlook.es; helo=EUR03-AM7-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit Cc: =?UTF-8?q?Sergio=20Pastor=20P=C3=A9rez?= 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: -2.3 (--) * gnu/packages/virtualization.scm (criu): Update to 3.19. Change-Id: I701f925a47597eea559b6448a08c117ed65b453d --- Hello, I'm updating CRIU to version 3.19. As you can see I've changed the input style and phases so they use G-Expressions. I had to add a new phase before `install` to avoid pip from fetching dependencies over the network. I'm not sure that this is the best way to do it but I could not find an equivalent flag to `--single-version-externally-managed` for pip. Hope this helps. Regards, Sergio. gnu/packages/virtualization.scm | 213 +++++++++++++++++--------------- 1 file changed, 116 insertions(+), 97 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 061748bb4a..3860eabe7e 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -1948,7 +1948,7 @@ (define-public vmware-open-vm-tools-gtk (define-public criu (package (name "criu") - (version "3.17.1") + (version "3.19") (source (origin (method git-fetch) @@ -1957,110 +1957,129 @@ (define-public criu (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0ff3xfcf0wfz02fc0qbj56mci1a0xdl8jzaihaw6qyjvgrsiq7fh")))) + (base32 "01mbr90hsk6s9i33wi5l6swba302a8w4iqckbfkdbvp6fw2g2jab")))) (build-system gnu-build-system) (arguments - `(#:test-target "test" - #:tests? #f ; tests require mounting as root - #:make-flags - (list (string-append "PREFIX=" (assoc-ref %outputs "out")) - (string-append "LIBDIR=$(PREFIX)/lib") - ;; Upstream mistakenly puts binaries in /var. Now, in practice no - ;; plugins are built, but the build system still fails otherwise. - (string-append "PLUGINDIR=$(LIBDIR)/criu") - (string-append "ASCIIDOC=" - (search-input-file %build-inputs - "/bin/asciidoc")) - (string-append "PYTHON=python3") - (string-append "XMLTO=" - (search-input-file %build-inputs - "/bin/xmlto"))) - #:modules ((ice-9 ftw) + (list + #:test-target "test" + #:tests? #f ;tests require mounting as root + #:make-flags #~(list (string-append "PREFIX=" + #$output) + (string-append "LIBDIR=$(PREFIX)/lib") + ;; Upstream mistakenly puts binaries in /var. Now, + ;; in practice no plugins are built, but the build + ;; system still fails otherwise. + (string-append "PLUGINDIR=$(LIBDIR)/criu") + (string-append "ASCIIDOC=" + (string-append #$asciidoc + "/bin/asciidoc")) + (string-append "PYTHON=python3") + (string-append "XMLTO=" + (string-append #$xmlto "/bin/xmlto"))) + #:modules `((ice-9 ftw) ,@%gnu-build-system-modules) - #:phases - (modify-phases %standard-phases - (delete 'configure) ; no configure script - (add-after 'unpack 'fix-documentation - (lambda* (#:key inputs outputs #:allow-other-keys) - (substitute* "Documentation/Makefile" - (("-m custom.xsl") - (string-append - "-m custom.xsl --skip-validation -x " - (assoc-ref inputs "docbook-xsl") "/xml/xsl/" - ,(package-name docbook-xsl) "-" - ,(package-version docbook-xsl) - "/manpages/docbook.xsl"))))) - (add-after 'unpack 'hardcode-variables - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Hardcode arm version detection - (substitute* "Makefile" - (("ARMV.*:=.*") "ARMV := 7\n")) - ;; Hard-code the correct PLUGINDIR above. - (substitute* "criu/include/plugin.h" - (("/var") (string-append (assoc-ref outputs "out")))) - )) - ;; TODO: use - ;; (@@ (guix build python-build-system) ensure-no-mtimes-pre-1980) - ;; when it no longer throws due to trying to call UTIME on symlinks. - (add-after 'unpack 'ensure-no-mtimes-pre-1980 - (lambda _ - (let ((early-1980 315619200)) ; 1980-01-02 UTC - (ftw "." (lambda (file stat flag) - (unless (or (<= early-1980 (stat:mtime stat)) - (eq? (stat:type stat) 'symlink)) - (utime file early-1980 early-1980)) - #t))))) - (add-before 'build 'fix-symlink - (lambda* (#:key inputs #:allow-other-keys) - ;; The file 'images/google/protobuf/descriptor.proto' points to - ;; /usr/include/..., which obviously does not exist. - (let* ((file "google/protobuf/descriptor.proto") - (target (string-append "images/" file)) - (source (search-input-file - inputs - (string-append "include/" file)))) - (delete-file target) - (symlink source target)))) - (add-after 'install 'wrap - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; Make sure 'crit' runs with the correct PYTHONPATH. - (let* ((out (assoc-ref outputs "out")) - (site (string-append out "/lib/python" - ,(version-major+minor - (package-version python)) - "/site-packages")) - (path (getenv "GUIX_PYTHONPATH"))) - (wrap-program (string-append out "/bin/crit") - `("GUIX_PYTHONPATH" ":" prefix (,site ,path)))))) - (add-after 'install 'delete-static-libraries - ;; Not building/installing these at all doesn't seem to be supported. - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (for-each delete-file (find-files out "\\.a$")))))))) - (inputs - `(("protobuf" ,protobuf) - ("python-protobuf" ,python-protobuf) - ("iproute" ,iproute) - ("libaio" ,libaio) - ("libcap" ,libcap) - ("libnet" ,libnet) - ("libnl" ,libnl) - ("libbsd" ,libbsd) - ("nftables" ,nftables))) - (native-inputs - (list pkg-config - perl - asciidoc - xmlto - docbook-xml - docbook-xsl - python-toolchain)) + #:phases #~(modify-phases %standard-phases + (delete 'configure) ;no configure script + (add-after 'unpack 'fix-documentation + (lambda _ + (substitute* "Documentation/Makefile" + (("-m custom.xsl") + (string-append "-m custom.xsl --skip-validation -x " + #$docbook-xsl + "/xml/xsl/" + #$(package-name docbook-xsl) + "-" + #$(package-version docbook-xsl) + "/manpages/docbook.xsl"))))) + (add-after 'unpack 'hardcode-variables + (lambda _ + ;; Hardcode arm version detection + (substitute* "Makefile" + (("ARMV.*:=.*") + "ARMV := 7\n")) + ;; Hard-code the correct PLUGINDIR above. + (substitute* "criu/include/plugin.h" + (("/var") + #$output)))) + ;; TODO: use (@@ (guix build python-build-system) + ;; ensure-no-mtimes-pre-1980) when it no longer throws due to + ;; trying to call UTIME on symlinks. + (add-after 'unpack 'ensure-no-mtimes-pre-1980 + (lambda _ + (let ((early-1980 315619200)) + ;; 1980-01-02 UTC + (ftw "." + (lambda (file stat flag) + (unless (or (<= early-1980 + (stat:mtime stat)) + (eq? (stat:type stat) + 'symlink)) + (utime file early-1980 early-1980)) #t))))) + (add-before 'build 'fix-symlink + (lambda _ + ;; The file 'images/google/protobuf/descriptor.proto' + ;; points to /usr/include/..., which does not exist. + (let* ((file "google/protobuf/descriptor.proto") + (target (string-append "images/" file)) + (source (string-append #$protobuf "/include/" + file))) + (delete-file target) + (symlink source target)))) + (add-before 'install 'fix-python-install + (lambda _ + (let ((install-cmd (string-append "$(PYTHON)" + " setup.py install" + " --no-compile" + " --single-version-externally-managed" + " --root=/" + " --prefix=$(DESTDIR)$(PREFIX)\n"))) + (substitute* "lib/Makefile" + (("\\$\\(PYTHON\\) -m pip install.*") + (string-append "cd lib; " install-cmd))) + (substitute* "crit/Makefile" + (("\\$\\(PYTHON\\) -m pip install.*") + (string-append "cd crit; " install-cmd)))))) + (add-after 'install 'wrap + (lambda _ + ;; Make sure 'crit' runs with the correct PYTHONPATH. + (let ((site (string-append #$output "/lib/python" + #$(version-major+minor (package-version + python)) + "/site-packages")) + (path (getenv "GUIX_PYTHONPATH"))) + (wrap-program (string-append #$output "/bin/crit") + `("GUIX_PYTHONPATH" ":" prefix + (,site ,path)))))) + (add-after 'install 'delete-static-libraries + ;; Not building/installing these at all doesn't seem to be + ;; supported. + (lambda _ + (for-each delete-file + (find-files #$output "\\.a$"))))))) + (inputs (list bash-minimal + protobuf + python-protobuf + iproute + libaio + libcap + libnet + libnl + libbsd + nftables)) + (native-inputs (list pkg-config + perl + asciidoc + xmlto + docbook-xml + docbook-xsl + python-toolchain)) (propagated-inputs ;; included by 'rpc.pb-c.h' (list protobuf-c)) (home-page "https://criu.org") (synopsis "Checkpoint and restore in user space") - (description "Using this tool, you can freeze a running application (or + (description + "Using this tool, you can freeze a running application (or part of it) and checkpoint it to a hard drive as a collection of files. You can then use the files to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is base-commit: d007b64356764f49677c78d82643f1125b5353b7 -- 2.45.2