[yocto] core-image-sato + firefox for pandaboard

2013-02-21 Thread Davide Soldan
Hi to all!
I'm new in building images with yocto for my pandaboard. Trying to build 
core-image-sato (http://maniacbug.wordpress.com/2012/08/03/pandayocto/) all 
works fine, but now I want to add some packages to this image.
So proceeding like mentioned here 
https://lists.yoctoproject.org/pipermail/yocto/2012-May/009175.html, 
downloading meta-browser layer and adding this layer to 
build/conf/bblayers.conf and adding the package firefox to 
conf/build/local.conf I've got this error:

ERROR: No recipes available for:
  
/home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_2.32.1.bbappend
  
/home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-graphics/libxi/libxi_1.6.1.bbappend
  
/home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-support/nspr/nspr_4.9.4.bbappend

So I found, for example, gnome-settings-daemon under meta-openebedded 
(dependency declared in the README file of meta-browser). Adding the layer 
"meta-openembedded/meta-gnome" to build/conf/bblayers.conf to satisfy the 
gnome-settings-daemon dependency I've got the following different error:

NOTE: Error expanding variable populate_packages
NOTE: Error during finalise of 
/home/davide/yocto/poky-denzil-7.0/meta-openembedded/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb
ERROR: Unable to parse 
/home/davide/yocto/poky-denzil-7.0/meta-openembedded/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb

someone knows how to help me?
Thanks
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] core-image-sato + firefox for pandaboard

2013-02-22 Thread Davide Soldan
In data giovedì 21 febbraio 2013 08:19:42, Gary Thomas ha scritto:
> On 2013-02-21 07:52, Davide Soldan wrote:
> > Hi to all!
> > I'm new in building images with yocto for my pandaboard. Trying to build 
> > core-image-sato (http://maniacbug.wordpress.com/2012/08/03/pandayocto/) all 
> > works fine, but now I want to add some packages to this image.
> > So proceeding like mentioned here 
> > https://lists.yoctoproject.org/pipermail/yocto/2012-May/009175.html, 
> > downloading meta-browser layer and adding this layer to 
> > build/conf/bblayers.conf and adding the package firefox to 
> > conf/build/local.conf I've got this error:
> >
> > ERROR: No recipes available for:
> >
> > /home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-gnome/gnome-settings-daemon/gnome-settings-daemon_2.32.1.bbappend
> >
> > /home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-graphics/libxi/libxi_1.6.1.bbappend
> >
> > /home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-support/nspr/nspr_4.9.4.bbappend
> >
> > So I found, for example, gnome-settings-daemon under meta-openebedded 
> > (dependency declared in the README file of meta-browser). Adding the layer 
> > "meta-openembedded/meta-gnome" to build/conf/bblayers.conf to satisfy the 
> > gnome-settings-daemon dependency I've got the following different error:
> >
> > NOTE: Error expanding variable populate_packages
> > NOTE: Error during finalise of 
> > /home/davide/yocto/poky-denzil-7.0/meta-openembedded/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb
> > ERROR: Unable to parse 
> > /home/davide/yocto/poky-denzil-7.0/meta-openembedded/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb
> 
> I was able to build this combo (master, not denzil) by only importing
> the necessary recipes, not all of meta-gnome.  I just put them in a
> local layer.
> 
> n.b. FireFox runs OK, but IMO [Google] Chromium is much snappier on the 
> PandaBoard.
> You should be able to build it using the same setup.
> 
> 
Solved the problem: I downloaded the yocto denzil release from the website 
(tar.gz file) but the layers meta-browser/openembedded-come/meta-openembedded 
was from git...so the branch of this latest layers was master and not denzil. 
checking out the correct branch solved the problem!
Thanks!
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] core-image-sato + firefox for pandaboard

2013-04-10 Thread Davide Soldan
In data mercoledì 10 aprile 2013 12:39:03, Achim Kanert ha scritto:
> Davide Soldan  writes:
> 
> > 
> > In data giovedì 21 febbraio 2013 08:19:42, Gary Thomas ha scritto:
> > > On 2013-02-21 07:52, Davide Soldan wrote:
> > > > Hi to all!
> > > > I'm new in building images with yocto for my pandaboard. Trying to 
> build core-image-sato
> > (http://maniacbug.wordpress.com/2012/08/03/pandayocto/) all works fine, 
> but now I want to add some
> > packages to this image.
> > > > So proceeding like mentioned here
> > https://lists.yoctoproject.org/pipermail/yocto/2012-May/009175.html, 
> downloading
> > meta-browser layer and adding this layer to build/conf/bblayers.conf and 
> adding the package firefox to
> > conf/build/local.conf I've got this error:
> > > >
> > > > ERROR: No recipes available for:
> > > >/home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-
> gnome/gnome-settings-daemon/gnome-settings-daemon_2.32.1.bbappend
> > > >/home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-
> graphics/libxi/libxi_1.6.1.bbappend
> > > >/home/davide/yocto/poky-denzil-7.0/meta-browser/recipes-
> support/nspr/nspr_4.9.4.bbappend
> > > >
> > > > So I found, for example, gnome-settings-daemon under meta-
> openebedded (dependency declared in the
> > README file of meta-browser). Adding the layer "meta-openembedded/meta-
> gnome" to
> > build/conf/bblayers.conf to satisfy the gnome-settings-daemon dependency 
> I've got the following
> > different error:
> > > >
> > > > NOTE: Error expanding variable populate_packages
> > > > NOTE: Error during finalise of /home/davide/yocto/poky-denzil-
> 7.0/meta-openembedded/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb
> > > > ERROR: Unable to parse /home/davide/yocto/poky-denzil-7.0/meta-
> openembedded/meta-gnome/recipes-support/goffice/goffice_0.8.17.bb
> > > 
> > > I was able to build this combo (master, not denzil) by only importing
> > > the necessary recipes, not all of meta-gnome.  I just put them in a
> > > local layer.
> > > 
> > > n.b. FireFox runs OK, but IMO [Google] Chromium is much snappier on 
> the PandaBoard.
> > > You should be able to build it using the same setup.
> > > 
> > > 
> > Solved the problem: I downloaded the yocto denzil release from the 
> website (tar.gz file) but the layers
> > meta-browser/openembedded-come/meta-openembedded was from git...so the 
> branch of this latest
> > layers was master and not denzil. checking out the correct branch solved 
> the problem!
> > Thanks!
> > 
> 
> 
> Hi,
> I am new to yocto and have the same problem.
> Can you please shortly describe which recipes you added.
> 
> Regards,
> Achim Kanert
> 
It was firefox recipes under meta-browser layer...
The old layerindex website doesn't exist anymore and there's a new website: 
http://layers.openembedded.org/layerindex/layer/meta-browser/
I think you could use a recipe like firefox-l10n-en-us

> ___
> 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] Exporting variables and extending PATH for Embedded Java

2013-04-17 Thread Davide Soldan
Environment variable should be defined in /etc/profile
In my build that file is managed by "base-files" recipe. So I wrote a custom 
recipe "base-files_3.0.14.bbappend" with only a row
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
in the "files" directory I put the "profile" file with the definition of the 
environment variable.
In that way you should overwrite the original /etc/profile with your custom 
file...

In data mercoledì 17 aprile 2013 10:57:54, Satya Swaroop Damarla ha scritto:


Hi Guys,


I am planning to install embedded java runtime environment and it just needs 
the following steps
1. Creation of directory /usr/share/java
2. Copy the files to this directory
3. Creating a environment variable JAVA_HOME=/usr/share/java/ejre1.7.0_10/bin
4. Extending the variable PATH=$PATH:$JAVA_HOME


here is my recipe... The first and second parts are done but I am not able to 
figure out the 3rd and 4th steps.. Here is my recipe


DESCRIPTION = "Embedded Java from Oracle/Sun"


LICENSE_FLAGS = "oracle_java"
LICENSE = "Oracle_Binary_Code_License_Agreement"
LIC_FILES_CHKSUM = "\

file://${WORKDIR}/${JDK_JRE}${PV}_${PV_UPDATE}/LICENSE;md5=98f46ab6481d87c4d77e0e91a6dbc15f
 \

file://${WORKDIR}/${JDK_JRE}${PV}_${PV_UPDATE}/COPYRIGHT;md5=f5f3c0856f2ca27413b55b6ca50c897e
 \

file://${WORKDIR}/${JDK_JRE}${PV}_${PV_UPDATE}/THIRDPARTYLICENSEREADME.txt;md5=c339b34e3da6673d2c5950d0f8808f8c
 \
"


SRC_URI = 
"file:///home/damarla/yocto/ejre-7u10-fcs-b18-linux-arm-vfp-client_headful-28_nov_2012.gz"


SRCREV ?= "${AUTOREV}"




SRC_URI[md5sum] = "8a6f08f39f916fcdbe0d741d550741ad"
SRC_URI[sha256sum] = 
"194a522bc27cf4746a0d8ca1e947b13832166ecd6f4f2fbaf5ce1df2a7493d43"


inherit allarch


do_install () {
install -d ${D}/usr/share/java/
cp -r ejre1.7.0_10 ${D}/usr/share/java
}




Help is deeply appreciated!
Greets,
Satya


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


[yocto] extend image.bbclass (or any bbclass file)

2013-07-12 Thread Davide Soldan
Hi to all,
I'm trying to move, from outside to inside my recipes, all the changes I've 
done for my custom image.
For example I changed the image.bbclass adding a function. But this file is 
outside of my recipes that are stored under my git repository. So I'd like to 
move this function from image.bbclass to another bbclass file under mi recipes 
directory.
I tried to copy image.bbclass under my recipes directory, change its name, and 
references correctly, but duplicates functions gave me some errors:

ERROR: The function normal_groups defined in image.bbclass was already declared 
in image-custom.bbclass. BitBake has a global python function namespace so 
shared functions should be declared in a common include file rather than being 
duplicated, or if the functions are different, please use different function 
names.
ERROR: The function complementary_globs defined in image.bbclass was already 
declared in image-custom.bbclass. BitBake has a global python function 
namespace so shared functions should be declared in a common include file 
rather than being duplicated, or if the functions are different, please use 
different function names.
ERROR: The function get_devtable_list defined in image.bbclass was already 
declared in image-custom.bbclass. BitBake has a global python function 
namespace so shared functions should be declared in a common include file 
rather than being duplicated, or if the functions are different, please use 
different function names.

So I think there should be a way to append some code to image.bbclass as I can 
do with recipes and bbappend files...right? How I can do that? Or maybe there's 
another and better way to do that?
Thanks to all!
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] extend image.bbclass (or any bbclass file)

2013-07-12 Thread Davide Soldan
Really simple!!!
Excuse me for the dumb question and thanks a lot!
Cheers
Davide
In data venerdì 12 luglio 2013 13:22:32, Erik Botö ha scritto:


Hi, 


On Fri, Jul 12, 2013 at 1:11 PM, Davide Soldan  
wrote:


Hi to all,I'm trying to move, from outside to inside my recipes, all the 
changes I've done for my custom image.For example I changed the image.bbclass 
adding a function. But this file is outside of my recipes that are stored under 
my git repository. So I'd like to move this function from image.bbclass to 
another bbclass file under mi recipes directory.I tried to copy image.bbclass 
under my recipes directory, change its name, and references correctly, but 
duplicates functions gave me some errors:

ERROR: The function normal_groups defined in image.bbclass was already declared 
in image-custom.bbclass. BitBake has a global python function namespace so 
shared functions should be declared in a common include file rather than being 
duplicated, or if the functions are different, please use different function 
names.ERROR: The function complementary_globs defined in image.bbclass was 
already declared in image-custom.bbclass. BitBake has a global python function 
namespace so shared functions should be declared in a common include file 
rather than being duplicated, or if the functions are different, please use 
different function names.ERROR: The function get_devtable_list defined in 
image.bbclass was already declared in image-custom.bbclass. BitBake has a 
global python function namespace so shared functions should be declared in a 
common include file rather than being duplicated, or if the functions are 
different, please use different function names.

So I think there should be a way to append some code to image.bbclass as I can 
do with recipes and bbappend files...right? How I can do that? Or maybe there's 
another and better way to do that?Thanks to all!




Can't your image-custom.bbclass inherit image.bbclass and then just add the 
function you've added? Instead of replicating all stuff from image.bbclass in 
your class.


Cheers, 
Erik


 
___


yocto mailing list

yocto@yoctoproject.org[2]
https://lists.yoctoproject.org/listinfo/yocto[3]







[1] mailto:davide.sol...@kynetics.it
[2] mailto:yocto@yoctoproject.org
[3] https://lists.yoctoproject.org/listinfo/yocto
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] preserving file owners in do_package

2013-10-15 Thread Davide Soldan
Hi to all,
in my recipe I want to change owner and permission of a file, so I wrote:

do_install() {
ls -la ${D}/opt/user
chown -R user ${D}/opt/user
chgrp -R user ${D}/opt/user
ls -la ${D}/opt/user
chmod 754 ${D}/opt/user/user.sh
ls -la ${D}/opt/user
}

the output of ls commands is: 

drwxr-xr-x 8 root root   4096 Oct 15 11:13 .
drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
-rw-r--r-- 1 *root root*  55753 Aug  2 08:48 user.sh

drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
-rw-r--r-- 1 *user user*  55753 Aug  2 08:48 user.sh

drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
*-rwxr-xr--* 1 user user  55753 Aug  2 08:48 user.sh

So the change of owner and permission works fine in do_install phase.
Opening the final rootfs tarball, however, the file user.sh has still 754 
permission but root as owner...so do_package doesn't preserve owner change done 
in do_install? Or maybe I'm doing something wrong in changing file owner? Any 
ideas?
Thanks to all!
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] preserving file owners in do_package

2013-10-15 Thread Davide Soldan
In data martedì 15 ottobre 2013 11:38:21, Paul Eggleton ha scritto:
> Hi Davide,
> 
> On Tuesday 15 October 2013 12:02:20 Davide Soldan wrote:
> > in my recipe I want to change owner and permission of a file, so I wrote:
> > 
> > do_install() {
> > ls -la ${D}/opt/user
> > chown -R user ${D}/opt/user
> > chgrp -R user ${D}/opt/user
> > ls -la ${D}/opt/user
> > chmod 754 ${D}/opt/user/user.sh
> > ls -la ${D}/opt/user
> > }
> > 
> > the output of ls commands is:
> > 
> > drwxr-xr-x 8 root root   4096 Oct 15 11:13 .
> > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > -rw-r--r-- 1 *root root*  55753 Aug  2 08:48 user.sh
> > 
> > drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
> > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > -rw-r--r-- 1 *user user*  55753 Aug  2 08:48 user.sh
> > 
> > drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
> > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > *-rwxr-xr--* 1 user user  55753 Aug  2 08:48 user.sh
> > 
> > So the change of owner and permission works fine in do_install phase.
> > Opening the final rootfs tarball, however, the file user.sh has still 754
> > permission but root as owner...so do_package doesn't preserve owner change
> > done in do_install? Or maybe I'm doing something wrong in changing file
> > owner? Any ideas? Thanks to all!
> 
> Does your recipe create the specified user via useradd.bbclass?
> 
> Cheers,
> Paul
> 
> 
Hi Paul,
I've got a useradd recipe (myuseradd.bbclass) that create that specific user. 
Also in my recipe I've got the
DEPENDS = "myuseradd"
to be sure that the specific user is created before my recipe is processed.
Within myuseradd recipe I've got some chown command that works fine, but 
outside that recipe I've got the problem stated in the previous mail...

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


Re: [yocto] preserving file owners in do_package

2013-10-15 Thread Davide Soldan
In data martedì 15 ottobre 2013 11:38:21, Paul Eggleton ha scritto:
> Hi Davide,
> 
> On Tuesday 15 October 2013 12:02:20 Davide Soldan wrote:
> > in my recipe I want to change owner and permission of a file, so I wrote:
> > 
> > do_install() {
> > ls -la ${D}/opt/user
> > chown -R user ${D}/opt/user
> > chgrp -R user ${D}/opt/user
> > ls -la ${D}/opt/user
> > chmod 754 ${D}/opt/user/user.sh
> > ls -la ${D}/opt/user
> > }
> > 
> > the output of ls commands is:
> > 
> > drwxr-xr-x 8 root root   4096 Oct 15 11:13 .
> > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > -rw-r--r-- 1 *root root*  55753 Aug  2 08:48 user.sh
> > 
> > drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
> > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > -rw-r--r-- 1 *user user*  55753 Aug  2 08:48 user.sh
> > 
> > drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
> > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > *-rwxr-xr--* 1 user user  55753 Aug  2 08:48 user.sh
> > 
> > So the change of owner and permission works fine in do_install phase.
> > Opening the final rootfs tarball, however, the file user.sh has still 754
> > permission but root as owner...so do_package doesn't preserve owner change
> > done in do_install? Or maybe I'm doing something wrong in changing file
> > owner? Any ideas? Thanks to all!
> 
> Does your recipe create the specified user via useradd.bbclass?
> 
> Cheers,
> Paul
> 
> 
I solved with a postinstall script (that run at boot):

pkg_postinst_${PN}() {
#!/bin/sh -e
if [ x"$D" = "x" ]; then
  chown -R user /opt/user
  chgrp -R user /opt/user
else
  exit 1
fi
}

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


Re: [yocto] How /etc/passwd packed into my final image

2013-10-16 Thread Davide Soldan
In data mercoledì 16 ottobre 2013 00:01:13, Amit Tomer ha scritto:
> I wanted to modify the content of /etc/passwd but don't know how
> /etc/passwd files is packed into final image
> 
> After the build process ,passwd file goes to
> 
> "tmp/work/k2-poky-linux-gnueabi/image-k2/1.0-r0/rootfs/etc/passwd"
> 
> this loaction
> 
> Now I see image-k2.bb file but could not find any rule that will pack
> passwd file to
> final image.
> 
> Can anybody how it is packed and way to modify it.
> 
> Thanks
> Amit
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
Hi,
I think that the recipe that creates passwd file is under 
poky/meta/recipes-core/base-passwd (I'm on dora branch).
Maybe with a bbappend of that recipe you can change the passwd file with 
yours...
Cheers
Davide
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] preserving file owners in do_package

2013-10-18 Thread Davide Soldan
In data martedì 15 ottobre 2013 17:18:35, Paul Eggleton ha scritto:
> On Tuesday 15 October 2013 18:12:42 Davide Soldan wrote:
> > In data martedì 15 ottobre 2013 11:38:21, Paul Eggleton ha scritto:
> > > On Tuesday 15 October 2013 12:02:20 Davide Soldan wrote:
> > > > in my recipe I want to change owner and permission of a file, so I
> > > > wrote:
> > > > 
> > > > do_install() {
> > > > 
> > > > ls -la ${D}/opt/user
> > > > chown -R user ${D}/opt/user
> > > > chgrp -R user ${D}/opt/user
> > > > ls -la ${D}/opt/user
> > > > chmod 754 ${D}/opt/user/user.sh
> > > > ls -la ${D}/opt/user
> > > > 
> > > > }
> > > > 
> > > > the output of ls commands is:
> > > > 
> > > > drwxr-xr-x 8 root root   4096 Oct 15 11:13 .
> > > > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > > > -rw-r--r-- 1 *root root*  55753 Aug  2 08:48 user.sh
> > > > 
> > > > drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
> > > > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > > > -rw-r--r-- 1 *user user*  55753 Aug  2 08:48 user.sh
> > > > 
> > > > drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
> > > > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > > > *-rwxr-xr--* 1 user user  55753 Aug  2 08:48 user.sh
> > > > 
> > > > So the change of owner and permission works fine in do_install phase.
> > > > Opening the final rootfs tarball, however, the file user.sh has still
> > > > 754
> > > > permission but root as owner...so do_package doesn't preserve owner
> > > > change
> > > > done in do_install? Or maybe I'm doing something wrong in changing file
> > > > owner? Any ideas? Thanks to all!
> > > 
> > > Does your recipe create the specified user via useradd.bbclass?
> > 
> > I solved with a postinstall script (that run at boot):
> > 
> > pkg_postinst_${PN}() {
> > #!/bin/sh -e
> > if [ x"$D" = "x" ]; then
> >   chown -R user /opt/user
> >   chgrp -R user /opt/user
> > else
> >   exit 1
> > fi
> > }
> 
> This shouldn't be necessary though. I honestly can't tell you why it doesn't 
> work as specified. I think it might be worth filing a bug for this.
> 
> Cheers,
> Paul
> 
> 
I'm so sorry Paul, but my mail client missed your last email and so I filed a 
bug uselessly...
I tried, as you suggested, to add the package that create the user to the 
RDEPENDS_${PN} removing the postinstall scripi. That worked setting the right 
owner with chown/chgrp in do_install...
Thank you so much. I very sorry for the useless bug opened...can I close it by 
myself?

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


