diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-devtools/quilt | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/quilt')
9 files changed, 182 insertions, 0 deletions
diff --git a/poky/meta/recipes-devtools/quilt/quilt-native.inc b/poky/meta/recipes-devtools/quilt/quilt-native.inc new file mode 100644 index 000000000..c7067042e --- /dev/null +++ b/poky/meta/recipes-devtools/quilt/quilt-native.inc @@ -0,0 +1,18 @@ +RDEPENDS_${PN} = "diffstat-native patch-native bzip2-native util-linux-native" + +INHIBIT_AUTOTOOLS_DEPS = "1" + +inherit native + +PATCHTOOL = "patch" +EXTRA_OECONF_append = " --disable-nls" + +do_configure () { + oe_runconf +} + +do_install_append () { + # Dummy quiltrc file for patch.bbclass + install -d ${D}${sysconfdir}/ + touch ${D}${sysconfdir}/quiltrc +} diff --git a/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb b/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb new file mode 100644 index 000000000..6bc7dcdb7 --- /dev/null +++ b/poky/meta/recipes-devtools/quilt/quilt-native_0.65.bb @@ -0,0 +1,2 @@ +require quilt.inc +require quilt-native.inc diff --git a/poky/meta/recipes-devtools/quilt/quilt.inc b/poky/meta/recipes-devtools/quilt/quilt.inc new file mode 100644 index 000000000..c7bb741b4 --- /dev/null +++ b/poky/meta/recipes-devtools/quilt/quilt.inc @@ -0,0 +1,77 @@ +SUMMARY = "Tool for working with series of patches" +HOMEPAGE = "http://savannah.nongnu.org/projects/quilt/" +SECTION = "devel" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +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" +SRC_URI[sha256sum] = "f6cbc788e5cbbb381a3c6eab5b9efce67c776a8662a7795c7432fd27aa096819" + +inherit autotools-brokensep ptest + +EXTRA_OECONF_darwin += "--without-date \ + --without-getopt \ + " + +CLEANBROKEN = "1" + +PACKAGES += "guards guards-doc" +FILES_${PN} = "${sysconfdir} ${datadir}/quilt \ + ${bindir}/quilt ${libdir}/quilt" +FILES_guards = "${bindir}/guards" +FILES_${PN}-doc = "${mandir}/man1/quilt.1 ${docdir}/${BPN}" +FILES_guards-doc = "${mandir}/man1/guards.1" + +RDEPENDS_${PN} = "bash" + +EXTRA_OE_MAKE_ARGS_darwin ?= "" +EXTRA_OE_MAKE_ARGS ?= "BUILD_ROOT=${D}" + +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 +} + +# quilt ignores DESTDIR +do_install () { + oe_runmake ${EXTRA_OE_MAKE_ARGS} install + # cleanup unpackaged files + rm -rf ${D}/${datadir}/emacs +} + +do_compile_ptest() { + oe_runmake bin/patch-wrapper test/.depend +} + +do_install_ptest() { + tar -c --exclude=\*.in bin/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=\*.in compat/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=\*.in quilt/ | ( cd ${D}${PTEST_PATH} && tar -xf - ) + tar -c --exclude=mail.test --exclude=delete.test test/ | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test) + cp ${WORKDIR}/Makefile ${D}${PTEST_PATH} + cp ${WORKDIR}/test.sh ${D}${PTEST_PATH} +} + +RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \ + perl-module-filehandle perl-module-getopt-std \ + perl-module-posix perl-module-file-temp \ + perl-module-text-parsewords perl-module-overloading \ + bash util-linux-getopt \ + " diff --git a/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch b/poky/meta/recipes-devtools/quilt/quilt/0001-tests-Allow-different-output-from-mv.patch new file mode 100644 index 000000000..21219a0bb --- /dev/null +++ b/poky/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/poky/meta/recipes-devtools/quilt/quilt/Makefile b/poky/meta/recipes-devtools/quilt/quilt/Makefile new file mode 100644 index 000000000..7b3ac8a49 --- /dev/null +++ b/poky/meta/recipes-devtools/quilt/quilt/Makefile @@ -0,0 +1,13 @@ +PATH := $(CURDIR)/bin:$(CURDIR)/compat:$(PATH) +QUILT_DIR := $(CURDIR)/quilt +QUILTRC := $(CURDIR)/test/test.quiltrc +export QUILT_DIR QUILTRC +CHECK_ENV := P=patches/; _P=../patches/; export P _P +-include test/.depend + +check-% : test/%.test + @LANG=C; LC_ALL=C; \ + export LANG LC_ALL; \ + $(CHECK_ENV); \ + cd $(<D); \ + ./run -q $(<F) diff --git a/poky/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch b/poky/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch new file mode 100644 index 000000000..672155bb6 --- /dev/null +++ b/poky/meta/recipes-devtools/quilt/quilt/gnu_patch_test_fix_target.patch @@ -0,0 +1,26 @@ +Upstream-Status: Pending + +the test should be skipped for cross compiling. + +Signed-off-by: Qing He <qing.he@intel.com> + +diff --git a/configure.ac b/configure.ac +index 026a36c..8af591b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -245,6 +245,7 @@ fi + QUILT_COMPAT_PROG_PATH(DIFF, diff) + QUILT_COMPAT_PROG_PATH(PATCH, patch) + ++if test "x$cross_compiling" != "xyes"; then + # Sun diff and others will not work because GNU patch options are used. + AC_MSG_CHECKING([the version of $DIFF]) + if $DIFF --version 2>/dev/null | grep GNU >/dev/null; then +@@ -293,6 +294,7 @@ current version of patch from ftp.gnu.org, or if you already have GNU patch + then you can supply its path with the '--with-patch=' option. + ]) + fi ++fi + + QUILT_COMPAT_PROG_PATH(FIND, find) + diff --git a/poky/meta/recipes-devtools/quilt/quilt/run-ptest b/poky/meta/recipes-devtools/quilt/quilt/run-ptest new file mode 100755 index 000000000..4b808aee4 --- /dev/null +++ b/poky/meta/recipes-devtools/quilt/quilt/run-ptest @@ -0,0 +1,8 @@ +#!/bin/sh + +THIS_SH=/bin/sh +ln -sf /bin/ed /usr/bin/ed +/usr/sbin/adduser --disabled-password quilttest +su -c "${THIS_SH} ./test.sh" quilttest +/usr/sbin/deluser quilttest +rm -f /usr/bin/ed diff --git a/poky/meta/recipes-devtools/quilt/quilt/test.sh b/poky/meta/recipes-devtools/quilt/quilt/test.sh new file mode 100755 index 000000000..6563e4a2f --- /dev/null +++ b/poky/meta/recipes-devtools/quilt/quilt/test.sh @@ -0,0 +1 @@ +for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? -eq 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done diff --git a/poky/meta/recipes-devtools/quilt/quilt_0.65.bb b/poky/meta/recipes-devtools/quilt/quilt_0.65.bb new file mode 100644 index 000000000..5bf818d0b --- /dev/null +++ b/poky/meta/recipes-devtools/quilt/quilt_0.65.bb @@ -0,0 +1,8 @@ +require quilt.inc +inherit gettext + +SRC_URI += "file://gnu_patch_test_fix_target.patch" + +EXTRA_AUTORECONF += "--exclude=aclocal" + +RDEPENDS_${PN} += "patch diffstat bzip2 util-linux" |