From patchwork Thu May 9 15:38:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Josh Holland X-Patchwork-Id: 13937 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 961D116FD6; Thu, 9 May 2019 16:40:11 +0100 (BST) 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=ham 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 ACE8F16F86 for ; Thu, 9 May 2019 16:40:07 +0100 (BST) Received: from localhost ([127.0.0.1]:56655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOl9S-0004dO-RB for patchwork@mira.cbaines.net; Thu, 09 May 2019 11:40:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOl9P-0004bo-ER for guix-patches@gnu.org; Thu, 09 May 2019 11:40:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOl9O-0002MJ-4b for guix-patches@gnu.org; Thu, 09 May 2019 11:40:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50811) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOl9O-0002M9-0g for guix-patches@gnu.org; Thu, 09 May 2019 11:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hOl9N-00080O-RQ for guix-patches@gnu.org; Thu, 09 May 2019 11:40:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35653] [PATCH] gnu: Add rcm. Resent-From: Josh Holland Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 May 2019 15:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35653 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35653@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155741634330674 (code B ref -1); Thu, 09 May 2019 15:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 May 2019 15:39:03 +0000 Received: from localhost ([127.0.0.1]:36119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOl8Q-0007yf-CT for submit@debbugs.gnu.org; Thu, 09 May 2019 11:39:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hOl8N-0007y8-Hj for submit@debbugs.gnu.org; Thu, 09 May 2019 11:39:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:51938) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hOl8I-0001mI-DW for submit@debbugs.gnu.org; Thu, 09 May 2019 11:38:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOl8H-00040j-2a for guix-patches@gnu.org; Thu, 09 May 2019 11:38:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOl8F-0001j7-Ni for guix-patches@gnu.org; Thu, 09 May 2019 11:38:53 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:57831) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hOl8F-0001hN-4u for guix-patches@gnu.org; Thu, 09 May 2019 11:38:51 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 940DC23AA3; Thu, 9 May 2019 11:38:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 09 May 2019 11:38:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inv.alid.pw; h= from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=mesmtp; bh=rQ2Q5Jg9v/Walzaq/jsEFQi XocXsP8y1x2rQlBwSly0=; b=Hw6QRSqjfQ0PHKAZG0gVG6U5kVtpDHXm2tWgRV6 c5cOTm8iGkEaIudFoveEX8M6q/DrdVWcJEb2hgnBhB5CPcQnZ2nfuxJFoqMyxRjN SqNTJwm7ru3ujwDtJMaagMAQ5jORPI2v3HBt8dcCtkwHf3NoBfiRMUFMC3PSe6h8 Ia6I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=rQ2Q5J g9v/Walzaq/jsEFQiXocXsP8y1x2rQlBwSly0=; b=J5NqdGDWW999d77uT23hr9 6zTGb1/V1YD/SMiZSVhyVN+ONKS9TCz+V2Ez4DEULppYe8k625hYo8caksaYYZhJ WBbALZzewFYce/bVT5bKBGNw/YlSC4FmyYDdjnkMNPuOwfkeTu7vawusnZF2M8N7 hFYcmvVzLGpreGiXwos3b8CkdtcNyMZp0nZTcrCwceulwJNVGgT0LiP9AWMaNqRN QJvZmIINoxvNTyOOJuwaAfINGGMFq2AEV35AYCWCE0cnHEgw2kkoN51ouR7fZch7 MOQWksbLTuO6c1RoL6JqpID7dC5RM+YjGhLhByKtbY5/c24+79hCGs8SZpOooUVw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrkeeigddvlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenfg hrlhcuvffnffculddutddmnecujfgurhephffvufffkffogggtgfesthekredtredtjeen ucfhrhhomheplfhoshhhucfjohhllhgrnhguuceojhhoshhhsehinhhvrdgrlhhiugdrph ifqeenucffohhmrghinhepghhithhhuhgsrdhiohdpghhithhhuhgsrdgtohhmnecukfhp peduleeirdehvddrkeegrddvieenucfrrghrrghmpehmrghilhhfrhhomhepjhhoshhhse hinhhvrdgrlhhiugdrphifnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost.localdomain (ip-26-84-52-196.southampton.uk.amsterdamresidential.com [196.52.84.26]) by mail.messagingengine.com (Postfix) with ESMTPA id 6232F8005C; Thu, 9 May 2019 11:38:48 -0400 (EDT) From: Josh Holland Date: Thu, 9 May 2019 16:38:34 +0100 Message-Id: <20190509153834.26585-1-josh@inv.alid.pw> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: , Cc: Josh Holland Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi, Below is the first package definition I have written for Guix, defining the dotfile management suite rcm[0]. I'm sure there are changes to be made before it can be merged, and I did have a few issues while I was writing it. However, it does now build, install and run fine on my local machine. First, I wasn't sure whether it fits into an existing module already. I had a look through the contents of gnu/packages/ but I didn't see anything that really stuck out. Perhaps it fits into shellutils? Second, I had a lot of trouble with the test suite. The first thing that I had to solve was some hardcoded paths in the test cases, which I solved with the following argument to `#:phases`: (modify-phases %standard-phases (add-after 'patch-source-shebangs 'patch-tests (lambda _ (substitute* '("test/rcrc-tilde.t" "test/rcdn-hooks-run-in-order.t" "test/rcup-hooks-run-in-order.t") (("/bin/sh") (which "sh"))) (substitute* "test/rcup-hooks.t" (("/usr/bin/env") (which "env"))) #t))) This may or may not be the right way to go about things; I'd appreciate some feedback on that. However, I was still having issues with certain tests (`test/rcup-hooks.t`, `test/rcdn-hooks.t` and possibly others) non-deterministically failing trying to create and read /tmp/test files. I'm not sure how to fix this, or even what's causing it: every time I tried to reproduce it by hand the tests passed. I assume that something is deleting /tmp/test while the test is running but I'm not sure what. In the end I just disabled the tests, since even passing XFAIL_TESTS doesn't work as sometimes the tests just pass. If there are any ideas to solve the tests, or any other issues that need fixing, I'm happy to re-submit the patch. Thanks, Josh [0]: http://thoughtbot.github.io/rcm/ -- >8 -- Subject: [PATCH] gnu: Add rcm. * gnu/packages/rcm.scm (rcm): New variable. --- gnu/packages/rcm.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 gnu/packages/rcm.scm diff --git a/gnu/packages/rcm.scm b/gnu/packages/rcm.scm new file mode 100644 index 0000000000..180fff5ed9 --- /dev/null +++ b/gnu/packages/rcm.scm @@ -0,0 +1,33 @@ +(define-module (gnu packages rcm) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix licenses) + #:use-module (gnu packages python-xyz) + #:use-module (gnu packages perl)) + +(define-public rcm + (package + (name "rcm") + (version "1.3.3") + (source (origin + (method url-fetch) + (uri (string-append "https://thoughtbot.github.io/rcm/dist/rcm-" + version ".tar.gz")) + (sha256 + (base32 "1bqk7rrp1ckzvsvl9wghsr77m8xl3a7yc5gqdsisz492dx2j8mck")))) + (build-system gnu-build-system) + (arguments '(#:tests? #f)) + (native-inputs `(("perl" ,perl) + ("python-cram" ,python-cram))) + (synopsis "Management suite for dotfiles") + (description "The rcm suite of tools is for managing dotfiles directories. This is +a directory containing all the @code{.*rc} files in your home directory +(@code{.zshrc}, @code{.vimrc}, and so on). These files have gone by many +names in history, such as “rc files” because they typically end in rc +or “dotfiles” because they begin with a period. This suite is useful +for committing your rc files to a central repository to share, but it also +scales to a more complex situation such as multiple source directories +shared between computers with some host-specific or task-specific files.") + (license bsd-3) + (home-page "https://github.com/thoughtbot/rcm")))