[OE-core] [meta][lib/oeqa][PATCH v3] Meta runtime cases: add testcases for kernel sample

2018-06-02 Thread Hongzhi.Song
We are going to let runtime test support kernel tests. Now we just add
kernel self-contained sample tests. And we plan to add overall kernel
tests in the future.

This patch is just add kernel samples test which contains about 13 tests
enabled by kernel-sample.scc. So it needs statement,
KERNEL_FEATURES_append += " kernel-sample/kernel-sample.scc" in
local.conf.

kernel-sample feature has been merged into master branch.

Signed-off-by: Hongzhi.Song 
---
 meta/lib/oeqa/runtime/cases/ksample.py | 272 +
 1 file changed, 272 insertions(+)
 create mode 100644 meta/lib/oeqa/runtime/cases/ksample.py

diff --git a/meta/lib/oeqa/runtime/cases/ksample.py 
b/meta/lib/oeqa/runtime/cases/ksample.py
new file mode 100644
index 000..719f1a0
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/ksample.py
@@ -0,0 +1,272 @@
+import os
+import time
+
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.oeid import OETestID
+from oeqa.core.decorator.data import skipIfNotFeature
+
+class KSample(OERuntimeTestCase):
+def send_cmd(self, cmd='', content=''):
+comd = cmd + " " + content
+status, ret = self.target.run(comd)
+msg = '%s failed, %s' % (comd, ret)
+self.assertEqual(status, 0, msg=msg)
+
+def check_config(self, config_opt=''):
+cmd = "zcat /proc/config.gz | grep %s" % config_opt
+status, ret = self.target.run(cmd)
+result = ("%s=y" % config_opt) in ret
+if not result:
+self.skipTest("CONFIG error")
+
+def check_module_exist(self, path='', module_name=''):
+status, ret = self.target.run("uname -r")
+cmd = "ls " + "/lib/modules/" + ret + "/kernel/samples/" + path + 
module_name
+status, output = self.target.run(cmd)
+if status != 0:
+error_info = module_name + "doesn't exist"
+self.skipTest(error_info)
+
+def send_check(self, cmd='', content='', comp=''):
+comd = cmd + " " + content
+status, ret = self.target.run(comd)
+self.assertEqual(ret, comp, comd)
+
+def send_check_in(self, cmd='', content='', comp=''):
+comd = cmd + " " + content
+status, ret = self.target.run(comd)
+result = ("%s" % comp) in ret
+self.assertTrue(result)
+self.assertEqual(status, 0, comd)
+
+class KSampleTest(KSample):
+#trace
+@OETestID(33)
+@OETestDepends(['ssh.SSHTest.test_ssh'])
+def test_trace_events(self):
+# check config
+self.check_config("CONFIG_TRACING_SUPPORT")
+# make sure if module exists
+self.check_module_exist("trace_events/", "trace-events-sample.ko")
+# modprobe
+self.send_cmd("modprobe", "trace-events-sample")
+# lsmod
+self.send_check("lsmod", "| grep trace_events_sample | cut -d\' \' 
-f1", "trace_events_sample")
+# check dir
+self.send_check("ls", "/sys/kernel/debug/tracing/events/ | grep 
sample-trace", "sample-trace")
+# enable trace
+self.send_cmd("echo 1 > 
/sys/kernel/debug/tracing/events/sample-trace/enable")
+self.send_cmd("cat 
/sys/kernel/debug/tracing/events/sample-trace/enable")
+# check result
+self.send_check("cat", "/sys/kernel/debug/tracing/trace | grep hello | 
head -n1 | cut -d\':\' -f2", " foo_bar")
+# disable trace
+self.send_cmd('echo 0 > 
/sys/kernel/debug/tracing/events/sample-trace/enable')
+# clean up trace
+self.send_cmd('echo > /sys/kernel/debug/tracing/trace')
+# rmmod
+self.send_cmd('rmmod trace-events-sample')
+
+@OETestID(34)
+@OETestDepends(['ssh.SSHTest.test_ssh'])
+def test_trace_printk(self):
+# check config
+self.check_config("CONFIG_TRACING_SUPPORT")
+# make sure if module exists
+self.check_module_exist("trace_printk/", "trace-printk.ko")
+# modprobe
+self.send_cmd('modprobe', 'trace-printk')
+# lsmod
+self.send_check("lsmod", "| grep trace_printk | cut -d\' \' -f1", 
"trace_printk")
+# check result
+self.send_check("cat", "/sys/kernel/debug/tracing/trace | grep 
trace_printk_irq_work | head -n1 | cut -d\':\' -f2", " trace_printk_irq_work")
+# clean up trace
+self.send_cmd('echo > /sys/kernel/debug/tracing/trace')
+# rmmod
+self.send_cmd('rmmod trace-printk')
+# kprobe
+@OETestID(43)
+@OETestDepends(['ssh.SSHTest.test_ssh'])
+def test_kprobe_example(self):
+# check config
+self.check_config("CONFIG_KPROBES")
+# make sure if module exists
+self.check_module_exist("kprobes/", "kprobe_example.ko")
+# modprobe
+self.send_cmd('modprobe', 'kprobe_example')
+# lsmod
+self.send_check("lsmod", "| grep kprobe_example | cut -d\' \' -f1", 
"kprobe_example")
+# check result
+

[OE-core] [meta-oe][PATCH v3] iso-codes: fix SRC_URI

2018-06-02 Thread Oleksandr Kravchuk
The original FTP server, alioth.debian.org has been permanently taken
down by the Debian Project and replaced with salsa.debian.org.

Source: https://wiki.debian.org/Alioth

Signed-off-by: Oleksandr Kravchuk 
---
 meta/recipes-support/iso-codes/iso-codes_3.77.bb | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/iso-codes/iso-codes_3.77.bb 
b/meta/recipes-support/iso-codes/iso-codes_3.77.bb
index bd613ac573..b99fe65879 100644
--- a/meta/recipes-support/iso-codes/iso-codes_3.77.bb
+++ b/meta/recipes-support/iso-codes/iso-codes_3.77.bb
@@ -2,14 +2,16 @@ SUMMARY = "ISO language, territory, currency, script codes 
and their translation
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-SRC_URI = 
"https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz;
-SRC_URI[md5sum] = "9d0d06cfb4634428b300845edcd7140a"
-SRC_URI[sha256sum] = 
"21cd73a4c6f95d9474ebfcffd4e065223857720f24858e564f4409b19f7f0d90"
+SRC_URI = 
"https://salsa.debian.org/debian/iso-codes/-/archive/upstream/${PV}/iso-codes-upstream-${PV}.tar.bz2;
+SRC_URI[md5sum] = "a19626c1abe1b96ade163692cf17b566"
+SRC_URI[sha256sum] = 
"2501501aa26e078a07056c55df5d0c56ce2c03cf1c03a5bccce4f3193c91aea1"
 
 # inherit gettext cannot be used, because it adds gettext-native to 
BASEDEPENDS which
 # are inhibited by allarch
 DEPENDS = "gettext-native"
 
+S = "${WORKDIR}/iso-codes-upstream-${PV}"
+
 inherit allarch autotools
 
 FILES_${PN} += "${datadir}/xml/"
-- 
2.17.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [meta-oe][PATCH] minicom: fix SRC_URI

2018-06-02 Thread Oleksandr Kravchuk
The original source, alioth.debian.org has been permanently taken down
by the Debian Project. Use Debian mirrors instead.

Source: https://wiki.debian.org/Alioth

Removed UPSTREAM_CHECK_URI for the same reason.

Signed-off-by: Oleksandr Kravchuk 
---
 meta/recipes-extended/minicom/minicom_2.7.1.bb | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-extended/minicom/minicom_2.7.1.bb 
b/meta/recipes-extended/minicom/minicom_2.7.1.bb
index e6afe2b655..40d59e133a 100644
--- a/meta/recipes-extended/minicom/minicom_2.7.1.bb
+++ b/meta/recipes-extended/minicom/minicom_2.7.1.bb
@@ -1,5 +1,5 @@
 SUMMARY = "Text-based modem control and terminal emulation program"
-HOMEPAGE = "http://alioth.debian.org/projects/minicom/;
+HOMEPAGE = "https://salsa.debian.org/minicom-team/minicom/;
 DESCRIPTION = "Minicom is a text-based modem control and terminal emulation 
program for Unix-like operating systems"
 SECTION = "console/network"
 DEPENDS = "ncurses virtual/libiconv"
@@ -7,7 +7,7 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=420477abc567404debca0a2a1cb6b645 \
 
file://src/minicom.h;beginline=1;endline=12;md5=a58838cb709f0db517f4e42730c49e81"
 
-SRC_URI = 
"https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz \
+SRC_URI = 
"http://http.debian.net/debian/pool/main/m/minicom/minicom_${PV}.orig.tar.gz \
file://allow.to.disable.lockdev.patch \
file://0001-fix-minicom-h-v-return-value-is-not-0.patch \
file://0001-Fix-build-issus-surfaced-due-to-musl.patch \
@@ -16,8 +16,6 @@ SRC_URI = 
"https://alioth.debian.org/frs/download.php/latestfile/3/${BP}.tar.gz
 SRC_URI[md5sum] = "9021cb8c5445f6e6e74b2acc39962d62"
 SRC_URI[sha256sum] = 
"532f836b7a677eb0cb1dca8d70302b73729c3d30df26d58368d712e5cca041f1"
 
-UPSTREAM_CHECK_URI = "https://alioth.debian.org/frs/?group_id=30018;
-
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev"
 
-- 
2.17.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [meta-oe][PATCH v2 2/2] iso-codes: fix SRC_URI

2018-06-02 Thread Oleksandr Kravchuk
The original FTP server, alioth.debian.org has been permanently taken
down by the Debian Project and replaced with salsa.debian.org.

Source: https://wiki.debian.org/Alioth

Package has been updated to revision 1, since the original one is not
available anymore.

Signed-off-by: Oleksandr Kravchuk 
---
 .../iso-codes/{iso-codes_3.77.bb => iso-codes_3.77-1.bb}  | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)
 rename meta/recipes-support/iso-codes/{iso-codes_3.77.bb => 
iso-codes_3.77-1.bb} (56%)

diff --git a/meta/recipes-support/iso-codes/iso-codes_3.77.bb 
b/meta/recipes-support/iso-codes/iso-codes_3.77-1.bb
similarity index 56%
rename from meta/recipes-support/iso-codes/iso-codes_3.77.bb
rename to meta/recipes-support/iso-codes/iso-codes_3.77-1.bb
index bd613ac573..86a757ac62 100644
--- a/meta/recipes-support/iso-codes/iso-codes_3.77.bb
+++ b/meta/recipes-support/iso-codes/iso-codes_3.77-1.bb
@@ -2,14 +2,16 @@ SUMMARY = "ISO language, territory, currency, script codes 
and their translation
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
-SRC_URI = 
"https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz;
-SRC_URI[md5sum] = "9d0d06cfb4634428b300845edcd7140a"
-SRC_URI[sha256sum] = 
"21cd73a4c6f95d9474ebfcffd4e065223857720f24858e564f4409b19f7f0d90"
+SRC_URI = 
"https://salsa.debian.org/debian/iso-codes/-/archive/debian/${PV}/iso-codes-debian-${PV}.tar.bz2;
+SRC_URI[md5sum] = "a186e19abef46a561fd34394cda84b7f"
+SRC_URI[sha256sum] = 
"bf07ea8c2f59432c9c8e73b9dee9af7ba02e0e4894495aaeb8ff020656ec2973"
 
 # inherit gettext cannot be used, because it adds gettext-native to 
BASEDEPENDS which
 # are inhibited by allarch
 DEPENDS = "gettext-native"
 
+S = "${WORKDIR}/iso-codes-debian-${PV}"
+
 inherit allarch autotools
 
 FILES_${PN} += "${datadir}/xml/"
-- 
2.17.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [meta-oe][PATCH v2 1/2] chrpath: fix SRC_URI

2018-06-02 Thread Oleksandr Kravchuk
The original source, alioth.debian.org has been permanently taken down
by the Debian Project. Use Debian mirrors instead.

Source: https://wiki.debian.org/Alioth

Signed-off-by: Oleksandr Kravchuk 
---
 meta/recipes-devtools/chrpath/chrpath_0.16.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/chrpath/chrpath_0.16.bb 
b/meta/recipes-devtools/chrpath/chrpath_0.16.bb
index b61eef9c8b..0c9ce0c301 100644
--- a/meta/recipes-devtools/chrpath/chrpath_0.16.bb
+++ b/meta/recipes-devtools/chrpath/chrpath_0.16.bb
@@ -2,12 +2,11 @@ SUMMARY = "Tool to edit rpath in ELF binaries"
 DESCRIPTION = "chrpath allows you to change the rpath (where the \
 application looks for libraries) in an application. It does not \
 (yet) allow you to add an rpath if there isn't one already."
-HOMEPAGE = "http://alioth.debian.org/projects/chrpath/;
 BUGTRACKER = "http://alioth.debian.org/tracker/?atid=412807_id=31052;
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 
-SRC_URI = 
"https://alioth.debian.org/frs/download.php/file/3979/chrpath-0.16.tar.gz \
+SRC_URI = 
"http://http.debian.net/debian/pool/main/c/chrpath/chrpath_${PV}.orig.tar.gz \
file://standarddoc.patch"
 
 SRC_URI[md5sum] = "2bf8d1d1ee345fc8a7915576f5649982"
-- 
2.17.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [meta-oe][PATCH 1/2] chrpath: fix SRC_URI

2018-06-02 Thread Alexander Kanavin
2018-06-02 16:45 GMT+03:00 Oleksandr Kravchuk
:
>> It's better to stick with debian, the tarball is still available
>> through ${DEBIAN_MIRROR}:
>> http://http.debian.net/debian/pool/main/c/chrpath/chrpath_0.16.orig.tar.gz
>>
>> Can you also investigate the other instances of alioth, namely shadow
>> and minicom please?
>>
>> Alex
>
>
> This is a subjective statement. Having mirrors is great, but having a
> working SRC_URI in the recipe and mirrors five times great: I have seen both
> original source and the mirror being inaccessible for a period of time
> multiple times.

${DEBIAN_MIRROR} is not a mirror for alioth, it's a mirror for debian
packages repository and their original tarballs. The place where
apt-get looks for .deb packages in Debian. So it's unlikely to go
offline.

As chrpath is a debian project, we should prefer taking it from Debian
rather than other sources. That way it is more likely that it will be
kept up to date.

Alex
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [meta-oe][PATCH 2/2] iso-codes: fix SRC_URI

2018-06-02 Thread Oleksandr Kravchuk
No feelings were touched. I should have indeed explained why the SRC_URI 
was changed.


I'll update the patch. Cheers.

On 02/06/18 23:35, Alexander Kanavin wrote:

I'm sorry for being terse. Reviewing patches before morning coffee is
not always a great idea.

When changing SRC_URI, you still need to explain in the commit message
what's wrong with the old URI and how the new URI was chosen.

Specifically here, alioth is not temporarily down, it has been
deliberately taken offline:

https://wiki.debian.org/Alioth

and the same wiki page lists salsa.debian.org as the successor. Any
debian-driven projects are likely to have been moved there, and so
that's the first place I had checked.

Alex

2018-06-02 16:35 GMT+03:00 Oleksandr Kravchuk
:

On 02/06/18 07:19, Alexander Kanavin wrote:

2018-06-02 1:14 GMT+03:00 Oleksandr Kravchuk
:

   SRC_URI =
"https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz;
+SRC_URI =
"https://ftp.osuosl.org/pub/blfs/conglomeration/iso-codes/iso-codes-${PV}.tar.xz;

The correct new URI is
https://salsa.debian.org/iso-codes-team/iso-codes, don't grab a random
ftp from google search results please.

Alex

It is not always easy to find "the new" official URI. I took the one that
was around for a long time, not "a random ftp from google search results".

I will fix and resend the patch.

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [meta-oe][PATCH 2/2] iso-codes: fix SRC_URI

2018-06-02 Thread Alexander Kanavin
I'm sorry for being terse. Reviewing patches before morning coffee is
not always a great idea.

When changing SRC_URI, you still need to explain in the commit message
what's wrong with the old URI and how the new URI was chosen.

Specifically here, alioth is not temporarily down, it has been
deliberately taken offline:

https://wiki.debian.org/Alioth

and the same wiki page lists salsa.debian.org as the successor. Any
debian-driven projects are likely to have been moved there, and so
that's the first place I had checked.

Alex

2018-06-02 16:35 GMT+03:00 Oleksandr Kravchuk
:
> On 02/06/18 07:19, Alexander Kanavin wrote:
>>
>> 2018-06-02 1:14 GMT+03:00 Oleksandr Kravchuk
>> :
>>>
>>>   SRC_URI =
>>> "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz;
>>> +SRC_URI =
>>> "https://ftp.osuosl.org/pub/blfs/conglomeration/iso-codes/iso-codes-${PV}.tar.xz;
>>
>> The correct new URI is
>> https://salsa.debian.org/iso-codes-team/iso-codes, don't grab a random
>> ftp from google search results please.
>>
>> Alex
>
> It is not always easy to find "the new" official URI. I took the one that
> was around for a long time, not "a random ftp from google search results".
>
> I will fix and resend the patch.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] Cherry-pick to Sumo (was: [PATCHv2 1/2] oe-pkgdata-util: Make parse_pkgdatafile() support package suffixed vars)

2018-06-02 Thread Peter Kjellerstedt
These two patches, in addition to "oe-pkgdata-util: lookup-recipe, 
package-info: Don't finish prematurely" (commit 32c2a2dd) that is already 
on master, need to be cherry-picked to the sumo branch as well. Without 
them, `oe-pkgdata-util package-info ...` is more or less broken.

//Peter

> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org
> [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of
> Peter Kjellerstedt
> Sent: den 2 juni 2018 21:31
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCHv2 1/2] oe-pkgdata-util: Make
> parse_pkgdatafile() support package suffixed vars
> 
> Support for variables suffixed with package names, e.g., PKGV_foo, was
> removed in commit 3d2c87c4, which broke support for recipes that set
> other versions on their packages than what is in ${PV}.
> 
> Signed-off-by: Peter Kjellerstedt 
> ---
>  scripts/oe-pkgdata-util | 46 ++---
> -
>  1 file changed, 18 insertions(+), 28 deletions(-)
> 
> diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
> index aea8a57516..965f473725 100755
> --- a/scripts/oe-pkgdata-util
> +++ b/scripts/oe-pkgdata-util
> @@ -286,36 +286,26 @@ def lookup_recipe(args):
> 
>  def package_info(args):
>  def parse_pkgdatafile(pkgdatafile):
> +vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR',
> 'PKGSIZE']
>  with open(pkgdatafile, 'r') as f:
> -pkge = ''
> -pkgr = ''
> -pe = ''
> -pr = ''
> +vals = dict()
>  for line in f:
> -if line.startswith('PKGV:'):
> -pkg_version = line.split(':', 1)[1].strip()
> -elif line.startswith('PKGE:'):
> -pkge = line.split(':', 1)[1].strip()
> -elif line.startswith('PKGR:'):
> -pkgr = line.split(':', 1)[1].strip()
> -elif line.startswith('PN:'):
> -recipe = line.split(':', 1)[1].strip()
> -elif line.startswith('PV:'):
> -recipe_version = line.split(':', 1)[1].strip()
> -elif line.startswith('PE:'):
> -pe = line.split(':', 1)[1].strip()
> -elif line.startswith('PR:'):
> -pr = line.split(':', 1)[1].strip()
> -elif line.startswith('PKGSIZE'):
> -pkg_size = line.split(':', 1)[1].strip()
> -if pkge:
> -pkg_version = pkge + ":" + pkg_version
> -if pkgr:
> -pkg_version = pkg_version + "-" + pkgr
> -if pe:
> -recipe_version = pe + ":" + recipe_version
> -if pr:
> -recipe_version = recipe_version + "-" + pr
> +for var in vars:
> +m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line)
> +if m:
> +vals[var] = m.group(1)
> +pkg_version = vals['PKGV'] or ''
> +recipe = vals['PN'] or ''
> +recipe_version = vals['PV'] or ''
> +pkg_size = vals['PKGSIZE'] or ''
> +if 'PKGE' in vals:
> +pkg_version = vals['PKGE'] + ":" + pkg_version
> +if 'PKGR' in vals:
> +pkg_version = pkg_version + "-" + vals['PKGR']
> +if 'PE' in vals:
> +recipe_version = vals['PE'] + ":" + recipe_version
> +if 'PR' in vals:
> +recipe_version = recipe_version + "-" + vals['PR']
>  print("%s %s %s %s %s" % (pkg, pkg_version, recipe,
> recipe_version, pkg_size))
> 
>  # Handle both multiple arguments and multiple values within an arg
> (old syntax)
> --
> 2.12.0
> 
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv2 2/2] oe-pkgdata-util: package-info: Re-add support for the --extra option

2018-06-02 Thread Peter Kjellerstedt
Commit 64d3ce83 broke the --extra option.

Signed-off-by: Peter Kjellerstedt 
---
 scripts/oe-pkgdata-util | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index 965f473725..bd12047ea5 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -287,8 +287,11 @@ def lookup_recipe(args):
 def package_info(args):
 def parse_pkgdatafile(pkgdatafile):
 vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE']
+if args.extra:
+vars += args.extra
 with open(pkgdatafile, 'r') as f:
 vals = dict()
+extra = ''
 for line in f:
 for var in vars:
 m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line)
@@ -306,7 +309,12 @@ def package_info(args):
 recipe_version = vals['PE'] + ":" + recipe_version
 if 'PR' in vals:
 recipe_version = recipe_version + "-" + vals['PR']
-print("%s %s %s %s %s" % (pkg, pkg_version, recipe, 
recipe_version, pkg_size))
+if args.extra:
+for var in args.extra:
+if var in vals:
+val = re.sub(r'\s+', ' ', vals[var])
+extra += ' "%s"' % val
+print("%s %s %s %s %s%s" % (pkg, pkg_version, recipe, 
recipe_version, pkg_size, extra))
 
 # Handle both multiple arguments and multiple values within an arg (old 
syntax)
 packages = []
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv2 1/2] oe-pkgdata-util: Make parse_pkgdatafile() support package suffixed vars

2018-06-02 Thread Peter Kjellerstedt
Support for variables suffixed with package names, e.g., PKGV_foo, was
removed in commit 3d2c87c4, which broke support for recipes that set
other versions on their packages than what is in ${PV}.

Signed-off-by: Peter Kjellerstedt 
---
 scripts/oe-pkgdata-util | 46 ++
 1 file changed, 18 insertions(+), 28 deletions(-)

diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index aea8a57516..965f473725 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -286,36 +286,26 @@ def lookup_recipe(args):
 
 def package_info(args):
 def parse_pkgdatafile(pkgdatafile):
+vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE']
 with open(pkgdatafile, 'r') as f:
-pkge = ''
-pkgr = ''
-pe = ''
-pr = ''
+vals = dict()
 for line in f:
-if line.startswith('PKGV:'):
-pkg_version = line.split(':', 1)[1].strip()
-elif line.startswith('PKGE:'):
-pkge = line.split(':', 1)[1].strip()
-elif line.startswith('PKGR:'):
-pkgr = line.split(':', 1)[1].strip()
-elif line.startswith('PN:'):
-recipe = line.split(':', 1)[1].strip()
-elif line.startswith('PV:'):
-recipe_version = line.split(':', 1)[1].strip()
-elif line.startswith('PE:'):
-pe = line.split(':', 1)[1].strip()
-elif line.startswith('PR:'):
-pr = line.split(':', 1)[1].strip()
-elif line.startswith('PKGSIZE'):
-pkg_size = line.split(':', 1)[1].strip()
-if pkge:
-pkg_version = pkge + ":" + pkg_version
-if pkgr:
-pkg_version = pkg_version + "-" + pkgr
-if pe:
-recipe_version = pe + ":" + recipe_version
-if pr:
-recipe_version = recipe_version + "-" + pr
+for var in vars:
+m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line)
+if m:
+vals[var] = m.group(1)
+pkg_version = vals['PKGV'] or ''
+recipe = vals['PN'] or ''
+recipe_version = vals['PV'] or ''
+pkg_size = vals['PKGSIZE'] or ''
+if 'PKGE' in vals:
+pkg_version = vals['PKGE'] + ":" + pkg_version
+if 'PKGR' in vals:
+pkg_version = pkg_version + "-" + vals['PKGR']
+if 'PE' in vals:
+recipe_version = vals['PE'] + ":" + recipe_version
+if 'PR' in vals:
+recipe_version = recipe_version + "-" + vals['PR']
 print("%s %s %s %s %s" % (pkg, pkg_version, recipe, 
recipe_version, pkg_size))
 
 # Handle both multiple arguments and multiple values within an arg (old 
syntax)
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] oe-pkgdata-util: Make parse_pkgdatafile() support package suffixed vars

2018-06-02 Thread Peter Kjellerstedt
Support for variables suffixed with package names, e.g., PKGV_foo, was
removed in commit d48c2c6f, which broke support for recipes that set
other versions on their packages than what is in ${PV}.

Signed-off-by: Peter Kjellerstedt 
---
 scripts/oe-pkgdata-util | 46 ++
 1 file changed, 18 insertions(+), 28 deletions(-)

diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index aea8a57516..965f473725 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -286,36 +286,26 @@ def lookup_recipe(args):
 
 def package_info(args):
 def parse_pkgdatafile(pkgdatafile):
+vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE']
 with open(pkgdatafile, 'r') as f:
-pkge = ''
-pkgr = ''
-pe = ''
-pr = ''
+vals = dict()
 for line in f:
-if line.startswith('PKGV:'):
-pkg_version = line.split(':', 1)[1].strip()
-elif line.startswith('PKGE:'):
-pkge = line.split(':', 1)[1].strip()
-elif line.startswith('PKGR:'):
-pkgr = line.split(':', 1)[1].strip()
-elif line.startswith('PN:'):
-recipe = line.split(':', 1)[1].strip()
-elif line.startswith('PV:'):
-recipe_version = line.split(':', 1)[1].strip()
-elif line.startswith('PE:'):
-pe = line.split(':', 1)[1].strip()
-elif line.startswith('PR:'):
-pr = line.split(':', 1)[1].strip()
-elif line.startswith('PKGSIZE'):
-pkg_size = line.split(':', 1)[1].strip()
-if pkge:
-pkg_version = pkge + ":" + pkg_version
-if pkgr:
-pkg_version = pkg_version + "-" + pkgr
-if pe:
-recipe_version = pe + ":" + recipe_version
-if pr:
-recipe_version = recipe_version + "-" + pr
+for var in vars:
+m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line)
+if m:
+vals[var] = m.group(1)
+pkg_version = vals['PKGV'] or ''
+recipe = vals['PN'] or ''
+recipe_version = vals['PV'] or ''
+pkg_size = vals['PKGSIZE'] or ''
+if 'PKGE' in vals:
+pkg_version = vals['PKGE'] + ":" + pkg_version
+if 'PKGR' in vals:
+pkg_version = pkg_version + "-" + vals['PKGR']
+if 'PE' in vals:
+recipe_version = vals['PE'] + ":" + recipe_version
+if 'PR' in vals:
+recipe_version = recipe_version + "-" + vals['PR']
 print("%s %s %s %s %s" % (pkg, pkg_version, recipe, 
recipe_version, pkg_size))
 
 # Handle both multiple arguments and multiple values within an arg (old 
syntax)
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] oe-pkgdata-util: package-info: Re-add support for the --extra option

2018-06-02 Thread Peter Kjellerstedt
Commit 64d3ce83 broke the --extra option.

Signed-off-by: Peter Kjellerstedt 
---
 scripts/oe-pkgdata-util | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index 965f473725..bd12047ea5 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -287,8 +287,11 @@ def lookup_recipe(args):
 def package_info(args):
 def parse_pkgdatafile(pkgdatafile):
 vars = ['PKGV', 'PKGE', 'PKGR', 'PN', 'PV', 'PE', 'PR', 'PKGSIZE']
+if args.extra:
+vars += args.extra
 with open(pkgdatafile, 'r') as f:
 vals = dict()
+extra = ''
 for line in f:
 for var in vars:
 m = re.match(var + '(?:_\S+)?:\s*(.+?)\s*$', line)
@@ -306,7 +309,12 @@ def package_info(args):
 recipe_version = vals['PE'] + ":" + recipe_version
 if 'PR' in vals:
 recipe_version = recipe_version + "-" + vals['PR']
-print("%s %s %s %s %s" % (pkg, pkg_version, recipe, 
recipe_version, pkg_size))
+if args.extra:
+for var in args.extra:
+if var in vals:
+val = re.sub(r'\s+', ' ', vals[var])
+extra += ' "%s"' % val
+print("%s %s %s %s %s%s" % (pkg, pkg_version, recipe, 
recipe_version, pkg_size, extra))
 
 # Handle both multiple arguments and multiple values within an arg (old 
syntax)
 packages = []
-- 
2.12.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] [meta] dbus: Fix X11 compille errors

2018-06-02 Thread Alistair Francis
On Fri, Jun 1, 2018 at 10:06 PM, Alexander Kanavin
 wrote:
> Wait, why is this problem not seen by anyone else, particularly on the
> autobuilder? Can you provide the failure log please?

That is a good question.

I'll attach the logs when I'm back at work on Monday. I am building
for RISC-V which is probably why I see it when others don't.

Alistair

>
> And do the same for the other patch to atk.
>
> Alex
>
> 2018-06-02 1:14 GMT+03:00 Alistair Francis :
>> When building with X11 set in DISTRO_FEATURES we need to specify that we
>> depend on X11 native for building dbus. Otherwise we see missing include
>> file compile errors.
>>
>> Signed-off-by: Alistair Francis 
>> ---
>>  meta/recipes-core/dbus/dbus_1.12.8.bb | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/recipes-core/dbus/dbus_1.12.8.bb 
>> b/meta/recipes-core/dbus/dbus_1.12.8.bb
>> index b3ddaafab5..40868628f6 100644
>> --- a/meta/recipes-core/dbus/dbus_1.12.8.bb
>> +++ b/meta/recipes-core/dbus/dbus_1.12.8.bb
>> @@ -6,6 +6,7 @@ LICENSE = "AFL-2 | GPLv2+"
>>  LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
>>  
>> file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
>>  DEPENDS = "expat virtual/libintl autoconf-archive"
>> +DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'libx11-native', 
>> '', d)}"
>>  RDEPENDS_dbus_class-native = ""
>>  RDEPENDS_dbus_class-nativesdk = ""
>>  PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 
>> '${PN}-ptest', '', d)}"
>> --
>> 2.17.0
>>
>> --
>> ___
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [meta-oe][PATCH 1/2] chrpath: fix SRC_URI

2018-06-02 Thread Oleksandr Kravchuk

On 02/06/18 07:24, Alexander Kanavin wrote:

2018-06-02 1:14 GMT+03:00 Oleksandr Kravchuk
:

-SRC_URI = 
"https://alioth.debian.org/frs/download.php/file/3979/chrpath-0.16.tar.gz \
+SRC_URI = 
"https://src.fedoraproject.org/lookaside/extras/chrpath/chrpath-0.16.tar.gz/2bf8d1d1ee345fc8a7915576f5649982/chrpath-0.16.tar.gz
 \
 file://standarddoc.patch"

It's better to stick with debian, the tarball is still available
through ${DEBIAN_MIRROR}:
http://http.debian.net/debian/pool/main/c/chrpath/chrpath_0.16.orig.tar.gz

Can you also investigate the other instances of alioth, namely shadow
and minicom please?

Alex


This is a subjective statement. Having mirrors is great, but having a 
working SRC_URI in the recipe and mirrors five times great: I have seen 
both original source and the mirror being inaccessible for a period of 
time multiple times.

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [meta-oe][PATCH 2/2] iso-codes: fix SRC_URI

2018-06-02 Thread Oleksandr Kravchuk

On 02/06/18 07:19, Alexander Kanavin wrote:

2018-06-02 1:14 GMT+03:00 Oleksandr Kravchuk
:

  SRC_URI = 
