SourceCode » History » Version 51
Denis 'GNUtoo' Carikli, 04/20/2023 12:06 AM
Update key server. Thanks to Fil lupin for the information.
1 | 42 | dl lud | h1. 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 | 36 | Wolfgang Wiedmeyer | Before downloading the Replicant source code, make sure there is a considerable amount of disk space left on the drive you intend to build Replicant on. |
12 | It is advised to have 60-70GiB available for the Replicant source code and the produced files for one device. If you intend to build for multiple devices, every additional device will need ca. 17GiB. |
||
13 | 20 | Paul Kocialkowski | |
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 | 50 | Fil Lupin | *Warning: to install the repo tool for Replicant 6 and before, please follow instructions [[Replicant60BuildDependenciesInstallation#Debian-9-stretch|here]].* |
21 | 48 | Fil Lupin | *Following instructions are only to be followed for Replicant versions greater than 6.* |
22 | |||
23 | 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]]. |
24 | 1 | Paul Kocialkowski | |
25 | 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: |
26 | 32 | Wolfgang Wiedmeyer | |
27 | 1 | Paul Kocialkowski | <pre> |
28 | mkdir tools |
||
29 | cd tools |
||
30 | 30 | Denis 'GNUtoo' Carikli | wget https://commondatastorage.googleapis.com/git-repo-downloads/repo |
31 | 1 | Paul Kocialkowski | chmod a+x repo |
32 | cd ../ |
||
33 | </pre> |
||
34 | 32 | Wolfgang Wiedmeyer | |
35 | 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 |
36 | 32 | Wolfgang Wiedmeyer | |
37 | <pre> |
||
38 | 35 | Wolfgang Wiedmeyer | repo |
39 | 1 | Paul Kocialkowski | </pre> |
40 | 32 | Wolfgang Wiedmeyer | |
41 | 35 | Wolfgang Wiedmeyer | with |
42 | 32 | Wolfgang Wiedmeyer | <pre> |
43 | 35 | Wolfgang Wiedmeyer | ../tools/repo |
44 | 32 | Wolfgang Wiedmeyer | </pre> |
45 | |||
46 | at the beginning of the following commands. |
||
47 | 1 | Paul Kocialkowski | |
48 | 26 | Paul Kocialkowski | h2. Initializing the repository |
49 | 1 | Paul Kocialkowski | |
50 | 16 | Paul Kocialkowski | The source manifest is the list of all the git repositories that are present in the Replicant tree. |
51 | 1 | Paul Kocialkowski | Each Replicant version has a dedicated branch with the proper source manifest. |
52 | |||
53 | 36 | Wolfgang Wiedmeyer | h3. Replicant 6.0 release version |
54 | |||
55 | 29 | Loic Dachary | <pre> |
56 | 36 | Wolfgang Wiedmeyer | mkdir replicant-6.0 |
57 | cd replicant-6.0 |
||
58 | 39 | Wolfgang Wiedmeyer | repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-6.0 |
59 | 29 | Loic Dachary | </pre> |
60 | |||
61 | 43 | Denis 'GNUtoo' Carikli | h3. Replicant 6.0 0004 RC2 |
62 | |||
63 | <pre> |
||
64 | mkdir replicant-6.0 |
||
65 | cd replicant-6.0 |
||
66 | repo init -u https://git.replicant.us/replicant/manifest.git -b refs/tags/replicant-6.0-0004-rc2 |
||
67 | </pre> |
||
68 | |||
69 | 1 | Paul Kocialkowski | h3. Replicant 6.0 development version |
70 | 33 | Wolfgang Wiedmeyer | |
71 | <pre> |
||
72 | mkdir replicant-6.0-dev |
||
73 | cd replicant-6.0-dev |
||
74 | 35 | Wolfgang Wiedmeyer | repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-6.0-dev |
75 | 33 | Wolfgang Wiedmeyer | </pre> |
76 | 1 | Paul Kocialkowski | |
77 | 14 | Denis 'GNUtoo' Carikli | h3. Replicant 4.2 |
78 | 1 | Paul Kocialkowski | |
79 | 15 | Denis 'GNUtoo' Carikli | <pre> |
80 | 11 | Paul Kocialkowski | mkdir replicant-4.2 |
81 | cd replicant-4.2 |
||
82 | 35 | Wolfgang Wiedmeyer | repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-4.2 |
83 | 1 | Paul Kocialkowski | </pre> |
84 | 11 | Paul Kocialkowski | |
85 | 4 | Paul Kocialkowski | h3. Replicant 4.0 |
86 | |||
87 | <pre> |
||
88 | mkdir replicant-4.0 |
||
89 | cd replicant-4.0 |
||
90 | 35 | Wolfgang Wiedmeyer | repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-4.0 |
91 | 4 | Paul Kocialkowski | </pre> |
92 | |||
93 | 1 | Paul Kocialkowski | h3. Replicant 2.3 |
94 | |||
95 | <pre> |
||
96 | mkdir replicant-2.3 |
||
97 | cd replicant-2.3 |
||
98 | 35 | Wolfgang Wiedmeyer | repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-2.3 |
99 | 1 | Paul Kocialkowski | </pre> |
100 | |||
101 | h3. Replicant 2.2 |
||
102 | |||
103 | <pre> |
||
104 | mkdir replicant-2.2 |
||
105 | cd replicant-2.2 |
||
106 | 35 | Wolfgang Wiedmeyer | repo init -u https://git.replicant.us/replicant/manifest.git -b replicant-2.2 |
107 | 1 | Paul Kocialkowski | </pre> |
108 | |||
109 | 26 | Paul Kocialkowski | h2. Downloading/Updating the source code |
110 | 1 | Paul Kocialkowski | |
111 | 26 | Paul Kocialkowski | Now that you have configured @repo@, you can start downloading Replicant sources for the desired version. |
112 | 1 | Paul Kocialkowski | |
113 | *This step is very long and can take hours to complete!* |
||
114 | |||
115 | <pre> |
||
116 | repo sync |
||
117 | </pre> |
||
118 | |||
119 | 38 | Wolfgang Wiedmeyer | For the Replicant 6.0 release branch, it is possible and recommended to verify the signatures of the Git tags in all repositories:[[ReplicantSourceCodeTagsVerification]] |
120 | 37 | Wolfgang Wiedmeyer | |
121 | h3. Prebuilt apps |
||
122 | |||
123 | 49 | Fil Lupin | *Warning: following instructions are only for Replicant 6.0 0003 and before.* |
124 | |||
125 | 36 | Wolfgang Wiedmeyer | Once the source code is ready, you need to get the prebuilt applications (they are downloaded from F-Droid). Since Replicant 6.0, the prebuilt applications are checked if they were signed with the "F-Droid signing key":https://f-droid.org/wiki/page/Release_Channels_and_Signing_Keys. The signing key can be retrieved and added to your GPG keyring using: |
126 | |||
127 | <pre> |
||
128 | 51 | Denis 'GNUtoo' Carikli | gpg --keyserver hkps://keyserver.ubuntu.com --recv-key 37D2C98789D8311948394E3E41E7044E1DBA2E89 |
129 | 36 | Wolfgang Wiedmeyer | </pre> |
130 | |||
131 | Then you can download the prebuilts: |
||
132 | |||
133 | 17 | Paul Kocialkowski | <pre> |
134 | vendor/replicant/get-prebuilts |
||
135 | 18 | Taro K. | </pre> |
136 | |||
137 | 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. |
138 | 44 | Denis 'GNUtoo' Carikli | |
139 | h2. Supported protocols for building Replicant |
||
140 | |||
141 | 45 | Denis 'GNUtoo' Carikli | While the git.replicant.us git server supports @http://@, @https://@, @git://@, and @ssh://@ only @http://@ and @https://@ are supported for building Replicant. |
142 | 44 | Denis 'GNUtoo' Carikli | |
143 | This is because over time we need to move or rename repositories for various reasons. And in order to avoid breaking older Replicant versions (including specific releases that are tagged and that can't be modified anymore), we use @http://@ and @https://@ redirects, but we don't have any redirects with @git://@ or @ssh://@. |
||
144 | |||
145 | Using symlinks also doesn't scale as it has the side effect of making a repository appear multiple times in the cgit web interface that is used to display the repositories like the "Replicant specific repositories":https://git.replicant.us/replicant for instance. |