... | ... | @@ -240,54 +240,6 @@ Changes to most repositories are reported to: |
|
|
|
|
|
* Some repositories have a dedicated mailing list for commits at https://lists.torproject.org
|
|
|
|
|
|
### Archiving a repository
|
|
|
|
|
|
If a repository is not to be migrated or mirrored to GitLab (see
|
|
|
below) but just archived, use the following procedure.
|
|
|
|
|
|
4. make an (executable) `pre-receive` hook in `git-rw` with an exit
|
|
|
status of `1` warning about the new code location, example:
|
|
|
|
|
|
$ cat /srv/git.torproject.org/repositories/project/help/wiki.git/hooks/pre-receive
|
|
|
#!/bin/sh
|
|
|
|
|
|
cat <<EOF
|
|
|
This repository has been archived and should not be used anymore.
|
|
|
|
|
|
See this issue for details:
|
|
|
|
|
|
https://gitlab.torproject.org/tpo/tpa/services/-/issues/TODO
|
|
|
EOF
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
4. in Gitolite, make the project part of the "Attic", for example
|
|
|
|
|
|
@@ -328,13 +328,13 @@ admin/trac/TracAccountManager "The Tor Project" = "Tor specific changes to Matth
|
|
|
|
|
|
repo project/help/infra
|
|
|
RW+ = @torproject-admin
|
|
|
- config gitweb.category = Infrastructure and Administration
|
|
|
-project/help/infra "The Tor Project" = "help.torproject.org infrastructure"
|
|
|
+ config gitweb.category = Attic
|
|
|
+project/help/infra "The Tor Project" = "help.torproject.org infrastructure (archived to GitLab: https://gitlab.torproject.org/tpo/tpa/wiki-infra-archive')"
|
|
|
|
|
|
repo project/help/wiki
|
|
|
RW = anarcat
|
|
|
- config gitweb.category = Infrastructure and Administration
|
|
|
-project/help/wiki "The Tor Project" = "help.torproject.org content"
|
|
|
+ config gitweb.category = Attic
|
|
|
+project/help/wiki "The Tor Project" = "help.torproject.org content (archived to GitLab: https://gitlab.torproject.org/tpo/tpa/wiki-archive')"
|
|
|
|
|
|
repo project/jenkins/jobs
|
|
|
RW = @jenkins-admins
|
|
|
|
|
|
The only downside with that approach is that a git clone will not warn
|
|
|
about the project redirection, but I am not sure there's a way to fix
|
|
|
that.
|
|
|
|
|
|
See [issue 36][] for further discussion.
|
|
|
|
|
|
### How to migrate a Git repository from legacy to GitLab?
|
|
|
|
|
|
Moving a repository from Gitolite to GitLab proceeds in two parts. One
|
... | ... | @@ -321,6 +273,28 @@ This is the part you need to do as a user to move to GitLab: |
|
|
|
|
|
That's it, you are done! The remaining steps will be executed by TPA.
|
|
|
|
|
|
Note that you can migrate multiple repositories at once by following
|
|
|
those steps multiple times. In that case, create a single ticket for
|
|
|
TPA with the before/after names, and how they should be handled.
|
|
|
|
|
|
For example, here's the table of repositories migrated by the
|
|
|
applications team:
|
|
|
|
|
|
| gitolite | gitlab | fate |
|
|
|
|----------------------------|--------------------------------------|---------|
|
|
|
| builders/tor-browser-build | tpo/applications/tor-browser-build | migrate |
|
|
|
| builders/rbm | tpo/applications/rbm | migrate |
|
|
|
| tor-android-service | tpo/applications/tor-android-service | migrate |
|
|
|
| tor-browser | tpo/applications/tor-browser/ | migrate |
|
|
|
| tor-browser-spec | tpo/applications/tor-browser-spec | migrate |
|
|
|
| tor-launcher | tpo/applications/tor-launcher | archive |
|
|
|
| torbutton | tpo/applications/torbutton | archive |
|
|
|
|
|
|
The above shows 5 repositories that should be migrated to GitLab and
|
|
|
still active, two that should be migrated and archived. There's a
|
|
|
third possible fate that is "destroy" in which case TPA will simply
|
|
|
mark the repository as inactive and will not migrate it.
|
|
|
|
|
|
#### TPA part: lock down the repository and add redirections
|
|
|
|
|
|
4. make an (executable) `pre-receive` hook in `git-rw` with an exit
|
... | ... | @@ -394,17 +368,13 @@ That's it, you are done! The remaining steps will be executed by TPA. |
|
|
`gitweb.torproject.org.conf` (TODO: use a `RewriteMap` instead of
|
|
|
copy-paste, see tpo/tpa/team#40472 for progress)
|
|
|
|
|
|
See [issue 36][] for further discussion.
|
|
|
|
|
|
### Mirroring a gitolite repository to GitLab
|
|
|
|
|
|
Important: this policy is still being debated. It is not clear if any
|
|
|
or all repositories should be mirror or just migrated to GitLab, see
|
|
|
[issue 36][] for the discussion on this topic.
|
|
|
This procedure is DEPRECATED. Instead, consider [migrating the
|
|
|
repository to GitLab permanently](#how-to-migrate-a-git-repository-from-legacy-to-gitlab) or simply destroying the
|
|
|
repository if its data is worthless.
|
|
|
|
|
|
[issue 36]: https://gitlab.torproject.org/tpo/tpa/team/-/issues/40472
|
|
|
|
|
|
Also consider [migrating the repository to GitLab permanently](#how-to-migrate-a-git-repository-from-legacy-to-gitlab).
|
|
|
This procedure is kept for historical purposes only.
|
|
|
|
|
|
1. import the Gitolite repository in GitLab:
|
|
|
|
... | ... | @@ -440,6 +410,56 @@ Also consider [migrating the repository to GitLab permanently](#how-to-migrate-a |
|
|
In that example, the `translation.git` repository will push to the
|
|
|
`tpo/web/translation` mirror.
|
|
|
|
|
|
### Archiving a repository
|
|
|
|
|
|
IMPORTANT: this procedure is DEPRECATED. Repositories archived on
|
|
|
Gitolite *still* will be migrated to GitLab, follow the [migration
|
|
|
procedure](#how-to-migrate-a-git-repository-from-legacy-to-gitlab) instead.
|
|
|
|
|
|
If a repository is not to be migrated or mirrored to GitLab (see
|
|
|
below) but just archived, use the following procedure.
|
|
|
|
|
|
4. make an (executable) `pre-receive` hook in `git-rw` with an exit
|
|
|
status of `1` warning about the new code location, example:
|
|
|
|
|
|
$ cat /srv/git.torproject.org/repositories/project/help/wiki.git/hooks/pre-receive
|
|
|
#!/bin/sh
|
|
|
|
|
|
cat <<EOF
|
|
|
This repository has been archived and should not be used anymore.
|
|
|
|
|
|
See this issue for details:
|
|
|
|
|
|
https://gitlab.torproject.org/tpo/tpa/services/-/issues/TODO
|
|
|
EOF
|
|
|
|
|
|
exit 1
|
|
|
|
|
|
4. in Gitolite, make the project part of the "Attic", for example
|
|
|
|
|
|
@@ -328,13 +328,13 @@ admin/trac/TracAccountManager "The Tor Project" = "Tor specific changes to Matth
|
|
|
|
|
|
repo project/help/infra
|
|
|
RW+ = @torproject-admin
|
|
|
- config gitweb.category = Infrastructure and Administration
|
|
|
-project/help/infra "The Tor Project" = "help.torproject.org infrastructure"
|
|
|
+ config gitweb.category = Attic
|
|
|
+project/help/infra "The Tor Project" = "help.torproject.org infrastructure (archived to GitLab: https://gitlab.torproject.org/tpo/tpa/wiki-infra-archive')"
|
|
|
|
|
|
repo project/help/wiki
|
|
|
RW = anarcat
|
|
|
- config gitweb.category = Infrastructure and Administration
|
|
|
-project/help/wiki "The Tor Project" = "help.torproject.org content"
|
|
|
+ config gitweb.category = Attic
|
|
|
+project/help/wiki "The Tor Project" = "help.torproject.org content (archived to GitLab: https://gitlab.torproject.org/tpo/tpa/wiki-archive')"
|
|
|
|
|
|
repo project/jenkins/jobs
|
|
|
RW = @jenkins-admins
|
|
|
|
|
|
The only downside with that approach is that a git clone will not warn
|
|
|
about the project redirection, but I am not sure there's a way to fix
|
|
|
that.
|
|
|
|
|
|
### GitHub and GitLab Mirrors implementation details
|
|
|
|
|
|
Some repositories are mirrored to https://github.com/torproject
|
... | ... | |