Confused? Read Using Reposado to manage cached Mac updates yet? If not, read that first.
There’s a great step-by-step guide to setting up Reposado on Ubuntu Linux, and, in fact, one of the benefits of Reposado is that it can be run on Linux… but it doesn’t have to be. For whatever reasons you have, you may want to run it on a Mac instead.
First, make sure Apache is up and running on your Mac:
You may have to configure a bunch of other things on the web server for that last part to work—all that’s a bit outside the scope of a Reposado tutorial.
(Keep in mind, too, that the path I’m using to the web server documents is based on a regular macOS installation. If you add OS X Server on top of that, the path then changes to /Library/Server/Web/Data/Sites/Default.)
Next, get the latest Reposado code. If you have Git installed, you can just clone the repository:
If you don’t have Git installed and don’t want to install it, you can also click the Clone or download link on the Reposado GitHub repository and then double-click the downloaded .zip to unzip its contents.
Either way, you should have a folder called reposado with a subfolder called code.
Go ahead and copy that to /usr/local/reposado:
sudo cp -R /PATH/TO/reposado/code/* /usr/local/reposado/
Make folders to store the Reposado-downloaded Apple updates data:
sudo mkdir -p /Library/WebServer/Documents/reposado/metadata
Configure Reposado:
/Library/WebServer/Documents/reposado/html
Filesystem path to store Reposado metadata [None]:
/Library/WebServer/Documents/reposado/metadata
Base URL for your local Software Update Service
(Example: http://su.your.org — leave empty if you are not replicating updates) [None]:
https://myserver.mycompany.com
Create at least one branch (you’ll probably have at least two later):
Start syncing your Reposado cache with Apple’s update servers:
Once it’s finished syncing up, add all the products to the testing branch:
https://myserver.mycompany.com/reposado/content/catalogs/others/index-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1_testing.sucatalog
That URL will change with each new version of macOS that’s released (the sample above is valid as of Sierra), so you may want to wait until Reposado’s code is updated and then do another Git clone on the code to update the URL (and then fix the URL for your clients).
The last part of the URL is the branch you want the client to access (in this case, testing).
To write the change to a client, run on the client machine:
That’s a very basic setup. For more details on Reposado options, read the official docs.
4 responses to “Setting up Reposado on a Mac”
Might be an error, might not be.
The official documentation says for the webserver to serve out of ./reposado/html, however here it is configured to server out of ./reposado. This will have two outcomes: one is that the raw URL will be incorrect: myserver.mycompany.com/reposado/****html****/content/catalogs/others/index-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1_testing.sucatalog
The other is the risk of potentially exposing ./reposado/metadata or other files under ./reposado (probably not a problem, but I’m not 100% certain).
A potential ‘fix’ is to put the ./reposado directory outside of /Library/WebServer/Documents, and then create a symlink to ./reposado/html within Documents eg
mkdir -p /Users/Shared/reposado/{html,metadata}
sudo ln -s /Users/Shared/reposado /Library/WebServer/Documents/
That last line should be:
sudo ln -s /Users/Shared/reposado/html /Library/WebServer/Documents/reposado
[…] guides for how to configure reposado & margarita (the reposado web front-end) on Ubuntu and on Mac. However, neither of these setups gave me everything I wanted in my […]
Any post on how to setup the apache piece i can turn apache on and localhost works, what kind of config do i need to setup the myserver.mycompany.com correctly