GNU bug report logs - #51998
[PATCH] gnu: Add guile-gitlab

Previous Next

Package: guix-patches;

Reported by: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)

Date: Sat, 20 Nov 2021 14:14:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <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 51998 in the body.
You can then email your comments to 51998 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#51998; Package guix-patches. (Sat, 20 Nov 2021 14:14:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to poptsov.artyom <at> gmail.com (Artyom V. Poptsov):
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 20 Nov 2021 14:14:02 GMT) Full text and rfc822 format available.

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

From: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add guile-gitlab
Date: Sat, 20 Nov 2021 17:13:20 +0300
[Message part 1 (text/plain, inline)]
Hello Guixers,

here's my first patch for GNU Guix that adds Guile-GitLab[1] -- my Guile
module that allows to interact with GitLab Community Edition REST API
and provides a useful tool for that.

Thanks,

- avp

1. https://github.com/artyom-poptsov/guile-gitlab
[0001-gnu-Add-guile-gitlab.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Artyom "avp" Poptsov <poptsov.artyom <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51998; Package guix-patches. (Thu, 25 Nov 2021 11:30:02 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)
Cc: 51998 <at> debbugs.gnu.org
Subject: Re: bug#51998: [PATCH] gnu: Add guile-gitlab
Date: Thu, 25 Nov 2021 11:28:59 +0000
Hello Artyom,

Thanks for this first contribution! I think that there is a small issue
with the library path. The gitlab.scm files is in:

--8<---------------cut here---------------start------------->8---
/gnu/store/xn0bnrh23iscxy7xsvzqffyjy4wqy1q6-guile-gitlab-0.1.0/share/guile-gitlab/gitlab.scm
--8<---------------cut here---------------end--------------->8---

whereas it should be in:

--8<---------------cut here---------------start------------->8---
/gnu/store/xn0bnrh23iscxy7xsvzqffyjy4wqy1q6-guile-gitlab-0.1.0/share/guile/site/2.2/gitlab.scm
--8<---------------cut here---------------end--------------->8---

I also have the following error when running gitlab-cli:

--8<---------------cut here---------------start------------->8---

           0 (scm-error misc-error #f "~A ~S" ("no code for modu…" …) …)

ERROR: In procedure scm-error:
no code for module (gitlab)
--8<---------------cut here---------------end--------------->8---

that should be solved by adjusting the library path.

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#51998; Package guix-patches. (Fri, 26 Nov 2021 19:21:02 GMT) Full text and rfc822 format available.

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

From: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 51998 <at> debbugs.gnu.org
Subject: Re: bug#51998: [PATCH] gnu: Add guile-gitlab
Date: Fri, 26 Nov 2021 22:20:17 +0300
[Message part 1 (text/plain, inline)]
Hello Mathieu,

thank you for the feedback.

I fixed my patch, please find the updated version attached.

- Artyom

[0001-gnu-Add-guile-gitlab.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Artyom "avp" Poptsov <poptsov.artyom <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51998; Package guix-patches. (Sat, 27 Nov 2021 11:22:01 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)
Cc: 51998 <at> debbugs.gnu.org
Subject: Re: bug#51998: [PATCH] gnu: Add guile-gitlab
Date: Sat, 27 Nov 2021 11:21:30 +0000
Привет Артём,

Спасибо за вторую версию.

> +                      (substitute* (find-files "." "Makefile.in")
> +                        (("^guilesitedir = .*$")
> +                         "guilesitedir = \
> +$(datadir)/guile/site/$(GUILE_EFFECTIVE_VERSION)\n")
> +                        (("guilemoduledir =.*guile/site" all)

Any reason not to write this directly in the project Makefile.am? For
instance, in Guile-Parted Makefile.am, there is:

--8<---------------cut here---------------start------------->8---
include guile.am

moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
--8<---------------cut here---------------end--------------->8---

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#51998; Package guix-patches. (Sat, 27 Nov 2021 19:03:01 GMT) Full text and rfc822 format available.

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

From: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 51998 <at> debbugs.gnu.org
Subject: Re: bug#51998: [PATCH] gnu: Add guile-gitlab
Date: Sat, 27 Nov 2021 22:02:05 +0300
[Message part 1 (text/plain, inline)]
Hello Mathieu,

I just released Guile-GitLab 0.2.0[1] with fixed Autotools scripts.  Thanks
for the hints, I appreciate it.

Could you please check if my package is OK?

- Artyom

P.S.

> Спасибо за вторую версию.
Ты знаешь русский язык?

1. https://github.com/artyom-poptsov/guile-gitlab/releases/tag/v0.2.0
[0001-gnu-Add-guile-gitlab.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Artyom "avp" Poptsov <poptsov.artyom <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Sun, 28 Nov 2021 10:05:01 GMT) Full text and rfc822 format available.

Notification sent to poptsov.artyom <at> gmail.com (Artyom V. Poptsov):
bug acknowledged by developer. (Sun, 28 Nov 2021 10:05:01 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)
Cc: 51998-done <at> debbugs.gnu.org
Subject: Re: bug#51998: [PATCH] gnu: Add guile-gitlab
Date: Sun, 28 Nov 2021 11:04:29 +0100
Hello Artyom,

I edited a bit the package definition:

* Added bash-minimal to the inputs as suggested by "guix lint".
* Moved guile-lib to the inputs.
* Added json and tls to the wrap so that they can always be found.
* Wrapped a few lines.

and pushed as a0352562505cfced63ca415e2bb4cbce29f7fc35.

Note that I also have the following error on two different Gitlab
servers:

--8<---------------cut here---------------start------------->8---
mathieu <at> meije ~/guix [env]$ gitlab-cli project list --token "xxx" --server "https://gitlab.com"
Backtrace:
           4 (apply-smob/1 #<catch-closure 7fc671915920>)
In ice-9/boot-9.scm:
    705:2  3 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
    619:8  2 (_ #(#(#<directory (guile-user) 7fc6715ad140>)))
In gitlab/cli/project.scm:
   116:19  1 (gitlab-cli-project/list _ _)
In gitlab/api/common.scm:
    74:21  0 (api-get #<<session> 7fc6715e2cf0> "/api/v4/projects" # ?)

gitlab/api/common.scm:74:21: In procedure api-get:
In procedure vector-length: Wrong type argument in position 1 (expecting
vector): (#<hash-table 7fc67039eda0 91/113> #<hash-table 7fc67067e060
91/113> #<hash-table 7fc67032a8e0 91/113> #<hash-table 7fc670376e20
91/113> #<hash-table 7fc67039062 ...
--8<---------------cut here---------------end--------------->8---

Are you expecting a specific Gitlab revision or the error is elsewhere?

Thanks,

Mathieu




Information forwarded to guix-patches <at> gnu.org:
bug#51998; Package guix-patches. (Sun, 28 Nov 2021 18:08:02 GMT) Full text and rfc822 format available.

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

From: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 51998-done <at> debbugs.gnu.org
Subject: Re: bug#51998: [PATCH] gnu: Add guile-gitlab
Date: Sun, 28 Nov 2021 21:07:27 +0300
[Message part 1 (text/plain, inline)]
Hello Mathieu,

> I edited a bit the package definition:

> * Added bash-minimal to the inputs as suggested by "guix lint".
> * Moved guile-lib to the inputs.
> * Added json and tls to the wrap so that they can always be found.
> * Wrapped a few lines.

> and pushed as a0352562505cfced63ca415e2bb4cbce29f7fc35.

Thanks for helping me with this package!  I'm looking forward to package
other projects for GNU Guix in the near future.

> Note that I also have the following error on two different Gitlab
> servers:

that's strange as I don's see this error; tested 'gitlab-cli' on two
servers as well -- one where I have admin rights and gitlab.com with a
regular non-admin token.

I think I need to investigate the problem further, but for now I fixed
another bug that lead to 'guile-cli' fails if a user passed non-existing
command (like "projects" instead of "project".)

So here's a patch attached that updates Guile-GitLab to 0.2.1 with this
bugfix.

- Artyom

[0001-gnu-guile-gitlab-Update-to-0.2.1.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
-- 
Artyom "avp" Poptsov <poptsov.artyom <at> gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51998; Package guix-patches. (Sun, 28 Nov 2021 21:37:02 GMT) Full text and rfc822 format available.

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

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: poptsov.artyom <at> gmail.com (Artyom V. Poptsov)
Cc: 51998-done <at> debbugs.gnu.org
Subject: Re: bug#51998: [PATCH] gnu: Add guile-gitlab
Date: Sun, 28 Nov 2021 22:36:30 +0100
Hey,

> I think I need to investigate the problem further, but for now I fixed
> another bug that lead to 'guile-cli' fails if a user passed non-existing
> command (like "projects" instead of "project".)

Nice, also experienced that issue. Regarding the issue I reported, this
is related to the Guile-Json version. Seems that you are assuming array
data to be represented as vectors whereas with Guile-Json 1 they are
represented as lists.

I took the liberty to switch to guile2.2-json package that uses Guile
Json 4.5.2 and applied your patch.

Thanks,

Mathieu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 27 Dec 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 82 days ago.

Previous Next


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