* [PATCH] glib-2.0: Do not use readlink to set target paths.
@ 2014-05-12 20:00 Drew Moseley
2014-05-13 18:57 ` Saul Wold
0 siblings, 1 reply; 3+ messages in thread
From: Drew Moseley @ 2014-05-12 20:00 UTC (permalink / raw)
To: openembedded-core
From: Drew Moseley <drew_moseley@mentor.com>
Do not use readlink to set ABS_GLIB_RUNTIME_LIBDIR when cross
compiling. Doing so causes host paths to potentially pollute the
target. Unfortunately in this case we don't actually convert to
an absolute path.
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
---
...c-Do-not-use-readlink-when-cross-compilin.patch | 31 ++++++++++++++++++++
meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb | 1 +
2 files changed, 32 insertions(+)
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
new file mode 100644
index 0000000..0be3631
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
@@ -0,0 +1,31 @@
+commit 9b38d507ec37b3d7d4df6095fa7ed16b47d399f7
+Author: Drew Moseley <drew_moseley@mentor.com>
+Date: Sat Mar 29 21:10:43 2014 -0400
+
+ configure.ac: Do not use readlink when cross compiling.
+
+ Do not use readlink to set ABS_GLIB_RUNTIME_LIBDIR when cross
+ compiling. Doing so causes host paths to potentially pollute
+ the target.
+
+ Note that in this case the path is not converted to absolute if
+ it contains any ".." references so it's not completely correct.
+
+ Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=727575]
+ Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+
+diff -rub glib-2.38.2.orig/configure.ac glib-2.38.2/configure.ac
+--- glib-2.38.2.orig/configure.ac 2014-04-03 20:17:13.035567143 -0400
++++ glib-2.38.2/configure.ac 2014-04-03 20:19:07.071566057 -0400
+@@ -275,7 +275,11 @@
+ [],
+ [with_runtime_libdir=""])
+ GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
++AS_IF([ test $cross_compiling = yes ], [
++ABS_GLIB_RUNTIME_LIBDIR="$libdir/$with_runtime_libdir"
++], [
+ ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
++])
+ AC_SUBST(GLIB_RUNTIME_LIBDIR)
+ AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
+ AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
index 4052950..1138dae 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
@@ -16,6 +16,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://gtest-skip-fixes.patch \
file://gio-test-race.patch \
file://uclibc.patch \
+ file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
"
SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] glib-2.0: Do not use readlink to set target paths.
2014-05-12 20:00 [PATCH] glib-2.0: Do not use readlink to set target paths Drew Moseley
@ 2014-05-13 18:57 ` Saul Wold
2014-05-14 17:08 ` Drew Moseley
0 siblings, 1 reply; 3+ messages in thread
From: Saul Wold @ 2014-05-13 18:57 UTC (permalink / raw)
To: Drew Moseley, openembedded-core
On 05/12/2014 01:00 PM, Drew Moseley wrote:
> From: Drew Moseley <drew_moseley@mentor.com>
>
> Do not use readlink to set ABS_GLIB_RUNTIME_LIBDIR when cross
> compiling. Doing so causes host paths to potentially pollute the
> target. Unfortunately in this case we don't actually convert to
> an absolute path.
>
> Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
> ---
> ...c-Do-not-use-readlink-when-cross-compilin.patch | 31 ++++++++++++++++++++
> meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb | 1 +
> 2 files changed, 32 insertions(+)
> create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
>
So we just updated to 2.40 version of glib-2.0, can you verify if this
issue is fixed in 2.40 and of not, please rebase this patch against the
newer version of glib-2.0.
Thanks
Sau!
> diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
> new file mode 100644
> index 0000000..0be3631
> --- /dev/null
> +++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
> @@ -0,0 +1,31 @@
> +commit 9b38d507ec37b3d7d4df6095fa7ed16b47d399f7
> +Author: Drew Moseley <drew_moseley@mentor.com>
> +Date: Sat Mar 29 21:10:43 2014 -0400
> +
> + configure.ac: Do not use readlink when cross compiling.
> +
> + Do not use readlink to set ABS_GLIB_RUNTIME_LIBDIR when cross
> + compiling. Doing so causes host paths to potentially pollute
> + the target.
> +
> + Note that in this case the path is not converted to absolute if
> + it contains any ".." references so it's not completely correct.
> +
> + Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=727575]
> + Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
> +
> +diff -rub glib-2.38.2.orig/configure.ac glib-2.38.2/configure.ac
> +--- glib-2.38.2.orig/configure.ac 2014-04-03 20:17:13.035567143 -0400
> ++++ glib-2.38.2/configure.ac 2014-04-03 20:19:07.071566057 -0400
> +@@ -275,7 +275,11 @@
> + [],
> + [with_runtime_libdir=""])
> + GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
> ++AS_IF([ test $cross_compiling = yes ], [
> ++ABS_GLIB_RUNTIME_LIBDIR="$libdir/$with_runtime_libdir"
> ++], [
> + ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
> ++])
> + AC_SUBST(GLIB_RUNTIME_LIBDIR)
> + AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
> + AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
> diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
> index 4052950..1138dae 100644
> --- a/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
> +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.38.2.bb
> @@ -16,6 +16,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
> file://gtest-skip-fixes.patch \
> file://gio-test-race.patch \
> file://uclibc.patch \
> + file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
> "
>
> SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] glib-2.0: Do not use readlink to set target paths.
2014-05-13 18:57 ` Saul Wold
@ 2014-05-14 17:08 ` Drew Moseley
0 siblings, 0 replies; 3+ messages in thread
From: Drew Moseley @ 2014-05-14 17:08 UTC (permalink / raw)
To: openembedded-core
Do not use readlink to set ABS_GLIB_RUNTIME_LIBDIR when cross
compiling. Doing so causes host paths to potentially pollute the
target. Unfortunately in this case we don't actually convert to
an absolute path.
Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
---
...c-Do-not-use-readlink-when-cross-compilin.patch | 31 ++++++++++++++++++++
meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb | 1 +
2 files changed, 32 insertions(+)
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch b/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
new file mode 100644
index 0000000..0be3631
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch
@@ -0,0 +1,31 @@
+commit 9b38d507ec37b3d7d4df6095fa7ed16b47d399f7
+Author: Drew Moseley <drew_moseley@mentor.com>
+Date: Sat Mar 29 21:10:43 2014 -0400
+
+ configure.ac: Do not use readlink when cross compiling.
+
+ Do not use readlink to set ABS_GLIB_RUNTIME_LIBDIR when cross
+ compiling. Doing so causes host paths to potentially pollute
+ the target.
+
+ Note that in this case the path is not converted to absolute if
+ it contains any ".." references so it's not completely correct.
+
+ Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=727575]
+ Signed-off-by: Drew Moseley <drew_moseley@mentor.com>
+
+diff -rub glib-2.38.2.orig/configure.ac glib-2.38.2/configure.ac
+--- glib-2.38.2.orig/configure.ac 2014-04-03 20:17:13.035567143 -0400
++++ glib-2.38.2/configure.ac 2014-04-03 20:19:07.071566057 -0400
+@@ -275,7 +275,11 @@
+ [],
+ [with_runtime_libdir=""])
+ GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
++AS_IF([ test $cross_compiling = yes ], [
++ABS_GLIB_RUNTIME_LIBDIR="$libdir/$with_runtime_libdir"
++], [
+ ABS_GLIB_RUNTIME_LIBDIR="`readlink -m $libdir/$with_runtime_libdir`"
++])
+ AC_SUBST(GLIB_RUNTIME_LIBDIR)
+ AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
+ AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb
index 3be126f..ff1fb87 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.40.0.bb
@@ -12,6 +12,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
file://run-ptest \
file://ptest-paths.patch \
file://uclibc.patch \
+ file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
"
SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-14 17:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 20:00 [PATCH] glib-2.0: Do not use readlink to set target paths Drew Moseley
2014-05-13 18:57 ` Saul Wold
2014-05-14 17:08 ` Drew Moseley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox