Cronjob Cvsup -> What?
Matthew Seaman
matthew at FreeBSD.org
Sun Jan 27 10:46:40 UTC 2013
On 27/01/2013 08:35, Zyumbilev, Peter wrote:
> Last 10 years I am using cvsup. Any good guide for the transition to
> subversion ?
Most of the guides around freebsd.org are aimed at developers who will
be using SVN read-write. For simple read-only use (ie. not checking
anything into the repository) the following should suffice:
0) Install svn
It isn't part of the base system, and it has too many external
dependencies with different licensing terms for it to be bought
in easily. There's been some discussion about this, but it hasn't
happened yet. If it did, the imported version would be fairly
minimal, and anyone wanting to use it for serious development
would probably just grab the ports version anyhow.
If all you want to do is pull down a copy of the sources then you
can turn off most of the options to reduce the fairly large
dependency tree to something more manageable:
BDB=off: Berkeley Database
BOOK=off: Install the Subversion Book
ENHANCED_KEYWORD=on: Enhanced svn:keyword support
FREEBSD_TEMPLATE=on: FreeBSD Project log template
GNOME_KEYRING=off: Build with GNOME Keyring auth support
KDE_KWALLET=off: Build with KDE KWallet auth support
MAINTAINER_DEBUG=off: Build debug version
MOD_DAV_SVN=off: mod_dav_svn module for Apache 2.X
MOD_DONTDOTHAT=off: mod_dontdothat for Apache 2.X
NEON=off: WebDAV/Delta-V repo access module (neon)
P4_STYLE_MARKERS=off: Perforce-style conflict markers
SASL=off: SASL support
SERF=on: WebDAV/Delta-V repo access module (serf)
STATIC=off: Build static version (no shared libs)
SVNAUTHZ_VALIDATE=off: install svnauthz-validate
SVNMUCC=off: Install Multiple URL Command Client
SVNSERVE_WRAPPER=off: Enable svnserve wrapper
TEST=off: Run subversion test suite
There is the new devel/subversion-static port which does all that,
and compiles subversion with static linkage so it has *no* runtime
dependencies on anything else. The disadvantage here is that if
there is, say, a security hole discovered in the one of the
libraries subversion links against, you won't secure the
statically linked copy of subversion simply by updating to a fixed
version of the shlib. subversion-static is really only intended
for providing a one-off binary package that people can download
and install in order to bootstrap a more standard FreeBSD
environment.
1) Choose a SVN mirror close to you. Currently there are two choices:
svn0.us-west.FreeBSD.org -- Western USA
svn0.us-east.FreeBSD.org -- Eastern USA
Use whichever one gives you best performance. Certainly from
Europe at the moment us-east seems to be the best choice.
The number of SVN mirrors and their global coverage should increase
over time, but it will never need as many servers as the old cvsup
network.
The canonical list of SVN mirrors is here:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/svn-mirrors.html
2) Choose a protocol for access the SVN servers. Your choices in
order of preference are
svn://
https://
http://
Use svn:// for best performance. If you're concerned about MITM
attacks injecting trojans into the FreeBSD sources, then use
https and be sure to verify the certificate hashes on first
connection. Otherwise, if you're stuck behind a restrictive
firewall, use http://
3) Choose which branch you want to mirror. It's relatively easy to
switch between branches and doesn't involve downloading the entire
contents of /usr/src all over again if you change your mind.
However right now, the viable choices are
head --- Current, the bleeding edge, really only suitable
for development purposes
stable/9 --- 9-STABLE Still a rapidly changing development
branch, but not quite so close to the edge, and
with less bleeding involved.
stable/8 --- 8-STABLE Ditto.
releng/9.1 --- 9.1-RELEASE This tracks any security patches to
version 9.1. However, in this case you would be
better advised to use freebsd-update(8) to maintain
your /usr/src directory tree instead.
Similarly releng/9.0 releng/8.3 releng/7.4 for other supported
release versions.
Don't be fooled into pulling down release/9.1.0 or the like --
this is not a *branch* but a *snapshot*. If you think you want
release/9.1.0 then you really want releng/9.1 instead.
4) Make sure /usr/src is empty. Pre-existing files can cause you
grief at some unexpected later date even if they don't cause the
initial checkout to fail.
5) Put it all together. Run a command like so to check out the
content of /usr/src for your chosen branch from your chosen SVN
mirror using your chosen protocol:
svn co {proto}://{svn-mirror}/base/{branch} /usr/src
So, what I would do to checkout 9.1-STABLE from the us-east mirror
using svn as the protocol is:
svn co svn://svn0.us-east.FreeBSD.org/base/stable/9 /usr/src
Then wait for that to complete, as it's going to download a few
hundred MB of code.
Now, you generally only need to do that step one time. For regular
updates to the sources, just run:
cd /usr/src
svn up
This will re-use all the settings you chose above. If you want to
change any of the settings then use 'svn switch' from the top to the
checked-out tree (ie. cd /usr/src) -- this will avoid downloading the
whole repo all over again...
svn help switch -- read for clues
svn switch ^stable/8 -- change to the 8.4-STABLE sources
svn switch --relocate svn:// http:// -- use HTTP instead
svn switch --relocate svn://svn0.us-east.FreeBSD.org \
svn://svn0.us-west.FreeBSD.org -- switch to a different
mirror
To see what setting are currently in force:
svn info
Working out how to apply these instructions to /usr/ports or /usr/doc is
left as an exercise.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 268 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20130127/08342d0c/attachment.sig>
More information about the freebsd-questions
mailing list