summaryrefslogtreecommitdiff
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-23 20:57:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-24 11:56:59 +0100
commitec64632d312a099c7c544af63b25e2defde0038e (patch)
tree3da871886390b9ffa9f597dcfea11f702bb198ab /meta/recipes-extended
parent223ee6bb7447dd64e9c407415675261cc1fdb6f4 (diff)
downloadopenembedded-core-ec64632d312a099c7c544af63b25e2defde0038e.tar.gz
openembedded-core-ec64632d312a099c7c544af63b25e2defde0038e.tar.bz2
openembedded-core-ec64632d312a099c7c544af63b25e2defde0038e.zip
shadow: Move common code to shadow.inc
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb53
-rw-r--r--meta/recipes-extended/shadow/shadow.inc53
-rw-r--r--meta/recipes-extended/shadow/shadow_4.1.4.3.bb53
3 files changed, 61 insertions, 98 deletions
diff --git a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb
index 1ed5d4e011..ba208f7888 100644
--- a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb
@@ -1,60 +1,15 @@
-SUMMARY = "Tools to change and administer password and group data"
-DESCRIPTION = "Tools to change and administer password and group data"
-HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
-BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
-SECTION = "base utils"
-LICENSE = "BSD | Artistic-1.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
- file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
+require shadow.inc
PR = "r8"
-SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
- file://shadow.automake-1.11.patch \
- file://shadow-4.1.3-dots-in-usernames.patch \
- file://shadow-4.1.4.2-env-reset-keep-locale.patch \
+SRC_URI += " \
file://add_root_cmd_options.patch \
file://disable-syslog.patch \
file://useradd.patch \
- file://shadow_fix_for_automake-1.12.patch \
file://add_root_cmd_groupmems.patch \
"
+inherit native
-SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
-SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
-
-inherit autotools gettext native
-
-EXTRA_OECONF += "--without-audit \
- --without-libcrack \
- --without-libpam \
- --without-selinux \
+EXTRA_OECONF += "--without-libpam \
--without-nscd"
-do_install() {
- oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install
-
- # Info dir listing isn't interesting at this point so remove it if it exists.
- if [ -e "${D}${infodir}/dir" ]; then
- rm -f ${D}${infodir}/dir
- fi
-
- # 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
-
- # Disable checking emails.
- sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
-
- # Now we don't have a mail system. Disable mail creation for now.
- sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
- sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
-
- # Use users group by default
- sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd
-}
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc
new file mode 100644
index 0000000000..4df5e5edb9
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -0,0 +1,53 @@
+SUMMARY = "Tools to change and administer password and group data"
+DESCRIPTION = "Tools to change and administer password and group data"
+HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
+BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
+SECTION = "base utils"
+LICENSE = "BSD | Artistic-1.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
+ file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
+
+SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
+ file://shadow.automake-1.11.patch \
+ file://shadow_fix_for_automake-1.12.patch \
+ file://shadow-4.1.3-dots-in-usernames.patch \
+ file://shadow-4.1.4.2-env-reset-keep-locale.patch \
+ "
+
+SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
+SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
+
+inherit autotools gettext
+
+EXTRA_OECONF += "--without-audit \
+ --without-libcrack \
+ --without-selinux"
+
+do_install() {
+ oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install
+
+ # Info dir listing isn't interesting at this point so remove it if it exists.
+ if [ -e "${D}${infodir}/dir" ]; then
+ rm -f ${D}${infodir}/dir
+ fi
+
+ # 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
+
+ # Disable checking emails.
+ sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
+
+ # Now we don't have a mail system. Disable mail creation for now.
+ sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
+ sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
+
+ # Use users group by default
+ sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd
+}
+
diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
index 3abb325c3a..91ff24975d 100644
--- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
@@ -1,11 +1,4 @@
-SUMMARY = "Tools to change and administer password and group data"
-DESCRIPTION = "Tools to change and administer password and group data"
-HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
-BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
-SECTION = "base utils"
-LICENSE = "BSD | Artistic-1.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
- file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661"
+require shadow.inc
DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \
shadow-native"
@@ -13,29 +6,17 @@ RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '$
base-passwd"
PR = "r13"
-SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
+SRC_URI += " \
file://login_defs_pam.sed \
${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
- file://shadow.automake-1.11.patch \
- file://shadow-4.1.3-dots-in-usernames.patch \
- file://shadow-4.1.4.2-env-reset-keep-locale.patch \
file://shadow-4.1.4.2-groupmod-pam-check.patch \
file://shadow-4.1.4.2-su_no_sanitize_env.patch \
file://shadow-update-pam-conf.patch \
- file://shadow_fix_for_automake-1.12.patch \
file://slackware_fix_for_glib-2.17_crypt.patch \
file://fix-etc-gshadow-reading.patch \
"
-SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
-SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
-
-inherit autotools gettext
-
-EXTRA_OECONF += "--without-audit \
- --without-libcrack \
- ${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)} \
- --without-selinux"
+EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)}"
EXTRA_OECONF_libc-uclibc += "--with-nscd=no"
# Build falsely assumes that if --enable-libpam is set, we don't need to link against
@@ -64,14 +45,7 @@ PAM_SRC_URI = "file://pam.d/chfn \
file://pam.d/passwd \
file://pam.d/su"
-do_install() {
- oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install
-
- # Info dir listing isn't interesting at this point so remove it if it exists.
- if [ -e "${D}${infodir}/dir" ]; then
- rm -f ${D}${infodir}/dir
- fi
-
+do_install_append() {
# Ensure that the image has as a /var/spool/mail dir so shadow can
# put mailboxes there if the user reconfigures shadow to its
# defaults (see sed below).
@@ -84,25 +58,6 @@ do_install() {
sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs
fi
- # 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
-
- # Disable checking emails.
- sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs
-
- # Now we don't have a mail system. Disable mail creation for now.
- sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd
- sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd
-
- # Use users group by default
- sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd
-
install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
# Move binaries to the locations we want