Project

General

Profile

SourceCode » History » Version 35

Wolfgang Wiedmeyer, 04/15/2017 02:38 PM
assume repo is installed with the package manager

1 25 Paul Kocialkowski
h1. Replicant source code
2 1 Paul Kocialkowski
3 25 Paul Kocialkowski
h2. Browsing the source code
4 2 Paul Kocialkowski
5 31 Wolfgang Wiedmeyer
The Replicant source code is currently hosted by the "FSF":https://www.fsf.org/ at: "git.replicant.us":https://git.replicant.us/replicant
6 27 Paul Kocialkowski
7
There is one branch per Replicant version, such as @replicant-2.2@.
8 2 Paul Kocialkowski
9 20 Paul Kocialkowski
h2. Disk space
10
11
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.
12
It is advised to have 40-50GiB available for the Replicant source code and the produced files.
13
14 23 Paul Kocialkowski
h2. Source tree root folder
15 1 Paul Kocialkowski
16 23 Paul Kocialkowski
The path to the source tree root folder *must not contain spaces*.
17 1 Paul Kocialkowski
18 32 Wolfgang Wiedmeyer
h2. Installing the repo tool
19 1 Paul Kocialkowski
20 32 Wolfgang Wiedmeyer
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]].
21 1 Paul Kocialkowski
22 34 Wolfgang Wiedmeyer
It is recommended to install the @repo@ tool with the package manager. However, if the @repo@ tool is not available on your system, you can download and install it locally:
23 32 Wolfgang Wiedmeyer
24 1 Paul Kocialkowski
<pre>
25
mkdir tools
26
cd tools
27 30 Denis 'GNUtoo' Carikli
wget https://commondatastorage.googleapis.com/git-repo-downloads/repo
28 1 Paul Kocialkowski
chmod a+x repo
29
cd ../
30
</pre>
31 32 Wolfgang Wiedmeyer
32 35 Wolfgang Wiedmeyer
In the following, it is assumed that @repo@ is installed from your system's package manager. If you have installed @repo@ locally in @../tools/repo@, replace
33 32 Wolfgang Wiedmeyer
34
<pre>
35 35 Wolfgang Wiedmeyer
repo
36 1 Paul Kocialkowski
</pre>
37 32 Wolfgang Wiedmeyer
38 35 Wolfgang Wiedmeyer
with
39 32 Wolfgang Wiedmeyer
<pre>
40 35 Wolfgang Wiedmeyer
../tools/repo
41 32 Wolfgang Wiedmeyer
</pre>
42
43
at the beginning of the following commands.
44 1 Paul Kocialkowski
45 26 Paul Kocialkowski
h2. Initializing the repository
46 1 Paul Kocialkowski
47 16 Paul Kocialkowski
The source manifest is the list of all the git repositories that are present in the Replicant tree.
48
Each Replicant version has a dedicated branch with the proper source manifest.
49 14 Denis 'GNUtoo' Carikli
50 29 Loic Dachary
In case errors such as *server certificate verification failed* happen, installing the CACert certificate may help:
51
<pre>
52
mkdir /usr/local/share/ca-certificates/cacert.org
53
wget -P /usr/local/share/ca-certificates/cacert.org http://www.cacert.org/certs/root.crt http://www.cacert.org/certs/class3.crt
54
update-ca-certificates
55
</pre>
56
57 1 Paul Kocialkowski
h3. Replicant 6.0 development version
58 33 Wolfgang Wiedmeyer
59
<pre>
60
mkdir replicant-6.0-dev
61
cd replicant-6.0-dev
62 35 Wolfgang Wiedmeyer
repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-6.0-dev
63 33 Wolfgang Wiedmeyer
</pre>
64 1 Paul Kocialkowski
65 14 Denis 'GNUtoo' Carikli
h3. Replicant 4.2
66 1 Paul Kocialkowski
67 15 Denis 'GNUtoo' Carikli
<pre>
68 11 Paul Kocialkowski
mkdir replicant-4.2
69
cd replicant-4.2
70 35 Wolfgang Wiedmeyer
repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-4.2
71 1 Paul Kocialkowski
</pre>
72 11 Paul Kocialkowski
73 4 Paul Kocialkowski
h3. Replicant 4.0
74
75
<pre>
76
mkdir replicant-4.0
77
cd replicant-4.0
78 35 Wolfgang Wiedmeyer
repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-4.0
79 4 Paul Kocialkowski
</pre>
80
81 1 Paul Kocialkowski
h3. Replicant 2.3
82
83
<pre>
84
mkdir replicant-2.3
85
cd replicant-2.3
86 35 Wolfgang Wiedmeyer
repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-2.3
87 1 Paul Kocialkowski
</pre>
88
89
h3. Replicant 2.2
90
91
<pre>
92
mkdir replicant-2.2
93
cd replicant-2.2
94 35 Wolfgang Wiedmeyer
repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-2.2
95 1 Paul Kocialkowski
</pre>
96
97 26 Paul Kocialkowski
h2. Downloading/Updating the source code
98 1 Paul Kocialkowski
99 26 Paul Kocialkowski
Now that you have configured @repo@, you can start downloading Replicant sources for the desired version.
100 3 Paul Kocialkowski
101 26 Paul Kocialkowski
*This step is very long and can take hours to complete!*
102 5 Paul Kocialkowski
103
<pre>
104 35 Wolfgang Wiedmeyer
repo sync
105 5 Paul Kocialkowski
</pre>
106
107 26 Paul Kocialkowski
Once the source code is ready, you need to get the prebuilt applications (they are downloaded from F-Droid):
108 17 Paul Kocialkowski
<pre>
109
vendor/replicant/get-prebuilts
110 18 Taro K.
</pre>
111
112 17 Paul Kocialkowski
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.