"https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz;
+SRC_URI = 
"https://ftp.osuosl.org/pub/blfs/conglomeration/iso-codes/iso-codes-${PV}.tar.xz;

The correct new URI is
https://salsa.debian.org/iso-codes-team/iso-codes, don't grab a random
ftp from google search results please.

Alex
It is not always easy to find "the new" official URI. I took the one 
that was around for a long time, not "a random ftp from google search 
results".


I will fix and resend the patch.
--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCHv2] systemd: fix build with gcc8

2018-06-02 Thread Martin Jansa
Signed-off-by: Martin Jansa 
---
 ...ild-with-gcc8-Werror-format-truncati.patch | 53 +++
 meta/recipes-core/systemd/systemd_237.bb  |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 
meta/recipes-core/systemd/systemd/0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch

diff --git 
a/meta/recipes-core/systemd/systemd/0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch
 
b/meta/recipes-core/systemd/systemd/0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch
new file mode 100644
index 00..fcc7c500ab
--- /dev/null
+++ 
b/meta/recipes-core/systemd/systemd/0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch
@@ -0,0 +1,53 @@
+From f9fd4546c25a15629544bc4642a74d7909cc0840 Mon Sep 17 00:00:00 2001
+From: Martin Jansa 
+Date: Fri, 1 Jun 2018 15:22:28 +
+Subject: [PATCH] time-util: fix build with gcc8 -Werror=format-truncation=
+
+* it fails with gcc8 when -O1 or -Os is used (and -ftree-vrp which is added by 
-O2 and higher isn't used)
+
+../git/src/basic/time-util.c: In function 'format_timespan':
+../git/src/basic/time-util.c:508:46: error: '%0*llu' directive output between 
1 and 2147483647 bytes may cause result to exceed 'INT_MAX' 
[-Werror=format-truncation=]
+  "%s"USEC_FMT".%0*"PRI_USEC"%s",
+  ^~~~
+../git/src/basic/time-util.c:508:60: note: format string is defined here
+  "%s"USEC_FMT".%0*"PRI_USEC"%s",
+../git/src/basic/time-util.c:508:46: note: directive argument in the range [0, 
18446744073709551614]
+  "%s"USEC_FMT".%0*"PRI_USEC"%s",
+  ^~~~
+../git/src/basic/time-util.c:507:37: note: 'snprintf' output 4 or more bytes 
(assuming 2147483651) into a destination of size 4294967295
+ k = snprintf(p, l,
+ ^~
+  "%s"USEC_FMT".%0*"PRI_USEC"%s",
+  ~~~
+  p > buf ? " " : "",
+  ~~~
+  a,
+  ~~
+  j,
+  ~~
+  b,
+  ~~
+  table[i].suffix);
+  
+cc1: some warnings being treated as errors
+
+Upstream-Status: Submitted https://github.com/systemd/systemd/pull/9156
+
+Signed-off-by: Martin Jansa 
+---
+ src/basic/time-util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/basic/time-util.c b/src/basic/time-util.c
+index 0601d4fa9..db5a9cd78 100644
+--- a/src/basic/time-util.c
 b/src/basic/time-util.c
+@@ -484,7 +484,7 @@ char *format_timespan(char *buf, size_t l, usec_t t, 
usec_t accuracy) {
+ /* Let's see if we should shows this in dot notation */
+ if (t < USEC_PER_MINUTE && b > 0) {
+ usec_t cc;
+-int j;
++signed char j;
+ 
+ j = 0;
+ for (cc = table[i].usec; cc > 1; cc /= 10)
diff --git a/meta/recipes-core/systemd/systemd_237.bb 
b/meta/recipes-core/systemd/systemd_237.bb
index 2e6558ded1..0113c2dc72 100644
--- a/meta/recipes-core/systemd/systemd_237.bb
+++ b/meta/recipes-core/systemd/systemd_237.bb
@@ -54,6 +54,7 @@ SRC_URI += "file://touchscreen.rules \
file://libmount.patch \

file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \

file://0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
+   
file://0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch \
"
 SRC_URI_append_qemuall = " 
file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
 
-- 
2.17.0

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] systemd: fix build with gcc8

2018-06-02 Thread Martin Jansa
I'm surprised that this is reproducible with gcc7 used in Sumo.

Khem suggested to use signed char instead, the pull-request in upstream was
updated with signed char as well:
https://github.com/systemd/systemd/pull/9156

I'll send v2.

On Sat, Jun 2, 2018 at 4:03 AM akuster808  wrote:

>
>
> On 06/01/2018 08:42 AM, Martin Jansa wrote:
> > Signed-off-by: Martin Jansa 
> > ---
> >  ...ild-with-gcc8-Werror-format-truncati.patch | 53 +++
> >  meta/recipes-core/systemd/systemd_237.bb  |  1 +
> >  2 files changed, 54 insertions(+)
>
> I am seeing this same issue in Sumo and I have applied this patch.  Its
> currently running a test build.
> - armin
> >  create mode 100644
> meta/recipes-core/systemd/systemd/0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch
> >
> > diff --git
> a/meta/recipes-core/systemd/systemd/0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch
> b/meta/recipes-core/systemd/systemd/0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch
> > new file mode 100644
> > index 00..e44f431073
> > --- /dev/null
> > +++
> b/meta/recipes-core/systemd/systemd/0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch
> > @@ -0,0 +1,53 @@
> > +From f9fd4546c25a15629544bc4642a74d7909cc0840 Mon Sep 17 00:00:00 2001
> > +From: Martin Jansa 
> > +Date: Fri, 1 Jun 2018 15:22:28 +
> > +Subject: [PATCH] time-util: fix build with gcc8
> -Werror=format-truncation=
> > +
> > +* it fails with gcc8 when -O1 or -Os is used (and -ftree-vrp which is
> added by -O2 and higher isn't used)
> > +
> > +../git/src/basic/time-util.c: In function 'format_timespan':
> > +../git/src/basic/time-util.c:508:46: error: '%0*llu' directive output
> between 1 and 2147483647 bytes may cause result to exceed 'INT_MAX'
> [-Werror=format-truncation=]
> > +
> "%s"USEC_FMT".%0*"PRI_USEC"%s",
> > +  ^~~~
> > +../git/src/basic/time-util.c:508:60: note: format string is defined here
> > +
> "%s"USEC_FMT".%0*"PRI_USEC"%s",
> > +../git/src/basic/time-util.c:508:46: note: directive argument in the
> range [0, 18446744073709551614]
> > +
> "%s"USEC_FMT".%0*"PRI_USEC"%s",
> > +  ^~~~
> > +../git/src/basic/time-util.c:507:37: note: 'snprintf' output 4 or more
> bytes (assuming 2147483651) into a destination of size 4294967295
> > + k = snprintf(p, l,
> > + ^~
> > +
> "%s"USEC_FMT".%0*"PRI_USEC"%s",
> > +
> ~~~
> > +  p > buf ? " " : "",
> > +  ~~~
> > +  a,
> > +  ~~
> > +  j,
> > +  ~~
> > +  b,
> > +  ~~
> > +  table[i].suffix);
> > +  
> > +cc1: some warnings being treated as errors
> > +
> > +Upstream-Status: Submitted https://github.com/systemd/systemd/pull/9156
> > +
> > +Signed-off-by: Martin Jansa 
> > +---
> > + src/basic/time-util.c | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/src/basic/time-util.c b/src/basic/time-util.c
> > +index 0601d4fa9..db5a9cd78 100644
> > +--- a/src/basic/time-util.c
> >  b/src/basic/time-util.c
> > +@@ -484,7 +484,7 @@ char *format_timespan(char *buf, size_t l, usec_t
> t, usec_t accuracy) {
> > + /* Let's see if we should shows this in dot notation */
> > + if (t < USEC_PER_MINUTE && b > 0) {
> > + usec_t cc;
> > +-int j;
> > ++char j;
> > +
> > + j = 0;
> > + for (cc = table[i].usec; cc > 1; cc /= 10)
> > diff --git a/meta/recipes-core/systemd/systemd_237.bb
> b/meta/recipes-core/systemd/systemd_237.bb
> > index 2e6558ded1..0113c2dc72 100644
> > --- a/meta/recipes-core/systemd/systemd_237.bb
> > +++ b/meta/recipes-core/systemd/systemd_237.bb
> > @@ -54,6 +54,7 @@ SRC_URI += "file://touchscreen.rules \
> > file://libmount.patch \
> >
>  file://0034-Fix-format-truncation-compile-failure-by-typecasting.patch \
> >
>  file://0035-Define-glibc-compatible-basename-for-non-glibc-syste.patch \
> > +
>  file://0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch \
> > "
> >  SRC_URI_append_qemuall = "
> file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
> >
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core