From aa32756df58d975a26580393d34cda89c8ea6de2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Sat, 8 Jun 2019 16:30:15 +0200 Subject: [PATCH] user.eclass: Remove dead/broken Darwin support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Closes: https://bugs.gentoo.org/687568 Signed-off-by: Michał Górny --- eclass/user.eclass | 54 +++------------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) diff --git a/eclass/user.eclass b/eclass/user.eclass index f6a10a6bee28..ef5d3bc5e6e0 100644 --- a/eclass/user.eclass +++ b/eclass/user.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: user.eclass @@ -44,32 +44,6 @@ egetent() { esac case ${CHOST} in - *-darwin[678]) - case ${key} in - *[!0-9]*) # Non numeric - nidump ${db} . | awk -F: "(\$1 ~ /^${key}\$/) {print;exit;}" - ;; - *) # Numeric - nidump ${db} . | awk -F: "(\$3 == ${key}) {print;exit;}" - ;; - esac - ;; - *-darwin*) - local mykey - case ${db} in - passwd) db="Users" mykey="UniqueID" ;; - group) db="Groups" mykey="PrimaryGroupID" ;; - esac - - case ${key} in - *[!0-9]*) # Non numeric - dscl . -read /${db}/${key} 2>/dev/null |grep RecordName - ;; - *) # Numeric - dscl . -search /${db} ${mykey} ${key} 2>/dev/null - ;; - esac - ;; *-freebsd*|*-dragonfly*) case ${db} in passwd) db="user" ;; @@ -219,18 +193,6 @@ enewuser() { # add the user case ${CHOST} in - *-darwin*) - ### Make the user - dscl . create "/users/${euser}" uid ${euid} - dscl . create "/users/${euser}" shell "${eshell}" - dscl . create "/users/${euser}" home "${ehome}" - dscl . create "/users/${euser}" realname "added by portage for ${PN}" - ### Add the user to the groups specified - for g in "${egroups_arr[@]}" ; do - dscl . merge "/groups/${g}" users "${euser}" - done - ;; - *-freebsd*|*-dragonfly*) pw useradd "${euser}" "${opts[@]}" || die ;; @@ -318,12 +280,6 @@ enewgroup() { # add the group case ${CHOST} in - *-darwin*) - _enewgroup_next_gid - dscl . create "/groups/${egroup}" gid ${egid} - dscl . create "/groups/${egroup}" passwd '*' - ;; - *-freebsd*|*-dragonfly*) _enewgroup_next_gid pw groupadd "${egroup}" -g ${egid} || die @@ -358,7 +314,7 @@ egethome() { [[ $# -eq 1 ]] || die "usage: egethome " case ${CHOST} in - *-darwin*|*-freebsd*|*-dragonfly*) + *-freebsd*|*-dragonfly*) pos=9 ;; *) # Linux, NetBSD, OpenBSD, etc... @@ -379,7 +335,7 @@ egetshell() { [[ $# -eq 1 ]] || die "usage: egetshell " case ${CHOST} in - *-darwin*|*-freebsd*|*-dragonfly*) + *-freebsd*|*-dragonfly*) pos=10 ;; *) # Linux, NetBSD, OpenBSD, etc... @@ -444,10 +400,6 @@ esethome() { # update the home directory case ${CHOST} in - *-darwin*) - dscl . change "/users/${euser}" home "${ehome}" - ;; - *-freebsd*|*-dragonfly*) pw usermod "${euser}" -d "${ehome}" && return 0 [[ $? == 8 ]] && eerror "${euser} is in use, cannot update home" -- 2.26.2