Skip to contentSkip to conversation

Some bug fixing, Edwin, Dec16, 2011

PATCH Applied [email protected] 3 participants 5 messages Dec 16, 2011

lore
Share & tools
lore
#0 lore raw

cover Some bug fixing, Edwin, Dec16, 2011

From: Zhai Edwin <[email protected]>

all,
These patches fix rootless X start failure and dates launch hang. Pls. pull.

Thanks,
Edwin

The following changes since commit 6036845d1c07420a99b78421bb3479adf7d754e7:

Patch Upstream Status Updates (2011-12-15 14:36:26 +0000)

are available in the git repository at:
git://git.pokylinux.org/poky-contrib gzhai/master2
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=gzhai/master2

Zhai Edwin (2):
xserver-nodm-init: Fix xuser creation
libical: Fix deadlock in pthread

 .../x11-common/xserver-nodm-init.bb                |    6 +-
 meta/recipes-sato/libical/files/pthread-fix.patch  |   52 ++++++++++++++++++++
 meta/recipes-sato/libical/libical_0.47.bb          |    5 ++-
 3 files changed, 59 insertions(+), 4 deletions(-)
 create mode 100644 meta/recipes-sato/libical/files/pthread-fix.patch
#1 lore raw

PATCH 1/2 xserver-nodm-init: Fix xuser creation

From: Zhai Edwin <[email protected]>

Rootless X start fail as xuser has no home and shell. This patch fix it.

---
 .../x11-common/xserver-nodm-init.bb                |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-graphics/x11-common/xserver-nodm-init.bb +3 -3
index dbc1c42..99ef72e 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 SECTION = "x11"
-PR = "r28"
+PR = "r29"
 RDEPENDS_${PN} = "sudo"
 
 SRC_URI = "file://xserver-nodm \
@@ -31,7 +31,7 @@ INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
 # Use fixed Xusername of xuser for now, this will need to be
 # fixed if the Xusername changes from xuser
 USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --no-create-home \
-                       --shell /bin/false --groups video,tty,audio \
+USERADD_PARAM_${PN} = "--create-home \
+                       --groups video,tty,audio \
                        --user-group xuser"
 
Signature · 1 line
1.7.1
#2 lore raw

Re: [PATCH 1/2] xserver-nodm-init: Fix xuser creation

Quoted 23 lines · On 12/15/2011 11:53 PM, [email protected] wrote:

From: Zhai Edwin<[email protected]>

Rootless X start fail as xuser has no home and shell. This patch fix it.

---
  .../x11-common/xserver-nodm-init.bb                |    6 +++---
  1 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-graphics/x11-common/xserver-nodm-init.bb +1 -1
index dbc1c42..99ef72e 100644
@@ -2,7 +2,7 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
  LICENSE = "GPLv2"
  LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
  SECTION = "x11"
-PR = "r28"
+PR = "r29"
  RDEPENDS_${PN} = "sudo"
 
  SRC_URI = "file://xserver-nodm \

meta/recipes-graphics/x11-common/xserver-nodm-init.bb INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." · line 37

Quoted 9 lines
meta/recipes-graphics/x11-common/xserver-nodm-init.bb +2 -2
@@ -31,7 +31,7 @@ INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
  # Use fixed Xusername of xuser for now, this will need to be
  # fixed if the Xusername changes from xuser
  USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --no-create-home \
-                       --shell /bin/false --groups video,tty,audio \
+USERADD_PARAM_${PN} = "--create-home \
+                       --groups video,tty,audio \
                         --user-group xuser"
 

I think that this should still be a --system account, I missed that when I first looked at this patch.

Sau!

#3 lore raw

PATCH 2/2 libical: Fix deadlock in pthread

In reply to [email protected]

From: Zhai Edwin <[email protected]>

libical introduce pthread support after 0.47, but lead deadlock with missing some unlock code. This makes dates start hang.

Add new patch to properly release mutex.

[YOCTO #1825] got fixed.

---
 meta/recipes-sato/libical/files/pthread-fix.patch |   52 +++++++++++++++++++++
 meta/recipes-sato/libical/libical_0.47.bb         |    5 ++-
 2 files changed, 56 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-sato/libical/files/pthread-fix.patch
meta/recipes-sato/libical/files/pthread-fix.patch new file +52 -0
new file mode 100644
index 0000000..aa7767f
@@ -0,0 +1,52 @@
+New added pthread feathre leads some deadlock with some unlock code missing.
+This patch fix it.
+
+Signed-off-by: Zhai Edwin <[email protected]>
+
+Upstream-Status: Pending
+
+Index: libical-0.47/src/libical/icaltimezone.c
+===================================================================
+--- libical-0.47.orig/src/libical/icaltimezone.c	2011-12-16 13:42:25.000000000 +0800
++++ libical-0.47/src/libical/icaltimezone.c	2011-12-16 14:16:25.000000000 +0800
+@@ -1773,7 +1773,7 @@
+     filename = (char*) malloc (filename_len);
+     if (!filename) {
+ 	icalerror_set_errno(ICAL_NEWFAILED_ERROR);
+-	return;
++	goto out;
+     }
+ 
+     snprintf (filename, filename_len, "%s/%s.ics", get_zone_directory(),
+@@ -1783,7 +1783,7 @@
+     free (filename);
+     if (!fp) {
+ 	icalerror_set_errno(ICAL_FILE_ERROR);
+-	return;
++	goto out;
+     }
+ 
+ 	
+@@ -1807,7 +1807,7 @@
+ 
+     if (!subcomp) {
+ 	icalerror_set_errno(ICAL_PARSE_ERROR);
+-	return;
++	goto out;
+     }
+ 
+     icaltimezone_get_vtimezone_properties (zone, subcomp);
+@@ -1817,10 +1817,12 @@
+     icalcomponent_free(comp);
+     }
+ #endif 
+-#ifdef HAVE_PTHREAD
++
+  out:
++#ifdef HAVE_PTHREAD
+     pthread_mutex_unlock(&builtin_mutex);
+ #endif
++    return;
+ }
+ 
+ 
meta/recipes-sato/libical/libical_0.47.bb +4 -1
index d711d5f..ee4351a 100644
@@ -6,7 +6,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
                     file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
 SECTION = "libs"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/freeassociation/${BPN}/${P}/${BPN}-${PV}.tar.gz"
+PR = "r1"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/freeassociation/${BPN}/${P}/${BPN}-${PV}.tar.gz\
+           file://pthread-fix.patch"
 
 SRC_URI[md5sum] = "21f7f8a21e3d857c9476be732e52dc32"
 SRC_URI[sha256sum] = "af4cbb4bb13d9ed3f2262181da9199823feba70802b15cc3e89b263d95da2888"
Signature · 1 line
1.7.1
#4 lore raw
In reply to [email protected]
Quoted 12 lines · On Fri, 2011-12-16 at 15:53 +0800, [email protected] wrote:

From: Zhai Edwin <[email protected]>

all,
These patches fix rootless X start failure and dates launch hang. Pls. pull.

Thanks,
Edwin

The following changes since commit 6036845d1c07420a99b78421bb3479adf7d754e7:

Patch Upstream Status Updates (2011-12-15 14:36:26 +0000)

Quoted 7 lines

are available in the git repository at:
git://git.pokylinux.org/poky-contrib gzhai/master2
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=gzhai/master2

Zhai Edwin (2):
xserver-nodm-init: Fix xuser creation
libical: Fix deadlock in pthread

Merged to master, thanks.

Richard