Setting up SVN under MorphOS
  • Moderator
    Kronos
    Posts: 2239 from 2003/2/24
    Been fiddling with that (unsuccesfully) for a few hours now.....

    What I got:
    - Efika on a fixed IP (as server)
    - Pegasos&PowerMac to be used for development (read clients)

    What I want:
    - create reposorities for my (costum) Ambient, SteamDraw and a few other things on the Efika (running MorphOS)
    - access the sources over LAN

    What I've tried:
    - creating a reposority called "repo" (check)
    - push some files there (svn import) both locally and over the LAN
    -- locally this triggers some disk-activity but "repo" still seems the same size
    -- over LAN it takes a few secs till it answers either "URL ..... doesn't exist" or "Can't read from connection. Connection reset by peer" this also put's the server in some sort of console mode (a "->" prompt will appear and I can execute commans like "ls")
    - I can ping the server under that IP

    What I would need:
    - how to create a repo for new project "foo"
    - how to get initial files into "foo" both locally and over LAN
    - how to read them back

    And yes I did have a look into the provided PDF.
  • »22.10.11 - 16:23
    Profile
  • MorphOS Developer
    geit
    Posts: 1031 from 2004/9/23
    Actually it is quite simple.

    ---------------------------------
    Set up the svn server
    ---------------------------------
    Install SVN binaries to GG:usr/bin

    First edit your env(arc):sys/inetd.conf: (change path so it matches your config)

    svn stream tcp nowait root gg:usr/bin/svnserve svnserve -i -r /sourcecodes/repository/

    Edit env(ARC):sys/services to contain this:

    svn 3690/tcp

    ------------------------------------------------
    create your first project in repository.
    We name it "newapplication"

    Again adapt path to match your repository
    location.
    ------------------------------------------------

    cd sourcecodes:repository
    svnadmin create newapplication

    Now we need to edit the server config for the new project
    "newapplication". Type

    ed newapplication/conf/svnserve.config

    In editor change the following lines, so they match the lines here.
    Do not touch any other lines. No ## for these lines!!

    anon-access = none
    auth-access = write

    password-db = passwd

    realm = newapplication

    Save file. Now we need to setup the passwords for this project. Type

    ed newapplication/conf/passwd

    and add your user names and password behind the [users] line.

    yourname = password4711

    Save file. Now the repository is ready for usage. Time to add existing sources to your new repository. Lets say you have a "Sourcecodes:" drive containing a drawer for each project. So "Sourcecodes:newapplication" is the one we want to add. You may want to perform a "make clean" before import to avoid useless files in repository.

    cd sourcecodes:
    svn import newapplication svn://192.168.x.y/newapplication -m "initial import"

    After import you need to checkout the source again to be able to use it. Rename the original sources, just in case.

    svn checkout svn://192.168.x.y/newapplication

    After entering user name and password the source gets transferred. It is now a working SVN instance.

    Once you changed one or more files inside your repository. commit them.

    svn commit -m "fixed all my typos"

    if you work on several systems, then you should update the stuff to get recent changes transferred to your current system.

    svn update

    if you need to add a file or drawer to repository use the add option

    svn add newdrawer
    svn add funnyfile.c

    these are only marked for addition. Use

    svn commit -m "added missing files and drawer"

    Renaming files works like adding

    svn rename oldname newname

    and off course you need to commit the change to make it valid.

    svn remove obsolete

    will remove files. And again you need to commit.

    Sometimes, when you want to delete a file that what changed before, svn blocks rename and delete operations, as you would loose these changes especially when using delete. So you can commit them first or use the --force option to force svn to perform the operation.

    That is basically all. Compared to cvs svn is quite simple.

    Geit

    [ Edited by geit 22.10.2011 - 21:18 ]
  • »22.10.11 - 19:03
    Profile
  • Moderator
    Kronos
    Posts: 2239 from 2003/2/24
    Still got plenty probs.....

    Conneting via the IP does not work at all "Can't connect to host '192.168.178.10': Connection refused"
    (and yes Geit that is the actual IP of the Efika connected to the FritzBox ;) )
    Neither over the net nor locally (I can sure ping that address) also tried 127.0.0.1 no avail....
    Using file:// with relative path also fails.

    "svn checkout file:///sourcecodes:repository/neu" does work.
  • »23.10.11 - 13:30
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 779 from 2007/10/23
    From: Gelsenkirchen,...
    What about port 3690 of FB's firewall?
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »23.10.11 - 16:42
    Profile
  • Moderator
    Kronos
    Posts: 2239 from 2003/2/24
    Grab.png

    No idea if thats correct (probraly not as it#s not working....).
  • »23.10.11 - 18:04
    Profile
  • MorphOS Developer
    geit
    Posts: 1031 from 2004/9/23
    There is no router setting required if he/you want(s) to use the stuff from within the local network. A firewall would be a problem, if the server system had one.

    Anyway the router port forwarding setup looks fine for remote access from outside, so be sure you disabled anonymous setup for your projects.

    Geit


    [ Edited by geit 24.10.2011 - 13:18 ]
  • »24.10.11 - 12:15
    Profile
  • Moderator
    Kronos
    Posts: 2239 from 2003/2/24
    Well atm there is only a slightly outdated Ambient in the repository, so your free to sneek into it ;)

    And aslong as noone can give me a hint on why it won't work thats all there gonna be in it.

    /me will try to set up another server under Linux (on the ARESOne)
    Maybe I get lucky there ....

    [ Edited by Kronos 24.10.2011 - 19:25 ]
  • »24.10.11 - 18:23
    Profile