Re: [yocto] preserving file owners in do_package

2013-10-18 Thread Davide Soldan
In data venerdì 18 ottobre 2013 14:38:27, Paul Eggleton ha scritto:
> Hi Davide,
> 
> On Friday 18 October 2013 15:31:22 Davide Soldan wrote:
> > In data martedì 15 ottobre 2013 17:18:35, Paul Eggleton ha scritto:
> > > On Tuesday 15 October 2013 18:12:42 Davide Soldan wrote:
> > > > In data martedì 15 ottobre 2013 11:38:21, Paul Eggleton ha scritto:
> > > > > On Tuesday 15 October 2013 12:02:20 Davide Soldan wrote:
> > > > > > in my recipe I want to change owner and permission of a file, so I
> > > > > > wrote:
> > > > > > 
> > > > > > do_install() {
> > > > > > 
> > > > > > ls -la ${D}/opt/user
> > > > > > chown -R user ${D}/opt/user
> > > > > > chgrp -R user ${D}/opt/user
> > > > > > ls -la ${D}/opt/user
> > > > > > chmod 754 ${D}/opt/user/user.sh
> > > > > > ls -la ${D}/opt/user
> > > > > > 
> > > > > > }
> > > > > > 
> > > > > > the output of ls commands is:
> > > > > > 
> > > > > > drwxr-xr-x 8 root root   4096 Oct 15 11:13 .
> > > > > > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > > > > > -rw-r--r-- 1 *root root*  55753 Aug  2 08:48 user.sh
> > > > > > 
> > > > > > drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
> > > > > > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > > > > > -rw-r--r-- 1 *user user*  55753 Aug  2 08:48 user.sh
> > > > > > 
> > > > > > drwxr-xr-x 8 user user   4096 Oct 15 11:13 .
> > > > > > drwxr-xr-x 3 root root   4096 Oct 15 11:13 ..
> > > > > > *-rwxr-xr--* 1 user user  55753 Aug  2 08:48 user.sh
> > > > > > 
> > > > > > So the change of owner and permission works fine in do_install
> > > > > > phase.
> > > > > > Opening the final rootfs tarball, however, the file user.sh has
> > > > > > still
> > > > > > 754
> > > > > > permission but root as owner...so do_package doesn't preserve owner
> > > > > > change
> > > > > > done in do_install? Or maybe I'm doing something wrong in changing
> > > > > > file
> > > > > > owner? Any ideas? Thanks to all!
> > > > > 
> > > > > Does your recipe create the specified user via useradd.bbclass?
> > > > 
> > > > I solved with a postinstall script (that run at boot):
> > > > 
> > > > pkg_postinst_${PN}() {
> > > > 
> > > > #!/bin/sh -e
> > > > if [ x"$D" = "x" ]; then
> > > > 
> > > >   chown -R user /opt/user
> > > >   chgrp -R user /opt/user
> > > > 
> > > > else
> > > > 
> > > >   exit 1
> > > > 
> > > > fi
> > > > 
> > > > }
> > > 
> > > This shouldn't be necessary though. I honestly can't tell you why it
> > > doesn't work as specified. I think it might be worth filing a bug for
> > > this.
> > > 
> > > Cheers,
> > > Paul
> > 
> > I'm so sorry Paul, but my mail client missed your last email and so I filed
> > a bug uselessly... I tried, as you suggested, to add the package that
> > create the user to the RDEPENDS_${PN} removing the postinstall scripi. That
> > worked setting the right owner with chown/chgrp in do_install... Thank you
> > so much. I very sorry for the useless bug opened...can I close it by
> > myself?
> 
> I've marked it resolved. No problem about filing it, at least it's now there 
> for reference if anyone hits the same situation :)
> 
> I think it's fair to say we need to look at how to better document all of 
> this 
> stuff in the manual. We could probably afford to dedicate a small section on 
> how 
> to deal with adding/modifying users and file ownership. Scott, could you add 
> this to your todo list?
> 
> Cheers,
> Paul
> 
> 
Very good idea! When I was looking for information about how to add/modify 
users and file ownership I missed a bit of official documentation!
Cheers
Davide
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How Do I add users in /etc/passwd in Yocto

