Re: [yocto] bitbake SRC_URI fetch Azure DevOps repository Azure DevOps Services Basic

2019-11-13 Thread Richard Purdie
On Wed, 2019-11-13 at 03:06 +, Samuel Jiang (江騏先) wrote:
> I try use 
> SRC_URI = "git://quanta01@vs-
> ssh.visualstudio.com/v3/quanta01/OpenBMC/crashdump;protocol=ssh;nobra
> nch=1"
> 
> the bitbake response below error message:
>  git -c core.fsyncobjectfiles=0 ls-remote 
> ssh://quant...@vs-ssh.visualstudio.com:v3/quanta01/OpenBMC/crashdump
>   failed with exit code 128, output:
> 
> ssh: Could not resolve hostname vs-ssh.visualstudio.com:v3: Name or 
>  service not known
> fatal: Could not read from remote repository.
> 
> I discussed with Microsoft support team,
> the Azure DevOps support SSH url clone without [ ssh:// ] prefix,
> like below:
> git -c core.fsyncobjectfiles=0 ls-remote 
> quant...@vs-ssh.visualstudio.com:v3/quanta01/OpenBMC/crashdump
> 
> Does bitbake support git SRC_URI without any prefix or need extra
> with Azure SSH protocol support it?

Have you tried:

SRC_URI = 
"git://quant...@vs-ssh.visualstudio.com/v3/quanta01/OpenBMC/crashdump;protocol=git;nobranch=1"

(changing protocol to git)
?

Cheers,

Richard

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] No Package Provides /bin/awk

2019-11-13 Thread Adrian Bunk
On Tue, Nov 12, 2019 at 04:08:48PM -0600, Wayne Li wrote:
> Dear Yocto Developers,
> 
> I'm trying to to build a Yocto kernel for a T4240 RDB.  When I run "bitbake
> fsl-image-full" to build the entire linux image, I get an error that says
> "Can't install kernel-devsrc-1.0-r0@t4240rdb_64b: no package provides
> /bin/awk".  Here's the entire error print that I see:
> 
> https://gist.github.com/WayneZhenLi/e35f65081092cf1f24df29ec369c701c
> 
> Anyway I'm confused about this error because /bin/awk does exist.  Like if
> I run "/bin/awk" in the console I see help info come up describing how to
> use a program called "gawk".  Why can't bitbake find /bin/awk then?  Or am
> I misunderstanding what this error is trying to say?  I mean I'm assuming
> it's just not able to find /bin/awk but maybe the error means something
> else?  Or maybe /bin/awk is actually relative to some path?  Let me know
> your thoughts.

/bin/awk is missing on your target image that will run on the T4240 RDB.

The smallest implementation is to enable CONFIG_AWK in your busybox config.

> -Thanks!, Wayne Li

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] bitbake SRC_URI fetch Azure DevOps repository Azure DevOps Services Basic

2019-11-13 Thread 江騏先
I got below error message:
crashdump-git-r0 do_fetch: Fetcher failure: Fetch command export 
PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export 
DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export 
SSH_AGENT_PID="2255"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export 
PATH="[private_data]"; export HOME="/home/samueljiang";
git -c core.fsyncobjectfiles=0 ls-remote 
git://quanta01.visualstudio.com/OpenBMC/_git/crashdump  failed with exit code 
128, output:
fatal: unable to connect to quanta01.visualstudio.com:
quanta01.visualstudio.com[0: 2620:1ec:21::18]: errno=Network is unreachable
quanta01.visualstudio.com[1: 13.107.42.18]: errno=Connection timed out

Seems this url with git:// prefix could not connect in Azure DevOps 

Document[https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops].

Thanks,
Samuel Jiang


-Original Message-
From: Richard Purdie  
Sent: Wednesday, November 13, 2019 4:10 PM
To: Samuel Jiang (江騏先) ; yocto@yoctoproject.org
Cc: Alex Chong 
Subject: Re: [yocto] bitbake SRC_URI fetch Azure DevOps repository Azure DevOps 
Services Basic

On Wed, 2019-11-13 at 03:06 +, Samuel Jiang (江騏先) wrote:
> I try use
> SRC_URI = "git://quanta01@vs-
> ssh.visualstudio.com/v3/quanta01/OpenBMC/crashdump;protocol=ssh;nobra
> nch=1"
> 
> the bitbake response below error message:
>  git -c core.fsyncobjectfiles=0 ls-remote 
> ssh://quant...@vs-ssh.visualstudio.com:v3/quanta01/OpenBMC/crashdump
>   failed with exit code 128, output:
> 
> ssh: Could not resolve hostname vs-ssh.visualstudio.com:v3: Name or  
> service not known
> fatal: Could not read from remote repository.
> 
> I discussed with Microsoft support team, the Azure DevOps support SSH 
> url clone without [ ssh:// ] prefix, like below:
> git -c core.fsyncobjectfiles=0 ls-remote 
> quant...@vs-ssh.visualstudio.com:v3/quanta01/OpenBMC/crashdump
> 
> Does bitbake support git SRC_URI without any prefix or need extra with 
> Azure SSH protocol support it?

Have you tried:

SRC_URI = 
"git://quant...@vs-ssh.visualstudio.com/v3/quanta01/OpenBMC/crashdump;protocol=git;nobranch=1"

(changing protocol to git)
?

Cheers,

Richard

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [error-report-web][PATCH V2] Add local.conf and auto.conf into error details

2019-11-13 Thread Paul Eggleton
Hi Changqing,

Some comments below.

On Tuesday, 12 November 2019 9:32:53 PM NZDT changqing...@windriver.com wrote:
> From: Changqing Li 
> 
> Support to display local.conf and auto.conf on error report web.
> Here is commit in oe-core, which add local.conf/auto.conf into error report
> https://git.openembedded.org/openembedded-core/commit/?id=7adf9707c04d8ef6bcd8d8bda555687f705e6ee6
> 
> This commit is related to YOCTO #13252
> 
> Signed-off-by: Changqing Li 
> ---
>  Post/0006_auto_20190917_0419.py | 24 
>  Post/models.py  |  2 ++
>  Post/parser.py  |  2 ++
>  Post/test.py|  2 ++
>  templates/error-details.html| 10 ++
>  test-data/test-payload.json |  4 +++-
>  6 files changed, 43 insertions(+), 1 deletion(-)
>  create mode 100644 Post/0006_auto_20190917_0419.py
> 
> diff --git a/Post/0006_auto_20190917_0419.py b/Post/0006_auto_20190917_0419.py
> new file mode 100644
> index 000..827944e
> --- /dev/null
> +++ b/Post/0006_auto_20190917_0419.py

Could you please give the migration a proper name (-n option to makemigrations) 
e.g. local_conf_auto_conf

> --- a/Post/models.py
> +++ b/Post/models.py
> @@ -43,6 +43,8 @@ class Build(models.Model):
>  LINK_BACK = models.TextField(max_length=300, blank=True, null=True)
>  ERROR_TYPE = models.CharField(max_length=20, choices=ERROR_TYPE_CHOICES,
>default=ErrorType.RECIPE)
> +LOCAL_CONF = models.TextField(max_length=int(settings.MAX_UPLOAD_SIZE), 
> default="")
> +AUTO_CONF = models.TextField(max_length=int(settings.MAX_UPLOAD_SIZE), 
> default="")

I'm not sure this is practical, for two reasons:

1) Field sizes should not be variable like this; changing the MAX_UPLOAD_SIZE 
value after the fact would not change the database structure
2) The value could never actually reach MAX_UPLOAD_SIZE because the overhead of 
the surrounding JSON would block it from being uploaded if it did

However, since this is a TextField we don't actually have to specify a 
max_length (for a TextField max_length only actually affects the frontend, and 
we don't expose this field in a form) so it can just be removed.

Another thing, instead of default="" you should use blank=True.


> +{% if detail.BUILD.LOCAL_CONF != "" %}
> +Local Conf:
> +{{ detail.BUILD.LOCAL_CONF | safe 
> }}
> +{% endif %}
> +
> +{% if detail.BUILD.AUTO_CONF != "" %}
> +Auto Conf:
> +{{ detail.BUILD.AUTO_CONF | safe 
> }}
> +{% endif %}

We cannot use the safe filter here - doing so could open up an XSS 
vulnerability, since anyone can upload anything to the error-report application 
and the content could include links or other malicious HTML data. We should 
allow it to be auto-escaped. Is there a particular issue you were using this to 
solve?

Cheers
Paul

-- 

Paul Eggleton
Intel System Software Products


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] puzzle: simple recipe gets image dependencies

2019-11-13 Thread Vladimir Molokov
Hi all,

Here is a strange dependency puzzle:
simple recipe which doesn't inherit image class
gets EXTRA-IMAGEDENDS, kernel, initramfs and so on.

It's reproducible on latest poky,
I've made a minimal example, all lines are important,
if you remove something, like systemd or attr
it drops all the dependencies
though I didn't find anything wrong in systemd nor in attr recipes.

Steps to reproduce:

1. mkdir puzzle && cd puzzle
1. git clone git://git.yoctoproject.org/poky
2. source poky/oe-init-build-env
3. bitbake-layers create-layer meta-puzzle
4. bitbake-layers add-layer meta-puzzle
5. cp meta-puzzle/recipes-example/example/example_0.1.bb \
   meta-puzzle/recipes-example/example/bad-example_0.1.bb

6. mkdir -p meta-puzzle/conf/distro

7. printf "require conf/distro/poky.conf\n\n\
DISTRO = \"extra-img-dep-test\" \n\
DISTRO_NAME = \"Extra image dependency test\"\n\
DISTRO_VERSION = \"0.1\"\n\n\
DISTRO_FEATURES_append = \"systemd\"\n"\
> meta-puzzle/conf/distro/extra-img-dep-test.conf

7. printf "MACHINE ?= \"qemux86\"\n\
DISTRO ?= \"extra-img-dep-test\"\n\n\
EXTRA_IMAGEDEPENDS += \"bad-example\"\n\n\
INITRAMFS_IMAGE = \"core-image-minimal\"\n"\
> conf/local.conf

8. echo 'DEPENDS = "attr"' >> \
   meta-puzzle/recipes-example/example/example_0.1.bb

9. bitbake -g example && grep bad-example task-depends.dot

10. see dependencies on 'bad-example'..

Will be very grateful if anybody point out
what is wrong with this setup.

I've talked with people struggling with similar problem
and nobody was able to solve it so far
and I myself stumbled in it in a couple of projects.

BR,
Vladimir.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Yocto/bitbake recipe 'diff test'?

2019-11-13 Thread Brad Bishop


> On Nov 12, 2019, at 1:41 PM, Paul Barker  wrote:
> 
> have a look at my slides at the start of the Day 1 slide deck at 
> https://wiki.yoctoproject.org/wiki/YP_Summit_Lyon_2019.

This is a great resource for layer best practices.  Thanks Paul!

-brad
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] pkg-config not found

2019-11-13 Thread Ross Burton

On 12/11/2019 21:06, Mark Hawthorne wrote:

I have an autotools build that uses the following autoconfig file:

AC_INIT([my-program], [1])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_LANG(C++)
AC_PROG_CXX
AX_PTHREAD()
PKG_CHECK_MODULES(LIBPNG, libpng >= 1.6.34)
PKG_CHECK_MODULES(FREETYPE2, freetype2 >= 21.0.15)
PKG_CHECK_MODULES(EGL, egl > 0)
PKG_CHECK_MODULES(GLES2, glesv2 > 0)
PKG_CHECK_MODULES(GLM, glm >= 0.9.9)
PKG_CHECK_MODULES(SPATIALITE, spatialite >= 4.3.0)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT


I have made the following bitbake recipe file


SUMMARY = "my program"
HOMEPAGE = ""
DESCRIPTION = ""
LICENSE = "MIT"
LIC_FILES_CHKSUM = 
"file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"


SRC_URI = "git://u...@bitbucket.org/user/myrepo.git 
"


SRCREV = "dc1391dbc82702fd0126d4156d4ab59571427efe"

DEPENDS_${PN} = "libpng freetype glm libegl libgles2 libspatialite"

S = "${WORKDIR}/git"

inherit pkgconfig autotools


The build fails with this error:

configure: error: in 
`/home/user/Documents/tisdk/build/arago-tmp-external-arm-toolchain/work/armv7at2hf-neon-linux-gnueabi/my-program/1.0-r0/build':
configure: error: The pkg-config script could not be found or is too 
old.  Make sure it is in your PATH or set the PKG_CONFIG environment 
variable to the full path to pkg-config.


Alternatively, you may set the environment variables LIBPNG_CFLAGS and 
LIBPNG_LIBS to avoid the need to call pkg-config.




That *should* work.  The config.log in the build directory might have 
more useful information.


Ross
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] bitbake -c populate_sdk generates locale error

2019-11-13 Thread Matt Schepers
Hi,

When I run 'bitbake  -c populate_sdk' I get an error about the locale 
not being found. I have tried setting the locale in local.conf but that didn't 
seem to help. The odd thing is that 'bitbake ' works just fine.

Respectfully,
Matt Schepers

ERROR: telspan-dh3-1.0-r0 do_populate_sdk: Error executing a python function in 
exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: 
 0001:
 *** 0002:do_populate_sdk(d)
 0003:
File: 
'/home/mschepers/dh3_yocto/yocto/build/../meta/poky/meta/classes/populate_sdk_base.bbclass',
 lineno: 152, function: do_populate_sdk
 0148:
 0149:populate_sdk(d)
 0150:
 0151:fakeroot python do_populate_sdk() {
 *** 0152:populate_sdk_common(d)
 0153:}
 0154:SSTATETASKS += "do_populate_sdk"
 0155:SSTATE_SKIP_CREATION_task-populate-sdk = '1'
 0156:do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
 
 
 
File: '/home/mschepers/dh3_yocto/yocto/build/../meta/poky/meta/lib/oe/sdk.py', 
lineno: 45, function: generate_locale_archive
 0041:# Need to set this so cross-localedef knows where the archive is
 0042:env = dict(os.environ)
 0043:env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-archive")
 0044:
 *** 0045:for name in os.listdir(localedir):
 0046:path = os.path.join(localedir, name)
 0047:if os.path.isdir(path):
 0048:try:
 0049:cmd = ["cross-localedef", "--verbose"]
Exception: FileNotFoundError: [Errno 2] No such file or directory: 
'/home/mschepers/dh3_yocto/yocto/build/tmp/work/dh3a10-poky-linux-gnueabi/telspan-dh3/1.0-r0/sdk/image/opt/poky/2.5.2/sysroots/x86_64-telspan-linux/usr/lib/locale'

ERROR: telspan-dh3-1.0-r0 do_populate_sdk: Function failed: do_populate_sdk
ERROR: Logfile of failure stored in: 
/home/mschepers/dh3_yocto/yocto/build/tmp/work/dh3a10-poky-linux-gnueabi/telspan-dh3/1.0-r0/temp/log.do_populate_sdk.27826
ERROR: Task 
(/home/mschepers/dh3_yocto/yocto/build/../meta/meta-telspan/recipes-core/images/telspan-dh3.bb:do_populate_sdk)
 failed with exit code '1'
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] puzzle: simple recipe gets image dependencies

2019-11-13 Thread Khem Raj
On Wed, 2019-11-13 at 12:33 +0100, Vladimir Molokov wrote:
> Hi all,
> 
> 
> 
> Here is a strange dependency puzzle:
> 
> simple recipe which doesn't inherit image class
> 
> gets EXTRA-IMAGEDENDS, kernel, initramfs and so on.
> 
> 
> 
> It's reproducible on latest poky,
> 
> I've made a minimal example, all lines are important,
> 
> if you remove something, like systemd or attr
> 
> it drops all the dependencies
> 
> though I didn't find anything wrong in systemd nor in attr recipes.
> 
> 
> 
> Steps to reproduce:
> 
> 
> 
> 1. mkdir puzzle && cd puzzle
> 
> 1. git clone git://git.yoctoproject.org/poky
> 
> 2. source poky/oe-init-build-env
> 
> 3. bitbake-layers create-layer meta-puzzle
> 
> 4. bitbake-layers add-layer meta-puzzle
> 
> 5. cp meta-puzzle/recipes-example/example/example_0.1.bb \
> 
>meta-puzzle/recipes-example/example/bad-example_0.1.bb
> 
> 
> 
> 6. mkdir -p meta-puzzle/conf/distro
> 
> 
> 
> 7. printf "require conf/distro/poky.conf\n\n\
> 
> DISTRO = \"extra-img-dep-test\" \n\
> 
> DISTRO_NAME = \"Extra image dependency test\"\n\
> 
> DISTRO_VERSION = \"0.1\"\n\n\
> 
> DISTRO_FEATURES_append = \"systemd\"\n"\
> 
> > meta-puzzle/conf/distro/extra-img-dep-test.conf
> 
> 
> 
> 7. printf "MACHINE ?= \"qemux86\"\n\
> 
> DISTRO ?= \"extra-img-dep-test\"\n\n\
> 
> EXTRA_IMAGEDEPENDS += \"bad-example\"\n\n\
> 
> INITRAMFS_IMAGE = \"core-image-minimal\"\n"\
> 
> > conf/local.conf
> 
> 
> 
> 8. echo 'DEPENDS = "attr"' >> \
> 
>meta-puzzle/recipes-example/example/example_0.1.bb
> 
> 
> 
> 9. bitbake -g example && grep bad-example task-depends.dot

can you share this dot file ?
> 
> 10. see dependencies on 'bad-example'..
> 
> 
> 
> Will be very grateful if anybody point out
> 
> what is wrong with this setup.
> 
> 
> 
> I've talked with people struggling with similar problem
> 
> and nobody was able to solve it so far
> 
> and I myself stumbled in it in a couple of projects.
> 
> 
> 
> BR,
> 
> Vladimir.
> 
> 
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] No Package Provides /bin/awk

2019-11-13 Thread Khem Raj
On Wed, 2019-11-13 at 10:33 +0200, Adrian Bunk wrote:
> On Tue, Nov 12, 2019 at 04:08:48PM -0600, Wayne Li wrote:
> > Dear Yocto Developers,
> > 
> > I'm trying to to build a Yocto kernel for a T4240 RDB.  When I run
> > "bitbake
> > fsl-image-full" to build the entire linux image, I get an error
> > that says
> > "Can't install kernel-devsrc-1.0-r0@t4240rdb_64b: no package
> > provides
> > /bin/awk".  Here's the entire error print that I see:
> > 
> > https://gist.github.com/WayneZhenLi/e35f65081092cf1f24df29ec369c701c
> > 
> > Anyway I'm confused about this error because /bin/awk does
> > exist.  Like if
> > I run "/bin/awk" in the console I see help info come up describing
> > how to
> > use a program called "gawk".  Why can't bitbake find /bin/awk
> > then?  Or am
> > I misunderstanding what this error is trying to say?  I mean I'm
> > assuming
> > it's just not able to find /bin/awk but maybe the error means
> > something
> > else?  Or maybe /bin/awk is actually relative to some path?  Let me
> > know
> > your thoughts.
> 
> /bin/awk is missing on your target image that will run on the T4240
> RDB.
> 
> The smallest implementation is to enable CONFIG_AWK in your busybox
> config.
> 

import something like below patch into your kernel will help too

https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/commit/?id=8af11c1cdd8fa08217e702b57cf96e9030db52b2

> > -Thanks!, Wayne Li
> 
> cu
> Adrian
> 
> -- 
> 
>"Is there not promise of rain?" Ling Tan asked suddenly out
> of the darkness. There had been need of rain for many days.
>"Only a promise," Lao Er said.
>Pearl S. Buck - Dragon Seed
> 

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] bitbake -c populate_sdk generates locale error

2019-11-13 Thread Khem Raj
On Wed, 2019-11-13 at 16:12 +, Matt Schepers wrote:
> Hi,
> 
> When I run 'bitbake  -c populate_sdk' I get an error about the
> locale not being found. I have tried setting the locale in local.conf
> but that didn't seem to help. The odd thing is that 'bitbake '
> works just fine.
> 
> Respectfully,
> Matt Schepers
> 
> ERROR: telspan-dh3-1.0-r0 do_populate_sdk: Error executing a python
> function in exec_python_func() autogenerated:
> 
> The stack trace of python calls that resulted in this
> exception/failure was:
> File: 'exec_python_func() autogenerated', lineno: 2, function:
> 
>  0001:
>  *** 0002:do_populate_sdk(d)
>  0003:
> File:
> '/home/mschepers/dh3_yocto/yocto/build/../meta/poky/meta/classes/popu
> late_sdk_base.bbclass', lineno: 152, function: do_populate_sdk
>  0148:
>  0149:populate_sdk(d)
>  0150:
>  0151:fakeroot python do_populate_sdk() {
>  *** 0152:populate_sdk_common(d)
>  0153:}
>  0154:SSTATETASKS += "do_populate_sdk"
>  0155:SSTATE_SKIP_CREATION_task-populate-sdk = '1'
>  0156:do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
>  
>  
>  
> File:
> '/home/mschepers/dh3_yocto/yocto/build/../meta/poky/meta/lib/oe/sdk.p
> y', lineno: 45, function: generate_locale_archive
>  0041:# Need to set this so cross-localedef knows where the
> archive is
>  0042:env = dict(os.environ)
>  0043:env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-
> archive")
>  0044:
>  *** 0045:for name in os.listdir(localedir):
>  0046:path = os.path.join(localedir, name)
>  0047:if os.path.isdir(path):
>  0048:try:
>  0049:cmd = ["cross-localedef", "--verbose"]
> Exception: FileNotFoundError: [Errno 2] No such file or directory:
> '/home/mschepers/dh3_yocto/yocto/build/tmp/work/dh3a10-poky-linux-
> gnueabi/telspan-dh3/1.0-r0/sdk/image/opt/poky/2.5.2/sysroots/x86_64-
> telspan-linux/usr/lib/locale'
> 

this means the locales on sdk host are not installed properly, so
perhaps just renstalling locales on SDK host might help. since you seem
to be on 2.5 release check if you have nativesdk-glibc recipe
available, if you do then perhaps adding something like 

SDK_DEPENDS += "nativesdk-glibc-locale"

in local.conf or preferably meta/classes/populate_sdk_base.bbclass
might help. But I must also note that a bit of work has gone into SDK
host locale issue since 2.5 release so you might have to do a bit of
digging to see needed patches to get it going on 2.5

> ERROR: telspan-dh3-1.0-r0 do_populate_sdk: Function failed:
> do_populate_sdk
> ERROR: Logfile of failure stored in:
> /home/mschepers/dh3_yocto/yocto/build/tmp/work/dh3a10-poky-linux-
> gnueabi/telspan-dh3/1.0-r0/temp/log.do_populate_sdk.27826
> ERROR: Task (/home/mschepers/dh3_yocto/yocto/build/../meta/meta-
> telspan/recipes-core/images/telspan-dh3.bb:do_populate_sdk) failed
> with exit code '1'

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] bitbake -c populate_sdk generates locale error

2019-11-13 Thread Matt Schepers
Khem,

Thank you, but that didn't work. However I have found a fix: I had 
'SDK_VENDOR="telspan"' set in the image recipe. When I removed this line yocto 
now builds an SDK. I have no idea why this was causing a problem, it was 
working previously. 

Thanks for reaching out to me!


From: Khem Raj 
Sent: Wednesday, November 13, 2019 10:05 AM
To: Matt Schepers; yocto@yoctoproject.org
Subject: Re: [yocto] bitbake  -c populate_sdk generates locale error

On Wed, 2019-11-13 at 16:12 +, Matt Schepers wrote:
> Hi,
>
> When I run 'bitbake  -c populate_sdk' I get an error about the
> locale not being found. I have tried setting the locale in local.conf
> but that didn't seem to help. The odd thing is that 'bitbake '
> works just fine.
>
> Respectfully,
> Matt Schepers
>
> ERROR: telspan-dh3-1.0-r0 do_populate_sdk: Error executing a python
> function in exec_python_func() autogenerated:
>
> The stack trace of python calls that resulted in this
> exception/failure was:
> File: 'exec_python_func() autogenerated', lineno: 2, function:
> 
>  0001:
>  *** 0002:do_populate_sdk(d)
>  0003:
> File:
> '/home/mschepers/dh3_yocto/yocto/build/../meta/poky/meta/classes/popu
> late_sdk_base.bbclass', lineno: 152, function: do_populate_sdk
>  0148:
>  0149:populate_sdk(d)
>  0150:
>  0151:fakeroot python do_populate_sdk() {
>  *** 0152:populate_sdk_common(d)
>  0153:}
>  0154:SSTATETASKS += "do_populate_sdk"
>  0155:SSTATE_SKIP_CREATION_task-populate-sdk = '1'
>  0156:do_populate_sdk[cleandirs] = "${SDKDEPLOYDIR}"
>  
>  
>  
> File:
> '/home/mschepers/dh3_yocto/yocto/build/../meta/poky/meta/lib/oe/sdk.p
> y', lineno: 45, function: generate_locale_archive
>  0041:# Need to set this so cross-localedef knows where the
> archive is
>  0042:env = dict(os.environ)
>  0043:env["LOCALEARCHIVE"] = oe.path.join(localedir, "locale-
> archive")
>  0044:
>  *** 0045:for name in os.listdir(localedir):
>  0046:path = os.path.join(localedir, name)
>  0047:if os.path.isdir(path):
>  0048:try:
>  0049:cmd = ["cross-localedef", "--verbose"]
> Exception: FileNotFoundError: [Errno 2] No such file or directory:
> '/home/mschepers/dh3_yocto/yocto/build/tmp/work/dh3a10-poky-linux-
> gnueabi/telspan-dh3/1.0-r0/sdk/image/opt/poky/2.5.2/sysroots/x86_64-
> telspan-linux/usr/lib/locale'
>

this means the locales on sdk host are not installed properly, so
perhaps just renstalling locales on SDK host might help. since you seem
to be on 2.5 release check if you have nativesdk-glibc recipe
available, if you do then perhaps adding something like

SDK_DEPENDS += "nativesdk-glibc-locale"

in local.conf or preferably meta/classes/populate_sdk_base.bbclass
might help. But I must also note that a bit of work has gone into SDK
host locale issue since 2.5 release so you might have to do a bit of
digging to see needed patches to get it going on 2.5

> ERROR: telspan-dh3-1.0-r0 do_populate_sdk: Function failed:
> do_populate_sdk
> ERROR: Logfile of failure stored in:
> /home/mschepers/dh3_yocto/yocto/build/tmp/work/dh3a10-poky-linux-
> gnueabi/telspan-dh3/1.0-r0/temp/log.do_populate_sdk.27826
> ERROR: Task (/home/mschepers/dh3_yocto/yocto/build/../meta/meta-
> telspan/recipes-core/images/telspan-dh3.bb:do_populate_sdk) failed
> with exit code '1'

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] pkg-config not found

2019-11-13 Thread Mark Hawthorne
I figured out the problem. The call to AX_PTHREAD() was breaking
PKG_PROG_PKG_CONFIG. I don't understand why, but it works once I remove
that line.

On Tue, Nov 12, 2019 at 8:24 PM Mark Hawthorne 
wrote:

> I added the lines you suggested and it indicates that PKG_CONFIG is not
> set. What would cause this to fail in the bitbake environment? It works for
> other packages such as pixman.
>
> On Tue, Nov 12, 2019 at 6:38 PM Khem Raj  wrote:
>
>> On Tue, Nov 12, 2019 at 4:29 PM Mark Hawthorne
>>  wrote:
>> >
>> > Khem,
>> >
>> > I found a recipe that you made a few years ago where you addressed this
>> problem:
>> >
>> >
>> http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-extended/boinc/boinc-client_7.12.bb
>> >
>> > You solved it by exporting PKG_CONFIG
>> >
>> > export PKG_CONFIG = "${STAGING_BINDIR_NATIVE}/pkg-config"
>> >
>> > This seems like it may be the incorrect way to do it and there needs to
>> be an update in the configure.ac file instead?
>>
>> in configure.ac you can add something like this
>>
>> PKG_PROG_PKG_CONFIG
>> if test -z "$PKG_CONFIG"; then
>>   AC_MSG_WARN([Cannot find pkg-config, make sure it is installed in your
>> PATH])
>> fi
>>
>> >
>> > On Tue, Nov 12, 2019 at 4:44 PM Mark Hawthorne <
>> markhawthorne...@gmail.com> wrote:
>> >>
>> >> No, it did not help
>> >>
>> >> It appears from the config.log file that the PKG_CONFIG variable never
>> gets set. I'm sorting through the bbclass files to figure out why this is
>> not getting set...
>> >>
>> >> PKG_CONFIG=''
>> >>
>> PKG_CONFIG_LIBDIR='/home/mark/Documents/tisdk/build/arago-tmp-external-arm-toolchain/work/armv7at2hf-neon-linux-gnueabi/myprogram/1.0-r0/recipe-sysroot/usr/lib/pkgconfig'
>> >>
>> PKG_CONFIG_PATH='/home/mark/Documents/tisdk/build/arago-tmp-external-arm-toolchain/work/armv7at2hf-neon-linux-gnueabi/myprogram/1.0-r0/recipe-sysroot/usr/lib/pkgconfig:/home/mark/Documents/tisdk/build/arago-tmp-external-arm-toolchain/work/armv7at2hf-neon-linux-gnueabi/myprogram/1.0-r0/recipe-sysroot/usr/share/pkgconfig'
>> >>
>> >> On Tue, Nov 12, 2019 at 4:22 PM Khem Raj  wrote:
>> >>>
>> >>> On Tue, Nov 12, 2019 at 2:00 PM Mark Hawthorne
>> >>>  wrote:
>> >>> >
>> >>> > Thank you. I have fixed this issue but the original pkg-config
>> error still persists.
>> >>> >
>> >>>
>> >>> do a clean build after above change
>> >>>
>> >>> bitbake -ccleanall 
>> >>> bitbake 
>> >>>
>> >>> does that help ?
>> >>>
>> >>> > On Tue, Nov 12, 2019 at 3:41 PM Adrian Bunk  wrote:
>> >>> >>
>> >>> >> On Tue, Nov 12, 2019 at 03:06:25PM -0600, Mark Hawthorne wrote:
>> >>> >> >...
>> >>> >> > DEPENDS_${PN} = "libpng freetype glm libegl libgles2
>> libspatialite"
>> >>> >> >...
>> >>> >>
>> >>> >> DEPENDS, not DEPENDS_${PN}
>> >>> >>
>> >>> >> cu
>> >>> >> Adrian
>> >>> >>
>> >>> >> --
>> >>> >>
>> >>> >>"Is there not promise of rain?" Ling Tan asked suddenly out
>> >>> >> of the darkness. There had been need of rain for many days.
>> >>> >>"Only a promise," Lao Er said.
>> >>> >>Pearl S. Buck - Dragon Seed
>> >>> >>
>> >>> > --
>> >>> > ___
>> >>> > yocto mailing list
>> >>> > yocto@yoctoproject.org
>> >>> > https://lists.yoctoproject.org/listinfo/yocto
>> >
>> > --
>> > ___
>> > yocto mailing list
>> > yocto@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>>
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] No Package Provides /bin/awk

2019-11-13 Thread Wayne Li
So after further investigation, I'm fairly sure awk is actually present in
the target image.  Here are my reasons why I feel that this is the case:

-I looked at the busybox menuconfig GUI that comes up when I run "bitbake
-c menuconfig busybox" and it says awk is built-in.
-I looked at various def-config files I found by just doing a "grep -rn
"CONFIG_AWK"" and found that CONFIG_AWK seems to have been enabled
throughout the project (there was the line CONFIG_AWK=y uncommented in the
various def-config files I mentioned).
-I have an older version of the target image that my coworker (who has
since left the company) created.  I just need to rebuild this image because
I am trying to add some kernel modules to the image.  When I run the
command "awk" in the console for the T4240 RDB when the older version of
the image is loaded, I do see the gawk help info come up. This shows awk is
present in the older image.

But looking at what Khem Raj mentioned, perhaps bitbake is just not finding
the awk because it's actually in /usr/bin when bitbake expects it to be in
/bin?  Though I am a little confused about the link you sent, Khem Raj.
How do exactly do I apply this patch?  I'm assuming we have to change the
file ver_linux?  I did a "find . -name "ver_linux"" and I see multiple
results:

bash-4.2$ find . -name "ver_linux"
./build_t4240rdb-64b/tmp/work/ppc64e6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
./build_t4240rdb-64b/tmp/work/ppce6500-fslmllib32-linux/lib32-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/package/usr/src/kernel/scripts/ver_linux
./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/image/usr/src/kernel/scripts/ver_linux
./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/packages-split/kernel-devsrc/usr/src/kernel/scripts/ver_linux
./build_t4240rdb-64b/tmp/work-shared/t4240rdb-64b/kernel-source/scripts/ver_linux
./build_t4240rdb/tmp/work/ppc64e6500-fslmllib64-linux/lib64-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
./build_t4240rdb/tmp/work/ppce6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
./build_t4240rdb/tmp/work-shared/t4240rdb/kernel-source/scripts/ver_linux

Now the build I'm working on is build_t4240rdb-64b so the last three
results in that search probably don't matter.  Though there are still six
more results for when I search ver_linux.  So I'm not sure which one I need
to change.  Moreover, all of the ver_linux files I found more or less look
like the following:

https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677

Which seems to be very different from the ver_linux file mentioned in the
patch.  This further confuses me on how to apply the patch.

Or maybe do you guys think maybe the patch isn't the solution here?  Maybe
there's some other reason bitbake isn't finding the awk?

-Thanks!, Wayne Li

On Wed, Nov 13, 2019 at 10:57 AM Khem Raj  wrote:

> On Wed, 2019-11-13 at 10:33 +0200, Adrian Bunk wrote:
> > On Tue, Nov 12, 2019 at 04:08:48PM -0600, Wayne Li wrote:
> > > Dear Yocto Developers,
> > >
> > > I'm trying to to build a Yocto kernel for a T4240 RDB.  When I run
> > > "bitbake
> > > fsl-image-full" to build the entire linux image, I get an error
> > > that says
> > > "Can't install kernel-devsrc-1.0-r0@t4240rdb_64b: no package
> > > provides
> > > /bin/awk".  Here's the entire error print that I see:
> > >
> > > https://gist.github.com/WayneZhenLi/e35f65081092cf1f24df29ec369c701c
> > >
> > > Anyway I'm confused about this error because /bin/awk does
> > > exist.  Like if
> > > I run "/bin/awk" in the console I see help info come up describing
> > > how to
> > > use a program called "gawk".  Why can't bitbake find /bin/awk
> > > then?  Or am
> > > I misunderstanding what this error is trying to say?  I mean I'm
> > > assuming
> > > it's just not able to find /bin/awk but maybe the error means
> > > something
> > > else?  Or maybe /bin/awk is actually relative to some path?  Let me
> > > know
> > > your thoughts.
> >
> > /bin/awk is missing on your target image that will run on the T4240
> > RDB.
> >
> > The smallest implementation is to enable CONFIG_AWK in your busybox
> > config.
> >
>
> import something like below patch into your kernel will help too
>
>
> https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/commit/?id=8af11c1cdd8fa08217e702b57cf96e9030db52b2
>
> > > -Thanks!, Wayne Li
> >
> > cu
> > Adrian
> >
> > --
> >
> >"Is there not promise of rain?" Ling Tan asked suddenly out
> > of the darkness. There had been need of rain for many days.
> >"Only a promise," Lao Er said.
> >Pearl S. Buck - Dragon Seed
> >
>
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] pkg-config not found

2019-11-13 Thread Khem Raj
On Wed, 2019-11-13 at 11:43 -0600, Mark Hawthorne wrote:
> I figured out the problem. The call to AX_PTHREAD() was breaking
> PKG_PROG_PKG_CONFIG. I don't understand why, but it works once I
> remove that line.

Swap the order, let PKG_PROG_PKG_CONFIG appear before AX_PTHREAD

> 
> On Tue, Nov 12, 2019 at 8:24 PM Mark Hawthorne <
> markhawthorne...@gmail.com> wrote:
> > I added the lines you suggested and it indicates that PKG_CONFIG is
> > not set. What would cause this to fail in the bitbake environment?
> > It works for other packages such as pixman.
> > 
> > On Tue, Nov 12, 2019 at 6:38 PM Khem Raj 
> > wrote:
> > > On Tue, Nov 12, 2019 at 4:29 PM Mark Hawthorne
> > >  wrote:
> > > >
> > > > Khem,
> > > >
> > > > I found a recipe that you made a few years ago where you
> > > addressed this problem:
> > > >
> > > > 
> > > http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-extended/boinc/boinc-client_7.12.bb
> > > >
> > > > You solved it by exporting PKG_CONFIG
> > > >
> > > > export PKG_CONFIG = "${STAGING_BINDIR_NATIVE}/pkg-config"
> > > >
> > > > This seems like it may be the incorrect way to do it and there
> > > needs to be an update in the configure.ac file instead?
> > > 
> > > in configure.ac you can add something like this
> > > 
> > > PKG_PROG_PKG_CONFIG
> > > if test -z "$PKG_CONFIG"; then
> > >   AC_MSG_WARN([Cannot find pkg-config, make sure it is installed
> > > in your PATH])
> > > fi
> > > 
> > > >
> > > > On Tue, Nov 12, 2019 at 4:44 PM Mark Hawthorne <
> > > markhawthorne...@gmail.com> wrote:
> > > >>
> > > >> No, it did not help
> > > >>
> > > >> It appears from the config.log file that the PKG_CONFIG
> > > variable never gets set. I'm sorting through the bbclass files to
> > > figure out why this is not getting set...
> > > >>
> > > >> PKG_CONFIG=''
> > > >> PKG_CONFIG_LIBDIR='/home/mark/Documents/tisdk/build/arago-tmp-
> > > external-arm-toolchain/work/armv7at2hf-neon-linux-
> > > gnueabi/myprogram/1.0-r0/recipe-sysroot/usr/lib/pkgconfig'
> > > >> PKG_CONFIG_PATH='/home/mark/Documents/tisdk/build/arago-tmp-
> > > external-arm-toolchain/work/armv7at2hf-neon-linux-
> > > gnueabi/myprogram/1.0-r0/recipe-
> > > sysroot/usr/lib/pkgconfig:/home/mark/Documents/tisdk/build/arago-
> > > tmp-external-arm-toolchain/work/armv7at2hf-neon-linux-
> > > gnueabi/myprogram/1.0-r0/recipe-sysroot/usr/share/pkgconfig'
> > > >>
> > > >> On Tue, Nov 12, 2019 at 4:22 PM Khem Raj 
> > > wrote:
> > > >>>
> > > >>> On Tue, Nov 12, 2019 at 2:00 PM Mark Hawthorne
> > > >>>  wrote:
> > > >>> >
> > > >>> > Thank you. I have fixed this issue but the original pkg-
> > > config error still persists.
> > > >>> >
> > > >>>
> > > >>> do a clean build after above change
> > > >>>
> > > >>> bitbake -ccleanall 
> > > >>> bitbake 
> > > >>>
> > > >>> does that help ?
> > > >>>
> > > >>> > On Tue, Nov 12, 2019 at 3:41 PM Adrian Bunk  > > > wrote:
> > > >>> >>
> > > >>> >> On Tue, Nov 12, 2019 at 03:06:25PM -0600, Mark Hawthorne
> > > wrote:
> > > >>> >> >...
> > > >>> >> > DEPENDS_${PN} = "libpng freetype glm libegl libgles2
> > > libspatialite"
> > > >>> >> >...
> > > >>> >>
> > > >>> >> DEPENDS, not DEPENDS_${PN}
> > > >>> >>
> > > >>> >> cu
> > > >>> >> Adrian
> > > >>> >>
> > > >>> >> --
> > > >>> >>
> > > >>> >>"Is there not promise of rain?" Ling Tan asked
> > > suddenly out
> > > >>> >> of the darkness. There had been need of rain for
> > > many days.
> > > >>> >>"Only a promise," Lao Er said.
> > > >>> >>Pearl S. Buck -
> > > Dragon Seed
> > > >>> >>
> > > >>> > --
> > > >>> > ___
> > > >>> > yocto mailing list
> > > >>> > yocto@yoctoproject.org
> > > >>> > https://lists.yoctoproject.org/listinfo/yocto
> > > >
> > > > --
> > > > ___
> > > > yocto mailing list
> > > > yocto@yoctoproject.org
> > > > https://lists.yoctoproject.org/listinfo/yocto

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] No Package Provides /bin/awk

2019-11-13 Thread Wayne Li
I'd like also like to mention that my main concern with the ver_linux files
that I found in my project was that the shebang line was " #!/bin/sh"
instead of "#!/bin/awk -f" which is the shebang line in the ver_linux file
in the patch.  The patch wants to change the shebang line from "#!/bin/awk
-f" to  "#!/usr/bin/awk -f" so I'm not sure how that change would translate
when I'm working with the shebang line "#!/bin/sh".  Or perhaps Yocto has
changed since that patch was posted and maybe the place /bin/awk is
specified is different?

On Wed, Nov 13, 2019 at 11:51 AM Wayne Li  wrote:

> So after further investigation, I'm fairly sure awk is actually present in
> the target image.  Here are my reasons why I feel that this is the case:
>
> -I looked at the busybox menuconfig GUI that comes up when I run "bitbake
> -c menuconfig busybox" and it says awk is built-in.
> -I looked at various def-config files I found by just doing a "grep -rn
> "CONFIG_AWK"" and found that CONFIG_AWK seems to have been enabled
> throughout the project (there was the line CONFIG_AWK=y uncommented in the
> various def-config files I mentioned).
> -I have an older version of the target image that my coworker (who has
> since left the company) created.  I just need to rebuild this image because
> I am trying to add some kernel modules to the image.  When I run the
> command "awk" in the console for the T4240 RDB when the older version of
> the image is loaded, I do see the gawk help info come up. This shows awk is
> present in the older image.
>
> But looking at what Khem Raj mentioned, perhaps bitbake is just not
> finding the awk because it's actually in /usr/bin when bitbake expects it
> to be in /bin?  Though I am a little confused about the link you sent, Khem
> Raj.  How do exactly do I apply this patch?  I'm assuming we have to change
> the file ver_linux?  I did a "find . -name "ver_linux"" and I see multiple
> results:
>
> bash-4.2$ find . -name "ver_linux"
>
> ./build_t4240rdb-64b/tmp/work/ppc64e6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
>
> ./build_t4240rdb-64b/tmp/work/ppce6500-fslmllib32-linux/lib32-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
>
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/package/usr/src/kernel/scripts/ver_linux
>
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/image/usr/src/kernel/scripts/ver_linux
>
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/packages-split/kernel-devsrc/usr/src/kernel/scripts/ver_linux
>
> ./build_t4240rdb-64b/tmp/work-shared/t4240rdb-64b/kernel-source/scripts/ver_linux
>
> ./build_t4240rdb/tmp/work/ppc64e6500-fslmllib64-linux/lib64-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
>
> ./build_t4240rdb/tmp/work/ppce6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
> ./build_t4240rdb/tmp/work-shared/t4240rdb/kernel-source/scripts/ver_linux
>
> Now the build I'm working on is build_t4240rdb-64b so the last three
> results in that search probably don't matter.  Though there are still six
> more results for when I search ver_linux.  So I'm not sure which one I need
> to change.  Moreover, all of the ver_linux files I found more or less look
> like the following:
>
> https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677
>
> Which seems to be very different from the ver_linux file mentioned in the
> patch.  This further confuses me on how to apply the patch.
>
> Or maybe do you guys think maybe the patch isn't the solution here?  Maybe
> there's some other reason bitbake isn't finding the awk?
>
> -Thanks!, Wayne Li
>
> On Wed, Nov 13, 2019 at 10:57 AM Khem Raj  wrote:
>
>> On Wed, 2019-11-13 at 10:33 +0200, Adrian Bunk wrote:
>> > On Tue, Nov 12, 2019 at 04:08:48PM -0600, Wayne Li wrote:
>> > > Dear Yocto Developers,
>> > >
>> > > I'm trying to to build a Yocto kernel for a T4240 RDB.  When I run
>> > > "bitbake
>> > > fsl-image-full" to build the entire linux image, I get an error
>> > > that says
>> > > "Can't install kernel-devsrc-1.0-r0@t4240rdb_64b: no package
>> > > provides
>> > > /bin/awk".  Here's the entire error print that I see:
>> > >
>> > > https://gist.github.com/WayneZhenLi/e35f65081092cf1f24df29ec369c701c
>> > >
>> > > Anyway I'm confused about this error because /bin/awk does
>> > > exist.  Like if
>> > > I run "/bin/awk" in the console I see help info come up describing
>> > > how to
>> > > use a program called "gawk".  Why can't bitbake find /bin/awk
>> > > then?  Or am
>> > > I misunderstanding what this error is trying to say?  I mean I'm
>> > > assuming
>> > > it's just not able to find /bin/awk but maybe the error means
>> > > something
>> > > else?  Or maybe /bin/awk is actually relative to some path?  Let me
>> > > know
>> > > your thoughts.
>> >
>> > /bin/awk is missing on your target image that will run on the T4240
>> > RDB.
>> >
>> > The smallest implementation is to enable CONFIG_AWK in your busybox

[yocto] busybox + SELinux (warrior) - reboot issue

2019-11-13 Thread Yair Itzhaki
Hi ,
I'm using Poky (Warrior), with busybox (aiming at a lightweight system).
Recently, added SELinux to my project (by adding "packagegroup-core-selinux" to 
my local.conf, with mls policy).

Booted with "selinux=1 enforing=0".
The auto-relabeling reported an error, since the root is mounted RO.
So, patched slelinux-autorelabel script to mount "/" RW before relabeling.

Booted again.
This time, selinux-init had the same issue ( / mounted RO).
Patched this one as well, but the system keeps rebooting:
It seems that the init process keeps it's kernel_t context, which forces 
re-labeling, reboot and so on…. (per the selinux-init script)

Q1: Is SELinux+busybox a valid combination, or should I switch to systemd?
Q2: Which context should the init process end up as?

BTW – the build of "core-image-selinux" fails, with the following error
   Copying files into the device: set_inode_xattr: No data available while 
reading attribute "security.selinux" of "network"
Any idea?

Thanks,
Yair


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] No Package Provides /bin/awk

2019-11-13 Thread Wayne Li
On further inspection of the older image my coworker made, it looks like
awk is located at "/usr/bin/awk".  I see this by just doing a "which awk"
in the console of the T4240 RDB when the old image is loaded.  So it looks
like the most likely case is that Khem Raj is correct and that bitbake is
expecting awk to be in "/bin" when awk is actually in "/usr/bin".  In that
case, I need to know where the line telling bitbake to look for awk in the
"/bin" directory is.

On Wed, Nov 13, 2019 at 12:02 PM Wayne Li  wrote:

> I'd like also like to mention that my main concern with the ver_linux
> files that I found in my project was that the shebang line was " #!/bin/sh"
> instead of "#!/bin/awk -f" which is the shebang line in the ver_linux file
> in the patch.  The patch wants to change the shebang line from "#!/bin/awk
> -f" to  "#!/usr/bin/awk -f" so I'm not sure how that change would translate
> when I'm working with the shebang line "#!/bin/sh".  Or perhaps Yocto has
> changed since that patch was posted and maybe the place /bin/awk is
> specified is different?
>
> On Wed, Nov 13, 2019 at 11:51 AM Wayne Li  wrote:
>
>> So after further investigation, I'm fairly sure awk is actually present
>> in the target image.  Here are my reasons why I feel that this is the case:
>>
>> -I looked at the busybox menuconfig GUI that comes up when I run "bitbake
>> -c menuconfig busybox" and it says awk is built-in.
>> -I looked at various def-config files I found by just doing a "grep -rn
>> "CONFIG_AWK"" and found that CONFIG_AWK seems to have been enabled
>> throughout the project (there was the line CONFIG_AWK=y uncommented in the
>> various def-config files I mentioned).
>> -I have an older version of the target image that my coworker (who has
>> since left the company) created.  I just need to rebuild this image because
>> I am trying to add some kernel modules to the image.  When I run the
>> command "awk" in the console for the T4240 RDB when the older version of
>> the image is loaded, I do see the gawk help info come up. This shows awk is
>> present in the older image.
>>
>> But looking at what Khem Raj mentioned, perhaps bitbake is just not
>> finding the awk because it's actually in /usr/bin when bitbake expects it
>> to be in /bin?  Though I am a little confused about the link you sent, Khem
>> Raj.  How do exactly do I apply this patch?  I'm assuming we have to change
>> the file ver_linux?  I did a "find . -name "ver_linux"" and I see multiple
>> results:
>>
>> bash-4.2$ find . -name "ver_linux"
>>
>> ./build_t4240rdb-64b/tmp/work/ppc64e6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
>>
>> ./build_t4240rdb-64b/tmp/work/ppce6500-fslmllib32-linux/lib32-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
>>
>> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/package/usr/src/kernel/scripts/ver_linux
>>
>> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/image/usr/src/kernel/scripts/ver_linux
>>
>> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/packages-split/kernel-devsrc/usr/src/kernel/scripts/ver_linux
>>
>> ./build_t4240rdb-64b/tmp/work-shared/t4240rdb-64b/kernel-source/scripts/ver_linux
>>
>> ./build_t4240rdb/tmp/work/ppc64e6500-fslmllib64-linux/lib64-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
>>
>> ./build_t4240rdb/tmp/work/ppce6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
>> ./build_t4240rdb/tmp/work-shared/t4240rdb/kernel-source/scripts/ver_linux
>>
>> Now the build I'm working on is build_t4240rdb-64b so the last three
>> results in that search probably don't matter.  Though there are still six
>> more results for when I search ver_linux.  So I'm not sure which one I need
>> to change.  Moreover, all of the ver_linux files I found more or less look
>> like the following:
>>
>> https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677
>>
>> Which seems to be very different from the ver_linux file mentioned in the
>> patch.  This further confuses me on how to apply the patch.
>>
>> Or maybe do you guys think maybe the patch isn't the solution here?
>> Maybe there's some other reason bitbake isn't finding the awk?
>>
>> -Thanks!, Wayne Li
>>
>> On Wed, Nov 13, 2019 at 10:57 AM Khem Raj  wrote:
>>
>>> On Wed, 2019-11-13 at 10:33 +0200, Adrian Bunk wrote:
>>> > On Tue, Nov 12, 2019 at 04:08:48PM -0600, Wayne Li wrote:
>>> > > Dear Yocto Developers,
>>> > >
>>> > > I'm trying to to build a Yocto kernel for a T4240 RDB.  When I run
>>> > > "bitbake
>>> > > fsl-image-full" to build the entire linux image, I get an error
>>> > > that says
>>> > > "Can't install kernel-devsrc-1.0-r0@t4240rdb_64b: no package
>>> > > provides
>>> > > /bin/awk".  Here's the entire error print that I see:
>>> > >
>>> > > https://gist.github.com/WayneZhenLi/e35f65081092cf1f24df29ec369c701c
>>> > >
>>> > > Anyway I'm confused about this error because /bin/awk does
>>> > > exist.  Like if
>>> > > I r

Re: [yocto] No Package Provides /bin/awk

2019-11-13 Thread Mark Hatle
Bitbake inspects the binaries and looks at the #! line.  You need to change the
line itself (via a patch) to /usr/bin/awk, and then it will pick up the
dependency automatically on a rebuild.

--Mark

On 11/13/19 12:14 PM, Wayne Li wrote:
> On further inspection of the older image my coworker made, it looks like awk 
> is
> located at "/usr/bin/awk".  I see this by just doing a "which awk" in the
> console of the T4240 RDB when the old image is loaded.  So it looks like the
> most likely case is that Khem Raj is correct and that bitbake is expecting awk
> to be in "/bin" when awk is actually in "/usr/bin".  In that case, I need to
> know where the line telling bitbake to look for awk in the "/bin" directory 
> is.
> 
> On Wed, Nov 13, 2019 at 12:02 PM Wayne Li  > wrote:
> 
> I'd like also like to mention that my main concern with the ver_linux 
> files
> that I found in my project was that the shebang line was " #!/bin/sh"
> instead of "#!/bin/awk -f" which is the shebang line in the ver_linux file
> in the patch.  The patch wants to change the shebang line from "#!/bin/awk
> -f" to  "#!/usr/bin/awk -f" so I'm not sure how that change would 
> translate
> when I'm working with the shebang line "#!/bin/sh".  Or perhaps Yocto has
> changed since that patch was posted and maybe the place /bin/awk is
> specified is different?
> 
> On Wed, Nov 13, 2019 at 11:51 AM Wayne Li  > wrote:
> 
> So after further investigation, I'm fairly sure awk is actually 
> present
> in the target image.  Here are my reasons why I feel that this is the 
> case:
> 
> -I looked at the busybox menuconfig GUI that comes up when I run
> "bitbake -c menuconfig busybox" and it says awk is built-in. 
> -I looked at various def-config files I found by just doing a "grep 
> -rn
> "CONFIG_AWK"" and found that CONFIG_AWK seems to have been enabled
> throughout the project (there was the line CONFIG_AWK=y uncommented in
> the various def-config files I mentioned). 
> -I have an older version of the target image that my coworker (who has
> since left the company) created.  I just need to rebuild this image
> because I am trying to add some kernel modules to the image.  When I 
> run
> the command "awk" in the console for the T4240 RDB when the older
> version of the image is loaded, I do see the gawk help info come up.
> This shows awk is present in the older image.
> 
> But looking at what Khem Raj mentioned, perhaps bitbake is just not
> finding the awk because it's actually in /usr/bin when bitbake expects
> it to be in /bin?  Though I am a little confused about the link you
> sent, Khem Raj.  How do exactly do I apply this patch?  I'm assuming 
> we
> have to change the file ver_linux?  I did a "find . -name "ver_linux""
> and I see multiple results:
> 
> bash-4.2$ find . -name "ver_linux"
> 
> ./build_t4240rdb-64b/tmp/work/ppc64e6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
> 
> ./build_t4240rdb-64b/tmp/work/ppce6500-fslmllib32-linux/lib32-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
> 
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/package/usr/src/kernel/scripts/ver_linux
> 
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/image/usr/src/kernel/scripts/ver_linux
> 
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/packages-split/kernel-devsrc/usr/src/kernel/scripts/ver_linux
> 
> ./build_t4240rdb-64b/tmp/work-shared/t4240rdb-64b/kernel-source/scripts/ver_linux
> 
> ./build_t4240rdb/tmp/work/ppc64e6500-fslmllib64-linux/lib64-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
> 
> ./build_t4240rdb/tmp/work/ppce6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
> 
> ./build_t4240rdb/tmp/work-shared/t4240rdb/kernel-source/scripts/ver_linux
> 
> Now the build I'm working on is build_t4240rdb-64b so the last three
> results in that search probably don't matter.  Though there are still
> six more results for when I search ver_linux.  So I'm not sure which 
> one
> I need to change.  Moreover, all of the ver_linux files I found more 
> or
> less look like the following:
> 
> https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677
> 
> Which seems to be very different from the ver_linux file mentioned in
> the patch.  This further confuses me on how to apply the patch. 
> 
> Or maybe do you guys think maybe the patch isn't the solution here? 
> Maybe there's some other reason bitbake isn't finding the awk?
> 
> -Thanks!, Wayne Li
> 
> On Wed, Nov 13, 2019 at 10:57 AM Khem Raj  

Re: [yocto] bitbake SRC_URI fetch Azure DevOps repository Azure DevOps Services Basic

2019-11-13 Thread Richard Purdie
On Wed, 2019-11-13 at 09:02 +, Samuel Jiang (江騏先) wrote:
> I got below error message:
> crashdump-git-r0 do_fetch: Fetcher failure: Fetch command export 
> PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export 
> DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export 
> SSH_AGENT_PID="2255"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; 
> export PATH="[private_data]"; export HOME="/home/samueljiang";
> git -c core.fsyncobjectfiles=0 ls-remote 
> git://quanta01.visualstudio.com/OpenBMC/_git/crashdump  failed with exit code 
> 128, output:
> fatal: unable to connect to quanta01.visualstudio.com:
> quanta01.visualstudio.com[0: 2620:1ec:21::18]: errno=Network is unreachable
> quanta01.visualstudio.com[1: 13.107.42.18]: errno=Connection timed out
> 
> Seems this url with git:// prefix could not connect in Azure DevOps 
> 
> Document[https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops].

I now realise what the problem is. Whatever this git server you're
talking to is, it does not work the same as is documented for the "git
clone" manpage.

There is no option to force bitbake to use the syntax you're asking for
since the manpage says the synax its using is valid. You could patch
bitbake to force it to use that syntax with a patch like:

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index fa41b078f12..f20c1f36b82 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -588,6 +588,8 @@ class Git(FetchMethod):
 username = ud.user + '@'
 else:
 username = ""
+if ud.proto == "ssh":
+return "%s%s:%s" % (username, ud.host, ud.path[1:])
 return "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path)
 
 def _revision_key(self, ud, d, name):


which in my local tests appeared to give the result you're asking for
but that shouldn't be required with a server that adheres to what the
git manual says is supported.

Cheers,

Richard

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] No Package Provides /bin/awk

2019-11-13 Thread Wayne Li
Sorry I am fairly new to bitbake.  How do I apply a patch?  Why do I have
to apply a patch as opposed to just editing corresponding files (I know
that is probably a dumb question but again I am very new to bitbake)?  Khem
Raj did mention a patch to fix the problem:

https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/commit/?id=8af11c1cdd8fa08217e702b57cf96e9030db52b2

Would I be able to somehow take the patch from that website and apply it to
my project?  Though I'd like to mention again it seems like that patch is
trying to change  "#!/bin/awk -f" to "#!/usr/bin/awk -f" in the ver_linux
file.  But the ver_linux files in my project look very different from the
ver_linux file in the patch (see example of my ver_linux file:
https://gist.github.com/WayneZhenLi/c7475cf382a80bfd2de31e82c40c1677) and
has "#!/bin/sh" for its #! line instead.  In that case, would the patch
Khem Raj mentioned even work for my project?  Again I'm new to bitbake so I
apologize for my questions being naive.

On Wed, Nov 13, 2019 at 12:31 PM Mark Hatle 
wrote:

> Bitbake inspects the binaries and looks at the #! line.  You need to
> change the
> line itself (via a patch) to /usr/bin/awk, and then it will pick up the
> dependency automatically on a rebuild.
>
> --Mark
>
> On 11/13/19 12:14 PM, Wayne Li wrote:
> > On further inspection of the older image my coworker made, it looks like
> awk is
> > located at "/usr/bin/awk".  I see this by just doing a "which awk" in the
> > console of the T4240 RDB when the old image is loaded.  So it looks like
> the
> > most likely case is that Khem Raj is correct and that bitbake is
> expecting awk
> > to be in "/bin" when awk is actually in "/usr/bin".  In that case, I
> need to
> > know where the line telling bitbake to look for awk in the "/bin"
> directory is.
> >
> > On Wed, Nov 13, 2019 at 12:02 PM Wayne Li  > > wrote:
> >
> > I'd like also like to mention that my main concern with the
> ver_linux files
> > that I found in my project was that the shebang line was " #!/bin/sh"
> > instead of "#!/bin/awk -f" which is the shebang line in the
> ver_linux file
> > in the patch.  The patch wants to change the shebang line from
> "#!/bin/awk
> > -f" to  "#!/usr/bin/awk -f" so I'm not sure how that change would
> translate
> > when I'm working with the shebang line "#!/bin/sh".  Or perhaps
> Yocto has
> > changed since that patch was posted and maybe the place /bin/awk is
> > specified is different?
> >
> > On Wed, Nov 13, 2019 at 11:51 AM Wayne Li  > > wrote:
> >
> > So after further investigation, I'm fairly sure awk is actually
> present
> > in the target image.  Here are my reasons why I feel that this
> is the case:
> >
> > -I looked at the busybox menuconfig GUI that comes up when I run
> > "bitbake -c menuconfig busybox" and it says awk is built-in.
> > -I looked at various def-config files I found by just doing a
> "grep -rn
> > "CONFIG_AWK"" and found that CONFIG_AWK seems to have been
> enabled
> > throughout the project (there was the line CONFIG_AWK=y
> uncommented in
> > the various def-config files I mentioned).
> > -I have an older version of the target image that my coworker
> (who has
> > since left the company) created.  I just need to rebuild this
> image
> > because I am trying to add some kernel modules to the image.
> When I run
> > the command "awk" in the console for the T4240 RDB when the older
> > version of the image is loaded, I do see the gawk help info come
> up.
> > This shows awk is present in the older image.
> >
> > But looking at what Khem Raj mentioned, perhaps bitbake is just
> not
> > finding the awk because it's actually in /usr/bin when bitbake
> expects
> > it to be in /bin?  Though I am a little confused about the link
> you
> > sent, Khem Raj.  How do exactly do I apply this patch?  I'm
> assuming we
> > have to change the file ver_linux?  I did a "find . -name
> "ver_linux""
> > and I see multiple results:
> >
> > bash-4.2$ find . -name "ver_linux"
> >
>  
> ./build_t4240rdb-64b/tmp/work/ppc64e6500-fsl-linux/linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
> >
>  
> ./build_t4240rdb-64b/tmp/work/ppce6500-fslmllib32-linux/lib32-linux-libc-headers/4.1-r0/linux-4.1/scripts/ver_linux
> >
>  
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/package/usr/src/kernel/scripts/ver_linux
> >
>  
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/image/usr/src/kernel/scripts/ver_linux
> >
>  
> ./build_t4240rdb-64b/tmp/work/t4240rdb_64b-fsl-linux/kernel-devsrc/1.0-r0/packages-split/kernel-devsrc/usr/src/kernel/scripts/ver_linux
> >
>  
> ./build_t4240rdb-64b/tmp/work-shared/t4240rdb-64b/kernel-source/scripts/ver_linux
> >
>  
> ./build_t4240rdb/tmp/work

Re: [yocto] puzzle: simple recipe gets image dependencies

2019-11-13 Thread Vladimir Molokov
> can you share this dot file ?
sure:
http://gitlab.com/morokov/build/raw/master/task-depends.dot

also here are more files from the build directory, just in case:
https://gitlab.com/morokov/build/
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] puzzle: simple recipe gets image dependencies

2019-11-13 Thread Khem Raj
On Wed, Nov 13, 2019 at 12:45 PM Vladimir Molokov
 wrote:
>
> > can you share this dot file ?
> sure:
> http://gitlab.com/morokov/build/raw/master/task-depends.dot
>

Alright, so you have initramfs enabled it seems. Which means kernel
will first try to build designated
initramfs image which in your case is

"linux-yocto.do_bundle_initramfs" -> "core-image-minimal.do_image_complete"

and then core-image-minimal includes bad-example

"core-image-minimal.do_image_complete" -> "bad-example.do_populate_sysroot"

and example does ask kernel to be deployed

"example.do_build" -> "linux-yocto.do_deploy"


so that completes the chain.

Hope that helps.


> also here are more files from the build directory, just in case:
> https://gitlab.com/morokov/build/
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] puzzle: simple recipe gets image dependencies

2019-11-13 Thread Vladimir Molokov
thank you for your answer!

when I comment out DEPENDS = "attr" line in "example" recipe
then there is no "bad-example" dependency:
https://gitlab.com/morokov/build/raw/master/task-depends-without-attr.dot

> Alright, so you have initramfs enabled it seems. Which means kernel
> will first try to build designated
> initramfs image which in your case is
>
> "linux-yocto.do_bundle_initramfs" -> "core-image-minimal.do_image_complete"
>
> and then core-image-minimal includes bad-example
>
> "core-image-minimal.do_image_complete" -> "bad-example.do_populate_sysroot"
>
> and example does ask kernel to be deployed
>
> "example.do_build" -> "linux-yocto.do_deploy"
>
>
> so that completes the chain.

"example" is just a simple recipe, it doesn't inherit image class
it doesn't even belong to any image, just standalone recipe.
I don't quite get the logic around initramfs
why does it add those dependencies to "example" recipe?
it doesn't if "attr" is commented out.
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Collaboration on Testing GCC/LLVM Toolchains

2019-11-13 Thread Nicholas Krause

Greetings All,

I'm a student working on multi-threading GCC and researching it. Seems 
that it my


time doing it and other things with the project it would be great to 
start collaborating


on testing gcc/llvm upstream with Yocto. Granted there is a testsuite 
for both but it


would be great to also test it against a build system that builds real 
world software.


Furthermore I'm aware that this is done for Yocto toolchain selection 
internally but it


would be great if we can start collaborating on testing upstream 
toolchains if


possible.


Not sure if that's done already so sorry for the noise if it is,

Nick

--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] puzzle: simple recipe gets image dependencies

2019-11-13 Thread Khem Raj
On Wed, Nov 13, 2019 at 3:42 PM Vladimir Molokov 
wrote:

> thank you for your answer!
>
> when I comment out DEPENDS = "attr" line in "example" recipe
> then there is no "bad-example" dependency:
> https://gitlab.com/morokov/build/raw/master/task-depends-without-attr.dot
>
> > Alright, so you have initramfs enabled it seems. Which means kernel
> > will first try to build designated
> > initramfs image which in your case is
> >
> > "linux-yocto.do_bundle_initramfs" ->
> "core-image-minimal.do_image_complete"
> >
> > and then core-image-minimal includes bad-example
> >
> > "core-image-minimal.do_image_complete" ->
> "bad-example.do_populate_sysroot"
> >
> > and example does ask kernel to be deployed
> >
> > "example.do_build" -> "linux-yocto.do_deploy"
> >
> >
> > so that completes the chain.
>
> "example" is just a simple recipe, it doesn't inherit image class
> it doesn't even belong to any image, just standalone recipe.
> I don't quite get the logic around initramfs


Initramfs is an image that is bundled into kernel binary so you are
essentially building an image before you can create kernel binary
thereafter you build full image and your build is choking on this small
image which infact is a regular image and will respect image depends

>
> why does it add those dependencies to "example" recipe?
> it doesn't if "attr" is commented out.


Possible that attr dependencies traverse down to kernel

>
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 01/19] python-ipy: upgrade to 1.00 and add python3 version

2019-11-13 Thread Yi Zhao
Signed-off-by: Yi Zhao 
---
 recipes-devtools/python/python-ipy.inc  | 18 
 recipes-devtools/python/python-ipy_0.83.bb  | 32 -
 recipes-devtools/python/python-ipy_1.00.bb  |  2 ++
 recipes-devtools/python/python3-ipy_1.00.bb |  2 ++
 4 files changed, 22 insertions(+), 32 deletions(-)
 create mode 100644 recipes-devtools/python/python-ipy.inc
 delete mode 100644 recipes-devtools/python/python-ipy_0.83.bb
 create mode 100644 recipes-devtools/python/python-ipy_1.00.bb
 create mode 100644 recipes-devtools/python/python3-ipy_1.00.bb

diff --git a/recipes-devtools/python/python-ipy.inc 
b/recipes-devtools/python/python-ipy.inc
new file mode 100644
index 000..ba4c2bd
--- /dev/null
+++ b/recipes-devtools/python/python-ipy.inc
@@ -0,0 +1,18 @@
+SUMMARY = "Python module for handling IPv4 and IPv6 Addresses and Networks"
+DESCRIPTION = "IPy is a Python module for handling IPv4 and IPv6 Addresses and 
Networks \
+in a fashion similar to perl's Net::IP and friends. The IP class allows \
+a comfortable parsing and handling for most notations in use for IPv4 \
+and IPv6 Addresses and Networks."
+SECTION = "devel/python"
+HOMEPAGE = "https://github.com/haypo/python-ipy";
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=848d24919845901b4f48bae5f13252e6"
+
+SRC_URI[md5sum] = "1a90c68174234672241a7e60c7ea0fb9"
+SRC_URI[sha256sum] = 
"2f2bf658a858d43868d8a4352b3889cf78c66e2ce678b300dcf518c9149ba621"
+
+inherit pypi
+
+PYPI_PACKAGE = "IPy"
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-devtools/python/python-ipy_0.83.bb 
b/recipes-devtools/python/python-ipy_0.83.bb
deleted file mode 100644
index df060fa..000
--- a/recipes-devtools/python/python-ipy_0.83.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Python module for handling IPv4 and IPv6 Addresses and Networks"
-DESCRIPTION = "IPy is a Python module for handling IPv4 and IPv6 Addresses and 
Networks \ 
-in a fashion similar to perl's Net::IP and friends. The IP class allows \
-a comfortable parsing and handling for most notations in use for IPv4 \
-and IPv6 Addresses and Networks."
-SECTION = "devel/python"
-HOMEPAGE = "https://github.com/haypo/python-ipy";
-DEPENDS = "python"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ebc0028ff5cdaf7796604875027dcd55"
-
-SRC_URI = "https://pypi.python.org/packages/source/I/IPy/IPy-${PV}.tar.gz";
-
-SRC_URI[md5sum] = "7b8c6eb4111b15aea31b67108e769712"
-SRC_URI[sha256sum] = 
"61da5a532b159b387176f6eabf11946e7458b6df8fb8b91ff1d345ca7a6edab8"
-
-S = "${WORKDIR}/IPy-${PV}"
-
-inherit distutils
-
-# need to export these variables for python-config to work
-export BUILD_SYS
-export HOST_SYS
-export STAGING_INCDIR
-export STAGING_LIBDIR
-
-BBCLASSEXTEND = "native"
-
-do_install_append() {
-   install -d ${D}/${datadir}/doc/${BPN}-${PV}
-   install AUTHORS COPYING ChangeLog README 
${D}/${datadir}/doc/${BPN}-${PV}
-}
diff --git a/recipes-devtools/python/python-ipy_1.00.bb 
b/recipes-devtools/python/python-ipy_1.00.bb
new file mode 100644
index 000..587a517
--- /dev/null
+++ b/recipes-devtools/python/python-ipy_1.00.bb
@@ -0,0 +1,2 @@
+inherit setuptools
+require python-ipy.inc
diff --git a/recipes-devtools/python/python3-ipy_1.00.bb 
b/recipes-devtools/python/python3-ipy_1.00.bb
new file mode 100644
index 000..ea6a105
--- /dev/null
+++ b/recipes-devtools/python/python3-ipy_1.00.bb
@@ -0,0 +1,2 @@
+inherit setuptools3
+require python-ipy.inc
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 00/19] selinux: upgrade 2.8 -> 2.9

2019-11-13 Thread Yi Zhao
* Upgrade to 2.9
* Switch to python3
* Refresh patches

Yi Zhao (19):
  python-ipy: upgrade to 1.00 and add python3 version
  selinux: uprev inc files to 2.9 (20190315)
  libsepol: uprev to 2.9 (20190315)
  libselinux: uprev to 2.9 (20190315)
  libselinux-python: add recipe
  libsemanage: uprev to 2.9 (20190315)
  checkpolicy: uprev to 2.9 (20190315)
  secilc: uprev to 2.9 (20190315)
  policycoreutils: uprev to 2.9 (20190315)
  mcstrans: uprev to 2.9 (20190315)
  restorecond: uprev to 2.9 (20190315)
  selinux-python: uprev to 2.9 (20190315)
  selinux-dbus: uprev to 2.9 (20190315)
  selinux-sandbox: uprev to 2.9 (20190315)
  selinux-gui: uprev to 2.9 (20190315)
  semodule-utils: uprev to 2.9 (20190315)
  selinux-init: fix build error when enable usrmerge feature
  setools: upgrade 4.1.1 -> 4.2.2
  audit: switch to python3

 recipes-devtools/python/python-ipy.inc|  18 +++
 recipes-devtools/python/python-ipy_0.83.bb|  32 --
 recipes-devtools/python/python-ipy_1.00.bb|   2 +
 recipes-devtools/python/python3-ipy_1.00.bb   |   2 +
 .../audit/audit/audit-python-configure.patch  |  46 
 .../audit/audit/audit-python.patch|  64 ---
 .../audit/fix-swig-host-contamination.patch   |  56 --
 recipes-security/audit/audit_2.8.5.bb |  11 +-
 recipes-security/selinux/checkpolicy_2.8.bb   |   7 --
 recipes-security/selinux/checkpolicy_2.9.bb   |   7 ++
 .../selinux/libselinux-python.inc |  40 +++
 ...elinux_2.8.bb => libselinux-python_2.9.bb} |  14 ++-
 recipes-security/selinux/libselinux.inc   |  24 +---
 ...t-define-gettid-if-glibc-2.30-is-use.patch |  60 --
 ...file-fix-includedir-in-libselinux.pc.patch |  28 -
 .../{libselinux_2.8.bb => libselinux_2.9.bb}  |  10 +-
 recipes-security/selinux/libsemanage.inc  |  26 ++---
 ...file-fix-includedir-in-libselinux.pc.patch |  28 -
 ...anage-Fix-execve-segfaults-on-Ubuntu.patch |  12 +-
 ...anage-allow-to-disable-audit-support.patch |  26 +++--
 ...anage-define-FD_CLOEXEC-as-necessary.patch |  16 +--
 ...-disable-expand-check-on-policy-load.patch |   6 +-
 ...age-drop-Wno-unused-but-set-variable.patch |  12 +-
 .../libsemanage-fix-path-nologin.patch|  39 ---
 recipes-security/selinux/libsemanage_2.8.bb   |  18 ---
 recipes-security/selinux/libsemanage_2.9.bb   |  15 +++
 ...kefile-fix-includedir-in-libsepol.pc.patch |  29 -
 recipes-security/selinux/libsepol_2.8.bb  |   9 --
 recipes-security/selinux/libsepol_2.9.bb  |   7 ++
 recipes-security/selinux/mcstrans.inc |   4 +-
 .../mcstrans/mcstrans-de-bashify.patch|  23 ++--
 ...tch => mcstrans-fix-the-init-script.patch} |  14 ++-
 recipes-security/selinux/mcstrans_2.8.bb  |   7 --
 recipes-security/selinux/mcstrans_2.9.bb  |   7 ++
 recipes-security/selinux/policycoreutils.inc  |  16 +--
 .../selinux/policycoreutils_2.8.bb|   8 --
 .../selinux/policycoreutils_2.9.bb|   8 ++
 ...icycoreutils-make-O_CLOEXEC-optional.patch |  29 +++--
 recipes-security/selinux/restorecond_2.8.bb   |   7 --
 recipes-security/selinux/restorecond_2.9.bb   |   7 ++
 recipes-security/selinux/secilc_2.8.bb|   7 --
 recipes-security/selinux/secilc_2.9.bb|   7 ++
 recipes-security/selinux/selinux-dbus.inc |   2 +-
 recipes-security/selinux/selinux-dbus_2.8.bb  |   7 --
 recipes-security/selinux/selinux-dbus_2.9.bb  |   7 ++
 recipes-security/selinux/selinux-gui.inc  |   2 +-
 recipes-security/selinux/selinux-gui_2.8.bb   |   7 --
 recipes-security/selinux/selinux-gui_2.9.bb   |   7 ++
 recipes-security/selinux/selinux-initsh.inc   |   5 +-
 recipes-security/selinux/selinux-python.inc   |  62 +--
 .../fix-TypeError-for-seobject.py.patch   |  30 -
 .../fix-sepolicy-install-path.patch   |   8 +-
 ...ess-ValueError-for-sepolicy-seobject.patch |  47 
 .../selinux/selinux-python_2.8.bb |   7 --
 .../selinux/selinux-python_2.9.bb |   7 ++
 recipes-security/selinux/selinux-sandbox.inc  |  10 +-
 .../selinux-sandbox/sandbox-de-bashify.patch  |   9 +-
 .../selinux/selinux-sandbox_2.8.bb|   7 --
 .../selinux/selinux-sandbox_2.9.bb|   7 ++
 recipes-security/selinux/selinux_20180524.inc |   5 -
 recipes-security/selinux/selinux_20190315.inc |   8 ++
 recipes-security/selinux/selinux_common.inc   |   4 +-
 .../selinux/semodule-utils_2.8.bb |   7 --
 .../selinux/semodule-utils_2.9.bb |   7 ++
 ...e-with-GCC-7-due-to-possible-truncat.patch | 105 --
 ...ss-compiling-errors-for-powerpc-mips.patch |  35 --
 .../setools4-fixes-for-cross-compiling.patch  |  34 +++---
 .../{setools_4.1.1.bb => setools_4.2.2.bb}|  14 +--
 68 files changed, 348 insertions(+), 910 deletions(-)
 create mode 100644 recipes-devtools/python/python-ipy.inc
 delete mode 100644 recipes-devtools/python/python-ipy_0.83.bb
 create mode 100644 recipes-devtools/python/python-ipy_1.00.bb
 cr

[yocto] [meta-selinux][PATCH 02/19] selinux: uprev inc files to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Update SRC_URI
* Add UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/selinux_20180524.inc | 5 -
 recipes-security/selinux/selinux_20190315.inc | 8 
 recipes-security/selinux/selinux_common.inc   | 4 +---
 3 files changed, 9 insertions(+), 8 deletions(-)
 delete mode 100644 recipes-security/selinux/selinux_20180524.inc
 create mode 100644 recipes-security/selinux/selinux_20190315.inc

diff --git a/recipes-security/selinux/selinux_20180524.inc 
b/recipes-security/selinux/selinux_20180524.inc
deleted file mode 100644
index b36b333..000
--- a/recipes-security/selinux/selinux_20180524.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-SELINUX_RELEASE = "20180524"
-
-SRC_URI = 
"https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/${SELINUX_RELEASE}/${BPN}-${PV}.tar.gz";
-
-include selinux_common.inc
diff --git a/recipes-security/selinux/selinux_20190315.inc 
b/recipes-security/selinux/selinux_20190315.inc
new file mode 100644
index 000..e79dd54
--- /dev/null
+++ b/recipes-security/selinux/selinux_20190315.inc
@@ -0,0 +1,8 @@
+SELINUX_RELEASE = "20190315"
+
+SRC_URI = 
"https://github.com/SELinuxProject/selinux/releases/download/${SELINUX_RELEASE}/${BPN}-${PV}.tar.gz";
+
+UPSTREAM_CHECK_URI = "https://github.com/SELinuxProject/selinux/releases";
+UPSTREAM_CHECK_REGEX = "libselinux-(?P.+)\.tar\.gz"
+
+require selinux_common.inc
diff --git a/recipes-security/selinux/selinux_common.inc 
b/recipes-security/selinux/selinux_common.inc
index 383f62d..f6c4a6b 100644
--- a/recipes-security/selinux/selinux_common.inc
+++ b/recipes-security/selinux/selinux_common.inc
@@ -1,9 +1,7 @@
 HOMEPAGE = "https://github.com/SELinuxProject";
 
 do_compile() {
-oe_runmake all \
-INCLUDEDIR='${STAGING_INCDIR}' \
-LIBDIR='${STAGING_LIBDIR}'
+oe_runmake all
 }
 
 do_install() {
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 03/19] libsepol: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Drop patch 0001-src-Makefile-fix-includedir-in-libsepol.pc.patch

Signed-off-by: Yi Zhao 
---
 ...kefile-fix-includedir-in-libsepol.pc.patch | 29 ---
 recipes-security/selinux/libsepol_2.8.bb  |  9 --
 recipes-security/selinux/libsepol_2.9.bb  |  7 +
 3 files changed, 7 insertions(+), 38 deletions(-)
 delete mode 100644 
recipes-security/selinux/libsepol/0001-src-Makefile-fix-includedir-in-libsepol.pc.patch
 delete mode 100644 recipes-security/selinux/libsepol_2.8.bb
 create mode 100644 recipes-security/selinux/libsepol_2.9.bb

diff --git 
a/recipes-security/selinux/libsepol/0001-src-Makefile-fix-includedir-in-libsepol.pc.patch
 
b/recipes-security/selinux/libsepol/0001-src-Makefile-fix-includedir-in-libsepol.pc.patch
deleted file mode 100644
index 987fdab..000
--- 
a/recipes-security/selinux/libsepol/0001-src-Makefile-fix-includedir-in-libsepol.pc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 074dbf2f104d1a6ea1aa048600f44f9701c70a60 Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Thu, 18 Feb 2016 02:04:59 +
-Subject: [PATCH] src/Makefile: fix includedir in libsepol.pc
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang 
-Signed-off-by: Yi Zhao 

- src/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index ccb7023..2bb6290 100644
 a/src/Makefile
-+++ b/src/Makefile
-@@ -51,7 +51,7 @@ $(LIBSO): $(LOBJS) $(LIBMAP)
-   ln -sf $@ $(TARGET) 
- 
- $(LIBPC): $(LIBPC).in ../VERSION
--  sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; 
s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
-+  sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; 
s:@libdir@:${libdir}:; s:@includedir@:${prefix}/include:' < $< > $@
- 
- $(LIBMAP): $(LIBMAP).in
- ifneq ($(DISABLE_CIL),y)
--- 
-2.7.4
-
diff --git a/recipes-security/selinux/libsepol_2.8.bb 
b/recipes-security/selinux/libsepol_2.8.bb
deleted file mode 100644
index d1f905b..000
--- a/recipes-security/selinux/libsepol_2.8.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI[md5sum] = "c19aa9dde1e78d1c2bd3109579e4d484"
-SRC_URI[sha256sum] = 
"3ad6916a8352bef0bad49acc8037a5f5b48c56f94e4cb4e1959ca475fa9d24d6"
-
-SRC_URI += "file://0001-src-Makefile-fix-includedir-in-libsepol.pc.patch"
diff --git a/recipes-security/selinux/libsepol_2.9.bb 
b/recipes-security/selinux/libsepol_2.9.bb
new file mode 100644
index 000..cd55be6
--- /dev/null
+++ b/recipes-security/selinux/libsepol_2.9.bb
@@ -0,0 +1,7 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI[md5sum] = "2fdefe870a61424d8f2d5d37551c6259"
+SRC_URI[sha256sum] = 
"a34b12b038d121e3e459b1cbaca3c9202e983137819c16baf63658390e3f1d5d"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 04/19] libselinux: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Switch to python3

* Drop patches:
  0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch
  0001-src-Makefile-fix-includedir-in-libselinux.pc.patch

* Split into libselinux recipe and libselinux-python recipe to fix the
  loop dependency error.

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/libselinux.inc   | 24 +---
 ...t-define-gettid-if-glibc-2.30-is-use.patch | 60 ---
 ...file-fix-includedir-in-libselinux.pc.patch | 28 -
 .../{libselinux_2.8.bb => libselinux_2.9.bb}  | 10 ++--
 4 files changed, 6 insertions(+), 116 deletions(-)
 delete mode 100644 
recipes-security/selinux/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch
 delete mode 100644 
recipes-security/selinux/libselinux/0001-src-Makefile-fix-includedir-in-libselinux.pc.patch
 rename recipes-security/selinux/{libselinux_2.8.bb => libselinux_2.9.bb} (50%)

diff --git a/recipes-security/selinux/libselinux.inc 
b/recipes-security/selinux/libselinux.inc
index 6e115e3..8d381de 100644
--- a/recipes-security/selinux/libselinux.inc
+++ b/recipes-security/selinux/libselinux.inc
@@ -5,15 +5,10 @@ decisions.  Required for any applications that use the 
SELinux API."
 SECTION = "base"
 LICENSE = "PD"
 
-inherit lib_package pythonnative
+inherit lib_package python3native
 
-DEPENDS += "libsepol python libpcre swig-native"
+DEPENDS += "libsepol libpcre"
 DEPENDS_append_libc-musl = " fts"
-RDEPENDS_${PN}-python += "python-core python-shell"
-
-PACKAGES += "${PN}-python"
-FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
-FILES_${PN}-dbg += 
"${libdir}/python${PYTHON_BASEVERSION}/site-packages/selinux/.debug/*"
 
 def get_policyconfigarch(d):
 import re
@@ -26,19 +21,4 @@ EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
 EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre' 
LIBSEPOLA='${STAGING_LIBDIR}/libsepol.a'"
 EXTRA_OEMAKE_append_libc-musl = " FTS_LDLIBS=-lfts"
 
-do_compile_append() {
-oe_runmake pywrap -j1 \
-INCLUDEDIR='${STAGING_INCDIR}' \
-LIBDIR='${STAGING_LIBDIR}' \
-PYINC='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}'
-}
-
-do_install_append() {
-oe_runmake install-pywrap swigify \
-
PYTHONLIBDIR=${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages
-if ! ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; 
then
-rm -rf ${D}${base_sbindir}
-fi
-}
-
 BBCLASSEXTEND = "native"
diff --git 
a/recipes-security/selinux/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch
 
b/recipes-security/selinux/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch
deleted file mode 100644
index fc3e37e..000
--- 
a/recipes-security/selinux/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 2c672b4cc39fbddb6faec2c7434832058f339d59 Mon Sep 17 00:00:00 2001
-From: Petr Lautrbach 
-Date: Mon, 11 Mar 2019 16:00:41 +0100
-Subject: [PATCH] libselinux: Do not define gettid() if glibc >= 2.30 is used
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Since version 2.30 glibc implements gettid() system call wrapper, see
-https://sourceware.org/bugzilla/show_bug.cgi?id=6399
-
-Fixes:
-cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
-Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong 
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic 
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection 
-I../include -D_GNU_SOURCE  -DNO_ANDROID_BACKEND   -c -o procattr.o procattr.c
-procattr.c:28:14: error: static declaration of ‘gettid’ follows non-static 
declaration
-   28 | static pid_t gettid(void)
-  |  ^~
-In file included from /usr/include/unistd.h:1170,
- from procattr.c:2:
-/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ 
was here
-   34 | extern __pid_t gettid (void) __THROW;
-  |^~
-
-Upstream-Status: Backport
-[https://github.com/SELinuxProject/selinux/commit/707e4b8610733b5c9eaac0f00239778f3edb23c2]
-
-Signed-off-by: Petr Lautrbach 
-Signed-off-by: Yi Zhao 

- src/procattr.c | 15 +--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/src/procattr.c b/src/procattr.c
-index 8bf8432..3c7b87f 100644
 a/src/procattr.c
-+++ b/src/procattr.c
-@@ -22,8 +22,19 @@ static pthread_key_t destructor_key;
- static int destructor_key_initialized = 0;
- static __thread char destructor_initialized;
- 
--#ifndef __BIONIC__
--/* Bionic declares this in unistd.h and has a definition for it */
-+/* Bionic and glibc >= 2.30 declare gettid() system call wrapper in unistd.h 
and
-+ * has a definition for it */
-+#ifdef __BIONIC__
-+  #define OVERRIDE_GETTID 0
-+#elif !defined(__GLIBC_PREREQ)
-+  #define OVERR

[yocto] [meta-selinux][PATCH 05/19] libselinux-python: add recipe

2019-11-13 Thread Yi Zhao
After switch to python3, There is a loop dependency error with
libselinux-python package when build libselinux. Split the original
libselinux recipe into  libselinux and libselinux-python.

Signed-off-by: Yi Zhao 
---
 .../selinux/libselinux-python.inc | 40 +++
 .../selinux/libselinux-python_2.9.bb  | 18 +
 2 files changed, 58 insertions(+)
 create mode 100644 recipes-security/selinux/libselinux-python.inc
 create mode 100644 recipes-security/selinux/libselinux-python_2.9.bb

diff --git a/recipes-security/selinux/libselinux-python.inc 
b/recipes-security/selinux/libselinux-python.inc
new file mode 100644
index 000..62354b2
--- /dev/null
+++ b/recipes-security/selinux/libselinux-python.inc
@@ -0,0 +1,40 @@
+SUMMARY = "SELinux library and simple utilities"
+DESCRIPTION = "libselinux provides an API for SELinux applications to get and 
set \
+process and file security contexts and to obtain security policy \
+decisions.  Required for any applications that use the SELinux API."
+SECTION = "base"
+LICENSE = "PD"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/libselinux:"
+
+inherit python3-dir
+
+DEPENDS += "python3 swig-native"
+RDEPENDS_${PN} += "libselinux python3-core python3-shell"
+
+def get_policyconfigarch(d):
+import re
+target = d.getVar('TARGET_ARCH', True)
+p = re.compile('i.86')
+target = p.sub('i386',target)
+return "ARCH=%s" % (target)
+EXTRA_OEMAKE += "${@get_policyconfigarch(d)}"
+
+EXTRA_OEMAKE += "LDFLAGS='${LDFLAGS} -lpcre' 
LIBSEPOLA='${STAGING_LIBDIR}/libsepol.a'"
+EXTRA_OEMAKE_append_libc-musl = " FTS_LDLIBS=-lfts"
+
+FILES_${PN} = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+
+do_compile() {
+oe_runmake pywrap -j1 \
+PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
+PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \
+PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}'
+}
+
+do_install() {
+oe_runmake install-pywrap swigify \
+PYCEXT='.so' \
+PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
+
PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages'
+}
diff --git a/recipes-security/selinux/libselinux-python_2.9.bb 
b/recipes-security/selinux/libselinux-python_2.9.bb
new file mode 100644
index 000..8e3aae1
--- /dev/null
+++ b/recipes-security/selinux/libselinux-python_2.9.bb
@@ -0,0 +1,18 @@
+SELINUX_RELEASE = "20190315"
+
+SRC_URI = 
"https://github.com/SELinuxProject/selinux/releases/download/${SELINUX_RELEASE}/libselinux-${PV}.tar.gz";
+
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=84b4d2c6ef954a2d4081e775a270d0d0"
+
+SRC_URI[md5sum] = "bb449431b6ed55a0a0496dbc366d6e31"
+SRC_URI[sha256sum] = 
"1bccc8873e449587d9a2b2cf253de9b89a8291b9fbc7c59393ca9e5f5f4d2693"
+
+SRC_URI += "\
+file://libselinux-drop-Wno-unused-but-set-variable.patch \
+file://libselinux-make-O_CLOEXEC-optional.patch \
+file://libselinux-make-SOCK_CLOEXEC-optional.patch \
+file://libselinux-define-FD_CLOEXEC-as-necessary.patch \
+"
+S = "${WORKDIR}/libselinux-${PV}"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 07/19] checkpolicy: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/checkpolicy_2.8.bb | 7 ---
 recipes-security/selinux/checkpolicy_2.9.bb | 7 +++
 2 files changed, 7 insertions(+), 7 deletions(-)
 delete mode 100644 recipes-security/selinux/checkpolicy_2.8.bb
 create mode 100644 recipes-security/selinux/checkpolicy_2.9.bb

diff --git a/recipes-security/selinux/checkpolicy_2.8.bb 
b/recipes-security/selinux/checkpolicy_2.8.bb
deleted file mode 100644
index 05e738e..000
--- a/recipes-security/selinux/checkpolicy_2.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "5d23a3209048c8cf70f3c13c4ce4245f"
-SRC_URI[sha256sum] = 
"9dec811c24b88e58c3bf741365eacf1dbb945531a2fcb8f284aacf68098194c8"
diff --git a/recipes-security/selinux/checkpolicy_2.9.bb 
b/recipes-security/selinux/checkpolicy_2.9.bb
new file mode 100644
index 000..1183ea9
--- /dev/null
+++ b/recipes-security/selinux/checkpolicy_2.9.bb
@@ -0,0 +1,7 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "3b0e327f6c1a143f9720a1fbefede3c0"
+SRC_URI[sha256sum] = 
"a946c32b284532447857e4c48830f8816867c61220c8c08bdd32e6f691335f8e"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 06/19] libsemanage: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Switch to python3

* Drop patches:
  libsemanage-fix-path-nologin.patch
  0001-src-Makefile-fix-includedir-in-libselinux.pc.patch

* Rebase patches

* Update policy version to 31

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/libsemanage.inc  | 26 ++---
 ...file-fix-includedir-in-libselinux.pc.patch | 28 -
 ...anage-Fix-execve-segfaults-on-Ubuntu.patch | 12 --
 ...anage-allow-to-disable-audit-support.patch | 26 +++--
 ...anage-define-FD_CLOEXEC-as-necessary.patch | 16 
 ...-disable-expand-check-on-policy-load.patch |  6 ++-
 ...age-drop-Wno-unused-but-set-variable.patch | 12 +++---
 .../libsemanage-fix-path-nologin.patch| 39 ---
 recipes-security/selinux/libsemanage_2.8.bb   | 18 -
 recipes-security/selinux/libsemanage_2.9.bb   | 15 +++
 10 files changed, 70 insertions(+), 128 deletions(-)
 delete mode 100644 
recipes-security/selinux/libsemanage/0001-src-Makefile-fix-includedir-in-libselinux.pc.patch
 delete mode 100644 
recipes-security/selinux/libsemanage/libsemanage-fix-path-nologin.patch
 delete mode 100644 recipes-security/selinux/libsemanage_2.8.bb
 create mode 100644 recipes-security/selinux/libsemanage_2.9.bb

diff --git a/recipes-security/selinux/libsemanage.inc 
b/recipes-security/selinux/libsemanage.inc
index be0a5f1..9dc1095 100644
--- a/recipes-security/selinux/libsemanage.inc
+++ b/recipes-security/selinux/libsemanage.inc
@@ -6,41 +6,39 @@ on binary policies such as customizing policy boolean 
settings."
 SECTION = "base"
 LICENSE = "LGPLv2.1+"
 
-inherit lib_package python-dir
+inherit lib_package python3-dir
 
-DEPENDS += "libsepol libselinux bzip2 python bison-native flex-native 
swig-native"
-DEPENDS_append_class-target += "audit"
+DEPENDS += "libsepol libselinux bzip2 python3 bison-native flex-native 
swig-native"
+DEPENDS_append_class-target = " audit"
 
 PACKAGES =+ "${PN}-python"
 
 # For /usr/libexec/selinux/semanage_migrate_store
-RDEPENDS_${PN}-python += "python"
+RDEPENDS_${PN}-python += "python3-core"
 
 FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}/site-packages/* \
   ${libexecdir}/selinux/semanage_migrate_store"
 FILES_${PN}-dbg += 
"${libdir}/python${PYTHON_BASEVERSION}/site-packages/.debug/*"
 
+FILES_${PN} += "${libexecdir}"
+
 EXTRA_OEMAKE_class-native += "DISABLE_AUDIT=y"
 
 do_compile_append() {
 oe_runmake pywrap \
-INCLUDEDIR='${STAGING_INCDIR}' \
-LIBDIR='${STAGING_LIBDIR}' \
-PYLIBVER='python${PYTHON_BASEVERSION}' \
-PYINC='-I${STAGING_INCDIR}/$(PYLIBVER)' \
-PYLIB='-L${STAGING_LIBDIR}/$(PYLIBVER) -l$(PYLIBVER)' \
-PYTHONLIBDIR='${PYLIB}'
+PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
+PYINC='-I${STAGING_INCDIR}/${PYLIBVER}' \
+PYLIBS='-L${STAGING_LIBDIR}/${PYLIBVER} -l${PYLIBVER}'
 }
 
 do_install_append() {
 oe_runmake install-pywrap swigify \
 PYCEXT='.so' \
-
PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
-PYLIBVER='python${PYTHON_BASEVERSION}' \
-PYLIBDIR='${D}/${libdir}/$(PYLIBVER)'
+PYLIBVER='python${PYTHON_BASEVERSION}${PYTHON_ABI}' \
+
PYTHONLIBDIR='${D}${libdir}/python${PYTHON_BASEVERSION}/site-packages'
 
 # Update "policy-version" for semanage.conf
-sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 30/' \
+sed -i 's/^#\s*\(policy-version\s*=\).*$/\1 31/' \
${D}/etc/selinux/semanage.conf
 }
 
diff --git 
a/recipes-security/selinux/libsemanage/0001-src-Makefile-fix-includedir-in-libselinux.pc.patch
 
b/recipes-security/selinux/libsemanage/0001-src-Makefile-fix-includedir-in-libselinux.pc.patch
deleted file mode 100644
index 73613d3..000
--- 
a/recipes-security/selinux/libsemanage/0001-src-Makefile-fix-includedir-in-libselinux.pc.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e773c0952b06370d81e9b113f9b0b3388e323e52 Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Thu, 18 Feb 2016 02:39:16 +
-Subject: [PATCH] src/Makefile: fix includedir in libselinux.pc
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang 
-Signed-off-by: Yi Zhao 

- src/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/Makefile b/src/Makefile
-index dea751e..4af4568 100644
 a/src/Makefile
-+++ b/src/Makefile
-@@ -93,6 +93,7 @@ $(LIBSO): $(LOBJS)
- 
- $(LIBPC): $(LIBPC).in ../VERSION
-   sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; 
s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
-+  sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; 
s:@libdir@:${libdir}:; s:@includedir@:${prefix}/include:' < $< > $@
- 
- semanageswig_python_exception.i: ../include/semanage/semanage.h
-   bash -e exception.sh > $@ || (rm -f $@ ; false)
--- 
-2.7.4
-
diff --git 
a/recipes-security/selinux/libsemanage/libsemanage-Fix-execve-segfaults-on-Ubuntu.patch
 
b/recipes-security/sel

[yocto] [meta-selinux][PATCH 11/19] restorecond: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Rebase patches

Signed-off-by: Yi Zhao 
---
 ...icycoreutils-make-O_CLOEXEC-optional.patch | 29 +++
 recipes-security/selinux/restorecond_2.8.bb   |  7 -
 recipes-security/selinux/restorecond_2.9.bb   |  7 +
 3 files changed, 24 insertions(+), 19 deletions(-)
 delete mode 100644 recipes-security/selinux/restorecond_2.8.bb
 create mode 100644 recipes-security/selinux/restorecond_2.9.bb

diff --git 
a/recipes-security/selinux/restorecond/policycoreutils-make-O_CLOEXEC-optional.patch
 
b/recipes-security/selinux/restorecond/policycoreutils-make-O_CLOEXEC-optional.patch
index ab1a10a..2928aff 100644
--- 
a/recipes-security/selinux/restorecond/policycoreutils-make-O_CLOEXEC-optional.patch
+++ 
b/recipes-security/selinux/restorecond/policycoreutils-make-O_CLOEXEC-optional.patch
@@ -1,29 +1,34 @@
+From 4adc1c02e4da42f64249c05534875e732f043693 Mon Sep 17 00:00:00 2001
+From: Joe MacDonald 
+Date: Wed, 6 Nov 2019 23:17:50 +0800
 Subject: [PATCH] policycoreutils: make O_CLOEXEC optional
 
-Various commits in the selinux tree in the current release added O_CLOEXEC
-to open() calls in an attempt to address file descriptor leaks as
-described:
+Various commits in the selinux tree in the current release added
+O_CLOEXEC to open() calls in an attempt to address file descriptor leaks
+as described:
 
-   http://danwalsh.livejournal.com/53603.html
+  http://danwalsh.livejournal.com/53603.html
 
 However O_CLOEXEC isn't available on all platforms, so make it a
-compile-time option and generate a warning when it is not available.  The
-actual impact of leaking these file descriptors is minimal, though it does
-produce curious AVC Denied messages.
+compile-time option and generate a warning when it is not available.
+The actual impact of leaking these file descriptors is minimal, though
+it does produce curious AVC Denied messages.
 
-Uptream-Status: Inappropriate [O_CLOEXEC has been in Linux since 2007 and 
POSIX since 2008]
+Uptream-Status: Inappropriate
+[O_CLOEXEC has been in Linux since 2007 and POSIX since 2008]
 
 Signed-off-by: Joe MacDonald 
 Signed-off-by: Wenzong Fan 
+Signed-off-by: Yi Zhao 
 ---
- user.c |8 +++-
+ user.c | 8 +++-
  1 file changed, 7 insertions(+), 1 deletion(-)
 
 diff --git a/user.c b/user.c
-index 2c28676..6235772 100644
+index 714aae7..bbf018e 100644
 --- a/user.c
 +++ b/user.c
-@@ -202,7 +202,13 @@ static int local_server() {
+@@ -202,7 +202,13 @@ static int local_server(void) {
perror("asprintf");
return -1;
}
@@ -39,5 +44,5 @@ index 2c28676..6235772 100644
g_warning ("Lock file: %s", ptr);
  
 -- 
-1.7.9.5
+2.7.4
 
diff --git a/recipes-security/selinux/restorecond_2.8.bb 
b/recipes-security/selinux/restorecond_2.8.bb
deleted file mode 100644
index 4a83a23..000
--- a/recipes-security/selinux/restorecond_2.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "cfe4e4d6184623fdcb9bc2681e693abb"
-SRC_URI[sha256sum] = 
"323cab1128e5308cd85fea0e5c98e3c8973e1ada0b659f2fce76187e192271bf"
diff --git a/recipes-security/selinux/restorecond_2.9.bb 
b/recipes-security/selinux/restorecond_2.9.bb
new file mode 100644
index 000..2ccac18
--- /dev/null
+++ b/recipes-security/selinux/restorecond_2.9.bb
@@ -0,0 +1,7 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "1a24cb2a23d8bd01d3f8d9bb2031981f"
+SRC_URI[sha256sum] = 
"cbf9820583e641ee0462fa7bc89e6024676af281e025703e17b2d019b1a25a4f"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 08/19] secilc: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/secilc_2.8.bb | 7 ---
 recipes-security/selinux/secilc_2.9.bb | 7 +++
 2 files changed, 7 insertions(+), 7 deletions(-)
 delete mode 100644 recipes-security/selinux/secilc_2.8.bb
 create mode 100644 recipes-security/selinux/secilc_2.9.bb

diff --git a/recipes-security/selinux/secilc_2.8.bb 
b/recipes-security/selinux/secilc_2.8.bb
deleted file mode 100644
index 89e0684..000
--- a/recipes-security/selinux/secilc_2.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5fb82e8deb357d4e5fd8f3fed01d2f38"
-
-SRC_URI[md5sum] = "a3c363545842aadc6645a94112b476e7"
-SRC_URI[sha256sum] = 
"cfe15f2e06b3013c9dfc46cf42234ff07fb61866c4c29d739eb8858f83b214d4"
diff --git a/recipes-security/selinux/secilc_2.9.bb 
b/recipes-security/selinux/secilc_2.9.bb
new file mode 100644
index 000..8207905
--- /dev/null
+++ b/recipes-security/selinux/secilc_2.9.bb
@@ -0,0 +1,7 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5fb82e8deb357d4e5fd8f3fed01d2f38"
+
+SRC_URI[md5sum] = "489cedf50fa277ce07765053ffcdb4d5"
+SRC_URI[sha256sum] = 
"73a1806e33a669e23545da2d35d0e5038714721f6bf71974eaa533b3ebde61b2"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 12/19] selinux-python: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Switch to python3

* Drop patches:
  fix-TypeError-for-seobject.py.patch
  process-ValueError-for-sepolicy-seobject.patch

* Rebase patches

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/selinux-python.inc   | 62 +--
 .../fix-TypeError-for-seobject.py.patch   | 30 -
 .../fix-sepolicy-install-path.patch   |  8 +--
 ...ess-ValueError-for-sepolicy-seobject.patch | 47 --
 .../selinux/selinux-python_2.8.bb |  7 ---
 .../selinux/selinux-python_2.9.bb |  7 +++
 6 files changed, 40 insertions(+), 121 deletions(-)
 delete mode 100644 
recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch
 delete mode 100644 
recipes-security/selinux/selinux-python/process-ValueError-for-sepolicy-seobject.patch
 delete mode 100644 recipes-security/selinux/selinux-python_2.8.bb
 create mode 100644 recipes-security/selinux/selinux-python_2.9.bb

diff --git a/recipes-security/selinux/selinux-python.inc 
b/recipes-security/selinux/selinux-python.inc
index 8b34bff..5e27781 100644
--- a/recipes-security/selinux/selinux-python.inc
+++ b/recipes-security/selinux/selinux-python.inc
@@ -6,60 +6,54 @@ SELinux utilities audit2allow, chcat, semanage ..."
 SECTION = "base"
 LICENSE = "GPLv2+"
 
-SRC_URI += "file://fix-sepolicy-install-path.patch \
-file://fix-TypeError-for-seobject.py.patch \
-file://process-ValueError-for-sepolicy-seobject.patch \
-"
+SRC_URI += "file://fix-sepolicy-install-path.patch"
 
-inherit python-dir
+inherit python3-dir
 
-DEPENDS += "python-native libsepol"
+DEPENDS += "python3 libsepol"
 RDEPENDS_${BPN}-audit2allow += "\
-python-core \
-python-textutils \
+python3-core \
 libselinux-python \
 ${BPN}-sepolgen \
 "
 RDEPENDS_${BPN}-chcat += "\
-python-core \
-python-codecs \
-python-shell \
-python-stringold \
-python-unixadmin \
+python3-core \
+python3-codecs \
+python3-shell \
+python3-stringold \
+python3-unixadmin \
 libselinux-python \
 ${BPN} \
 "
 RDEPENDS_${BPN} += "\
-python-core \
-python-codecs \
-python-io \
-python-ipy \
-python-re \
-python-stringold \
-python-syslog \
-python-unixadmin \
+python3-core \
+python3-codecs \
+python3-io \
+python3-ipy \
+python3-stringold \
+python3-syslog \
+python3-unixadmin \
 libselinux-python \
 libsemanage-python \
 setools \
 "
 RDEPENDS_${BPN}-semanage += "\
-python-core \
-python-ipy \
-python-compression \
-python-xml \
-python-misc \
+python3-core \
+python3-ipy \
+python3-compression \
+python3-xml \
+python3-misc \
 libselinux-python \
 ${BPN} \
 "
 RDEPENDS_${BPN}-sepolicy += "\
-python-argparse \
-python-codecs \
-python-core \
-python-syslog \
+python3-core \
+python3-codecs \
+python3-syslog \
 ${BPN} \
 "
 RDEPENDS_${BPN}-sepolgen-ifgen += "\
-python \
+python3-core \
 libselinux-python \
 "
 
@@ -96,7 +90,7 @@ FILES_${PN}-sepolgen += "\
 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolgen* \
 ${localstatedir}/lib/sepolgen/perm_map \
 "
-# Map to policycoreutils-python in 2.6
+
 FILES_${PN} += "\
 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/seobject.py* \
 ${libdir}/python${PYTHON_BASEVERSION}/site-packages/sepolicy*.egg-info 
\
@@ -104,9 +98,11 @@ FILES_${PN} += "\
 "
 
 EXTRA_OEMAKE += "LIBSEPOLA=${STAGING_LIBDIR}/libsepol.a"
+
 do_install() {
-oe_runmake DESTDIR=${D} \
+oe_runmake DESTDIR="${D}" \
 LIBDIR="${libdir}" \
+PYLIBVER='python${PYTHON_BASEVERSION}' \
 
PYTHONLIBDIR='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
 install
 }
diff --git 
a/recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch 
b/recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch
deleted file mode 100644
index 62cdeee..000
--- 
a/recipes-security/selinux/selinux-python/fix-TypeError-for-seobject.py.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 98c2944ffa3e35095187e1df9ff33498bbd0fa54 Mon Sep 17 00:00:00 2001
-From: Wenzong Fan 
-Date: Tue, 1 Apr 2014 02:53:36 -0400
-Subject: [PATCH] policycoreutils: fix TypeError for seobject.py
-
-File "/usr/lib64/python2.7/site-packages/seobject.py", line 109, in log
-  message += " sename=" + sename
-TypeError: cannot concatenate 'str' and 'NoneType' objects
-
-Uptream-Status: Pending
-
-Signed-off-by: Wenzong Fan 
-

- semanage/seobject.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/semanage/seobject.py b/semanage/seobject.py
-index 70fd192..23ab77e 10

[yocto] [meta-selinux][PATCH 09/19] policycoreutils: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Switch to python3

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/policycoreutils.inc| 16 
 recipes-security/selinux/policycoreutils_2.8.bb |  8 
 recipes-security/selinux/policycoreutils_2.9.bb |  8 
 3 files changed, 12 insertions(+), 20 deletions(-)
 delete mode 100644 recipes-security/selinux/policycoreutils_2.8.bb
 create mode 100644 recipes-security/selinux/policycoreutils_2.9.bb

diff --git a/recipes-security/selinux/policycoreutils.inc 
b/recipes-security/selinux/policycoreutils.inc
index 85ff164..92f7a75 100644
--- a/recipes-security/selinux/policycoreutils.inc
+++ b/recipes-security/selinux/policycoreutils.inc
@@ -19,7 +19,7 @@ DEPENDS += "libsepol libselinux libsemanage libcap 
gettext-native"
 EXTRA_DEPENDS = "libcap-ng libcgroup"
 DEPENDS += "${@['', '${EXTRA_DEPENDS}']['${PN}' != '${BPN}-native']}"
 
-inherit selinux pythonnative
+inherit selinux python3native
 
 RDEPENDS_${BPN}-fixfiles += "\
${BPN}-setfiles \
@@ -27,7 +27,6 @@ RDEPENDS_${BPN}-fixfiles += "\
findutils \
 "
 RDEPENDS_${BPN}-genhomedircon += "\
-   ${BPN}-genhomedircon \
${BPN}-semodule \
 "
 RDEPENDS_${BPN}-loadpolicy += "\
@@ -45,10 +44,6 @@ RDEPENDS_${BPN}-semodule += "\
libselinux \
libsemanage \
 "
-# static link to libsepol
-RDEPENDS_${BPN}-semodule-expand += "libsepol libselinux"
-RDEPENDS_${BPN}-semodule-link += "libsepol libselinux"
-RDEPENDS_${BPN}-semodule-package += "libsepol libselinux"
 RDEPENDS_${BPN}-sestatus += "libselinux"
 RDEPENDS_${BPN}-setfiles += "\
libselinux \
@@ -61,10 +56,6 @@ RDEPENDS_${BPN}-setsebool += "\
 "
 RDEPENDS_${BPN} += "selinux-python"
 
-WARN_QA_remove = " unsafe-references-in-scripts"
-ERROR_QA_remove = " unsafe-references-in-scripts"
-
-
 PACKAGES =+ "\
${PN}-fixfiles \
${PN}-genhomedircon \
@@ -102,6 +93,7 @@ FILES_${PN}-sestatus += "\
 "
 FILES_${PN}-setfiles += "\
${base_sbindir}/restorecon \
+   ${base_sbindir}/restorecon_xattr \
${base_sbindir}/setfiles \
 "
 FILES_${PN}-setsebool += "\
@@ -147,7 +139,7 @@ sysroot_stage_dirs_append_class-native() {
 }
 
 do_compile_prepend() {
-   export PYTHON=python
+   export PYTHON=python3
export PYLIBVER='python${PYTHON_BASEVERSION}'
export PYTHON_CPPFLAGS="-I${STAGING_INCDIR}/${PYLIBVER}"
export PYTHON_LDFLAGS="${STAGING_LIBDIR}/lib${PYLIBVER}.so"
@@ -155,7 +147,7 @@ do_compile_prepend() {
 }
 
 do_install_prepend() {
-   export PYTHON=python
+   export PYTHON=python3
export SBINDIR="${D}/${base_sbindir}"
 }
 
diff --git a/recipes-security/selinux/policycoreutils_2.8.bb 
b/recipes-security/selinux/policycoreutils_2.8.bb
deleted file mode 100644
index 85f6ff0..000
--- a/recipes-security/selinux/policycoreutils_2.8.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "da5ceb9c7e1e6f8c573731031b91cffe"
-SRC_URI[sha256sum] = 
"986553a235f27bee7ad7c2b7c35ea51eb2ee68e2cf03b661b1585de101bc1099"
-
diff --git a/recipes-security/selinux/policycoreutils_2.9.bb 
b/recipes-security/selinux/policycoreutils_2.9.bb
new file mode 100644
index 000..08ba54a
--- /dev/null
+++ b/recipes-security/selinux/policycoreutils_2.9.bb
@@ -0,0 +1,8 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "0fbebdb4761353726cc739d5528f21d8"
+SRC_URI[sha256sum] = 
"c53c344f28007b3c0742bd958751e9b5d2385898adeb8aec6281ae57342f0f7b"
+
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 10/19] mcstrans: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Rebase patches

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/mcstrans.inc |  4 ++--
 .../mcstrans/mcstrans-de-bashify.patch| 23 +++
 ...tch => mcstrans-fix-the-init-script.patch} | 14 +++
 recipes-security/selinux/mcstrans_2.8.bb  |  7 --
 recipes-security/selinux/mcstrans_2.9.bb  |  7 ++
 5 files changed, 32 insertions(+), 23 deletions(-)
 rename 
recipes-security/selinux/mcstrans/{0001-mcstrans-fix-the-init-script.patch => 
mcstrans-fix-the-init-script.patch} (69%)
 delete mode 100644 recipes-security/selinux/mcstrans_2.8.bb
 create mode 100644 recipes-security/selinux/mcstrans_2.9.bb

diff --git a/recipes-security/selinux/mcstrans.inc 
b/recipes-security/selinux/mcstrans.inc
index 0eb8720..b9c670b 100644
--- a/recipes-security/selinux/mcstrans.inc
+++ b/recipes-security/selinux/mcstrans.inc
@@ -7,7 +7,7 @@ SECTION = "base"
 LICENSE = "GPLv2+"
 
 SRC_URI += "file://mcstrans-de-bashify.patch \
-file://0001-mcstrans-fix-the-init-script.patch \
+file://mcstrans-fix-the-init-script.patch \
 "
 
 inherit systemd update-rc.d
@@ -29,7 +29,7 @@ do_install_append() {
 else
 install -d ${D}${sysconfdir}/default/volatiles
 echo "d root root 0755 /var/run/setrans none" \
->${D}${sysconfdir}/default/volatiles/volatiles.80_mcstrans
+>${D}${sysconfdir}/default/volatiles/80_mcstrans
 fi
 install -d ${D}${datadir}/mcstrans
 cp -r share/* ${D}${datadir}/mcstrans/.
diff --git a/recipes-security/selinux/mcstrans/mcstrans-de-bashify.patch 
b/recipes-security/selinux/mcstrans/mcstrans-de-bashify.patch
index 805d7e5..27fd677 100644
--- a/recipes-security/selinux/mcstrans/mcstrans-de-bashify.patch
+++ b/recipes-security/selinux/mcstrans/mcstrans-de-bashify.patch
@@ -1,21 +1,23 @@
-commit 54875dcb50f5e40fc86d6fe98dde244bfe4751af
-Author: Joe MacDonald 
-Date:   Fri Aug 7 15:16:45 2015 -0400
+From 544b3c078374e5001e7fdc1b7d0b2eafda36f8fe Mon Sep 17 00:00:00 2001
+From: Joe MacDonald 
+Date: Fri, 7 Aug 2015 15:16:45 -0400
+Subject: [PATCH] mcstrans: remove dependency on bash in initscript
 
-mcstrans: remove dependency on bash in initscript
+There were no apparent bashisms in mcstrans.init, so remove the
+dependency on bash.
 
-There were no apparent bashisms in mcstrans.init, so remove the dependency
-on bash.
-
-Signed-off-by: Joe MacDonald 
+Signed-off-by: Joe MacDonald 
 
 Upstream-Status: Pending
 
 Signed-off-by: Wenzong Fan 
+Signed-off-by: Yi Zhao 
 ---
- src/mcstrans.init |2 +-
+ src/mcstrans.init | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
+diff --git a/src/mcstrans.init b/src/mcstrans.init
+index 2804ec0..8b4737d 100644
 --- a/src/mcstrans.init
 +++ b/src/mcstrans.init
 @@ -1,4 +1,4 @@
@@ -24,3 +26,6 @@ Signed-off-by: Wenzong Fan 
  #
  # mcstransdThis starts and stops mcstransd
  #
+-- 
+2.7.4
+
diff --git 
a/recipes-security/selinux/mcstrans/0001-mcstrans-fix-the-init-script.patch 
b/recipes-security/selinux/mcstrans/mcstrans-fix-the-init-script.patch
similarity index 69%
rename from 
recipes-security/selinux/mcstrans/0001-mcstrans-fix-the-init-script.patch
rename to recipes-security/selinux/mcstrans/mcstrans-fix-the-init-script.patch
index 5f7163d..79be090 100644
--- a/recipes-security/selinux/mcstrans/0001-mcstrans-fix-the-init-script.patch
+++ b/recipes-security/selinux/mcstrans/mcstrans-fix-the-init-script.patch
@@ -1,17 +1,21 @@
-[PATCH] mcstrans: fix the init script
-
-Upstream-Status: Inappropriate [embedded specific]
+From 4d918a9679d2902ca2d41fe769a4d76f07a67b5f Mon Sep 17 00:00:00 2001
+From: Roy Li 
+Date: Wed, 6 Nov 2019 22:13:33 +0800
+Subject: [PATCH] mcstrans: fix the init script
 
 replace daemon with start-stop-daemon, due to not daemon functions
 
+Upstream-Status: Inappropriate [embedded specific]
+
 Signed-off-by: Roy Li 
 Signed-off-by: Wenzong Fan 
+Signed-off-by: Yi Zhao 
 ---
  src/mcstrans.init | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/src/mcstrans.init b/src/mcstrans.init
-index 2804ec0..c660290 100644
+index 8b4737d..86c89ea 100644
 --- a/src/mcstrans.init
 +++ b/src/mcstrans.init
 @@ -51,7 +51,7 @@ start(){
@@ -24,5 +28,5 @@ index 2804ec0..c660290 100644
echo
if test $RETVAL = 0 ; then
 -- 
-1.9.1
+2.7.4
 
diff --git a/recipes-security/selinux/mcstrans_2.8.bb 
b/recipes-security/selinux/mcstrans_2.8.bb
deleted file mode 100644
index 8923c3c..000
--- a/recipes-security/selinux/mcstrans_2.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI[md5sum] = "3a0edb2a8b6a255199824abd58c0906c"
-SRC_URI[sha256sum] = 
"ec6ea65660550ed6bbd2a834725ba7526ac53599753d7b95072e4afd4afc14e4"
diff --git a/recipes-security/selinux/mcstrans_2.9.bb 
b/recipes-security/selinux/mcstrans_2.9.bb
new file mode 100644
index 000..34aab03
--- /dev/null
+++ b/recipes-sec

[yocto] [meta-selinux][PATCH 17/19] selinux-init: fix build error when enable usrmerge feature

2019-11-13 Thread Yi Zhao
Fix the following error when enable usrmerge feature:

ERROR: selinux-init-0.1-r0 do_package: QA Issue: selinux-init:
Files/directories were installed but not shipped in any package:
  /usr
Please set FILES such that these items are packaged. Alternatively if
they are unneeded, avoid installing them or delete them within
do_install.
selinux-init: 1 installed and not shipped files. [installed-vs-shipped]

We don't need to install systemd service file when systemd feature is
not enabled.

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/selinux-initsh.inc | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/recipes-security/selinux/selinux-initsh.inc 
b/recipes-security/selinux/selinux-initsh.inc
index 8e31cda..f27750d 100644
--- a/recipes-security/selinux/selinux-initsh.inc
+++ b/recipes-security/selinux/selinux-initsh.inc
@@ -27,10 +27,9 @@ do_install () {
   -e '/.*HERE$/d' -e '/.*Contents.*sysvinit/d' \
   ${D}${sysconfdir}/init.d/${SELINUX_SCRIPT_DST}
 
-   install -d ${D}${systemd_unitdir}/system
-   install -m 0644 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.service 
${D}${systemd_unitdir}/system
-
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', 
d)}; then
+   install -d ${D}${systemd_unitdir}/system
+   install -m 0644 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.service 
${D}${systemd_unitdir}/system
install -d ${D}${bindir}
install -m 0755 ${WORKDIR}/${SELINUX_SCRIPT_SRC}.sh 
${D}${bindir}
sed -i -e '/.*HERE$/d' ${D}${bindir}/${SELINUX_SCRIPT_SRC}.sh
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 16/19] semodule-utils: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/semodule-utils_2.8.bb | 7 ---
 recipes-security/selinux/semodule-utils_2.9.bb | 7 +++
 2 files changed, 7 insertions(+), 7 deletions(-)
 delete mode 100644 recipes-security/selinux/semodule-utils_2.8.bb
 create mode 100644 recipes-security/selinux/semodule-utils_2.9.bb

diff --git a/recipes-security/selinux/semodule-utils_2.8.bb 
b/recipes-security/selinux/semodule-utils_2.8.bb
deleted file mode 100644
index c56f776..000
--- a/recipes-security/selinux/semodule-utils_2.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "51c69e612481ce971e2ae825139d2ca0"
-SRC_URI[sha256sum] = 
"44f59c13070c637440b143ceab4dfe1efb9018b1e47828dd8789def74c1ccadf"
diff --git a/recipes-security/selinux/semodule-utils_2.9.bb 
b/recipes-security/selinux/semodule-utils_2.9.bb
new file mode 100644
index 000..a9c0fbd
--- /dev/null
+++ b/recipes-security/selinux/semodule-utils_2.9.bb
@@ -0,0 +1,7 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "9e7e6afe33459cae2de5360e97f1e702"
+SRC_URI[sha256sum] = 
"8083679ee634570f6e9a18632f2c2862b9134fa308b689b2e1952a369ae5d907"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 14/19] selinux-sandbox: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Switch to python3
* Rebase patch

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/selinux-sandbox.inc   | 10 --
 .../selinux/selinux-sandbox/sandbox-de-bashify.patch   |  9 +
 recipes-security/selinux/selinux-sandbox_2.8.bb|  7 ---
 recipes-security/selinux/selinux-sandbox_2.9.bb|  7 +++
 4 files changed, 16 insertions(+), 17 deletions(-)
 delete mode 100644 recipes-security/selinux/selinux-sandbox_2.8.bb
 create mode 100644 recipes-security/selinux/selinux-sandbox_2.9.bb

diff --git a/recipes-security/selinux/selinux-sandbox.inc 
b/recipes-security/selinux/selinux-sandbox.inc
index 854640c..c8e335a 100644
--- a/recipes-security/selinux/selinux-sandbox.inc
+++ b/recipes-security/selinux/selinux-sandbox.inc
@@ -13,12 +13,10 @@ SRC_URI += "file://sandbox-de-bashify.patch \
 DEPENDS += "libcap-ng libselinux"
 
 RDEPENDS_${PN} += "\
-python-core \
-python-math \
-python-shell \
-python-subprocess \
-python-textutils \
-python-unixadmin \
+python3-core \
+python3-math \
+python3-shell \
+python3-unixadmin \
 libselinux-python \
 selinux-python \
 "
diff --git a/recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch 
b/recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch
index 18cef4b..e9622f0 100644
--- a/recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch
+++ b/recipes-security/selinux/selinux-sandbox/sandbox-de-bashify.patch
@@ -1,4 +1,4 @@
-From d3e778e0062ca441c80e2a3ef2b508f5566e1f70 Mon Sep 17 00:00:00 2001
+From b92c39f0be5552c19923f75aef4487348a08b7dc Mon Sep 17 00:00:00 2001
 From: Joe MacDonald 
 Date: Fri, 20 Feb 2015 21:07:47 -0500
 Subject: [PATCH] sandbox: de-bashify
@@ -10,9 +10,10 @@ Upstream-Status: Pending
 
 Signed-off-by: Joe MacDonald 
 Signed-off-by: Wenzong Fan 
+Signed-off-by: Yi Zhao 
 ---
- sandbox/sandbox.init | 2 +-
- sandbox/sandboxX.sh  | 2 +-
+ sandbox.init | 2 +-
+ sandboxX.sh  | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/sandbox.init b/sandbox.init
@@ -36,5 +37,5 @@ index eaa500d..8755d75 100644
  context=`id -Z | secon -t -l -P`
  export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut 
-b8-80`"
 -- 
-1.9.1
+2.7.4
 
diff --git a/recipes-security/selinux/selinux-sandbox_2.8.bb 
b/recipes-security/selinux/selinux-sandbox_2.8.bb
deleted file mode 100644
index 1eb6c2d..000
--- a/recipes-security/selinux/selinux-sandbox_2.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "957f5d0fc7724f93f502d1d632568894"
-SRC_URI[sha256sum] = 
"025f84f76e07b7bfc9ba1e9215f4ddb646d41a2e935a65e07560feaa6fc20ef3"
diff --git a/recipes-security/selinux/selinux-sandbox_2.9.bb 
b/recipes-security/selinux/selinux-sandbox_2.9.bb
new file mode 100644
index 000..b1dd462
--- /dev/null
+++ b/recipes-security/selinux/selinux-sandbox_2.9.bb
@@ -0,0 +1,7 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "3482b8fa6648160e97ba48ad26f84e7d"
+SRC_URI[sha256sum] = 
"01915f57f08642751dea550a87f82a6f2fcec754be48dcfa28266c14bd044262"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 13/19] selinux-dbus: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Switch to python3

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/selinux-dbus.inc| 2 +-
 recipes-security/selinux/selinux-dbus_2.8.bb | 7 ---
 recipes-security/selinux/selinux-dbus_2.9.bb | 7 +++
 3 files changed, 8 insertions(+), 8 deletions(-)
 delete mode 100644 recipes-security/selinux/selinux-dbus_2.8.bb
 create mode 100644 recipes-security/selinux/selinux-dbus_2.9.bb

diff --git a/recipes-security/selinux/selinux-dbus.inc 
b/recipes-security/selinux/selinux-dbus.inc
index 1b66136..62e45b7 100644
--- a/recipes-security/selinux/selinux-dbus.inc
+++ b/recipes-security/selinux/selinux-dbus.inc
@@ -5,7 +5,7 @@ Provide SELinux dbus service files and scripts."
 SECTION = "base"
 LICENSE = "GPLv2+"
 
-RDEPENDS_${PN} += "python selinux-python-sepolicy"
+RDEPENDS_${PN} += "python3-core selinux-python-sepolicy"
 
 FILES_${PN} += "\
 ${datadir}/system-config-selinux/selinux_server.py \
diff --git a/recipes-security/selinux/selinux-dbus_2.8.bb 
b/recipes-security/selinux/selinux-dbus_2.8.bb
deleted file mode 100644
index 5091624..000
--- a/recipes-security/selinux/selinux-dbus_2.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "23f0264df3ed123904a17d71f2a5b325"
-SRC_URI[sha256sum] = 
"3339cb9cd77579bab6158afc054409c3bf952e282ef957ea732b19c9f4697bc6"
diff --git a/recipes-security/selinux/selinux-dbus_2.9.bb 
b/recipes-security/selinux/selinux-dbus_2.9.bb
new file mode 100644
index 000..ab00ffc
--- /dev/null
+++ b/recipes-security/selinux/selinux-dbus_2.9.bb
@@ -0,0 +1,7 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "e403f9745fad67aae5903909572ca5b8"
+SRC_URI[sha256sum] = 
"ac54cecdea6a88b4a818981ac82654d054a3c5232b1b282ebf7418c3e350cc7a"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 15/19] selinux-gui: uprev to 2.9 (20190315)

2019-11-13 Thread Yi Zhao
* Switch to python3

Signed-off-by: Yi Zhao 
---
 recipes-security/selinux/selinux-gui.inc| 2 +-
 recipes-security/selinux/selinux-gui_2.8.bb | 7 ---
 recipes-security/selinux/selinux-gui_2.9.bb | 7 +++
 3 files changed, 8 insertions(+), 8 deletions(-)
 delete mode 100644 recipes-security/selinux/selinux-gui_2.8.bb
 create mode 100644 recipes-security/selinux/selinux-gui_2.9.bb

diff --git a/recipes-security/selinux/selinux-gui.inc 
b/recipes-security/selinux/selinux-gui.inc
index 1096f3f..725eb23 100644
--- a/recipes-security/selinux/selinux-gui.inc
+++ b/recipes-security/selinux/selinux-gui.inc
@@ -6,7 +6,7 @@ Policy Generation Tool (selinux-polgengui)"
 SECTION = "base"
 LICENSE = "GPLv2+"
 
-RDEPENDS_${PN} += "python"
+RDEPENDS_${PN} += "python3-core"
 
 FILES_${PN} += " \
 ${datadir}/system-config-selinux/* \
diff --git a/recipes-security/selinux/selinux-gui_2.8.bb 
b/recipes-security/selinux/selinux-gui_2.8.bb
deleted file mode 100644
index 2c0fcd8..000
--- a/recipes-security/selinux/selinux-gui_2.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-include selinux_20180524.inc
-include ${BPN}.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI[md5sum] = "52000c14ffa86840220915bd1d777845"
-SRC_URI[sha256sum] = 
"17acd3004f01f92b288cc1322317d7964f5039fb26ba1542b6713a7147a2351d"
diff --git a/recipes-security/selinux/selinux-gui_2.9.bb 
b/recipes-security/selinux/selinux-gui_2.9.bb
new file mode 100644
index 000..0bb051c
--- /dev/null
+++ b/recipes-security/selinux/selinux-gui_2.9.bb
@@ -0,0 +1,7 @@
+require selinux_20190315.inc
+require ${BPN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
+
+SRC_URI[md5sum] = "1bfe5eeb861f8563a7b397ab8530ab52"
+SRC_URI[sha256sum] = 
"bbd9e1799cc0c22d64c815c3033a54393f6f84947ff2841a4df60ded5eee0510"
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH 18/19] setools: upgrade 4.1.1 -> 4.2.2

2019-11-13 Thread Yi Zhao
* Switch to python3

* Drop patches:
  Fix-build-failure-with-GCC-7-due-to-possible-truncat.patch
  setools4-fix-cross-compiling-errors-for-powerpc-mips.patch

Signed-off-by: Yi Zhao 
---
 ...e-with-GCC-7-due-to-possible-truncat.patch | 105 --
 ...ss-compiling-errors-for-powerpc-mips.patch |  35 --
 .../setools4-fixes-for-cross-compiling.patch  |  34 +++---
 .../{setools_4.1.1.bb => setools_4.2.2.bb}|  14 +--
 4 files changed, 19 insertions(+), 169 deletions(-)
 delete mode 100644 
recipes-security/setools/setools/Fix-build-failure-with-GCC-7-due-to-possible-truncat.patch
 delete mode 100644 
recipes-security/setools/setools/setools4-fix-cross-compiling-errors-for-powerpc-mips.patch
 rename recipes-security/setools/{setools_4.1.1.bb => setools_4.2.2.bb} (61%)

diff --git 
a/recipes-security/setools/setools/Fix-build-failure-with-GCC-7-due-to-possible-truncat.patch
 
b/recipes-security/setools/setools/Fix-build-failure-with-GCC-7-due-to-possible-truncat.patch
deleted file mode 100644
index a5af041..000
--- 
a/recipes-security/setools/setools/Fix-build-failure-with-GCC-7-due-to-possible-truncat.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Upstream-Status: Backport 
[https://github.com/TresysTechnology/setools/commit/e41adf0]
-
-Signed-off-by: Kai Kang 
-
-From e41adf01647c695b80b112b337e76021bb9f30c3 Mon Sep 17 00:00:00 2001
-From: Laurent Bigonville 
-Date: Tue, 26 Sep 2017 15:15:30 +0200
-Subject: [PATCH] Fix build failure with GCC 7 due to possible truncation of
- snprintf output
-
-setools fails to build under GCC7 -Wformat -Werror with the following error:
-
-x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -g -O2 -fdebug-prefix-map=/<>=. 
-fstack-protector-strong -Wformat -Werror=format-security -Wno-sign-compare 
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Ilibqpol -Ilibqpol/include 
-I/usr/include/python3.6m -c libqpol/policy_extend.c -o 
build/temp.linux-amd64-3.6/libqpol/policy_extend.o -Werror -Wextra 
-Waggregate-return -Wfloat-equal -Wformat -Wformat=2 -Winit-self 
-Wmissing-format-attribute -Wmissing-include-dirs -Wnested-externs 
-Wold-style-definition -Wpointer-arith -Wredundant-decls -Wstrict-prototypes 
-Wunknown-pragmas -Wwrite-strings -Wno-missing-field-initializers 
-Wno-unused-parameter -Wno-cast-qual -Wno-shadow -Wno-unreachable-code 
-fno-exceptions
-libqpol/policy_extend.c: In function 'policy_extend':
-libqpol/policy_extend.c:161:27: error: '%04zd' directive output may be 
truncated writing between 4 and 10 bytes into a region of size 5 
[-Werror=format-truncation=]
-snprintf(buff, 9, "@ttr%04zd", i + 1);
-   ^
-libqpol/policy_extend.c:161:22: note: directive argument in the range [1, 
4294967295]
-snprintf(buff, 9, "@ttr%04zd", i + 1);
-  ^~~
-
-Increase the size of the buffer to avoid collisions
-
-Closes: https://github.com/TresysTechnology/setools/issues/174
-Signed-off-by: Laurent Bigonville 

- libqpol/policy_extend.c | 16 
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/libqpol/policy_extend.c b/libqpol/policy_extend.c
-index 742819b..739e184 100644
 a/libqpol/policy_extend.c
-+++ b/libqpol/policy_extend.c
-@@ -110,7 +110,7 @@ static int qpol_policy_remove_bogus_aliases(qpol_policy_t 
* policy)
-  *  Builds data for the attributes and inserts them into the policydb.
-  *  This function modifies the policydb. Names created for attributes
-  *  are of the form @ttr where value is the value of the attribute
-- *  as a four digit number (prepended with 0's as needed).
-+ *  as a ten digit number (prepended with 0's as needed).
-  *  @param policy The policy from which to read the attribute map and
-  *  create the type data for the attributes. This policy will be altered
-  *  by this function.
-@@ -125,7 +125,7 @@ static int qpol_policy_build_attrs_from_map(qpol_policy_t 
* policy)
-   uint32_t bit = 0, count = 0;
-   ebitmap_node_t *node = NULL;
-   type_datum_t *tmp_type = NULL, *orig_type;
--  char *tmp_name = NULL, buff[10];
-+  char *tmp_name = NULL, buff[16];
-   int error = 0, retv;
- 
-   INFO(policy, "%s", "Generating attributes for policy. (Step 4 of 5)");
-@@ -137,7 +137,7 @@ static int qpol_policy_build_attrs_from_map(qpol_policy_t 
* policy)
- 
-   db = &policy->p->p;
- 
--  memset(&buff, 0, 10 * sizeof(char));
-+  memset(&buff, 0, 16 * sizeof(char));
- 
-   for (i = 0; i < db->p_types.nprim; i++) {
-   /* skip types */
-@@ -158,7 +158,7 @@ static int qpol_policy_build_attrs_from_map(qpol_policy_t 
* policy)
-* with this attribute */
-   /* Does not exist */
-   if (db->p_type_val_to_name[i] == NULL){
--  snprintf(buff, 9, "@ttr%04zd", i + 1);
-+  snprintf(buff, 15, "@ttr%010zd", i + 1);
-   tmp_name = strdup(buff);
-   if (!tmp_name) {
-   

[yocto] [meta-selinux][PATCH 19/19] audit: switch to python3

2019-11-13 Thread Yi Zhao
* Switch to python3

* Drop patches:
  audit-python-configure.patch
  audit-python.patch
  fix-swig-host-contamination.patch

Signed-off-by: Yi Zhao 
---
 .../audit/audit/audit-python-configure.patch  | 46 -
 .../audit/audit/audit-python.patch| 64 ---
 .../audit/fix-swig-host-contamination.patch   | 56 
 recipes-security/audit/audit_2.8.5.bb | 11 ++--
 4 files changed, 4 insertions(+), 173 deletions(-)
 delete mode 100644 recipes-security/audit/audit/audit-python-configure.patch
 delete mode 100644 recipes-security/audit/audit/audit-python.patch
 delete mode 100644 
recipes-security/audit/audit/fix-swig-host-contamination.patch

diff --git a/recipes-security/audit/audit/audit-python-configure.patch 
b/recipes-security/audit/audit/audit-python-configure.patch
deleted file mode 100644
index 37096b0..000
--- a/recipes-security/audit/audit/audit-python-configure.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 6a2710db094061e1956fac3ed81114d0e958ea21 Mon Sep 17 00:00:00 2001
-From: Li xin 
-Date: Sun, 19 Jul 2015 00:49:13 +0900
-Subject: [PATCH] audit: python cross-compile
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Xin Ouyang 
-Signed-off-by: Li Xin 
-Signed-off-by: Wenzong Fan 
-Signed-off-by: T.O. Radzy Radzykewycz 

- configure.ac | 17 ++---
- 1 file changed, 2 insertions(+), 15 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 6e345f1..54bdbf1 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -99,21 +99,8 @@ if test "x$use_python" = xno ; then
- else
- AC_MSG_RESULT(testing)
- AM_PATH_PYTHON
--PYINCLUDEDIR=`python${am_cv_python_version} -c "from distutils import 
sysconfig; print(sysconfig.get_config_var('INCLUDEPY'))"`
--if test -f ${PYINCLUDEDIR}/Python.h ; then
--  python_found="yes"
--  AC_SUBST(PYINCLUDEDIR)
--  pybind_dir="python"
--  AC_SUBST(pybind_dir)
--  AC_MSG_NOTICE(Python bindings will be built)
--else
--  python_found="no"
--  if test "x$use_python" = xyes ; then
--  AC_MSG_ERROR([Python explicitly requested and python headers 
were not found])
--  else
--  AC_MSG_WARN("Python headers not found - python bindings will 
not be made")
--  fi
--fi
-+python_found="yes"
-+AC_MSG_NOTICE(Python bindings will be built)
- fi
- AM_CONDITIONAL(HAVE_PYTHON, test ${python_found} = "yes")
- 
--- 
-2.7.4
-
diff --git a/recipes-security/audit/audit/audit-python.patch 
b/recipes-security/audit/audit/audit-python.patch
deleted file mode 100644
index c1a2595..000
--- a/recipes-security/audit/audit/audit-python.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 9d95d7e28a2c4cbefa998d375de180c731a151b1 Mon Sep 17 00:00:00 2001
-From: Li xin 
-Date: Sun, 19 Jul 2015 01:40:48 +0900
-Subject: [PATCH] Remove hard coded python include directory
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Mark Hatle 

- bindings/Makefile.am| 8 +++-
- bindings/python/python2/Makefile.am | 3 ++-
- bindings/swig/python/Makefile.am| 5 +++--
- 3 files changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/bindings/Makefile.am b/bindings/Makefile.am
-index 5b5c576..7a15205 100644
 a/bindings/Makefile.am
-+++ b/bindings/Makefile.am
-@@ -22,4 +22,10 @@
- 
- CONFIG_CLEAN_FILES = *.loT *.rej *.orig
- 
--SUBDIRS = python golang swig
-+SUBDIRS = swig
-+if HAVE_PYTHON
-+SUBDIRS += python
-+endif
-+if HAVE_GOLANG
-+SUBDIRS += golang
-+endif
-diff --git a/bindings/python/python2/Makefile.am 
b/bindings/python/python2/Makefile.am
-index 1dcb5bc..6226358 100644
 a/bindings/python/python2/Makefile.am
-+++ b/bindings/python/python2/Makefile.am
-@@ -23,7 +23,8 @@
- 
- CONFIG_CLEAN_FILES = *.loT *.rej *.orig
- AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing
--AM_CPPFLAGS = -I$(top_builddir) -I@PYINCLUDEDIR@
-+PYINC ?= /usr/include/python$(PYTHON_VERSION)
-+AM_CPPFLAGS = -I$(top_builddir) -I${PYINC}
- 
- pyexec_LTLIBRARIES = auparse.la
- 
-diff --git a/bindings/swig/python/Makefile.am 
b/bindings/swig/python/Makefile.am
-index 8c98b94..ae7c52b 100644
 a/bindings/swig/python/Makefile.am
-+++ b/bindings/swig/python/Makefile.am
-@@ -21,9 +21,10 @@
- #
- CONFIG_CLEAN_FILES = *.loT *.rej *.orig
- AM_CFLAGS = -fPIC -DPIC -fno-strict-aliasing
--AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I@PYINCLUDEDIR@
-+PYINC ?= /usr/include/$(PYLIBVER)
-+AM_CPPFLAGS = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
- SWIG_FLAGS = -python
--SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I@PYINCLUDEDIR@
-+SWIG_INCLUDES = -I. -I$(top_builddir) -I${top_srcdir}/lib -I${PYINC}
- pyexec_PYTHON = audit.py
- pyexec_LTLIBRARIES = _audit.la
- pyexec_SOLIBRARIES = _audit.so
--- 
-2.7.4
-
diff --git a/recipes-security/audit/audit/fix-swig-host-contamination.patch 
b/recipes-security/audit/audit/fix-swig-host-contamination.patch
deleted file mode 100644
index 184f515..000
--- a/recipes-security/audit/audit/fix-swig-h

Re: [yocto] Collaboration on Testing GCC/LLVM Toolchains

2019-11-13 Thread Khem Raj
On Wed, Nov 13, 2019 at 4:02 PM Nicholas Krause  wrote:
>
> Greetings All,
>
> I'm a student working on multi-threading GCC and researching it. Seems
> that it my
>
> time doing it and other things with the project it would be great to
> start collaborating
>
> on testing gcc/llvm upstream with Yocto. Granted there is a testsuite
> for both but it
>
> would be great to also test it against a build system that builds real
> world software.
>
> Furthermore I'm aware that this is done for Yocto toolchain selection
> internally but it
>
> would be great if we can start collaborating on testing upstream
> toolchains if
>
> possible.

I think its a good idea. Currently, we test released versions mostly,
however, there is
a class to switch to git versions and primarily be able to use tip of
master for a given
recipe, this would be something I wish we had but so far we have not
fully completed it
I know Ross had started this work and created initial skeleton, So
step one would be to
complete that class so we can easily switch recipes to use dev
versions of packages
this will go beyond GCC but certainly will be a tremendous achievement.

>
>
> Not sure if that's done already so sorry for the noise if it is,
>
> Nick
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] QA notification for completed autobuilder build (yocto-2.7.2.rc1)

2019-11-13 Thread Jain, Sangeeta
Hello All,

Intel and WR YP QA is planning for QA execution for YP build yocto-2.7.2.rc1.
We are planning to execute following tests for this cycle:

OEQA-manual tests for following module:
1. OE-Core
2. BSP-hw
3. BSP-Qemu

Runtime auto test for following platforms:
1. MinnowTurbot 32-bit
2. Coffee Lake
3. NUC 7
4. NUC 6
5. Edgerouter
6. MPC8315e-rdb
7. Beaglebone

ETA for completion is Monday, November 18.

Thanks & Regards,
Sangeeta Jain
>-Original Message-
>From: Pokybuild User 
>Sent: Thursday, October 31, 2019 1:23 AM
>To: yocto@yoctoproject.org
>Cc: ota...@ossystems.com.br; yi.z...@windriver.com; Sangal, Apoorv
>; Yeoh, Ee Peng ; Chan,
>Aaron Chun Yew ; Ang, Chin Huat
>; richard.pur...@linuxfoundation.org;
>akuster...@gmail.com; sjolley.yp...@gmail.com; Jain, Sangeeta
>
>Subject: QA notification for completed autobuilder build (yocto-2.7.2.rc1)
>
>
>A build flagged for QA (yocto-2.7.2.rc1) was completed on the autobuilder and 
>is
>available at:
>
>
>https://autobuilder.yocto.io/pub/releases/yocto-2.7.2.rc1
>
>
>Build hash information:
>
>bitbake: 75d6648f232a06b99c54a1e33324a7fc1cd15b38
>meta-gplv2: d5d9fc9a4bbd365d6cd6fe4d6a8558f7115c17da
>meta-intel: ca26bed652722167b2dbe0042cfc2406029e9c6c
>meta-mingw: 10695afe8cd406844e0d0dd868c11677e07557d4
>oecore: 726c3b92298981f5aa2f2449ceeec7b4bf84ed29
>poky: d0f73121551dc98f6924cd77952bf9ebf5ef3dd7
>
>
>
>This is an automated message from the Yocto Project Autobuilder
>Git: git://git.yoctoproject.org/yocto-autobuilder2
>Email: richard.pur...@linuxfoundation.org
>
>
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] QA notification for completed autobuilder build (yocto-2.7.2.rc1)

2019-11-13 Thread akuster808



On 11/13/19 6:09 PM, Jain, Sangeeta wrote:
> Hello All,
>
> Intel and WR YP QA is planning for QA execution for YP build yocto-2.7.2.rc1.
> We are planning to execute following tests for this cycle:
>
> OEQA-manual tests for following module:
> 1. OE-Core
> 2. BSP-hw
> 3. BSP-Qemu
>
> Runtime auto test for following platforms:
> 1. MinnowTurbot 32-bit
> 2. Coffee Lake
> 3. NUC 7
> 4. NUC 6
> 5. Edgerouter
> 6. MPC8315e-rdb
> 7. Beaglebone
>
> ETA for completion is Monday, November 18.
ok. sound good.

thanks,
Armin
>
> Thanks & Regards,
> Sangeeta Jain
>> -Original Message-
>> From: Pokybuild User 
>> Sent: Thursday, October 31, 2019 1:23 AM
>> To: yocto@yoctoproject.org
>> Cc: ota...@ossystems.com.br; yi.z...@windriver.com; Sangal, Apoorv
>> ; Yeoh, Ee Peng ; Chan,
>> Aaron Chun Yew ; Ang, Chin Huat
>> ; richard.pur...@linuxfoundation.org;
>> akuster...@gmail.com; sjolley.yp...@gmail.com; Jain, Sangeeta
>> 
>> Subject: QA notification for completed autobuilder build (yocto-2.7.2.rc1)
>>
>>
>> A build flagged for QA (yocto-2.7.2.rc1) was completed on the autobuilder 
>> and is
>> available at:
>>
>>
>>https://autobuilder.yocto.io/pub/releases/yocto-2.7.2.rc1
>>
>>
>> Build hash information:
>>
>> bitbake: 75d6648f232a06b99c54a1e33324a7fc1cd15b38
>> meta-gplv2: d5d9fc9a4bbd365d6cd6fe4d6a8558f7115c17da
>> meta-intel: ca26bed652722167b2dbe0042cfc2406029e9c6c
>> meta-mingw: 10695afe8cd406844e0d0dd868c11677e07557d4
>> oecore: 726c3b92298981f5aa2f2449ceeec7b4bf84ed29
>> poky: d0f73121551dc98f6924cd77952bf9ebf5ef3dd7
>>
>>
>>
>> This is an automated message from the Yocto Project Autobuilder
>> Git: git://git.yoctoproject.org/yocto-autobuilder2
>> Email: richard.pur...@linuxfoundation.org
>>
>>
>>

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH] wic: add swap partition and set /root and /swap size

2019-11-13 Thread Hongxu Jia
- Add swap partition to workaround memory limitation

- Support to set /root and /swap size, 4G /root and 1G /swap by default

Signed-off-by: Hongxu Jia 
---
 conf/machine/include/rpi-base.inc   | 5 -
 wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in} | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)
 rename wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in} (75%)

diff --git a/conf/machine/include/rpi-base.inc 
b/conf/machine/include/rpi-base.inc
index 36a8daf..de2f366 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -6,7 +6,10 @@ SOC_FAMILY = "rpi"
 include conf/machine/include/soc-family.inc
 
 IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
-WKS_FILE ?= "sdimage-raspberrypi.wks"
+
+PI_WKS_ROOT_SIZE ?= "--size=4096M --overhead-factor 1"
+PI_WKS_SWAP_SIZE ?= "--size=1024M --overhead-factor 1"
+WKS_FILE ?= "sdimage-raspberrypi.wks.in"
 
 XSERVER = " \
 xserver-xorg \
diff --git a/wic/sdimage-raspberrypi.wks b/wic/sdimage-raspberrypi.wks.in
similarity index 75%
rename from wic/sdimage-raspberrypi.wks
rename to wic/sdimage-raspberrypi.wks.in
index 01fbaea..81707c7 100644
--- a/wic/sdimage-raspberrypi.wks
+++ b/wic/sdimage-raspberrypi.wks.in
@@ -3,4 +3,5 @@
 # Raspberry Pi. Boot files are located in the first vfat partition.
 
 part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label 
boot --active --align 4096 --size 20
-part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 
4096 ${PI_WKS_ROOT_SIZE}
+part swap --ondisk mmcblk0 --size 44 --label swap --fstype=swap 
${PI_WKS_SWAP_SIZE}
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH] wic: add swap partition and set /root and /swap size

2019-11-13 Thread Khem Raj
On Thu, 2019-11-14 at 06:04 +, Hongxu Jia wrote:
> - Add swap partition to workaround memory limitation
> 
> - Support to set /root and /swap size, 4G /root and 1G /swap by
> default
> 
> Signed-off-by: Hongxu Jia 
> ---
>  conf/machine/include/rpi-base.inc   | 5
> -
>  wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in} | 3 ++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>  rename wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in}
> (75%)
> 
> diff --git a/conf/machine/include/rpi-base.inc
> b/conf/machine/include/rpi-base.inc
> index 36a8daf..de2f366 100644
> --- a/conf/machine/include/rpi-base.inc
> +++ b/conf/machine/include/rpi-base.inc
> @@ -6,7 +6,10 @@ SOC_FAMILY = "rpi"
>  include conf/machine/include/soc-family.inc
>  
>  IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
> -WKS_FILE ?= "sdimage-raspberrypi.wks"
> +
> +PI_WKS_ROOT_SIZE ?= "--size=4096M --overhead-factor 1"

this means we need minimum 4G cards.

> +PI_WKS_SWAP_SIZE ?= "--size=1024M --overhead-factor 1"

I think these options should be not set here. if someone wants they
should be injected by local config.

> +WKS_FILE ?= "sdimage-raspberrypi.wks.in"
>  
>  XSERVER = " \
>  xserver-xorg \
> diff --git a/wic/sdimage-raspberrypi.wks b/wic/sdimage-
> raspberrypi.wks.in
> similarity index 75%
> rename from wic/sdimage-raspberrypi.wks
> rename to wic/sdimage-raspberrypi.wks.in
> index 01fbaea..81707c7 100644
> --- a/wic/sdimage-raspberrypi.wks
> +++ b/wic/sdimage-raspberrypi.wks.in
> @@ -3,4 +3,5 @@
>  # Raspberry Pi. Boot files are located in the first vfat partition.
>  
>  part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat 
> --label boot --active --align 4096 --size 20
> -part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
> --align 4096
> +part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
> --align 4096 ${PI_WKS_ROOT_SIZE}
> +part swap --ondisk mmcblk0 --size 44 --label swap --fstype=swap
> ${PI_WKS_SWAP_SIZE}

