Message ID | CANNGBfmtyGVoYSC+QkqvShkOZijyr0XRwp6ZML+ks-ndUEAPdQ@mail.gmail.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D2E5527BBEA; Thu, 9 Jun 2022 16:39:01 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 40A0127BBE9 for <patchwork@mira.cbaines.net>; Thu, 9 Jun 2022 16:39:01 +0100 (BST) Received: from localhost ([::1]:55464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1nzKFQ-0006Rf-Cp for patchwork@mira.cbaines.net; Thu, 09 Jun 2022 11:39:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48448) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nzJpL-0007kP-To for guix-patches@gnu.org; Thu, 09 Jun 2022 11:12:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53477) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nzJpK-000639-O9 for guix-patches@gnu.org; Thu, 09 Jun 2022 11:12:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1nzJpK-0006o6-Jr for guix-patches@gnu.org; Thu, 09 Jun 2022 11:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55874] [PATCH] Add timewarrior 1.4.3 Resent-From: Zac Berkowitz <zac.berkowitz@gmail.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 09 Jun 2022 15:12:02 +0000 Resent-Message-ID: <handler.55874.B.165478748726117@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55874 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55874@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165478748726117 (code B ref -1); Thu, 09 Jun 2022 15:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jun 2022 15:11:27 +0000 Received: from localhost ([127.0.0.1]:47374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1nzJok-0006nB-RC for submit@debbugs.gnu.org; Thu, 09 Jun 2022 11:11:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:34950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <zac.berkowitz@gmail.com>) id 1nzJoj-0006n2-72 for submit@debbugs.gnu.org; Thu, 09 Jun 2022 11:11:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <zac.berkowitz@gmail.com>) id 1nzJoj-0006ub-1v for guix-patches@gnu.org; Thu, 09 Jun 2022 11:11:25 -0400 Received: from mail-il1-x12d.google.com ([2607:f8b0:4864:20::12d]:33337) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <zac.berkowitz@gmail.com>) id 1nzJod-0005sU-N4 for guix-patches@gnu.org; Thu, 09 Jun 2022 11:11:24 -0400 Received: by mail-il1-x12d.google.com with SMTP id s1so18999033ilj.0 for <guix-patches@gnu.org>; Thu, 09 Jun 2022 08:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=bT0sR78/3tVZM0k9ozqOAWTFPbh2UYDA+HoWlVY7b/E=; b=QPMGtqZ8fRWRst/Wx1FYBgFV18cFl7YQAytYnnaGYwTit8mfCGF6/nu/VnXWQP2ELM byJAw8s3F3FfR1gAq+8MqAQRPMGieW/F9zLHSmSp1OXNWL/AwrVrbYk90z5ZudZ320Rt qCMdf8nEN8uWx7wjSHhpu+jSIgIut54eeycOcJFFRjNzngxm2TdrfdDWQFxAR6JMaPwl EpxPlHCWTMcpJH68D0U3SSjerzL5YyPFxQFXtk4oJSg3yzSDP8UiaHCb3MO+/NYyI2lI gS6kj6vfNrTs8b3NdgmZoDemzH6aFbH5yc4WtnNopxImlTYw8L09rx65cMVvFkrKf1uL EnhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=bT0sR78/3tVZM0k9ozqOAWTFPbh2UYDA+HoWlVY7b/E=; b=Ny18RPLreP8Nf0Coet0iLmiRDT3VKX7l+nNbtwjrXlyV2Urfynryrh0cW1/Gmec+hD 4neXUA/Q3jEpv+yoenAm2En8bHdlzaaAfyrgLvE8NpC1C2cKguQ/+NkkaGMkMfrGjZCt iGQ8B7GoUxxp6stCj9ZPCeVbUk63D5EP93YnbusC6fRXQhCIVQQdKIAwxugw6kg7dHzX SoRxnd4yIGXLWMwRfB2xbz2aM6KrGXK2NSEtfcOL2mMpcNeIkQMPwefN1rXXpxvgPylR 4BTm8Dr+nVsTN4uXSJnVL5s+9D19fF1ZXODDVmcpmFszRhGQIUNa1CXttsJtvRuoZg2G G/9g== X-Gm-Message-State: AOAM531zOvx3lZLxkD+jv3HCCI5/IciMb8gzYBeZhFRYdU+B0pgj4Zk2 lAswm2zx2SujjNYg/koulUXxDjw3JUezcNnCvfMzo3Au X-Google-Smtp-Source: ABdhPJzkpzIAcu0pm3Fz1f+9YB7p7aUakdoWpw2kFTifM9U3nPelW3fFSxWallp1uTgVme0LuZy5qdrWyGeO1tsuuSQ= X-Received: by 2002:a05:6e02:19cd:b0:2d3:b7fc:5e7 with SMTP id r13-20020a056e0219cd00b002d3b7fc05e7mr22899313ill.286.1654787475144; Thu, 09 Jun 2022 08:11:15 -0700 (PDT) MIME-Version: 1.0 From: Zac Berkowitz <zac.berkowitz@gmail.com> Date: Thu, 9 Jun 2022 11:11:04 -0400 Message-ID: <CANNGBfmtyGVoYSC+QkqvShkOZijyr0XRwp6ZML+ks-ndUEAPdQ@mail.gmail.com> Content-Type: multipart/mixed; boundary="000000000000a3658505e1053b95" Received-SPF: pass client-ip=2607:f8b0:4864:20::12d; envelope-from=zac.berkowitz@gmail.com; helo=mail-il1-x12d.google.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#55874] Add timewarrior 1.4.3
|
|
Commit Message
Zac Berkowitz
June 9, 2022, 3:11 p.m. UTC
Comments
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]: > + (method url-fetch) > + (uri (string-append > + > "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v > " version > + "/timew-" version ".tar.gz")) > + (sha256 (base32 > + > "0lyaqzcg8np2fpsmih0hlkjxd3qbadc7khr24m1pq9lsdhq7xpy4")))) I can confirm the hash matches, and hashing the file with sha256sum agrees with the hash mentioned on <https://timewarrior.net/releases/>.
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]: > + (native-inputs > + `(("ruby-asciidoctor" ,ruby-asciidoctor) > + ("python" ,python))) > + (inputs > + `(("gnutls" ,gnutls) > + ("util-linux:lib" ,util-linux "lib"))) Nowadays, these can be simplified to. (native-inputs (list ruby-asciidoctor python)) Where did you learn about the old form? Likewise (if I remember the syntax right): (list gnutls `(,util-linux "lib")) Greetings, Maxime.
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]: + (delete 'install-license-files) ; Already installed by package Not a problem I think -- at worst, the license file will appear twice, but identical files are automatically deduplicated, and even if not, they are relatively small files anyway. Greetings, Maxime.
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]: > + (substitute* "src/commands/CMakeLists.txt" > + (("/bin/sh") (which "sh")))))))) In this context, (which "sh") can maybe be simplified to just "sh", not that it really matters. Greetings, Maxime.
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> * gnu/packages/task-management.scm (timewarrior): New variable
This contains a binary src/libshared/src/wcwidth.h, which should be
built from source with the generator
https://github.com/ridiculousfish/widecharwidth/ instead.
Greetings,
Maxime.
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]:
> * gnu/packages/task-management.scm (timewarrior): New variable
This package is irreproducible, see
https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/patches/time-sensitive-tests.patch
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]: > + (native-inputs > + `(("ruby-asciidoctor" ,ruby-asciidoctor) > + ("python" ,python))) According to Debian, additional (native-)inputs are required: https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/tests/control Are the tests actually run and can the man page be read? Greetings, Maxime.
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]: > + (method url-fetch) > + (uri (string-append > + > "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v > " version > + "/timew-" version ".tar.gz")) > + (sha256 (base32 The tests are missing: https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/README.source so maybe use the source code on git instead?
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]: > + (origin > + (method url-fetch) > + (uri (string-append > + > "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v > " version > + "/timew-" version ".tar.gz")) > + (sha256 (base32 Is the bash completion installed in the right location? According to Debian, it isn't: https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/timewarrior.bash-completion
Zac Berkowitz schreef op do 09-06-2022 om 11:11 [-0400]: > + (native-inputs > + `(("ruby-asciidoctor" ,ruby-asciidoctor) > + ("python" ,python))) Are the scripts in ext/*.py installed somewhere? If so, 'python' needs to be in 'inputs' instead for cross-compilation.
According to archlinux, there are some bogus man pages: https://archlinuxarm.org/packages/aarch64/timew/files/PKGBUILD are they absent here? (Also, archlinux has the same hash!)
Maxime, Thanks for all of the great feedback -- seems like "works for me" wasn't nearly good enough in this case! I'll chip away at these issues next week when I've got some time. Is submitting a new patch on this bug # the best way forward? Or should I close this and open a new patch issue when it's ready? Cheers, Zac On Thu, Jun 9, 2022 at 4:17 PM Maxime Devos <maximedevos@telenet.be> wrote: > > According to archlinux, there are some bogus man pages: > > https://archlinuxarm.org/packages/aarch64/timew/files/PKGBUILD > > are they absent here? (Also, archlinux has the same hash!)
Zac Berkowitz schreef op do 09-06-2022 om 21:36 [-0400]: > Maxime, > > Thanks for all of the great feedback -- seems like "works for me" > wasn't nearly good enough in this case! I'll chip away at these > issues next week when I've got some time. Is submitting a new patch > on this bug # the best way forward? Or should I close this and open a > new patch issue when it's ready? Send it as a v2 to 55874@, then all the relevant information is kept together at <https://issues.guix.gnu.org/55874>. Greetings, Maxime.
Maxime, Ended up having a bit of time today to look through what you brought up. Thanks again for it! >> + (native-inputs >> + `(("ruby-asciidoctor" ,ruby-asciidoctor) >> + ("python" ,python))) > > According to Debian, additional (native-)inputs are required: > > https://salsa.debian.org/tasktools-team/timew/-/blob/master/debian/tests/control > > Are the tests actually run and can the man page be read? According to the source (https://github.com/GothenburgBitFactory/timewarrior/blob/develop/INSTALL) asciidoctor is required to build the docs, but python is not a requirement at runtime. I'm able to run the timew executable in a pure shell without moving python to the input list, so this seems to be a debian issue? The python scripts in ext/ are completely optional according to the README in that same directory. Like taskwarrior, timewarrior can execute python scripts as hooks in response to various commands, but they're not necessary for base use. Maybe this is why debian adds the python requirement? So hooks just work out of the box? How does guix deal with optional dependencies like this? Tests are run and pass, but that doesn't rule out determinism issues, I'll see what debian did to address that. man pages are not available, I'll correct that. >> + (native-inputs >> + `(("ruby-asciidoctor" ,ruby-asciidoctor) >> + ("python" ,python))) >> + (inputs >> + `(("gnutls" ,gnutls) >> + ("util-linux:lib" ,util-linux "lib"))) > > Nowadays, these can be simplified to. > > (native-inputs (list ruby-asciidoctor python)) > > Where did you learn about the old form? Wouldn't say "learn" - I'm very new to lisps! The code here is mostly adapted from taskwarrior (same developer) and other snippets from gnu/packages. I'm sure I grep'd for another package that required asciidoctor and adapted their portion of the code. >>+ (delete 'install-license-files) ; Already installed by >> package > > Not a problem I think -- at worst, the license file will appear twice, > but identical files are automatically deduplicated, and even if not, they > are relatively small files anyway. This is from taskwarrior from the same developer and has a similar build setup. Seems like both packages should be consistent, but I'm happy to remove this directive if needed. >> + (substitute* "src/commands/CMakeLists.txt" >> + (("/bin/sh") (which "sh")))))))) > > In this context, (which "sh") can maybe be simplified to just "sh", not > that it really matters. Ok. On Fri, Jun 10, 2022 at 3:49 AM Maxime Devos <maximedevos@telenet.be> wrote: > > Zac Berkowitz schreef op do 09-06-2022 om 21:36 [-0400]: > > Maxime, > > > > Thanks for all of the great feedback -- seems like "works for me" > > wasn't nearly good enough in this case! I'll chip away at these > > issues next week when I've got some time. Is submitting a new patch > > on this bug # the best way forward? Or should I close this and open a > > new patch issue when it's ready? > > Send it as a v2 to 55874@, then all the relevant information is kept > together at <https://issues.guix.gnu.org/55874>. > > Greetings, > Maxime.
Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]: > The python scripts in ext/ are completely optional according to the > README in that same directory. Like taskwarrior, timewarrior can > execute python scripts as hooks in response to various commands, but > they're not necessary for base use. > Maybe this is why debian adds the python requirement? So hooks just > work out of the box? How does guix deal with optional dependencies > like this? > If it increases the closure size a lot and does not provide much extra functionality, the extra dependency (and the components that require that dependency) is removed. (Alternatively the ext/ scripts can be changed to use the 'python' in $PATH instead of a baked-in 'python', though such things are avoided where feasible for robustness). Even if they are optional, adding python might be required such that the _correct_ python is used when cross-compiling. As a test, you could try running "guix gc --references" on the timewarrior store item -- if the output contains python, the ext/... is installed with python. Probably most people would have python anyway, so I don't think it has to be removed. Looking at the output of "guix gc --references", it does indeed use python from somewhere. Greetings, Maxime.
Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]: > According to the source > (https://github.com/GothenburgBitFactory/timewarrior/blob/develop/INSTALL) > asciidoctor is required to build the docs, but python is not a > requirement at runtime. Then something appears to be broken somewhere, because I'm not seeing any docs (except for some README) in </gnu/store/n2hl121g9qgvdpmx4qmsfr1d77hrpxps-timewarrior-1.4.3/>. Greetings, Maxime.
Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]: > The python scripts in ext/ are completely optional according to the > README in that same directory. Like taskwarrior, timewarrior can > execute python scripts as hooks in response to various commands, but > they're not necessary for base use. Two comments: * the scripts are installed in share/doc/timew, so I don't think they are actually automatically or discoverable by the user, so FWIW as-is they can be removed (removing the reference to python). Alternatively you could look into making them functional, as some other distros do. * the scripts do subprocess.call(['timew', ...]). For robustness, if these scripts are kept, the 'timew' needs to be replaced by the /gnu/store/.../bin/timew (by using 'substitute*' in a phase). Greetings, Maxime.
Zac Berkowitz schreef op vr 10-06-2022 om 10:04 [-0400]: > Wouldn't say "learn" - I'm very new to lisps! The code here is mostly > adapted from taskwarrior (same developer) and other snippets from > gnu/packages. I'm sure I grep'd for another package that required > asciidoctor and adapted their portion of the code. > Ok, not all old packages have been converted yet.
From dc3cd50a62ddce3fcc2ea9c374036192411b833a Mon Sep 17 00:00:00 2001 From: Zac Berkowitz <zac.berkowitz@gmail.com> Date: Fri, 13 May 2022 11:56:51 -0400 Subject: [PATCH] gnu: Add timewarrior. * gnu/packages/task-management.scm (timewarrior): New variable --- gnu/packages/task-management.scm | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/task-management.scm b/gnu/packages/task-management.scm index aeedbfbe6a..3a21c1a44d 100644 --- a/gnu/packages/task-management.scm +++ b/gnu/packages/task-management.scm @@ -38,6 +38,7 @@ (define-module (gnu packages task-management) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages ruby) #:use-module (gnu packages time) #:use-module (gnu packages tls) #:use-module (guix download) @@ -145,6 +146,43 @@ (define-public taskwarrior and querying data, exposing task data in multiple formats to other tools.") (license license:expat))) +(define-public timewarrior + (package + (name "timewarrior") + (version "1.4.3") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/GothenburgBitFactory/timewarrior/releases/download/v" version + "/timew-" version ".tar.gz")) + (sha256 (base32 + "0lyaqzcg8np2fpsmih0hlkjxd3qbadc7khr24m1pq9lsdhq7xpy4")))) + (build-system cmake-build-system) + (native-inputs + `(("ruby-asciidoctor" ,ruby-asciidoctor) + ("python" ,python))) + (inputs + `(("gnutls" ,gnutls) + ("util-linux:lib" ,util-linux "lib"))) + ;; (list gnutls + ;; `(,util-linux "lib"))) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'install-license-files) ; Already installed by package + (add-after 'patch-source-shebangs 'patch-cmake-shell + (lambda _ + (substitute* "src/commands/CMakeLists.txt" + (("/bin/sh") (which "sh")))))))) + (home-page "https://timewarrior.net") + (synopsis "Command line utility to track and report time") + (description + "Timewarrior is a command line time tracking application, which allows +you to record time spent on activities. You may be tracking your time for +curiosity, or because your work requires it.") + (license license:expat))) + (define-public worklog (let ((commit "0f545ad6697ef4de7f68d92cd7cc5c6a4c60517b") (revision "1")) -- 2.36.1