|
|
| Line 1: |
Line 1: |
| − | This describes the steps necessary to rename a project in Fedora Hosted. | + | {{header|infra}} |
| | + | This SOP has moved to the fedora Infrastructure SOP git repo. Please see the current document at: http://infrastructure.fedoraproject.org/infra/docs/fedorahostedrename.txt |
| | | | |
| − | == Rename the Trac instance ==
| + | For changes, questions or comments, please contact anyone in the Fedora Infrastructure team. |
| − | <pre>
| + | |
| − | cd /srv/web/trac/projects
| + | |
| − | mv oldname newname
| + | |
| − | cd newname/conf
| + | |
| − | sed -i -e 's/oldname/newname/' trac.ini
| + | |
| − | cd ..
| + | |
| − | sudo -u apache trac-admin .
| + | |
| − | resync
| + | |
| − | </pre>
| + | |
| | | | |
| − | == Rename the git / svn / hg / ... directory ==
| |
| − | <pre>
| |
| − | cd /git
| |
| − | mv oldname.git newname.git
| |
| − | </pre>
| |
| | | | |
| − | == Rename any old releases directories ==
| + | [[Category:Infrastructure SOPs]] |
| − | <pre>
| + | |
| − | cd /srv/web/releases/o/l/oldname
| + | |
| − | (somehow, the newname releases dir gets created; if there were old releases, move them to the new location).
| + | |
| − | </pre>
| + | |
| − | | + | |
| − | == Rename the group in FAS ==
| + | |
| − | {{admon/note|Don't blindly rename|fedorahosted groups are usually safe to rename. If the old group could be present in other apps/configs, though, (like provenpackagers, perl-sig, etc) do not rename them. The other apps would need to have the group name updated there as well to make this safe.}}
| + | |
| − | | + | |
| − | <pre>
| + | |
| − | ssh db2
| + | |
| − | sudo -u postgres psql fas2
| + | |
| − | BEGIN;
| + | |
| − | select * from groups where name = '$OLDNAME';
| + | |
| − | update groups set name = '$NEWNAME' where name = '$OLDNAME';
| + | |
| − | -- Check that only one row was modified
| + | |
| − | select * from groups where name in ('$OLDNAME', '$NEWNAME');
| + | |
| − | -- Check that there's only one row and the name == $NEWNAME
| + | |
| − | -- If incorrect, do ROLLBACK; instead of commit
| + | |
| − | COMMIT;
| + | |
| − | </pre>
| + | |
| − | | + | |
| − | {{admon/warning|Don't delete groups|If, for some reason, you end up with a group in FAS that was a typo but it doesn't conflict with anything else, don't delete it without talking to other admins on fedora-infrastructure-list. The numeric group ids could be present on a filesystem somewhere and removing the group could eventually lead to the id being allocated to some other group which would give unintended people access to the files. As a group we can figure out what hosts and files need to be checked for this issue if a delete is needed.}}
| + | |
| − | | + | |
| − | | + | |
| − | [[Category:Infrastructure_SOPs]] | + | |
For changes, questions or comments, please contact anyone in the Fedora Infrastructure team.