Re: [yocto] [bitbake-devel] Yocto: Add custom user to custom group in bitbake recipe

2018-03-02 Thread Parthiban Nallathambi

Hi Maxim,

space.bb --> chromium recipe in 
https://github.com/OSSystems/meta-browser/tree/master/recipes-browser/chromium


app.bb --> http-server.bb attached

I have created a group "www" in http-server_0.10.0.bb and trying to add 
"chromium" user to this group in chromium-x11_%.bbappend.


But the useradd command is failed: group 'www' does not exit.


On 03/02/2018 01:29 PM, Maxin B. John wrote:

Hi Parthiban,

On Fri, Mar 02, 2018 at 12:29:25PM +0100, Parthiban Nallathambi wrote:

Hello All,

I have created a custom group e.g "grp1" in my application recipe say
"app.bb".

GROUPADD_PARAM_${PN} = "grp1"

I am trying add my custom user e.g: "user1" to this group "grp1" in
"space.bb".

USERADD_PARAM_${PN} = "-d ${localstatedir}/lib/space/ -s /bin/false -G grp1
-U user1"

The useradd command failed saying the "useradd: group 'grp1' does not
exist". I have also tried adding DEPENDS_${PN} = "app" in space.bb, but it
doesn't help.

How can I add my custom user to my custom group in bitbake recipe?


Please share your sample recipes here. It will be helpful to debug the problem.


Question in Stackoverflow: 
https://stackoverflow.com/questions/49068076/yocto-add-custom-user-to-custom-group

--
Thanks,
Parthiban Nallathambi


Best Regards,
Maxin



--
Thanks,
Parthiban Nallathambi

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
inherit systemd
inherit useradd

# skip runtime dependency on bash
# since we don't use the wrapper script
RDEPENDS_${PN}_remove = "bash"

FILESEXTRAPATHS_append := "${THISDIR}/files:"

SRC_URI += " \
 file://chromium-start \
 file://chromium.service \
 file://chromium-tty.rules \
 "

do_install_append() {

install -d ${D}${systemd_unitdir}/system
install -m 755 ${WORKDIR}/chromium-start  ${D}${bindir}/
install -m 644 ${WORKDIR}/chromium.service ${D}${systemd_unitdir}/system

install -d ${D}${sysconfdir}/udev/rules.d
install -m 644 ${WORKDIR}/chromium-tty.rules ${D}${sysconfdir}/udev/rules.d

rm ${D}${libdir}/chromium/chromium-wrapper
rm ${D}${bindir}/chromium
ln -s ${libdir}/chromium/chromium-bin ${D}${bindir}/chromium
}

SYSTEMD_SERVICE_${PN} = "chromium.service"
FILES_${PN} += " ${bindir}/chromium-start 
${sysconfdir}/udev/rules.d/chromium-tty.rules"

USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = "-d ${localstatedir}/lib/chromium -s /bin/false -G 
tty,video,input,www,www-data -U chromium"
SUMMARY = "http-server: a command-line http server"
DESCRIPTION = "http-server is a simple, zero-configuration command-line \
http server. It is powerful enough for production usage, but it's simple \
and hackable enough to be used for testing, local development, and learning.\
"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=8805b6f8b8c4f6ceff520f4c3aaa8094"

SRC_URI = "npm://registry.npmjs.org;name=http-server;version=${PV} \
file://http-server.service \
file://ssc_gen.sh \
"
inherit npm
# Must be set after inherit npm since that itself sets S
S = "${WORKDIR}/npmpkg"
DEPENDS_${PN} = "nodejs-npm"
RDEPENDS_${PN}-ecstatic = "bash"

LICENSE_${PN} = "MIT"

inherit systemd
inherit useradd
do_install_append() {

install -d ${D}${systemd_unitdir}/system
install -m 644 ${WORKDIR}/http-server.service ${D}${systemd_unitdir}/system
install -m 755 ${WORKDIR}/ssc_gen.sh ${D}${bindir}
}

SYSTEMD_SERVICE_${PN} = "http-server.service"
USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "www"
USERADD_PARAM_${PN} = "-d ${localstatedir}/lib/chromium -s /bin/false -G 
www-data -U www"
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Yocto: Add custom user to custom group in bitbake recipe

2018-03-02 Thread Parthiban Nallathambi

Hello All,

I have created a custom group e.g "grp1" in my application recipe say 
"app.bb".


GROUPADD_PARAM_${PN} = "grp1"

I am trying add my custom user e.g: "user1" to this group "grp1" in 
"space.bb".


USERADD_PARAM_${PN} = "-d ${localstatedir}/lib/space/ -s /bin/false -G 
grp1 -U user1"


The useradd command failed saying the "useradd: group 'grp1' does not 
exist". I have also tried adding DEPENDS_${PN} = "app" in space.bb, but 
it doesn't help.


How can I add my custom user to my custom group in bitbake recipe?

Question in Stackoverflow: 
https://stackoverflow.com/questions/49068076/yocto-add-custom-user-to-custom-group


--
Thanks,
Parthiban Nallathambi

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Add custom user to custom group in bitbake recipe

2018-03-02 Thread Parthiban Nallathambi

Hello All,

I have created a custom group e.g "grp1" in my application recipe say 
"app.bb".


GROUPADD_PARAM_${PN} = "grp1"

I am trying to add my custom user e.g: "user1" to this group "grp1" in 
"space.bb".


USERADD_PARAM_${PN} = "-d ${localstatedir}/lib/space/ -s /bin/false -G 
grp1 -U user1"


The useradd command failed: "useradd: group 'grp1' does not exist". I 
have also tried adding DEPENDS_${PN} = "app" in space.bb, but it doesn't 
help.


How can I add my custom user to my custom group in bitbake recipe?

Question in Stackoverflow: 
https://stackoverflow.com/questions/49068076/yocto-add-custom-user-to-custom-group


--
Thanks,
Parthiban Nallathambi

DENX Software Engineering GmbH,  Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-raspberrypi][PATCH]gstreamer1.0-plugins-bad_1.4.0.bbappend file renamed

2014-09-19 Thread Parthiban Nallathambi (RBEI/ECF3)
Hello All,

I have attached a patch file for renaming the 
gstreamer1.0-plugins-bad_1.4.0.bbappend to make it version independent. 
Please review the same and update.

History:
Changes done after I faced the below error while building with poky system.
---Snip---
parthiban@ubuntu:~/git/yocto/poky$ source oe-init-build-env rpi

### Shell environment set up for builds. ###

You can now run 'bitbake target'

Common targets are:
core-image-minimal
core-image-sato
meta-toolchain
adt-installer
meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
parthiban@ubuntu:~/git/yocto/poky/rpi$ bitbake -c fetchall core-image-minimal
Loading cache: 100% 
||
 ETA:  00:00:00
Loaded 1306 entries from dependency cache.
Parsing recipes: 100% 
|##|
 Time: 00:00:00
Parsing of 909 .bb files complete (907 cached, 2 parsed). 1305 targets, 66 
skipped, 0 masked, 0 errors.
ERROR: No recipes available for:
  
/home/parthiban/git/yocto/poky/meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.0.bbappend

Summary: There was 1 ERROR message shown, returning a non-zero exit code.
---Snip---

Thanks,
Parthiban N


rename-gstreamer-bbappend.patch
Description: rename-gstreamer-bbappend.patch
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto