diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-perl/recipes-perl/adduser | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-perl/recipes-perl/adduser')
-rw-r--r-- | meta-openembedded/meta-perl/recipes-perl/adduser/adduser_3.116.bb | 54 | ||||
-rw-r--r-- | meta-openembedded/meta-perl/recipes-perl/adduser/files/adduser-add-M-option-for-useradd.patch | 45 |
2 files changed, 99 insertions, 0 deletions
diff --git a/meta-openembedded/meta-perl/recipes-perl/adduser/adduser_3.116.bb b/meta-openembedded/meta-perl/recipes-perl/adduser/adduser_3.116.bb new file mode 100644 index 0000000000..112a5f022a --- /dev/null +++ b/meta-openembedded/meta-perl/recipes-perl/adduser/adduser_3.116.bb @@ -0,0 +1,54 @@ +SUMMARY = "a utility to add users/groups to the system" +DESCRIPTION = "adduser, addgroup - add a user or group to the system" +HOMEPAGE = "http://alioth.debian.org/projects/adduser/" +SECTION = "base/utils" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://debian/copyright;md5=caed49ab166f22ef31bf1127f558d0ef" + +SRC_URI = "http://ftp.de.debian.org/debian/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \ + file://adduser-add-M-option-for-useradd.patch \ +" + +SRC_URI[md5sum] = "e042a5842b8f24312d6f5a99a1af8f2c" +SRC_URI[sha256sum] = "72d811ad3ba17d2794b14d19acd1d6b57f9dd31d9250d51e786895dee2daeac0" + +inherit cpan-base update-alternatives + +S = "${WORKDIR}/${BPN}" + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${S}/adduser ${D}${sbindir} + install -m 0755 ${S}/deluser ${D}${sbindir} + + install -D -m 0644 ${S}/AdduserCommon.pm ${D}${libdir}/perl/${@get_perl_version(d)}/Debian/AdduserCommon.pm + sed -i -e "s/VERSION/${PV}/" ${D}${sbindir}/* + + install -d ${D}/${sysconfdir} + install -m 0644 ${S}/*.conf ${D}/${sysconfdir} + + install -d ${D}${mandir}/man5 + install -m 0644 ${S}/doc/*.conf.5 ${D}${mandir}/man5 + install -d ${D}${mandir}/man8 + install -m 0644 ${S}/doc/*.8 ${D}${mandir}/man8 + install -d ${D}${docdir}/${BPN} + cp -rf ${S}/examples ${D}${docdir}/${BPN} +} + +RDEPENDS_${PN} += "\ + shadow \ + perl-module-getopt-long \ + perl-module-overloading \ + perl-module-file-find \ + perl-module-file-temp \ +" + +ALTERNATIVE_${PN} = "adduser deluser addgroup delgroup" +ALTERNATIVE_PRIORITY = "60" +ALTERNATIVE_LINK_NAME[adduser] = "${sbindir}/adduser" +ALTERNATIVE_LINK_NAME[deluser] = "${sbindir}/deluser" +ALTERNATIVE_LINK_NAME[addgroup] = "${sbindir}/addgroup" +ALTERNATIVE_LINK_NAME[delgroup] = "${sbindir}/delgroup" +ALTERNATIVE_TARGET[addgroup] = "${sbindir}/adduser.${BPN}" +ALTERNATIVE_TARGET[delgroup] = "${sbindir}/deluser.${BPN}" diff --git a/meta-openembedded/meta-perl/recipes-perl/adduser/files/adduser-add-M-option-for-useradd.patch b/meta-openembedded/meta-perl/recipes-perl/adduser/files/adduser-add-M-option-for-useradd.patch new file mode 100644 index 0000000000..2ecec512fb --- /dev/null +++ b/meta-openembedded/meta-perl/recipes-perl/adduser/files/adduser-add-M-option-for-useradd.patch @@ -0,0 +1,45 @@ +From 55a0adfc416ad85dbc440eaa667d98c200a8ce62 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Thu, 18 Dec 2014 17:23:37 +0800 +Subject: [PATCH] adduser: add -M option for useradd + +The useradd (from package passwd) in debian based system sets -M (--no-create-home) by default, +but the one we are using (from package shadow) sets -m (--create-home) by default, so we +need to explicitly add -M option for useradd call or it will try to create home twice and +throw a confused message: +"The home directory `/home/newuser' already exists. Not copying from `/etc/skel'" + +Upstream-Status: Submitted [1] + +[1] https://lists.alioth.debian.org/pipermail/adduser-devel/2016-October/005478.html + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + adduser | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/adduser b/adduser +index a5f83f3..f6cb52c 100755 +--- a/adduser ++++ b/adduser +@@ -435,7 +435,7 @@ if ($action eq "addsysuser") { + $undouser = $new_name; + my $useradd = &which('useradd'); + &systemcall($useradd, '-d', $home_dir, '-g', $ingroup_name, '-s', +- $shell, '-u', $new_uid, $new_name); ++ $shell, '-u', $new_uid, '-M', $new_name); + if(!$disabled_login) { + my $usermod = &which('usermod'); + &systemcall($usermod, '-p', '*', $new_name); +@@ -525,7 +525,7 @@ if ($action eq "adduser") { + $undouser = $new_name; + my $useradd = &which('useradd'); + &systemcall($useradd, '-d', $home_dir, '-g', $ingroup_name, '-s', +- $shell, '-u', $new_uid, $new_name); ++ $shell, '-u', $new_uid, '-M', $new_name); + &invalidate_nscd(); + + create_homedir (1); # copy skeleton data +-- +1.8.5.2 + |