public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
@ 2019-08-14 21:14 Mike Gilbert
  2019-08-14 21:26 ` Michał Górny
  2019-08-14 21:29 ` Michael Orlitzky
  0 siblings, 2 replies; 8+ messages in thread
From: Mike Gilbert @ 2019-08-14 21:14 UTC (permalink / raw
  To: gentoo-dev

Closes: https://bugs.gentoo.org/691478
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
 eclass/acct-user.eclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 60009643c144..cec5d0506879 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -334,6 +334,11 @@ 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
+			keepdir "${ACCT_USER_HOME}"
+		fi
 		fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}"
 		fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}"
 	fi
-- 
2.23.0.rc1



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
  2019-08-14 21:14 [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst Mike Gilbert
@ 2019-08-14 21:26 ` Michał Górny
  2019-08-14 21:38   ` Mike Gilbert
  2019-08-14 21:29 ` Michael Orlitzky
  1 sibling, 1 reply; 8+ messages in thread
From: Michał Górny @ 2019-08-14 21:26 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1069 bytes --]

On Wed, 2019-08-14 at 17:14 -0400, Mike Gilbert wrote:
> Closes: https://bugs.gentoo.org/691478
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
>  eclass/acct-user.eclass | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
> index 60009643c144..cec5d0506879 100644
> --- a/eclass/acct-user.eclass
> +++ b/eclass/acct-user.eclass
> @@ -334,6 +334,11 @@ 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
> +			keepdir "${ACCT_USER_HOME}"
> +		fi

Doesn't it violate the principle of least surprise if you recreate
the path that user intentionally wanted stripped?

>  		fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}"
>  		fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}"
>  	fi

-- 
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] 8+ messages in thread

* Re: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
  2019-08-14 21:14 [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst Mike Gilbert
  2019-08-14 21:26 ` Michał Górny
@ 2019-08-14 21:29 ` Michael Orlitzky
  2019-08-14 21:41   ` Mike Gilbert
  1 sibling, 1 reply; 8+ messages in thread
From: Michael Orlitzky @ 2019-08-14 21:29 UTC (permalink / raw
  To: gentoo-dev

On 8/14/19 5:14 PM, Mike Gilbert wrote:
> Closes: https://bugs.gentoo.org/691478
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
>  eclass/acct-user.eclass | 5 +++++

This is a symptom of another problem. The man user claims /usr/share/man
as its home directory, and insists on changing its permissions to
root:root 0755. Why? If the default homedir and owner will work, they
should be used. We're going to have a mountain of shit on our hands if
acct-user packages start claiming random directories as their homes and
reset the permissions/ownership on them randomly.

(If the "man" user really reads things from e.g. $HOME/man5/ebuild.5,
I'll eat my foot.)


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
  2019-08-14 21:26 ` Michał Górny
@ 2019-08-14 21:38   ` Mike Gilbert
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Gilbert @ 2019-08-14 21:38 UTC (permalink / raw
  To: Gentoo Dev

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

On Wed, Aug 14, 2019, 5:26 PM Michał Górny <mgorny@gentoo.org> wrote:

> On Wed, 2019-08-14 at 17:14 -0400, Mike Gilbert wrote:
> > Closes: https://bugs.gentoo.org/691478
> > Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> > ---
> >  eclass/acct-user.eclass | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
> > index 60009643c144..cec5d0506879 100644
> > --- a/eclass/acct-user.eclass
> > +++ b/eclass/acct-user.eclass
> > @@ -334,6 +334,11 @@ 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
> > +                     keepdir "${ACCT_USER_HOME}"
> > +             fi
>
> Doesn't it violate the principle of least surprise if you recreate
> the path that user intentionally wanted stripped?
>
> >               fowners "${ACCT_USER_HOME_OWNER}" "${ACCT_USER_HOME}"
> >               fperms "${ACCT_USER_HOME_PERMS}" "${ACCT_USER_HOME}"
> >       fi
>
> --
> Best regards,
> Michał Górny
>

I was debating that with myself after I sent this. I suppose we could just
skip it if it is missing.

>

[-- Attachment #2: Type: text/html, Size: 2454 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
  2019-08-14 21:29 ` Michael Orlitzky
@ 2019-08-14 21:41   ` Mike Gilbert
  2019-08-15 12:32     ` Michael Orlitzky
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Gilbert @ 2019-08-14 21:41 UTC (permalink / raw
  To: Gentoo Dev

[-- Attachment #1: Type: text/plain, Size: 812 bytes --]

On Wed, Aug 14, 2019, 5:29 PM Michael Orlitzky <mjo@gentoo.org> wrote:

> On 8/14/19 5:14 PM, Mike Gilbert wrote:
> > Closes: https://bugs.gentoo.org/691478
> > Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> > ---
> >  eclass/acct-user.eclass | 5 +++++
>
> This is a symptom of another problem. The man user claims /usr/share/man
> as its home directory, and insists on changing its permissions to
> root:root 0755. Why? If the default homedir and owner will work, they
> should be used. We're going to have a mountain of shit on our hands if
> acct-user packages start claiming random directories as their homes and
> reset the permissions/ownership on them randomly.
>
> (If the "man" user really reads things from e.g. $HOME/man5/ebuild.5,
> I'll eat my foot.)
>

Agreed. Please file a bug about this.

>

[-- Attachment #2: Type: text/html, Size: 1530 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
  2019-08-14 21:41   ` Mike Gilbert
@ 2019-08-15 12:32     ` Michael Orlitzky
  2019-08-15 15:00       ` Mike Gilbert
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Orlitzky @ 2019-08-15 12:32 UTC (permalink / raw
  To: gentoo-dev

On 8/14/19 5:41 PM, Mike Gilbert wrote:
> 
>     (If the "man" user really reads things from e.g. $HOME/man5/ebuild.5,
>     I'll eat my foot.)
> 
> 
> Agreed. Please file a bug about this.
> 

We already have bug 691478 for this issue? Only it should have been
assigned to the failing package's project instead of the eclass
maintainer: it's a build failure in a package that's doing something it
shouldn't be doing.

Revbump acct-user/man and it's fixed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
  2019-08-15 12:32     ` Michael Orlitzky
@ 2019-08-15 15:00       ` Mike Gilbert
  2019-08-15 15:33         ` Mike Gilbert
  0 siblings, 1 reply; 8+ messages in thread
From: Mike Gilbert @ 2019-08-15 15:00 UTC (permalink / raw
  To: Gentoo Dev

On Thu, Aug 15, 2019 at 8:32 AM Michael Orlitzky <mjo@gentoo.org> wrote:
>
> On 8/14/19 5:41 PM, Mike Gilbert wrote:
> >
> >     (If the "man" user really reads things from e.g. $HOME/man5/ebuild.5,
> >     I'll eat my foot.)
> >
> >
> > Agreed. Please file a bug about this.
> >
>
> We already have bug 691478 for this issue? Only it should have been
> assigned to the failing package's project instead of the eclass
> maintainer: it's a build failure in a package that's doing something it
> shouldn't be doing.
>
> Revbump acct-user/man and it's fixed.
>

Bug 691478 is about the interaction of INSTALL_MASK with an eclass
pkg_preinst function.

Whether acct-user/man should set a HOME directory is related, but
separate issue.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst
  2019-08-15 15:00       ` Mike Gilbert
@ 2019-08-15 15:33         ` Mike Gilbert
  0 siblings, 0 replies; 8+ messages in thread
From: Mike Gilbert @ 2019-08-15 15:33 UTC (permalink / raw
  To: Gentoo Dev

On Thu, Aug 15, 2019 at 11:00 AM Mike Gilbert <floppym@gentoo.org> wrote:
>
> On Thu, Aug 15, 2019 at 8:32 AM Michael Orlitzky <mjo@gentoo.org> wrote:
> >
> > On 8/14/19 5:41 PM, Mike Gilbert wrote:
> > >
> > >     (If the "man" user really reads things from e.g. $HOME/man5/ebuild.5,
> > >     I'll eat my foot.)
> > >
> > >
> > > Agreed. Please file a bug about this.
> > >
> >
> > We already have bug 691478 for this issue? Only it should have been
> > assigned to the failing package's project instead of the eclass
> > maintainer: it's a build failure in a package that's doing something it
> > shouldn't be doing.
> >
> > Revbump acct-user/man and it's fixed.
> >
>
> Bug 691478 is about the interaction of INSTALL_MASK with an eclass
> pkg_preinst function.
>
> Whether acct-user/man should set a HOME directory is related, but
> separate issue.

Bug filed.

https://bugs.gentoo.org/692222


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-08-15 15:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-14 21:14 [gentoo-dev] [PATCH] acct-user.eclass: handle missing path in preinst Mike Gilbert
2019-08-14 21:26 ` Michał Górny
2019-08-14 21:38   ` Mike Gilbert
2019-08-14 21:29 ` Michael Orlitzky
2019-08-14 21:41   ` Mike Gilbert
2019-08-15 12:32     ` Michael Orlitzky
2019-08-15 15:00       ` Mike Gilbert
2019-08-15 15:33         ` Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox