Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/2] beecrpty: add option --with-dev-dsp
@ 2014-10-29 11:06 Kai Kang
  2014-10-29 11:06 ` [PATCH 2/2] python-2.7.3:remove BOM insertion code Kai Kang
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Kang @ 2014-10-29 11:06 UTC (permalink / raw)
  To: openembedded-core

Add this configure option for developer to control if the
/dev/dsp should be used on target. Instead of judging it
based on the very device file of build server.

Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 .../beecrypt/beecrypt/add-option-dev-dsp.patch     | 34 ++++++++++++++++++++++
 meta/recipes-support/beecrypt/beecrypt_4.2.1.bb    |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch

diff --git a/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
new file mode 100644
index 0000000..b3298ce
--- /dev/null
+++ b/meta/recipes-support/beecrypt/beecrypt/add-option-dev-dsp.patch
@@ -0,0 +1,34 @@
+Add config option --with-dev-dsp.
+
+Upstream-Status: Pending
+
+Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
+---
+--- a/configure.ac
++++ b/configure.ac
+@@ -106,6 +106,16 @@ AC_ARG_WITH(python,[  --with-python[[=AR
+   fi
+   ])
+ 
++AC_ARG_WITH(dev-dsp,[  --with-dev-dsp          enables dev/dsp for entropy producing. auto for auto-detecting dev/dep on host. [[default=no]]],[
++  if test "$withval" = yes; then
++    AC_DEFINE([HAVE_DEV_DSP], 1)
++  else
++    if test "$withval" = auto;  then
++      ac_detect_dev_dsp=yes
++    fi
++  fi
++  ],[ac_detect_dev_dsp=no])
++
+ # Check for expert mode
+ if test "$ac_enable_expert_mode" = yes; then
+   BEE_EXPERT_MODE
+@@ -464,7 +474,7 @@ linux*)
+       ac_cv_have_dev_dsp=no
+     fi
+     ])
+-  if test "$ac_cv_have_dev_dsp" = yes; then
++  if test "$ac_cv_have_dev_dsp" = yes && test "$ac_detect_dev_dsp" = yes; then
+     AC_DEFINE([HAVE_DEV_DSP], 1)
+   fi
+   ;;
diff --git a/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
index 209b92e..1e626f1 100644
--- a/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
+++ b/meta/recipes-support/beecrypt/beecrypt_4.2.1.bb
@@ -11,6 +11,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/beecrypt/beecrypt-${PV}.tar.gz \
            file://fix-for-gcc-4.7.patch \
            file://run-ptest \
            file://beecrypt-enable-ptest-support.patch \
+           file://add-option-dev-dsp.patch \
           "
 
 SRC_URI[md5sum] = "8441c014170823f2dff97e33df55af1e"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] python-2.7.3:remove BOM insertion code
  2014-10-29 11:06 [PATCH 1/2] beecrpty: add option --with-dev-dsp Kai Kang
@ 2014-10-29 11:06 ` Kai Kang
  2014-10-29 11:15   ` Kang Kai
  0 siblings, 1 reply; 4+ messages in thread
From: Kai Kang @ 2014-10-29 11:06 UTC (permalink / raw)
  To: openembedded-core

Backport patch from:
https://hg.python.org/cpython/rev/af46a001d5ec

SysLogHandler converts message to utf8 and adds BOM, supposedly
to conform with RFC5424, but the implementation is broken:
the RFC specifies that the BOM should prefix only unstructured
message part, but current Python implementation puts it in the
middle of structured part, thus confusing RFC-compliant receivers.

Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 .../python/python/remove-BOM-insection-code.patch  | 24 ++++++++++++++++++++++
 meta/recipes-devtools/python/python_2.7.3.bb       |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python/remove-BOM-insection-code.patch

diff --git a/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
new file mode 100644
index 0000000..6c96e30
--- /dev/null
+++ b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Vinay Sajip <vinay_sajip@yahoo.co.uk>
+# Date 1334583503 -3600
+# Node ID af46a001d5eca99a7ff44ed18256c235c5c3f1d0
+# Parent  33bc53e0aa9ea42c6a6bb077d182e62c8c569aa1
+Issue #14452: remove BOM insertion code.
+
+Backport from https://hg.python.org/cpython/rev/af46a001d5ec.
+
+Upstream-Status: Pending
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
+--- a/Lib/logging/handlers.py
++++ b/Lib/logging/handlers.py
+@@ -821,8 +821,6 @@ class SysLogHandler(logging.Handler):
+         # Message is a string. Convert to bytes as required by RFC 5424
+         if type(msg) is unicode:
+             msg = msg.encode('utf-8')
+-            if codecs:
+-                msg = codecs.BOM_UTF8 + msg
+         msg = prio + msg
+         try:
+             if self.unixsocket:
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index cc92ebc..f2e6fde 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -38,6 +38,7 @@ SRC_URI += "\
   file://python-2.7.3-CVE-2014-1912.patch \
   file://json-flaw-fix.patch \
   file://posix_close.patch \
+  file://remove-BOM-insection-code.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] python-2.7.3:remove BOM insertion code
  2014-10-29 11:06 ` [PATCH 2/2] python-2.7.3:remove BOM insertion code Kai Kang
