From: Koen Kooi <k.kooi@student.utwente.nl>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [PATCH][STABLE] shadow: reorg into .inc, pull some mvl6 changes over, use a 'pam' distro feature.
Date: Mon, 22 Mar 2010 13:36:22 +0100 [thread overview]
Message-ID: <ho7o86$nb2$12@dough.gmane.org> (raw)
In-Reply-To: <1269256016-13155-6-git-send-email-marcin@juszkiewicz.com.pl>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Acked-by: Koen Kooi <koen@openembedded.org>
On 22-03-10 12:06, Marcin Juszkiewicz wrote:
> From: Chris Larson <clarson@mvista.com>
>
> Signed-off-by: Chris Larson <clarson@mvista.com>
> ---
> recipes/shadow/shadow.inc | 91 ++++++++++++++++++++++++++++++++++++++
> recipes/shadow/shadow_4.1.4.1.bb | 3 +
> recipes/shadow/shadow_4.1.4.2.bb | 55 +----------------------
> recipes/shadow/shadow_4.1.4.bb | 12 +----
> 4 files changed, 98 insertions(+), 63 deletions(-)
> create mode 100644 recipes/shadow/shadow.inc
> create mode 100644 recipes/shadow/shadow_4.1.4.1.bb
>
> diff --git a/recipes/shadow/shadow.inc b/recipes/shadow/shadow.inc
> new file mode 100644
> index 0000000..83d06c3
> --- /dev/null
> +++ b/recipes/shadow/shadow.inc
> @@ -0,0 +1,91 @@
> +# Configuration parameters
> +SHADOW_MAILFILE ?= "Mailbox"
> +SHADOW_MAILDIR ?= "${localstatedir}/spool/mail"
> +SHADOW_UTMPDIR ?= "${localstatedir}/utmp"
> +SHADOW_LOGDIR ?= "${localstatedir}/log"
> +
> +# Metadata
> +DESCRIPTION = "Tools to change and administer password and group data."
> +HOMEPAGE = "http://pkg-shadow.alioth.debian.org/"
> +LICENSE = "BSD"
> +SECTION = "base"
> +DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
> +
> +INC_PR = "r6"
> +
> +# Additional Policy files for PAM
> +PAM_SRC_URI = " \
> + file://pam.d/chfn \
> + file://pam.d/chpasswd \
> + file://pam.d/chsh \
> + file://pam.d/login \
> + file://pam.d/newusers \
> + file://pam.d/passwd \
> + file://pam.d/su \
> +"
> +SRC_URI = "ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.bz2 \
> + file://login_defs_pam.sed \
> + ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
> + file://securetty \
> +"
> +
> +inherit autotools gettext
> +
> +EXTRA_OECONF += "\
> + --disable-account-tools-setuid \
> + --without-audit \
> + --without-selinux \
> + --without-libcrack \
> + ${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)} \
> +"
> +
> +CFLAGS += "-I../include"
> +
> +do_configure_prepend () {
> + export CONFIG_SITE="${CONFIG_SITE} ${B}/cachedpaths"
> + cat <<END >${B}/cachedpaths
> +shadow_cv_maildir=${SHADOW_MAILDIR}
> +shadow_cv_mailfile=${SHADOW_MAILFILE}
> +shadow_cv_utmpdir=${SHADOW_UTMPDIR}
> +shadow_cv_logdir=${SHADOW_LOGDIR}
> +shadow_cv_passwd_dir=${bindir}
> +END
> +}
> +
> +do_install_append() {
> + # Ensure that the image has as /var/spool/mail dir so shadow can put mailboxes there if the user
> + # reconfigures Shadow to default (see sed below).
> + install -d ${D}${SHADOW_MAILDIR}
> +
> + if [ -e ${WORKDIR}/pam.d ]; then
> + install -d ${D}${sysconfdir}/pam.d/
> + install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
> + fi
> +
> + # Remove defaults that are not used when supporting PAM
> + ${@base_contains('DISTRO_FEATURES', 'pam', 'sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs', '', d)}
> +
> + # Enable CREATE_HOME by default.
> + sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs
> +
> + # As we are on an embedded system ensure the users mailbox is in ~/ not
> + # /var/spool/mail by default as who knows where or how big /var is.
> + # The system MDA will set this later anyway.
> + sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs
> + sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs
> +
> + mv ${D}${sbindir}/chpasswd ${D}${sbindir}/chpasswd.${PN}
> + mv ${D}${bindir}/passwd ${D}${bindir}/chpasswd.${PN}
> +
> + install -m 0644 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
> +}
> +
> +pkg_postinst_${PN} () {
> + update-alternatives --install ${bindir}/passwd passwd passwd.${PN} 100
> + update-alternatives --install ${sbindir}/chpasswd chpasswd chpasswd.${PN} 100
> +}
> +
> +pkg_prerm_${PN} () {
> + update-alternatives --remove passwd passwd.${PN}
> + update-alternatives --remove chpasswd chpasswd.${PN}
> +}
> diff --git a/recipes/shadow/shadow_4.1.4.1.bb b/recipes/shadow/shadow_4.1.4.1.bb
> new file mode 100644
> index 0000000..7f9d403
> --- /dev/null
> +++ b/recipes/shadow/shadow_4.1.4.1.bb
> @@ -0,0 +1,3 @@
> +require shadow.inc
> +
> +PR = "${INC_PR}.0"
> diff --git a/recipes/shadow/shadow_4.1.4.2.bb b/recipes/shadow/shadow_4.1.4.2.bb
> index b53f89f..7f9d403 100644
> --- a/recipes/shadow/shadow_4.1.4.2.bb
> +++ b/recipes/shadow/shadow_4.1.4.2.bb
> @@ -1,54 +1,3 @@
> -DESCRIPTION = "login/password and account utilities"
> -LICENSE = "GPL"
> +require shadow.inc
>
> -DEPENDS = "libpam"
> -
> -PR = "r6"
> -
> -EXTRA_OECONF += " --enable-shared --enable-static --with-libpam --without-libcrack"
> -
> -inherit autotools
> -
> -HOMEPAGE = "http://pkg-shadow.alioth.debian.org/"
> -SRC_URI = "ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.bz2 \
> - file://login_defs_pam.sed \
> -"
> -
> -# Additional Policy files for PAM
> -SRC_URI_append = " \
> - file://pam.d/chfn \
> - file://pam.d/chpasswd \
> - file://pam.d/chsh \
> - file://pam.d/login \
> - file://pam.d/newusers \
> - file://pam.d/passwd \
> - file://pam.d/su \
> - file://securetty \
> -"
> -
> -S = "${WORKDIR}/shadow-${PV}"
> -
> -CFLAGS_append = " -I../include"
> -
> -do_install_append() {
> - # Ensure that the image has as /var/spool/mail dir so shadow can put mailboxes there if the user
> - # reconfigures Shadow to default (see sed below).
> - install -d ${D}${localstatedir}/spool/mail/
> -
> - install -d ${D}${sysconfdir}/pam.d/
> - install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
> -
> - # Remove defaults that are not used when supporting PAM
> - sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs
> -
> - # Enable CREATE_HOME by default.
> - sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs
> -
> - # As we are on an embedded system ensure the users mailbox is in ~/ not
> - # /var/spool/mail by default as who knows where or how big /var is.
> - # The system MDA will set this later anyway.
> - sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs
> - sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs
> -
> - install -m 0644 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
> -}
> +PR = "${INC_PR}.0"
> diff --git a/recipes/shadow/shadow_4.1.4.bb b/recipes/shadow/shadow_4.1.4.bb
> index 393edce..7f9d403 100644
> --- a/recipes/shadow/shadow_4.1.4.bb
> +++ b/recipes/shadow/shadow_4.1.4.bb
> @@ -1,11 +1,3 @@
> -DESCRIPTION = "login/password utilities"
> -LICENSE = "GPL"
> -
> -inherit autotools
> -
> -SRC_URI = "ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.gz"
> -
> -S = "${WORKDIR}/shadow-${PV}"
> -
> -CFLAGS_append = " -I../include"
> +require shadow.inc
>
> +PR = "${INC_PR}.0"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLp2RGMkyGM64RGpERAiENAJwNpH/y/n4VbGrqgdstL96ptIp+agCfQeOi
MVAUkD2m+LpAwyMygi/g7C4=
=PoQ8
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2010-03-22 13:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 11:06 [STABLE] Adding shadow recipes Marcin Juszkiewicz
2010-03-22 11:06 ` [PATCH][STABLE] shadow: add 4.1.4 Marcin Juszkiewicz
2010-03-22 12:35 ` Koen Kooi
2010-03-23 1:59 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow: Add version 4.1.4.2 and checksum Marcin Juszkiewicz
2010-03-22 12:35 ` Koen Kooi
2010-03-23 2:00 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow: try to fix serial-login issue Marcin Juszkiewicz
2010-03-22 11:24 ` Koen Kooi
2010-03-23 2:00 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow: unbork the dependencies.. its DEPENDS, not DEPEND Marcin Juszkiewicz
2010-03-22 12:36 ` Koen Kooi
2010-03-23 2:00 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow: reorg into .inc, pull some mvl6 changes over, use a 'pam' distro feature Marcin Juszkiewicz
2010-03-22 12:36 ` Koen Kooi [this message]
2010-03-23 2:00 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow.inc: Correctly install /etc/securetty and add back support for creating /etc/skel as part of the recipe Marcin Juszkiewicz
2010-03-22 12:34 ` Koen Kooi
2010-03-23 2:00 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow: Extend securetty file to include more common ttys (inc. ones used on OMAP3 platforms). Small correction for login pam file Marcin Juszkiewicz
2010-03-22 12:36 ` Koen Kooi
2010-03-23 2:01 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow: Fix issue that stopped shadow.inc from packaging /usr/bin/passwd correctly and bump INC_PR Marcin Juszkiewicz
2010-03-22 12:36 ` Koen Kooi
2010-03-23 2:01 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow: run pwconv and grpconv in postinst Marcin Juszkiewicz
2010-03-22 11:24 ` Koen Kooi
2010-03-23 2:01 ` Philip Balister
2010-03-22 11:06 ` [PATCH][STABLE] shadow: use u-a on binaries that conflict with util-linux-ng Marcin Juszkiewicz
2010-03-22 11:24 ` Koen Kooi
2010-03-23 2:01 ` Philip Balister
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='ho7o86$nb2$12@dough.gmane.org' \
--to=k.kooi@student.utwente.nl \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox