Request for comments - svnup in base ?

Polytropon freebsd at edvax.de
Sun Jan 18 21:33:56 UTC 2015


On Mon, 19 Jan 2015 04:45:56 +1100 (EST), Ian Smith wrote:
> In freebsd-questions Digest, Vol 554, Issue 7, Message: 3
> On Sun, 18 Jan 2015 02:09:06 +0100 Polytropon <freebsd at edvax.de> wrote:
>  > On Sat, 17 Jan 2015 16:24:12 +0100, Damien Fleuriot wrote:
>  > > On a related topic, how would you guys feel about svnup being part of BASE ?
>  > > 
>  > > Or perhaps, include a bootstrap install much like pkg has.
>  > > 
>  > > I for one, would very much like it.
>  > 
>  > I think the same. If you look into FreeBSD's history of
>  > dealing with source code checkout methods, you'll find
>  > this: port cvsup-without-gui -> base csup -> move to
>  > SVN -> port subversion -> ? - here a tool to get updates
>  > from source control would be nice. In the past, the
>  > CVS-based tool did allow you to "make update" for the
>  > /usr/src and /usr/ports tree. For the ports, we have
>  > portsnap to obtain a snapshot (not _precisely_ current),
>  > but for /usr/src, we currently don't have a tool in
>  > the base system. Installing the full subversion port
>  > isn't that hard, but a csup-lookalike in the base
>  > would be nice, for the simple task to checkout sources,
>  > even if it's just a bootstrap mechanism (cf. pkg).
> 
> No it isn't that hard, but unless you're developing for the tree, svn's 
> pretty heavyweight on space-constrained systems; lots of dependencies 
> and lots of extra space used.

This was my primary concern. It's not the problem of
installing it per se, but the user might be on a system
where every MB is "expensive", or he might follow the
concept of "I only install what I need" and therefore
consider the many dependencies "not needed".



> svnup(1) is easy to install - bootstrap, if you like - with make install 
> or pkg install; it's tiny; has no dependencies; and has proper manpages 
> svnup(1) and svnup.conf(5).  None of which can be said for svn{,lite}(1)



> I don't know how it may be plugged into 'make update', but it's designed 
> to be largely cvsup-compatible in usage & configuration, so that should 
> be doable.  I'm happy enough running 'svnup stable' as and when desired.

The "make update" mechanism works like this (here shown
for CVS):

First you add the following lines to /etc/make.conf:

	SUP=		/usr/bin/csup
	SUP_UPDATE=	/usr/bin/csup
	SUPFLAGS=	-L 2
	SUPHOST=	cvsup.freebsd.org
	SUPFILE=	/etc/sup/stable.sup
	PORTSSUPFILE=	/etc/sup/ports.sup
	DOCSUPFILE=	/etc/sup/doc.sup
	DOC_LANG=	en_US.ISO8859-1 de_DE.ISO8859-1

Here you name the program and its flags and options that
will be used when you enter "make update".

You then have to create the three files in /etc/sup from
the example files in /usr/share/examples/cvsup. They
contain the rules on what to update.

For example, stable.sup looks like this:

	*default host=cvsup.freebsd.org
	*default base=/var/db
	*default prefix=/usr
	*default release=cvs tag=RELENG_8
	*default delete use-rel-suffix
	*default compress
	src-all

And release.sup (when you want to track the RELEASE branch
instead of STABLE), Only the line

	*default release=cvs tag=RELENG_8_2_0

would be different. Please note that this refers to the
non-SVN (i. e., the CVS) related use of the terms "STABLE"
and "RELEASE" before the great transition. :-)

FInally ports.sup starts with

	*default host=cvsup.freebsd.org
	*default base=/var/db
	*default prefix=/usr
	*default release=cvs tag=.
	*default delete use-rel-suffix
	*default compress

and then continues either with

	ports-all

or with the list of categories you want to have updated.

	ports-base
	ports-german
	ports-security
	ports-shells
	ports-sysutils

... and so on. The list from the example file can be used
as a template with the "# selector".

If you run the "make update" command in /usr/ports, only
the ports tree will be updated; run it in /usr/src, and
both the source tree and the ports tree will be brought
to the current state. Every other mechanism that works
with CVS (like .cvsignore) will work.

Additionally, the locally installed "cvs" binary allows
you to use CVS "for your own version control". :-)

NB: Those explanations don't apply anymore, they are shown
from my 8-STABLE home system and for archaeological display
purposes only (or at least primarily). :-)

It's probably possible to add a similar mechanism for
svnup, svnlite or svn, with increasing amounts of
dependencies. :-)



> Andrew Berg wrote:
> 
>  > What advantage does it have over svnlite(1)?
> 
> I think several for it's designed purpose, a compact cvsup replacement.  
> 
> svnlite only arrived with 10.1, so is not what 8.x and 9.x users need.  
> It doesn't appear as an available port for 9.3.  Its manpage is useless, 
> an s/svn/svnlite/g job on svn(1), neither of which instruct in usage at 
> all, referring to a site that, nowhere that I could find, even mentions 
> svnlite and friends.  Developer friendly, casual user hostile at best.

Good documentation is an essential point, no matter if
you see it as a developer or as a user. Both "man cvs"
and "man csup" fulfill that requirement.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list