Setup a local OpenACS server running 5.0 or better.
Edit packages/acs-admin/www/apm/build-repository.tcl and adjust the Configuration Settings.
Request /acs-admin/apm/build-repository on your new server.
The page will find all branches in the cvs repository labeled oacs-x-y, and build a repository channel for each of those branches where x>=5 (so not for 4.6 and earlier). It will also build a channel for HEAD, which will be named after what you set in 'head_channel' above.
For each channel, it'll do an anonymous checkout of packges and contrib/packages, then build .apm files for each package in the checkout.
The files will be stored on the server's hard drive in the directory specified by the 'repository_dir' variable in the page script, by default "[acs_root_dir]/www/repository/".
If you're on openacs.org, everything should now be fine. Otherwise, you need to move the entire directory tree to openacs.org:/web/openacs/www/repository, replacing what was already there.