From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from eddie.linux-mips.org ([148.251.95.138] helo=cvs.linux-mips.org) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1ielr2-0001r3-Nw for ptxdist@pengutronix.de; Tue, 10 Dec 2019 21:11:33 +0100 Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23990923AbfLJULcVATaJ (ORCPT ); Tue, 10 Dec 2019 21:11:32 +0100 Date: Tue, 10 Dec 2019 21:11:28 +0100 From: Ladislav Michl Message-ID: <20191210201128.GD948325@lenoch> References: <20191210200817.GA759825@lenoch> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191210200817.GA759825@lenoch> Subject: [ptxdist] [PATCH 4/4] shadow: new package List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Signed-off-by: Ladislav Michl --- rules/shadow.in | 148 +++++++++++++++++++++++++++++++++++++++++++ rules/shadow.make | 157 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 305 insertions(+) create mode 100644 rules/shadow.in create mode 100644 rules/shadow.make diff --git a/rules/shadow.in b/rules/shadow.in new file mode 100644 index 000000000..d2fbbb478 --- /dev/null +++ b/rules/shadow.in @@ -0,0 +1,148 @@ +## SECTION=shell_and_console + +menuconfig SHADOW + tristate + depends on GLOBAL_PAM + select LIBC_CRYPT + select LIBSELINUX if GLOBAL_SELINUX + select PAM + prompt "shadow " + help + Password and account management tool suite with support + for shadow files and PAM. + +if SHADOW + +config SHADOW_CHGPASSWD + bool + prompt "chgpasswd" + +config SHADOW_CHPASSWD + bool + prompt "chpasswd" + +config SHADOW_GROUPADD + bool + prompt "groupadd" + +config SHADOW_GROUPDEL + bool + prompt "groupdel" + +config SHADOW_GROUPMEMS + bool + prompt "groupmems" + +config SHADOW_GROUPMOD + bool + prompt "groupmod" + +config SHADOW_GRPCK + bool + prompt "grpck" + +config SHADOW_GRPCONV + bool + prompt "grpconv" + +config SHADOW_GRPUNCONV + bool + prompt "grpunconv" + +config SHADOW_LOGOUTD + bool + prompt "logoutd" + +config SHADOW_NEWUSERS + bool + prompt "newusers" + +config SHADOW_NOLOGIN + bool + prompt "nologin" + +config SHADOW_PWCK + bool + prompt "pwck" + +config SHADOW_PWCONV + bool + prompt "pwconv" + +config SHADOW_PWUNCONV + bool + prompt "pwunconv" + +config SHADOW_USERADD + bool + prompt "useradd" + +config SHADOW_USERDEL + bool + prompt "userdel" + +config SHADOW_USERMOD + bool + prompt "usermod" + +config SHADOW_VIPW + bool + prompt "vipw" + +config SHADOW_CHAGE + bool + prompt "chage" + +config SHADOW_CHFN + bool + prompt "chfn" + +config SHADOW_CHSH + bool + prompt "chsh" + +config SHADOW_EXPIRY + bool + prompt "expiry" + +config SHADOW_FAILLOG + bool + prompt "faillog" + +config SHADOW_GPASSWD + bool + prompt "gpasswd" + +config SHADOW_GROUPS + bool + prompt "groups" + +config SHADOW_LASTLOG + bool + prompt "lastlog" + +config SHADOW_LOGIN + bool + prompt "login" + +config SHADOW_NEWGIDMAP + bool + prompt "newgidmap" + +config SHADOW_NEWGRP + bool + prompt "newgrp" + +config SHADOW_NEWUIDMAP + bool + prompt "newuidmap" + +config SHADOW_PASSWD + bool + prompt "passwd" + +config SHADOW_SU + bool + prompt "su" + +endif diff --git a/rules/shadow.make b/rules/shadow.make new file mode 100644 index 000000000..d969adcd0 --- /dev/null +++ b/rules/shadow.make @@ -0,0 +1,157 @@ +# -*-makefile-*- +# +# Copyright (C) 2019 by Ladislav Michl +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_SHADOW) += shadow + +# +# Paths and names +# +SHADOW_VERSION := 4.6 +SHADOW_MD5 := b491fecbf1232632c32ff8f1437fd60e +SHADOW := shadow-$(SHADOW_VERSION) +SHADOW_SUFFIX := tar.xz +SHADOW_URL := https://github.com/shadow-maint/shadow/releases/download/$(SHADOW_VERSION)/$(SHADOW).$(SHADOW_SUFFIX) +SHADOW_SOURCE := $(SRCDIR)/$(SHADOW).$(SHADOW_SUFFIX) +SHADOW_DIR := $(BUILDDIR)/$(SHADOW) +SHADOW_LICENSE := BSD-3-Clause + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +# +# autoconf +# +SHADOW_CONF_TOOL := autoconf +SHADOW_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + $(GLOBAL_LARGE_FILE_OPTION) \ + --enable-shadowgrp \ + --disable-man \ + --$(call ptx/endis, PTXCONF_GLOBAL_PAM)-account-tools-setuid \ + --disable-utmpx \ + --enable-subordinate-ids \ + --disable-nls \ + --disable-rpath \ + --without-audit \ + --$(call ptx/wwo, PTXCONF_GLOBAL_PAM)-libpam \ + --$(call ptx/wwo, PTXCONF_GLOBAL_SELINUX)-selinux \ + --without-acl \ + --without-attr \ + --without-skey \ + --without-tcb \ + --without-libcrack \ + --with-sha-crypt \ + --without-nscd + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +SHADOW_PROGS_TARGET_y := +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_CHGPASSWD) += chgpasswd +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_CHPASSWD) += chpasswd +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_GROUPADD) += groupadd +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_GROUPDEL) += groupdel +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_GROUPMEMS) += groupmems +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_GROUPMOD) += groupmod +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_GRPCK) += grpck +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_GRPCONV) += grpconv +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_GRPUNCONV) += grpunconv +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_LOGOUTD) += logoutd +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_NEWUSERS) += newusers +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_NOLOGIN) += nologin +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_PWCK) += pwck +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_PWCONV) += pwconv +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_PWUNCONV) += pwunconv +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_USERADD) += useradd +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_USERDEL) += userdel +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_USERMOD) += usermod +SHADOW_PROGS_TARGET_$(PTXCONF_SHADOW_VIPW) += vipw + +SHADOW_PERMS := $(if $(strip $(GPSD_PROGS-y)),4755,0755) + +$(STATEDIR)/shadow.targetinstall: + @$(call targetinfo) + + @$(call install_init, shadow) + @$(call install_fixup, shadow,PRIORITY,optional) + @$(call install_fixup, shadow,SECTION,base) + @$(call install_fixup, shadow,AUTHOR,"Ladislav Michl ") + @$(call install_fixup, shadow,DESCRIPTION,missing) +ifdef PTXCONF_SHADOW_CHAGE + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/chage) +endif +ifdef PTXCONF_SHADOW_CHFN + @$(call install_alternative, shadow, 0, 0, 0644, /etc/pam.d/chfn) + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/chfn) +endif +ifdef PTXCONF_SHADOW_CHSH + @$(call install_alternative, shadow, 0, 0, 0644, /etc/pam.d/chsh) + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/chsh) +endif +ifdef PTXCONF_SHADOW_EXPIRY + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/expiry) +endif +ifdef PTXCONF_SHADOW_FAILLOG + @$(call install_copy, shadow, 0, 0, 0755, -, /usr/bin/faillog) +endif +ifdef PTXCONF_SHADOW_GPASSWD + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/gpasswd) +endif +ifdef PTXCONF_SHADOW_GROUPS + @$(call install_copy, shadow, 0, 0, 0755, -, /usr/bin/groups) +endif +ifdef PTXCONF_SHADOW_LASTLOG + @$(call install_copy, shadow, 0, 0, 0755, -, /usr/bin/lastlog) +endif +ifdef PTXCONF_SHADOW_LOGIN + @$(call install_alternative, shadow, 0, 0, 0644, /etc/login.defs) + @$(call install_alternative, shadow, 0, 0, 0644, /etc/pam.d/login) + @$(call install_copy, shadow, 0, 0, 0755, -, /usr/bin/login) +endif +ifdef PTXCONF_SHADOW_NEWGIDMAP + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/newgidmap) +endif +ifdef PTXCONF_SHADOW_NEWGRP + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/newgrp) + @$(call install_link, shadow, newgrp, /usr/bin/sg) +endif +ifdef PTXCONF_SHADOW_NEWUIDMAP + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/newuidmap) +endif +ifdef PTXCONF_SHADOW_PASSWD + @$(call install_alternative, shadow, 0, 0, 0644, /etc/pam.d/passwd) + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/passwd) +endif +ifdef PTXCONF_SHADOW_SU + @$(call install_alternative, shadow, 0, 0, 0644, /etc/pam.d/su) + @$(call install_copy, shadow, 0, 0, 4755, -, /usr/bin/su) +endif + @$(foreach prog, $(SHADOW_PROGS_TARGET_y), \ + $(call install_copy, shadow, 0, 0, 0755, -, \ + /usr/sbin/$(prog));) +ifdef PTXCONF_SHADOW_VIPW + @$(call install_link, shadow, vipw, /usr/sbin/wigr) +endif +ifdef PTXCONF_SHADOW_USERADD + @$(call install_alternative, shadow, 0, 0, 0644, /etc/default/useradd) +endif +ifdef PTXCONF_SHADOW_GROUPMEMS + @$(call install_alternative, shadow, 0, 0, 0644, /etc/pam.d/groupmems) +endif + @$(call install_finish, shadow) + + @$(call touch) + +# vim: syntax=make -- 2.24.0 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de