Project

General

Profile

SourceCode » History » Revision 34

Revision 33 (Wolfgang Wiedmeyer, 03/05/2017 06:09 PM) → Revision 34/51 (Wolfgang Wiedmeyer, 04/15/2017 02:34 PM)

h1. Replicant source code 

 h2. Browsing the source code 

 The Replicant source code is currently hosted by the "FSF":https://www.fsf.org/ at: "git.replicant.us":https://git.replicant.us/replicant 

 There is one branch per Replicant version, such as @replicant-2.2@. 

 h2. Disk space 

 Before downloading the Replicant source code, make sure there is a considerable amount of disk space left on the drive you intent to build Replicant on. 
 It is advised to have 40-50GiB available for the Replicant source code and the produced files. 

 h2. Source tree root folder 

 The path to the source tree root folder *must not contain spaces*. 

 

 h2. Installing the repo tool 

 To be able download the complete source code, the "@repo@ tool":https://android.googlesource.com/tools/repo needs to be installed. The distribution you are using may already have the tool packaged and it may already been installed as part of the [[BuildDependenciesInstallation|Build dependencies installation]]. 

 It is recommended to install the @repo@ tool with the package manager. However, if If the @repo@ tool is not available on your system, you can download and install it locally: 

 <pre> 
 mkdir tools 
 cd tools 
 wget https://commondatastorage.googleapis.com/git-repo-downloads/repo 
 chmod a+x repo 
 cd ../ 
 </pre> 

 In the following, the local installation in @../tools/repo@ is assumed. If you have installed @repo@ from your system's package manager, replace 

 <pre> 
 ../tools/repo 
 </pre> 

 with just 

 <pre> 
 repo 
 </pre> 

 at the beginning of the following commands. 

 h2. Initializing the repository 

 The source manifest is the list of all the git repositories that are present in the Replicant tree. 
 Each Replicant version has a dedicated branch with the proper source manifest. 

 In case errors such as *server certificate verification failed* happen, installing the CACert certificate may help: 
 <pre> 
 mkdir /usr/local/share/ca-certificates/cacert.org 
 wget -P /usr/local/share/ca-certificates/cacert.org http://www.cacert.org/certs/root.crt http://www.cacert.org/certs/class3.crt 
 update-ca-certificates 
 </pre> 

 h3. Replicant 6.0 development version 

 <pre> 
 mkdir replicant-6.0-dev 
 cd replicant-6.0-dev 
 ../tools/repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-6.0-dev 
 </pre> 

 h3. Replicant 4.2 

 <pre> 
 mkdir replicant-4.2 
 cd replicant-4.2 
 ../tools/repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-4.2 
 </pre> 

 h3. Replicant 4.0 

 <pre> 
 mkdir replicant-4.0 
 cd replicant-4.0 
 ../tools/repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-4.0 
 </pre> 

 h3. Replicant 2.3 

 <pre> 
 mkdir replicant-2.3 
 cd replicant-2.3 
 ../tools/repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-2.3 
 </pre> 

 h3. Replicant 2.2 

 <pre> 
 mkdir replicant-2.2 
 cd replicant-2.2 
 ../tools/repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-2.2 
 </pre> 

 h2. Downloading/Updating the source code 

 Now that you have configured @repo@, you can start downloading Replicant sources for the desired version. 

 *This step is very long and can take hours to complete!* 

 <pre> 
 ../tools/repo sync 
 </pre> 

 Once the source code is ready, you need to get the prebuilt applications (they are downloaded from F-Droid): 
 <pre> 
 vendor/replicant/get-prebuilts 
 </pre> 

 You must redo these steps each time you want to sync your tree, in order to keep it up to date. Future syncs are faster than the first one.