All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] combo-layer: handle file_exclude matching dirs
@ 2016-10-17 16:23 ` Olaf Mandel
  2016-10-21  9:24   ` [PATCH v2] " Olaf Mandel
  0 siblings, 1 reply; 12+ messages in thread
From: Olaf Mandel @ 2016-10-17 16:23 UTC (permalink / raw)
  To: openembedded-core; +Cc: Olaf Mandel

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



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

* [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM
@ 2016-10-19 10:05 Olaf Mandel
  2016-10-19 10:05 ` [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM Olaf Mandel
  2016-10-20 23:29 ` [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Paul Eggleton
  0 siblings, 2 replies; 12+ messages in thread
From: Olaf Mandel @ 2016-10-19 10:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Olaf Mandel

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



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

* [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM
  2016-10-19 10:05 [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Olaf Mandel
@ 2016-10-19 10:05 ` Olaf Mandel
  2016-10-20 10:44   ` Peter Kjellerstedt
  2016-10-21  9:24   ` [PATCH v2] " Olaf Mandel
  2016-10-20 23:29 ` [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Paul Eggleton
  1 sibling, 2 replies; 12+ messages in thread
From: Olaf Mandel @ 2016-10-19 10:05 UTC (permalink / raw)
  To: openembedded-core; +Cc: Olaf Mandel

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 = "Extra machine specific configuration files"
 DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information."
 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://automount.rules \
diff --git a/meta/recipes-devtools/devel-config/distcc-config.bb b/meta/recipes-devtools/devel-config/distcc-config.bb
index cb7830b..3cd661d 100644
--- a/meta/recipes-devtools/devel-config/distcc-config.bb
+++ b/meta/recipes-devtools/devel-config/distcc-config.bb
@@ -1,8 +1,7 @@
 SUMMARY = "Sets up distcc for compilation on the target device"
 
 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://distcc.sh"
 
diff --git a/meta/recipes-devtools/devel-config/nfs-export-root.bb b/meta/recipes-devtools/devel-config/nfs-export-root.bb
index 169d005..56375a4 100644
--- a/meta/recipes-devtools/devel-config/nfs-export-root.bb
+++ b/meta/recipes-devtools/devel-config/nfs-export-root.bb
@@ -1,8 +1,7 @@
 SUMMARY = "Configuration script to export target rootfs filesystem"
 DESCRIPTION = "Enables NFS access from any host to the entire filesystem (for development purposes)."
 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 = "r1"
 
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 11c94e5..31c98ec 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -2,8 +2,7 @@ SUMMARY = "Runs postinstall scripts on first boot of the target device"
 SECTION = "devel"
 PR = "r9"
 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://run-postinsts \
            file://run-postinsts.init \
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 291cd16..22ba5f3 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
 SRC_URI = "file://init \
            file://weston.service \
diff --git a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
index ebdd6d1..28d5096 100644
--- a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
+++ b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
@@ -1,7 +1,6 @@
 SUMMARY = "Provides an icon to shut down the system cleanly"
 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://shutdown.desktop"
 
-- 
2.1.4



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

* Re: [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM
  2016-10-19 10:05 ` [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM Olaf Mandel
@ 2016-10-20 10:44   ` Peter Kjellerstedt
  2016-10-20 11:11     ` Olaf Mandel
  2016-10-21  9:24   ` [PATCH v2] " Olaf Mandel
  1 sibling, 1 reply; 12+ messages in thread
From: Peter Kjellerstedt @ 2016-10-20 10:44 UTC (permalink / raw)
  To: Olaf Mandel, openembedded-core

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Olaf Mandel
> Sent: den 19 oktober 2016 12:05
> To: openembedded-core@lists.openembedded.org
> Cc: Olaf Mandel
> Subject: [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(-)

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?

There are also 17 recipes in OpenEmbedded with a reference to 
${COREBASE}/LICENSE. They too need to be fixed.

//Peter



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

* Re: [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM
  2016-10-20 10:44   ` Peter Kjellerstedt
@ 2016-10-20 11:11     ` Olaf Mandel
  0 siblings, 0 replies; 12+ messages in thread
From: Olaf Mandel @ 2016-10-20 11:11 UTC (permalink / raw)
  To: Peter Kjellerstedt, openembedded-core

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.



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

* Re: [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM
  2016-10-19 10:05 [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Olaf Mandel
  2016-10-19 10:05 ` [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM Olaf Mandel
@ 2016-10-20 23:29 ` Paul Eggleton
  2016-10-21 14:05   ` Olaf Mandel
                     ` (2 more replies)
  1 sibling, 3 replies; 12+ messages in thread
From: Paul Eggleton @ 2016-10-20 23:29 UTC (permalink / raw)
  To: Olaf Mandel; +Cc: openembedded-core

Hi Olaf,

On Wed, 19 Oct 2016 10:05:12 Olaf Mandel wrote:
> 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.

Agreed, doing this cleanup makes sense to me. We should especially discourage
others from referring to this file in their own recipes, and we start by
showing a good example.

> 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.

Cheers,
Paul

[1] http://cgit.openembedded.org/openembedded-core/commit/?id=c269547ae8e90a78349f6003385137e4145e145f

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Forgot Signed-off-by lines
@ 2016-10-21  9:24 Olaf Mandel
  2016-10-17 16:23 ` [PATCH] combo-layer: handle file_exclude matching dirs Olaf Mandel
  0 siblings, 1 reply; 12+ messages in thread
From: Olaf Mandel @ 2016-10-21  9:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: Olaf Mandel

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



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

* [PATCH v2] combo-layer: handle file_exclude matching dirs
  2016-10-17 16:23 ` [PATCH] combo-layer: handle file_exclude matching dirs Olaf Mandel
@ 2016-10-21  9:24   ` Olaf Mandel
  0 siblings, 0 replies; 12+ messages in thread
From: Olaf Mandel @ 2016-10-21  9:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: Olaf Mandel

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.mandel@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



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

* [PATCH v2] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM
  2016-10-19 10:05 ` [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM Olaf Mandel
  2016-10-20 10:44   ` Peter Kjellerstedt
@ 2016-10-21  9:24   ` Olaf Mandel
  1 sibling, 0 replies; 12+ messages in thread
From: Olaf Mandel @ 2016-10-21  9:24 UTC (permalink / raw)
  To: openembedded-core; +Cc: Olaf Mandel

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.mandel@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_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 = "Extra machine specific configuration files"
 DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information."
 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://automount.rules \
diff --git a/meta/recipes-devtools/devel-config/distcc-config.bb b/meta/recipes-devtools/devel-config/distcc-config.bb
index cb7830b..3cd661d 100644
--- a/meta/recipes-devtools/devel-config/distcc-config.bb
+++ b/meta/recipes-devtools/devel-config/distcc-config.bb
@@ -1,8 +1,7 @@
 SUMMARY = "Sets up distcc for compilation on the target device"
 
 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://distcc.sh"
 
diff --git a/meta/recipes-devtools/devel-config/nfs-export-root.bb b/meta/recipes-devtools/devel-config/nfs-export-root.bb
index 169d005..56375a4 100644
--- a/meta/recipes-devtools/devel-config/nfs-export-root.bb
+++ b/meta/recipes-devtools/devel-config/nfs-export-root.bb
@@ -1,8 +1,7 @@
 SUMMARY = "Configuration script to export target rootfs filesystem"
 DESCRIPTION = "Enables NFS access from any host to the entire filesystem (for development purposes)."
 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 = "r1"
 
diff --git a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
index 11c94e5..31c98ec 100644
--- a/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
+++ b/meta/recipes-devtools/run-postinsts/run-postinsts_1.0.bb
@@ -2,8 +2,7 @@ SUMMARY = "Runs postinstall scripts on first boot of the target device"
 SECTION = "devel"
 PR = "r9"
 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://run-postinsts \
            file://run-postinsts.init \
diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 291cd16..22ba5f3 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,6 +1,6 @@
 SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
 SRC_URI = "file://init \
            file://weston.service \
diff --git a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
index ebdd6d1..28d5096 100644
--- a/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
+++ b/meta/recipes-sato/shutdown-desktop/shutdown-desktop.bb
@@ -1,7 +1,6 @@
 SUMMARY = "Provides an icon to shut down the system cleanly"
 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://shutdown.desktop"
 
-- 
2.1.4



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

* Re: [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM
  2016-10-20 23:29 ` [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Paul Eggleton
@ 2016-10-21 14:05   ` Olaf Mandel
  2016-10-21 14:36   ` Denys Dmytriyenko
  2016-10-21 19:36   ` Paul Eggleton
  2 siblings, 0 replies; 12+ messages in thread
From: Olaf Mandel @ 2016-10-21 14:05 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 2014 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 484 bytes --]

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

* Re: [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM
  2016-10-20 23:29 ` [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Paul Eggleton
  2016-10-21 14:05   ` Olaf Mandel
@ 2016-10-21 14:36   ` Denys Dmytriyenko
  2016-10-21 19:36   ` Paul Eggleton
  2 siblings, 0 replies; 12+ messages in thread
From: Denys Dmytriyenko @ 2016-10-21 14:36 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core, Olaf Mandel

On Fri, Oct 21, 2016 at 12:29:55PM +1300, Paul Eggleton wrote:
> Hi Olaf,
> 
> On Wed, 19 Oct 2016 10:05:12 Olaf Mandel wrote:
> > 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.
> 
> Agreed, doing this cleanup makes sense to me. We should especially discourage
> others from referring to this file in their own recipes, and we start by
> showing a good example.

FWIW, we also discussed this topic at OEDEM last week...


> > 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.
> 
> Cheers,
> Paul
> 
> [1] http://cgit.openembedded.org/openembedded-core/commit/?id=c269547ae8e90a78349f6003385137e4145e145f
> 
> -- 
> 
> Paul Eggleton
> Intel Open Source Technology Centre
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM
  2016-10-20 23:29 ` [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Paul Eggleton
  2016-10-21 14:05   ` Olaf Mandel
  2016-10-21 14:36   ` Denys Dmytriyenko
@ 2016-10-21 19:36   ` Paul Eggleton
  2 siblings, 0 replies; 12+ messages in thread
From: Paul Eggleton @ 2016-10-21 19:36 UTC (permalink / raw)
  To: Olaf Mandel; +Cc: openembedded-core

On Fri, 21 Oct 2016 12:29:55 Paul Eggleton wrote:
> 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].

Actually I will correct that statement to match the code - LIC_FILES_CHKSUM
is no longer *mandatory* if SRC_URI is not set. If it is set, it will still
be checked.

Cheers,
Paul

[1] http://cgit.openembedded.org/openembedded-core/commit/?id=c269547ae8e90a78349f6003385137e4145e145f

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

end of thread, other threads:[~2016-10-21 19:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-19 10:05 [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Olaf Mandel
2016-10-19 10:05 ` [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM Olaf Mandel
2016-10-20 10:44   ` Peter Kjellerstedt
2016-10-20 11:11     ` Olaf Mandel
2016-10-21  9:24   ` [PATCH v2] " Olaf Mandel
2016-10-20 23:29 ` [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Paul Eggleton
2016-10-21 14:05   ` Olaf Mandel
2016-10-21 14:36   ` Denys Dmytriyenko
2016-10-21 19:36   ` Paul Eggleton
2016-10-21  9:24 Forgot Signed-off-by lines Olaf Mandel
2016-10-17 16:23 ` [PATCH] combo-layer: handle file_exclude matching dirs Olaf Mandel
2016-10-21  9:24   ` [PATCH v2] " Olaf Mandel

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.