Date: Thursday, December 3, 2015 @ 06:20:53
  Author: fyan
Revision: 148132

upgpkg: deepin-daemon 2.93.1.20151202-1

Modified:
  deepin-daemon/trunk/PKGBUILD
Deleted:
  deepin-daemon/trunk/fix-i686-compile.patch
  deepin-daemon/trunk/get-distro-info.patch
  deepin-daemon/trunk/ishuman-via-login-defs.patch

------------------------------+
 PKGBUILD                     |   40 ++++--------
 fix-i686-compile.patch       |   12 ---
 get-distro-info.patch        |  119 ------------------------------------
 ishuman-via-login-defs.patch |  132 -----------------------------------------
 4 files changed, 16 insertions(+), 287 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2015-12-03 05:02:17 UTC (rev 148131)
+++ PKGBUILD    2015-12-03 05:20:53 UTC (rev 148132)
@@ -4,13 +4,16 @@
 # Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
 
 pkgname=deepin-daemon
-pkgver=2.93.1
+pkgver=2.93.1.20151202
+_commit=107ce2cdb5ada3e5599d2bbe7b9c7f109801b68d
 #_golibver=0.4.2
-_golibrev=238151791673412dedf333363b3a37343c461acb
-_deepinapiver=2.92.1
-_dbusfactoryver=2.92.1
+_golibrev=902e89b94c9d657f523bcdabad399dc789dcf86e
+#_deepinapiver=2.92.1
+_deepinapirev=c555d82e94275a6ce808ddc4c4e71460c6822f04
+#_dbusfactoryver=2.92.1
+_deepinfactoryrev=7257936bb7ed172fcec2c22e5253ab50eb84b85b
 _desktopbaserev=df35ee9bbe33cca436c256a145b88e58e011b737
-pkgrel=5
+pkgrel=1
 pkgdesc='Daemon handling the DDE session settings'
 arch=('i686' 'x86_64')
 url="https://github.com/linuxdeepin/dde-daemon";
@@ -26,22 +29,22 @@
 replaces=('dde-daemon')
 groups=('deepin')
 install="${pkgname}.install"
-source=("git+https://github.com/linuxdeepin/dde-daemon.git#tag=$pkgver";
+source=(#"git+https://github.com/linuxdeepin/dde-daemon.git#tag=$pkgver";
+        "git+https://github.com/linuxdeepin/dde-daemon.git#commit=$_commit";
         #"git+https://github.com/linuxdeepin/go-lib.git#tag=$_golibver";
         "git+https://github.com/linuxdeepin/go-lib.git#commit=$_golibrev";
-        
"git+https://github.com/linuxdeepin/dbus-factory.git#tag=$_dbusfactoryver";
-        "git+https://github.com/linuxdeepin/dde-api.git#tag=$_deepinapiver";
+        #"git+https://github.com/linuxdeepin/dde-api.git#tag=$_deepinapiver";
+        "git+https://github.com/linuxdeepin/dde-api.git#commit=$_deepinapirev";
+        
#"git+https://github.com/linuxdeepin/dbus-factory.git#tag=$_dbusfactoryver";
+        
"git+https://github.com/linuxdeepin/dbus-factory.git#commit=$_deepinfactoryrev";
         
"git+https://github.com/linuxdeepin/deepin-desktop-base.git#commit=$_desktopbaserev";
-        'fix-i686-compile.patch' 'deepin-daemon.sysusers' 
'ishuman-via-login-defs.patch' 'get-distro-info.patch')
+        'deepin-daemon.sysusers')
 sha256sums=('SKIP'
             'SKIP'
             'SKIP'
             'SKIP'
             'SKIP'
-            '1dccf88c5ce480560a4a2d73134e69f05135703fe34ccd5d9e2e5d7fe852efc5'
-            '4482f2c82c3652040021dd43515f131184a0417e341dc37db487117012245e25'
-            '182fd299b9f222ce8f94da9137fb671f95fbd32bd28becfaf8c97b9fdd488c65'
-            '4b3f743b8cffc591ab5582aa4ba6a56f464cd7c279a3594e637fffac0a14df63')
+            '4482f2c82c3652040021dd43515f131184a0417e341dc37db487117012245e25')
 
 prepare() {
   export GOPATH="$srcdir/build"
@@ -53,17 +56,6 @@
          github.com/mattn/go-sqlite3 gopkg.in/alecthomas/kingpin.v2 
github.com/disintegration/imaging \
          code.google.com/p/graphics-go/graphics 
code.google.com/p/jamslam-freetype-go/freetype \
          code.google.com/p/jamslam-freetype-go/freetype/truetype
-
-  cd dde-daemon
-  # TODO: a temporary solution by disable go-sqlite3 to avoid build
-  #       issue for go1.4/i686
-  # https://github.com/golang/go/issues/9510
-  if [[ $CARCH == "i686" ]]; then
-    patch -p1 -i ../fix-i686-compile.patch
-  fi
-
-  patch -p1 -i ../ishuman-via-login-defs.patch
-  patch -p1 -i ../get-distro-info.patch
 }
 
 build() {

Deleted: fix-i686-compile.patch
===================================================================
--- fix-i686-compile.patch      2015-12-03 05:02:17 UTC (rev 148131)
+++ fix-i686-compile.patch      2015-12-03 05:20:53 UTC (rev 148132)
@@ -1,12 +0,0 @@
-diff --git a/launcher/item/item.go b/launcher/item/item.go
-index a8ccbbe..3701968 100644
---- a/launcher/item/item.go
-+++ b/launcher/item/item.go
-@@ -4,7 +4,6 @@ import (
-       "path"
-       "strings"
- 
--      _ "github.com/mattn/go-sqlite3"
- 
-       "pkg.deepin.io/dde/daemon/launcher/category"
-       . "pkg.deepin.io/dde/daemon/launcher/interfaces"

Deleted: get-distro-info.patch
===================================================================
--- get-distro-info.patch       2015-12-03 05:02:17 UTC (rev 148131)
+++ get-distro-info.patch       2015-12-03 05:20:53 UTC (rev 148132)
@@ -1,119 +0,0 @@
-commit a39042ae318f404ac44196cc028e234e6b01d489
-Author: Felix Yan <felixonm...@archlinux.org>
-Date:   Wed Nov 25 12:55:31 2015 +0800
-
-    Add methods to get distribution info
-    
-    Change-Id: I915fa4a5f429430e5c183ade58bd727c7d5a2478
-
-diff --git a/systeminfo/distro.go b/systeminfo/distro.go
-new file mode 100644
-index 0000000..cfd5bc5
---- /dev/null
-+++ b/systeminfo/distro.go
-@@ -0,0 +1,51 @@
-+package systeminfo
-+
-+import (
-+      "fmt"
-+)
-+
-+const (
-+      distroFileLSB    = "/etc/lsb-release"
-+
-+      distroIdKeyLSB   = "DISTRIB_ID"
-+      distroDescKeyLSB = "DISTRIB_DESCRIPTION"
-+      distroVerKeyLSB  = "DISTRIB_RELEASE"
-+      distroKeyDelim   = "="
-+)
-+
-+func getDistro() (string, string, string, error) {
-+      distroId, distroDesc, distroVer, err := getDistroFromLSB(distroFileLSB)
-+      if err == nil {
-+              return distroId, distroDesc, distroVer, nil
-+      }
-+
-+      return "", "", "", err
-+}
-+
-+func getDistroFromLSB(file string) (string, string, string, error) {
-+      ret, err := parseInfoFile(file, distroKeyDelim)
-+      if err != nil {
-+              return "", "", "", err
-+      }
-+
-+      distroId, ok := ret[distroIdKeyLSB]
-+      if !ok {
-+              return "", "", "", fmt.Errorf("Cannot find the key '%s'", 
distroIdKeyLSB)
-+      }
-+
-+      distroDesc, ok := ret[distroDescKeyLSB]
-+      if !ok {
-+              return "", "", "", fmt.Errorf("Cannot find the key '%s'", 
distroDescKeyLSB)
-+      }
-+
-+      if distroDesc[0] == '"' && distroDesc[len(distroDesc) - 1] == '"' {
-+              distroDesc = distroDesc[1:len(distroDesc) - 1]
-+      }
-+
-+      distroVer, ok := ret[distroVerKeyLSB]
-+      if !ok {
-+              return "", "", "", fmt.Errorf("Cannot find the key '%s'", 
distroVerKeyLSB)
-+      }
-+
-+      return distroId, distroDesc, distroVer, nil
-+}
-diff --git a/systeminfo/info.go b/systeminfo/info.go
-index c905cab..808ffb7 100644
---- a/systeminfo/info.go
-+++ b/systeminfo/info.go
-@@ -7,8 +7,14 @@ import (
- )
- 
- type SystemInfo struct {
--      // Current version, ex: "2015 Desktop"
-+      // Current deepin version, ex: "2015 Desktop"
-       Version string
-+      // Distribution ID
-+      DistroID string
-+      // Distribution Description
-+      DistroDesc string
-+      // Distribution Version
-+      DistroVer string
-       // CPU information
-       Processor string
-       // Disk capacity
-@@ -82,6 +88,11 @@ func NewSystemInfo() *SystemInfo {
-               logger.Warning("Get version failed:", err)
-       }
- 
-+      info.DistroID, info.DistroDesc, info.DistroVer, err = getDistro()
-+      if err != nil {
-+              logger.Warning("Get distribution failed:", err)
-+      }
-+
-       info.MemoryCap, err = getMemoryFromFile("/proc/meminfo")
-       if err != nil {
-               logger.Warning("Get memory capacity failed:", err)
-diff --git a/systeminfo/info_test.go b/systeminfo/info_test.go
-index 11bffb7..56700b0 100644
---- a/systeminfo/info_test.go
-+++ b/systeminfo/info_test.go
-@@ -42,3 +42,17 @@ func TestVersion(t *testing.T) {
-               So(err, ShouldBeNil)
-       })
- }
-+
-+func TestDistro(t *testing.T) {
-+      Convey("Test os distro", t, func() {
-+              lang := os.Getenv("LANGUAGE")
-+              os.Setenv("LANGUAGE", "en_US")
-+              defer os.Setenv("LANGUAGE", lang)
-+
-+              distroId, distroDesc, distroVer, err := 
getDistroFromLSB("testdata/lsb-release")
-+              So(distroId, ShouldEqual, "Deepin")
-+              So(distroDesc, ShouldEqual, "Deepin 2014.3")
-+              So(distroVer, ShouldEqual, "2014.3")
-+              So(err, ShouldBeNil)
-+      })
-+}

Deleted: ishuman-via-login-defs.patch
===================================================================
--- ishuman-via-login-defs.patch        2015-12-03 05:02:17 UTC (rev 148131)
+++ ishuman-via-login-defs.patch        2015-12-03 05:20:53 UTC (rev 148132)
@@ -1,132 +0,0 @@
-commit 50844ff5338feeaa1e59af72eb3d0a624f3e4791
-Author: Felix Yan <felixonm...@archlinux.org>
-Date:   Wed Nov 25 00:27:27 2015 +0800
-
-    Add support to check login.defs for isHuman
-    
-    Change-Id: Ic18e289d02b208a4c28f64a7362a082f5280556e
-
-diff --git a/accounts/users/list.go b/accounts/users/list.go
-index 4b6d563..e5038e4 100644
---- a/accounts/users/list.go
-+++ b/accounts/users/list.go
-@@ -25,16 +25,19 @@ import (
-       "fmt"
-       "io/ioutil"
-       "strings"
-+      "strconv"
- )
- 
- const (
--      userFilePasswd = "/etc/passwd"
--      userFileShadow = "/etc/shadow"
--      userFileGroup  = "/etc/group"
--
--      itemLenPasswd = 7
--      itemLenShadow = 9
--      itemLenGroup  = 4
-+      userFilePasswd    = "/etc/passwd"
-+      userFileShadow    = "/etc/shadow"
-+      userFileGroup     = "/etc/group"
-+      userFileLoginDefs = "/etc/login.defs"
-+
-+      itemLenPasswd    = 7
-+      itemLenShadow    = 9
-+      itemLenGroup     = 4
-+      itemLenLoginDefs = 2
- )
- 
- var (
-@@ -137,7 +140,7 @@ func (infos UserInfos) GetUserNames() []string {
- func (infos UserInfos) filterUserInfos() UserInfos {
-       var tmp UserInfos
-       for _, info := range infos {
--              if !info.isHumanUser(userFileShadow) {
-+              if !info.isHumanUser(userFileShadow, userFileLoginDefs) {
-                       continue
-               }
- 
-@@ -147,7 +150,7 @@ func (infos UserInfos) filterUserInfos() UserInfos {
-       return tmp
- }
- 
--func (info UserInfo) isHumanUser(config string) bool {
-+func (info UserInfo) isHumanUser(configShadow string, configLoginDefs string) 
bool {
-       if info.Name == "root" {
-               return false
-       }
-@@ -156,7 +159,11 @@ func (info UserInfo) isHumanUser(config string) bool {
-               return false
-       }
- 
--      if !info.isHumanViaShadow(config) {
-+      if !info.isHumanViaShadow(configShadow) {
-+              return false
-+      }
-+
-+      if !info.isHumanViaLoginDefs(configLoginDefs) {
-               return false
-       }
- 
-@@ -214,3 +221,60 @@ func (info UserInfo) isHumanViaShadow(config string) bool 
{
- 
-       return false
- }
-+
-+func (info UserInfo) isHumanViaLoginDefs(config string) bool {
-+      var uidMin, uidMax string
-+      content, err := ioutil.ReadFile(config)
-+      if err != nil {
-+              return false
-+      }
-+
-+      lines := strings.Split(string(content), "\n")
-+      for _, line := range lines {
-+              if len(line) == 0 {
-+                      continue
-+              }
-+
-+              if line[0] == '#' {
-+                      continue
-+              }
-+
-+              items := strings.Fields(line)
-+              if len(items) != itemLenLoginDefs {
-+                      continue
-+              }
-+
-+              if items[0] == "UID_MIN" {
-+                      uidMin = items[1]
-+              }
-+
-+              if items[0] == "UID_MAX" {
-+                      uidMax = items[1]
-+              }
-+      }
-+
-+      if len(uidMax) == 0 || len(uidMin) == 0 {
-+              return false
-+      }
-+
-+      uidMinInt, err := strconv.Atoi(uidMin)
-+      if err != nil {
-+              return false
-+      }
-+
-+      uidMaxInt, err := strconv.Atoi(uidMax)
-+      if err != nil {
-+              return false
-+      }
-+
-+      uidInt, err := strconv.Atoi(info.Uid)
-+      if err != nil {
-+              return false
-+      }
-+
-+      if uidInt > uidMaxInt || uidInt < uidMinInt {
-+              return false
-+      }
-+
-+      return true
-+}
-\ No newline at end of file

Reply via email to