[PATCH 1/3] gnu: go-github-com-godbus-dbus: Update to 5.0.4.

  • Open
  • quality assurance status badge
Details
3 participants
  • Sarah Morgensen
  • John Kehayias
  • Nguy?n Gia Phong
Owner
unassigned
Submitted by
Sarah Morgensen
Severity
normal
S
S
Sarah Morgensen wrote on 13 Aug 2021 05:06
(address . guix-patches@gnu.org)
5d1fcc896c0f6f63e1664f0eadabf73f0965110b.1628823527.git.iskarian@mgsn.dev
* gnu/packages/golang.scm (go-github-com-godbus-dbus): Update to 5.0.4.
---
While I was updating this, I renamed it to match the proper import path (so
the Go importer sees this package), and fixed those pesky D-Bus tests.

--
Sarah
gnu/packages/golang.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f4cd30c662..15826514bc 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7424,7 +7424,7 @@ and @code{ioutil} packages that is easy to test.")
(define-public go-github-com-godbus-dbus
(package
(name "go-github-com-godbus-dbus")
- (version "5.0.3")
+ (version "5.0.4")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -7433,7 +7433,7 @@ and @code{ioutil} packages that is easy to test.")
(file-name (git-file-name name version))
(sha256
(base32
- "1bkc904073k807yxg6mvqaxrr6ammmhginr9p54jfb55mz3hfw3s"))))
+ "0znax8kskb5gmp5fj75w56bc9p7b22wrdswzlh4d04sprlc471yi"))))
(build-system go-build-system)
(arguments
`(#:tests? #f ;no /var/run/dbus/system_bus_socket

base-commit: d87d6d68128c53a95fe09c3a4381575646c0f368
--
2.31.1
S
S
Sarah Morgensen wrote on 13 Aug 2021 05:12
[PATCH 2/3] gnu: Rename go-github-com-godbus-dbus to go-github-com-godbus-dbus-v5.
(address . 50035@debbugs.gnu.org)
1b0b614cc139e92b3a7f85de4bd9ade96f1678f6.1628823527.git.iskarian@mgsn.dev
The proper module name now includes "-v5" (see project's go.mod). Change
the variable/package name to help the Go importer find it.

* gnu/packages/golang.scm (go-github-com-godbus-dbus): Rename to...
(go-github-com-godbus-dbus-v5): ...this.
(go-github-com-zalando-go-keyring)[native-inputs]: Adjust accordingly.
* gnu/packages/configuration-management.scm (chezmoi): Likewise.
---
gnu/packages/configuration-management.scm | 2 +-
gnu/packages/golang.scm | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

Toggle diff (40 lines)
diff --git a/gnu/packages/configuration-management.scm b/gnu/packages/configuration-management.scm
index 9aee13a172..8b4ba2b71e 100644
--- a/gnu/packages/configuration-management.scm
+++ b/gnu/packages/configuration-management.scm
@@ -91,7 +91,7 @@
("go-github-com-twpayne-go-xdg" ,go-github-com-twpayne-go-xdg)
("go-github-com-yuin-goldmark" ,go-github-com-yuin-goldmark)
("go-github-com-zalando-go-keyring" ,go-github-com-zalando-go-keyring)
- ("go-github-com-godbus-dbus" ,go-github-com-godbus-dbus)
+ ("go-github-com-godbus-dbus-v5" ,go-github-com-godbus-dbus-v5)
("go-etcd-io-bbolt" ,go-etcd-io-bbolt)
("go-golang-org-x-crypto" ,go-golang-org-x-crypto)
("go-golang-org-x-net" ,go-golang-org-x-net)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 15826514bc..359c5a987d 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7421,9 +7421,9 @@ and @code{ioutil} packages that is easy to test.")
@uref{freedesktop.org}.")
(license license:expat)))
-(define-public go-github-com-godbus-dbus
+(define-public go-github-com-godbus-dbus-v5
(package
- (name "go-github-com-godbus-dbus")
+ (name "go-github-com-godbus-dbus-v5")
(version "5.0.4")
(source (origin
(method git-fetch)
@@ -7464,7 +7464,7 @@ bindings for the D-Bus message bus system.")
`(#:tests? #f ;XXX: Fix dbus tests
#:import-path "github.com/zalando/go-keyring"))
(native-inputs
- `(("go-github-com-godbus-dbus" ,go-github-com-godbus-dbus)
+ `(("go-github-com-godbus-dbus-v5" ,go-github-com-godbus-dbus-v5)
("dbus" ,dbus)))
(home-page "https://github.com/zalando/go-keyring/")
(synopsis "Library for working with system keyring")
--
2.31.1
S
S
Sarah Morgensen wrote on 13 Aug 2021 05:12
[PATCH 3/3] gnu: go-github-com-godbus-dbus-v5: Fix and enable tests.
(address . 50035@debbugs.gnu.org)
e9b33f991a3ce9a76b7e977783f34a756deb5efa.1628823527.git.iskarian@mgsn.dev
Disable system D-Bus tests. Fix session D-Bus tests by running them
within our own session.

* gnu/packages/golang.scm (go-github-com-godbus-dbus-v5)[source]: Add
snippet to disable system D-Bus tests.
[arguments]: Enable tests, override 'check phase to run tests within a
dbus session.
---
gnu/packages/golang.scm | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 359c5a987d..28ead635f2 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -7431,13 +7431,27 @@ and @code{ioutil} packages that is easy to test.")
(url "https://github.com/godbus/dbus")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Disable tests which require a system D-Bus instance.
+ (substitute* "conn_test.go"
+ (("func TestSystemBus")
+ "func DisabledTestSystemBus")
+ (("func TestConnectSystemBus")
+ "func DisabledTestConnectSystemBus"))))
(sha256
(base32
"0znax8kskb5gmp5fj75w56bc9p7b22wrdswzlh4d04sprlc471yi"))))
(build-system go-build-system)
(arguments
- `(#:tests? #f ;no /var/run/dbus/system_bus_socket
- #:import-path "github.com/godbus/dbus"))
+ `(#:import-path "github.com/godbus/dbus"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (when tests?
+ (invoke "dbus-run-session" "--" "go" "test" import-path)))))))
(native-inputs
`(("dbus" ,dbus))) ;dbus-launch
(home-page "https://github.com/godbus/dbus/")
--
2.31.1
J
J
John Kehayias wrote on 13 Aug 2021 21:12
Re: [PATCH 1/3] gnu: go-github-com-godbus-dbus: Update to 5.0.4.
(name . 50035@debbugs.gnu.org)(address . 50035@debbugs.gnu.org)
flXd-EpcnubgRrrsOX95IzrXBhJItQJP0TUrMk2YJzM2VM-qdCisXY1fx9E-1wR8FMAvOJ0oMudDx2Gif3lHghImJccqe8cbUewO2UCPpas=@protonmail.com
I was just working on another package that needs the current version of godbus-dbus, so thanks for this patch. I haven't yet built your version, but previously I had to disable tests that it looks like you fixed, great!
J
J
John Kehayias wrote on 4 Feb 2022 21:06
(name . 50035@debbugs.gnu.org)(address . 50035@debbugs.gnu.org)
Oa9YAbRk7evlUs9TVUo-jibZ30lxl3rfOx_bwVykKPSY6T18yc0FGfUdZoGNYVp6ARdJShtjjVIjlCQ_9x6TZFjnKBl_jNvSKEKtryhUG7M=@protonmail.com
Hello,

I recently built this with these changes and updating to version 5.0.6 with hash 0d7740bjprd6mhs1wmhd53fb3kf61dz0hp1a0dda3dc28w2z84pp Builds successfully and works for a package I'm working on.

I'm not sure how much of a "review" this counts for exactly, but would be great to have this revived and pushed.

Thanks!
John
J
J
John Kehayias wrote on 12 Oct 2023 19:53
Re: bug#64222: [PATCH 0/4] Add senpai IRC client
(name . Nguy?n Gia Phong)(address . mcsinyx@disroot.org)
87ttqv7mnb.fsf_-_@protonmail.com
Hi Ludo’ and Nguy?n (and cc'ing Sarah from earlier patches),

On Fri, Oct 13, 2023 at 01:16 AM, Nguy?n Gia Phong wrote:

Toggle quote (12 lines)
> On 2023-10-12 at 17:12+02:00, Ludovic Courtès wrote:
>> <https://qa.guix.gnu.org/issue/64222> was inconclusive
>> (for some reason it had not built all the dependents)
>
> qa.guix.gnu.org was briefly broken at the time IIRC,
> happened to other adjacent patchsets.
>
> On 2023-10-12 at 17:12+02:00, Ludovic Courtès wrote:
>> so I checked locally and the go-github-com-godbus-dbus upgrade
>> does not introduce new breakage.
>>

I haven't checked but this might need some fixing as based on an earlier
patch for updating godbus (I can't help but read this as "god bus") the
import name has changed. Though as an example chezmoi seems to have been
broken for some time anyway. Maybe the import-name doesn't need the v5?

See


and


The earlier patch also has fixes for the tests which would be good to
include now.

My apologies to Sarah as my original replies way back when only went to
the bug number (we should document this, easy beginner mistake!) and
once I became a committer this was on my list to update and push but I
didn't get around to it.

Nguy?n and/or Sarah would you like to submit a patch to change the
import path if needed, enable tests, and make any other changes? I could
also take a look if no one gets to it quickly.

Toggle quote (5 lines)
>> I wrapped the long ‘description’ lines, removed ‘Signed-off-by’ tags
>> from the logs (they’re for committers), and committed.
>
> Thanks a lot!

Thanks to all on this updates!

John

PS: Looks like one extra signed-off-by tag made it through on a commit.
Oh well, glad I'm not the only one who's not perfect at these things!
N
N
Nguy?n Gia Phong wrote on 13 Oct 2023 06:52
Re: gnu: go-github-com-godbus-dbus-v5
(name . John Kehayias)(address . john.kehayias@protonmail.com)
CW71HXE2UCHX.1SU4O7MG8PD9E@guix
On 2023-10-12 at 17:53+00:00, John Kehayias wrote:
Toggle quote (4 lines)
> [godbus's] import name has changed. Though as an example
> chezmoi seems to have been broken for some time anyway.
> Maybe the import-name doesn't need the v5?

IIUC go-github-com-godbus-dbus is just a name for human consumption,
on the other hand I don't understand how it works without
the import-path matching the one in the go.mod file:

On 2021-08-13 at 20:49-07:00, Sarah Morgensen wrote in patchset 50037:
Toggle quote (3 lines)
> - `(#:import-path "github.com/godbus/dbus"
> + `(#:import-path "github.com/godbus/dbus/v5"

On 2023-10-12 at 17:53+00:00, John Kehayias wrote:
Toggle quote (4 lines)
> Nguy?n and/or Sarah would you like to submit a patch to change the
> import path if needed, enable tests, and make any other changes? I could
> also take a look if no one gets to it quickly.

As stated above, I don't quite understand how go packages work
(when they don't seem to be supposed to), so you two please go ahead.
(BTW you can call me by my given name Phong.)

On 2023-10-12 at 17:53+00:00, John Kehayias wrote:
Toggle quote (2 lines)
> I can't help but read this as "god bus"

Yea DBus is short for Dieu Bus anyway.
?