Skip to content
Snippets Groups Projects
Verified Commit 0e1a0053 authored by anarcat's avatar anarcat
Browse files

simplify pre-receive hook so it's easier to write, rewritemap fixed (team#41180)

parent d781ccec
No related branches found
No related tags found
No related merge requests found
......@@ -302,73 +302,42 @@ See [issue tpo/tpa/team#41181](https://gitlab.torproject.org/tpo/tpa/team/-/issu
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
root@cupani:~# cat /srv/git.torproject.org/repositories/pluggable-transports/goptlib.git/hooks/pre-receive
#!/bin/sh
cat <<EOF
This repository has been migrated to GitLab:
https://gitlab.torproject.org/tpo/tpa/services/-/wikis/home
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib/
Update your remotes to:
git@gitlab.torproject.org:tpo/tpa/services.wiki.git
or:
https://gitlab.torproject.org/tpo/tpa/services.wiki.git
See this issue for details:
https://gitlab.torproject.org/tpo/tpa/services/-/issues/34437
EOF
exit 1
or in the case of a fully archived repository (non-writable):
$ cat /srv/git.torproject.org/repositories/project/help/infra.git/hooks/pre-receive
#!/bin/sh
cat <<EOF
This repository has been migrated to GitLab:
https://gitlab.torproject.org/tpo/tpa/wiki-infra-archive
We have migrated away from ikiwiki so it is not necessary anymore.
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/goptlib.git
See this issue for details:
https://gitlab.torproject.org/tpo/tpa/services/-/issues/34437
https://gitlab.torproject.org/tpo/tpa/team/-/issues/41182
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"
@@ -715,7 +715,7 @@ repo debian/goptlib
config hooks.irc-enabled = true
config hooks.ircproject = or
config hooks.projectname = debian-goptlib
- config gitweb.category = Packaging
+ 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')"
debian/goptlib "The Tor Project" = "Debian packaging for the goptlib pluggable transport library"
repo project/jenkins/jobs
RW = @jenkins-admins
repo debian/torproject-keyring
5. on vineale, add a rewrite rule for the site in
`/etc/apache2/sites-enabled/git.torproject.org.conf` and
`gitweb.torproject.org.conf` (TODO: use a `RewriteMap` instead of
copy-paste, see tpo/tpa/team#40472 for progress)
5. in Puppet, add a line for this project in
`modules/profile/files/git/gitolite2gitlab.txt` (in
`tor-puppet.git`), for example:
pluggable-transports/goptlib tpo/anti-censorship/pluggable-transports/goptlib
### Mirroring a gitolite repository to GitLab
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment