# Ports SVN repository is up



## kpa (Jul 15, 2012)

`$ svn list [url=svn://svn.freebsd.org/ports/head]svn://svn.freebsd.org/ports/head[/url]`

No announcement yet but it looks to be complete.


----------



## jb_fvwm2 (Jul 15, 2012)

```
[FILE]csup[/FILE] -g -L -2 -i ports/devel/boost-libs /usr/ports/supfile.4
```
Does that command have a svn equivalent ?? Maybe someone knows...


----------



## kpa (Jul 15, 2012)

Look up any svn tutorial to learn how to use it. That particular command can be done this way (first is checkout if the directory doesn't yet exist):

`# svn co [url=svn://svn.freebsd.org/ports/head/devel/boost-libs]svn://svn.freebsd.org/ports/head/devel/boost-libs[/url] /usr/ports/devel/boost-libs/`

Edit: Actually you can keep repeating the svn co command, checkout over existing directory means update.

Or to update already existing repository:
`# svn up /usr/ports/devel/boost-libs`.

devel/subversion doesn't have an equivalent of a supfile because the checked out repository is completely self-contained.


----------



## kpa (Jul 15, 2012)

There is no INDEX file included in the repository, you'll have create (very slow) or fetch it.

Creating the INDEX -file:
`# make -C /usr/ports index`

Fetching it:
`# make -C /usr/ports fetchindex`


----------



## pkubaj (Jul 15, 2012)

There's already the announcement.


----------



## wblock@ (Jul 15, 2012)

Where?


----------



## kpa (Jul 15, 2012)

There's information about the change in the /usr/ports/CHANGES file but nothing on the FreeBSD home page yet.


----------



## jb_fvwm2 (Jul 15, 2012)

kpa said:
			
		

> Look up any svn tutorial to learn how to use it. That particular command can be done this way (first is checkout if the directory doesn't yet exist):
> 
> `# svn co [url=svn://svn.freebsd.org/ports/head/devel/boost-libs]svn://svn.freebsd.org/ports/head/devel/boost-libs[/url] /usr/ports/devel/boost-libs/`
> 
> ...



the new .svn in the destination port has a slew of new files.  Any svn command to just
update existing files like csup would, or is the ports tree permanently larger?  Any
online guide to a csup > svn ports tree differences (size) (commands) yet? 

Sorry for the newbie questions... no urgency.


----------



## wblock@ (Jul 15, 2012)

There has been some work on an svnsup command, but at present it's not done and I don't know if anybody is working on it now.  AFAIK, csup(1) will continue to work.


----------



## pkubaj (Jul 16, 2012)

Yes, by announcement I meant the CHANGES file.


----------



## kpa (Jul 16, 2012)

SVN ports primer at the FreeBSD Wiki, It's mostly aimed for ports commiters but it does have instructions for anonymous read-only access.

http://wiki.freebsd.org/PortsSubversionPrimer


----------



## kpa (Jul 17, 2012)

Do not use make fetchindex to update the INDEX-n file with SVN, the file may be out of date compared to the freshly updated ports tree from SVN. It should match correctly with a ports tree updated with portsnap fetch update as before.


----------



## jb_fvwm2 (Sep 7, 2012)

It appears from the freebsd-ports mailing list that csup/cvsup will be deprecated in february 2013. No svnsup command here as of yet...


----------



## pboehmer (Sep 7, 2012)

If csup/cvsup are depreciated Feb 2013, does this mean FreeBSD source updates will be moving to svn as well?  Odd that I got the announcement for the ports svn, but no word on core source.  Did I miss a memo?


----------



## wblock@ (Sep 7, 2012)

It's been possible to update source with svn for several years now.


----------



## jb_fvwm2 (Sep 7, 2012)

Maybe these changes should be written up in bold, large typeface at freebsd.org so persons installing from older guides
or the many online tutorials, thick books from the 2000 - 2010 decade, etc,
 will know what is deprecated and could be pointed to the wiki or, specifically carefully-updated guides somewhere...
cvsup > svn (ports)
cvsup > svn (src) (?)
fdisk > gpart
pkg_add > pkg add (?)
ufs2 > SUJ
ad0 > ada0 
gcc > clang
[newer wifi syntax]
Others I've not thought of...


----------



## pboehmer (Sep 8, 2012)

Apologies for getting off-track.  

A quick scan of chapter 25 section 6 (Synchronizing Your Source) of the online FreeBSD handbook mentions the svn mailing lists, but only references CTM and cvsup commands as far as actually keeping the source updated.  Oddly enough, no mention of the csup command either.  I couldn't find any references to svn in /usr/src/UPDATING either.  

From the handbook, it seems that freebsd-update is now the preferred method for keeping core up to date, but I find that building world is a great way of determining general hardware health, specially on older systems.  

Learn something new everyday, I guess.


----------



## jb_fvwm2 (Sep 9, 2012)

kpa said:
			
		

> Look up any svn tutorial to learn how to use it. That particular command can be done this way (first is checkout if the directory doesn't yet exist):
> 
> `# svn co [url=svn://svn.freebsd.org/ports/head/devel/boost-libs]svn://svn.freebsd.org/ports/head/devel/boost-libs[/url] /usr/ports/devel/boost-libs/`
> 
> ...



Waiting to figure out which method to use for the ports tree. (Just then reading the
portsnap man page, it appears to delete local files upon update, which I have quite a
number of (including .htm, howto files, spare binaries...) so I may not use that ever.
Leaving svn...
----------------------------
Maybe in this instance, I can svn each subdirectory  Mk, archivers, etc...  
in a batch operation, preserving more-or-less the local files, but adding a little
bit of complexity.  Maybe someone has a third idea who has tried something similar.  
(And maybe I'm not cognizant of some gotcha in that method).
Still
unclear on the details, maybe can post more later.
.............................
Okay, it works super, with one Gotcha...
( A .svn for /graphics/, for example, and a svn command to update the /graphics/ as would csup )
But the gotcha is, MOVED CHANGES Makefile UPDATING (etc) are not updated (Non-directories in /usr/ports).
But the gotcha WAS, "... ".... ".... ".... ".... "...  Those files are available at svnweb.freebsd.org for download upon drilldown, so
the methodology calls for maybe a daily/weekly(or upon svn of the rest) additional step.
...
[questions deleted, initial test completed below...]
...

```
/bin/rm -rf /usr/ports/x11-themes/.svn
/bin/rm -rf /usr/ports/graphics/.svn    # finish testing as above
mv /usr/ports/packages /usr/packages   # move them out of the way per the mailing list
mv /usr/ports/distfiles /usr/distfiles
[svn stuff, not posting it yet because for some reason the latest UPDATING isn't there vs cvsweb]  # not an expert
mv /usr/packages /usr/ports/packages
mv /usr/distfiles /usr/ports/distfiles    # No local port files inadvertantly removed... but maybe were saved
............................................inadvertantly to the .svn ... (except those moved as above).
```

Appears I have a few years of learning to do with regards to  svn ...


----------



## wblock@ (Sep 10, 2012)

You are making this way more complicated than necessary.  Back up /usr/ports/distfiles and any custom files in /usr/ports[/files].  Do an svn checkout, just one for /usr/ports.  Check your customized files.  If they were overwritten (I don't know, haven't tried checkout over existing files), copy them from the backup.  After that, svn will leave them alone.  svn stat will list files that have been changed or are not included in svn.


----------



## jb_fvwm2 (Sep 10, 2012)

Thanks.  I was going from this thread, and the freebsd-ports list (one post) instructions, nothing went amiss. Later,

```
svn propset svn:ignore packages .
svn propset svn:ignore distfiles .   #after they were restored.
```
 ... because in the short time i searched the huge online .htm, an example of a configuration
file to ignore them I did not find.
(I did not have to rely on backups per se.)
RE svn vs csup,
With the latter, only one or two things could go wrong.  With svn, one must double-check and make a written 
plan... sort of like buildworld.   Within the next few days I'll probably have a better idea of svn
usage exactly equivalent to csup, already

```
svn up /usr/ports/graphics #gives error...
```
 I surmise is NOT equivalent to csup'ing just the /graphics/ category, etc.


----------



## wblock@ (Sep 10, 2012)

Making each of the subdirectories a separate checkout is not the same as one checkout of the whole tree.  I don't understand how that will help.  Each checkout will have a .svn subdirectory instead of just one for the whole tree.  Otherwise, it will work the same except for being much easier to get out of sync.


----------



## jb_fvwm2 (Sep 10, 2012)

Correct. I reverted to a whole /usr/ports Now trying to
resolve 
	
	



```
Skipped 'games' -- Node remains in conflict  ( 6 others...)
```
without deleting.  Not qualified to post much else until I figure exactly how
the svn process works...
Actually, the commands are working per se.  But I am unclear as to precisely what they are
doing in csup-speak. (In other words, what to put down on a 4x6 card
so that when I forget it all in a few weeks time, if that were the case, I could
across town at another CPU flawlessly do the csup equivalents working from the
reference card...  Probably until someone puts up a more complete guide, with examples
of remedies for error messages, 

```
svn resolved /usr/ports/games # from a web search
```
 fixed stuff? for example.


----------



## jb_fvwm2 (Jan 3, 2013)

FWIW most of my questions in this thread are moot, I've been using .svn for almost all machines for a while. (More recent threads have a few more recent questions already answered... as well as, in other threads, short howto's to initially setup subversion.


----------



## vermaden (Jan 3, 2013)

@*jb_fvwm2*

I would even extend Your list a little 


```
cvsup (ports) --> csup (base) --> svn (ports)
fdisk --> gpart
sysinstall --> bsdinstall
sysinstall --> sade
pkg_add --> pkg add (pkgng)
ufs2 --> ufs2suj / zfs
ad0 --> ada0
acd0 --> cd0
gcc --> clang
```


----------

