Why Do I Get /Etc/Cups Conflicts Between Attempted Installs in Yocto

How to add users at build time via Yocto?

Your question seems to consists of two parts:

  1. How to add a user

    The useradd part in your example is doing this already; look into the /etc/passwd file and you will find the user1

  2. How to set the password

    You have to specify the password with the -p option and ensure that a login shell (and e.g. not /bin/false) has been given:

USERADD_PARAM_${PN} = "-s /bin/bash -p '$1$HzRkQcjT$/jV0VB4GJd1b3DTXfCYNo.' user1" 

But in most cases you do not need step 2 because there are usually only service users but no ordinary users on embedded systems.

yocto kernel module recipe

  1. You have inherit module in your recipe. This means you do have both do_compile() and do_install(): see meta/classes/module.bbclass.

  2. You have not actually explained what your issue is?

  3. module class inherits kernel-module-split class: this will create one package per built module, generating package names from module names, and setting FILES_* variables as needed. The RPROVIDES line seems to be just saying that one of the generated packages ("kernel-module-foo") can also be referred to with the name "${PN}".

See https://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#incorporating-out-of-tree-modules for more details

Where is cups-pdf.ppd file?

I found it in directory /etc/cups/ppd.

Home directory not created by useradd-example.bb

I'm not sure if it's a clean way but I ended up creating the home directories as follows:

do_install () {
install -d -m 711 ${D}/home/user1
chown -R user1 ${D}/home/user1
chgrp -R user1 ${D}/home/user1
}

Important lesson learned: If you plan to move files into the created home directory from another recipe, make sure that the directories you create there match the permissions as they are set here. Otherwise you will get an error saying that there are conflicting directories.



Related Topics



Leave a reply



Submit