<commit_before>Getting Started with Reposado
=============================

What you need:

- The Reposado tools
- Python 2.5-2.7 (Reposado has been tested with Python 2.6, but should work with at least 2.5-2.7.)
- curl binary
- A web server
- Storage space for the catalogs and update packages. If you are replicating the update packages, you'll need approximately 40GB of space as of April 2011. The need for space grows as additional updates are released by Apple. If you are only replicating catalogs, you'll probably need less than 100MB of space, though the exact amount of space needed depends on the number of branch catalogs you create.

1) Download the Reposado tools, typically by doing a git clone of the repo, or downloading the source from GitHub. The tools are in the code directory. 

2) Create a directory in which to store replicated catalogs and updates, and another to store Reposado metadata. These may share a parent directory, like so:
	/Volumes/data/reposado/html
	/Volumes/data/reposado/metadata
Make sure you have enough space for the replicated catalogs and updates.

3) Configure your web server to serve the contents of the updates root directory you created ("/Volumes/data/reposado/html" in the example above). If you are planning to replicate and serve the actual update packages as well as the catalogs, make note of the URL needed to access the updates root directory via HTTP. This will be the LocalCatalogURLBase when configuring Reposado in the next step.

4) Configure Reposado by running:

repoutil --config

You'll be asked three questions:

Path to store replicated catalogs and updates: 
Path to store Reposado metadata: 
Base URL for your local Software Update Service
(Example: http://su.your.org -- leave empty if you are not replicating updates): 

Answer appropriately using your decisions in steps 2 and 3 above.
See "reposado_preferences.txt" for more details on Reposado preferences.

5) Run repo_sync to replicate update catalogs and (optionally) update packages to the UpdatesRootDir directory. The first time you do this it may take several hours to complete if you are replicating packages as well as catalogs.

6) Test things so far by visiting a catalog URL in your browser. If http://su.myorg.com is the URL for the updates root directory you created earlier, then http://su.myorg.com/content/catalogs/others/index-leopard-snowleopard.merged-1.sucatalog 
is the CatalogURL for the Snow Leopard updates catalog. You should see a plist version of the updates catalog displayed in your browser.

7) Next test: run softwareupdate on a client, again pointing it to your Catalog URL:

softwareupdate -l --CatalogURL "http://su.myorg.com/content/catalogs/others/index-leopard-snowleopard.merged-1.sucatalog"

If there are no errors, you've successfully configured Reposado and successfully replicated Apple Software Updates.
<commit_msg>Updated getting_started docs<commit_after>Getting Started with Reposado
=============================

What you need:

- The Reposado tools
- Python 2.5-2.7 (Reposado has been tested with Python 2.6, but should work with at least 2.5-2.7.)
- curl binary
- A web server
- Storage space for the catalogs and update packages. If you are replicating the update packages, you'll need approximately 40GB of space as of April 2011. The need for space grows as additional updates are released by Apple. If you are only replicating catalogs, you'll probably need less than 100MB of space, though the exact amount of space needed depends on the number of branch catalogs you create.

1) Download the Reposado tools, typically by doing a git clone of the repo, or downloading the source from GitHub. The tools are in the code directory. 

2) Create a directory in which to store replicated catalogs and updates, and another to store Reposado metadata. These may share a parent directory, like so:
	/Volumes/data/reposado/html
	/Volumes/data/reposado/metadata
Make sure you have enough space for the replicated catalogs and updates. Make sure these directories are writable by the user repo_sync will run as, and readable by the user your webserver runs as.

3) Configure your web server to serve the contents of the updates root directory you created ("/Volumes/data/reposado/html" in the example above). If you are planning to replicate and serve the actual update packages as well as the catalogs, make note of the URL needed to access the updates root directory via HTTP. This will be the LocalCatalogURLBase when configuring Reposado in the next step.

4) Configure Reposado by running:

repoutil --config

You'll be asked three questions:

Path to store replicated catalogs and updates: 
Path to store Reposado metadata: 
Base URL for your local Software Update Service
(Example: http://su.your.org -- leave empty if you are not replicating updates): 

Answer appropriately using your decisions in steps 2 and 3 above.
See "reposado_preferences.txt" for more details on Reposado preferences.

5) Run repo_sync to replicate update catalogs and (optionally) update packages to the UpdatesRootDir directory. The first time you do this it may take several hours to complete if you are replicating packages as well as catalogs.

6) Test things so far by visiting a catalog URL in your browser. If http://su.myorg.com is the URL for the updates root directory you created earlier, then http://su.myorg.com/content/catalogs/others/index-leopard-snowleopard.merged-1.sucatalog 
is the CatalogURL for the Snow Leopard updates catalog. You should see a plist version of the updates catalog displayed in your browser.

7) Next test: run softwareupdate on a client, again pointing it to your Catalog URL:

softwareupdate -l --CatalogURL "http://su.myorg.com/content/catalogs/others/index-leopard-snowleopard.merged-1.sucatalog"

If there are no errors, you've successfully configured Reposado and successfully replicated Apple Software Updates.

{'fraction_non_alphanumeric': 0.05749070003381806, 'fraction_numerical': 0.010145417653026716, 'mean_word_length': 4.476851851851852, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5736537', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1484, 'n_words': 848}