All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 00/16] Simplify how to stage directories in the sysroot
@ 2016-05-12  8:37 Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 01/16] staging.bbclass: Make it easier to define which dirs to stage Peter Kjellerstedt
                   ` (15 more replies)
  0 siblings, 16 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

The first commit in this set makes it possible to specify the
directories that will be staged in the sysroot via variables rather
than hardcoding it in sysroot_stage_dirs(). This should make it a lot
easier to add/remove directories to stage.

The rest of the commits just change recipes to take advantage of the
new variables.

Because of the following if statement in sysroot_stage_dirs():

	if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then

I have split the list of directories into SYSROOT_DIRS and
SYSROOT_DIRS_NATIVE, where the latter is included if that if statement
is true. I am not sure when that statement is true (my understanding
is that it should be true for native builds, but I am not sure if it
is also true for other builds like cross, nativesdk, etc). If it is
only true for native builds then that if statement could be removed,
and the SYSROOT_DIRS_NATIVE variable could be replaced by
SYSROOT_DIRS_append_class-native...

PATCHv2: Removed the if statement mentioned above and replaced it with
normal _append operations on SYSROOT_DIRS instead.

//Peter

The following changes since commit 28433319ad8299aa23b1fcfdddbe100b29e86517:

  bitbake: toaster: tests browser Add test for creating a project (2016-05-11 11:32:58 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib pkj/sysroot_dirs
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/sysroot_dirs

Peter Kjellerstedt (16):
  staging.bbclass: Make it easier to define which dirs to stage
  u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot
  libtool-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
  qemuwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
  tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
  shadow-sysroot: Use SYSROOT_DIRS to add dirs to stage in sysroot
  depmodwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
  base-files: Use SYSROOT_DIRS to add dirs to stage in sysroot
  signing-keys: Use SYSROOT_DIRS to add dirs to stage in sysroot
  vala.inc: Use SYSROOT_DIRS to add dirs to stage in sysroot
  gobject-introspection: Use SYSROOT_DIRS to add dirs to stage in
    sysroot
  grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
  gettext: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
  gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from
    sysroot
  libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
  font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST

 meta/classes/staging.bbclass                       | 75 ++++++++++++----------
 meta/recipes-bsp/grub/grub2.inc                    |  5 +-
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb |  5 +-
 meta/recipes-core/base-files/base-files_3.0.14.bb  |  5 +-
 meta/recipes-core/gettext/gettext_0.16.1.bb        |  7 +-
 meta/recipes-core/meta/signing-keys.bb             |  6 +-
 meta/recipes-devtools/gcc/gcc-target.inc           |  4 +-
 .../libtool/libtool-cross_2.4.6.bb                 |  7 +-
 meta/recipes-devtools/libtool/libtool_2.4.6.bb     | 13 ++--
 .../recipes-devtools/qemu/qemuwrapper-cross_1.0.bb |  6 +-
 meta/recipes-devtools/tcltk/tcl_8.6.4.bb           |  5 +-
 meta/recipes-devtools/vala/vala.inc                | 13 ++--
 .../shadow/shadow-sysroot_4.2.1.bb                 |  6 +-
 .../gobject-introspection_1.46.0.bb                |  9 ++-
 meta/recipes-graphics/xorg-font/font-util_1.3.1.bb |  5 +-
 .../recipes-kernel/kmod/depmodwrapper-cross_1.0.bb |  6 +-
 16 files changed, 71 insertions(+), 106 deletions(-)

-- 
2.1.0



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

* [PATCHv2 01/16] staging.bbclass: Make it easier to define which dirs to stage
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 02/16] u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot Peter Kjellerstedt
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

The directories that should be staged in the sysroot are now specified
in the SYSROOT_DIRS variable. Extra directories that should be staged
for native are specified in SYSROOT_DIRS_NATIVE. Finally, directories
that should not be staged are specified in SYSROOT_DIRS_BLACKLIST.

This also removes the sysroot_stage_libdir() function as it is no
longer used (it was just a wrapper for sysroot_stage_dir()).

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/classes/staging.bbclass | 75 +++++++++++++++++++++++++-------------------
 1 file changed, 42 insertions(+), 33 deletions(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index bc5dfa8..a0f82be 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -1,3 +1,37 @@
+# These directories will be staged in the sysroot
+SYSROOT_DIRS = " \
+    ${includedir} \
+    ${libdir} \
+    ${base_libdir} \
+    ${nonarch_base_libdir} \
+    ${datadir} \
+"
+
+# These directories are also staged in the sysroot when they contain files that
+# are usable on the build system
+SYSROOT_DIRS_NATIVE = " \
+    ${bindir} \
+    ${sbindir} \
+    ${base_bindir} \
+    ${base_sbindir} \
+    ${libexecdir} \
+    ${sysconfdir} \
+    ${localstatedir} \
+"
+SYSROOT_DIRS_append_class-native = " ${SYSROOT_DIRS_NATIVE}"
+SYSROOT_DIRS_append_class-cross = " ${SYSROOT_DIRS_NATIVE}"
+SYSROOT_DIRS_append_class-crosssdk = " ${SYSROOT_DIRS_NATIVE}"
+
+# These directories will not be staged in the sysroot
+SYSROOT_DIRS_BLACKLIST = " \
+    ${mandir} \
+    ${docdir} \
+    ${infodir} \
+    ${datadir}/locale \
+    ${datadir}/applications \
+    ${datadir}/fonts \
+    ${datadir}/pixmaps \
+"
 
 sysroot_stage_dir() {
 	src="$1"
@@ -14,43 +48,18 @@ sysroot_stage_dir() {
 	)
 }
 
-sysroot_stage_libdir() {
-	src="$1"
-	dest="$2"
-
-	sysroot_stage_dir $src $dest
-}
-
 sysroot_stage_dirs() {
 	from="$1"
 	to="$2"
 
-	sysroot_stage_dir $from${includedir} $to${includedir}
-	if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
-		sysroot_stage_dir $from${bindir} $to${bindir}
-		sysroot_stage_dir $from${sbindir} $to${sbindir}
-		sysroot_stage_dir $from${base_bindir} $to${base_bindir}
-		sysroot_stage_dir $from${base_sbindir} $to${base_sbindir}
-		sysroot_stage_dir $from${libexecdir} $to${libexecdir}
-		sysroot_stage_dir $from${sysconfdir} $to${sysconfdir}
-		sysroot_stage_dir $from${localstatedir} $to${localstatedir}
-	fi
-	if [ -d $from${libdir} ]
-	then
-		sysroot_stage_libdir $from${libdir} $to${libdir}
-	fi
-	if [ -d $from${base_libdir} ]
-	then
-		sysroot_stage_libdir $from${base_libdir} $to${base_libdir}
-	fi
-	if [ -d $from${nonarch_base_libdir} ]
-	then
-		sysroot_stage_libdir $from${nonarch_base_libdir} $to${nonarch_base_libdir}
-	fi
-	sysroot_stage_dir $from${datadir} $to${datadir}
-	# We don't care about docs/info/manpages/locales
-	rm -rf $to${mandir}/ $to${docdir}/ $to${infodir}/ ${to}${datadir}/locale/
-	rm -rf $to${datadir}/applications/ $to${datadir}/fonts/ $to${datadir}/pixmaps/
+	for dir in ${SYSROOT_DIRS}; do
+		sysroot_stage_dir "$from$dir" "$to$dir"
+	done
+
+	# Remove directories we do not care about
+	for dir in ${SYSROOT_DIRS_BLACKLIST}; do
+		rm -rf "$to$dir"
+	done
 }
 
 sysroot_stage_all() {
-- 
2.1.0



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

* [PATCHv2 02/16] u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 01/16] staging.bbclass: Make it easier to define which dirs to stage Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 03/16] libtool-cross: " Peter Kjellerstedt
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
index dfda5c1..79f1548 100644
--- a/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
+++ b/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
@@ -40,10 +40,7 @@ do_install_class-cross () {
 	install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
 }
 
-SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
-uboot_fw_utils_cross() {
-	sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
-}
+SYSROOT_DIRS_append_class-cross = " ${bindir_cross}"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 BBCLASSEXTEND = "cross"
-- 
2.1.0



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

* [PATCHv2 03/16] libtool-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 01/16] staging.bbclass: Make it easier to define which dirs to stage Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 02/16] u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 04/16] qemuwrapper-cross: " Peter Kjellerstedt
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
index 0204d34..b268310 100644
--- a/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
@@ -35,11 +35,6 @@ do_install () {
 	install -c -m 0644 ${S}/m4/*.m4 ${D}${target_datadir}/aclocal/
 }
 
-SYSROOT_PREPROCESS_FUNCS += "libtoolcross_sysroot_preprocess"
-
-libtoolcross_sysroot_preprocess () {
-	sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
-	sysroot_stage_dir ${D}${target_datadir} ${SYSROOT_DESTDIR}${target_datadir}
-}
+SYSROOT_DIRS += "${bindir_crossscripts} ${target_datadir}"
 
 SSTATE_SCAN_FILES += "libtoolize *-libtool"
-- 
2.1.0



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

* [PATCHv2 04/16] qemuwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (2 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 03/16] libtool-cross: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 05/16] tcl: " Peter Kjellerstedt
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
index 7f4c6d9..53b302d 100644
--- a/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
+++ b/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb
@@ -41,10 +41,6 @@ EOF
 	chmod +x ${D}${bindir_crossscripts}/qemuwrapper
 }
 
-SYSROOT_PREPROCESS_FUNCS += "qemuwrapper_sysroot_preprocess"
-
-qemuwrapper_sysroot_preprocess () {
-	sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
-}
+SYSROOT_DIRS += "${bindir_crossscripts}"
 
 INHIBIT_DEFAULT_DEPS = "1"
-- 
2.1.0



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

* [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (3 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 04/16] qemuwrapper-cross: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-26 12:00   ` Andreas Müller
  2016-05-12  8:37 ` [PATCHv2 06/16] shadow-sysroot: " Peter Kjellerstedt
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
index 8e92b3e..61be81d 100644
--- a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
+++ b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
@@ -68,10 +68,7 @@ do_install() {
 	done
 }
 
-SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess"
-tcl_sysroot_preprocess () {
-	sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
-}
+SYSROOT_DIRS += "${bindir_crossscripts}"
 
 PACKAGES =+ "tcl-lib"
 FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
-- 
2.1.0



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

* [PATCHv2 06/16] shadow-sysroot: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (4 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 05/16] tcl: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 07/16] depmodwrapper-cross: " Peter Kjellerstedt
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
index 697569c..ef01462 100644
--- a/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
+++ b/meta/recipes-extended/shadow/shadow-sysroot_4.2.1.bb
@@ -21,12 +21,10 @@ S = "${WORKDIR}"
 
 do_install() {
 	install -d ${D}${sysconfdir}
-	install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
+	install -p -m 644 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
 }
 
-sysroot_stage_all() {
-	sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
-}
+SYSROOT_DIRS += "${sysconfdir}"
 
 # don't create any packages
 # otherwise: dbus-dev depends on shadow-sysroot-dev which depends on shadow-sysroot 
-- 
2.1.0



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

* [PATCHv2 07/16] depmodwrapper-cross: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (5 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 06/16] shadow-sysroot: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 08/16] base-files: " Peter Kjellerstedt
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index c2c2589..5c7dd52 100644
--- a/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -41,10 +41,6 @@ EOF
 	chmod +x ${D}${bindir_crossscripts}/depmodwrapper
 }
 
-SYSROOT_PREPROCESS_FUNCS += "depmodwrapper_sysroot_preprocess"
-
-depmodwrapper_sysroot_preprocess () {
-	sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
-}
+SYSROOT_DIRS += "${bindir_crossscripts}"
 
 inherit nopackages
-- 
2.1.0



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

* [PATCHv2 08/16] base-files: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (6 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 07/16] depmodwrapper-cross: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 09/16] signing-keys: " Peter Kjellerstedt
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index d391707..5333110 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -165,9 +165,7 @@ do_install_append_linuxstdbase() {
         done
 }
 
-sysroot_stage_all_append () {
-	sysroot_stage_dir ${D}${sysconfdir}/skel ${SYSROOT_DESTDIR}${sysconfdir}/skel
-}
+SYSROOT_DIRS += "${sysconfdir}/skel"
 
 PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg"
 FILES_${PN} = "/"
@@ -177,4 +175,3 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 CONFFILES_${PN} = "${sysconfdir}/fstab ${@['', '${sysconfdir}/hostname'][(d.getVar('hostname', True) != '')]} ${sysconfdir}/shells"
 CONFFILES_${PN} += "${sysconfdir}/motd ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile"
-
-- 
2.1.0



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

* [PATCHv2 09/16] signing-keys: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (7 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 08/16] base-files: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 10/16] vala.inc: " Peter Kjellerstedt
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-core/meta/signing-keys.bb | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/meta/signing-keys.bb b/meta/recipes-core/meta/signing-keys.bb
index e843301..ea7400b 100644
--- a/meta/recipes-core/meta/signing-keys.bb
+++ b/meta/recipes-core/meta/signing-keys.bb
@@ -12,6 +12,8 @@ inherit allarch deploy
 EXCLUDE_FROM_WORLD = "1"
 INHIBIT_DEFAULT_DEPS = "1"
 
+SYSROOT_DIRS += "${sysconfdir}/pki"
+
 PACKAGES =+ "${PN}-ipk ${PN}-rpm ${PN}-packagefeed"
 
 FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
@@ -54,10 +56,6 @@ do_install () {
     fi
 }
 
-sysroot_stage_all_append () {
-    sysroot_stage_dir ${D}${sysconfdir}/pki ${SYSROOT_DESTDIR}${sysconfdir}/pki
-}
-
 do_deploy () {
     if [ -f "${B}/rpm-key" ]; then
         install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
-- 
2.1.0



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

* [PATCHv2 10/16] vala.inc: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (8 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 09/16] signing-keys: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 11/16] gobject-introspection: " Peter Kjellerstedt
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-devtools/vala/vala.inc | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-devtools/vala/vala.inc b/meta/recipes-devtools/vala/vala.inc
index 2a8875f..37aa38f 100644
--- a/meta/recipes-devtools/vala/vala.inc
+++ b/meta/recipes-devtools/vala/vala.inc
@@ -36,15 +36,14 @@ do_install_append_class-target() {
         install ${B}/vapigen-wrapper ${D}${bindir}/
 }
 
+# Put vapigen wrapper into target sysroot so that it can be used when building
+# vapi files.
+SYSROOT_DIRS_append_class-target = " ${bindir}"
 
-SYSROOT_PREPROCESS_FUNCS_append_class-target += "vapigen_sysroot_preprocess"
-
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " vapigen_sysroot_preprocess"
 vapigen_sysroot_preprocess() {
-        # Put vapigen wrapper into target sysroot so that it can be used when building vapi files.
-        sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
-
-        # Also, tweak the vapigen name in vapigen pkgconfig file, so that it picks up our
-        # wrapper.
+        # Tweak the vapigen name in the vapigen pkgconfig file, so that it picks
+        # up our wrapper.
         sed -i \
            -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \
            ${SYSROOT_DESTDIR}${datadir}/pkgconfig/vapigen-${SHRT_VER}.pc
-- 
2.1.0



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

* [PATCHv2 11/16] gobject-introspection: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (9 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 10/16] vala.inc: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:37 ` [PATCHv2 12/16] grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot Peter Kjellerstedt
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 .../gobject-introspection/gobject-introspection_1.46.0.bb        | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
index 47102ca..861af5f 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
@@ -151,13 +151,12 @@ FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
 
 # we need target versions of introspection tools in sysroot so that they can be run via qemu
 # when building introspection files in other packages
