From patchwork Fri Mar 1 23:23:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tim Gesthuizen X-Patchwork-Id: 1275 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2809A16CB6; Fri, 1 Mar 2019 23:24:15 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 290DD16C94 for ; Fri, 1 Mar 2019 23:24:14 +0000 (GMT) Received: from localhost ([127.0.0.1]:45803 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzrVl-0005we-Es for patchwork@mira.cbaines.net; Fri, 01 Mar 2019 18:24:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzrVe-0005wN-Sn for guix-patches@gnu.org; Fri, 01 Mar 2019 18:24:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzrVa-00048P-UG for guix-patches@gnu.org; Fri, 01 Mar 2019 18:24:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43306) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzrVa-00046x-7L for guix-patches@gnu.org; Fri, 01 Mar 2019 18:24:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gzrVZ-0002S2-TM for guix-patches@gnu.org; Fri, 01 Mar 2019 18:24:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34223] Fixing timestamps in archives. Resent-From: Tim Gesthuizen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 01 Mar 2019 23:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34223 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 34223-submit@debbugs.gnu.org id=B34223.15514826399414 (code B ref 34223); Fri, 01 Mar 2019 23:24:01 +0000 Received: (at 34223) by debbugs.gnu.org; 1 Mar 2019 23:23:59 +0000 Received: from localhost ([127.0.0.1]:56850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzrVQ-0002Rf-7J for submit@debbugs.gnu.org; Fri, 01 Mar 2019 18:23:59 -0500 Received: from sonic310-14.consmr.mail.ir2.yahoo.com ([77.238.177.35]:40399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzrVN-0002RQ-9o for 34223@debbugs.gnu.org; Fri, 01 Mar 2019 18:23:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s2048; t=1551482623; bh=Zug6Eini9MqM+6P8W1ZSnVw4N8IT6KlN/Z9nhvjKrIU=; h=References:From:To:Cc:Subject:Date:From:Subject; b=MYnMzBEwOaIJ15giXPH59b1rGwr/lKLyoVsA7NDq+J5OIBhw/1QYSphEkYwk17ab1uTONzGywwQdWT+BXiPgaa/6JdYy4u73pEfmHcg6vpU6vwFALaMxFh6vRl/hZ/N4O/1sinfISx1tzuzZjf/18+pN9N7N9ml7wqyDggfJylJe9B8dlQ7vbtupxrNVoKwgmu6b5lM+mvKjpkcvdxOXKCebHsBTbqDb4Mws/XJz7B8dC6OgT/JsGb6ljJJYdoz3ZfH8EcRu6BhN3fZ0xlzn0Mu1rUVH32rzDRvQDDsPSf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pifNCb_94X_GD_BOpxeHj56Vm703iAM9CZO8 X8Jh.RRTTAj2bFJfnjvXjeGH7fLeqvzOYetVxkdtO4qfvsRDz Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ir2.yahoo.com with HTTP; Fri, 1 Mar 2019 23:23:43 +0000 Received: from ip5f5acae0.dynamic.kabel-deutschland.de (EHLO finkpad) ([95.90.202.224]) by smtp412.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID a52a610d6b688505af944ba66579169b; Fri, 01 Mar 2019 23:23:41 +0000 (UTC) References: <87imxjfjjt.fsf@gnu.org> <87mumshndk.fsf@yahoo.de> <87pnro91mc.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Tim Gesthuizen In-reply-to: <87pnro91mc.fsf@gnu.org> Date: Sat, 02 Mar 2019 00:23:30 +0100 Message-ID: <87lg1yw559.fsf@yahoo.de> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 34223@debbugs.gnu.org Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Ludo, Sorry for the delay! Ludovic Courtès writes: > In that case though, it probably doesn’t buy us much to use libarchive > in a separate C program, WDYT? Should we just stick to the current > approach that invokes ‘unzip’ and ‘zip’? This seems to be the best choice. Maybe we want to reevaluate when there is a proper ZIP-library for guile. I have attached patches that isolate repack-archive from the ant-build-system and use it for pwsafe. I only builded some java packages so I don't know if something else might be broken because of the changes. Tim. From 0bb0420dfdeb992b3ceafc815d42e6f403520b8d Mon Sep 17 00:00:00 2001 From: Tim Gesthuizen Date: Sat, 2 Mar 2019 00:10:19 +0100 Subject: [PATCH 2/2] gnu: pwsafe: Make zip archives deterministic * gnu/packages/password-utils.scm (pwsafe): [native-inputs]: Add unzip. [arguments]: Add a phase for resetting zip timestamps. --- gnu/packages/password-utils.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm index 9fd5a6ff0..52870050e 100644 --- a/gnu/packages/password-utils.scm +++ b/gnu/packages/password-utils.scm @@ -21,7 +21,7 @@ ;;; Copyright © 2018 Arun Isaac ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2018 Amirouche Boubekki -;;; Copyright © 2018 Tim Gesthuizen +;;; Copyright © 2018, 2019 Tim Gesthuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -190,7 +190,8 @@ algorithms AES or Twofish.") (build-system cmake-build-system) (native-inputs `(("gettext" ,gettext-minimal) ("perl" ,perl) - ("zip" ,zip))) + ("zip" ,zip) + ("unzip" ,unzip))) (inputs `(("curl" ,curl) ("file" ,file) ("gtest" ,googletest) @@ -201,7 +202,10 @@ algorithms AES or Twofish.") ("qrencode" ,qrencode) ("wxwidgets" ,wxwidgets) ("xerces-c" ,xerces-c))) - (arguments '(#:configure-flags (list "-DNO_GTEST=YES") + (arguments `(#:configure-flags (list "-DNO_GTEST=YES") + #:imported-modules ((guix build syscalls) + (guix build archives) + ,@%cmake-build-system-modules) #:phases (modify-phases %standard-phases (add-after 'unpack 'add-gtest (lambda* (#:key inputs #:allow-other-keys) @@ -219,6 +223,13 @@ add_subdirectory(src/test)\n" cmake-port) (("/usr/bin/file") (string-append (assoc-ref inputs "file") "/bin/file"))) + #t)) + (add-after 'install 'repack-archives + (lambda* (#:key outputs #:allow-other-keys) + (use-modules ((guix build archives))) + (for-each repack-archive + (find-files (assoc-ref outputs "out") + "\\.zip$")) #t))))) (synopsis "Password safe with automatic input and key generation") (description "pwsafe is a password manager originally designed by Bruce -- 2.20.1