* [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst
@ 2019-08-15 15:43 Mike Gilbert
2019-08-15 16:02 ` Michał Górny
2019-08-15 19:01 ` Michael Orlitzky
0 siblings, 2 replies; 4+ messages in thread
From: Mike Gilbert @ 2019-08-15 15:43 UTC (permalink / raw
To: gentoo-dev
Bug: https://bugs.gentoo.org/691478
---
eclass/acct-user.eclass | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 60009643c144..008dc6bb7d68 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -334,6 +334,14 @@ acct-user_pkg_preinst() {
if [[ -z ${ACCT_USER_HOME_OWNER} ]]; then
ACCT_USER_HOME_OWNER=${ACCT_USER_NAME}:${ACCT_USER_GROUPS[0]}
fi
+ # Path might be missing due to INSTALL_MASK, etc.
+ # https://bugs.gentoo.org/691478
+ if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then
+ eerror "Home directory is missing from the installation image:"
+ eerror " ${ACCT_USER_HOME}"
+ eerror "Check INSTALL_MASK for entries that would cause this."
+ die "${ACCT_USER_HOME} does not exist"
+ fi
fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}"
fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}"
fi
--
2.23.0.rc2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst
2019-08-15 15:43 [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst Mike Gilbert
@ 2019-08-15 16:02 ` Michał Górny
2019-08-15 19:01 ` Michael Orlitzky
1 sibling, 0 replies; 4+ messages in thread
From: Michał Górny @ 2019-08-15 16:02 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
On Thu, 2019-08-15 at 11:43 -0400, Mike Gilbert wrote:
> Bug: https://bugs.gentoo.org/691478
> ---
> eclass/acct-user.eclass | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
> index 60009643c144..008dc6bb7d68 100644
> --- a/eclass/acct-user.eclass
> +++ b/eclass/acct-user.eclass
> @@ -334,6 +334,14 @@ acct-user_pkg_preinst() {
> if [[ -z ${ACCT_USER_HOME_OWNER} ]]; then
> ACCT_USER_HOME_OWNER=${ACCT_USER_NAME}:${ACCT_USER_GROUPS[0]}
> fi
> + # Path might be missing due to INSTALL_MASK, etc.
> + # https://bugs.gentoo.org/691478
> + if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then
> + eerror "Home directory is missing from the installation image:"
> + eerror " ${ACCT_USER_HOME}"
> + eerror "Check INSTALL_MASK for entries that would cause this."
> + die "${ACCT_USER_HOME} does not exist"
> + fi
> fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}"
> fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}"
> fi
LGTM. Thanks for taking care of it.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 618 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst
2019-08-15 15:43 [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst Mike Gilbert
2019-08-15 16:02 ` Michał Górny
@ 2019-08-15 19:01 ` Michael Orlitzky
2019-08-15 21:12 ` Mike Gilbert
1 sibling, 1 reply; 4+ messages in thread
From: Michael Orlitzky @ 2019-08-15 19:01 UTC (permalink / raw
To: gentoo-dev
On 8/15/19 11:43 AM, Mike Gilbert wrote:
>
> + # Path might be missing due to INSTALL_MASK, etc.
> + # https://bugs.gentoo.org/691478
> + if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then
> + eerror "Home directory is missing from the installation image:"
> + eerror " ${ACCT_USER_HOME}"
> + eerror "Check INSTALL_MASK for entries that would cause this."
> + die "${ACCT_USER_HOME} does not exist"
> + fi
This suggests that the problem is with the user's INSTALL_MASK, and not
with the package that crashed. I would rather they file a bug than
change their mask entry. But, I guess it's pretty easy these days to
grep the whole acct-user category for issues like this that I missed on
the mailing list.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst
2019-08-15 19:01 ` Michael Orlitzky
@ 2019-08-15 21:12 ` Mike Gilbert
0 siblings, 0 replies; 4+ messages in thread
From: Mike Gilbert @ 2019-08-15 21:12 UTC (permalink / raw
To: Gentoo Dev
On Thu, Aug 15, 2019 at 3:01 PM Michael Orlitzky <mjo@gentoo.org> wrote:
>
> On 8/15/19 11:43 AM, Mike Gilbert wrote:
> >
> > + # Path might be missing due to INSTALL_MASK, etc.
> > + # https://bugs.gentoo.org/691478
> > + if [[ ! -e "${ED}/${ACCT_USER_HOME#/}" ]]; then
> > + eerror "Home directory is missing from the installation image:"
> > + eerror " ${ACCT_USER_HOME}"
> > + eerror "Check INSTALL_MASK for entries that would cause this."
> > + die "${ACCT_USER_HOME} does not exist"
> > + fi
>
> This suggests that the problem is with the user's INSTALL_MASK, and not
> with the package that crashed. I would rather they file a bug than
> change their mask entry. But, I guess it's pretty easy these days to
> grep the whole acct-user category for issues like this that I missed on
> the mailing list.
>
The purpose of the message is to give the user a hint on how they may
resolve the issue themselves.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-15 21:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-15 15:43 [gentoo-dev] [PATCH] acct-user.eclass: die explicitly if HOME is missing in preinst Mike Gilbert
2019-08-15 16:02 ` Michał Górny
2019-08-15 19:01 ` Michael Orlitzky
2019-08-15 21:12 ` Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox