diff options
Diffstat (limited to 'meta-perl/recipes-perl/adduser')
-rw-r--r-- | meta-perl/recipes-perl/adduser/adduser_3.118.bb (renamed from meta-perl/recipes-perl/adduser/adduser_3.116.bb) | 21 | ||||
-rw-r--r-- | meta-perl/recipes-perl/adduser/files/0001-adduser-set-default-shell-with-sbin-nologin.patch | 34 |
2 files changed, 45 insertions, 10 deletions
diff --git a/meta-perl/recipes-perl/adduser/adduser_3.116.bb b/meta-perl/recipes-perl/adduser/adduser_3.118.bb index 112a5f022a..3ac2211aa6 100644 --- a/meta-perl/recipes-perl/adduser/adduser_3.116.bb +++ b/meta-perl/recipes-perl/adduser/adduser_3.118.bb @@ -1,28 +1,29 @@ 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/" +HOMEPAGE = "https://salsa.debian.org/debian/adduser" SECTION = "base/utils" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://debian/copyright;md5=caed49ab166f22ef31bf1127f558d0ef" -SRC_URI = "http://ftp.de.debian.org/debian/pool/main/a/${BPN}/${BPN}_${PV}.tar.xz \ +SRC_URI = "https://launchpad.net/debian/+archive/primary/+sourcefiles/adduser/${PV}/${BPN}_${PV}.tar.xz \ file://adduser-add-M-option-for-useradd.patch \ + file://0001-adduser-set-default-shell-with-sbin-nologin.patch \ " -SRC_URI[md5sum] = "e042a5842b8f24312d6f5a99a1af8f2c" -SRC_URI[sha256sum] = "72d811ad3ba17d2794b14d19acd1d6b57f9dd31d9250d51e786895dee2daeac0" - -inherit cpan-base update-alternatives +SRC_URI[md5sum] = "44ba2475ebdaafc9613236bdda321c97" +SRC_URI[sha256sum] = "3e9eea661c9aac6b2c791bfcc1de3a9c6a422d45c8f3d38ed417737ed3166ffc" S = "${WORKDIR}/${BPN}" +inherit cpan-base update-alternatives + 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 + install -D -m 0644 ${S}/AdduserCommon.pm ${D}${libdir}/perl5/${@get_perl_version(d)}/Debian/AdduserCommon.pm sed -i -e "s/VERSION/${PV}/" ${D}${sbindir}/* install -d ${D}/${sysconfdir} @@ -36,7 +37,7 @@ do_install() { cp -rf ${S}/examples ${D}${docdir}/${BPN} } -RDEPENDS_${PN} += "\ +RDEPENDS:${PN} += "\ shadow \ perl-module-getopt-long \ perl-module-overloading \ @@ -44,7 +45,7 @@ RDEPENDS_${PN} += "\ perl-module-file-temp \ " -ALTERNATIVE_${PN} = "adduser deluser addgroup delgroup" +ALTERNATIVE:${PN} = "adduser deluser addgroup delgroup" ALTERNATIVE_PRIORITY = "60" ALTERNATIVE_LINK_NAME[adduser] = "${sbindir}/adduser" ALTERNATIVE_LINK_NAME[deluser] = "${sbindir}/deluser" diff --git a/meta-perl/recipes-perl/adduser/files/0001-adduser-set-default-shell-with-sbin-nologin.patch b/meta-perl/recipes-perl/adduser/files/0001-adduser-set-default-shell-with-sbin-nologin.patch new file mode 100644 index 0000000000..91cc6bcba8 --- /dev/null +++ b/meta-perl/recipes-perl/adduser/files/0001-adduser-set-default-shell-with-sbin-nologin.patch @@ -0,0 +1,34 @@ +From 75e949bf80bf5e3e5bd8f81b258095e662b705c4 Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Thu, 9 Jan 2020 13:51:28 +0800 +Subject: [PATCH] adduser: set default shell with /sbin/nologin + +Shell nologin whether provided by shadow or util-linux is installed to +/sbin/nologin in oe-core. But the default shell of adduser is +/usr/sbin/nologin and will fail to create a new user. + +Set the default shell with /sbin/nologin to fix the issue. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + adduser | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/adduser b/adduser +index 0f24cc9..ab554d0 100755 +--- a/adduser ++++ b/adduser +@@ -431,7 +431,7 @@ if ($action eq "addsysuser") { + printf gtx("Adding new user `%s' (UID %d) with group `%s' ...\n"),$new_name,$new_uid,$ingroup_name + if $verbose; + $home_dir = $special_home || &homedir($new_name, $ingroup_name); +- $shell = $special_shell || '/usr/sbin/nologin'; ++ $shell = $special_shell || '/sbin/nologin'; + $undouser = $new_name; + my $useradd = &which('useradd'); + &systemcall($useradd, '-d', $home_dir, '-g', $ingroup_name, '-s', +-- +2.17.1 + |