2013-10-22 Thread Davide Soldan
In data martedì 22 ottobre 2013 14:00:22, Amit Tomer ha scritto:
> For some requirement I wante to add some new users in /etc/passwd .
> 
> I tried doing it in couple of way but none of it worked out well
> 
> I tried to patcth the /etc/passwd file but getting few errors while
> bitbaking my image.
> 
> Paul Eggleton suggests me that patching /etc/passwd  file won't work
> 
> Then I tried doing it in below way
> 
> SRC_URI += "file://passwd"
> 
> do_install_append() {
> install -d ${D}${sysconfdir}/base-passwd ${D}${sysconfdir}
> passwd/passwd${STAGING_DIR_TARGET}${sysconfdir}/passwd
> 
> install -m 0644 ${WORKDIR}/passwd ${D}${sysconfdir}/passwd
> }
> 
>  With above method I am able to add new user to /etc/passwd file
> 
> but testing this image gives me trouble and now when I login to board
> it is asking password.
> 
> Now would like to know what are the ways to add new users in
> /etc/passwd file in yocto.
> 
> Thanks
> Amit
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

I've done it creating my useradd recipe following
poky/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How Do I add users in /etc/passwd in Yocto

2013-10-22 Thread Davide Soldan
In data martedì 22 ottobre 2013 14:18:55, Amit Tomer ha scritto:
> Thanks Davide
> Can you please point to right link.
> 
I found the example recipe there:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb

> On Tue, Oct 22, 2013 at 2:12 PM, Davide Soldan
>  wrote:
> > In data martedì 22 ottobre 2013 14:00:22, Amit Tomer ha scritto:
> >> For some requirement I wante to add some new users in /etc/passwd .
> >>
> >> I tried doing it in couple of way but none of it worked out well
> >>
> >> I tried to patcth the /etc/passwd file but getting few errors while
> >> bitbaking my image.
> >>
> >> Paul Eggleton suggests me that patching /etc/passwd  file won't work
> >>
> >> Then I tried doing it in below way
> >>
> >> SRC_URI += "file://passwd"
> >>
> >> do_install_append() {
> >> install -d ${D}${sysconfdir}/base-passwd ${D}${sysconfdir}
> >> passwd/passwd${STAGING_DIR_TARGET}${sysconfdir}/passwd
> >>
> >> install -m 0644 ${WORKDIR}/passwd 
> >> ${D}${sysconfdir}/passwd
> >> }
> >>
> >>  With above method I am able to add new user to /etc/passwd file
> >>
> >> but testing this image gives me trouble and now when I login to board
> >> it is asking password.
> >>
> >> Now would like to know what are the ways to add new users in
> >> /etc/passwd file in yocto.
> >>
> >> Thanks
> >> Amit
> >> ___
> >> yocto mailing list
> >> yocto@yoctoproject.org
> >> https://lists.yoctoproject.org/listinfo/yocto
> >
> > I've done it creating my useradd recipe following
> > poky/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb

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


