Misc patches
cover Misc patches
This patchset addresses few issues remaining for uclibc support and fixes some recipes which need patches to get compiling on uclibc systems.
Replacing gconf-dbus with gconf is needed for ansgstrom to build SDK images since in angstrom gconf-dbus is provided by gconf
we docuement the variable definions inside layer.conf
send-pull-request is fixed to CC only concerned folks per patch bases and not collect all addresses and CC them on all assorted patches
Pull URL: git://git.openembedded.org/openembedded-core-contrib
Branch: kraj/misc-fixes
Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/misc-fixes
Thanks,
Khem Raj <[email protected]>
---
Khem Raj (8):
recipes: Replace gconf-dbus with gconf
gcc-4.6.0: Apply linaro patches
gettext.bbclass, bitbake.conf: Append nls options to EXTRA_OECONF
instead of +=
conf/layer.conf: Use .= to append to BBPATH and =+ for BBFILES libgalago_0.5.2.bb: Fix compile for uclibc liburcu_0.5.4.bb: Let it build on uclibc targets lttng-ust_0.12.bb: Fix compilation on uclibc scripts/send-pull-request: Add CC selectively
.../recipes-gnome/gnome/libgnomekbd_2.26.0.bb | 2 +- meta/classes/gettext.bbclass | 6 +- meta/conf/bitbake.conf | 2 +- meta/conf/layer.conf | 13 +- .../recipes-connectivity/galago/libgalago_0.5.2.bb | 4 + meta/recipes-devtools/gcc/gcc-4.6.0.inc | 4 + .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch | 51 ++ .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch | 63 ++ .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch | 32 + .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch | 28 + .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch | 653 ++++++++++++++++++++ .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch | 126 ++++ .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch | 177 ++++++ .../gcc/gcc-4_6-branch-linaro-backports.inc | 9 + meta/recipes-gnome/gnome/gnome-desktop.inc | 2 +- meta/recipes-gnome/gthumb/gthumb_2.12.2.bb | 2 +- meta/recipes-gnome/tasks/task-sdk-gmae.inc | 2 +- .../lttng/lttng-ust/uclibc-sched_getcpu.patch | 50 ++ meta/recipes-kernel/lttng/lttng-ust_0.12.bb | 4 +- meta/recipes-support/libproxy/libproxy_0.4.6.bb | 2 +- meta/recipes-support/liburcu/liburcu_0.5.4.bb | 2 +- scripts/send-pull-request | 51 +- 22 files changed, 1249 insertions(+), 36 deletions(-) create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4_6-branch-linaro-backports.inc create mode 100644 meta/recipes-kernel/lttng/lttng-ust/uclibc-sched_getcpu.patch
Signature · 1 line
1.7.4.1
PATCH 1/8 recipes: Replace gconf-dbus with gconf
Some distributions e.g. angstrom do not support gconf-dbus anymore since its now provided by gconf and in oe-core we have PREFERRED_PROVIDER_gconf tunable, here we replace all dependencies on gconf-dbus with gconf, which should work in both cases where poky defines PREFERRED_PROVIDER-gconf = "gconf-dbus" and for angstrom it is simply gconf
Without this meta-toolchain-sdk ends up with conflicts in runqueue and does not build
--- .../recipes-gnome/gnome/libgnomekbd_2.26.0.bb | 2 +- meta/recipes-gnome/gnome/gnome-desktop.inc | 2 +- meta/recipes-gnome/gthumb/gthumb_2.12.2.bb | 2 +- meta/recipes-gnome/tasks/task-sdk-gmae.inc | 2 +- meta/recipes-support/libproxy/libproxy_0.4.6.bb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
meta-demoapps/recipes-gnome/gnome/libgnomekbd_2.26.0.bb +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "GNOME keyboard library" LICENSE = "LGPL" -DEPENDS = "gconf-dbus dbus libxklavier gtk+" +DEPENDS = "gconf dbus libxklavier gtk+" inherit gnome
meta/recipes-gnome/gnome/gnome-desktop.inc +1 -1
@@ -1,7 +1,7 @@ DESCRIPTION = "GNOME library for reading .desktop files" SECTION = "x11/gnome" LICENSE = "GPLv2 & LGPLv2" -DEPENDS = "gconf-dbus libxrandr virtual/libx11 gtk+ glib-2.0 gnome-doc-utils" +DEPENDS = "gconf libxrandr virtual/libx11 gtk+ glib-2.0 gnome-doc-utils" EXTRA_OECONF = "--disable-scrollkeeper --disable-desktop-docs"
meta/recipes-gnome/gthumb/gthumb_2.12.2.bb +1 -1
@@ -2,7 +2,7 @@ DESCRIPTION = "gThumb is an image viewer and browser for the GNOME Desktop" SECTION = "x11/gnome" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" -DEPENDS = "glib-2.0 gtk+ libxml2 gnome-doc-utils libunique gconf-dbus libpng gstreamer jpeg tiff gst-plugins-base" +DEPENDS = "glib-2.0 gtk+ libxml2 gnome-doc-utils libunique gconf libpng gstreamer jpeg tiff gst-plugins-base" PR = "r0" EXTRA_OECONF = "--disable-gnome-keyring --disable-libsoup --disable-exiv2 --disable-clutter"
meta/recipes-gnome/tasks/task-sdk-gmae.inc +1 -1
@@ -4,7 +4,7 @@ SDK-GMAE = " \ gtk+-dev \ gstreamer-dev \ bluez4-dev \ - gconf-dbus-dev \ + gconf-dev \ avahi-dev \ telepathy-glib-dev \ eds-dbus-dev \
meta/recipes-support/libproxy/libproxy_0.4.6.bb +1 -1
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7d7044444a7b1b116e8783edcdb44ff4 \ file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0" -DEPENDS = "virtual/libx11 xmu gconf-dbus" +DEPENDS = "virtual/libx11 xmu gconf" SRC_URI = "http://libproxy.googlecode.com/files/libproxy-${PV}.tar.gz"
Signature · 1 line
1.7.4.1
PATCH 2/8 gcc-4.6.0: Apply linaro patches
In reply to Khem RajWe take the improvements done by linaro for gcc 4.6
--- meta/recipes-devtools/gcc/gcc-4.6.0.inc | 4 + .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch | 51 ++ .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch | 63 ++ .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch | 32 + .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch | 28 + .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch | 653 ++++++++++++++++++++ .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch | 126 ++++ .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch | 177 ++++++ .../gcc/gcc-4_6-branch-linaro-backports.inc | 9 + 9 files changed, 1143 insertions(+), 0 deletions(-) create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4_6-branch-linaro-backports.inc
meta/recipes-devtools/gcc/gcc-4.6.0.inc +4 -0
@@ -7,6 +7,9 @@ require gcc-common.inc require gcc-4_6-branch-backports.inc +# Linaro patches for 4.6 branch +require gcc-4_6-branch-linaro-backports.inc + PR = "r1" DEPENDS =+ "mpfr gmp libmpc"
@@ -22,6 +25,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ ${GCC-4_6-BRANCH-BACKPORTS} \ + ${GCC-4_6-BRANCH-LINARO-BACKPORTS} \ file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ file://100-uclibc-conf.patch \ file://gcc-uclibc-locale-ctype_touplow_t.patch \
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch new file +51 -0
51 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch new file +63 -0
63 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch new file +32 -0
@@ -0,0 +1,32 @@ +2011-03-22 Andrew Stubbs <[email protected]> + + Backport from FSF: + + 2011-03-21 Daniel Jacobowitz <[email protected]> + + gcc/ + * config/arm/unwind-arm.c (__gnu_unwind_pr_common): Correct test + for barrier handlers. + +=== modified file 'gcc/config/arm/unwind-arm.c' +--- old/gcc/config/arm/unwind-arm.c 2009-10-30 14:55:10 +0000 ++++ new/gcc/config/arm/unwind-arm.c 2011-03-22 10:59:10 +0000 +@@ -1196,8 +1196,6 @@ + ucbp->barrier_cache.bitpattern[4] = (_uw) &data[1]; + + if (data[0] & uint32_highbit) +- phase2_call_unexpected_after_unwind = 1; +- else + { + data += rtti_count + 1; + /* Setup for entry to the handler. */ +@@ -1207,6 +1205,8 @@ + _Unwind_SetGR (context, 0, (_uw) ucbp); + return _URC_INSTALL_CONTEXT; + } ++ else ++ phase2_call_unexpected_after_unwind = 1; + } + if (data[0] & uint32_highbit) + data++; +
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch new file +28 -0
@@ -0,0 +1,28 @@ +2011-03-23 Andrew Stubbs <[email protected]> + + Backport from FSF: + + 2011-03-23 Julian Brown <[email protected]> + + gcc/ + * expr.c (expand_expr_real_1): Only use BLKmode for volatile + accesses which are not naturally aligned. + +=== modified file 'gcc/expr.c' +--- old/gcc/expr.c 2011-03-18 09:04:31 +0000 ++++ new/gcc/expr.c 2011-04-05 16:18:11 +0000 +@@ -9147,8 +9147,11 @@ + && modifier != EXPAND_CONST_ADDRESS + && modifier != EXPAND_INITIALIZER) + /* If the field is volatile, we always want an aligned +- access. */ +- || (volatilep && flag_strict_volatile_bitfields > 0) ++ access. Only do this if the access is not already naturally ++ aligned, otherwise "normal" (non-bitfield) volatile fields ++ become non-addressable. */ ++ || (volatilep && flag_strict_volatile_bitfields > 0 ++ && (bitpos % GET_MODE_ALIGNMENT (mode) != 0)) + /* If the field isn't aligned enough to fetch as a memref, + fetch it as a bit field. */ + || (mode1 != BLKmode +
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch new file +653 -0
653 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch new file +126 -0
126 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch new file +177 -0
177 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-4_6-branch-linaro-backports.inc new file +9 -0
@@ -0,0 +1,9 @@ +GCC-4_6-BRANCH-LINARO-BACKPORTS = " \ +file://linaro/gcc-4.6-linaro-r106720.patch \ +file://linaro/gcc-4.6-linaro-r106723.patch \ +file://linaro/gcc-4.6-linaro-r106729.patch \ +file://linaro/gcc-4.6-linaro-r106731.patch \ +file://linaro/gcc-4.6-linaro-r106733.patch \ +file://linaro/gcc-4.6-linaro-r106737.patch \ +file://linaro/gcc-4.6-linaro-r106738.patch \ +"
Signature · 1 line
1.7.4.1
PATCH 3/8 gettext.bbclass, bitbake.conf: Append nls options to EXTRA_OECONF instead of +=
In reply to Khem RajSome recipes do not defined EXTRA_OECONF in such cases += drops the --enable|--disable-nls options. In another case where recipe defines EXTRA_OECONF instead of adding/appending to it then --enable|--disable-nls options are lost from EXTRA_OECONF
We define EXTRA_OECONF = "" in bitbake.conf so the variable exists always.
We use _append instead of += so the option is added at very end and not lost.
We only return empty gettext dependencies if its a target recipe
in case when USE_NLS is not set because the native/cross/nativesdk recipes still need the gettext dependencies
--- meta/classes/gettext.bbclass | 6 +++--- meta/conf/bitbake.conf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
meta/classes/gettext.bbclass +3 -3
@@ -1,7 +1,7 @@ def gettext_dependencies(d): - if d.getVar('USE_NLS', True) == 'no': + if d.getVar('USE_NLS', True) == 'no' and not oe.utils.inherits(d, 'native', 'nativesdk', 'cross'): return "" - if bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, True) and not oe.utils.inherits(d, 'cross-canadian'): + if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'): return "" return d.getVar('DEPENDS_GETTEXT', False)
@@ -14,4 +14,4 @@ def gettext_oeconf(d): DEPENDS_GETTEXT = "virtual/gettext gettext-native" BASEDEPENDS =+ "${@gettext_dependencies(d)}" -EXTRA_OECONF += "${@gettext_oeconf(d)}" +EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
meta/conf/bitbake.conf +1 -1
@@ -395,7 +395,7 @@ export BUILD_NM = "${BUILD_PREFIX}nm" export MAKE = "make" EXTRA_OEMAKE = "-e MAKEFLAGS=" - +EXTRA_OECONF = "" export LC_ALL = "C" ##################################################################
Signature · 1 line
1.7.4.1
PATCH 4/8 conf/layer.conf: Use .= to append to BBPATH and =+ for BBFILES
In reply to Khem RajAppending to BBPATH gives a definite order to BBLAYERS which means paths are preferred in order from left to right.
--- meta/conf/layer.conf | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
meta/conf/layer.conf +10 -3
@@ -1,9 +1,16 @@ BBPATH ?= "" # We have a conf and classes directory, add to BBPATH -BBPATH := "${BBPATH}:${LAYERDIR}" - +BBPATH .= ":${LAYERDIR}" # We have a packages directory, add to BBFILES -BBFILES := "${BBFILES} ${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipes-*/*/*.bb" +# packages is still there because metadata_scm.bbclass still uses +# it to deduce the repo directory and thats the reason to prepend +# to BBFILES here because this class uses the first entry in +# BBFILES to calculate the scm base. +# since the order of BBFLILES is not that important its acted upon +# using BBFILES_PRIORITY we are ok to keep the oe-core BBFILES dir +# at top + +BBFILES =+ "${LAYERDIR}/packages/*/*.bb ${LAYERDIR}/recipes-*/*/*.bb" BBFILE_COLLECTIONS += "normal" BBFILE_PATTERN_normal := "^${LAYERDIR}/"
Signature · 1 line
1.7.4.1
PATCH 5/8 libgalago_0.5.2.bb: Fix compile for uclibc
In reply to Khem Rajuclibc targets may not have gettext but this package still needs config.rpath during regenerating configury so we provide it when libc is uclibc.
--- .../recipes-connectivity/galago/libgalago_0.5.2.bb | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
meta/recipes-connectivity/galago/libgalago_0.5.2.bb +4 -0
@@ -18,3 +18,7 @@ PR = "r2" inherit autotools pkgconfig gettext EXTRA_OECONF = "--disable-tests --disable-check" + +do_configure_prepend_libc-uclibc() { + touch ${S}/config.rpath +}
Signature · 1 line
1.7.4.1
PATCH 6/8 liburcu_0.5.4.bb: Let it build on uclibc targets
In reply to Khem Rajuclibc requires -D_GNU_SOURCE to be defined for it to enable GNU extensions which CPU_SET/CPU_ZERO are used by this package. So we add -D_GNU_SOURCE to CFLAGS when compiling for uclibc.
--- meta/recipes-support/liburcu/liburcu_0.5.4.bb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-support/liburcu/liburcu_0.5.4.bb +1 -1
@@ -15,7 +15,7 @@ SRC_URI[md5sum] = "04147d24749be75200173859839207f7" SRC_URI[sha256sum] = "02aedbb16c16bd034e246d5c9637a9232be559c66fc2fe4eb28948e234bd89f1" S = "${WORKDIR}/userspace-rcu-${PV}" - +CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE" inherit autotools # liburcu, which is only used by lttng-ust, may not build on other
Signature · 1 line
1.7.4.1
PATCH 7/8 lttng-ust_0.12.bb: Fix compilation on uclibc
In reply to Khem RajWe provide alternative implementation of sched_getcpu() when compiling for uclibc
--- .../lttng/lttng-ust/uclibc-sched_getcpu.patch | 50 ++++++++++++++++++++ meta/recipes-kernel/lttng/lttng-ust_0.12.bb | 4 +- 2 files changed, 53 insertions(+), 1 deletions(-) create mode 100644 meta/recipes-kernel/lttng/lttng-ust/uclibc-sched_getcpu.patch
meta/recipes-kernel/lttng/lttng-ust/uclibc-sched_getcpu.patch new file +50 -0
@@ -0,0 +1,50 @@ +uClibc does not have sched_getcpu() implemented. So we create a wrapper +to getcpu syscall when compiling for uclibc. + +So far execinfo.h does not exist on uclibc but it turns out to be that +this header is not needed even in eglibc case so it can be removed + +Signed-off-by: Khem Raj <[email protected]> + +Upstream-status: Pending + +Index: ust-0.12/libust/tracer.h +=================================================================== +--- ust-0.12.orig/libust/tracer.h ++++ ust-0.12/libust/tracer.h +@@ -342,14 +342,22 @@ static __inline__ void ltt_write_trace_h + header->start_freq = trace->start_freq; + header->freq_scale = trace->freq_scale; + } +- ++#ifdef __UCLIBC__ ++#define sched_getcpu(cpu, node, cache) syscall(__NR_getcpu, cpu, node, cache) ++#endif + #ifndef UST_VALGRIND + + static __inline__ int ust_get_cpu(void) + { + int cpu; + ++#ifdef __UCLIBC__ ++ int c, s; ++ s = syscall(__NR_getcpu, &c, NULL, NULL); ++ cpu = (s == -1) ? s : c; ++#else + cpu = sched_getcpu(); ++#endif + if (likely(cpu >= 0)) + return cpu; + /* +Index: ust-0.12/libustcomm/ustcomm.c +=================================================================== +--- ust-0.12.orig/libustcomm/ustcomm.c ++++ ust-0.12/libustcomm/ustcomm.c +@@ -31,7 +31,6 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <execinfo.h> + + #include "ustcomm.h" + #include "usterr.h"
meta/recipes-kernel/lttng/lttng-ust_0.12.bb +3 -1
@@ -12,7 +12,9 @@ DEPENDS = "liburcu" PR = "r0" -SRC_URI = "http://lttng.org/files/ust/releases/ust-${PV}.tar.gz" +SRC_URI = "http://lttng.org/files/ust/releases/ust-${PV}.tar.gz \ + file://uclibc-sched_getcpu.patch \ + " SRC_URI[md5sum] = "fae6e324a56016658c5b83ec14ba0043" SRC_URI[sha256sum] = "215b05f47d0c9e3a2934926a7d14fa9c67025db917c3a1f641df40b08314ab0c"
Signature · 1 line
1.7.4.1
PATCH 8/8 scripts/send-pull-request: Add CC selectively
In reply to Khem RajCurrently a consolidated pull request adds all the participants to every patch, which in essence is good but might lose focus of developers who would be interested to know about the patch that developer contributed to. This patch fixes the script by extracting the to and cc information from each patch one by one and add it to patch mail header instead of doing a sweeping one pass over all patches to collect all email addresses. It should reduce some email traffic for developers.
--- scripts/send-pull-request | 51 +++++++++++++++++++++++++------------------- 1 files changed, 29 insertions(+), 22 deletions(-)
scripts/send-pull-request +29 -22
@@ -29,24 +29,38 @@ EOM # Collect To and CC addresses from the patch files if they exist # $1: Which header to add the recipients to, "TO" or "CC" # $2: The regex to match and strip from the line with email addresses +# $3: The patch which we are preparing to send harvest_recipients() { TO_CC=$1 REGX=$2 + PATCH=$3 export IFS=$',\n' - for PATCH in $PDIR/*.patch; do - # Grab To addresses - for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do - if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then - if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi - elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then - if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi - fi - done + # Grab To addresses + for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do + if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then + if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi + elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then + if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi + fi done unset IFS } +# $1: The given patch +create_recipient_lists() +{ + THEPATCH=$1 + # Harvest emails from the generated patch and populate the TO and CC variables + # In addition to To and CC headers/lines, the common Signed-off-by, Tested-by, + # etc. (*-by) will be added to CC. + if [ $AUTO -eq 1 ]; then + harvest_recipients TO "^[Tt][Oo]: *" $THEPATCH + harvest_recipients CC "^[Cc][Cc]: *" $THEPATCH + harvest_recipients CC "^.*-[Bb][Yy]: *" $THEPATCH + fi +} + # Parse and verify arguments while getopts "af:ghp:t:" OPT; do
@@ -100,15 +114,6 @@ for TOKEN in SUBJECT BLURB; do done -# Harvest emails from the generated patches and populate the TO and CC variables -# In addition to To and CC headers/lines, the common Signed-off-by, Tested-by, -# etc. (*-by) will be added to CC. -if [ $AUTO -eq 1 ]; then - harvest_recipients TO "^[Tt][Oo]: *" - harvest_recipients CC "^[Cc][Cc]: *" - harvest_recipients CC "^.*-[Bb][Yy]: *" -fi - case "$PULL_MTA" in git) FROM="$(git config sendemail.from)"
@@ -158,11 +163,12 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then ERROR=0 case "$PULL_MTA" in git) - export IFS=$',' - GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done) - GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done) - unset IFS for PATCH in $PDIR/*patch; do + create_recipient_lists $PATCH + export IFS=$',' + GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done) + GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done) + unset IFS # We harvest the emails manually, so force git not to. eval "git send-email $GIT_TO $GIT_CC --no-chain-reply-to --suppress-cc=all $PATCH" if [ $? -eq 1 ]; then
@@ -172,6 +178,7 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then ;; sendmail) for PATCH in $PDIR/*patch; do + create_recipient_lists $PATCH # Insert To and CC headers via formail to keep them separate and # appending them to the sendmail command as -- $TO $CC has # proven to be an exercise in futility.
Signature · 1 line
1.7.4.1
Re: [PATCH 8/8] scripts/send-pull-request: Add CC selectively
Quoted 8 lines · Khem Raj
Currently a consolidated pull request adds all the participants to every patch, which in essence is good but might lose focus of developers who would be interested to know about the patch that developer contributed to. This patch fixes the script by extracting the to and cc information from each patch one by one and add it to patch mail header instead of doing a sweeping one pass over all patches to collect all email addresses. It should reduce some email traffic for developers.
This behavior was intentional. If you don't want the CC applied to the entire series, you can just use git-send-email as this is its behavior. In particular, it doesn't apply any of the addresses from the patches to the cover letter, which was my primary objection.
If you would like to modify this patch to apply the entire CC list to the cover letter, then I think you'll have addressed both of our concerns and I'll add my Acked-by. As it is, please do not accept this patch. I will nack it for poky and we don't want the two to diverge.
Please include the primary author/maintainer of sources/recipes/etc. on CC.
Thanks,
Signature · 3 lines
Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel
Quoted 99 lines
Signed-off-by Khem Raj <[email protected]>--- scripts/send-pull-request | 51 +++++++++++++++++++++++++------------------- 1 files changed, 29 insertions(+), 22 deletions(-)scripts/send-pull-request +29
-22@@ -29,24 +29,38 @@ EOM # Collect To and CC addresses from the patch files if they exist # $1: Which header to add the recipients to, "TO" or "CC" # $2: The regex to match and strip from the line with email addresses +# $3: The patch which we are preparing to send harvest_recipients() { TO_CC=$1 REGX=$2 + PATCH=$3 export IFS=$',\n' - for PATCH in $PDIR/*.patch; do - # Grab To addresses - for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do - if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then - if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi - elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then - if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi - fi - done + # Grab To addresses + for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do + if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then + if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi + elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then + if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi + fi done unset IFS } +# $1: The given patch +create_recipient_lists() +{ + THEPATCH=$1 + # Harvest emails from the generated patch and populate the TO and CC variables + # In addition to To and CC headers/lines, the common Signed-off-by, Tested-by, + # etc. (*-by) will be added to CC. + if [ $AUTO -eq 1 ]; then + harvest_recipients TO "^[Tt][Oo]: *" $THEPATCH + harvest_recipients CC "^[Cc][Cc]: *" $THEPATCH + harvest_recipients CC "^.*-[Bb][Yy]: *" $THEPATCH + fi +} + # Parse and verify arguments while getopts "af:ghp:t:" OPT; do@@ -100,15 +114,6 @@ for TOKEN in SUBJECT BLURB; do done -# Harvest emails from the generated patches and populate the TO and CC variables -# In addition to To and CC headers/lines, the common Signed-off-by, Tested-by, -# etc. (*-by) will be added to CC. -if [ $AUTO -eq 1 ]; then - harvest_recipients TO "^[Tt][Oo]: *" - harvest_recipients CC "^[Cc][Cc]: *" - harvest_recipients CC "^.*-[Bb][Yy]: *" -fi - case "$PULL_MTA" in git) FROM="$(git config sendemail.from)"@@ -158,11 +163,12 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then ERROR=0 case "$PULL_MTA" in git) - export IFS=$',' - GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done) - GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done) - unset IFS for PATCH in $PDIR/*patch; do + create_recipient_lists $PATCH + export IFS=$',' + GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done) + GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done) + unset IFS # We harvest the emails manually, so force git not to. eval "git send-email $GIT_TO $GIT_CC --no-chain-reply-to --suppress-cc=all $PATCH" if [ $? -eq 1 ]; then@@ -172,6 +178,7 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then ;; sendmail) for PATCH in $PDIR/*patch; do + create_recipient_lists $PATCH # Insert To and CC headers via formail to keep them separate and # appending them to the sendmail command as -- $TO $CC has # proven to be an exercise in futility.
Signature · 2 lines
Darren Hart Yocto Linux Kernel
Re: [PATCH 8/8] scripts/send-pull-request: Add CC selectively
Quoted 10 lines · Darren Hart
Quoted 8 lines · Khem Raj
Currently a consolidated pull request adds all the participants to every patch, which in essence is good but might lose focus of developers who would be interested to know about the patch that developer contributed to. This patch fixes the script by extracting the to and cc information from each patch one by one and add it to patch mail header instead of doing a sweeping one pass over all patches to collect all email addresses. It should reduce some email traffic for developers.
Quoted 2 lines
This behavior was intentional. If you don't want the CC applied to the entire series, you can just use git-send-email as this is its behavior.
imho git request-pull would have been sufficient for us along with git send-mail to post all patches for review
and get acks and sign-offs then the they all can be collected using patchwork or whatever way one likes and
then git pull-request can be sent
Right now one one sends a pull requests and publishes the tree for pull then feedback is given and one does another round and repulishes the tree. So having all patches sent for review using git send-mail and then form pull-requests once they are approved would be a way to go
Quoted 2 lines
In particular, it doesn't apply any of the addresses from the patches to the cover letter, which was my primary objection.
yes once I did this I was sort of thinking that it would be appropriate to CC all concerned on cover letter Should be doable.
Quoted 8 lines
If you would like to modify this patch to apply the entire CC list to the cover letter, then I think you'll have addressed both of our concerns and I'll add my Acked-by. As it is, please do not accept this patch. I will nack it for poky and we don't want the two to diverge.
Please include the primary author/maintainer of sources/recipes/etc. on CC.
I guess this should be automated somehow too.
Quoted 118 lines
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux KernelQuoted 97 lines
Signed-off-by Khem Raj <[email protected]>---
scripts/send-pull-request | 51 +++++++++++++++++++++++++-------------------1 files changed, 29 insertions(+), 22 deletions(-)scripts/send-pull-request +1
-0@@ -29,24 +29,38 @@ EOM # Collect To and CC addresses from the patch files if they exist # $1: Which header to add the recipients to, "TO" or "CC" # $2: The regex to match and strip from the line with email addresses +# $3: The patch which we are preparing to send harvest_recipients() {TO_CC=$1
REGX=$2
+ PATCH=$3
export IFS=$',\n'
- for PATCH in $PDIR/*.patch; do
- # Grab To addresses
- for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do
- if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then
- if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi
- elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then
- if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi
- fi
- done
+ # Grab To addresses
+ for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do
+ if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then
+ if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi
+ elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then
+ if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi
+ fi
done
unset IFS
}scripts/send-pull-request +14
-0+# $1: The given patch +create_recipient_lists() +{ + THEPATCH=$1 + # Harvest emails from the generated patch and populate the TO and CC variables + # In addition to To and CC headers/lines, the common Signed-off-by, Tested-by, + # etc. (*-by) will be added to CC. + if [ $AUTO -eq 1 ]; then + harvest_recipients TO "^[Tt][Oo]: *" $THEPATCH + harvest_recipients CC "^[Cc][Cc]: *" $THEPATCH + harvest_recipients CC "^.*-[Bb][Yy]: *" $THEPATCH + fi +} +# Parse and verify arguments
while getopts "af:ghp:t:" OPT; doscripts/send-pull-request +0
-0@@ -100,15 +114,6 @@ for TOKEN in SUBJECT BLURB; dodone
scripts/send-pull-request +0
-9-# Harvest emails from the generated patches and populate the TO and CC variables -# In addition to To and CC headers/lines, the common Signed-off-by, Tested-by, -# etc. (*-by) will be added to CC. -if [ $AUTO -eq 1 ]; then - harvest_recipients TO "^[Tt][Oo]: *" - harvest_recipients CC "^[Cc][Cc]: *" - harvest_recipients CC "^.*-[Bb][Yy]: *" -fi -case "$PULL_MTA" in
git)
FROM="$(git config sendemail.from)"scripts/send-pull-request +0
-0@@ -158,11 +163,12 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; thenERROR=0
case "$PULL_MTA" in
git)
- export IFS=$','
- GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done)
- GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done)
- unset IFS
for PATCH in $PDIR/*patch; do
+ create_recipient_lists $PATCH
+ export IFS=$','
+ GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done)
+ GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done)
+ unset IFS
# We harvest the emails manually, so force git not to.
eval "git send-email $GIT_TO $GIT_CC --no-chain-reply-to --suppress-cc=all $PATCH" if [ $? -eq 1 ]; thenscripts/send-pull-request +0
-0@@ -172,6 +178,7 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then ;; sendmail)for PATCH in $PDIR/*patch; do
+ create_recipient_lists $PATCH
# Insert To and CC headers via formail to keep them separate andQuoted 2 lines
# appending them to the sendmail command as -- $TO $CC has # proven to be an exercise in futility.--
Darren Hart
Yocto Linux Kernel_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 8/8] scripts/send-pull-request: Add CC selectively
Quoted 2 lines · Khem Raj
Quoted 1 line · Darren Hart
On Sat, 2011-05-07 at 00:54 -0700, Khem Raj wrote:
Hi Khem,
Quoted 9 lines
Quoted 9 lines
Quoted 8 lines
Currently a consolidated pull request adds all the participants to every patch, which in essence is good but might lose focus of developers who would be interested to know about the patch that developer contributed to. This patch fixes the script by extracting the to and cc information from each patch one by one and add it to patch mail header instead of doing a sweeping one pass over all patches to collect all email addresses. It should reduce some email traffic for developers.
Quoted 5 lines
Quoted 2 lines
This behavior was intentional. If you don't want the CC applied to the entire series, you can just use git-send-email as this is its behavior.
imho git request-pull would have been sufficient for us along with git send-mail to post all patches for review
Right. So some context on why I wrote this pair of scripts. There was an existing practice amongst the poky developers to only send a pull request and no patches, which effectively reduced the level of code review by complicating access to the patches for potential reviewers. IIRC there was an existing script to generate the pull request.
In order to facilitate adoption of a new process which sent the patches to the list, but still kept the pull model that the community was accustomed to, I wrote the new scripts. I chose to avoid using git-send-email as not everyone had git setup to do mail, and I wasn't aware of "git request-pull" at the time. I always found not having all the CCs on the cover letter to be very frustrating, and defeating the purpose of the auto-cc feature, which is why I manually collect the CC.
After some experience using these scripts, I agree that CC'ing the entire list on EVERY patch is probably overkill, and can lead to annoying people. I added a task to the Yocto Janitors list to use request-pull to generate the cover letter. One to keep the CC list local to each recipe is also a good idea.
Quoted 24 lines
and get acks and sign-offs then the they all can be collected using patchwork or whatever way one likes and
then git pull-request can be sentRight now one one sends a pull requests and publishes the tree for pull then feedback is given and one does another round and repulishes the tree. So having all patches sent for review using git send-mail and then form pull-requests once they are approved would be a way to go
Quoted 2 lines
In particular, it doesn't apply any of the addresses from the patches to the cover letter, which was my primary objection.
yes once I did this I was sort of thinking that it would be appropriate to CC all concerned on cover letter Should be doable.
Quoted 6 lines
If you would like to modify this patch to apply the entire CC list to the cover letter, then I think you'll have addressed both of our concerns and I'll add my Acked-by. As it is, please do not accept this patch. I will nack it for poky and we don't want the two to diverge.
Quoted 4 lines
Quoted 2 lines
Please include the primary author/maintainer of sources/recipes/etc. on CC.
I guess this should be automated somehow too.
That is a bit more tricky as there can be a long list of people involved with a particular file. Just doing a "git log FILE" is often enough to let you know who you're collaborating with, and who you need to CC.
--
Darren
Quoted 124 lines
Quoted 114 lines
Thanks,
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux KernelQuoted 92 lines
Signed-off-by Khem Raj <[email protected]>--- scripts/send-pull-request | 51 +++++++++++++++++++++++++------------------- 1 files changed, 29 insertions(+), 22 deletions(-)scripts/send-pull-request +28
-22@@ -29,24 +29,38 @@ EOM # Collect To and CC addresses from the patch files if they exist # $1: Which header to add the recipients to, "TO" or "CC" # $2: The regex to match and strip from the line with email addresses +# $3: The patch which we are preparing to send harvest_recipients() { TO_CC=$1 REGX=$2 + PATCH=$3 export IFS=$',\n' - for PATCH in $PDIR/*.patch; do - # Grab To addresses - for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do - if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then - if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi - elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then - if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi - fi - done + # Grab To addresses + for EMAIL in $(sed '/^---$/q' $PATCH | grep -e "$REGX" | sed "s/$REGX//"); do + if [ "$TO_CC" == "TO" ] && [ "${TO/$EMAIL/}" == "$TO" ] && [ -n "$EMAIL" ]; then + if [ -z "$TO" ]; then TO=$EMAIL; else TO="$TO,$EMAIL"; fi + elif [ "$TO_CC" == "CC" ] && [ "${CC/$EMAIL/}" == "$CC" ] && [ -n "$EMAIL" ]; then + if [ -z "$CC" ]; then CC=$EMAIL; else CC="$CC,$EMAIL"; fi + fi done unset IFS } +# $1: The given patch +create_recipient_lists() +{ + THEPATCH=$1 + # Harvest emails from the generated patch and populate the TO and CC variables + # In addition to To and CC headers/lines, the common Signed-off-by, Tested-by, + # etc. (*-by) will be added to CC. + if [ $AUTO -eq 1 ]; then + harvest_recipients TO "^[Tt][Oo]: *" $THEPATCH + harvest_recipients CC "^[Cc][Cc]: *" $THEPATCH + harvest_recipients CC "^.*-[Bb][Yy]: *" $THEPATCH + fi +} + # Parse and verify arguments while getopts "af:ghp:t:" OPT; do@@ -100,15 +114,6 @@ for TOKEN in SUBJECT BLURB; do done -# Harvest emails from the generated patches and populate the TO and CC variables -# In addition to To and CC headers/lines, the common Signed-off-by, Tested-by, -# etc. (*-by) will be added to CC. -if [ $AUTO -eq 1 ]; then - harvest_recipients TO "^[Tt][Oo]: *" - harvest_recipients CC "^[Cc][Cc]: *" - harvest_recipients CC "^.*-[Bb][Yy]: *" -fi - case "$PULL_MTA" in git) FROM="$(git config sendemail.from)"@@ -158,11 +163,12 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then ERROR=0 case "$PULL_MTA" in git) - export IFS=$',' - GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done) - GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done) - unset IFS for PATCH in $PDIR/*patch; do + create_recipient_lists $PATCH + export IFS=$',' + GIT_TO=$(for R in $TO; do echo -n "--to='$R' "; done) + GIT_CC=$(for R in $CC; do echo -n "--cc='$R' "; done) + unset IFS # We harvest the emails manually, so force git not to. eval "git send-email $GIT_TO $GIT_CC --no-chain-reply-to --suppress-cc=all $PATCH" if [ $? -eq 1 ]; thenscripts/send-pull-request if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then · line 184
Quoted 7 lines
scripts/send-pull-request +1
-0@@ -172,6 +178,7 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then ;; sendmail) for PATCH in $PDIR/*patch; do + create_recipient_lists $PATCH # Insert To and CC headers via formail to keep them separate and # appending them to the sendmail command as -- $TO $CC has # proven to be an exercise in futility.--
Darren Hart
Yocto Linux KernelQuoted 5 lines
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 2 lines
Darren Hart Yocto Linux Kernel