From patchwork Mon Feb 4 04:00:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kyle Meyer X-Patchwork-Id: 953 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 B11FA16B77; Mon, 4 Feb 2019 04:02:12 +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,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 8F9BE16B75 for ; Mon, 4 Feb 2019 04:02:11 +0000 (GMT) Received: from localhost ([127.0.0.1]:35542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqVST-00062M-8t for patchwork@mira.cbaines.net; Sun, 03 Feb 2019 23:02:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53599) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqVSP-000622-Lt for guix-patches@gnu.org; Sun, 03 Feb 2019 23:02:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqVSO-00024e-DK for guix-patches@gnu.org; Sun, 03 Feb 2019 23:02:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58672) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gqVSO-00024O-9k for guix-patches@gnu.org; Sun, 03 Feb 2019 23:02:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gqVSN-000238-VD for guix-patches@gnu.org; Sun, 03 Feb 2019 23:02:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34306] [PATCH] gnu: Add datefudge. Resent-From: Kyle Meyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Feb 2019 04:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34306 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34306@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15492528907826 (code B ref -1); Mon, 04 Feb 2019 04:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 4 Feb 2019 04:01:30 +0000 Received: from localhost ([127.0.0.1]:57953 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqVRq-000229-9Y for submit@debbugs.gnu.org; Sun, 03 Feb 2019 23:01:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqVRn-00021v-4B for submit@debbugs.gnu.org; Sun, 03 Feb 2019 23:01:28 -0500 Received: from lists.gnu.org ([209.51.188.17]:49111) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqVRh-0001pV-Ex for submit@debbugs.gnu.org; Sun, 03 Feb 2019 23:01:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqVRg-0005xG-CL for guix-patches@gnu.org; Sun, 03 Feb 2019 23:01:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqVRe-0001oZ-I0 for guix-patches@gnu.org; Sun, 03 Feb 2019 23:01:20 -0500 Received: from pb-smtp20.pobox.com ([173.228.157.52]:53596) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqVRc-0001mo-Km for guix-patches@gnu.org; Sun, 03 Feb 2019 23:01:16 -0500 Received: from pb-smtp20.pobox.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 1E9A355397; Sun, 3 Feb 2019 23:01:13 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=sasl; bh=FT/FvsgdSNi9udhe6VF202+kr GI=; b=XVfhGshHx57OFmEarB6CEhcSRcg4egFIUHmsZOxzNiM2sJHumqCK3I51a zBq+N2lU9fmVasJ4ZQ/OSdY5sB4WurXz45Ahyz++PLMJj3LsDOE42c8Xvqg6PTAr 2b/WtwYOsz68tVZIGg4hZ2FK3ke3NZ0IeFHgpixavwiy9sKgQQ= Received: from pb-smtp20.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp20.pobox.com (Postfix) with ESMTP id 1816655396; Sun, 3 Feb 2019 23:01:13 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:date:message-id:mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=I3ZbvaV6NtALTUistSyBwB5QgA16fg0rL35/gvNP6Ps=; b=oLEPYFfMAX142XdCAb4vLFjBQmRPCzTLhAj/8vBOZI4YMQn0eQP44XHdEeD/5QpOT+RlSU+QpFgpfT640HXFyNVVUdzTfVbjmAWI0moPZobgKmboFhyPZsgu1mcDAo3uoGtB4gul1Cg9fbIjC7JuyCrkxqIfLCVzp300jxHAZYs= Received: from hylob.local (unknown [76.118.43.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp20.pobox.com (Postfix) with ESMTPSA id 3F87055394; Sun, 3 Feb 2019 23:01:10 -0500 (EST) (envelope-from kyle@kyleam.com) From: Kyle Meyer Date: Sun, 3 Feb 2019 23:00:52 -0500 Message-Id: <20190204040052.3195-1-kyle@kyleam.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Pobox-Relay-ID: 819B0B5C-2831-11E9-A6CD-D889C09F693B-24757444!pb-smtp20.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/time.scm (datefudge): New variable. --- I wasn't quite sure which module to place this in. Please let me know if there's a more appropriate location. gnu/packages/time.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index e491970300..948d2b995c 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2017 Nils Gillmann ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2018 Alex Vong +;;; Copyright © 2019 Kyle Meyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,10 +35,12 @@ (define-module (gnu packages time) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz)) @@ -377,3 +380,41 @@ (define-public python-aniso8601 (define-public python2-aniso8601 (package-with-python2 python-aniso8601)) + +(define-public datefudge + (package + (name "datefudge") + (version "1.22") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://salsa.debian.org/debian/datefudge.git") + (commit (string-append "debian/" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1fmd05r00wx4zc90lbi804jl7xwdl11jq2a1kp5lqimk3yyvfw4c")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test" + #:make-flags (list "CC=gcc" + (string-append "prefix=" (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-makefile + (lambda _ + (substitute* "Makefile" + ((" -o root -g root") "") + (("VERSION := \\$\\(shell dpkg-parsechangelog .*") + (string-append "VERSION = " ,version))) + #t)) + (delete 'configure)))) + (native-inputs + `(("perl" ,perl))) + (home-page "https://salsa.debian.org/debian/datefudge") + (synopsis "Pretend the system date is different") + (description + "Utility that fakes the system time by pre-loading a small library that +modifies the @code{time}, @code{gettimeofday} and @code{clock_gettime} system +calls.") + (license gpl2)))