Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread Mark Knecht
On Wed, Dec 16, 2020 at 8:26 AM antlists  wrote:
>
> On 16/12/2020 14:58, Mark Knecht wrote:
> >
> >
> > On Wed, Dec 16, 2020 at 7:46 AM gevisz  > > wrote:
> > 
> >  > Nevertheless, the explanation why /var/db/repos/gentoo is better than
> >  > /usr/portage is still welcomed. :)
> >
> > Community opinion mostly:
> >
> >
https://serverfault.com/questions/384342/what-are-the-best-practices-of-the-usr-var-and-etc-folders#384345
> > <
https://serverfault.com/questions/384342/what-are-the-best-practices-of-the-usr-var-and-etc-folders#384345
>
> >
> >
> > In this case portage is a 'database'?
>
> Depends what you mean by "portage". Depends what you mean by "database".
>
> Here we are storing the data (source files) used to build a gentoo
> system. So while it may be a bit tenuous (I find Rich's argument for
> "cache" more compelling), I don't think the argument for calling this a
> database that strange - portage the system uses portage the data to
> build the system called gentoo ...
>
> Cheers,
> Wol

Better explanation than my answer/question/comment.

But yes, portage is (I think) a complete system of things, emerge,
depclean, world file and the directories residing under /usr/portage. It's
only that directory structure that changes often and is subject to being
given a description such as 'database'.

Thanks,
Mark


Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread gevisz
ср, 16 дек. 2020 г. в 16:55, Rich Freeman :
>
> On Wed, Dec 16, 2020 at 9:45 AM gevisz  wrote:
> >
> > Nevertheless, the explanation why /var/db/repos/gentoo is better than
> > /usr/portage is still welcomed. :)
> >
>
> There is a lengthy discussion on gentoo-dev on this, and my personal
> first choice didn't win.  :)
>
> There is little dispute that /var makes more sense than /usr other
> than legacy reasons.  /usr is generally used for static data - on some
> distros it might even be read-only, a squashfs, signed using crypto,
> and so on.  On a rolling release distro like Gentoo it might get
> changed often by updates, but other than system updates nothing in it
> should change.  On a more release-based distro only security updates
> or major releases would touch it.
>
> /var on the other hand is used for application data and other things
> that change all the time.  That includes things like databases, which
> the Gentoo repo basically is.  Mail spools, print spools, caches, and
> so on all go on there.
>
> FHS formalizes all this stuff.
>
> Now, where exactly in /var it goes is more a matter of debate.
> /var/db is not specified in FHS, but it is used by FreeBSD which I
> think was one of the selling points.  Personally I stick it in
> /var/cache as (IMO) it just contains a local copy of a repository that
> is entirely stored elsewhere.  Some would certainly disagree with
> that.  I think /var/lib would be an alternative place that keeps more
> to FHS.
>
> However, moving it out of /usr was a move with near-universal support.
> And you can really put it anywhere you want by editing one line in
> your portage config.  I don't think the directory even exists in the
> base install - it gets created the first time you sync so it is
> entirely user-configurable.

Ok, thank you for the explanation.



Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread Rich Freeman
On Wed, Dec 16, 2020 at 10:25 AM antlists  wrote:
>
> Here we are storing the data (source files) used to build a gentoo
> system. So while it may be a bit tenuous (I find Rich's argument for
> "cache" more compelling), I don't think the argument for calling this a
> database that strange - portage the system uses portage the data to
> build the system called gentoo ...

Oh, I would agree that Portage is a database, but if you want to go
with that then /var/lib is the correct location.  /var/db is not where
you would store a database per FHS.  In FHS /var/db doesn't exist at
all. :)

Really the main difference between /var/cache and /var/lib is
value/persistance.  The point of a cache is that you can toss it at
any time and re-create it.  That isn't true of the stuff in /var/lib.
Which bucket the package repo fits into is somewhat nuanced.

-- 
Rich



Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread Victor Ivanov

On 16/12/2020 14:55, Rich Freeman wrote:

Now, where exactly in /var it goes is more a matter of debate.
/var/db is not specified in FHS, but it is used by FreeBSD which I
think was one of the selling points.  Personally I stick it in
/var/cache as (IMO) it just contains a local copy of a repository that
is entirely stored elsewhere.  Some would certainly disagree with
that.  I think /var/lib would be an alternative place that keeps more
to FHS.


This is very interesting, thanks for sharing! I was wondering what the 
rationale was behind /var/db but it comes as no surprise that it may 
have something to do with FreeBSD and Gentoo's overall ties/inspiration 
from FreeBSD. Personally, I too agree that /var/cache might be a better 
approach and is commonly used by other distros to store their repos' 
cache (e.g. Debian and derivatives).


Whether it's ultimately the "right" place, I don't know but to me it 
seems one of Linux' larger issues is the general lack of consistency 
between distros. This is a whole other debate of course. And while often 
inconsistencies may stem from otherwise perfectly sound decisions, I 
think such aspects - in their cumulative form - contribute to the 
hindering of wider adoption of Linux outside the tech community.



However, moving it out of /usr was a move with near-universal support.
And you can really put it anywhere you want by editing one line in
your portage config.  I don't think the directory even exists in the
base install - it gets created the first time you sync so it is
entirely user-configurable.


I completely agree with this, I was extremely happy when I read the news 
a while back as it makes far more sense. In fact, prior to the move I 
had been wondering with friends why the repo cache was under /usr.




OpenPGP_signature
Description: OpenPGP digital signature


Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread antlists

On 16/12/2020 14:58, Mark Knecht wrote:



On Wed, Dec 16, 2020 at 7:46 AM gevisz > wrote:


 > Nevertheless, the explanation why /var/db/repos/gentoo is better than
 > /usr/portage is still welcomed. :)

Community opinion mostly:

https://serverfault.com/questions/384342/what-are-the-best-practices-of-the-usr-var-and-etc-folders#384345 
 



In this case portage is a 'database'?


Depends what you mean by "portage". Depends what you mean by "database".

Here we are storing the data (source files) used to build a gentoo 
system. So while it may be a bit tenuous (I find Rich's argument for 
"cache" more compelling), I don't think the argument for calling this a 
database that strange - portage the system uses portage the data to 
build the system called gentoo ...


Cheers,
Wol



Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread Mark Knecht
On Wed, Dec 16, 2020 at 7:46 AM gevisz  wrote:

> Nevertheless, the explanation why /var/db/repos/gentoo is better than
> /usr/portage is still welcomed. :)

Community opinion mostly:

https://serverfault.com/questions/384342/what-are-the-best-practices-of-the-usr-var-and-etc-folders#384345


In this case portage is a 'database'?


Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread Rich Freeman
On Wed, Dec 16, 2020 at 9:45 AM gevisz  wrote:
>
> Nevertheless, the explanation why /var/db/repos/gentoo is better than
> /usr/portage is still welcomed. :)
>

There is a lengthy discussion on gentoo-dev on this, and my personal
first choice didn't win.  :)

There is little dispute that /var makes more sense than /usr other
than legacy reasons.  /usr is generally used for static data - on some
distros it might even be read-only, a squashfs, signed using crypto,
and so on.  On a rolling release distro like Gentoo it might get
changed often by updates, but other than system updates nothing in it
should change.  On a more release-based distro only security updates
or major releases would touch it.

/var on the other hand is used for application data and other things
that change all the time.  That includes things like databases, which
the Gentoo repo basically is.  Mail spools, print spools, caches, and
so on all go on there.

FHS formalizes all this stuff.

Now, where exactly in /var it goes is more a matter of debate.
/var/db is not specified in FHS, but it is used by FreeBSD which I
think was one of the selling points.  Personally I stick it in
/var/cache as (IMO) it just contains a local copy of a repository that
is entirely stored elsewhere.  Some would certainly disagree with
that.  I think /var/lib would be an alternative place that keeps more
to FHS.

However, moving it out of /usr was a move with near-universal support.
And you can really put it anywhere you want by editing one line in
your portage config.  I don't think the directory even exists in the
base install - it gets created the first time you sync so it is
entirely user-configurable.

-- 
Rich



Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread gevisz
> On Wed, 16 Dec 2020 at 21:52, gevisz  wrote:
> >
> > How would you comment the following quote from Gentoo Handbook
> > "In most situations, /usr/ is to be kept big: not only will it contain
> >   the majority of applications, it typically also hosts the Gentoo ebuild
> >   repository (by default located at /var/db/repos/gentoo) which already
> >   takes around 650 MiB."
> > that can be found here:
> > https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks ?
> >
> > Have I correctly understood that the Gentoo ebuild repository default 
> > location
> > is /var/db/repos/gentoo but virtually everybody relocate it to /usr/ during
> > the installation process?
> >
> > Why not change its default location to /usr/ in this case?
> >
> > Where the Gentoo ebuild repository should be allocated? Why?
> >
> On Wed, 16 Dec 2020 at 13:55, Miles Malone :
>
> It was historically in /usr/portage, it's now in /var/db/repos/gentoo.
> The handbook is apparently out of date on this.  If you've got the
> time I'm sure the handbook maintainers would appreciate a patch or a
> bug

Thank you for your reply. Now, it is a bit clearer.

Nevertheless, the explanation why /var/db/repos/gentoo is better than
/usr/portage is still welcomed. :)



Re: [gentoo-user] Recommended location of the Gentoo ebuild repository

2020-12-16 Thread Miles Malone
It was historically in /usr/portage, it's now in /var/db/repos/gentoo.
The handbook is apparently out of date on this.  If you've got the
time I'm sure the handbook maintainers would appreciate a patch or a
bug

On Wed, 16 Dec 2020 at 21:52, gevisz  wrote:
>
> How would you comment the following quote from Gentoo Handbook
> "In most situations, /usr/ is to be kept big: not only will it contain
>   the majority of applications, it typically also hosts the Gentoo ebuild
>   repository (by default located at /var/db/repos/gentoo) which already
>   takes around 650 MiB."
> that can be found here:
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks ?
>
> Have I correctly understood that the Gentoo ebuild repository default location
> is /var/db/repos/gentoo but virtually everybody relocate it to /usr/ during
> the installation process?
>
> Why not change its default location to /usr/ in this case?
>
> Where the Gentoo ebuild repository should be allocated? Why?
>