[yocto] eSDK: python3.5.real: No such file or directory

2019-07-17 Thread Gabriele Zampieri
Hi all,

I just created my first eSDK for a custom image. It installs just fine.
When I try to run "devtool --help" (after sourcing the env setup), I got
this output:
/home/user/poky_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/python3: line 5:
/home/user/poky_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/python3.5.real:
No such file or directory
I have python3.5 installed on my host.

Thanks in advance,
Gabriele
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [OE-core] RFC: dropping official support for Debian 8 / Opensuse 42.3

2019-07-17 Thread Zoran Stojsavljevic
> Fedora 28 is also unsupported (but will be the basis of CentOS 8).

Yesterday I upgraded my host Fedora 29 to Fedora 30. With Fedora, all
clear. F30 is the newest release, F31 is in preparation. F28 support
ceased to exist one month after F30 was released. The algorithm is the
following: Support ceased to exist for F(XY) after a month from the
official date F(XY+2) was introduced/released. The introduction cycle
for new release is 6 months. YOCTO wise. ;-)

Hope this clears the confusion for Fedora distro (official first
relative of kernel.org, which usually finishes testing cycle for
kernel.org)!

Zoran
___

On Thu, Jul 18, 2019 at 8:04 AM Adrian Bunk  wrote:
>
> On Wed, Jul 17, 2019 at 09:37:31PM +0100, Burton, Ross wrote:
> > Hi,
> >
> > Now that both Debian 8 and OpenSuse 42.3 are end-of-life and no longer
> > formally supported, we think it's time to drop them from the supported
> > distribution list.
>
> Debian 8 is still LTS-supported for a year, unless there is urgency to
> drop support for it the right time for dropping would be after 2.8
> (2.9 release and Debian 8 LTS EOL will both be in Q2 2020).
>
> Should OpenSuse be dropped, or just the version upgraded to 15.1?
>
> Fedora 28 is also unsupported (but will be the basis of CentOS 8).
>
> > Initially this involves removing them from the
> > SANITY_TESTED_DISTROS list in Poky, at some point during this cycle we
> > may remove those distributions from the Yocto Project autobuilder to
> > add more workers for other supported distributions.
> >
> > It is expected that the next release will probably work on those two
> > distributions, there are no plans to do new and exciting things
> > dropping these unsupported distributions enables -- like increasing
> > the minimum Python version to 3.5 until after the 2.8 release in
> > October.
>
> CentOS 7 is based on Fedora 19 from 2013.
>
> This is the oldest currently supported distribution, and when to remove
> support for it (replacing it with the not yet existing CentOS 8) should
> IMHO be part of this discussion.
>
> >...
> > Ross
>
> 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


Re: [yocto] [OE-core] RFC: dropping official support for Debian 8 / Opensuse 42.3

2019-07-17 Thread Adrian Bunk
On Wed, Jul 17, 2019 at 09:37:31PM +0100, Burton, Ross wrote:
> Hi,
> 
> Now that both Debian 8 and OpenSuse 42.3 are end-of-life and no longer
> formally supported, we think it's time to drop them from the supported
> distribution list.

Debian 8 is still LTS-supported for a year, unless there is urgency to 
drop support for it the right time for dropping would be after 2.8
(2.9 release and Debian 8 LTS EOL will both be in Q2 2020).

Should OpenSuse be dropped, or just the version upgraded to 15.1?

Fedora 28 is also unsupported (but will be the basis of CentOS 8).

> Initially this involves removing them from the
> SANITY_TESTED_DISTROS list in Poky, at some point during this cycle we
> may remove those distributions from the Yocto Project autobuilder to
> add more workers for other supported distributions.
> 
> It is expected that the next release will probably work on those two
> distributions, there are no plans to do new and exciting things
> dropping these unsupported distributions enables -- like increasing
> the minimum Python version to 3.5 until after the 2.8 release in
> October.

CentOS 7 is based on Fedora 19 from 2013.

This is the oldest currently supported distribution, and when to remove 
support for it (replacing it with the not yet existing CentOS 8) should
IMHO be part of this discussion.

>...
> Ross

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] List of Supported Python versions

2019-07-17 Thread jaymin . dabhi

Hello Team,

Which Python, Python-OpenCV, Python-Numpy, Python-Scipy and OpenCV 
(max)versions are supported in Yocto 2.0.3 (Jethro) distro version?


Can I get list of notes in which version of all supported modules have 
been mentioned?



Please let me know.

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


[yocto] [layerindex-web][PATCH 000/126] Docker setup / misc fixes (cover letter only)

2019-07-17 Thread Paul Eggleton
The Clear Linux* Dissector [1] is a special-purpose fork of the OE Layer
Index codebase. During development a number of general-purpose fixes have
been made, so I am now sending a slightly reworked set of these back to be
merged into the layer index. Highlights:

* Enhanced docker/docker-compose setup with script for one-command
  installation - this is now the preferred method of installation for
  uses other than development, so the README documentation has been
  updated accordingly.
* User-selectable security questions for password resets
* Fixes for spec file importing
* Various minor security fixes

[1] https://github.com/intel/clear-linux-dissector-web


The following changes since commit dba1fbe5d1c5d8714d7ca3ca86c42972ebde128e:

  RRS: add missing migration (2019-05-28 09:57:58 +1200)

