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

  • Open
  • quality assurance status badge
Details
2 participants
  • Sarah Morgensen
  • John Kehayias
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
?