diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-07-01 22:46:51 +0200 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-07-02 05:31:12 +0200 |
commit | b660d18f78d04623ccbc075ec74005c4aa69025c (patch) | |
tree | a40913ec29b946e17019e71f3cecb377bd787a56 | |
parent | 80a62fa33c7b3f267ee2b2b9c05437dc93c7d9b1 (diff) | |
download | manifest-b660d18f78d04623ccbc075ec74005c4aa69025c.tar.gz manifest-b660d18f78d04623ccbc075ec74005c4aa69025c.tar.bz2 manifest-b660d18f78d04623ccbc075ec74005c4aa69025c.zip |
Use Replicant mirrors for AOSP repositories
We need to mirror AOSP repositories to make sure that we
don't loose the source code.
The git hosting infrastructure has not been adjusted yet to
automatically redirect repositories like
/device/generic/qemu to device_generic_qemu in
/mirrors/AOSP/.
The redirect is manual for now, which means that for each
new repository that you add you must not forget to do the
redirection in /etc/apache2/git-redirects/aosp-mirror.conf
else it will not work.
To make an automatic redirection we need to change the '/'
in a '_', but also find where to stop the match.
The URL itself doesn't have enough information to be able
to do that correctly. With a simple rule like
'RewriteRule "^/mirrors/AOSP/(.*)/(.+)" "/mirrors/AOSP/$1_$2" [R]'
device/generic/qemu/tree/ would be rewritten as
device_generic_qemu_tree instead of device_generic_qemu/tree
and using heuristics to workaround that is probably not a
good idea as it would be way to fragile.
Currently, the static list of redirect has been generated
with the following command:
ls -d *.git | sed 's#\.git$##' | \
awk '{save=$1 ; gsub("_", "/", $1); printf("Redirect /mirrors/AOSP/%s /mirrors/AOSP/%s\n", $1, save); }'
So it should be possible to generate to convert that to
a single set of regular expressions that relies on checking
if specific directories do exist or not.
However this is not that simple as we want to avoid
potential bugs that only appear in corner case and that
could take a lot of time to debug.
For instance if the device_generic_qemu.git directory is
matched in the file system, the regex should stop converting
'/' in '_', however the regex needs to start to match from
the right as we don't want to introduce bugs in the unlikely
case where we have something like the following repositories
(instead of eclipse-build-deps):
- platform_prebuilts_eclipse
- platform_prebuilts_eclipse_build_deps
Another way would be to use inotify/fanotify scripts to generate
the mapping automatically.
Having something that works would enable people not to have
to learn the details on how this system work, especially if
they are not aware it exists and have to learn that during
days of debugging without even having ssh access.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | default.xml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/default.xml b/default.xml index b042c0a..8ab60cc 100644 --- a/default.xml +++ b/default.xml @@ -14,8 +14,7 @@ fetch="ssh://git@github.com" /> <remote name="aosp" - fetch="https://android.googlesource.com" - review="android-review.googlesource.com" + fetch="../mirrors/AOSP" revision="refs/tags/android-10.0.0_r37" /> <default revision="refs/heads/lineage-17.1" |