are available in the Git repository at:

  git://git.yoctoproject.org/layerindex-web paule/dissector-backports
  
http://git.yoctoproject.org/cgit.cgi/layerindex-web/log/?h=paule/dissector-backports

Amber Elliot (6):
  docker: add setup script
  admin.py: Add custom SiteAdmin model.
  Upgrade django-registration to version 3.0.
  Add user security questions
  layerindex/urls.py: improve formatting
  requirements.txt: Require secure version of Django.

Paul Eggleton (119):
  Add ability to hide branches
  Split out recipe dependency handling to its own function
  docker: Add docker-compose file
  update_classic_status: recognise pythonhosted.org as python
  update_classic_status: set category for KDE packages
  update_classic_status: categorise perl packages
  import_otherdistro: add description option
  import_otherdistro: improve display of deleted items
  dockersetup: formatting fixes
  dockersetup: add some error checking to the setup script
  dockersetup: tweak portmapping option and display port
  docker/nginx*.conf: fix up indentation
  docker: use quoted values
  dockersetup: add HTTPS support and use by default
  dockersetup: Show intro message
  dockersetup: add letsencrypt support
  nginx: set some limits for DDOS protection
  docker: set mariadb wait_timeout to upstream default
  dockerignore: add docker files and tests
  docker: enable user/password for RabbitMQ server
  dockersetup: move HTTPS code to its own function
  dockersetup: support update/reinstall mode
  dockersetup: fix auto-generated passwords
  dockersetup: warn if http proxy specified without https
  dockersetup: use separate db account with lower privileges
  dockersetup: use with open in readfile/writefile
  .gitignore: add some more files/dirs
  dockersetup: support importing gzip compressed database dumps
  docker: pass through options for migrate script
  docker: restart services automatically unless stopped
  Update TableSorter to latest version of active fork
  Disable caching on auth views
  docker: enable SECURE_BROWSER_XSS_FILTER
  Use shell=False where possible with utils.runcmd()
  dockersetup: import database dump before running migrations
  dockersetup: move superuser account creation to the end
  dockersetup: set site info and email host
  Rework README documents
  import_layers: fix URL construction
  Add a script to create initial db dump
  dockersetup: add option to skip database migrations
  dockersetup: enable error report emails
  Disable autocomplete on sensitive fields
  docker: Increase nginx max upload size
  docker: increase gunicorn worker timeout to handle large images
  ClassicRecipeDetailView does not need a form
  Add ability to disposition comparison patches
  Add access controls to PatchDispositionAdmin
  import_otherdistro: refactor spec file import
  import_otherdistro.py: avoid deleting all records if no spec files found
  import_otherdistro.py: create layer/branch if they don't exist
  Add sha256sum to Source model
  Record sha256sum of other distro source files
  dockersetup: require email address
  import_otherdistro: optionally store local path
  import_otherdistro: fix handling of garbage in description values
  Determine if spec file patches are actually applied and striplevel
  docker-compose: fix missing DATABASE_USER for layerscelery service
  docker: add dependencies for derivative import
  tasks: support running non-shell commands
  tasks: fix incorrect closing tag on button
  Enable task log/progress to work within docker
  tasks: handle carriage returns in task output
  Record configure options
  Fix erroneously importing package fields from spec files
  docker: use python3 in migrate script
  docker: improve nginx https configuration security
  docker: Increase max packet size to 128M
  tasks: disable broker heartbeat to workaround connection issues
  dockersetup: 'easy' subprocess conversions to not use shell=True
  dockersetup: require python 3.4.3 or later
  More shell quoting
  dockersetup: remove redundant code to update non-HTTPS lines in nginx-ssl.conf
  dockersetup: update nginx-ssl.conf in update mode
  Reimplement simplesearch
  admin: allow searching ClassicRecipes by cover_pn
 

Re: [yocto] [OE-core] RFC: dropping official support for Debian 8 / Opensuse 42.3

2019-07-17 Thread akuster808



On 7/17/19 1:37 PM, Burton, Ross wrote:
> Hi,
>
> Now that both Debian 8 and OpenSuse 42.3 are end-of-life and no longer
> formally supported, we think it's time to drop them from the supported
> distribution list.  Initially this involves removing them from the
> SANITY_TESTED_DISTROS list in Poky, at some point during this cycle we
> may remove those distributions from the Yocto Project autobuilder to
> add more workers for other supported distributions.
>
> It is expected that the next release will probably work on those two
> distributions, there are no plans to do new and exciting things
> dropping these unsupported distributions enables -- like increasing
> the minimum Python version to 3.5 until after the 2.8 release in
> October.
>
> Please, if this impacts you, speak up now.

+1
>
> Ross

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


Re: [yocto] Patching a file in $WORKDIR

2019-07-17 Thread Siegel, Jeffrey (Nokia - US/Murray Hill)
Thanks for the help. I got it to work using 'patchdir' as Ross recommended:

readline_7.0.bbappend:
# We do this to enable the "Home" and "End" keys
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI+="file://inputrc.patch;patchdir=${WORKDIR}"

Regards,
Jeff

-Original Message-
From: Burton, Ross [mailto:ross.bur...@intel.com] 
Sent: Wednesday, July 17, 2019 6:01 AM
To: Siegel, Jeffrey (Nokia - US/Murray Hill) 
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Patching a file in $WORKDIR

On Tue, 16 Jul 2019 at 17:45, Siegel, Jeffrey (Nokia - US/Murray Hill) 
 wrote:
> I am trying to use a bbappend file to patch a file in $WORKDIR. To my 
> understanding, the native Yocto patching process only works for patching 
> files in $S.

No, the default directory for patch application is $S (for obvious reasons).  
You can change the path that is patched by using the `patchdir` parameter:

https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-SRC_URI

Also as Gabriele said, only .patch and .diff files are applied automatically.  
Best to rename to inputrc.patch.

> Using devshell, I have confirmed that the “patch” program being executed is 
> the one from the Yocto environment ($BUILDDIR/tmp-glibc/hosttools), not the 
> build host.

Have a look at what hosttools/patch actually is: you'll see it's just a symlink 
to /usr/bin/patch.

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


[yocto] RFC: dropping official support for Debian 8 / Opensuse 42.3

2019-07-17 Thread Burton, Ross
Hi,

Now that both Debian 8 and OpenSuse 42.3 are end-of-life and no longer
formally supported, we think it's time to drop them from the supported
distribution list.  Initially this involves removing them from the
SANITY_TESTED_DISTROS list in Poky, at some point during this cycle we
may remove those distributions from the Yocto Project autobuilder to
add more workers for other supported distributions.

It is expected that the next release will probably work on those two
distributions, there are no plans to do new and exciting things
dropping these unsupported distributions enables -- like increasing
the minimum Python version to 3.5 until after the 2.8 release in
October.

Please, if this impacts you, speak up now.

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


[yocto] [ptest-runner][PATCH 3/4] tests: fix clang warnings.

2019-07-17 Thread Randy MacLeod
Make tests build using: clang -Weverything
There are a few warnings that remain that are not
variable casting or macro fixes.

Signed-off-by: Randy MacLeod 
---
 tests/main.c  |  5 +
 tests/utils.c | 19 +--
 2 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/tests/main.c b/tests/main.c
index c3b4da5..e1a8b69 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -62,13 +62,10 @@ main(int argc, char *argv[])
opts_directory = strdup(optarg);
break;
case 'h':
-   print_usage(stdout, argv[0]);
-   exit(0);
-   break;
+   /* fall though !! */
default:
print_usage(stdout, argv[0]);
exit(1);
-   break;
}
}
 
diff --git a/tests/utils.c b/tests/utils.c
index 3ba64d6..571d488 100644
--- a/tests/utils.c
+++ b/tests/utils.c
@@ -33,7 +33,6 @@
 #include "utils.h"
 
 #define PRINT_PTEST_BUF_SIZE 8192
-#define PRINT_PTEST_MAX_LINE 512
 
 extern char *opts_directory;
 
@@ -247,15 +246,15 @@ END_TEST
 static int
 filecmp(FILE *fp1, FILE *fp2)
 {
-char f1, f2;
-while (1) {
- int end = 0;
-if ((f1 = getc(fp1)) == EOF) end++;
-if ((f2 = getc(fp2)) == EOF) end++;
-
-   if (end == 2) return 0;
-   if (end == 1) return 1;
-if (f1 != f2) return 2;
+   int f1, f2;
+   while (1) {
+   int end = 0;
+   if ((f1 = getc(fp1)) == EOF) end++;
+   if ((f2 = getc(fp2)) == EOF) end++;
+
+   if (end == 2) return 0;
+   if (end == 1) return 1;
+   if (f1 != f2) return 2;
 }
 }
 
-- 
2.17.0

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


[yocto] [ptest-runner][PATCH 4/4] Fix additional warnings when using clang

2019-07-17 Thread Randy MacLeod
Drop unused function parameters in wait_child().

The remaining warning in the top dir code is:
  utils.c:25:9: warning: macro name is a reserved identifier 
[-Wreserved-id-macro]
  #define _GNU_SOURCE
and it's not clear how to deal with that in a portable manner.

Drop unused variable in analizer code.
Rename analizer to analyzer.

Avoid program scope global by adding a set function for
the opts directory variable.

Free strdup()ed memory before exit.

Signed-off-by: Randy MacLeod 
---
 tests/main.c   | 13 -
 tests/ptest_list.c |  2 ++
 tests/utils.c  | 22 ++
 utils.c|  6 ++
 utils.h|  2 ++
 5 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/tests/main.c b/tests/main.c
index e1a8b69..1344bc0 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -38,14 +38,14 @@ static SuiteFunction *suites[] = {
NULL,
 };
 
+extern void set_opts_dir(char *);
+
 static inline void
 print_usage(FILE *stream, char *progname)
 {
fprintf(stream, "Usage: %s <-d directory>\n", progname);
 }
 
-char *opts_directory;
-
 int
 main(int argc, char *argv[])
 {
@@ -54,12 +54,12 @@ main(int argc, char *argv[])
int number_failed;
SuiteFunction *sf;
 
-   opts_directory = NULL;
+   char *opts_dir = NULL;
 
while ((opt = getopt(argc, argv, "d:t:h")) != -1) {
switch (opt) {
case 'd':
-   opts_directory = strdup(optarg);
+   opts_dir = strdup(optarg);
break;
case 'h':
/* fall though !! */
@@ -69,10 +69,11 @@ main(int argc, char *argv[])
}
}
 
-   if (opts_directory == NULL) {
+   if (opts_dir == NULL) {
print_usage(stdout, argv[0]);
exit(1);
}
+   set_opts_dir(opts_dir);
 
i = 0;
number_failed = 0;
@@ -88,6 +89,8 @@ main(int argc, char *argv[])
i++;
sf = suites[i];
}
+   set_opts_dir(NULL);
+   free(opts_dir);
 
return number_failed;
 }
diff --git a/tests/ptest_list.c b/tests/ptest_list.c
index e0ec276..081f027 100644
--- a/tests/ptest_list.c
+++ b/tests/ptest_list.c
@@ -29,6 +29,8 @@
 
 #include "ptest_list.h"
 
+extern Suite *ptest_list_suite(void);
+
 static int ptests_num = 6;
 static char *ptest_names[] = {
"python",
diff --git a/tests/utils.c b/tests/utils.c
index 571d488..4fa4609 100644
--- a/tests/utils.c
+++ b/tests/utils.c
@@ -32,9 +32,15 @@
 #include "ptest_list.h"
 #include "utils.h"
 
+Suite *utils_suite(void);
+
 #define PRINT_PTEST_BUF_SIZE 8192
 
-extern char *opts_directory;
+static char *opts_directory = NULL;
+
+void set_opts_dir(char * od) {
+   opts_directory = od;
+}
 
 static char *ptests_found[] = {
"bash",
@@ -68,7 +74,7 @@ find_word(int *found, const char *line, const char *word)
 }
 
 static void test_ptest_expected_failure(struct ptest_list *, const int, char *,
-   void (*h_analizer)(const int, FILE *, FILE *));
+   void (*h_analyzer)(const int, FILE *));
 
 START_TEST(test_get_available_ptests)
 {
@@ -189,7 +195,7 @@ START_TEST(test_run_ptests)
 END_TEST
 
 static void
-search_for_timeout_and_duration(const int rp, FILE *fp_stdout, FILE *fp_stderr)
+search_for_timeout_and_duration(const int rp, FILE *fp_stdout)
 {
const char *timeout_str = "TIMEOUT";
const char *duration_str = "DURATION";
@@ -218,7 +224,7 @@ START_TEST(test_run_timeout_duration_ptest)
 END_TEST
 
 static void
-search_for_fail(const int rp, FILE *fp_stdout, FILE *fp_stderr)
+search_for_fail(const int rp, FILE *fp_stdout)
 {
 const char *fail_str = "ERROR: Exit status is";
 char line_buf[PRINT_PTEST_BUF_SIZE];
@@ -284,7 +290,7 @@ START_TEST(test_xml_fail)
 END_TEST
 
 Suite *
-utils_suite()
+utils_suite(void)
 {
Suite *s;
TCase *tc_core;
@@ -308,7 +314,7 @@ utils_suite()
 
 static void
 test_ptest_expected_failure(struct ptest_list *head, const int timeout, char 
*progname,
-   void (*h_analizer)(const int, FILE *, FILE *))
+   void (*h_analyzer)(const int, FILE *))
 {
char *buf_stdout;
size_t size_stdout = PRINT_PTEST_BUF_SIZE;
@@ -329,9 +335,9 @@ test_ptest_expected_failure(struct ptest_list *head, const 
int timeout, char *pr
struct ptest_options opts = EmptyOpts;
opts.timeout = timeout;
 
-   h_analizer(
+   h_analyzer(
run_ptests(filtered, opts, progname, fp_stdout, 
fp_stderr),
-   fp_stdout, fp_stderr
+   fp_stdout
);
 
PTEST_LIST_FREE_ALL_CLEAN(filtered);
diff --git a/utils.c b/utils.c
index 92654bf..a8ba190 100644
--- a/utils.c
+++ b/utils.c
@@ -288,8 +288,7 @@ run_child(char *run_ptest, int fd_stdout, int fd_stderr)
 }
 
 static inline

[yocto] [ptest-runner][PATCH 2/4] main code: fix clang warnings

2019-07-17 Thread Randy MacLeod
Fix basic errors found when building with the clang compiler
with the option -Weverything. There are a few warnings that remain
that are not variable casting, macro fixes, or similarily simple
changes.

Makefile: add -lutil for 'check' builds for clang/gcc
builds.

Signed-off-by: Randy MacLeod 
---
 Makefile |  4 +++-
 main.c   |  9 -
 ptest_list.c | 17 +++--
 ptest_list.h | 29 ++---
 utils.c  | 38 +-
 utils.h  |  4 ++--
 6 files changed, 67 insertions(+), 34 deletions(-)

diff --git a/Makefile b/Makefile
index 439eb79..c92261b 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,8 @@ MEMCHECK=$(shell echo $$MEMCHECK)
 
 CC=cc
 CFLAGS=-std=gnu99 -pedantic -Wall -Werror -I .
+# CC=clang
+# CFLAGS=-std=gnu99 -Weverything -I .
 ifeq ($(RELEASE), 1)
 CFLAGS+= -O2 -DRELEASE
 else
@@ -22,7 +24,7 @@ TEST_SOURCES=tests/main.c tests/ptest_list.c tests/utils.c 
$(BASE_SOURCES)
 TEST_OBJECTS=$(TEST_SOURCES:.c=.o)
 TEST_EXECUTABLE=ptest-runner-test
 TEST_LDFLAGS=-lm -lrt -lpthread
-TEST_LIBSTATIC=-lcheck -lsubunit
+TEST_LIBSTATIC=-lcheck -lsubunit -lutil
 
 TEST_DATA=$(shell echo `pwd`/tests/data)
 
diff --git a/main.c b/main.c
index 83cd8f2..01d60f7 100644
--- a/main.c
+++ b/main.c
@@ -93,7 +93,7 @@ main(int argc, char *argv[])
}
 
 
-   opts.exclude = malloc(ptest_exclude_num * 
sizeof(char));
+   opts.exclude = malloc((size_t)ptest_exclude_num 
* sizeof(char));
CHECK_ALLOCATION(opts.exclude, 1, 1);
 
i = 0;
@@ -116,7 +116,7 @@ main(int argc, char *argv[])
case 'h':
print_usage(stdout, argv[0]);
exit(0);
-   break;
+   /* break; not needed, not reachable after exit() */
case 'x':
free(opts.xml_filename);
opts.xml_filename = strdup(optarg);
@@ -125,13 +125,12 @@ main(int argc, char *argv[])
default:
print_usage(stdout, argv[0]);
exit(1);
-   break;
}
}
 
ptest_num = argc - optind;
if (ptest_num > 0) {
-   size_t size = ptest_num * sizeof(char *);
+   size_t size = sizeof(char *) * (unsigned int) ptest_num;
opts.ptests = calloc(1, size);
CHECK_ALLOCATION(opts.ptests, size, 1);
 
@@ -163,7 +162,7 @@ main(int argc, char *argv[])
}
 
run = filter_ptests(head, opts.ptests, ptest_num);
-   CHECK_ALLOCATION(run, ptest_num, 1);
+   CHECK_ALLOCATION(run, (size_t) ptest_num, 1);
ptest_list_free_all(head);
}
 
diff --git a/ptest_list.c b/ptest_list.c
index d48349f..a5632f8 100644
--- a/ptest_list.c
+++ b/ptest_list.c
@@ -29,8 +29,21 @@
 #include "utils.h"
 #include "ptest_list.h"
 
-#define VALIDATE_PTR_RINT(ptr) if (ptr == NULL) { errno = EINVAL; return -1; } 
-#define VALIDATE_PTR_RNULL(ptr) if (ptr == NULL) { errno = EINVAL; return 
NULL; } 
+#define VALIDATE_PTR_RINT(ptr) \
+   do { \
+   if (ptr == NULL) { \
+   errno = EINVAL; \
+   return -1; \
+   } \
+   } while (0)
+
+#define VALIDATE_PTR_RNULL(ptr) \
+   do { \
+   if (ptr == NULL) { \
+   errno = EINVAL; \
+   return NULL; \
+   } \
+   } while (0)
 
 struct ptest_list *
 ptest_list_alloc()
diff --git a/ptest_list.h b/ptest_list.h
index b4b1ac6..e1caffc 100644
--- a/ptest_list.h
+++ b/ptest_list.h
@@ -21,13 +21,28 @@
  * Aníbal Limón 
  */
 
-#ifndef _PTEST_RUNNER_LIST_H_
-#define _PTEST_RUNNER_LIST_H_
+#ifndef PTEST_RUNNER_LIST_H
+#define PTEST_RUNNER_LIST_H
 
-#define PTEST_LIST_FREE_CLEAN(x) { ptest_list_free(x); x = NULL; }
-#define PTEST_LIST_FREE_ALL_CLEAN(x) { ptest_list_free_all(x); x = NULL; }
+#define FLUSH_PRINTF(...) \
+do { \
+printf(__VA_ARGS__); \
+fflush(stdout); \
+} while (0)
 
-#define PTEST_LIST_ITERATE_START(head, p) for (p = head->next; p != NULL; p = 
p->next) { 
+#define PTEST_LIST_FREE_CLEAN(x) \
+   do { \
+   ptest_list_free(x); \
+   x = NULL; \
+   } while (0)
+
+#define PTEST_LIST_FREE_ALL_CLEAN(x) \
+   do { \
+   ptest_list_free_all(x); \
+   x = NULL; \
+   } while (0)
+
+#define PTEST_LIST_ITERATE_START(head, p) for (p = head->next; p != NULL; p = 
p->next) {
 #define PTEST_LIST_ITERATE_END }
 
 #include 
@@ -40,7 +55,7 @@ struct ptest_list {
struct ptest_list *prev;
 };
 
-extern struct ptest_list *ptest_list_alloc();
+extern struct ptest_list *ptest_list_alloc(vo

[yocto] [ptest-runner][PATCH 1/4] utils: ensure child can be session leader

2019-07-17 Thread Randy MacLeod
When running the run-execscript bash ptest as a user rather than root, a 
warning:
  bash: cannot set terminal process group (16036): Inappropriate ioctl for 
device
  bash: no job control in this shell
contaminates the bash log files causing the test to fail. This happens only
when run under ptest-runner and not when interactively testing!

The changes made to fix this include:
1. Get the process group id (pgid) before forking,
2. Set the pgid in both the parent and child to avoid a race,
3. Find, open and set permission on the child tty, and
4. Allow the child to attach to controlling tty.

Also add '-lutil' to Makefile. This lib is from libc and provides openpty.

Upstream-Status: Submitted [yocto@yoctoproject.org]

Signed-off-by: Sakib Sajal 
Signed-off-by: Randy MacLeod 
---
 Makefile |   2 +-
 utils.c  | 102 +--
 2 files changed, 92 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 1bde7be..439eb79 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,7 @@ TEST_DATA=$(shell echo `pwd`/tests/data)
 all: $(SOURCES) $(EXECUTABLE)
 
 $(EXECUTABLE): $(OBJECTS)
-   $(CC) $(LDFLAGS) $(OBJECTS) -o $@
+   $(CC) $(LDFLAGS) $(OBJECTS) -lutil -o $@
 
 tests: $(TEST_SOURCES) $(TEST_EXECUTABLE)
 
diff --git a/utils.c b/utils.c
index ad737c2..f11ce39 100644
--- a/utils.c
+++ b/utils.c
@@ -1,5 +1,6 @@
 /**
  * Copyright (c) 2016 Intel Corporation
+ * Copyright (C) 2019 Wind River Systems, Inc.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -22,23 +23,27 @@
  */
 
 #define _GNU_SOURCE 
+
 #include 
 
+#include 
+#include 
+#include 
+#include 
 #include 
-#include 
 #include 
-#include 
+#include 
+#include 
+#include 
+#include 
 #include 
-#include 
+#include 
+
+#include 
 #include 
+#include 
 #include 
 #include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
 
 #include "ptest_list.h"
 #include "utils.h"
@@ -346,6 +351,53 @@ wait_child(const char *ptest_dir, const char *run_ptest, 
pid_t pid,
return status;
 }
 
+/* Returns an integer file descriptor.
+ * If it returns < 0, an error has occurred.
+ * Otherwise, it has returned the slave pty file descriptor.
+ * fp should be writable, likely stdout/err.
+ */
+static int
+setup_slave_pty(FILE *fp) { 
+   int pty_master = -1;
+   int pty_slave = -1;
+   char pty_name[256];
+   struct group *gptr;
+   gid_t gid;
+   int slave = -1;
+
+   if (openpty(&pty_master, &pty_slave, pty_name, NULL, NULL) < 0) {
+   fprintf(fp, "ERROR: openpty() failed with: %s.\n", 
strerror(errno));
+   return -1;
+   }
+
+   if ((gptr = getgrnam(pty_name)) != 0) {
+   gid = gptr->gr_gid;
+   } else {
+   /* If the tty group does not exist, don't change the
+* group on the slave pty, only the owner
+*/
+   gid = -1;
+   }
+
+   /* chown/chmod the corresponding pty, if possible.
+* This will only work if the process has root permissions.
+*/
+   if (chown(pty_name, getuid(), gid) != 0) {
+   fprintf(fp, "ERROR; chown() failed with: %s.\n", 
strerror(errno));
+   }
+
+   /* Makes the slave read/writeable for the user. */
+   if (chmod(pty_name, S_IRUSR|S_IWUSR) != 0) {
+   fprintf(fp, "ERROR: chmod() failed with: %s.\n", 
strerror(errno));
+   }
+
+   if ((slave = open(pty_name, O_RDWR)) == -1) {
+   fprintf(fp, "ERROR: open() failed with: %s.\n", 
strerror(errno));
+   }
+   return (slave);
+}
+
+
 int
 run_ptests(struct ptest_list *head, const struct ptest_options opts,
const char *progname, FILE *fp, FILE *fp_stderr)
@@ -362,6 +414,8 @@ run_ptests(struct ptest_list *head, const struct 
ptest_options opts,
int timeouted;
time_t sttime, entime;
int duration;
+   int slave;
+   int pgid = -1;
 
if (opts.xml_filename) {
xh = xml_create(ptest_list_length(head), opts.xml_filename);
@@ -379,7 +433,6 @@ run_ptests(struct ptest_list *head, const struct 
ptest_options opts,
close(pipefd_stdout[1]);
break;
}
-
fprintf(fp, "START: %s\n", progname);
PTEST_LIST_ITERATE_START(head, p);
char *ptest_dir = strdup(p->run_ptest);
@@ -388,6 +441,13 @@ run_ptests(struct ptest_list *head, const struct 
ptest_options opts,
break;
}
dirname(ptest_dir);
+   if (ioctl(0, TIOCNOTTY) == -1) {
+   fprintf(fp, "ERROR: Unable to detach from 
controlling tty, %s\n", strerror(errno));
+   }
+
+   if ((pgid = getpgid(0)) == -1) {
+   fprintf

[yocto] Problem Compiling for Cyclone5

2019-07-17 Thread Navid Rahimi
Hi,

It seems there is something wrong going on. When I am trying to
compile as specific here [1], I get:

ERROR: ParseError at
/home/aleph/angstrom-build/layers/openembedded-core/meta/classes/image.bbclass:181:
Could not inherit file classes/sdcard_image-socfpga.bbclass

which should not be the case and is not the case for arria10. But for
cyclone5 I am unable to compile it. Can you guys give a tip to where
to look at and what to do? The complete output can be found here [2].

1) https://rocketboards.org/foswiki/Documentation/GSRDCompilingLinux
2) https://pastebin.com/5hMy0Ert

best wishes,
-navid
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [psplash][PATCH] bmp: Add option to print bmp image

2019-07-17 Thread Mickaël Tansorier
Add option to load image in `psplash` command line.
Image is bmp3 format. If this image can not be found or
loading fail, default image is print.

bmp_layout.h: describe bmp3 file inspire of bmp_layout.h
from u-boot.
psplash-fb.{c|h}: add function to draw GBR888 image.
psplash.c: Add option to read bmp image and print it
if loading file is right.

Signed-off-by: Mickaël Tansorier 
---
 bmp_layout.h | 35 +++
 psplash-fb.c | 25 ++
 psplash-fb.h |  9 +
 psplash.c| 95 ++--
 4 files changed, 161 insertions(+), 3 deletions(-)
 create mode 100644 bmp_layout.h

diff --git a/bmp_layout.h b/bmp_layout.h
new file mode 100644
index 000..f397ef9
--- /dev/null
+++ b/bmp_layout.h
@@ -0,0 +1,35 @@
+/* Layout of a bmp file */
+/* format = bmp3*/
+
+#ifndef _BMP_LAYOUT_H_
+#define _BMP_LAYOUT_H_
+
+#define BMP_IMG_BYTES_PER_PIXEL 3
+
+struct __attribute__((__packed__)) bmp_header {
+   /* Header */
+   char signature[2];
+   __u32   file_size;
+   __u32   reserved;
+   __u32   data_offset;
+   /* InfoHeader */
+   __u32   size;
+   __u32   width;
+   __u32   height;
+   __u16   planes;
+   __u16   bit_count;
+   __u32   compression;
+   __u32   image_size;
+   __u32   x_pixels_per_m;
+   __u32   y_pixels_per_m;
+   __u32   colors_used;
+   __u32   colors_important;
+};
+
+struct bmp_image {
+   struct bmp_header header;
+   /* ColorTable */
+   uint8 * data;
+};
+
+#endif /* _BMP_LAYOUT_H_ */
diff --git a/psplash-fb.c b/psplash-fb.c
index c064d18..307d6a8 100644
--- a/psplash-fb.c
+++ b/psplash-fb.c
@@ -441,6 +441,31 @@ psplash_fb_draw_image (PSplashFB*fb,
 }
 }
 
+void
+psplash_fb_draw_image_raw_GBR888 (PSplashFB*fb,
+  int  x,
+  int  y,
+  int  img_width,
+  int  img_height,
+  int  img_bytes_per_pixel,
+  uint8   *rle_data)
+{
+  uint8   *p = rle_data;
+  int  dx = 0, dy = 0,  total_len;
+  int  img_rowstride = img_bytes_per_pixel*img_width;
+
+  total_len = img_rowstride * img_height;
+  /* Start at the end of pointer */
+  p += (total_len - 1);
+
+  while ((p - rle_data) >= 0)
+{
+   psplash_fb_plot_pixel (fb, x-dx, y+dy, *(p), *(p-1), *(p-2));
+   if (++dx * img_bytes_per_pixel >= img_rowstride) { dx=0; dy++; }
+   p -= img_bytes_per_pixel;
+}
+}
+
 /* Font rendering code based on BOGL by Ben Pfaff */
 
 static int
diff --git a/psplash-fb.h b/psplash-fb.h
index d0dce10..297add8 100644
--- a/psplash-fb.h
+++ b/psplash-fb.h
@@ -77,6 +77,15 @@ psplash_fb_draw_image (PSplashFB*fb,
   int  img_rowstride,
   uint8   *rle_data);
 
+void
+psplash_fb_draw_image_raw_GBR888 (PSplashFB*fb,
+  int  x,
+  int  y,
+  int  img_width,
+  int  img_height,
+  int  img_bytes_pre_pixel,
+  uint8   *rle_data);
+
 void
 psplash_fb_text_size (int*width,
  int*height,
diff --git a/psplash.c b/psplash.c
index 992e199..f8a92b6 100644
--- a/psplash.c
+++ b/psplash.c
@@ -24,6 +24,7 @@
 #include "psplash-poky-img.h"
 #include "psplash-bar-img.h"
 #include "radeon-font.h"
+#include "bmp_layout.h"
 
 #define SPLIT_LINE_POS(fb)  \
(  (fb)->height \
@@ -40,6 +41,59 @@ psplash_exit (int UNUSED(signum))
   psplash_console_reset ();
 }
 
+struct bmp_image *read_image_bmp(char *image_name)
+{
+  FILE *file;
+  size_t read;
+  struct bmp_image *bmp;
+
+  file = fopen(image_name, "rb");
+  if (file != NULL)
+{
+  bmp = malloc(sizeof(struct bmp_image));
+
+  /* Read header */
+  read = fread(&bmp->header, sizeof(struct bmp_header), 1, file);
+  if (read != 1)
+{
+  printf("Error: Fail to read header\n");
+  free(bmp);
+  fclose(file);
+  return NULL;
+}
+
+  /* Read BMP image signature */
+  if (bmp->header.signature[0] != 'B' && bmp->header.signature[1] != 'M')
+{
+  printf("Error: File format is not correct.\n");
+  free(bmp);
+  fclose(file);
+  return NULL;
+}
+
+  bmp->data = malloc(sizeof(uint8) * bmp->header.image_size);
+
+  /* Read data image */
+  read = fread(bmp->data, sizeof(uint8), (bmp->header.image_size), file);
+  if (read != bmp->header.image_size)
+{
+  printf("Error: Cannot read data image.\n");
+  free(bmp);
+  fclose(file);
+  return NULL;
+}
+
+  fclose(file);
+}
+  else
+{
+  

Re: [yocto] getting error in "make-mod-scripts-1.0-r0" while building meta-altera kernel as local source

2019-07-17 Thread Bruce Ashfield
On Wed, Jul 17, 2019 at 7:43 AM praveen vattipalli
 wrote:
>
> Hi All,
> we are upgrading Yocto from Krogath to Sumo version.
> while using meta-altera kernel source as local source,
>
> if i use  EXTERNALSRC_BUILD variable
> EXTERNALSRC = 
> "${TOPDIR}/../meta-altera/recipes-kernel/linux/files/kernel-source"
> EXTERNALSRC_BUILD = 
> "${TOPDIR}/../meta-altera/recipes-kernel/linux/files/kernel-source"

Have you tried making these different directories ? The error you are
seeing is telling you that you
are trying to build in an already configured/dirty source directory.
Not having a split source and
build is one easy way to get into the state that you are seeing.

> getting make-mod-scripts-1.0-r0 error.
>
> if i comment EXTERNALSRC_BUILD = 
> "${TOPDIR}/../meta-altera/recipes-kernel/linux/files/kernel-source" i could 
> able to build the image.

See my above comment. By default the externalsrc class does a split
source and build directory,
which is why it works.

Bruce

>
> any suggestion, if i miss anything.
> Thanks in advance
>
> logs:
> ERROR: make-mod-scripts-1.0-r0 do_configure: oe_runmake failed
>
>  Using 
> /home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/meta-altera/recipes-kernel/linux/files/kernel-source
>  as source for kernel
> |   
> /home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/meta-altera/recipes-kernel/linux/files/kernel-source
>  is not clean, please run 'make mrproper'
> |   in the 
> '/home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/meta-altera/recipes-kernel/linux/files/kernel-source'
>  directory.
> | 
> /home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/meta-altera/recipes-kernel/linux/files/kernel-source/Makefile:1064:
>  recipe for target 'prepare3' failed
> | make[1]: *** [prepare3] Error 1
> | make[1]: Leaving directory 
> '/home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/build/tmp/work-shared/cyclone5/kernel-build-artifacts'
> | Makefile:146: recipe for target 'sub-make' failed
> | make: *** [sub-make] Error 2
>
> Thanks,
> Praveen
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Different installation path in SDK

2019-07-17 Thread Gabriele Zampieri
Hi all,

for legacy reason I need to install some libraries in a non-standard path
(/opt/custom/lib). I achieved this quite easily via cmake. However, when I
generate the SDK, those libraries and headers are installed in
/sysroot/arm/opt/custom/[lib|include] and this is quite annoying.
Is there a way to recognize when bitbake builds the SDK and when it
doesn't? something like class-nativesdk ann class-target, so I can change
the installation path to ${libdir} & co.

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


[yocto] getting error in "make-mod-scripts-1.0-r0" while building meta-altera kernel as local source

2019-07-17 Thread praveen vattipalli
Hi All,
we are upgrading Yocto from Krogath to Sumo version.
while using meta-altera kernel source as local source,

if i use  EXTERNALSRC_BUILD variable
EXTERNALSRC =
"${TOPDIR}/../meta-altera/recipes-kernel/linux/files/kernel-source"
EXTERNALSRC_BUILD =
"${TOPDIR}/../meta-altera/recipes-kernel/linux/files/kernel-source"
getting make-mod-scripts-1.0-r0 error.

if i comment EXTERNALSRC_BUILD =
"${TOPDIR}/../meta-altera/recipes-kernel/linux/files/kernel-source" i could
able to build the image.

any suggestion, if i miss anything.
Thanks in advance

logs:
ERROR: make-mod-scripts-1.0-r0 do_configure: oe_runmake failed

 Using
/home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/meta-altera/recipes-kernel/linux/files/kernel-source
as source for kernel
|
/home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/meta-altera/recipes-kernel/linux/files/kernel-source
is not clean, please run 'make mrproper'
|   in the
'/home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/meta-altera/recipes-kernel/linux/files/kernel-source'
directory.
|
/home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/meta-altera/recipes-kernel/linux/files/kernel-source/Makefile:1064:
recipe for target 'prepare3' failed
| make[1]: *** [prepare3] Error 1
| make[1]: Leaving directory
'/home/pkumar/tp4100_sumo/sumo/yocto_platform/platform/build/tmp/work-shared/cyclone5/kernel-build-artifacts'
| Makefile:146: recipe for target 'sub-make' failed
| make: *** [sub-make] Error 2

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


Re: [yocto] Patching a file in $WORKDIR

2019-07-17 Thread Burton, Ross
On Tue, 16 Jul 2019 at 17:45, Siegel, Jeffrey (Nokia - US/Murray Hill)
 wrote:
> I am trying to use a bbappend file to patch a file in $WORKDIR. To my 
> understanding, the native Yocto patching process only works for patching 
> files in $S.

No, the default directory for patch application is $S (for obvious
reasons).  You can change the path that is patched by using the
`patchdir` parameter:

https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-SRC_URI

Also as Gabriele said, only .patch and .diff files are applied
automatically.  Best to rename to inputrc.patch.

> Using devshell, I have confirmed that the “patch” program being executed is 
> the one from the Yocto environment ($BUILDDIR/tmp-glibc/hosttools), not the 
> build host.

Have a look at what hosttools/patch actually is: you'll see it's just
a symlink to /usr/bin/patch.

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