[OE-core] [PATCH 1/2] Images: handle rowstride != width*bytes_per_pixel
From 0793aa7daf4b594fae1b412ab16a7d42d8c8560b Mon Sep 17 00:00:00 2001 From: Olaf Mandel o.man...@menlosystems.com Date: Tue, 7 Oct 2014 15:12:08 +0200 Subject: [PATCH 1/2] Images: handle rowstride != width*bytes_per_pixel Up till now, image data with a rowstride larger than the value expected from width and bytes_per_pixel caused a trapezoid distortion of the displayed image. Signed-off-by: Olaf Mandel o.man...@menlosystems.com --- ChangeLog|7 +++ psplash-fb.c | 13 +++-- psplash-fb.h |1 + psplash.c|2 ++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8cf2156..f4fd0ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-10-07 Olaf Mandel o.man...@menlosystems.com + + * psplash-fb.c: + * psplash-fb.h: + * psplash.c: + Images: handle rowstride != width*bytes_per_pixel + 2009-05-28 Richard Purdie rpur...@linux.intel.com * psplash-fb.c: diff --git a/psplash-fb.c b/psplash-fb.c index 71740cd..bd9cd9d 100644 --- a/psplash-fb.c +++ b/psplash-fb.c @@ -370,13 +370,14 @@ psplash_fb_draw_image (PSplashFB*fb, int img_width, int img_height, int img_bytes_per_pixel, + int img_rowstride, uint8 *rle_data) { uint8 *p = rle_data; int dx = 0, dy = 0, total_len; unsigned int len; - total_len = img_width * img_height * img_bytes_per_pixel; + total_len = img_rowstride * img_height; /* FIXME: Optimise, check for over runs ... */ while ((p - rle_data) total_len) @@ -391,11 +392,11 @@ psplash_fb_draw_image (PSplashFB*fb, do { - if (img_bytes_per_pixel 4 || *(p+3)) + if ((img_bytes_per_pixel 4 || *(p+3)) dx img_width) psplash_fb_plot_pixel (fb, x+dx, y+dy, *(p), *(p+1), *(p+2)); - if (++dx = img_width) { dx=0; dy++; } + if (++dx * img_bytes_per_pixel = img_rowstride) { dx=0; dy++; } } - while (--len (p - rle_data) total_len); + while (--len); p += img_bytes_per_pixel; } @@ -405,9 +406,9 @@ psplash_fb_draw_image (PSplashFB*fb, do { - if (img_bytes_per_pixel 4 || *(p+3)) + if ((img_bytes_per_pixel 4 || *(p+3)) dx img_width) psplash_fb_plot_pixel (fb, x+dx, y+dy, *(p), *(p+1), *(p+2)); - if (++dx = img_width) { dx=0; dy++; } + if (++dx * img_bytes_per_pixel = img_rowstride) { dx=0; dy++; } p += img_bytes_per_pixel; } while (--len (p - rle_data) total_len); diff --git a/psplash-fb.h b/psplash-fb.h index ef5b39e..42592ed 100644 --- a/psplash-fb.h +++ b/psplash-fb.h @@ -82,6 +82,7 @@ psplash_fb_draw_image (PSplashFB*fb, int img_width, int img_height, int img_bytes_pre_pixel, + int img_rowstride, uint8 *rle_data); void diff --git a/psplash.c b/psplash.c index 09cf0d0..543f67e 100644 --- a/psplash.c +++ b/psplash.c @@ -274,6 +274,7 @@ main (int argc, char** argv) POKY_IMG_WIDTH, POKY_IMG_HEIGHT, POKY_IMG_BYTES_PER_PIXEL, +POKY_IMG_ROWSTRIDE, POKY_IMG_RLE_PIXEL_DATA); /* Draw progress bar border */ @@ -283,6 +284,7 @@ main (int argc, char** argv) BAR_IMG_WIDTH, BAR_IMG_HEIGHT, BAR_IMG_BYTES_PER_PIXEL, +BAR_IMG_ROWSTRIDE, BAR_IMG_RLE_PIXEL_DATA); psplash_draw_progress (fb, 0); -- 1.7.10.4 signature.asc Description: OpenPGP digital signature -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/2] Images: handle rowstride != width*bytes_per_pixel
Am 07.10.2014 18:43, schrieb Olaf Mandel: Up till now, image data with a rowstride larger than the value expected from width and bytes_per_pixel caused a trapezoid distortion of the displayed image. Signed-off-by: Olaf Mandel o.man...@menlosystems.com -Snipp- Hi, my apologies: I should have said that this patch and the next are against the psplash repository: http://git.yoctoproject.org/cgit/cgit.cgi/psplash This is why I CCed the pslash maintainer. Best regards, Olaf Mandel signature.asc Description: OpenPGP digital signature -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM
Several recipes reference the LICENSE file in their LIC_FILES_CHKSUM variable as ${COREBASE}/LICENSE. This forces distribution providers to keep this file verbatim or to overload the affected recipes. The section "Moving to the Yocto Project 1.6 Release" in the Yocto manual suggests removing the LICENSE file where possible. Remove LICENSE in cases where COPYING.MIT is also given and replace LICENSE with COPYING.MIT if the former was the only entry. All modified recipes specify LICENSE = "MIT" and none of the in-tree files specify a different license either. As the packages do not change (the license files are not contained in them), do not increase PR. --- meta-skeleton/recipes-skeleton/useradd/useradd-example.bb | 3 +-- meta/recipes-bsp/formfactor/formfactor_0.0.bb | 3 +-- meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb| 3 +-- meta/recipes-core/systemd/systemd-compat-units.bb | 2 +- meta/recipes-core/systemd/systemd-systemctl-native.bb | 2 +- meta/recipes-core/udev/udev-extraconf_1.1.bb | 3 +-- meta/recipes-devtools/devel-config/distcc-config.bb | 3 +-- meta/recipes-devtools/devel-config/nfs-export-root.bb | 3 +-- meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb | 3 +-- meta/recipes-graphics/wayland/weston-init.bb | 2 +- meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb| 3 +-- 11 files changed, 11 insertions(+), 19 deletions(-) diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb index d3c02d5..20a101a 100644 --- a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb +++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb @@ -3,8 +3,7 @@ DESCRIPTION = "This recipe serves as an example for using features from useradd. SECTION = "examples" PR = "r1" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = "file://file1 \ file://file2 \ diff --git a/meta/recipes-bsp/formfactor/formfactor_0.0.bb b/meta/recipes-bsp/formfactor/formfactor_0.0.bb index 5c30bd5..53cf1cf 100644 --- a/meta/recipes-bsp/formfactor/formfactor_0.0.bb +++ b/meta/recipes-bsp/formfactor/formfactor_0.0.bb @@ -1,8 +1,7 @@ SUMMARY = "Device formfactor information" SECTION = "base" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PR = "r45" SRC_URI = "file://config file://machconfig" diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb index 51a76b4..b5f6895 100644 --- a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb +++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb @@ -4,8 +4,7 @@ DEPENDS = "ppp" RDEPENDS_${PN} = "ppp" PR = "r8" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = "file://host-peer \ file://ppp-dialin" diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb index 421fc06..aa20014 100644 --- a/meta/recipes-core/systemd/systemd-compat-units.bb +++ b/meta/recipes-core/systemd/systemd-compat-units.bb @@ -1,7 +1,7 @@ SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PR = "r29" diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb index fbdc9c0..fadc843 100644 --- a/meta/recipes-core/systemd/systemd-systemctl-native.bb +++ b/meta/recipes-core/systemd/systemd-systemctl-native.bb @@ -1,7 +1,7 @@ SUMMARY = "Wrapper for enabling systemd services" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PR = "r6" diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb index ecd4a8a..ae12550 100644 --- a/meta/recipes-core/udev/udev-extraconf_1.1.bb +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -1,8 +1,7 @@ SUMMARY
[OE-core] [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM
I ran into QA issues when inadvertently replacing OEs LICENSE with Yoctos LICENSE file. Why should recipes depend on the license for the complete collection of layers? At least for "normal" recipes that generate target device packages, this makes no sense to me. I patched out the global LICENSE file from all those recipes that are short enough and where I feel reasonably confident of not having actually changed the claimed license terms in any way. There are additional recipes that reference the global LICENSE file, but where I am not sure if a less blanket license declaration is appropriate or not. Especially for meta-toolchain and build-appliance-image, the global LICENSE is probably correct. Any comments? If there are really recipes where the global LICENSE file is appropriate, how to allow people running their own combo-layer to quickly replace the file? Maybe add a variable CORELICENSE_MD5 that gets used by all such recipes? -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM
Hello, Am 20.10.2016 um 12:44 schrieb Peter Kjellerstedt: >> -Original Message- -Snipp- >> Subject: [OE-core] [PATCH 1/1] Remove $COREBASE/LICENSE from -Snipp- > > Even after this is applied, there are still nine recipes in OE-Core > that reference ${COREBASE}/LICENSE. There is also an example in > dev-manual-common-tasks.xml with a reference to ${COREBASE}/LICENSE. > AFAICT, they all look just like the ones that this patch removes. > Any reason they were not fixed as well? > "Why not patch the nine remaining recipes": see my cover letter "[OE-core][PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM": >>> I patched out the global LICENSE file from all those recipes that >>> are short enough and where I feel reasonably confident of not >>> having actually changed the claimed license terms in any way. >>> >>> There are additional recipes that reference the global LICENSE >>> file, but where I am not sure if a less blanket license declaration >>> is appropriate or not. Especially for meta-toolchain and >>> build-appliance-image, the global LICENSE is probably correct. >>> Any comments? So please comment away :-) > There are also 17 recipes in OpenEmbedded with a reference to > ${COREBASE}/LICENSE. They too need to be fixed. > Same as for dev-manual-common-tasks.xml: I was not a aware of those and not all belong on the openembedded-core list. And for the example: it should only be patched once this patch for formfactor_0.0.bb is accepted. -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] combo-layer: handle ambiguous git arguments
If a branch/src-repository has the same name as a file/directory, git since 1.4.0(?) gives an error like the one below: ambiguous argument 'bitbake': both revision and filename Use '--' to separate paths from revisions, like this: 'git [...] -- [...]' Add two dashes to make the intent clear. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- scripts/combo-layer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/combo-layer b/scripts/combo-layer index 4a210fb..089b65f 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -426,7 +426,7 @@ file_exclude = %s''' % (name, file_filter or '', repo.get('file_exclude', merge.append(name) # Root all commits which have no parent in the common # ancestor in the new repository. -for start in runcmd('git log --pretty=format:%%H --max-parents=0 %s' % name).split('\n'): +for start in runcmd('git log --pretty=format:%%H --max-parents=0 %s --' % name).split('\n'): runcmd('git replace --graft %s %s' % (start, startrev)) try: runcmd(merge) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] combo-layer: fix crashes on wrong tempfile usage
When calling tempfile.NamedTemporaryFile().write(str()), at least on Python 3.4.2 this fails with this error: TypeError: 'str' does not support the buffer interface Change the file-mode for all such files from binary to text mode. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- scripts/combo-layer | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/combo-layer b/scripts/combo-layer index b90bfc8..4a210fb 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -329,7 +329,7 @@ def action_init(conf, args): # one. The commit should be in both repos with # the same tree, but better check here. tree = runcmd('git show -s --pretty=format:%%T %s' % rev).strip() -with tempfile.NamedTemporaryFile() as editor: +with tempfile.NamedTemporaryFile(mode='wt') as editor: editor.write('''cat >$1 <http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] texi2html: Allow compiling out-of-source
Compiling texi2html 5.0 out-of-source with USE_NLS set to no failed because it tried to copy from srcdir without using that variable. Fix this issue and add a reference to the upstream commit. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- .../files/0001-Allow-compiling-out-of-source.patch | 39 ++ meta/recipes-extended/texi2html/texi2html_5.0.bb | 1 + 2 files changed, 40 insertions(+) create mode 100644 meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch diff --git a/meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch b/meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch new file mode 100644 index 000..0cf025f --- /dev/null +++ b/meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch @@ -0,0 +1,39 @@ +From: Olaf Mandel <o.man...@menlosystems.com> +Date: Fri, 21 Oct 2016 13:04:44 + +Subject: [PATCH] Allow compiling out-of-source + +Upstream-Status: Backport of [svn://svn.sv.gnu.org/texinfo/trunk r3602] +--- + Makefile.am | 2 +- + Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 3447463..c9b5b5c 100644 +--- a/Makefile.am b/Makefile.am +@@ -208,7 +208,7 @@ i18n/en.thl i18n/: $(po_document_dir)/po_document/$(PACKAGE)_document.pot + done; \ + msgexec -i $< "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" en > i18n/en.thl; \ + else \ +-cp -p i18n_ref/*.thl i18n; \ ++cp -p "$(srcdir)/i18n_ref/"*.thl i18n; \ + fi + + i18n_ref: +diff --git a/Makefile.in b/Makefile.in +index 4264b37..a13f84d 100644 +--- a/Makefile.in b/Makefile.in +@@ -1126,7 +1126,7 @@ i18n/en.thl i18n/: $(po_document_dir)/po_document/$(PACKAGE)_document.pot + done; \ + msgexec -i $< "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" en > i18n/en.thl; \ + else \ +-cp -p i18n_ref/*.thl i18n; \ ++cp -p "$(srcdir)/i18n_ref/"*.thl i18n; \ + fi + + i18n_ref: +-- +2.1.4 + diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb index eac289e..ae64816 100644 --- a/meta/recipes-extended/texi2html/texi2html_5.0.bb +++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb @@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" PR = "r2" SRC_URI = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \ + file://0001-Allow-compiling-out-of-source.patch \ " SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54" -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] Forgot Signed-off-by lines
I forgot to signoff two of my last patches, so here is a v2 of both of them. Olaf Mandel (2): combo-layer: handle file_exclude matching dirs Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] combo-layer: handle file_exclude matching dirs
If file_exclude matches a directory, os.unlink() got called with this directory as an argument. Filter out paths that end in a directory separator. This still leaves the (then empty) directories, but this does not affect the git commit. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- scripts/combo-layer | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/combo-layer b/scripts/combo-layer index 089b65f..d04d88b 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -294,6 +294,8 @@ def action_init(conf, args): # again. Uses the list of files created by tar (easier # than walking the tree). for file in files.split('\n'): +if file.endswith(os.path.sep): +continue for pattern in exclude_patterns: if fnmatch.fnmatch(file, pattern): os.unlink(os.path.join(*([extract_dir] + ['..'] * subdir_components + [file]))) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM
Several recipes reference the LICENSE file in their LIC_FILES_CHKSUM variable as ${COREBASE}/LICENSE. This forces distribution providers to keep this file verbatim or to overload the affected recipes. The section "Moving to the Yocto Project 1.6 Release" in the Yocto manual suggests removing the LICENSE file where possible. Remove LICENSE in cases where COPYING.MIT is also given and replace LICENSE with COPYING.MIT if the former was the only entry. All modified recipes specify LICENSE = "MIT" and none of the in-tree files specify a different license either. As the packages do not change (the license files are not contained in them), do not increase PR. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- meta-skeleton/recipes-skeleton/useradd/useradd-example.bb | 3 +-- meta/recipes-bsp/formfactor/formfactor_0.0.bb | 3 +-- meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb| 3 +-- meta/recipes-core/systemd/systemd-compat-units.bb | 2 +- meta/recipes-core/systemd/systemd-systemctl-native.bb | 2 +- meta/recipes-core/udev/udev-extraconf_1.1.bb | 3 +-- meta/recipes-devtools/devel-config/distcc-config.bb | 3 +-- meta/recipes-devtools/devel-config/nfs-export-root.bb | 3 +-- meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb | 3 +-- meta/recipes-graphics/wayland/weston-init.bb | 2 +- meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb| 3 +-- 11 files changed, 11 insertions(+), 19 deletions(-) diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb index d3c02d5..20a101a 100644 --- a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb +++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb @@ -3,8 +3,7 @@ DESCRIPTION = "This recipe serves as an example for using features from useradd. SECTION = "examples" PR = "r1" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = "file://file1 \ file://file2 \ diff --git a/meta/recipes-bsp/formfactor/formfactor_0.0.bb b/meta/recipes-bsp/formfactor/formfactor_0.0.bb index 5c30bd5..53cf1cf 100644 --- a/meta/recipes-bsp/formfactor/formfactor_0.0.bb +++ b/meta/recipes-bsp/formfactor/formfactor_0.0.bb @@ -1,8 +1,7 @@ SUMMARY = "Device formfactor information" SECTION = "base" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PR = "r45" SRC_URI = "file://config file://machconfig" diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb index 51a76b4..b5f6895 100644 --- a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb +++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb @@ -4,8 +4,7 @@ DEPENDS = "ppp" RDEPENDS_${PN} = "ppp" PR = "r8" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" SRC_URI = "file://host-peer \ file://ppp-dialin" diff --git a/meta/recipes-core/systemd/systemd-compat-units.bb b/meta/recipes-core/systemd/systemd-compat-units.bb index 421fc06..aa20014 100644 --- a/meta/recipes-core/systemd/systemd-compat-units.bb +++ b/meta/recipes-core/systemd/systemd-compat-units.bb @@ -1,7 +1,7 @@ SUMMARY = "Enhances systemd compatilibity with existing SysVinit scripts" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PR = "r29" diff --git a/meta/recipes-core/systemd/systemd-systemctl-native.bb b/meta/recipes-core/systemd/systemd-systemctl-native.bb index fbdc9c0..fadc843 100644 --- a/meta/recipes-core/systemd/systemd-systemctl-native.bb +++ b/meta/recipes-core/systemd/systemd-systemctl-native.bb @@ -1,7 +1,7 @@ SUMMARY = "Wrapper for enabling systemd services" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690" +LIC_FILES
[OE-core] [PATCH] texi2html: Allow compiling out-of-source
Compiling texi2html 5.0 out-of-source with USE_NLS set to no failed because it trieed to copy from srcdir without using that variable. Fix this issue. No need to send upstream: current trunk already contains this. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- .../files/0001-Allow-compiling-out-of-source.patch | 38 ++ meta/recipes-extended/texi2html/texi2html_5.0.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch diff --git a/meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch b/meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch new file mode 100644 index 000..754f0a2 --- /dev/null +++ b/meta/recipes-extended/texi2html/files/0001-Allow-compiling-out-of-source.patch @@ -0,0 +1,38 @@ +From: Olaf Mandel <o.man...@menlosystems.com> +Date: Fri, 21 Oct 2016 13:04:44 + +Subject: [PATCH] Allow compiling out-of-source + +--- + Makefile.am | 2 +- + Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 3447463..c9b5b5c 100644 +--- a/Makefile.am b/Makefile.am +@@ -208,7 +208,7 @@ i18n/en.thl i18n/: $(po_document_dir)/po_document/$(PACKAGE)_document.pot + done; \ + msgexec -i $< "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" en > i18n/en.thl; \ + else \ +-cp -p i18n_ref/*.thl i18n; \ ++cp -p "$(srcdir)/i18n_ref/"*.thl i18n; \ + fi + + i18n_ref: +diff --git a/Makefile.in b/Makefile.in +index 4264b37..a13f84d 100644 +--- a/Makefile.in b/Makefile.in +@@ -1126,7 +1126,7 @@ i18n/en.thl i18n/: $(po_document_dir)/po_document/$(PACKAGE)_document.pot + done; \ + msgexec -i $< "$(srcdir)/gettext_to_separated.pl" | "$(srcdir)/separated_to_hash.pl" en > i18n/en.thl; \ + else \ +-cp -p i18n_ref/*.thl i18n; \ ++cp -p "$(srcdir)/i18n_ref/"*.thl i18n; \ + fi + + i18n_ref: +-- +2.1.4 + diff --git a/meta/recipes-extended/texi2html/texi2html_5.0.bb b/meta/recipes-extended/texi2html/texi2html_5.0.bb index eac289e..ae64816 100644 --- a/meta/recipes-extended/texi2html/texi2html_5.0.bb +++ b/meta/recipes-extended/texi2html/texi2html_5.0.bb @@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" PR = "r2" SRC_URI = "${SAVANNAH_GNU_MIRROR}/texi2html/${BPN}-${PV}.tar.bz2 \ + file://0001-Allow-compiling-out-of-source.patch \ " SRC_URI[md5sum] = "f15ac876fcdc8be865b16535f480aa54" -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] Remove LIC_FILES_CHKSUM from recipes without SRC_URI
LICENSE and LIC_FILES_CHKSUM apply to the sources specified by SRC_URI, not to the recipe itself. As such a license declaration for a source-less recipe makes little sense. The LICENSE declaration is mandatory, but LIC_FILES_CHKSUM can be removed in such cases. Remove the LIC_FILES_CHKSUM declarations from all recipes that do not need it. CC: Paul Eggleton <paul.eggle...@linux.intel.com> Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- meta-selftest/recipes-test/error/error.bb | 1 - meta/recipes-core/meta/buildtools-tarball.bb | 2 -- meta/recipes-core/meta/meta-environment.bb | 2 -- meta/recipes-core/meta/meta-extsdk-toolchain.bb| 2 -- meta/recipes-core/meta/meta-ide-support.bb | 2 -- meta/recipes-core/meta/meta-toolchain.bb | 3 --- meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb | 1 - meta/recipes-core/meta/signing-keys.bb | 2 -- meta/recipes-core/meta/testexport-tarball.bb | 2 -- meta/recipes-core/meta/uninative-tarball.bb| 2 -- meta/recipes-core/os-release/os-release.bb | 1 - meta/recipes-core/systemd/systemd-compat-units.bb | 1 - meta/recipes-devtools/opkg/opkg-arch-config_1.0.bb | 1 - .../postinst-intercept/nativesdk-postinst-intercept_1.0.bb | 1 - meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb| 1 - meta/recipes-devtools/sgml-common/sgml-common-native_0.6.3.bb | 1 - meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb| 1 - meta/recipes-kernel/linux/kernel-devsrc.bb | 1 - meta/recipes-kernel/perf/perf.bb | 1 - 19 files changed, 28 deletions(-) diff --git a/meta-selftest/recipes-test/error/error.bb b/meta-selftest/recipes-test/error/error.bb index a7bdecf..3c22e7c 100644 --- a/meta-selftest/recipes-test/error/error.bb +++ b/meta-selftest/recipes-test/error/error.bb @@ -1,7 +1,6 @@ SUMMARY = "Error Test case that fails on do_compile" DESCRIPTION = "This generates a compile time error to be used to for testing." LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" INHIBIT_DEFAULT_DEPS = "1" EXCLUDE_FROM_WORLD = "1" diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb index 5808c95..abdc7fe 100644 --- a/meta/recipes-core/meta/buildtools-tarball.bb +++ b/meta/recipes-core/meta/buildtools-tarball.bb @@ -2,8 +2,6 @@ DESCRIPTION = "SDK type target for building a standalone tarball containing pyth tarball can be used to run bitbake builds on systems which don't meet the usual version requirements." SUMMARY = "Standalone tarball for running builds on systems with inadequate software" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" TOOLCHAIN_TARGET_TASK ?= "" diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb index d9e045f..71e0c23 100644 --- a/meta/recipes-core/meta/meta-environment.bb +++ b/meta/recipes-core/meta/meta-environment.bb @@ -1,6 +1,4 @@ SUMMARY = "Package of environment files for SDK" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" LICENSE = "MIT" PR = "r8" diff --git a/meta/recipes-core/meta/meta-extsdk-toolchain.bb b/meta/recipes-core/meta/meta-extsdk-toolchain.bb index 2bd9a5b..22de0f3 100644 --- a/meta/recipes-core/meta/meta-extsdk-toolchain.bb +++ b/meta/recipes-core/meta/meta-extsdk-toolchain.bb @@ -1,8 +1,6 @@ SUMMARY = "Extensible SDK toolchain meta-recipe" DESCRIPTION = "Meta-recipe for ensuring the build directory contains all appropriate toolchain packages for using an IDE" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" DEPENDS = "virtual/libc gdb-cross-${TARGET_ARCH} qemu-native qemu-helper-native unfs3-native" diff --git a/meta/recipes-core/meta/meta-ide-support.bb b/meta/reci
Re: [OE-core] [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM
Hi Paul, Am 21.10.2016 um 01:29 schrieb Paul Eggleton: > On Wed, 19 Oct 2016 10:05:12 Olaf Mandel wrote: -Snipp- >> There are additional recipes that reference the global LICENSE >> file, but where I am not sure if a less blanket license declaration >> is appropriate or not. Especially for meta-toolchain and >> build-appliance-image, the global LICENSE is probably correct. >> Any comments? > > For images and other recipes that don't pull in anything by themselves, there > shouldn't be a need for LIC_FILES_CHKSUM (or indeed LICENSE) to be set at all > - in order to understand the license for the result the appropriate place to > look is the license manifest that represents everything that goes into the > image. In fact, in master / morty, if SRC_URI is empty then LIC_FILES_CHKSUM > is no longer verified [1]. Thus, for such recipes we can remove the setting of > LIC_FILES_CHKSUM (and LICENSE, if possible) altogether. > That seems to apply to eight of the nine remaining recipes still containing the ${COREBASE}/LICENSE: meta/recipes-core/meta/buildtools-tarball.bb meta/recipes-core/meta/meta-environment.bb meta/recipes-core/meta/meta-extsdk-toolchain.bb meta/recipes-core/meta/meta-ide-support.bb meta/recipes-core/meta/meta-toolchain.bb meta/recipes-core/meta/signing-keys.bb meta/recipes-core/meta/testexport-tarball.bb meta/recipes-core/meta/uninative-tarball.bb Of the already modified recipes, this applies to: meta/recipes-core/systemd/systemd-compat-units.bb Also, it is not currently possible to remove LICENSE: still causes build-errors. I will send a patch that removes LIC_FILES_CHKSUM from a total of 19 files, but please someone review it: it also removes the CHKSUM from e.g. kernel-devsrc and perf. This leaves only one instance of ${COREBASE}/LICENSE: build-appliance-image. Someone please say if the blanket license text from "LICENSE" applies or if the narrower license terms from "COPYING.MIT" suffice. Best regards, Olaf signature.asc Description: OpenPGP digital signature -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] toaster: fix if USER_CLASSES is missing buildstats
buildstats not being in USER_CLASSES is no reason to fail every single task in toaster_collect_task_stats: using a non-existing variable results in a None argument to os.path.join(). Check the variable availability before trying to use it. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- meta/classes/toaster.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass index 4bddf34..638bb39 100644 --- a/meta/classes/toaster.bbclass +++ b/meta/classes/toaster.bbclass @@ -157,11 +157,11 @@ python toaster_collect_task_stats() { import bb.utils import os -toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist") - if not e.data.getVar('BUILDSTATS_BASE', True): return # if we don't have buildstats, we cannot collect stats +toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist") + def stat_to_float(value): return float(value.strip('% \n\r')) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] combo-layer: handle file_exclude matching dirs
If file_exclude matches a directory, os.unlink() got called with this directory as an argument. Filter out paths that end in a directory separator. This still leaves the (then empty) directories, but this does not affect the git commit. --- scripts/combo-layer | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/combo-layer b/scripts/combo-layer index 089b65f..d04d88b 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -294,6 +294,8 @@ def action_init(conf, args): # again. Uses the list of files created by tar (easier # than walking the tree). for file in files.split('\n'): +if file.endswith(os.path.sep): +continue for pattern in exclude_patterns: if fnmatch.fnmatch(file, pattern): os.unlink(os.path.join(*([extract_dir] + ['..'] * subdir_components + [file]))) -- 2.1.4 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] (PRE)MIRRORS: add pattern for npm:// without slash
For URLs with the npm:// transport but with no other slash in it, the common MIRRORS and PREMIRRORS pattern of npm://.*/.* fails to match. Add a new pattern in the mirros.bbclass and own-mirrors.bbclass classes for these URLs. Many URLs with the npm:// transport have no slash after the host part: npm://registry.npmjs.org;name=foo;version=0.1.2 This means that MIRRORS and PREMIRRORS containing entries like the first one will not match these URLs: npm://.*/.* # fails to match npm://.* # matches, but not those URLs with a slash Because the npm:// URLs without a slash seem to be more ubiquitous (they are generated by recipetool), place the new pattern first. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- meta/classes/mirrors.bbclass | 2 ++ meta/classes/own-mirrors.bbclass | 1 + 2 files changed, 3 insertions(+) diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass index b98684f5c6..710df3c7bf 100644 --- a/meta/classes/mirrors.bbclass +++ b/meta/classes/mirrors.bbclass @@ -48,6 +48,7 @@ p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +npm://.*http://downloads.yoctoproject.org/mirror/sources/ \n \ npm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ cvs://.*/.* http://sources.openembedded.org/ \n \ svn://.*/.* http://sources.openembedded.org/ \n \ @@ -58,6 +59,7 @@ p4://.*/.* http://sources.openembedded.org/ \n \ osc://.*/.* http://sources.openembedded.org/ \n \ https?$://.*/.* http://sources.openembedded.org/ \n \ ftp://.*/.* http://sources.openembedded.org/ \n \ +npm://.*http://sources.openembedded.org/ \n \ npm://.*/.* http://sources.openembedded.org/ \n \ ${CPAN_MIRROR} http://cpan.metacpan.org/ \n \ ${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \ diff --git a/meta/classes/own-mirrors.bbclass b/meta/classes/own-mirrors.bbclass index 12b42675bc..253ed9cb7e 100644 --- a/meta/classes/own-mirrors.bbclass +++ b/meta/classes/own-mirrors.bbclass @@ -9,5 +9,6 @@ p4://.*/.* ${SOURCE_MIRROR_URL} osc://.*/.* ${SOURCE_MIRROR_URL} https?$://.*/.* ${SOURCE_MIRROR_URL} ftp://.*/.* ${SOURCE_MIRROR_URL} +npm://.*${SOURCE_MIRROR_URL} npm://.*/.* ${SOURCE_MIRROR_URL} } -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] (PRE)MIRRORS: add pattern for npm:// without slash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello Paul, Am 24.08.2017 um 22:53 schrieb Paul Eggleton: > On Friday, 25 August 2017 6:19:46 AM NZST Olaf Mandel wrote: >> For URLs with the npm:// transport but with no other slash in it, >> the common MIRRORS and PREMIRRORS pattern of npm://.*/.* fails to >> match. Add a new pattern in the mirros.bbclass and >> own-mirrors.bbclass classes for these URLs. - -Snipp- > > Couldn't we just do away with npm://.*/.* ? > While that would fix my specific problem, it would introduce a backwards-breaking change: if someone _did_ have a SRC_URI with a slash in it, this would change where on the mirror the package is searched for: SRC_URI = npm://foo.tld/bar;name=baz;version=0.1.2 npm://.*/.* => baz-0.1.2.tar.xz npm://.*=> bar/baz-0.1.2.tar.xz So keeping both lines is the better solution. But while testing this I found that the order I chose (first npm://.*, then npm://.*/.*) is wrong: this first tries the changed (wrong) location on the mirror and only then the original (correct) one. It is much more efficient to sort the lines the other way around: this prevents extra network traffic, if the mirror is not local. I will send an updated batch soon. Best regards, Olaf - -- Olaf Mandel -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBCAAGBQJZn+/7AAoJEFS9nbRiUh3/0EMIAJTUoXVsvSLWDUm8phbAEoXb jQZW7hfP+CHzn1V7X6kTu4CZlQWhxOzYbv07sd2cz/4+Hr2U/7JJCul2QTQGizc/ NxVKaixR8V0tM0irn8NeAHexLXLj+dKdmbvaG/H/BeHhFZc4eQOt6gmbGZ1F7V2g njcP7nui13HbYpHViGFKMT5hnU9B2gKWQ0FAtY6kGZFS1UDvyGFXyHXn1kU0hzjl 6nRuG0q18uueUEEFxqjo4Cb5BTNEjC/QIGIKbSTsqBIU1r3t7uaPSHIYihnRGZ9M bCpoFKB2PFgi8qFl+cUaFBmtGMeh+loEIDIi1eZ1HmRO7ST0glDmxB0SKM1N06I= =QS0a -END PGP SIGNATURE- -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] (PRE)MIRRORS: add pattern for npm:// without slash
For URIs with the npm:// transport but with no other slash in it, the common MIRRORS and PREMIRRORS pattern of npm://.*/.* fails to match. Add a new pattern in the mirros.bbclass and own-mirrors.bbclass classes for these URIs. Many URIs with the npm:// transport have no slash after the host part: npm://registry.npmjs.org;name=foo;version=0.1.2 This means that MIRRORS and PREMIRRORS containing entries like the first one will not match these URIs: npm://.*/.* # fails to match npm://.* # matches The npm:// URIs without a slash also matches URIs with a slash, but then the file is searched for on the mirror with the same path that was in the URI. Because of that, the pattern with the slash should be first in the list, to prevent extra requests to the mirrors containing the wrong path. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- meta/classes/mirrors.bbclass | 2 ++ meta/classes/own-mirrors.bbclass | 1 + 2 files changed, 3 insertions(+) diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass index b98684f5c6..7ac654494b 100644 --- a/meta/classes/mirrors.bbclass +++ b/meta/classes/mirrors.bbclass @@ -49,6 +49,7 @@ osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ npm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +npm://.*http://downloads.yoctoproject.org/mirror/sources/ \n \ cvs://.*/.* http://sources.openembedded.org/ \n \ svn://.*/.* http://sources.openembedded.org/ \n \ git://.*/.* http://sources.openembedded.org/ \n \ @@ -59,6 +60,7 @@ osc://.*/.* http://sources.openembedded.org/ \n \ https?$://.*/.* http://sources.openembedded.org/ \n \ ftp://.*/.* http://sources.openembedded.org/ \n \ npm://.*/.* http://sources.openembedded.org/ \n \ +npm://.*http://sources.openembedded.org/ \n \ ${CPAN_MIRROR} http://cpan.metacpan.org/ \n \ ${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \ " diff --git a/meta/classes/own-mirrors.bbclass b/meta/classes/own-mirrors.bbclass index 12b42675bc..c70b94e7dc 100644 --- a/meta/classes/own-mirrors.bbclass +++ b/meta/classes/own-mirrors.bbclass @@ -10,4 +10,5 @@ osc://.*/.* ${SOURCE_MIRROR_URL} https?$://.*/.* ${SOURCE_MIRROR_URL} ftp://.*/.* ${SOURCE_MIRROR_URL} npm://.*/.* ${SOURCE_MIRROR_URL} +npm://.*${SOURCE_MIRROR_URL} } -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v2] (PRE)MIRRORS: add pattern for npm:// without slash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello Leonardo, Am 25.08.2017 um 16:32 schrieb Leonardo Sandoval: > instead of adding a new npm regex, not sure if below one would the > same job > > npm://.*(/.*)? > No: the string is split into different parts before the RE is considered. So the fetch step fails with this error: Exception: sre_constants.error: missing ), unterminated subpattern at position 2 Probably because the pattern was split to: ['npm', '.*(', '/.*)?', '', '', OrderedDict()] Best regards, Olaf - -- Olaf Mandel -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBCAAGBQJZoEzpAAoJEFS9nbRiUh3/KgEIAKjWmkwrlR3CXNk1zYgS9XKb FQsE47IYogdtLMSgjgbjo+tUVj34a4NpPY4kNXdwadXNSOQZJPDcu2hzkvxAyAVd 9pX0YtxASx4A25/kgBKiTzOL62gGf3vYAnCg3hCC4nPnZE5d49Xg/oNvhQ2E34xv vZMaohiPwK5B2QJpPDYtVXEC72ExoMzeoEy1x46hIplQQTh3CE481TKHbFj1he/a UVwRalNhePQbpScDu49oYdrg8bIl+GfmuDwFE5zLAWBdkkgFaDlLdbwUoz+om3xa GUHA9eL0lu8CWmrZe1Y4RZuGgj42yJd1CDd7NA3SkeHcB6gsAPzwyn6/UF2rivo= =mQeF -END PGP SIGNATURE- -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v3] (PRE)MIRRORS: fix pattern for npm:// without slash
For URIs with the npm:// transport but with no other slash in it, the common MIRRORS and PREMIRRORS pattern of npm://.*/.* fails to match. Make the last slash in the pattern optional in the mirros.bbclass and own-mirrors.bbclass classes. Many URIs with the npm:// transport have no slash after the host part: npm://registry.npmjs.org;name=foo;version=0.1.2 This means that MIRRORS and PREMIRRORS containing entries like the first one will not match these URIs: npm://.*/.* # fails to match npm://.*/?.* # matches this and URIs with path components For normal regular expressions, a pattern like 'npm://.*(/.*)?' would probably be preferred, but that won't work here: the pattern gets split into the substrings 'npm', '.*(' and '/.*)?', which are not valid regular expressions individually. Signed-off-by: Olaf Mandel <o.man...@menlosystems.com> --- meta/classes/mirrors.bbclass | 4 ++-- meta/classes/own-mirrors.bbclass | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/classes/mirrors.bbclass b/meta/classes/mirrors.bbclass index b98684f5c6..766f1cb6fa 100644 --- a/meta/classes/mirrors.bbclass +++ b/meta/classes/mirrors.bbclass @@ -48,7 +48,7 @@ p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ -npm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \ +npm://.*/?.*http://downloads.yoctoproject.org/mirror/sources/ \n \ cvs://.*/.* http://sources.openembedded.org/ \n \ svn://.*/.* http://sources.openembedded.org/ \n \ git://.*/.* http://sources.openembedded.org/ \n \ @@ -58,7 +58,7 @@ p4://.*/.* http://sources.openembedded.org/ \n \ osc://.*/.* http://sources.openembedded.org/ \n \ https?$://.*/.* http://sources.openembedded.org/ \n \ ftp://.*/.* http://sources.openembedded.org/ \n \ -npm://.*/.* http://sources.openembedded.org/ \n \ +npm://.*/?.*http://sources.openembedded.org/ \n \ ${CPAN_MIRROR} http://cpan.metacpan.org/ \n \ ${CPAN_MIRROR} http://search.cpan.org/CPAN/ \n \ " diff --git a/meta/classes/own-mirrors.bbclass b/meta/classes/own-mirrors.bbclass index 12b42675bc..0296d545be 100644 --- a/meta/classes/own-mirrors.bbclass +++ b/meta/classes/own-mirrors.bbclass @@ -9,5 +9,5 @@ p4://.*/.* ${SOURCE_MIRROR_URL} osc://.*/.* ${SOURCE_MIRROR_URL} https?$://.*/.* ${SOURCE_MIRROR_URL} ftp://.*/.* ${SOURCE_MIRROR_URL} -npm://.*/.* ${SOURCE_MIRROR_URL} +npm://.*/?.*${SOURCE_MIRROR_URL} } -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH v2] (PRE)MIRRORS: add pattern for npm:// without slash
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello again, Am 25.08.2017 um 18:14 schrieb Olaf Mandel: > Am 25.08.2017 um 16:32 schrieb Leonardo Sandoval: >> instead of adding a new npm regex, not sure if below one would >> the same job > >> npm://.*(/.*)? > > No: the string is split into different parts before the RE is > considered. [...] > - -Snipp- > ['npm', '.*(', '/.*)?', '', '', OrderedDict()] > So npm://.*(/.*)? does not work. But npm://.*/?.* works and _is_ more elegant than the two pattern lines from my last patches. Thank you for the suggestion, I will send a new patch. Best regards, Olaf - -- Olaf Mandel -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBCAAGBQJZoFehAAoJEFS9nbRiUh3/FzsH/06OUDbQPrf3yrH5OBMJe+wF 5Ky8SUworYqA9uGmzR+3nGqmlxlLlhZFMCsM4+a00nr7kSNLu0KF+BISG9fJT5Up 6PJKDZZBChWYHqhkO8CgB3caiQiJKTlFtKmVznNBzJuIPf+ffTiUb0OX7RgFoHHP jSuEXqKxQTUJO1k1tGhD53F6+W0rzfk2NXqtI2xfURCwZFcTHvrIYHflwoGZzF3F gc5J37x5oFSxb3Lfy711ZWDTCOljFzoecdpKbhIj2qPr8sO5WVOTE07/FzW4Mb3P KUlOpbR3D5eSma8f+lacqNQVx0toWRo15yHOVWssLbcoV6V8rzUu6sF1T1Od7Tw= =RJXU -END PGP SIGNATURE- -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v2] npm: change install directory to upstream default
The node binary searches for packages in a number of locations, the last of which is $PREFIX/lib/node (here: /usr/lib/node) from the list of GLOBAL_FOLDERS [1]. So change the installation directory for all packages depending on npm.bbclass to that location. This removes the need to define the NODE_PATH variable to the non-standard /usr/lib/node_modules value. While the Tips for Package Managers [2] discusses installing packages to /usr/lib/node_modules//, this has several drawbacks: * it does not work for the REPL as mentioned in the documentation * it also does not work for any code _not_ installed as a global package under /usr/lib/node_modules (e.g. /usr/share/foo.js will not find any packages below /usr/lib) * using the non-default location and then having to set NODE_PATH barely saves any time: there are only two file-system lookups (to the legacy $HOME/.node_modules and $HOME/.node_libraries) directories before the library would be found And the suggestion was made in the context of deduping the node_modules tree by installing all packages in a flat hierarchy and using symlinks to the correct version of each dependency. This is not what OpenEmbedded does, so none of those benefits (deduping, cleaner packages) are being had by shifting the installation directory to /usr/lib/node_modules. The choice of a "proper" installation path is not helped by npm installing to /usr/lib/node_modules if asked to install globally. Still, using the location expected by nodejs (/usr/lib/node) seems the right choice. [1]: https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders [2]: https://nodejs.org/api/modules.html#modules_addenda_package_manager_tips Signed-off-by: Olaf Mandel --- meta/classes/npm.bbclass | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index c351ff0866..30febcffb2 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass @@ -10,7 +10,7 @@ def node_pkgname(d): NPMPN ?= "${@node_pkgname(d)}" -NPM_INSTALLDIR = "${D}${libdir}/node_modules/${NPMPN}" +NPM_INSTALLDIR = "${libdir}/node/${NPMPN}" # function maps arch names to npm arch names def npm_oe_arch_map(target_arch, d): @@ -52,9 +52,10 @@ npm_do_install() { # changing the home directory to the working directory, the .npmrc will # be created in this directory export HOME=${WORKDIR} - mkdir -p ${NPM_INSTALLDIR}/ + mkdir -p ${D}${libdir}/node_modules npm pack . npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPMPN}-${PV}.tgz + mv ${D}${libdir}/node_modules ${D}${libdir}/node if [ -d ${D}${prefix}/etc ] ; then # This will be empty rmdir ${D}${prefix}/etc @@ -62,13 +63,13 @@ npm_do_install() { } python populate_packages_prepend () { -instdir = d.expand('${D}${libdir}/node_modules/${NPMPN}') +instdir = d.expand('${D}${NPM_INSTALLDIR}') extrapackages = oe.package.npm_split_package_dirs(instdir) pkgnames = extrapackages.keys() d.prependVar('PACKAGES', '%s ' % ' '.join(pkgnames)) for pkgname in pkgnames: pkgrelpath, pdata = extrapackages[pkgname] -pkgpath = '${libdir}/node_modules/${NPMPN}/' + pkgrelpath +pkgpath = '${NPM_INSTALLDIR}/' + pkgrelpath # package names can't have underscores but npm packages sometimes use them oe_pkg_name = pkgname.replace('_', '-') expanded_pkgname = d.expand(oe_pkg_name) @@ -84,7 +85,7 @@ python populate_packages_prepend () { } FILES_${PN} += " \ -${libdir}/node_modules/${NPMPN} \ +${NPM_INSTALLDIR} \ " EXPORT_FUNCTIONS do_compile do_install -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH v3] npm: change install directory to upstream default
The node binary searches for packages in a number of locations, the last of which is $PREFIX/lib/node (here: /usr/lib/node) from the list of GLOBAL_FOLDERS [1]. So change the installation directory for all packages depending on npm.bbclass to that location. This removes the need to define the NODE_PATH variable to the non-standard /usr/lib/node_modules value. While the Tips for Package Managers [2] discusses installing packages to /usr/lib/node_modules//, this has several drawbacks: * it does not work for the REPL as mentioned in the documentation * it also does not work for any code _not_ installed as a global package under /usr/lib/node_modules (e.g. /usr/share/foo.js will not find any packages below /usr/lib) * using the non-default location and then having to set NODE_PATH barely saves any time: there are only two file-system lookups (to the legacy $HOME/.node_modules and $HOME/.node_libraries) directories before the library would be found And the suggestion was made in the context of deduping the node_modules tree by installing all packages in a flat hierarchy and using symlinks to the correct version of each dependency. This is not what OpenEmbedded does, so none of those benefits (deduping, cleaner packages) are being had by shifting the installation directory to /usr/lib/node_modules. The choice of a "proper" installation path is not helped by npm installing to /usr/lib/node_modules if asked to install globally. Still, using the location expected by nodejs (/usr/lib/node) seems the right choice. [1]: https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders [2]: https://nodejs.org/api/modules.html#modules_addenda_package_manager_tips Signed-off-by: Olaf Mandel --- meta/classes/npm.bbclass | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index c351ff0866..30febcffb2 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass @@ -10,7 +10,7 @@ def node_pkgname(d): NPMPN ?= "${@node_pkgname(d)}" -NPM_INSTALLDIR = "${D}${libdir}/node_modules/${NPMPN}" +NPM_INSTALLDIR = "${libdir}/node/${NPMPN}" # function maps arch names to npm arch names def npm_oe_arch_map(target_arch, d): @@ -52,9 +52,10 @@ npm_do_install() { # changing the home directory to the working directory, the .npmrc will # be created in this directory export HOME=${WORKDIR} - mkdir -p ${NPM_INSTALLDIR}/ + mkdir -p ${D}${libdir}/node_modules npm pack . npm install --prefix ${D}${prefix} -g --arch=${NPM_ARCH} --target_arch=${NPM_ARCH} --production --no-registry ${NPMPN}-${PV}.tgz + mv ${D}${libdir}/node_modules ${D}${libdir}/node if [ -d ${D}${prefix}/etc ] ; then # This will be empty rmdir ${D}${prefix}/etc @@ -62,13 +63,13 @@ npm_do_install() { } python populate_packages_prepend () { -instdir = d.expand('${D}${libdir}/node_modules/${NPMPN}') +instdir = d.expand('${D}${NPM_INSTALLDIR}') extrapackages = oe.package.npm_split_package_dirs(instdir) pkgnames = extrapackages.keys() d.prependVar('PACKAGES', '%s ' % ' '.join(pkgnames)) for pkgname in pkgnames: pkgrelpath, pdata = extrapackages[pkgname] -pkgpath = '${libdir}/node_modules/${NPMPN}/' + pkgrelpath +pkgpath = '${NPM_INSTALLDIR}/' + pkgrelpath # package names can't have underscores but npm packages sometimes use them oe_pkg_name = pkgname.replace('_', '-') expanded_pkgname = d.expand(oe_pkg_name) @@ -84,7 +85,7 @@ python populate_packages_prepend () { } FILES_${PN} += " \ -${libdir}/node_modules/${NPMPN} \ +${NPM_INSTALLDIR} \ " EXPORT_FUNCTIONS do_compile do_install -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] ✗ patchtest: failure for npm: change install directory to upstream default (rev3)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello, Am 22.10.2018 um 12:33 schrieb Patchwork: > * Issue Series does not apply on top of target branch > [test_series_merge_on_head] Suggested fixRebase your series on > top of targeted branch Targeted branch master (currently at > daba6c5a99) > The v2 of the patch does not apply because the master branch already contains v1 of the patch. I didn't notice this and resubmitted v2 as v3 after a rebase (to the sumo-branch, not the master branch). So v2 and v3 are identical except for the parent commit hash. The problem is: v1 does not actually work. What is the procedure to handle this? Should I make a patch that works on top of the v1 already in master? Thanks, Olaf - -- Olaf Mandel -BEGIN PGP SIGNATURE- iQEzBAEBCAAdFiEErGOsr28GGMKRE/TmVL2dtGJSHf8FAlvNqj8ACgkQVL2dtGJS Hf+zIgf9EFUbmTpQXt1J1rTdK5EQM0o4Jewb7UzGE4XmlSYvi74hem8kjGpYGlXu 46Ec5DR7DgvBzPc2lAw5npVxgC+2PXovVOpne/xnZtwvPM6rKd+AzNNYCm6n52aZ eGz67KF10+ypSFz76yQ5sxFIc7qivwKmJuzLuB89rFtZRv5aPV0sxZz36f+Duyoi s0hgdgKCB9IUiXvzVgeCbC3kTFGDuYFGTsBL+X/4YAvgeBoABUJSxtmjScgArk+N h1Ph9frGqS/jK1v4nU2MW76w/vwhooiRHBxRm/fffVkJiJYXmIqedYWLbsL872q9 QRCJM68mEf4e9dLOepNXbNsfhs2e+w== =VLfd -END PGP SIGNATURE- -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] npm: change install directory to upstream default
The node binary searches for packages in a number of locations, the last of which is $PREFIX/lib/node (here: /usr/lib/node) from the list of GLOBAL_FOLDERS [1]. Change the installation directory for all packages depending on npm.bbclass to that location. This removes the need to define the NODE_PATH variable to the non-standard /usr/lib/node_modules value. While the Tips for Package Managers [2] discusses installing packages to /usr/lib/node_modules//, this has several drawbacks: * it does not work for the REPL as mentioned in the documentation * it also does not work for any code _not_ installed as a global package under /usr/lib/node_modules (e.g. /usr/share/foo.js will not find any packages below /usr/lib) * using the non-default location and then having to set NODE_PATH barely saves any time: there are only two file-system lookups (to the legacy $HOME/.node_modules and $HOME/.node_libraries) directories before the library would be found And the suggestion was made in the context of deduping the node_modules tree by installing all packages in a flat hierarchy and using symlinks to the correct version of each dependency. This is not what OpenEmbedded does, so none of those benefits (deduping, cleaner packages) are being had by shifting the installation directory to /usr/lib/node_modules. [1]: https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders [2]: https://nodejs.org/api/modules.html#modules_addenda_package_manager_tips Signed-off-by: Olaf Mandel --- meta/classes/npm.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index c351ff0866..d5ff0c6d57 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass @@ -10,7 +10,7 @@ def node_pkgname(d): NPMPN ?= "${@node_pkgname(d)}" -NPM_INSTALLDIR = "${D}${libdir}/node_modules/${NPMPN}" +NPM_INSTALLDIR = "${D}${libdir}/node/${NPMPN}" # function maps arch names to npm arch names def npm_oe_arch_map(target_arch, d): -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] ✗ patchtest: failure for npm: change install directory to upstream default (rev3)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello, Am 23.10.2018 um 00:45 schrieb Richard Purdie: > On Mon, 2018-10-22 at 12:45 +0200, Olaf Mandel wrote: >> [...] What is the procedure to handle this? Should I make a >> patch that works on top of the v1 already in master? > > Normally I'd suggest a new patch against master. In this case I've > created one and queued it in next. > Thank you! And sorry about the noise. Best regards, Olaf - -- Olaf Mandel -BEGIN PGP SIGNATURE- iQEzBAEBCAAdFiEErGOsr28GGMKRE/TmVL2dtGJSHf8FAlvO+B4ACgkQVL2dtGJS Hf8tXgf/aOMaNVwsdOd+X5d4v81/cw5cquOiGAHscPBCtqyJnfHUjigBQ8OXzqMq j01RA0G4ML8iIB4HfWBZVtqANIqsPaflRwhG07ykvX2N/VdiMyJ36FBKYmjmsMlF 3Fjr7BF9V2MOEqu2Ddte1S7OD8DAoU+99oUHUhsPSDiubBd1YZhwu9J0KPRXW8wC uaUww2X7Ung3IVQnGCM6aU8Mvx3KZoDZ92hkhillRHQr9TTJYzXPdI9H7LgKQmI5 FB5JyFwtqMBZbtjv49Rrnkm0apCf1NzZT64RBknKsPL5Afd1wVJ20x8UeZM6+BWR gJqXgQk+tsremI4tYji9GBn3ST8Udw== =jWFl -END PGP SIGNATURE- -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] npm: change install directory to upstream default
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello Dan, Am 26.10.2018 um 19:46 schrieb Dan McGregor: > On Fri, 19 Oct 2018 at 09:29, Olaf Mandel > wrote: >> -NPM_INSTALLDIR = "${D}${libdir}/node_modules/${NPMPN}" >> +NPM_INSTALLDIR = "${D}${libdir}/node/${NPMPN}" > > Ï realise this has already gone în, but should this be > ${nonarch_libdir}, or does it use /usr/lib64 or /usr/libx32 > correctly? > For me, libdir resolves to /usr/lib, so I didn't notice any problems. And the "lib"-part is hardcoded in NodeJS (lib/module.js: path.resolve(prefixDir, 'lib', 'node')). So if ${nonarch_libdir} is always ${prefix}/lib even if ${libdir} isn't, then that should be changed. Best regards, Olaf Mandel -BEGIN PGP SIGNATURE- iQEzBAEBCAAdFiEErGOsr28GGMKRE/TmVL2dtGJSHf8FAlvW43UACgkQVL2dtGJS Hf8gLAf/aIQ5z219f1Tqtp5Oc1mBr4IN3T/Uzk6MlKKtqfQGS2KBF7CqWLUKNXT2 /eKa/v7H55yTWC6PSlJjx7HMzJK9mhwZ84LwAQ4rpj6ZBn1RYjv4DBdgPxlQN+1N 4kAoWklpgBut0eNtb9hniwf2VhF7rkI8eLVdNcL1SR7JroDahSnjVGozuE/asxK0 yJHHaz3cbe6QooYKeyi4y6lM1wJfP5Wny0rOCMh3rWvsexf7G7itki0MoRU7dNVv C2zK+/KVjhYbLWSRijSYjGRFpMzKb9AddBxkpIZ4z7vjAlbbbYN1iw3RdPoiPYhP rwvtSk3Wwe4McsVUjRaEFxwcdCPQQQ== =1BcQ -END PGP SIGNATURE- -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] devtool: deploy-target: allow use of alternate ssh
Allow the use of an alternate SSH executable for deploy-target and undeploy-target. The command can be specified with -e / --ssh-exec. Signed-off-by: Olaf Mandel --- scripts/lib/devtool/deploy.py | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py index 886004b5d0..f345f31b7b 100644 --- a/scripts/lib/devtool/deploy.py +++ b/scripts/lib/devtool/deploy.py @@ -211,6 +211,11 @@ def deploy(args, config, basepath, workspace): if not args.show_status: extraoptions += ' -q' +scp_sshexec = '' +ssh_sshexec = 'ssh' +if args.ssh_exec: +scp_sshexec = "-S %s" % args.ssh_exec +ssh_sshexec = args.ssh_exec scp_port = '' ssh_port = '' if args.port: @@ -238,7 +243,7 @@ def deploy(args, config, basepath, workspace): for fpath, fsize in filelist: f.write('%s %d\n' % (fpath, fsize)) # Copy them to the target -ret = subprocess.call("scp %s %s %s/* %s:%s" % (scp_port, extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True) +ret = subprocess.call("scp %s %s %s %s/* %s:%s" % (scp_sshexec, scp_port, extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True) if ret != 0: raise DevtoolError('Failed to copy script to %s - rerun with -s to ' 'get a complete error message' % args.target) @@ -246,7 +251,7 @@ def deploy(args, config, basepath, workspace): shutil.rmtree(tmpdir) # Now run the script -ret = exec_fakeroot(rd, 'tar cf - . | ssh %s %s %s \'sh %s %s %s %s\'' % (ssh_port, extraoptions, args.target, tmpscript, args.recipename, destdir, tmpfilelist), cwd=recipe_outdir, shell=True) +ret = exec_fakeroot(rd, 'tar cf - . | %s %s %s %s \'sh %s %s %s %s\'' % (ssh_sshexec, ssh_port, extraoptions, args.target, tmpscript, args.recipename, destdir, tmpfilelist), cwd=recipe_outdir, shell=True) if ret != 0: raise DevtoolError('Deploy failed - rerun with -s to get a complete ' 'error message') @@ -276,6 +281,11 @@ def undeploy(args, config, basepath, workspace): if not args.show_status: extraoptions += ' -q' +scp_sshexec = '' +ssh_sshexec = 'ssh' +if args.ssh_exec: +scp_sshexec = "-S %s" % args.ssh_exec +ssh_sshexec = args.ssh_exec scp_port = '' ssh_port = '' if args.port: @@ -292,7 +302,7 @@ def undeploy(args, config, basepath, workspace): with open(os.path.join(tmpdir, os.path.basename(tmpscript)), 'w') as f: f.write(shellscript) # Copy it to the target -ret = subprocess.call("scp %s %s %s/* %s:%s" % (scp_port, extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True) +ret = subprocess.call("scp %s %s %s %s/* %s:%s" % (scp_sshexec, scp_port, extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True) if ret != 0: raise DevtoolError('Failed to copy script to %s - rerun with -s to ' 'get a complete error message' % args.target) @@ -300,7 +310,7 @@ def undeploy(args, config, basepath, workspace): shutil.rmtree(tmpdir) # Now run the script -ret = subprocess.call('ssh %s %s %s \'sh %s %s\'' % (ssh_port, extraoptions, args.target, tmpscript, args.recipename), shell=True) +ret = subprocess.call('%s %s %s %s \'sh %s %s\'' % (ssh_sshexec, ssh_port, extraoptions, args.target, tmpscript, args.recipename), shell=True) if ret != 0: raise DevtoolError('Undeploy failed - rerun with -s to get a complete ' 'error message') @@ -324,6 +334,7 @@ def register_commands(subparsers, context): parser_deploy.add_argument('-n', '--dry-run', help='List files to be deployed only', action='store_true') parser_deploy.add_argument('-p', '--no-preserve', help='Do not preserve existing files', action='store_true') parser_deploy.add_argument('--no-check-space', help='Do not check for available space before deploying', action='store_true') +parser_deploy.add_argument('-e', '--ssh-exec', help='Executable to use in place of ssh') parser_deploy.add_argument('-P', '--port', help='Specify port to use for connection to the target') strip_opts = parser_deploy.add_mutually_exclusive_group(required=False) @@ -346,5 +357,6 @@ def register_commands(subparsers, context): parser_undeploy.add_argument('-s', '--show-status', help='Show progress/status output', action='store_true') parser_undeploy.add_argument('-a', '--all', help='Undeploy all recipes deployed on the target', action='store_true') parser_undeploy.add_argument('-n', '--dry-run',
[OE-core] [PATCH v2] devtool: deploy-target: support "unsafe" symlinks
The bosybox version of tar in sumo considers symlink targets that start with / or with ../ to be unsafe and refuses to unpack them unless the EXTRACT_UNSAFE_SYMLINKS environment variable is set to 1. As even many core packages legitimately contain such links (e.g. coreutils-locale-*, dropbear, eudev, initscripts, kmod, ...), add the environment variable to the remote script. --- scripts/lib/devtool/deploy.py | 5 + 1 file changed, 5 insertions(+) diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py index f345f31b7b..dc9b34e0ee 100644 --- a/scripts/lib/devtool/deploy.py +++ b/scripts/lib/devtool/deploy.py @@ -114,6 +114,11 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals lines.append('rm $3') lines.append('mkdir -p `dirname $manifest`') lines.append('mkdir -p $2') +# Busybox tar v1.28.x (plus v1.27.2 with the CVE-2011-5325 patch) +# requires this env variable. The first release without this issue +# is thud. +# FIXME Remove once sumo goes out of support +lines.append('export EXTRACT_UNSAFE_SYMLINKS=1') if verbose: lines.append('tar xv -C $2 -f - | tee $manifest') else: -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
[OE-core] [PATCH] devtool: deploy-target: support "unsafe" symlinks
The bosybox version of tar considers symlink targets that start with / or with ../ to be unsafe and refuses to unpack them unless the EXTRACT_UNSAFE_SYMLINKS environment variable is set to 1. As even many core packages legitimately contain such links (e.g. coreutils-locale-*, dropbear, eudev, initscripts, kmod, ...), add the environment variable to the remote script. --- scripts/lib/devtool/deploy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/lib/devtool/deploy.py b/scripts/lib/devtool/deploy.py index f345f31b7b..9617388f90 100644 --- a/scripts/lib/devtool/deploy.py +++ b/scripts/lib/devtool/deploy.py @@ -114,6 +114,7 @@ def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=Fals lines.append('rm $3') lines.append('mkdir -p `dirname $manifest`') lines.append('mkdir -p $2') +lines.append('export EXTRACT_UNSAFE_SYMLINKS=1') if verbose: lines.append('tar xv -C $2 -f - | tee $manifest') else: -- 2.11.0 -- ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core