-SYSROOT_PREPROCESS_FUNCS_append_class-target += "gi_binaries_sysroot_preprocess"
+SYSROOT_DIRS_append_class-target = " ${bindir}"
 
+SYSROOT_PREPROCESS_FUNCS_append_class-target = " gi_binaries_sysroot_preprocess"
 gi_binaries_sysroot_preprocess() {
-        sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
-
-        # Also, tweak the binary names in introspection pkgconfig file, so that it picks up our 
-        # wrappers which do the cross-compile and qemu magic.
+        # Tweak the binary names in the introspection pkgconfig file, so that it
+        # picks up our wrappers which do the cross-compile and qemu magic.
         sed -i \
            -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
            -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
-- 
2.1.0



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

* [PATCHv2 12/16] grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (10 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 11/16] gobject-introspection: " Peter Kjellerstedt
@ 2016-05-12  8:37 ` Peter Kjellerstedt
  2016-05-12  8:38 ` [PATCHv2 13/16] gettext: " Peter Kjellerstedt
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:37 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-bsp/grub/grub2.inc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 146dde6..dd1ffe2 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -63,7 +63,4 @@ do_configure_prepend() {
 
 # grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
 # conflicted, remove it since no one uses it.
-SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib"
-remove_sysroot_mkconfig_lib() {
-    rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib"
-}
+SYSROOT_DIRS_BLACKLIST += "${datadir}/grub/grub-mkconfig_lib"
-- 
2.1.0



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

* [PATCHv2 13/16] gettext: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (11 preceding siblings ...)
  2016-05-12  8:37 ` [PATCHv2 12/16] grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot Peter Kjellerstedt
@ 2016-05-12  8:38 ` Peter Kjellerstedt
  2016-05-12  8:38 ` [PATCHv2 14/16] gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from sysroot Peter Kjellerstedt
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:38 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-core/gettext/gettext_0.16.1.bb | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/meta/recipes-core/gettext/gettext_0.16.1.bb b/meta/recipes-core/gettext/gettext_0.16.1.bb
index cd0b759..6095c83 100644
--- a/meta/recipes-core/gettext/gettext_0.16.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.16.1.bb
@@ -102,11 +102,6 @@ do_install_append() {
 # available, and we don't want to use older macros from the target gettext in
 # a non-gplv3 build, so kill them and let dependent recipes rely on
 # gettext-native.
-
-SYSROOT_PREPROCESS_FUNCS += "remove_sysroot_m4_macros"
-
-remove_sysroot_m4_macros () {
-    rm -r "${SYSROOT_DESTDIR}${datadir}/aclocal"
-}
+SYSROOT_DIRS_BLACKLIST += "${datadir}/aclocal"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.1.0



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

* [PATCHv2 14/16] gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (12 preceding siblings ...)
  2016-05-12  8:38 ` [PATCHv2 13/16] gettext: " Peter Kjellerstedt
@ 2016-05-12  8:38 ` Peter Kjellerstedt
  2016-05-12  8:38 ` [PATCHv2 15/16] libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot Peter Kjellerstedt
  2016-05-12  8:38 ` [PATCHv2 16/16] font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST Peter Kjellerstedt
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:38 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-devtools/gcc/gcc-target.inc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index b8dabe5..a960ed4 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -205,6 +205,4 @@ do_install_append () {
 # and builds track file dependencies (e.g. perl and its makedepends code).
 # For determinism we don't install this ever and rely on the copy from gcc-cross.
 # [YOCTO #7287]
-sysroot_stage_dirs_append () {
-	rm -rf $to${libdir}/gcc
-}
+SYSROOT_DIRS_BLACKLIST += "${libdir}/gcc"
-- 
2.1.0



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

* [PATCHv2 15/16] libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (13 preceding siblings ...)
  2016-05-12  8:38 ` [PATCHv2 14/16] gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from sysroot Peter Kjellerstedt
@ 2016-05-12  8:38 ` Peter Kjellerstedt
  2016-05-12  8:38 ` [PATCHv2 16/16] font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST Peter Kjellerstedt
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:38 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-devtools/libtool/libtool_2.4.6.bb | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index 3851ec7..8858f6e 100644
--- a/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -5,7 +5,11 @@ RDEPENDS_${PN} += "bash"
 #
 # We want the results of libtool-cross preserved - don't stage anything ourselves.
 #
-SYSROOT_PREPROCESS_FUNCS += "libtool_sysroot_preprocess"
+SYSROOT_DIRS_BLACKLIST += " \
+    ${bindir} \
+    ${datadir}/aclocal \
+    ${datadir}/libtool/build-aux \
+"
 
 do_install_append () {
         sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
@@ -18,10 +22,3 @@ do_install_append () {
             -e 's@^\(postdep_objects="\).*@\1"@' \
             -i ${D}${bindir}/libtool
 }
-
-libtool_sysroot_preprocess () {
-	rm -rf ${SYSROOT_DESTDIR}${bindir}/*
-	rm -rf ${SYSROOT_DESTDIR}${datadir}/aclocal/*
-	rm -rf ${SYSROOT_DESTDIR}${datadir}/libtool/build-aux/*
-}
-
-- 
2.1.0



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

* [PATCHv2 16/16] font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST
  2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
                   ` (14 preceding siblings ...)
  2016-05-12  8:38 ` [PATCHv2 15/16] libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot Peter Kjellerstedt
@ 2016-05-12  8:38 ` Peter Kjellerstedt
  15 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-12  8:38 UTC (permalink / raw)
  To: openembedded-core

---
 meta/recipes-graphics/xorg-font/font-util_1.3.1.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb b/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
index 2285124..34646ff 100644
--- a/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
+++ b/meta/recipes-graphics/xorg-font/font-util_1.3.1.bb
@@ -19,7 +19,4 @@ BBCLASSEXTEND = "native"
 SRC_URI[md5sum] = "23756dab809f9ec5011bb27fb2c3c7d6"
 SRC_URI[sha256sum] = "aa7ebdb0715106dd255082f2310dbaa2cd7e225957c2a77d719720c7cc92b921"
 
-SYSROOT_PREPROCESS_FUNCS += "fontutil_sysroot_preprocess"
-fontutil_sysroot_preprocess () {
-	sysroot_stage_dir ${D}${datadir}/fonts/ ${SYSROOT_DESTDIR}${datadir}/fonts/
-}
+SYSROOT_DIRS_BLACKLIST_remove = "${datadir}/fonts"
-- 
2.1.0



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

* Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-12  8:37 ` [PATCHv2 05/16] tcl: " Peter Kjellerstedt
@ 2016-05-26 12:00   ` Andreas Müller
  2016-05-26 13:41     ` Peter Kjellerstedt
  0 siblings, 1 reply; 23+ messages in thread
From: Andreas Müller @ 2016-05-26 12:00 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Patches and discussions about the oe-core layer

On Thu, May 12, 2016 at 10:37 AM, Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
> ---
>  meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> index 8e92b3e..61be81d 100644
> --- a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> +++ b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> @@ -68,10 +68,7 @@ do_install() {
>         done
>  }
>
> -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess"
> -tcl_sysroot_preprocess () {
> -       sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
> -}
> +SYSROOT_DIRS += "${bindir_crossscripts}"
>
>  PACKAGES =+ "tcl-lib"
>  FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
> --
> 2.1.0
>
This one breaks meta-oe's postgresql.

Andreas


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

* Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-26 12:00   ` Andreas Müller
@ 2016-05-26 13:41     ` Peter Kjellerstedt
  2016-05-26 15:33       ` Martin Jansa
  2016-05-26 20:14       ` Andreas Müller
  0 siblings, 2 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-26 13:41 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer

> -----Original Message-----
> From: Andreas Müller [mailto:schnitzeltony@googlemail.com]
> Sent: den 26 maj 2016 14:00
> To: Peter Kjellerstedt
> Cc: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add
> dirs to stage in sysroot
> 
> On Thu, May 12, 2016 at 10:37 AM, Peter Kjellerstedt
> <peter.kjellerstedt@axis.com> wrote:
> > ---
> >  meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +----
> >  1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb b/meta/recipes-
> devtools/tcltk/tcl_8.6.4.bb
> > index 8e92b3e..61be81d 100644
> > --- a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> > +++ b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> > @@ -68,10 +68,7 @@ do_install() {
> >         done
> >  }
> >
> > -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess"
> > -tcl_sysroot_preprocess () {
> > -       sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
> > -}
> > +SYSROOT_DIRS += "${bindir_crossscripts}"
> >
> >  PACKAGES =+ "tcl-lib"
> >  FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
> > --
> > 2.1.0
> >
> This one breaks meta-oe's postgresql.
> 
> Andreas

Breaks it how?

//Peter


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

* Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-26 13:41     ` Peter Kjellerstedt
@ 2016-05-26 15:33       ` Martin Jansa
  2016-05-26 20:14       ` Andreas Müller
  1 sibling, 0 replies; 23+ messages in thread
From: Martin Jansa @ 2016-05-26 15:33 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

On Thu, May 26, 2016 at 01:41:14PM +0000, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: Andreas Müller [mailto:schnitzeltony@googlemail.com]
> > Sent: den 26 maj 2016 14:00
> > To: Peter Kjellerstedt
> > Cc: Patches and discussions about the oe-core layer
> > Subject: Re: [OE-core] [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add
> > dirs to stage in sysroot
> > 
> > On Thu, May 12, 2016 at 10:37 AM, Peter Kjellerstedt
> > <peter.kjellerstedt@axis.com> wrote:
> > > ---
> > >  meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +----
> > >  1 file changed, 1 insertion(+), 4 deletions(-)
> > >
> > > diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb b/meta/recipes-
> > devtools/tcltk/tcl_8.6.4.bb
> > > index 8e92b3e..61be81d 100644
> > > --- a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> > > +++ b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> > > @@ -68,10 +68,7 @@ do_install() {
> > >         done
> > >  }
> > >
> > > -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess"
> > > -tcl_sysroot_preprocess () {
> > > -       sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
> > > -}
> > > +SYSROOT_DIRS += "${bindir_crossscripts}"
> > >
> > >  PACKAGES =+ "tcl-lib"
> > >  FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
> > > --
> > > 2.1.0
> > >
> > This one breaks meta-oe's postgresql.
> > 
> > Andreas
> 
> Breaks it how?

You can see the error in last status e-mail:
http://lists.openembedded.org/pipermail/openembedded-core/2016-May/121725.html

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

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

* Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-26 13:41     ` Peter Kjellerstedt
  2016-05-26 15:33       ` Martin Jansa
@ 2016-05-26 20:14       ` Andreas Müller
  2016-05-28 13:41         ` Andreas Müller
  1 sibling, 1 reply; 23+ messages in thread
From: Andreas Müller @ 2016-05-26 20:14 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Patches and discussions about the oe-core layer

On Thu, May 26, 2016 at 3:41 PM, Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>> -----Original Message-----
>> From: Andreas Müller [mailto:schnitzeltony@googlemail.com]
>> Sent: den 26 maj 2016 14:00
>> To: Peter Kjellerstedt
>> Cc: Patches and discussions about the oe-core layer
>> Subject: Re: [OE-core] [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add
>> dirs to stage in sysroot
>>
>> On Thu, May 12, 2016 at 10:37 AM, Peter Kjellerstedt
>> <peter.kjellerstedt@axis.com> wrote:
>> > ---
>> >  meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +----
>> >  1 file changed, 1 insertion(+), 4 deletions(-)
>> >
>> > diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb b/meta/recipes-
>> devtools/tcltk/tcl_8.6.4.bb
>> > index 8e92b3e..61be81d 100644
>> > --- a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
>> > +++ b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
>> > @@ -68,10 +68,7 @@ do_install() {
>> >         done
>> >  }
>> >
>> > -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess"
>> > -tcl_sysroot_preprocess () {
>> > -       sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
>> > -}
>> > +SYSROOT_DIRS += "${bindir_crossscripts}"
>> >
>> >  PACKAGES =+ "tcl-lib"
>> >  FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
>> > --
>> > 2.1.0
>> >
>> This one breaks meta-oe's postgresql.
>>
>> Andreas
>
> Breaks it how?
>
> //Peter
>
Yes I agree I cannot see what's wrong with this patch - together with
modifications of staging.bbclass it should do same as before. For test
I reverted this patch and postgresql builds fine again. Have no idea
what's causing postgresql failure

Some typo I don't see?

Andreas


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

* Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-26 20:14       ` Andreas Müller
@ 2016-05-28 13:41         ` Andreas Müller
  2016-05-31  9:02           ` Peter Kjellerstedt
  0 siblings, 1 reply; 23+ messages in thread
From: Andreas Müller @ 2016-05-28 13:41 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Patches and discussions about the oe-core layer

On Thu, May 26, 2016 at 10:14 PM, Andreas Müller
<schnitzeltony@googlemail.com> wrote:
> On Thu, May 26, 2016 at 3:41 PM, Peter Kjellerstedt
> <peter.kjellerstedt@axis.com> wrote:
>>> -----Original Message-----
>>> From: Andreas Müller [mailto:schnitzeltony@googlemail.com]
>>> Sent: den 26 maj 2016 14:00
>>> To: Peter Kjellerstedt
>>> Cc: Patches and discussions about the oe-core layer
>>> Subject: Re: [OE-core] [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add
>>> dirs to stage in sysroot
>>>
>>> On Thu, May 12, 2016 at 10:37 AM, Peter Kjellerstedt
>>> <peter.kjellerstedt@axis.com> wrote:
>>> > ---
>>> >  meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +----
>>> >  1 file changed, 1 insertion(+), 4 deletions(-)
>>> >
>>> > diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb b/meta/recipes-
>>> devtools/tcltk/tcl_8.6.4.bb
>>> > index 8e92b3e..61be81d 100644
>>> > --- a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
>>> > +++ b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
>>> > @@ -68,10 +68,7 @@ do_install() {
>>> >         done
>>> >  }
>>> >
>>> > -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess"
>>> > -tcl_sysroot_preprocess () {
>>> > -       sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
>>> > -}
>>> > +SYSROOT_DIRS += "${bindir_crossscripts}"
>>> >
>>> >  PACKAGES =+ "tcl-lib"
>>> >  FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
>>> > --
>>> > 2.1.0
>>> >
>>> This one breaks meta-oe's postgresql.
>>>
>>> Andreas
>>
>> Breaks it how?
>>
>> //Peter
>>
> Yes I agree I cannot see what's wrong with this patch - together with
> modifications of staging.bbclass it should do same as before. For test
> I reverted this patch and postgresql builds fine again. Have no idea
> what's causing postgresql failure
>
> Some typo I don't see?
>
To get more infomation I

* build with patch reverted
* put  sysroot under git control
* remove revert again

Don't know why but now we see absolute paths in tclConfig.sh:

--- a/usr/bin/crossscripts/tclConfig.sh
+++ b/usr/bin/crossscripts/tclConfig.sh
@@ -57,7 +57,7 @@ TCL_SHLIB_CFLAGS='-fPIC'
 TCL_CFLAGS_WARNING='-Wall'

 # Extra flags to pass to cc:
-TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include=/usr/src/debug/tcl/8.6.4-r0
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux=
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2=
 -pipe '
+TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/src/debug/tcl/8.6.4-r0
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-linux=
-fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2=
 -pipe '

 # Base command to use for combining object files into a shared library:
 TCL_SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
@@ -104,11 +104,11 @@
TCL_BUILD_LIB_SPEC='-L/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/us

 # String to pass to linker to pick up the Tcl library from its
 # installed directory.
-TCL_LIB_SPEC='-L=/usr/lib -ltcl8.6'
+TCL_LIB_SPEC='-L=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/lib
-ltcl8.6'

 # String to pass to the compiler so that an extension can
 # find installed Tcl headers.
-TCL_INCLUDE_SPEC='-I=/usr/include/tcl8.6'
+TCL_INCLUDE_SPEC='-I=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include/tcl8.6'

 # Indicates whether a version numbers should be used in -l switches
 # ("ok" means it's safe to use switches like -ltcl7.5;  "nodots" means
@@ -157,7 +157,7 @@
TCL_BUILD_STUB_LIB_SPEC='-L/home/superandy/tmp/oe-core-glibc/sysroots/raspberryp

 # String to pass to linker to pick up the Tcl stub library from its
 # installed directory.
-TCL_STUB_LIB_SPEC='-L=/usr/lib -ltclstub8.6'
+TCL_STUB_LIB_SPEC='-L=/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/lib
-ltclstub8.6'

 # Path to the Tcl stub library in the build directory.
 TCL_BUILD_STUB_LIB_PATH='/home/superandy/tmp/oe-core-glibc/sysroots/raspberrypi2/usr/include/build/libtclstub8.6.a'

This is the symptom but what is it caused by?

Andreas


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

* Re: [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add dirs to stage in sysroot
  2016-05-28 13:41         ` Andreas Müller
@ 2016-05-31  9:02           ` Peter Kjellerstedt
  0 siblings, 0 replies; 23+ messages in thread
From: Peter Kjellerstedt @ 2016-05-31  9:02 UTC (permalink / raw)
  To: Andreas Müller; +Cc: Patches and discussions about the oe-core layer

> -----Original Message-----
> From: Andreas Müller [mailto:schnitzeltony@googlemail.com]
> Sent: den 28 maj 2016 15:42
> To: Peter Kjellerstedt
> Cc: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add
> dirs to stage in sysroot
> 
> On Thu, May 26, 2016 at 10:14 PM, Andreas Müller
> <schnitzeltony@googlemail.com> wrote:
> > On Thu, May 26, 2016 at 3:41 PM, Peter Kjellerstedt
> > <peter.kjellerstedt@axis.com> wrote:
> >>> -----Original Message-----
> >>> From: Andreas Müller [mailto:schnitzeltony@googlemail.com]
> >>> Sent: den 26 maj 2016 14:00
> >>> To: Peter Kjellerstedt
> >>> Cc: Patches and discussions about the oe-core layer
> >>> Subject: Re: [OE-core] [PATCHv2 05/16] tcl: Use SYSROOT_DIRS to add
> >>> dirs to stage in sysroot
> >>>
> >>> On Thu, May 12, 2016 at 10:37 AM, Peter Kjellerstedt
> >>> <peter.kjellerstedt@axis.com> wrote:
> >>> > ---
> >>> >  meta/recipes-devtools/tcltk/tcl_8.6.4.bb | 5 +----
> >>> >  1 file changed, 1 insertion(+), 4 deletions(-)
> >>> >
> >>> > diff --git a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> b/meta/recipes-
> >>> devtools/tcltk/tcl_8.6.4.bb
> >>> > index 8e92b3e..61be81d 100644
> >>> > --- a/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> >>> > +++ b/meta/recipes-devtools/tcltk/tcl_8.6.4.bb
> >>> > @@ -68,10 +68,7 @@ do_install() {
> >>> >         done
> >>> >  }
> >>> >
> >>> > -SYSROOT_PREPROCESS_FUNCS += "tcl_sysroot_preprocess"
> >>> > -tcl_sysroot_preprocess () {
> >>> > -       sysroot_stage_dir ${D}${bindir_crossscripts}
> ${SYSROOT_DESTDIR}${bindir_crossscripts}
> >>> > -}
> >>> > +SYSROOT_DIRS += "${bindir_crossscripts}"
> >>> >
> >>> >  PACKAGES =+ "tcl-lib"
> >>> >  FILES_tcl-lib = "${libdir}/libtcl8.6.so.*"
> >>> > --
> >>> > 2.1.0
> >>> >
> >>> This one breaks meta-oe's postgresql.
> >>>
> >>> Andreas
> >>
> >> Breaks it how?
> >>
> >> //Peter
> >>
> > Yes I agree I cannot see what's wrong with this patch - together with
> > modifications of staging.bbclass it should do same as before. For
> test
> > I reverted this patch and postgresql builds fine again. Have no idea
> > what's causing postgresql failure
> >
> > Some typo I don't see?
> >
> To get more infomation I
> 
> * build with patch reverted
> * put  sysroot under git control
> * remove revert again
> 
> Don't know why but now we see absolute paths in tclConfig.sh:
> 
> --- a/usr/bin/crossscripts/tclConfig.sh
> +++ b/usr/bin/crossscripts/tclConfig.sh
> @@ -57,7 +57,7 @@ TCL_SHLIB_CFLAGS='-fPIC'
>  TCL_CFLAGS_WARNING='-Wall'
> 
>  # Extra flags to pass to cc:
> -TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types
> -fdebug-prefix-map=/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2/usr/include=/usr/src/debug/tcl/8.6.4-r0
> -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-
> linux=
> -fdebug-prefix-map=/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2=
>  -pipe '
> +TCL_EXTRA_CFLAGS=' -O2 -pipe -g -feliminate-unused-debug-types
> -fdebug-prefix-map=/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2/usr/include=/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2/usr/src/debug/tcl/8.6.4-r0
> -fdebug-prefix-map=/home/superandy/tmp/oe-core-glibc/sysroots/x86_64-
> linux=
> -fdebug-prefix-map=/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2=
>  -pipe '
> 
>  # Base command to use for combining object files into a shared
> library:
>  TCL_SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
> @@ -104,11 +104,11 @@
> TCL_BUILD_LIB_SPEC='-L/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2/us
> 
>  # String to pass to linker to pick up the Tcl library from its
>  # installed directory.
> -TCL_LIB_SPEC='-L=/usr/lib -ltcl8.6'
> +TCL_LIB_SPEC='-L=/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2/usr/lib
> -ltcl8.6'
> 
>  # String to pass to the compiler so that an extension can
>  # find installed Tcl headers.
> -TCL_INCLUDE_SPEC='-I=/usr/include/tcl8.6'
> +TCL_INCLUDE_SPEC='-I=/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2/usr/include/tcl8.6'
> 
>  # Indicates whether a version numbers should be used in -l switches
>  # ("ok" means it's safe to use switches like -ltcl7.5;  "nodots" means
> @@ -157,7 +157,7 @@
> TCL_BUILD_STUB_LIB_SPEC='-L/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberryp
> 
>  # String to pass to linker to pick up the Tcl stub library from its
>  # installed directory.
> -TCL_STUB_LIB_SPEC='-L=/usr/lib -ltclstub8.6'
> +TCL_STUB_LIB_SPEC='-L=/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2/usr/lib
> -ltclstub8.6'
> 
>  # Path to the Tcl stub library in the build directory.
>  TCL_BUILD_STUB_LIB_PATH='/home/superandy/tmp/oe-core-
> glibc/sysroots/raspberrypi2/usr/include/build/libtclstub8.6.a'
> 
> This is the symptom but what is it caused by?
> 
> Andreas

It seems to be an intricate history. The difference stems from the 
the order things are executed in SYSROOT_PREPROCESS_FUNCS, the fact 
that the tcl recipe inherits binconfig and that it sets 
BINCONFIG_GLOB to "*Config.sh". 

Before my change, the tcl_sysroot_preprocess() function was called 
after the binconfig_sysroot_preprocess() function, and thus overwrote 
the tclConfig.sh that the latter function had installed. After my 
change the "correct" tclConfig.sh is installed by sysroot_stage_all() 
which is run before binconfig_sysroot_preprocess() and thus the 
latter now overwrites the "correct" tclConfig.sh with a "faulty" 
version (I used "correct" and "faulty" here as I guess it depends 
on one's point of view, and what one expect inheriting binconfig to 
do...)

If I change:

BINCONFIG_GLOB = "*Config.sh"

to:

BINCONFIG_GLOB_class-target = "tclConfig.sh"

both the installed files in the sysroots and on target go back to 
look exactly as they did before my change (and postgresql builds 
again). Changing "*Config.sh" to "tclConfig.sh" will avoid 
installing extra files in the sysroots (itclConfig.sh, tclooConfig.sh 
and tdbcConfig.sh) as I do not think that was intended when the use 
of binconfig was introduced for tcl (based on what is installed by 
do_install()).

I will send a patch to fix the tcl recipe as per above.

//Peter


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

end of thread, other threads:[~2016-05-31  9:02 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12  8:37 [PATCHv2 00/16] Simplify how to stage directories in the sysroot Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 01/16] staging.bbclass: Make it easier to define which dirs to stage Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 02/16] u-boot-fw-utils: Use SYSROOT_DIRS to add dirs to stage in sysroot Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 03/16] libtool-cross: " Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 04/16] qemuwrapper-cross: " Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 05/16] tcl: " Peter Kjellerstedt
2016-05-26 12:00   ` Andreas Müller
2016-05-26 13:41     ` Peter Kjellerstedt
2016-05-26 15:33       ` Martin Jansa
2016-05-26 20:14       ` Andreas Müller
2016-05-28 13:41         ` Andreas Müller
2016-05-31  9:02           ` Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 06/16] shadow-sysroot: " Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 07/16] depmodwrapper-cross: " Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 08/16] base-files: " Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 09/16] signing-keys: " Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 10/16] vala.inc: " Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 11/16] gobject-introspection: " Peter Kjellerstedt
2016-05-12  8:37 ` [PATCHv2 12/16] grub2.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot Peter Kjellerstedt
2016-05-12  8:38 ` [PATCHv2 13/16] gettext: " Peter Kjellerstedt
2016-05-12  8:38 ` [PATCHv2 14/16] gcc-target.inc: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from sysroot Peter Kjellerstedt
2016-05-12  8:38 ` [PATCHv2 15/16] libtool: Use SYSROOT_DIRS_BLACKLIST to exclude dirs from the sysroot Peter Kjellerstedt
2016-05-12  8:38 ` [PATCHv2 16/16] font-util: Remove ${datadir}/fonts from SYSROOT_DIRS_BLACKLIST Peter Kjellerstedt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.