@ 2014-10-29 11:15   ` Kang Kai
  0 siblings, 0 replies; 4+ messages in thread
From: Kang Kai @ 2014-10-29 11:15 UTC (permalink / raw)
  To: openembedded-core

On 2014年10月29日 19:06, Kai Kang wrote:
> Backport patch from:
> https://hg.python.org/cpython/rev/af46a001d5ec
>
> SysLogHandler converts message to utf8 and adds BOM, supposedly
> to conform with RFC5424, but the implementation is broken:
> the RFC specifies that the BOM should prefix only unstructured
> message part, but current Python implementation puts it in the
> middle of structured part, thus confusing RFC-compliant receivers.
>
> Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>   .../python/python/remove-BOM-insection-code.patch  | 24 ++++++++++++++++++++++
>   meta/recipes-devtools/python/python_2.7.3.bb       |  1 +
>   2 files changed, 25 insertions(+)
>   create mode 100644 meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
>
> diff --git a/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
> new file mode 100644
> index 0000000..6c96e30
> --- /dev/null
> +++ b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
> @@ -0,0 +1,24 @@
> +# HG changeset patch
> +# User Vinay Sajip <vinay_sajip@yahoo.co.uk>
> +# Date 1334583503 -3600
> +# Node ID af46a001d5eca99a7ff44ed18256c235c5c3f1d0
> +# Parent  33bc53e0aa9ea42c6a6bb077d182e62c8c569aa1
> +Issue #14452: remove BOM insertion code.
> +
> +Backport from https://hg.python.org/cpython/rev/af46a001d5ec.
> +
> +Upstream-Status: Pending

Oops. Please ignore this thread. V2 will be sent.

--Kai

> +Signed-off-by: Kai Kang <kai.kang@windriver.com>
> +---
> +diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
> +--- a/Lib/logging/handlers.py
> ++++ b/Lib/logging/handlers.py
> +@@ -821,8 +821,6 @@ class SysLogHandler(logging.Handler):
> +         # Message is a string. Convert to bytes as required by RFC 5424
> +         if type(msg) is unicode:
> +             msg = msg.encode('utf-8')
> +-            if codecs:
> +-                msg = codecs.BOM_UTF8 + msg
> +         msg = prio + msg
> +         try:
> +             if self.unixsocket:
> diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
> index cc92ebc..f2e6fde 100644
> --- a/meta/recipes-devtools/python/python_2.7.3.bb
> +++ b/meta/recipes-devtools/python/python_2.7.3.bb
> @@ -38,6 +38,7 @@ SRC_URI += "\
>     file://python-2.7.3-CVE-2014-1912.patch \
>     file://json-flaw-fix.patch \
>     file://posix_close.patch \
> +  file://remove-BOM-insection-code.patch \
>   "
>   
>   S = "${WORKDIR}/Python-${PV}"


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] python-2.7.3:remove BOM insertion code
  2014-10-29 11:16 [PATCH 0/2] V2: patches for python and beecrypt Kai Kang
@ 2014-10-29 11:16 ` Kai Kang
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Kang @ 2014-10-29 11:16 UTC (permalink / raw)
  To: openembedded-core

Backport patch from:
https://hg.python.org/cpython/rev/af46a001d5ec

SysLogHandler converts message to utf8 and adds BOM, supposedly
to conform with RFC5424, but the implementation is broken:
the RFC specifies that the BOM should prefix only unstructured
message part, but current Python implementation puts it in the
middle of structured part, thus confusing RFC-compliant receivers.

Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 .../python/python/remove-BOM-insection-code.patch  | 24 ++++++++++++++++++++++
 meta/recipes-devtools/python/python_2.7.3.bb       |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python/remove-BOM-insection-code.patch

diff --git a/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
new file mode 100644
index 0000000..3462620
--- /dev/null
+++ b/meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Vinay Sajip <vinay_sajip@yahoo.co.uk>
+# Date 1334583503 -3600
+# Node ID af46a001d5eca99a7ff44ed18256c235c5c3f1d0
+# Parent  33bc53e0aa9ea42c6a6bb077d182e62c8c569aa1
+Issue #14452: remove BOM insertion code.
+
+Backport from https://hg.python.org/cpython/rev/af46a001d5ec.
+
+Upstream-Status: Backport
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
+--- a/Lib/logging/handlers.py
++++ b/Lib/logging/handlers.py
+@@ -821,8 +821,6 @@ class SysLogHandler(logging.Handler):
+         # Message is a string. Convert to bytes as required by RFC 5424
+         if type(msg) is unicode:
+             msg = msg.encode('utf-8')
+-            if codecs:
+-                msg = codecs.BOM_UTF8 + msg
+         msg = prio + msg
+         try:
+             if self.unixsocket:
diff --git a/meta/recipes-devtools/python/python_2.7.3.bb b/meta/recipes-devtools/python/python_2.7.3.bb
index cc92ebc..f2e6fde 100644
--- a/meta/recipes-devtools/python/python_2.7.3.bb
+++ b/meta/recipes-devtools/python/python_2.7.3.bb
@@ -38,6 +38,7 @@ SRC_URI += "\
   file://python-2.7.3-CVE-2014-1912.patch \
   file://json-flaw-fix.patch \
   file://posix_close.patch \
+  file://remove-BOM-insection-code.patch \
 "
 
 S = "${WORKDIR}/Python-${PV}"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-29 11:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 11:06 [PATCH 1/2] beecrpty: add option --with-dev-dsp Kai Kang
2014-10-29 11:06 ` [PATCH 2/2] python-2.7.3:remove BOM insertion code Kai Kang
2014-10-29 11:15   ` Kang Kai
  -- strict thread matches above, loose matches on Subject: below --
2014-10-29 11:16 [PATCH 0/2] V2: patches for python and beecrypt Kai Kang
2014-10-29 11:16 ` [PATCH 2/2] python-2.7.3:remove BOM insertion code Kai Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox