[arch-commits] Commit in deepin-go-lib/trunk (PKGBUILD dbus-fix.patch)
Felix Yan
felixonmars at archlinux.org
Fri Dec 28 17:36:51 UTC 2018
Date: Friday, December 28, 2018 @ 17:36:50
Author: felixonmars
Revision: 418703
upgpkg: deepin-go-lib 1.6.0-2
try to fix dbus for systemd 240
Added:
deepin-go-lib/trunk/dbus-fix.patch
Modified:
deepin-go-lib/trunk/PKGBUILD
----------------+
PKGBUILD | 13 ++++++++++---
dbus-fix.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-12-28 17:30:59 UTC (rev 418702)
+++ PKGBUILD 2018-12-28 17:36:50 UTC (rev 418703)
@@ -2,15 +2,22 @@
pkgname=deepin-go-lib
pkgver=1.6.0
-pkgrel=1
+pkgrel=2
pkgdesc='A library containing many useful go routines for things such as glib, gettext, archive, graphic,etc.'
arch=('any')
url="https://github.com/linuxdeepin/go-lib"
license=('GPL3')
depends=('libpulse' 'gdk-pixbuf2' 'mobile-broadband-provider-info' 'libx11')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/felixonmars/go-lib/archive/$pkgver.tar.gz")
-sha512sums=('c350792d5a445d0f235f0402e36952c7ff9e5a88bf39b41fa2ae6a31f9cbd67e73c6426f4bc76bc14d465fc84750ee2f65f4450ecbe725a0d5ce7169a7c2182c')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/go-lib/archive/$pkgver.tar.gz"
+ dbus-fix.patch)
+sha512sums=('c350792d5a445d0f235f0402e36952c7ff9e5a88bf39b41fa2ae6a31f9cbd67e73c6426f4bc76bc14d465fc84750ee2f65f4450ecbe725a0d5ce7169a7c2182c'
+ '80a540358c2d9c51b647d7afa1b9c2a075677b596861fdb894f97298ba580b242f8cfcaa3d0ac7b8a4fdd18d39fb9eee8c62ef20d0efb5f928a88117b6fa8a9c')
+prepare() {
+ cd go-lib-$pkgver
+ patch -p1 -i ../dbus-fix.patch
+}
+
package() {
mkdir -p "$pkgdir"/usr/share/gocode/src/pkg.deepin.io
cp -a go-lib-$pkgver "$pkgdir"/usr/share/gocode/src/pkg.deepin.io/lib
Added: dbus-fix.patch
===================================================================
--- dbus-fix.patch (rev 0)
+++ dbus-fix.patch 2018-12-28 17:36:50 UTC (rev 418703)
@@ -0,0 +1,44 @@
+diff --git a/dbus/conn.go b/dbus/conn.go
+index 20f65b1..01da4e3 100644
+--- a/dbus/conn.go
++++ b/dbus/conn.go
+@@ -26,6 +26,7 @@ import (
+ "reflect"
+ "strings"
+ "sync"
++ dbus1 "pkg.deepin.io/lib/dbus1"
+ )
+
+ const defaultSystemBusAddress = "unix:path=/var/run/dbus/system_bus_socket"
+@@ -112,12 +113,12 @@ func SessionBus() (conn *Conn, err error) {
+
+ // SessionBusPrivate returns a new private connection to the session bus.
+ func SessionBusPrivate() (*Conn, error) {
+- address := os.Getenv("DBUS_SESSION_BUS_ADDRESS")
+- if address != "" && address != "autolaunch:" {
+- return Dial(address)
++ address, err := dbus1.GetSessionBusAddress()
++ if err != nil {
++ return nil, err
+ }
+
+- return sessionBusPlatform()
++ return Dial(address)
+ }
+
+ // SystemBus returns a shared connection to the system bus, connecting to it if
+diff --git a/dbus1/conn.go b/dbus1/conn.go
+index 2737621..ac89088 100644
+--- a/dbus1/conn.go
++++ b/dbus1/conn.go
+@@ -77,6 +77,10 @@ func SessionBus() (conn *Conn, err error) {
+ return
+ }
+
++func GetSessionBusAddress() (string, error) {
++ return getSessionBusAddress()
++}
++
+ func getSessionBusAddress() (string, error) {
+ if address := os.Getenv("DBUS_SESSION_BUS_ADDRESS"); address != "" && address != "autolaunch:" {
+ return address, nil
More information about the arch-commits
mailing list