Re: [yocto] How Do I add users in /etc/passwd in Yocto

2013-10-22 Thread Davide Soldan
In data martedì 22 ottobre 2013 14:35:52, Amit Tomer ha scritto:
> Fine Davide
> 
> So  my requiremnet is this .
> 
> From from original /etc/passwd file
> 
> root:x:0:0:root:/home/root:/bin/sh
> proxy:x:13:13:proxy:/bin:/bin/sh
> www-data:x:33:33:www-data:/var/www:/bin/sh
> 
> Have to do this
> 
> root:x:0:0:root:/home/root:/bin/false
> proxy:x:13:13:proxy:/bin:/bin/false
> www-data:x:33:33:www-data:/var/www:/bin/false
> 
> 
> 
> Now for this would below work??
> 
> SUMMARY = "Example recipe for using inherit useradd"
> DESCRIPTION = "This recipe serves as an example for using features
> from useradd.bbclass"
> SECTION = "examples"
> PR = "r1"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM =
> "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
> 
> file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> 
> SRC_URI = "file://passwd"
> 
> USERADD_PARAM_${PN} = "-u 1200 -d /home/root -r -s /bin/false root"
> 
> And How do I force this recipe to be picked while bitbake my image??
> 
> Thanks
> Amit
> 
> On Tue, Oct 22, 2013 at 2:22 PM, Davide Soldan
>  wrote:
> > In data martedì 22 ottobre 2013 14:18:55, Amit Tomer ha scritto:
> >> Thanks Davide
> >> Can you please point to right link.
> >>
> > I found the example recipe there:
> > http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
> >
> >> On Tue, Oct 22, 2013 at 2:12 PM, Davide Soldan
> >>  wrote:
> >> > In data martedì 22 ottobre 2013 14:00:22, Amit Tomer ha scritto:
> >> >> For some requirement I wante to add some new users in /etc/passwd .
> >> >>
> >> >> I tried doing it in couple of way but none of it worked out well
> >> >>
> >> >> I tried to patcth the /etc/passwd file but getting few errors while
> >> >> bitbaking my image.
> >> >>
> >> >> Paul Eggleton suggests me that patching /etc/passwd  file won't work
> >> >>
> >> >> Then I tried doing it in below way
> >> >>
> >> >> SRC_URI += "file://passwd"
> >> >>
> >> >> do_install_append() {
> >> >> install -d ${D}${sysconfdir}/base-passwd ${D}${sysconfdir}
> >> >> passwd/passwd${STAGING_DIR_TARGET}${sysconfdir}/passwd
> >> >>
> >> >> install -m 0644 ${WORKDIR}/passwd 
> >> >> ${D}${sysconfdir}/passwd
> >> >> }
> >> >>
> >> >>  With above method I am able to add new user to /etc/passwd file
> >> >>
> >> >> but testing this image gives me trouble and now when I login to board
> >> >> it is asking password.
> >> >>
> >> >> Now would like to know what are the ways to add new users in
> >> >> /etc/passwd file in yocto.
> >> >>
> >> >> Thanks
> >> >> Amit
> >> >> ___
> >> >> yocto mailing list
> >> >> yocto@yoctoproject.org
> >> >> https://lists.yoctoproject.org/listinfo/yocto
> >> >
> >> > I've done it creating my useradd recipe following
> >> > poky/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
> >
For bitbaking your recipe within the image add the recipe in 
CORE_IMAGE_EXTRA_INSTALL of your local.conf
I don't know if the replacement of /etc/passwd would work...give it a try and 
if all works you're ok. 
I only add new users so I don't know how to replace existing ones...maybe 
recreate that users via USERADD_PARAM_${PN}/GROUPADD_PARAM_${PN} like in 
useradd-example.bb?
Hope this helps
Cheers
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto