65 | | MacPorts retrieves the contents of the ''release'' and ''trunk'' modules via rsync. MacPorts comes preconfigured to use the server rsync.macports.org but users can edit their configuration to use your mirror instead. In addition, other mirror administrators may wish to copy your ''packages'' and ''distfiles'' modules. So you should run an rsync daemon to republish the modules you synced. |
66 | | |
67 | | The MacPorts rsync modules have generic names, so we suggest you put our modules in a "macports" folder. We would prefer you not rename our modules. |
68 | | |
69 | | **Note:** If you are providing the ''release'' or ''trunk'' modules under nonstandard names, please edit your rsyncd configuration to provide the module under both the nonstandard name and the standard name, and edit the [wiki:Mirrors Mirrors] page to reflect the standard name. If you are providing the ''packages'' or ''distfiles'' modules under nonstandard names, please edit your rsyncd configuration to provide the module under the standard name, edit the [wiki:Mirrors Mirrors] page to reflect the change, and let us know so that we can update mirror_sites.tcl and/or archive_sites.tcl. |
| 67 | MacPorts retrieves files from ''release'' and ''trunk'' via rsync. MacPorts comes preconfigured to use the server rsync.macports.org but users can edit their configuration to use your mirror instead. In addition, other mirror administrators may wish to copy your ''packages'' and ''distfiles''. So you should run an rsync daemon to republish the files you synced. |
| 68 | |
| 69 | The MacPorts rsync modules have generic names, so we suggest you put our files in subdirectories of a single "macports" module. We would prefer you not rename those subdirectories. If your site convention is to use the original server's hostname as the rsync module name, please use the name ''rsync.macports.org'' (even though you are actually syncing from rsync-origin.macports.org). |
| 70 | |
| 71 | **Note:** If you are providing the modules under nonstandard names, please edit your rsyncd configuration to provide the files under a single module with subdirectories, but continue to serve the files from your old module names so that existing users can still find the files. If you are already providing a single module but with nonstandard subdirectory names, rename the subdirectories to their standard names but add symlinks at their previous names. Edit the [wiki:Mirrors Mirrors] page to reflect your changes, and if you changed your configuration for ''packages'' or ''distfiles'' let us know so that we can update mirror_sites.tcl and/or archive_sites.tcl. |
286 | | {{{ |
287 | | TODO |
288 | | }}} |
| 288 | This sample rsyncd.conf file can be used to serve MacPorts files with the rsync daemon. |
| 289 | |
| 290 | {{{ |
| 291 | dont compress = 7z ace avi bin bz2 deb distz dmg gem gif gpg gz \ |
| 292 | icns image img iso jar jpeg jpg lz lzma lzo mov mp3 mp4 mpkg msi \ |
| 293 | ogg pdf pkg png rar rmd160 rpm rzip sig sit sitx smi tbz tbz2 \ |
| 294 | tgz tlz ttf txz xz Z zip |
| 295 | forward lookup = false |
| 296 | gid = nobody |
| 297 | list = true |
| 298 | log file = /var/log/rsyncd/rsyncd.log |
| 299 | max connections = 0 |
| 300 | pid file = /var/run/rsyncd.pid |
| 301 | read only = true |
| 302 | reverse lookup = false |
| 303 | timeout = 600 |
| 304 | transfer logging = true |
| 305 | uid = nobody |
| 306 | use chroot = no |
| 307 | |
| 308 | [macports] |
| 309 | comment = MacPorts release, trunk, distfiles and packages |
| 310 | log file = /var/log/rsyncd/macports.log |
| 311 | path = /var/www/html/macports |
| 312 | }}} |
| 313 | |
| 314 | Start rsync with: |
| 315 | |
| 316 | {{{ |
| 317 | rsync --daemon --config=/etc/rsyncd.conf |
| 318 | }}} |
| 319 | |
| 320 | If you are serving individual rsync modules, move those directories into a single new ''macports'' module but continue to serve the old modules under your existing names so that users using the old names can still get the files. For example: |
| 321 | |
| 322 | {{{ |
| 323 | cd /var/www/html |
| 324 | mkdir macports |
| 325 | mv packages distfiles release trunk macports/ |
| 326 | }}} |
| 327 | |
| 328 | Adjust your rsyncd.conf to the new directory locations: |
| 329 | |
| 330 | {{{ |
| 331 | [release] |
| 332 | comment = MacPorts release (deprecated; use "macports/release" instead) |
| 333 | log file = /var/log/rsyncd/macports.log |
| 334 | path = /var/www/html/macports/release |
| 335 | |
| 336 | [trunk] |
| 337 | comment = MacPorts trunk (deprecated; use "macports/trunk" instead) |
| 338 | log file = /var/log/rsyncd/macports.log |
| 339 | path = /var/www/html/macports/trunk |
| 340 | |
| 341 | [distfiles] |
| 342 | comment = MacPorts distfiles (deprecated; use "macports/distfiles" instead) |
| 343 | log file = /var/log/rsyncd/macports.log |
| 344 | path = /var/www/html/macports/distfiles |
| 345 | |
| 346 | [mpdistfiles] |
| 347 | comment = MacPorts distfiles (deprecated; use "macports/distfiles" instead) |
| 348 | log file = /var/log/rsyncd/macports.log |
| 349 | path = /var/www/html/macports/distfiles |
| 350 | |
| 351 | [packages] |
| 352 | comment = MacPorts packages (deprecated; use "macports/packages" instead) |
| 353 | log file = /var/log/rsyncd/macports.log |
| 354 | path = /var/www/html/macports/packages |
| 355 | }}} |
| 356 | |
| 357 | If you are already serving a single module but with subdirectories with nonstandard names, move the subdirectories to their standard names and add a symlink so that users using the old nonstandard names can still get the files. For example, if you are currently serving ''mpdistfiles'', rename it to ''distfiles'' and add an ''mpdistfiles'' symlink: |
| 358 | |
| 359 | {{{ |
| 360 | cd /var/www/html/macports |
| 361 | mv mpdistfiles distfiles |
| 362 | ln -s distfiles mpdistfiles |
| 363 | }}} |