Project

General

Profile

Issue #1071

Issue #1065: Make sure *we* provide all the corresponding source code.

Host all the upstream project code that we use.

Added by Denis 'GNUtoo' Carikli almost 5 years ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Category:
Legal
Target version:
Start date:
11/08/2014
Due date:
% Done:

0%

Estimated time:
Spent time:
Resolution:
Device:

Description

we want to be able to build the source code even if the upstream project's git disappear.

History

#1

Updated by Paul Kocialkowski over 4 years ago

  • Target version changed from 21 to Any version
#2

Updated by Denis 'GNUtoo' Carikli almost 4 years ago

  • Device set to Not device specific
#3

Updated by Wolfgang Wiedmeyer over 2 years ago

  • Device deleted (Not device specific)

I added a LineageOS mirror with all the repos that are needed for Replicant 6.0: https://git.replicant.us/LineageOS-mirror
The mirror is configured with the manifest branch LineageOS-mirror: https://git.replicant.us/replicant/manifest/log/?h=LineageOS-mirror
And the mirror is in use since this commit

Git bundles are also deployed now so the server load shouldn't be too high.
Maintenance-wise, it makes sense to use a mirror for LineageOS because they don't tag versions. Mirroring allows to add tags and freeze the code at a certain version. The AOSP code is already tagged, so there is not necessarily a need to create a mirror to ease maintenance, but it would be quite easy to add another subproject like "AOSP-mirror" and host all the AOSP code at git.replicant.us.

#4

Updated by Wolfgang Wiedmeyer over 2 years ago

  • Assignee changed from Paul Kocialkowski to Wolfgang Wiedmeyer

Added documentation for the LineageOS mirror: LineageMirror

#5

Updated by Denis 'GNUtoo' Carikli 7 months ago

  • Target version changed from Any version to Replicant 6.0 0004
#6

Updated by Denis 'GNUtoo' Carikli 7 months ago

I've sent the patch for that to the mailing list (I've tested it).

#7

Updated by Denis 'GNUtoo' Carikli 7 months ago

With that patch, only one repository remains which is f-droid.

As it will temporarily removed once the patch has been merged we can close this bug when it'll be removed.

#8

Updated by Denis 'GNUtoo' Carikli 7 months ago

Here's the script that has been used for most of the AOSP repos:

#!/bin/sh
# Copyright 2019 Denis 'GNUtoo' Carikli
# In the cases where this work is copyrightable, it falls under the GPLv2
# or later license that is available here:
# https://www.gnu.org/licenses/gpl-2.0.txt

set -e
for path in $(grep 'remote="aosp"' manifest.xml  | awk '{print $2}' | sed 's#path="##' | sed 's#"$##') ; do
    name=$(grep "path=\"${path}\"" manifest.xml | awk '{print $3}' | sed 's#name="##' | sed 's#"$##' | sed 's#/#_#g')
    git -C ${path} \
        fetch --unshallow aosp || true

    git -C ${path} \
        push \
        -f \
        ssh://git@replicant-git/AOSP-mirror/${name} \
        HEAD:refs/tags/android-6.0.1_r81 \

    sed "/.* path=\"$(echo $path | sed 's#/#\\/#g')\" .*/d" -i manifest.xml
done

is it to be used in the top directory and the manifest.xml file has to be copied there.

#9

Updated by Denis 'GNUtoo' Carikli 6 months ago

  • Status changed from New to Resolved

All the relevant patches have been pushed in the manifest git on replicant-6.0-dev branch so this issue is resolved.

#10

Updated by Denis 'GNUtoo' Carikli 6 months ago

I forgot to add the python source code that generates the manifest.xml that is then parsed by shell script.

manifest.xml -> python script -> new manifest.xml that only contains AOSP mirror entries -> shell script

#!/usr/bin/env python
# Copyright 2019 Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
# In the cases where this work is copyrightable, it falls under the GPLv3
# or later license that is available here:
# https://www.gnu.org/licenses/gpl-3.0.txt

import re

file = open ('default.xml', mode='r')
for line in file:
    if re.search('remote="aosp"', line):
        match = re.search('name="(.*)" ', line)
        if match:
            old_name = re.sub('".*', '', re.sub('^name="', '', match.group(0)))
            new_name = old_name.replace('/', '_')
            line = line.replace('name="{0}"'.format(old_name), 'name="AOSP-mirror/{0}"'.format(new_name))
            #print(line.replace('\n', ''))
    line = line.replace('\n', '')
    print (line,)

Also available in: Atom PDF