its using --size 44, perhaps thats default if its not set via
PI_WKS_SWAP_SIZE

> -- 
> 2.17.1
> 

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [meta-raspberrypi][PATCH] wic: add swap partition and set /root and /swap size

2019-11-13 Thread Hongxu Jia

On 11/14/19 2:30 PM, Khem Raj wrote:

On Thu, 2019-11-14 at 06:04 +, Hongxu Jia wrote:

- Add swap partition to workaround memory limitation

- Support to set /root and /swap size, 4G /root and 1G /swap by
default

Signed-off-by: Hongxu Jia 
---
  conf/machine/include/rpi-base.inc   | 5
-
  wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in} | 3 ++-
  2 files changed, 6 insertions(+), 2 deletions(-)
  rename wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in}
(75%)

diff --git a/conf/machine/include/rpi-base.inc
b/conf/machine/include/rpi-base.inc
index 36a8daf..de2f366 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -6,7 +6,10 @@ SOC_FAMILY = "rpi"
  include conf/machine/include/soc-family.inc
  
  IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"

-WKS_FILE ?= "sdimage-raspberrypi.wks"
+
+PI_WKS_ROOT_SIZE ?= "--size=4096M --overhead-factor 1"

this means we need minimum 4G cards.


+PI_WKS_SWAP_SIZE ?= "--size=1024M --overhead-factor 1"

I think these options should be not set here. if someone wants they
should be injected by local config.


OK, I will comments them out as a example

//Hongxu


+WKS_FILE ?= "sdimage-raspberrypi.wks.in"
  
  XSERVER = " \

  xserver-xorg \
diff --git a/wic/sdimage-raspberrypi.wks b/wic/sdimage-
raspberrypi.wks.in
similarity index 75%
rename from wic/sdimage-raspberrypi.wks
rename to wic/sdimage-raspberrypi.wks.in
index 01fbaea..81707c7 100644
--- a/wic/sdimage-raspberrypi.wks
+++ b/wic/sdimage-raspberrypi.wks.in
@@ -3,4 +3,5 @@
  # Raspberry Pi. Boot files are located in the first vfat partition.
  
  part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat

--label boot --active --align 4096 --size 20
-part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
--align 4096
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root
--align 4096 ${PI_WKS_ROOT_SIZE}
+part swap --ondisk mmcblk0 --size 44 --label swap --fstype=swap
${PI_WKS_SWAP_SIZE}

its using --size 44, perhaps thats default if its not set via
PI_WKS_SWAP_SIZE


--
2.17.1





--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH V2] wic: support to set /root size and add extra partition

2019-11-13 Thread Hongxu Jia
- Support to add extra partition, such as add swap partition
  to workaround memory limitation

- Support to set /root size

Signed-off-by: Hongxu Jia 
---
 conf/machine/include/rpi-base.inc | 11 ++-
 ...age-raspberrypi.wks => sdimage-raspberrypi.wks.in} |  3 ++-
 2 files changed, 12 insertions(+), 2 deletions(-)
 rename wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in} (85%)

diff --git a/conf/machine/include/rpi-base.inc 
b/conf/machine/include/rpi-base.inc
index af1418d..9d0b688 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -6,7 +6,16 @@ SOC_FAMILY = "rpi"
 include conf/machine/include/soc-family.inc
 
 IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
-WKS_FILE ?= "sdimage-raspberrypi.wks"
+
+# Set size of /root partition, such as 4G
+# PI_WKS_ROOT_SIZE ?= "--size=4096M --overhead-factor 1"
+PI_WKS_ROOT_SIZE ?= ""
+
+# Add extra partition, such as 1G size /swap
+# PI_WKS_EXTRA_PARTTION = "part swap --ondisk mmcblk0 --size 44 --label swap 
--fstype=swap --size=1024M --overhead-factor 1"
+PI_WKS_EXTRA_PARTTION ?= ""
+
+WKS_FILE ?= "sdimage-raspberrypi.wks.in"
 
 XSERVER = " \
 xserver-xorg \
diff --git a/wic/sdimage-raspberrypi.wks b/wic/sdimage-raspberrypi.wks.in
similarity index 85%
rename from wic/sdimage-raspberrypi.wks
rename to wic/sdimage-raspberrypi.wks.in
index 01fbaea..743d757 100644
--- a/wic/sdimage-raspberrypi.wks
+++ b/wic/sdimage-raspberrypi.wks.in
@@ -3,4 +3,5 @@
 # Raspberry Pi. Boot files are located in the first vfat partition.
 
 part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label 
boot --active --align 4096 --size 20
-part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 
4096 ${PI_WKS_ROOT_SIZE}
+${PI_WKS_EXTRA_PARTTION}
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH V3] wic: support to set /root size and add extra partition

2019-11-13 Thread Hongxu Jia
- Support to add extra partition, such as add swap partition
  to workaround memory limitation

- Support to set /root size

Signed-off-by: Hongxu Jia 
---
 conf/machine/include/rpi-base.inc | 11 ++-
 ...age-raspberrypi.wks => sdimage-raspberrypi.wks.in} |  3 ++-
 2 files changed, 12 insertions(+), 2 deletions(-)
 rename wic/{sdimage-raspberrypi.wks => sdimage-raspberrypi.wks.in} (85%)

diff --git a/conf/machine/include/rpi-base.inc 
b/conf/machine/include/rpi-base.inc
index af1418d..c4dffd3 100644
--- a/conf/machine/include/rpi-base.inc
+++ b/conf/machine/include/rpi-base.inc
@@ -6,7 +6,16 @@ SOC_FAMILY = "rpi"
 include conf/machine/include/soc-family.inc
 
 IMAGE_FSTYPES ?= "tar.bz2 ext3 rpi-sdimg"
-WKS_FILE ?= "sdimage-raspberrypi.wks"
+
+# Set size of /root partition, such as 4G
+# PI_WKS_ROOT_SIZE ?= "--size=4096M --overhead-factor 1"
+PI_WKS_ROOT_SIZE ?= ""
+
+# Add extra partition, such as 1G size /swap
+# PI_WKS_EXTRA_PARTTION = "part swap --ondisk mmcblk0 --label swap 
--fstype=swap --size=1024M --overhead-factor 1"
+PI_WKS_EXTRA_PARTTION ?= ""
+
+WKS_FILE ?= "sdimage-raspberrypi.wks.in"
 
 XSERVER = " \
 xserver-xorg \
diff --git a/wic/sdimage-raspberrypi.wks b/wic/sdimage-raspberrypi.wks.in
similarity index 85%
rename from wic/sdimage-raspberrypi.wks
rename to wic/sdimage-raspberrypi.wks.in
index 01fbaea..743d757 100644
--- a/wic/sdimage-raspberrypi.wks
+++ b/wic/sdimage-raspberrypi.wks.in
@@ -3,4 +3,5 @@
 # Raspberry Pi. Boot files are located in the first vfat partition.
 
 part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label 
boot --active --align 4096 --size 20
-part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 4096
+part / --source rootfs --ondisk mmcblk0 --fstype=ext4 --label root --align 
4096 ${PI_WKS_ROOT_SIZE}
+${PI_WKS_EXTRA_PARTTION}
-- 
2.17.1

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto