summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2012-09-09 11:22:53 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-12 15:13:37 +0100
commit02cc31e7fe6bf65af69dea6505d44d5f8f120384 (patch)
treeaf8045ee564b248d021a99c082c9f11ffa844104 /meta/recipes-extended/shadow
parent6ccd988f249502458b925e7e8ee7b7435a934417 (diff)
downloadpoky-02cc31e7fe6bf65af69dea6505d44d5f8f120384.tar.gz
shadow: Fix various invalid assumptions about directory layout
The makefiles in the shadow package have their own hard-coded paths for ${base_bindir} and ${base_sbindir} (known as "bindir" and "sbindir" in shadow-speak). Ensure that they install into our paths rather than their own. Also check that ${base_bindir} and ${bindir} are different before trying to move files from one to the other; likewise for ${base_sbindir} and ${sbindir}. (From OE-Core rev: d4e62e164ef73b47c178edcbc2579f5358934afc) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow')
-rw-r--r--meta/recipes-extended/shadow/shadow_4.1.4.3.bb17
1 files changed, 14 insertions, 3 deletions
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 6794cc144e..eb00bf0810 100644
--- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
+++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb
@@ -56,7 +56,14 @@ PAM_SRC_URI = "file://pam.d/chfn \
56 file://pam.d/passwd \ 56 file://pam.d/passwd \
57 file://pam.d/su" 57 file://pam.d/su"
58 58
59do_install_append() { 59do_install() {
60 oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install
61
62 # Info dir listing isn't interesting at this point so remove it if it exists.
63 if [ -e "${D}${infodir}/dir" ]; then
64 rm -f ${D}${infodir}/dir
65 fi
66
60 # Ensure that the image has as a /var/spool/mail dir so shadow can 67 # Ensure that the image has as a /var/spool/mail dir so shadow can
61 # put mailboxes there if the user reconfigures shadow to its 68 # put mailboxes there if the user reconfigures shadow to its
62 # defaults (see sed below). 69 # defaults (see sed below).
@@ -93,8 +100,12 @@ do_install_append() {
93 # Move binaries to the locations we want 100 # Move binaries to the locations we want
94 rm ${D}${sbindir}/vigr 101 rm ${D}${sbindir}/vigr
95 ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr 102 ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr
96 mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw 103 if [ "${sbindir}" != "${base_sbindir}" ]; then
97 mv ${D}${bindir}/login ${D}${base_bindir}/login 104 mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw
105 fi
106 if [ "${bindir}" != "${base_bindir}" ]; then
107 mv ${D}${bindir}/login ${D}${base_bindir}/login
108 fi
98 109
99 # Handle link properly after rename, otherwise missing files would 110 # Handle link properly after rename, otherwise missing files would
100 # lead rpm failed dependencies. 111 # lead rpm failed dependencies.