Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Feb 2021 10:58:26 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        tech-lists <tech-lists@zyxst.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: where to upgrade 12-stable now, svn still, or git?
Message-ID:  <93924389-E0F0-4132-BD8A-7ABEC4F5BF24@gmail.com>
In-Reply-To: <YCcd7Tqsn81bfNKD@ceres.local>
References:  <YCcd7Tqsn81bfNKD@ceres.local>

next in thread | previous in thread | raw e-mail | index | archive | help


> On Feb 12, 2021, at 5:31 PM, tech-lists <tech-lists@zyxst.net> wrote:
> As subject, where to get sources for 12-stable upgrade now? Is it =
still
> svn or is it git?

tl;dr: git is the source of truth, but there=E2=80=99s a bunch of =
details that might matter.

The current source of truth is git repository on gitrepo.freebsd.org.  =
It is the canonical repo for the project. A very close copy can be found =
at cgit.freebsd.org (it usually lags by the time it takes to copy new =
commits over to it, usually some small number of seconds). All other =
sources are derived from these.

The subversion repo was the source of truth for FreeBSD between the time =
it was adopted until git replaced it late last year. Prior to using =
subversion, CVS was the source of truth. The CVS repository was retired =
when we did the conversion to subversion. For the life of the stable/11 =
and stable/12 branches (and any releng branches from those), we will be =
mirroring commits to those branches to the subversion repository. When =
we were doing the conversion, we often heard that changing VCS =
mid-branch would be too burdensome and would really go against the =
branch stability guarantees we have.

The svn mirroring service should be a faithful reflection of the git =
source of truth. Or is modulo bugs and semantic differences in the =
different VCS. If there=E2=80=99s a discrepancy, then git is =
authoritative. There will be a lag between what=E2=80=99s committed to =
git and its appearance in svn mirrors because the mirroring is done via =
a cron job and there=E2=80=99s propagation delays. Since subversion has =
different semantics, it expands the $FreeBSD$ keywords in the source, =
while git does not (and cannot in a meaningful way). This will result in =
a difference between trees checked out in one versus the order. =
Normally, this difference is inconsequential, though some folks may need =
it for various reasons.

There=E2=80=99s a small wrinkle with any 12.x releases. Those will be =
built out of the subversion mirror of the git source of truth. We=E2=80=99=
re doing this to continue the $FreeBSD$ expansion through the life of =
the 12.x branch. This will result in a slightly different build for the =
non-reproducible builds when one builds out of subversion vs out of git. =
Should there be a difference between the svn sources and git sources, =
say due to a bug in the mirroring or the $FreeBSD$ expansion being =
meaningful, this can lead to some confusion. If this is a material =
difference, an updated would be issued right away to correct it. And in =
this case, the source of truth is still the git repo, it=E2=80=99s just =
been transformed in various ways before landing in the source artifacts =
that are used to create a release.

In many ways the little difference have long been accepted. The tree you =
get from the old CVS repo differed from the tree you=E2=80=99d get from =
the same version post conversion to svn from the svn repo because of =
semantic differences in how $FreeBSD$ was expanded. You could never =
checkout a 2.1 release from subversion and get exactly the sources that =
phk used to build the 2.1.0 release because CVS expanded the keywords as =
$FreeSBD: foo.c 1.7$ and svn expanded them $FreeBSD: path/to/file/foo.c =
3255$. This is muddied a bit further with the git conversion since the =
sources on the ISO images were used to recreate the 1.x series of =
releases. There may also be some early tags that haven=E2=80=99t made it =
through all the conversion processes...

Even the git repo copies that are mirrored out differ slightly in that =
they publish a slightly abridged version. GitHub=E2=80=99s interface =
does not like having ~10k entries in it for the =E2=80=98branch=E2=80=99 =
menu. So we don=E2=80=99t publish vendor branches to GitHub because of =
how the subversion repo vendor branches and tags were converted lead to =
too many branches for GitHub to be happy. This information is available =
from gitrepo.freebsd.org, however.

Warner





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?93924389-E0F0-4132-BD8A-7ABEC4F5BF24>