Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Dec 2016 13:58:11 -0800
From:      Freddie Cash <fjwcash@gmail.com>
To:        Matthias Andree <matthias.andree@gmx.de>
Cc:        null <freebsd-ports@freebsd.org>
Subject:   Re: No port should need root for make fetch
Message-ID:  <CAOjFWZ6baoo3fM6pEg%2B2rcDxxD-TV0EkMHpW27t0CkXhtZAUWw@mail.gmail.com>
In-Reply-To: <96f44b17-b5a3-d24e-dee4-935d55a70019@gmx.de>
References:  <201612132135.uBDLZPVp017655@fire.js.berklix.net> <96f44b17-b5a3-d24e-dee4-935d55a70019@gmx.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 13, 2016 at 2:01 PM, Matthias Andree <matthias.andree@gmx.de>
wrote:

> Am 13.12.2016 um 22:35 schrieb Julian H. Stacey:
> >
> >> How is that a problem of "some" ports? All ports require root for "mak=
e
> >> fetch"
> > No they dont.
>
> Given that, then "none do".
>
> I'll do what what you omitted in your blind rage, I've dug the important
> detail up for you, which was the first guess:
>
> $ grep _DEPENDS Makefile /dev/null
> /usr/ports/databases/mysql-q4m/Makefile:FETCH_DEPENDS+=3D
> ${NONEXISTENT}:${_MYSQL_SERVER}:build
>
> This doesn't say "give me root". It needs to be able to build the
> requisite port.



> Obviously the fix is to make sure that if you want to fetch as
> unprivileged user, that you can also *build*.
> I assume that if you want *fetch* as unprivileged user, that you also
> want to *build* as unprivileged user, so I'd take that for granted, but
> it's not the case on your system.
>
> On my system, which has a WRKDIRPREFIX that I am permitted to write to
> with the unprivileged user account doing the builds, "make fetch" for
> mysql-q4m passes without a hitch.
>
> > Thanks for the well intentioned & good advice Matthias,
> > But some few ports are truly Badly Behaved with make fetch.
>
> Can you cite chapter and verse of the rule that makes such a port "truly
> Badly Behaved", for reference in this list's archives?


=E2=80=8B
=E2=80=8BI guess the
=E2=80=8Bbetter
 question would be, why does one need to BUILD a port when just downloading
the sources for another port?  Shouldn't the fetch process be just that ...
downloading the sources into the DISTDIR?=E2=80=8B
=E2=80=8B
=E2=80=8BRegardless of which user you do things as, it just seems bizarre t=
hat you
would need to compile port X in order to fetch the sources for port Y.  Not
saying there's never a situation where that would be needed, it just seems
non-intuitive.=E2=80=8B  I can see situations where you'd want to fetch dis=
tfiles
ahead of time as a different user from the one used to build the ports,
where this behaviour could break things (like Julian discovered).

What does the a compiled mysql-server port provide that's needed to
download the sources for mysql-q4m?  That can't be put off until the build
phase?


--=20
Freddie Cash
fjwcash@gmail.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ6baoo3fM6pEg%2B2rcDxxD-TV0EkMHpW27t0CkXhtZAUWw>