mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
6ccd988f24
commit
02cc31e7fe
@@ -56,7 +56,14 @@ PAM_SRC_URI = "file://pam.d/chfn \
|
|||||||
file://pam.d/passwd \
|
file://pam.d/passwd \
|
||||||
file://pam.d/su"
|
file://pam.d/su"
|
||||||
|
|
||||||
do_install_append() {
|
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
|
||||||
|
|
||||||
# Ensure that the image has as a /var/spool/mail dir so shadow can
|
# Ensure that the image has as a /var/spool/mail dir so shadow can
|
||||||
# put mailboxes there if the user reconfigures shadow to its
|
# put mailboxes there if the user reconfigures shadow to its
|
||||||
# defaults (see sed below).
|
# defaults (see sed below).
|
||||||
@@ -93,8 +100,12 @@ do_install_append() {
|
|||||||
# Move binaries to the locations we want
|
# Move binaries to the locations we want
|
||||||
rm ${D}${sbindir}/vigr
|
rm ${D}${sbindir}/vigr
|
||||||
ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr
|
ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr
|
||||||
mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw
|
if [ "${sbindir}" != "${base_sbindir}" ]; then
|
||||||
mv ${D}${bindir}/login ${D}${base_bindir}/login
|
mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw
|
||||||
|
fi
|
||||||
|
if [ "${bindir}" != "${base_bindir}" ]; then
|
||||||
|
mv ${D}${bindir}/login ${D}${base_bindir}/login
|
||||||
|
fi
|
||||||
|
|
||||||
# Handle link properly after rename, otherwise missing files would
|
# Handle link properly after rename, otherwise missing files would
|
||||||
# lead rpm failed dependencies.
|
# lead rpm failed dependencies.
|
||||||
|
|||||||
Reference in New Issue
Block a user