Services/Sync/Getting Started: Difference between revisions

From MozillaWiki
< Services‎ | Sync
Jump to navigation Jump to search
(Adding getting started guide)
 
Line 43: Line 43:
=== Configure Mercurial ===
=== Configure Mercurial ===


Put the following in ~/.hg/hgrc:
Put the following in your ~/.hgrc:
 
  [paths]
  default = http://hg.mozilla.org/services/
  default-push = ssh://hg.mozilla.org/services/
     
and the following in ~/.hgrc:


   [ui]
   [ui]
Line 56: Line 50:
   [extensions]
   [extensions]
   hgext.mq =  
   hgext.mq =  
 
 
   [diff]
   [diff]
   git = 1
   git = 1
  unified = 8


  [defaults]
  diff = -pU8
  qdiff = -pU8
  qnew = -U
  qseries = -sv
You can also add the following to ~/.hg/hgrc:
  [paths]
  default = http://hg.mozilla.org/services/
  default-push = ssh://hg.mozilla.org/services/


=== Check out the Mercurial repos you'll need ===
=== Check out the Mercurial repos you'll need ===

Revision as of 07:07, 26 November 2010

Getting started with Sync

Prerequisites

I'm assuming you're running a Mac with Snow Leopard.

Install HomeBrew

 ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)"

Install dependencies

  • Autoconf: put the following in /usr/local/Library/Formula/autoconf.rb:
 require 'formula'
 
 class Autoconf <Formula
   url 'http://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.13.tar.gz'
   homepage 'http://www.gnu.org/software/autoconf/'
   md5 '9de56d4a161a723228220b0f425dc711'
 
   # depends_on 'cmake'
 
   def install
     system "./configure", "--disable-debug", "--disable-dependency-tracking",
                           "--prefix=#{prefix}"
     # system "cmake . #{std_cmake_parameters}"
     system "make install"
   end
 end
  • Then install a bunch of packages (some required for Sync, some just useful):
 brew install \
 ack distribute gdbm git gnutls libgcrypt libidl libtasn1 pcre pkg-config \
 python3 spidermonkey wget yasm autoconf gettext glib jsl libgpg-error \
 libpng lynx nspr pip python qrencode readline sqlite wireshark
  • Now you can install Mercurial:
 pip install mercurial

Configure Mercurial

Put the following in your ~/.hgrc:

 [ui]
 username = Your Name <you@mozilla.com>
 
 [extensions]
 hgext.mq = 
 [diff]
 git = 1
 unified = 8
 [defaults]
 diff = -pU8
 qdiff = -pU8
 qnew = -U
 qseries = -sv

You can also add the following to ~/.hg/hgrc:

 [paths]
 default = http://hg.mozilla.org/services/
 default-push = ssh://hg.mozilla.org/services/

Check out the Mercurial repos you'll need

 mkdir -p ~/moz/hg/services
 cd ~/moz/hg/services
 for x in \
 admin-scripts fx-home fx-sync-tools loadtest reg-server server-core \
 server-key-exchange server-storage dashboard fx-sync internal_dash \
 minimal-server reg-server-secure server-full server-reg sync-server
 do
 hg clone ssh://hg.mozilla.org/services/$x
 done

Check out Mozilla Central, too.

 cd ~/moz/hg
 hg clone ssh://hg.mozilla.org/mozilla-central