GNU bug report logs - #35653
[PATCH] gnu: Add rcm.

Previous Next

Package: guix-patches;

Reported by: Josh Holland <josh <at> inv.alid.pw>

Date: Thu, 9 May 2019 15:40:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35653 in the body.
You can then email your comments to 35653 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35653; Package guix-patches. (Thu, 09 May 2019 15:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josh Holland <josh <at> inv.alid.pw>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 09 May 2019 15:40:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Josh Holland <josh <at> inv.alid.pw>
To: guix-patches <at> gnu.org
Cc: Josh Holland <josh <at> inv.alid.pw>
Subject: [PATCH] gnu: Add rcm.
Date: Thu,  9 May 2019 16:38:34 +0100
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")))
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#35653; Package guix-patches. (Thu, 09 May 2019 16:54:02 GMT) Full text and rfc822 format available.

Message #8 received at 35653 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Josh Holland <josh <at> inv.alid.pw>
Cc: 35653 <at> debbugs.gnu.org
Subject: Re: [bug#35653] [PATCH] gnu: Add rcm.
Date: Thu, 9 May 2019 18:52:56 +0200
[Message part 1 (text/plain, inline)]
Hi,

On Thu,  9 May 2019 16:38:34 +0100
Josh Holland <josh <at> inv.alid.pw> wrote:

> 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?

Yes, and it's not so important in which module what is.  The module
name is not part of the package name anyway, so we are mostly using
it to manage compilation complexity (sigh).  Developers can find it
using "guix edit rcm" anyway.

I try not to introduce a new module for each package because it leads
to a lot of file header duplication, and at some point the comment/code
ratio is getting ridiculous--but, technically, even that would be fine.

> This may or may not be the right way to go about things; I'd appreciate
> some feedback on that.

Looks fine.

> If there are any ideas to solve the tests, or any other issues that need
> fixing, I'm happy to re-submit the patch.

> +    (arguments '(#:tests? #f))

From your description, try (#:parallel-tests? #f) instead of (#:tests? #f).

Nice work!

Some test scripts still have /bin/sh
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35653; Package guix-patches. (Thu, 09 May 2019 18:00:02 GMT) Full text and rfc822 format available.

Message #11 received at 35653 <at> debbugs.gnu.org (full text, mbox):

From: Josh Holland <josh <at> inv.alid.pw>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35653 <at> debbugs.gnu.org
Subject: Re: [bug#35653] [PATCH] gnu: Add rcm.
Date: Thu,  9 May 2019 18:59:15 +0100
Danny Milosavljevic writes:
> Yes, and it's not so important in which module what is.

I'll just leave it in its own module for now then, and if a maintainer
wants to move it either when it's merged or later down the line that's
fine.

> From your description, try (#:parallel-tests? #f) instead of (#:tests? #f).

Oh of course, that makes perfect sense!  That fixes it and all the tests
pass now.

> Some test scripts still have /bin/sh

AFAICT the only one I'm not patching is `test/rcup-standalone.t` and
that's kind of a weird one, because it's testing the feature to output a
standalone shell script rather than run it.  Changing that would require
patching the rcup script itself and I don't think that's worth it,
especially as the script uses the bash default value syntax to allow
all the commands to be overriden.

If I'm still operating git send-email correctly, a new patch should be
attached with these changes, and a better commit message.  I also updated
`gnu/local.mk` because that seems to be a thing I forgot initially.

Thanks,
Josh






Information forwarded to guix-patches <at> gnu.org:
bug#35653; Package guix-patches. (Thu, 09 May 2019 18:00:04 GMT) Full text and rfc822 format available.

Message #14 received at 35653 <at> debbugs.gnu.org (full text, mbox):

From: Josh Holland <josh <at> inv.alid.pw>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 35653 <at> debbugs.gnu.org, Josh Holland <josh <at> inv.alid.pw>
Subject: [PATCH v2] gnu: Add rcm.
Date: Thu,  9 May 2019 18:59:16 +0100
* gnu/packages/rcm.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add rcm.scm.
---
 gnu/local.mk         |  1 +
 gnu/packages/rcm.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
 create mode 100644 gnu/packages/rcm.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 3f97397c4a..0789d74f78 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/ragel.scm			\
   %D%/packages/rails.scm			\
   %D%/packages/ratpoison.scm			\
+  %D%/packages/rcm.scm				\
   %D%/packages/rdesktop.scm			\
   %D%/packages/rdf.scm				\
   %D%/packages/re2c.scm				\
diff --git a/gnu/packages/rcm.scm b/gnu/packages/rcm.scm
new file mode 100644
index 0000000000..c61626d114
--- /dev/null
+++ b/gnu/packages/rcm.scm
@@ -0,0 +1,62 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2019 Josh Holland <josh <at> inv.alid.pw>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(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 '(#: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)))
+                  #:parallel-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")))
-- 
2.21.0





Information forwarded to guix-patches <at> gnu.org:
bug#35653; Package guix-patches. (Tue, 10 Dec 2019 06:56:01 GMT) Full text and rfc822 format available.

Message #17 received at 35653 <at> debbugs.gnu.org (full text, mbox):

From: Brett Gilio <brettg <at> posteo.net>
To: Josh Holland <josh <at> inv.alid.pw>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 35653 <at> debbugs.gnu.org
Subject: Re: [bug#35653] [PATCH v2] gnu: Add rcm.
Date: Tue, 10 Dec 2019 00:55:28 -0600
Josh Holland <josh <at> inv.alid.pw> writes:

> * gnu/packages/rcm.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add rcm.scm.
> ---
>  gnu/local.mk         |  1 +
>  gnu/packages/rcm.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 63 insertions(+)
>  create mode 100644 gnu/packages/rcm.scm
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 3f97397c4a..0789d74f78 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -398,6 +398,7 @@ GNU_SYSTEM_MODULES =				\
>    %D%/packages/ragel.scm			\
>    %D%/packages/rails.scm			\
>    %D%/packages/ratpoison.scm			\
> +  %D%/packages/rcm.scm				\
>    %D%/packages/rdesktop.scm			\
>    %D%/packages/rdf.scm				\
>    %D%/packages/re2c.scm				\
> diff --git a/gnu/packages/rcm.scm b/gnu/packages/rcm.scm
> new file mode 100644
> index 0000000000..c61626d114
> --- /dev/null
> +++ b/gnu/packages/rcm.scm
> @@ -0,0 +1,62 @@
> +;;; GNU Guix --- Functional package management for GNU
> +;;; Copyright © 2019 Josh Holland <josh <at> inv.alid.pw>
> +;;;
> +;;; This file is part of GNU Guix.
> +;;;
> +;;; GNU Guix is free software; you can redistribute it and/or modify it
> +;;; under the terms of the GNU General Public License as published by
> +;;; the Free Software Foundation; either version 3 of the License, or (at
> +;;; your option) any later version.
> +;;;
> +;;; GNU Guix is distributed in the hope that it will be useful, but
> +;;; WITHOUT ANY WARRANTY; without even the implied warranty of
> +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +;;; GNU General Public License for more details.
> +;;;
> +;;; You should have received a copy of the GNU General Public License
> +;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
> +
> +(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 '(#: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)))
> +                  #:parallel-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")))

This all LGTM! Is there any objections to pushing this? I will if it
looks good to everbody else!

-- 
Brett M. Gilio
Homepage -- https://scm.pw/
GNU Guix -- https://guix.gnu.org/




Information forwarded to guix-patches <at> gnu.org:
bug#35653; Package guix-patches. (Thu, 02 Jan 2020 15:12:01 GMT) Full text and rfc822 format available.

Message #20 received at 35653 <at> debbugs.gnu.org (full text, mbox):

From: Jakub Kądziołka <kuba <at> kadziolka.net>
To: 35653 <at> debbugs.gnu.org
Subject: Re: [PATCH v2] gnu: Add rcm.
Date: Thu, 2 Jan 2020 16:11:37 +0100
Since this patch seems to have stalled a bit, perhaps I should report
that I'm currently successfully using this patch on my system.

Regards,
Jakub Kądziołka




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 15 Jan 2020 21:44:02 GMT) Full text and rfc822 format available.

Notification sent to Josh Holland <josh <at> inv.alid.pw>:
bug acknowledged by developer. (Wed, 15 Jan 2020 21:44:02 GMT) Full text and rfc822 format available.

Message #25 received at 35653-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Josh Holland <josh <at> inv.alid.pw>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 35653-done <at> debbugs.gnu.org
Subject: Re: [bug#35653] [PATCH v2] gnu: Add rcm.
Date: Wed, 15 Jan 2020 22:42:54 +0100
Hi,

Josh Holland <josh <at> inv.alid.pw> skribis:

> * gnu/packages/rcm.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add rcm.scm.

Applied, thanks, and sorry for the delay!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Feb 2020 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.