Project

General

Profile

SourceCodeRepositories » History » Version 16

Denis 'GNUtoo' Carikli, 04/10/2019 04:17 PM

1 10 Denis 'GNUtoo' Carikli
h1. Source code repositories
2 1 Wolfgang Wiedmeyer
3 14 Denis 'GNUtoo' Carikli
h2. Pushing mirrors with SSH access
4 1 Wolfgang Wiedmeyer
5 9 Denis 'GNUtoo' Carikli
If you have SSH access, you can then clone the git repository directly on the server. This is way faster than having to push the code from a slow ADSL connection for instance.
6 1 Wolfgang Wiedmeyer
7
# Check the LineageOS manifest for newly added repos
8 3 Wolfgang Wiedmeyer
# If there are any, add them in the LineageOS-mirror manifest and push the changes to git.replicant.us
9
# If there are any, create the newly added repos in the LineageOS-mirror group (using the exact same names the repos have in LineageOS)
10 5 Joonas Kylmälä
<pre>
11 7 Denis 'GNUtoo' Carikli
# sudo -iu git
12
$ cd repositories/LineageOS-mirror/
13
$ git clone --mirror git://github.com/LineageOS/<repo-name>.git
14
$ cd <repo-name>.git
15 1 Wolfgang Wiedmeyer
$ touch git-daemon-export-ok
16 7 Denis 'GNUtoo' Carikli
</pre>
17 1 Wolfgang Wiedmeyer
18 14 Denis 'GNUtoo' Carikli
h2. Pushing the code without SSH
19 1 Wolfgang Wiedmeyer
20
Replicant uses gitolite to handle git access.
21
22 14 Denis 'GNUtoo' Carikli
h3. Creating repositories
23
24 16 Denis 'GNUtoo' Carikli
If you don't already have the right to create repositories in the group you want to push to, this can be done with someone with SSH access to the git server:
25 14 Denis 'GNUtoo' Carikli
<pre>
26
sudo -iu git
27
mkdir repositories/<groupname>/<repo-name>.git
28
cd repositories/<groupname>/<repo-name>.git
29
git --bare init
30
touch git-daemon-export-ok
31
</pre>
32
33
<groupname> is to be replaced by the repository namespaces. For instance:
34
* replicant is used for the source code used in Replicant that has been created or modified by Replicant
35
* LineageOS-mirror is used to mirror LineageOS source code
36
* AOSP-mirror is used to mirror the Android Open Source Project(AOSP) source code
37
* Many other groupnames are for Replicant contributors like Fil, GNUtoo, JeremyRand, PaulK, Tehnoetic and wiewo
38
39
h2. Gitoilte access
40
41 15 Denis 'GNUtoo' Carikli
Once the repository has been created you then need to configure gitolite to give access to the repository.
42
43
gitolite is configured by configuration files stored in git.
44
45
The repository that handles that is at:
46 12 Denis 'GNUtoo' Carikli
<pre>
47
ssh://git@git.replicant.us/gitolite-admin
48 13 Denis 'GNUtoo' Carikli
</pre>
49
50
Examples of push URL can be found in the various repositories in cgit.
51
52 1 Wolfgang Wiedmeyer
For instance for "omap-usb-boot":https://git.replicant.us/contrib/PaulK/omap-usb-boot/ we can see the following URL:
53 13 Denis 'GNUtoo' Carikli
<pre>
54
ssh://git@git.replicant.us/PaulK/omap-usb-boot
55 14 Denis 'GNUtoo' Carikli
</pre>
56 1 Wolfgang Wiedmeyer
57
h2. cgit
58
59 15 Denis 'GNUtoo' Carikli
Once the git repository is setup either by mirroring it with SSH or by setting it up in the normal way, you still need
60
to configure cgit to make the repository appear on the cgit web interface.
61 11 Denis 'GNUtoo' Carikli
62 15 Denis 'GNUtoo' Carikli
See the [[Cgit]] wiki page for where to adjust its configuration.
63 1 Wolfgang Wiedmeyer
64
h3. Bundles
65
66
It's worth to check if all mirror repos have bundles in place.
67 15 Denis 'GNUtoo' Carikli
68
TODO: Document how to create bundles.
69
70
So far the LineageOS mirror has bundles but not AOSP mirror.
71 1 Wolfgang Wiedmeyer
72
h3. CAF variants
73
74
If we ever add support for a device that uses CAF branches of Qualcomm repos, we need to figure out how the mirror can still be updated and how releases can be tagged.
75
76
CAF branches are in the same repos as the default branches. So two or more local repos are created for one remote repo when the default branch and the CAF branches are checked out. The current setup for tagging a new release and updating the mirror assumes that there is one local repo for one remote repo.