Re: [yocto] [meta-security][PATCH] clamav: freshclam need bind to run

2019-04-07 Thread Adrian Bunk
On Sun, Apr 07, 2019 at 11:45:18AM +0530, akuster808 wrote:
> 
> 
> On 4/7/19 10:42 AM, Adrian Bunk wrote:
> > On Sun, Apr 07, 2019 at 01:38:38AM +0530, akuster808 wrote:
> >>
> >> On 4/6/19 8:31 PM, Adrian Bunk wrote:
> >>> On Sat, Apr 06, 2019 at 08:15:40PM +0530, Armin Kuster wrote:
>  Add it to the rdepends for that package
> 
>  Signed-off-by: Armin Kuster 
>  ---
>   recipes-security/clamav/clamav_0.99.4.bb | 2 ++
>   1 file changed, 2 insertions(+)
> 
>  diff --git a/recipes-security/clamav/clamav_0.99.4.bb 
>  b/recipes-security/clamav/clamav_0.99.4.bb
>  index 6219d9e..dbe903f 100644
>  --- a/recipes-security/clamav/clamav_0.99.4.bb
>  +++ b/recipes-security/clamav/clamav_0.99.4.bb
>  @@ -152,3 +152,5 @@ RCONFLICTS_${PN} += "${PN}-systemd"
>   SYSTEMD_SERVICE_${PN} = "${BPN}.service"
>   
>   RDEPENDS_${PN} += "openssl ncurses-libncurses libbz2 ncurses-libtinfo 
>  clamav-freshclam clamav-libclamav"
>  +
>  +RDEPENDS_freshclam = "bind"
> >>> freshclam depending on a DNS server looks very wrong.
> >> got talk to clamav folks then.
> >>
> >>> What is the actual problem?
> >> ClamAV update process started at Sat Apr  6 14:59:25 2019
> >> WARNING: Can't query current.cvd.clamav.net
> >> WARNING: Invalid DNS reply. Falling back to HTTP mode.
> >> ERROR: Can't get information about database.clamav.net: Temporary failure 
> >> in name resolution
> >> ERROR: Can't download main.cvd from database.clamav.net
> >> Giving up on database.clamav.net...
> >>
> >> because 
> >>
> >> Use DNS to verify virus database version. Freshclam uses DNS TXT records
> >> to verify database and software versions 
> >>
> >> therefor I am including bind.
> > freshclam needing DNS information makes sense, which means it must be 
> > configured how to access a DNS server.
> >
> > On the local machine you need only DNS client funtionality,
> > just like every user needs for a web browser.
> 
> >
> > Forcing installation of a DNS server is not the correct solution
> > when the actual problem is just a configuration issue on the
> > machine where you were trying it.
> 
> So I can expect a patch to provide such configuration. I would like to
> see how you would solve this.

How are you configuring networking on your device?

> Maybe an FAQ we can add to the layer for this package?

>From the error message you gave it is not obvious that there is any
problem that would be specific to this package.

I would guess that DNS configuration is missing or incorrect on your 
device, and that "ping www.google.com" would also fail with a name 
resolution error.

> - armin

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] Building on non-x86 hosts, wic and syslinux

2019-04-07 Thread Anders Montonen
Hi,

I was experimenting with building on an AArch64 host, and ran into the issue 
that image_types_wic.bbclass unconditionally adds syslinux-native to the 
dependencies, while syslinux is only compatible with x86 hosts. I didn’t look 
further into this, but is it possible to make this dependency chain dependent 
on the actual image types you’re trying to build?

After working around the problem by manually removing the dependency from the 
class, the build completed without issues (though I did not test the results).

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


Re: [yocto] [meta-security][PATCH] clamav: freshclam need bind to run

2019-04-07 Thread akuster808


On 4/7/19 12:46 PM, Adrian Bunk wrote:
> On Sun, Apr 07, 2019 at 11:45:18AM +0530, akuster808 wrote:
>>
>> On 4/7/19 10:42 AM, Adrian Bunk wrote:
>>> On Sun, Apr 07, 2019 at 01:38:38AM +0530, akuster808 wrote:
 On 4/6/19 8:31 PM, Adrian Bunk wrote:
> On Sat, Apr 06, 2019 at 08:15:40PM +0530, Armin Kuster wrote:
>> Add it to the rdepends for that package
>>
>> Signed-off-by: Armin Kuster 
>> ---
>>  recipes-security/clamav/clamav_0.99.4.bb | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/recipes-security/clamav/clamav_0.99.4.bb 
>> b/recipes-security/clamav/clamav_0.99.4.bb
>> index 6219d9e..dbe903f 100644
>> --- a/recipes-security/clamav/clamav_0.99.4.bb
>> +++ b/recipes-security/clamav/clamav_0.99.4.bb
>> @@ -152,3 +152,5 @@ RCONFLICTS_${PN} += "${PN}-systemd"
>>  SYSTEMD_SERVICE_${PN} = "${BPN}.service"
>>  
>>  RDEPENDS_${PN} += "openssl ncurses-libncurses libbz2 ncurses-libtinfo 
>> clamav-freshclam clamav-libclamav"
>> +
>> +RDEPENDS_freshclam = "bind"
> freshclam depending on a DNS server looks very wrong.
 got talk to clamav folks then.

> What is the actual problem?
 ClamAV update process started at Sat Apr  6 14:59:25 2019
 WARNING: Can't query current.cvd.clamav.net
 WARNING: Invalid DNS reply. Falling back to HTTP mode.
 ERROR: Can't get information about database.clamav.net: Temporary failure 
 in name resolution
 ERROR: Can't download main.cvd from database.clamav.net
 Giving up on database.clamav.net...

 because 

 Use DNS to verify virus database version. Freshclam uses DNS TXT records
 to verify database and software versions 

 therefor I am including bind.
>>> freshclam needing DNS information makes sense, which means it must be 
>>> configured how to access a DNS server.
>>>
>>> On the local machine you need only DNS client funtionality,
>>> just like every user needs for a web browser.
>>> Forcing installation of a DNS server is not the correct solution
>>> when the actual problem is just a configuration issue on the
>>> machine where you were trying it.
>> So I can expect a patch to provide such configuration. I would like to
>> see how you would solve this.
> How are you configuring networking on your device?

I figured it out.
>
>> Maybe an FAQ we can add to the layer for this package?
> From the error message you gave it is not obvious that there is any
> problem that would be specific to this package.
>
> I would guess that DNS configuration is missing or incorrect on your 
> device, and that "ping www.google.com" would also fail with a name 
> resolution error.

The runtime test I added creates a /etc/resolve.conf , that allows me to
ping to the outside but I missed including the local ip ( 127.)   I am
running this two systems to verify this my flurry of changes. One system
in at home on real hardware and other in qemu my laptop while I am
traveling. With that being said, I can drop the bind requirement and I
need to update the runtime test.

I do appreciate the reviews , questions and push back. 

Kind regards,
Armin
>
>> - armin
> cu
> Adrian
>


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


Re: [yocto] Building on non-x86 hosts, wic and syslinux

2019-04-07 Thread akuster


On 4/8/19 4:43 AM, Anders Montonen wrote:
> Hi,
>
> I was experimenting with building on an AArch64 host, and ran into the issue 
> that image_types_wic.bbclass unconditionally adds syslinux-native to the 
> dependencies, while syslinux is only compatible with x86 hosts. I didn’t look 
> further into this, but is it possible to make this dependency chain dependent 
> on the actual image types you’re trying to build?
I think we are going to have to figure that out. The Yocto Project has
an arm64 builder that they are in the middle of bring up. If might be
helpful to the project if you could open a bug on this. I know there are
a few folks building on raspberrypi who my be on the different mailing
list,  openembedded-c...@lists.openembedded.org. You might want to post
your question there too.

kind regards,
Armin
>
> After working around the problem by manually removing the dependency from the 
> class, the build completed without issues (though I did not test the results).
>
> Regards,
> Anders


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


Re: [yocto] yocto touchscreen

2019-04-07 Thread Zoran Stojsavljevic
Hello Nikola,

I did some quick analysis of your kernel boot traces, and there are the
following observations made:

[1] The kernel used is:
Linux version 4.4.19-ge581bb1cac (polycaptil@polycaptil-HP-Notebook) ?!

In my case (I built YOCTO thud for BBB NOT using X11, only serial console):
Linux version 4.19.7-jumpnow (oe-user@oe-host) (gcc version 8.2.0 (GCC))

I could not explain polycaptil@polycaptil-HP-Notebook, maybe you do it for
such kind of platform...
The kernel used is too old, for my taste, you did not replaced it, if you
built YOCTO thud!

[2] The kernel command line:
[0.00] Kernel command line: console=ttyO0,115200
root=/dev/mmcblk0p2 rw

Shows that you use EMMC as holder for / tree, all good.

[3] The concern about your console: console=ttyO0,115200
Is addressed here:
[0.000441] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'

Later followed by:
[0.402495] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[0.406968] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 158,
base_baud = 300) is a 8250
[1.017361] console [ttyS0] enabled
[1.022188] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 159,
base_baud = 300) is a 8250

So, not at all worries about the console!

[4] The following traces are worrying me very much:
Starting Xserver
Starting syslogd/klogd:
done
*X.Org X Server 1.20.1*
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.15.0-45-generic x86_64
*Current Operating System: Linux am335x-evm 4.4.19-ge581bb1cac* #1 PREEMPT
Thu May 24 11:42:17 CEST 2018 armv7l
Kernel command line: console=ttyO0,115200 root=/dev/mmcblk0p2 rw
Build Date: 02 April 2019  07:35:10PM

As Marc wrote earlier:
> Looks like: https://bugzilla.redhat.com/show_bug.cgi?id=1650634

So, as I stated before: you should have in your build:
*X.Org Server 1.20.3! This is the main problem, seems!*

Zoran
___



On Fri, Apr 5, 2019 at 3:35 PM Stanisavljevic <
n.stanisavlje...@polycaptil.fr> wrote:

> Hello Zoran,
>
>
>
> I keep you in touch about the migration from sumo to thud to solve my
> problem of locked touchscreen.
>
>
>
> I migrated from sumo to thud version, but nothing changed, the problem is
> the same, and I have same messages on boot as sumo version.
>
>
>
> I looked that the x server have a configuration kernel command line (if I
> correctly understood), here is what is written :
>
> Kernel command line: console=ttyO0,115200 root=/dev/mmcblk0p2 rw
>
>
>
> But the kernel command line of poky is different, here is what is
> configured for poky kernel command line :
>
> Poky (Yocto Project Reference Distro) 2.6.1 am335x-evm /dev/ttyS0
>
>
>
> For the xserver it is ttyO0 and for poky it is ttyS0, maybe there is
> something wrong here which do problem for the touchscreen.
>
>
>
> I put below (at end of this mail )the text which appear during the boot.
>
>
>
> I think xorg-x11-server package 1.20.3 was not the problem in the
> previous yocto version (sumo)…
>
>
>
> Best regards
>
> Nikola
>
>
>
> Here is the text that appear during the boot :
>
>
>
> root@am335x-evm:~# 
>
> U-Boot SPL 2017.05-1-g041a398 (May 02 2018 - 18:36:57)
>
> Trying to boot from MMC1
>
> reading uboot.env
>
> reading u-boot.img
>
> reading u-boot.img
>
> reading u-boot.img
>
> reading u-boot.img
>
>
>
>
>
> U-Boot 2017.05-1-g041a398 (May 02 2018 - 18:36:57 +0200)
>
>
>
> CPU  : AM335X-GP rev 2.1
>
> Model: TI AM335x EVM-SK
>
> DRAM:  256 MiB
>
> NAND:  0 MiB
>
> MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
>
> reading uboot.env
>
> ERROR: No USB device found
>
>
>
> at drivers/usb/gadget/ether.c:2709/usb_ether_init()
>
> Net:   CACHE: Misaligned operation at range [8df323c0, 8df32464]
>
>
>
> Warning: ethernet@4a10 using MAC address from ROM
>
> eth0: ethernet@4a10
>
> Hit any key to stop autoboot:  0
>
> reading zImage
>
> 3412752 bytes read in 252 ms (12.9 MiB/s)
>
> reading dtb
>
> 39733 bytes read in 12 ms (3.2 MiB/s)
>
> ## Flattened Device Tree blob at 8200
>
>Booting using the fdt blob at 0x8200
>
>Loading Device Tree to 8df19000, end 8df25b34 ... OK
>
>
>
> Starting kernel ...
>
>
>
> [0.00] Booting Linux on physical CPU 0x0
>
> [0.00] Initializing cgroup subsys cpu
>
> [0.00] Initializing cgroup subsys cpuacct
>
> [0.00] Linux version 4.4.19-ge581bb1cac
> (polycaptil@polycaptil-HP-Notebook) (gcc version 5.3.0 (GCC) ) #1 PREEMPT
> Thu May 24 11:42:17 CEST 2018
>
> [0.00] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7),
> cr=10c5387d
>
> [0.00] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
> instruction cache
>
> [0.00] Machine model: TI AM335x EVM-SK
>
> [0.00] cma: Reserved 48 MiB at 0x8a80
>
> [0.00] Memory policy: Data cache writeback
>
> [0.00] CPU: All CPU(s) started in SVC mode.
>
> [0.00] AM335X ES2.1 (sgx neon )
>
> [0.00] Built 1 zonelists in Zone order, mobility grouping on.
> Total pages: 64960
>
>

[yocto] FileExistsError: [Errorno 17] File Exists

2019-04-07 Thread Pandey, Kamal
Hi I was trying to compile Weston-6.0 using yocto recipe. For this I backported 
some of the packages from master branch of poky to my own layer. During this 
process, there was one package xorgproto which was used in master branch of 
poky but in rocko branch this package is not there. However a similar package 
is there called xproto. Now there is a conflict between these two packages for 
installing the same headers. I appended xorgproto recipe and removed the 
installation of similar header files. But after this I am getting this error. 
However If I continue to compile these errors are ignored.
Is there any way by which I can correct these errors. Why is there no check in 
staging.bbclass if the file exists or not.
The error is shown below:


ERROR: gstreamer1.0-plugins-base-1.12.2-r0 do_prepare_recipe_sysroot: 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:extend_recipe_sysroot(d)
 0003:
File: '/home/iepl007/yocto_build/poky/meta/classes/staging.bbclass', lineno: 
565, function: extend_recipe_sysroot
 0561:dest = newmanifest[l]
 0562:if l.endswith("/"):
 0563:staging_copydir(l, targetdir, dest, seendirs)
 0564:continue
*** 0565:staging_copyfile(l, targetdir, dest, postinsts, 
seendirs)
 0566:
 0567:bb.note("Installed into sysroot: %s" % str(msg_adding))
 0568:bb.note("Skipping as already exists in sysroot: %s" % 
str(msg_exists))
 0569:
File: '/home/iepl007/yocto_build/poky/meta/classes/staging.bbclass', lineno: 
151, function: staging_copyfile
 0147:os.symlink(linkto, dest)
 0148:#bb.warn(c)
 0149:else:
 0150:try:
*** 0151:os.link(c, dest)
 0152:except OSError as err:
 0153:if err.errno == errno.EXDEV:
 0154:bb.utils.copyfile(c, dest)
 0155:else:
Exception: FileExistsError: [Errno 17] File exists: 
'/home/iepl007/yocto_build/build_weston/tmp/sysroots-components/aarch64/xorgproto/usr/include/X11/Xwindows.h'
 -> 
'/home/iepl007/yocto_build/build_weston/tmp/work/aarch64-pdm3-linux/gstreamer1.0-plugins-base/1.12.2-r0/recipe-sysroot/usr/include/X11/Xwindows.h'

ERROR: gstreamer1.0-plugins-base-1.12.2-r0 do_prepare_recipe_sysroot: Function 
failed: extend_recipe_sysroot
ERROR: Logfile of failure stored in: 
/home/iepl007/yocto_build/build_weston/tmp/work/aarch64-pdm3-linux/gstreamer1.0-plugins-base/1.12.2-r0/temp/log.do_prepare_recipe_sysroot.27414
ERROR: Task 
(/home/iepl007/yocto_build/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.12.2.bb:do_prepare_recipe_sysroot)
 failed with exit code '1'

Best Regards
Kamal Pandey

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