Patchwork [v2,2/5] xuser-account: create separate recipe for xuser creation

login
register
mail settings
Submitter Laurentiu Palcu
Date July 4, 2013, 10:58 a.m.
Message ID <4e815a29c0d069823211ba33645f3b08ae968bfd.1372933905.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/52967/
State New
Headers show

Comments

Laurentiu Palcu - July 4, 2013, 10:58 a.m.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 .../user-creation/xuser-account_0.1.bb             |   27 ++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 meta/recipes-support/user-creation/xuser-account_0.1.bb
Ross Burton - July 4, 2013, 11:29 a.m.
On 4 July 2013 11:58, Laurentiu Palcu <laurentiu.palcu@intel.com> wrote:
> +USERADD_PARAM_${PN} = "--create-home \
> +                       --groups video,tty,audio,input,shutdown \
> +                       --user-group xuser"

I'm not liking the name "xuser" but unless someone has a much better
idea right now we can change that later.

Thinking about places where the xuser is used in other recipes (i.e.
connman for ACLs), can anyone see a problem with adding xuser to the
"users" group so those ACLS can use group membership instead of user
name?

Ross
Martin Jansa - July 4, 2013, 11:46 a.m.
On Thu, Jul 04, 2013 at 01:58:01PM +0300, Laurentiu Palcu wrote:
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
>  .../user-creation/xuser-account_0.1.bb             |   27 ++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 meta/recipes-support/user-creation/xuser-account_0.1.bb
> 
> diff --git a/meta/recipes-support/user-creation/xuser-account_0.1.bb b/meta/recipes-support/user-creation/xuser-account_0.1.bb
> new file mode 100644
> index 0000000..7430d2a
> --- /dev/null
> +++ b/meta/recipes-support/user-creation/xuser-account_0.1.bb
> @@ -0,0 +1,27 @@
> +DESCRIPTION = "Creates an 'xuser' account"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
> +

can we inherit allarch in it?

> +SRC_URI = ""
> +
> +inherit useradd
> +
> +do_configure() {
> +    :
> +}
> +
> +do_compile() {
> +    :
> +}
> +
> +do_install() {
> +    :
> +}
> +
> +USERADD_PACKAGES = "${PN}"
> +GROUPADD_PARAM_${PN} = "--system shutdown"
> +USERADD_PARAM_${PN} = "--create-home \
> +                       --groups video,tty,audio,input,shutdown \
> +                       --user-group xuser"
> +
> +ALLOW_EMPTY_${PN} = "1"
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Tomas Frydrych - July 4, 2013, 11:58 a.m.
On 04/07/13 12:29, Burton, Ross wrote:
> On 4 July 2013 11:58, Laurentiu Palcu <laurentiu.palcu@intel.com> wrote:
>> +USERADD_PARAM_${PN} = "--create-home \
>> +                       --groups video,tty,audio,input,shutdown \
>> +                       --user-group xuser"
> 
> I'm not liking the name "xuser" but unless someone has a much better
> idea right now we can change that later.

oeuser?

> Thinking about places where the xuser is used in other recipes (i.e.
> connman for ACLs), can anyone see a problem with adding xuser to the
> "users" group so those ACLS can use group membership instead of user
> name?

Yes, I think group would be preferred option.

Tomas

Patch

diff --git a/meta/recipes-support/user-creation/xuser-account_0.1.bb b/meta/recipes-support/user-creation/xuser-account_0.1.bb
new file mode 100644
index 0000000..7430d2a
--- /dev/null
+++ b/meta/recipes-support/user-creation/xuser-account_0.1.bb
@@ -0,0 +1,27 @@ 
+DESCRIPTION = "Creates an 'xuser' account"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI = ""
+
+inherit useradd
+
+do_configure() {
+    :
+}
+
+do_compile() {
+    :
+}
+
+do_install() {
+    :
+}
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system shutdown"
+USERADD_PARAM_${PN} = "--create-home \
+                       --groups video,tty,audio,input,shutdown \
+                       --user-group xuser"
+
+ALLOW_EMPTY_${PN} = "1"