how to sync git repo from debian git to launchpad git

Asked by uniasc

Excuse me, I have a rather strange question:
I found that there are some software in some debian git warehouses, and also in launchpad git warehouses, the problem is coming;
If the code of a certain software in debian has changed,

1.does the code in the git repository of launchpad need to synchronize these changes?

2.What is the process to automatically synchronize the git repository of debian with the git repository of launchpad?

3.Is the launchpad program responsible for this task?

thank you very much.

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Colin Watson
Solved:
Last query:
Last reply:
Revision history for this message
Colin Watson (cjwatson) said :
#1

See https://help.launchpad.net/Code/Git#Mirroring_repositories_from_other_sites.

https://git.launchpad.net/lp-codeimport (plus the code import scheduler in Launchpad itself) deal with the mirror/import process.

Revision history for this message
Colin Watson (cjwatson) said :
#2

But also, when importing Debian for the purpose of doing bulk syncs of it into Ubuntu, we don't start from git repositories. That process is handled by `scripts/gina.py`, deployed via the `launchpad-debian-importer` charm. So it depends what you're looking for.

Revision history for this message
uniasc (uniasc) said :
#3

Hi Colin Watson:
    first of all thank you for your answer.
    Recently I was studying launchpad, and I found that it is inextricably linked with many other systems, such as git warehouse, archive warehouse, and images warehouse. I haven't fully sorted them out yet. Maybe I'm just getting started, and I hope to get some guidance from seniors.
    you said you don't start from git repositories when doing bulk syncs. why don't you start from git repositories?
    how to do it?

greetings to you.

Revision history for this message
Colin Watson (cjwatson) said :
#4

We don't use any of these "warehouse" terms you've been using, so I'm not 100% sure what you mean - you might mean "repository"? I'll do my best to work it out.

Bear in mind that Ubuntu has existed for 19 years, and Debian for longer; both distributions are older than git, and there's a great deal of complex history here. Debian has never consistently had version control for all packages. Nowadays _most_ packages are maintained in git, so the situation is much better than it used to be, but not all maintainers use the same branch layout, and there are still a few holdout packages that don't use git at all or that use some other system (https://trends.debian.net/#version-control-system).

Like it or not, the canonical way to get all of Debian's source code is by mirroring the source packages in the Debian archive. There are people working on various projects to ensure everything is at least reflected consistently in git (dgit on the Debian side, git-ubuntu on the Ubuntu side), but neither is something that we can sensibly use as part of the pipeline for bulk-importing unmodified Debian source packages into Ubuntu. We use an approach that works consistently instead.

Revision history for this message
uniasc (uniasc) said (last edit ):
#5

Thanks, sorry for the inaccurate words I used. The word repository should be used instead.
First, synchronize the debian archive, and then import the source code packages of these mirrors into the ubuntu git repository. Is my understanding correct?

If, a certain source code in ubuntu git (for example: abc.in.git.lp, under the git management mode, a special custom development is carried out for ubuntu). One day, its source packages in the Debian archive (for example: abc.tar.gz.in.debian) changed, for example, the version was upgraded.
At this point, its source packages (abc.tar.gz.in.debian) have been synchronized from the Debian archive to a machine running the code importer on Ubuntu. At this time, there may be conflicts between abc.tar.gz.in.debian and abc.in.git.lp in ubuntu, or there may be no conflicts (:^)).
In this case, keep the ubuntu-specific custom content of abc.in.git.lp. Can gina.py handle it well? Is it manual processing, or automatic processing?

Thanks.

Revision history for this message
Best Colin Watson (cjwatson) said :
#6

scripts/gina.py makes the packages visible under https://launchpad.net/debian exactly match what's in Debian. It does not touch git, and it's not its job to update Ubuntu.

The bulk of automatic updates to Ubuntu are done by https://git.launchpad.net/ubuntu-archive-tools/tree/auto-sync, which is not part of Launchpad though works with it, and that has the sort of logic you're thinking of to avoid clobbering Ubuntu modifications.

It's up to Ubuntu developers to merge changes manually in the cases that auto-sync doesn't handle, usually where there are Ubuntu modifications. See https://wiki.ubuntu.com/UbuntuDevelopment/Merging (although that page seems to be rather old and still talks about bzr).

Revision history for this message
uniasc (uniasc) said :
#7

Thanks Colin Watson, that solved my question.