Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst
Date: Thu, 15 Aug 2019 16:02:31
Message-Id: ab8e2fcaa5d929b244d7d18a04af76394bf01c4e.camel@gentoo.org
In Reply to: [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst by Mike Gilbert
1 On Thu, 2019-08-15 at 11:43 -0400, Mike Gilbert wrote:
2 > Bug: https://bugs.gentoo.org/691478
3 > ---
4 > eclass/acct-user.eclass | 8 ++++++++
5 > 1 file changed, 8 insertions(+)
6 >
7 > diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
8 > index 60009643c144..008dc6bb7d68 100644
9 > --- a/eclass/acct-user.eclass
10 > +++ b/eclass/acct-user.eclass
11 > @@ -334,6 +334,14 @@ acct-user_pkg_preinst() {
12 > if [[ -z ${ACCT_USER_HOME_OWNER} ]]; then
13 > ACCT_USER_HOME_OWNER=${ACCT_USER_NAME}:${ACCT_USER_GROUPS[0]}
14 > fi
15 > + # Path might be missing due to INSTALL_MASK, etc.
16 > + # https://bugs.gentoo.org/691478
17 > + if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then
18 > + eerror "Home directory is missing from the installation image:"
19 > + eerror " ${ACCT_USER_HOME}"
20 > + eerror "Check INSTALL_MASK for entries that would cause this."
21 > + die "${ACCT_USER_HOME} does not exist"
22 > + fi
23 > fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}"
24 > fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}"
25 > fi
26
27 LGTM. Thanks for taking care of it.
28
29 --
30 Best regards,
31 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature