* [PATCH] quilt: Fix paths for patch and perl
@ 2017-03-29 14:44 Jussi Kukkonen
2017-03-30 9:02 ` Richard Purdie
0 siblings, 1 reply; 4+ messages in thread
From: Jussi Kukkonen @ 2017-03-29 14:44 UTC (permalink / raw)
To: openembedded-core
--with-perl value is used as part of shebang lines: the previous
do_install_append hack did not work as it was often used as
#! /usr/bin/env perl -w
Env does not support arguments, set --with-perl instead. Native
recipe already overrides this so should not break.
--with-patch is used within the gnu patch wrapper only: before this
commit the wrapper contained a path to (build host) native patch.
Also tweak one test so busybox mv output is accepted.
All ptests should now pass: Fixes [YOCTO #11221].
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
meta/recipes-devtools/quilt/quilt.inc | 3 ++-
...0001-tests-Allow-different-output-from-mv.patch | 29 ++++++++++++++++++++++
meta/recipes-devtools/quilt/quilt_0.65.bb | 10 --------
3 files changed, 31 insertions(+), 11 deletions(-)
create mode 100644 meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
index 57e2a14..e6a63ce 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -8,6 +8,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
file://run-ptest \
file://Makefile \
file://test.sh \
+ file://0001-tests-Allow-different-output-from-mv.patch \
"
SRC_URI[md5sum] = "c67ba0228f5b7b8bbe469474661f92d6"
@@ -33,7 +34,7 @@ RDEPENDS_${PN} = "bash"
EXTRA_OE_MAKE_ARGS_darwin ?= ""
EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}"
-EXTRA_OECONF = "--with-perl=perl"
+EXTRA_OECONF = "--with-perl=${bindir}/perl --with-patch=patch"
CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash"
diff --git a/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch b/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
new file mode 100644
index 0000000..21219a0
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
@@ -0,0 +1,29 @@
+From 1530138960cfafbeefb95f2a760954c00b4d0ef0 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 29 Mar 2017 15:11:59 +0300
+Subject: [PATCH] tests: Allow different output from mv
+
+busybox mv has different error messages: fix the test
+
+Upstream-Status: Inappropriate [embedded]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ test/failbackup.test | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/failbackup.test b/test/failbackup.test
+index 37046f7..fce6725 100644
+--- a/test/failbackup.test
++++ b/test/failbackup.test
+@@ -16,7 +16,7 @@ What happens when refresh fails because of a permission error?
+ $ cat > test.txt
+ < This is updated test.txt.
+ $ quilt refresh --backup
+- >~ mv: cannot move [`']?%{P}test.diff'? to [`']?%{P}test.diff~'?: Permission denied
++ >~ mv: .*: Permission denied
+ $ echo %{?}
+ > 1
+
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/quilt/quilt_0.65.bb b/meta/recipes-devtools/quilt/quilt_0.65.bb
index 00f900a..12859f0 100644
--- a/meta/recipes-devtools/quilt/quilt_0.65.bb
+++ b/meta/recipes-devtools/quilt/quilt_0.65.bb
@@ -4,13 +4,3 @@ RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
SRC_URI += "file://aclocal.patch \
file://gnu_patch_test_fix_target.patch \
"
-
-# fix build-distro specific perl path in the target perl scripts
-do_install_append() {
- for perlscript in ${D}${datadir}/quilt/scripts/remove-trailing-ws ${D}${datadir}/quilt/scripts/dependency-graph ${D}${datadir}/quilt/scripts/edmail ${D}${bindir}/guards
- do
- if [ -f $perlscript ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' $perlscript
- fi
- done
-}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] quilt: Fix paths for patch and perl
2017-03-29 14:44 [PATCH] quilt: Fix paths for patch and perl Jussi Kukkonen
@ 2017-03-30 9:02 ` Richard Purdie
2017-03-30 16:43 ` [PATCHv2] " Jussi Kukkonen
0 siblings, 1 reply; 4+ messages in thread
From: Richard Purdie @ 2017-03-30 9:02 UTC (permalink / raw)
To: Jussi Kukkonen, openembedded-core
On Wed, 2017-03-29 at 17:44 +0300, Jussi Kukkonen wrote:
> --with-perl value is used as part of shebang lines: the previous
> do_install_append hack did not work as it was often used as
> #! /usr/bin/env perl -w
> Env does not support arguments, set --with-perl instead. Native
> recipe already overrides this so should not break.
>
> --with-patch is used within the gnu patch wrapper only: before this
> commit the wrapper contained a path to (build host) native patch.
>
> Also tweak one test so busybox mv output is accepted.
>
> All ptests should now pass: Fixes [YOCTO #11221].
>
> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> ---
> meta/recipes-devtools/quilt/quilt.inc | 3 ++-
> ...0001-tests-Allow-different-output-from-mv.patch | 29
> ++++++++++++++++++++++
> meta/recipes-devtools/quilt/quilt_0.65.bb | 10 --------
> 3 files changed, 31 insertions(+), 11 deletions(-)
> create mode 100644 meta/recipes-devtools/quilt/quilt/0001-tests-
> Allow-different-output-from-mv.patch
>
> diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-
> devtools/quilt/quilt.inc
> index 57e2a14..e6a63ce 100644
> --- a/meta/recipes-devtools/quilt/quilt.inc
> +++ b/meta/recipes-devtools/quilt/quilt.inc
> @@ -8,6 +8,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-
> ${PV}.tar.gz \
> file://run-ptest \
> file://Makefile \
> file://test.sh \
> + file://0001-tests-Allow-different-output-from-mv.patch \
> "
>
> SRC_URI[md5sum] = "c67ba0228f5b7b8bbe469474661f92d6"
> @@ -33,7 +34,7 @@ RDEPENDS_${PN} = "bash"
> EXTRA_OE_MAKE_ARGS_darwin ?= ""
> EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}"
>
> -EXTRA_OECONF = "--with-perl=perl"
> +EXTRA_OECONF = "--with-perl=${bindir}/perl --with-patch=patch"
Unfortunately I think this would break nativesdk-quilt since we'd no
longer be using env and hence would require the buildtools tarball and
sdks contained perl?
Cheers,
Richard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCHv2] quilt: Fix paths for patch and perl
2017-03-30 9:02 ` Richard Purdie
@ 2017-03-30 16:43 ` Jussi Kukkonen
2017-03-30 16:49 ` [PATCHv3] " Jussi Kukkonen
0 siblings, 1 reply; 4+ messages in thread
From: Jussi Kukkonen @ 2017-03-30 16:43 UTC (permalink / raw)
To: openembedded-core
Currently some shebang lines end up as
#! /usr/bin/env perl -w
env does not like the argument. Also the current sed to insert env
does not cover the copies ptests use. Fix these issues by:
- using --with-perl to insert "env"
- Replacing "-w" in shebang lines with a new "use warning;" line
before configure
Remove a EXTRA_OECONF_append_class_target from the native recipe.
Don't overwrite EXTRA_OECONF in native: the values should be correct
for native as well.
--with-patch is used within the gnu patch wrapper only: before this
commit the wrapper contained a (build host) path to native patch.
Also tweak one test so busybox mv output is accepted.
All ptests should now pass: Fixes [YOCTO #11221].
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
nativesdk-quilt does not actually exist but using env to find perl
is still good form... So changes in v2:
* Use --with-perl="${USRBINPATH}/env perl"
* Instead of "-w" use "use warning;"
* Use EXTRA_OECONF from .inc for native as well
Thanks,
Jussi
meta/recipes-devtools/quilt/quilt-native.inc | 3 +--
meta/recipes-devtools/quilt/quilt.inc | 9 ++++++-
...0001-tests-Allow-different-output-from-mv.patch | 29 ++++++++++++++++++++++
meta/recipes-devtools/quilt/quilt_0.65.bb | 10 --------
4 files changed, 38 insertions(+), 13 deletions(-)
create mode 100644 meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
diff --git a/meta/recipes-devtools/quilt/quilt-native.inc b/meta/recipes-devtools/quilt/quilt-native.inc
index fce5fa1..adbd77a 100644
--- a/meta/recipes-devtools/quilt/quilt-native.inc
+++ b/meta/recipes-devtools/quilt/quilt-native.inc
@@ -5,8 +5,7 @@ INHIBIT_AUTOTOOLS_DEPS = "1"
inherit native
PATCHTOOL = "patch"
-EXTRA_OECONF = "--disable-nls"
-EXTRA_OECONF_append_class-target = "--with-perl=perl"
+EXTRA_OECONF_append = "--disable-nls"
do_configure () {
oe_runconf
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
index 57e2a14..c7bb741 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -8,6 +8,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
file://run-ptest \
file://Makefile \
file://test.sh \
+ file://0001-tests-Allow-different-output-from-mv.patch \
"
SRC_URI[md5sum] = "c67ba0228f5b7b8bbe469474661f92d6"
@@ -33,10 +34,16 @@ RDEPENDS_${PN} = "bash"
EXTRA_OE_MAKE_ARGS_darwin ?= ""
EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}"
-EXTRA_OECONF = "--with-perl=perl"
+EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch"
CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash"
+# Make sure we don't have "-w" in shebang lines: it breaks using
+# "/usr/bin/env perl" as parser
+do_configure_prepend () {
+ find ${S} -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \;
+}
+
# Don't setup symlinks to host utilities, we don't need them
do_configure_append () {
sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i ${S}/Makefile
diff --git a/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch b/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
new file mode 100644
index 0000000..21219a0
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
@@ -0,0 +1,29 @@
+From 1530138960cfafbeefb95f2a760954c00b4d0ef0 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 29 Mar 2017 15:11:59 +0300
+Subject: [PATCH] tests: Allow different output from mv
+
+busybox mv has different error messages: fix the test
+
+Upstream-Status: Inappropriate [embedded]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ test/failbackup.test | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/failbackup.test b/test/failbackup.test
+index 37046f7..fce6725 100644
+--- a/test/failbackup.test
++++ b/test/failbackup.test
+@@ -16,7 +16,7 @@ What happens when refresh fails because of a permission error?
+ $ cat > test.txt
+ < This is updated test.txt.
+ $ quilt refresh --backup
+- >~ mv: cannot move [`']?%{P}test.diff'? to [`']?%{P}test.diff~'?: Permission denied
++ >~ mv: .*: Permission denied
+ $ echo %{?}
+ > 1
+
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/quilt/quilt_0.65.bb b/meta/recipes-devtools/quilt/quilt_0.65.bb
index 00f900a..12859f0 100644
--- a/meta/recipes-devtools/quilt/quilt_0.65.bb
+++ b/meta/recipes-devtools/quilt/quilt_0.65.bb
@@ -4,13 +4,3 @@ RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
SRC_URI += "file://aclocal.patch \
file://gnu_patch_test_fix_target.patch \
"
-
-# fix build-distro specific perl path in the target perl scripts
-do_install_append() {
- for perlscript in ${D}${datadir}/quilt/scripts/remove-trailing-ws ${D}${datadir}/quilt/scripts/dependency-graph ${D}${datadir}/quilt/scripts/edmail ${D}${bindir}/guards
- do
- if [ -f $perlscript ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' $perlscript
- fi
- done
-}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCHv3] quilt: Fix paths for patch and perl
2017-03-30 16:43 ` [PATCHv2] " Jussi Kukkonen
@ 2017-03-30 16:49 ` Jussi Kukkonen
0 siblings, 0 replies; 4+ messages in thread
From: Jussi Kukkonen @ 2017-03-30 16:49 UTC (permalink / raw)
To: openembedded-core
Currently some shebang lines end up as
#! /usr/bin/env perl -w
env does not like the argument. Also the current sed to insert env
does not cover the copies ptests use. Fix these issues by:
- using --with-perl to insert "env"
- Replacing "-w" in shebang lines with a new "use warning;" line
Remove a EXTRA_OECONF_append_class_target from the native recipe.
Don't overwrite EXTRA_OECONF in native: the values should be correct
for native as well.
--with-patch is used within the gnu patch wrapper only: before this
commit the wrapper contained a (build host) path to native patch.
Also tweak one test so busybox mv output is accepted.
All ptests should now pass: Fixes [YOCTO #11221].
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
changes since v2:
* Added missing leading space in EXTRA_OECONF_append
meta/recipes-devtools/quilt/quilt-native.inc | 3 +--
meta/recipes-devtools/quilt/quilt.inc | 9 ++++++-
...0001-tests-Allow-different-output-from-mv.patch | 29 ++++++++++++++++++++++
meta/recipes-devtools/quilt/quilt_0.65.bb | 10 --------
4 files changed, 38 insertions(+), 13 deletions(-)
create mode 100644 meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
diff --git a/meta/recipes-devtools/quilt/quilt-native.inc b/meta/recipes-devtools/quilt/quilt-native.inc
index fce5fa1..c706704 100644
--- a/meta/recipes-devtools/quilt/quilt-native.inc
+++ b/meta/recipes-devtools/quilt/quilt-native.inc
@@ -5,8 +5,7 @@ INHIBIT_AUTOTOOLS_DEPS = "1"
inherit native
PATCHTOOL = "patch"
-EXTRA_OECONF = "--disable-nls"
-EXTRA_OECONF_append_class-target = "--with-perl=perl"
+EXTRA_OECONF_append = " --disable-nls"
do_configure () {
oe_runconf
diff --git a/meta/recipes-devtools/quilt/quilt.inc b/meta/recipes-devtools/quilt/quilt.inc
index 57e2a14..c7bb741 100644
--- a/meta/recipes-devtools/quilt/quilt.inc
+++ b/meta/recipes-devtools/quilt/quilt.inc
@@ -8,6 +8,7 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/quilt/quilt-${PV}.tar.gz \
file://run-ptest \
file://Makefile \
file://test.sh \
+ file://0001-tests-Allow-different-output-from-mv.patch \
"
SRC_URI[md5sum] = "c67ba0228f5b7b8bbe469474661f92d6"
@@ -33,10 +34,16 @@ RDEPENDS_${PN} = "bash"
EXTRA_OE_MAKE_ARGS_darwin ?= ""
EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}"
-EXTRA_OECONF = "--with-perl=perl"
+EXTRA_OECONF = "--with-perl='${USRBINPATH}/env perl' --with-patch=patch"
CACHED_CONFIGUREVARS += "ac_cv_path_BASH=/bin/bash"
+# Make sure we don't have "-w" in shebang lines: it breaks using
+# "/usr/bin/env perl" as parser
+do_configure_prepend () {
+ find ${S} -name "*.in" -exec sed -i -e "1s,^#\!.*@PERL@ -w$,#\! @PERL@\nuse warnings;," {} \;
+}
+
# Don't setup symlinks to host utilities, we don't need them
do_configure_append () {
sed -e 's,^COMPAT_SYMLINKS.*:=.*,COMPAT_SYMLINKS :=,' -i ${S}/Makefile
diff --git a/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch b/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
new file mode 100644
index 0000000..21219a0
--- /dev/null
+++ b/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch
@@ -0,0 +1,29 @@
+From 1530138960cfafbeefb95f2a760954c00b4d0ef0 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 29 Mar 2017 15:11:59 +0300
+Subject: [PATCH] tests: Allow different output from mv
+
+busybox mv has different error messages: fix the test
+
+Upstream-Status: Inappropriate [embedded]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ test/failbackup.test | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/failbackup.test b/test/failbackup.test
+index 37046f7..fce6725 100644
+--- a/test/failbackup.test
++++ b/test/failbackup.test
+@@ -16,7 +16,7 @@ What happens when refresh fails because of a permission error?
+ $ cat > test.txt
+ < This is updated test.txt.
+ $ quilt refresh --backup
+- >~ mv: cannot move [`']?%{P}test.diff'? to [`']?%{P}test.diff~'?: Permission denied
++ >~ mv: .*: Permission denied
+ $ echo %{?}
+ > 1
+
+--
+2.1.4
+
diff --git a/meta/recipes-devtools/quilt/quilt_0.65.bb b/meta/recipes-devtools/quilt/quilt_0.65.bb
index 00f900a..12859f0 100644
--- a/meta/recipes-devtools/quilt/quilt_0.65.bb
+++ b/meta/recipes-devtools/quilt/quilt_0.65.bb
@@ -4,13 +4,3 @@ RDEPENDS_${PN} += "patch diffstat bzip2 util-linux"
SRC_URI += "file://aclocal.patch \
file://gnu_patch_test_fix_target.patch \
"
-
-# fix build-distro specific perl path in the target perl scripts
-do_install_append() {
- for perlscript in ${D}${datadir}/quilt/scripts/remove-trailing-ws ${D}${datadir}/quilt/scripts/dependency-graph ${D}${datadir}/quilt/scripts/edmail ${D}${bindir}/guards
- do
- if [ -f $perlscript ]; then
- sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' $perlscript
- fi
- done
-}
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-30 16:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29 14:44 [PATCH] quilt: Fix paths for patch and perl Jussi Kukkonen
2017-03-30 9:02 ` Richard Purdie
2017-03-30 16:43 ` [PATCHv2] " Jussi Kukkonen
2017-03-30 16:49 ` [PATCHv3] " Jussi Kukkonen
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.