Changes between Version 17 and Version 18 of howto/SyncingWithSVN


Ignore:
Timestamp:
Jun 18, 2015, 6:04:06 PM (9 years ago)
Author:
larryv (Lawrence Velázquez)
Comment:

reformat to a reasonable text width

Legend:

Unmodified
Added
Removed
Modified
  • howto/SyncingWithSVN

    v17 v18  
    33= How to sync your ports tree using Subversion (over HTTP(s)) =
    44
    5  * Audience: end users who cannot use rsync (873/tcp) due to firewalls, proxies, policy, etc.
    6  * Requires: MacPorts
    7  * Requires: Subversion
     5- Audience: end users who cannot use rsync (873/tcp) due to firewalls,
     6  proxies, policy, etc.
     7- Requires: MacPorts
     8- Requires: Subversion
    89
    9 OS X 10.5 Leopard and later comes with Subversion already installed. If you are using Tiger, or some other system which does not provide a Subversion client, you will need to install Subversion yourself. If you have a copy of the ports tree already, just run:
     10OS X 10.5 Leopard and later comes with Subversion already installed. If
     11you are using Tiger, or some other system which does not provide
     12a Subversion client, you will need to install Subversion yourself. If
     13you have a copy of the ports tree already, just run:
    1014{{{
    1115sudo port install subversion
    1216}}}
    13 If you do not have a copy of the ports tree, you can download the daily tarball by following [wiki:howto/PortTreeTarball the tarball howto].
     17If you do not have a copy of the ports tree, you can download the daily
     18tarball by following [wiki:howto/PortTreeTarball the tarball howto].
     19
    1420
    1521== Introduction ==
    1622
    17 Some people live and work behind a firewall or proxy that blocks or otherwise breaks rsync, which is the primary means of getting updated portfiles in MacPorts. The following steps will switch your tree over to using Subversion (over https) for syncing.
     23Some people live and work behind a firewall or proxy that blocks or
     24otherwise breaks rsync, which is the primary means of getting updated
     25portfiles in MacPorts. The following steps will switch your tree over to
     26using Subversion (over https) for syncing.
    1827
    19 Note: replace "$prefix" with the location of your MacPorts install, which defaults to /opt/local.
     28Note: replace "$prefix" with the location of your MacPorts install,
     29which defaults to /opt/local.
     30
    2031
    2132== Installation ==
     
    2839svn co https://svn.macports.org/repository/macports/trunk/dports/ .
    2940}}}
    30 If you prefer, the repository is also available via HTTP, which requires less configuration, but is seen as less secure (subject to a man in the middle attack).
     41If you prefer, the repository is also available via HTTP, which requires
     42less configuration, but is seen as less secure (subject to a man in the
     43middle attack).
    3144{{{
    3245svn co http://svn.macports.org/repository/macports/trunk/dports/ .
    3346}}}
    3447
     48
    3549== Configuration ==
    3650
    3751=== Step 2: '''Configure MacPorts''' ===
    38 Edit $prefix/etc/macports/sources.conf to comment out the rsync entry and add the "file" entry:
     52Edit $prefix/etc/macports/sources.conf to comment out the rsync entry
     53and add the "file" entry:
    3954
    40 Note: don't forget to replace $prefix, so the initial part will start with "file:///..." (three slashes).
     55Note: don't forget to replace $prefix, so the initial part will start
     56with "file:///..." (three slashes).
    4157
    4258{{{
     
    4763=== Step 3: '''Configure Subversion''' ===
    4864
    49 First, tell subversion to use your proxy to connect to the server.  This should not be necessary if your initial SVN checkout was from the http or https URL's (and the checkout worked), so most people should not have to do this.  If initial checkout failed, you will need this.  If you needed to configure your own ~/.subversion/servers file to be able to do the initial checkout, then you *do* need this step.
    50 1. If the $prefix/var/macports/home/.subversion/servers file doesn't exist, create it by copying the corresponding ~/.subversion/servers file from another user to that location.  (SVN automatically creates this file if it doesn't exist, so you probably already have one.)
    51 2. Edit the file and set a proxy for hosts at `*.macports.org`.  Different proxy configurations require different sets of options here, but the file is pretty well commented, so it should be easy to figure out what you need.  At a minimum you'll need settings for http-proxy-host and http-proxy-port.
     65First, tell subversion to use your proxy to connect to the server.  This
     66should not be necessary if your initial SVN checkout was from the http
     67or https URL's (and the checkout worked), so most people should not have
     68to do this.  If initial checkout failed, you will need this.  If you
     69needed to configure your own ~/.subversion/servers file to be able to do
     70the initial checkout, then you *do* need this step.
    5271
    53 Finally, if you want to use SVN over HTTPS to access the repository (i.e. if your initial SVN checkout was the https:// URL), you'll need to tell SVN to trust the MacPorts signature.  (SVN doesn't trust the authority that issued it, and `port sync` below invokes `svn up` with the `--non-interactive` flag, so you won't have the opportunity to accept the certificate then.)
     721. If the $prefix/var/macports/home/.subversion/servers file doesn't
     73   exist, create it by copying the corresponding ~/.subversion/servers
     74   file from another user to that location.  (SVN automatically creates
     75   this file if it doesn't exist, so you probably already have one.)
     761. Edit the file and set a proxy for hosts at `*.macports.org`.
     77   Different proxy configurations require different sets of options
     78   here, but the file is pretty well commented, so it should be easy to
     79   figure out what you need.  At a minimum you'll need settings for
     80   http-proxy-host and http-proxy-port.
     81
     82Finally, if you want to use SVN over HTTPS to access the repository
     83(i.e. if your initial SVN checkout was the https:// URL), you'll need to
     84tell SVN to trust the MacPorts signature.  (SVN doesn't trust the
     85authority that issued it, and `port sync` below invokes `svn up` with
     86the `--non-interactive` flag, so you won't have the opportunity to
     87accept the certificate then.)
     88
    54891. `mkdir -p $prefix/var/macports/home/.subversion/auth/svn.ssl.server`
    55 2. As a normal user, run `svn ls https://svn.macports.org/repository/macports/trunk/dports/`.  When prompted, accept the certificate permanently.
    56 3. SVN will store the certificate in a file in the directory `$HOME/.subversion/auth/svn.ssl.server`.  In that directory, find the file that contains the string "`https://svn.macports.org`" and copy it into `$prefix/var/macports/home/.subversion/auth/svn.ssl.server`.
     901. As a normal user, run `svn ls https://svn.macports.org/repository/macports/trunk/dports/`.
     91   When prompted, accept the certificate permanently.
     921. SVN will store the certificate in a file in the directory
     93   `$HOME/.subversion/auth/svn.ssl.server`.  In that directory, find the
     94   file that contains the string "`https://svn.macports.org`" and copy
     95   it into `$prefix/var/macports/home/.subversion/auth/svn.ssl.server`.
    5796
    58 Or, you can use SVN over HTTP (i.e. your initial checkout was from the http:// URL), in which case you don't need to worry about the certificate.
     97Or, you can use SVN over HTTP (i.e. your initial checkout was from the
     98http:// URL), in which case you don't need to worry about the
     99certificate.
    59100
    60101=== Step 4: ''Sync''' ===
    61102
    62 Run sync in debug mode and watch for "svn update" instead of "rsync" being used.  Basically, if this command works, you're good to go, and future sync's will work as well.
     103Run sync in debug mode and watch for "svn update" instead of "rsync"
     104being used.  Basically, if this command works, you're good to go, and
     105future sync's will work as well.
    63106
    64107{{{
     
    70113Additional topics related to MacPorts and SVN:
    71114
    72 * Creating and testing ports not yet submitted to MacPorts: [https://guide.macports.org/#development.local-repositories Local SVN development repository]
    73 
    74 * [wiki:RunningTrunk Running an unstable/development version of MacPorts]
     115- Creating and testing ports not yet submitted to MacPorts:
     116  [https://guide.macports.org/#development.local-repositories Local SVN development repository]
     117- [wiki:RunningTrunk Running an unstable/development version of MacPorts]
    75118
    76119