[MacPorts] Mirroring modified

MacPorts noreply at macports.org
Wed Mar 9 16:58:31 PST 2016


Page "Mirroring" was changed by ryandesign at macports.org
Diff URL: <https://trac.macports.org/wiki/Mirroring?action=diff&version=10>
Revision 10
Comment: add sample rsyncd configuration; update related instructions
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: Mirroring
=========================================================================
--- Mirroring (version: 9)
+++ Mirroring (version: 10)
@@ -34,13 +34,15 @@
 * **release** contains the latest released version of the MacPorts base source code which users update by running `sudo port selfupdate`, as well as the collection of Portfiles—the text files MacPorts reads that tell it how to install each port—which users update by running `sudo port sync`. Users near you can manually configure MacPorts to user your mirror for faster speed. This small module is around 500MB.
 * **trunk** contains the latest development version of the MacPorts base source code. This small module is around 20MB.
 
+We may in the future offer a single ''macports'' rsync module containing the above four modules as subdirectories, which is the configuration we recommend for mirrors.
+
 == Get the files
 
 You'll get the files from our server via [https://rsync.samba.org/ rsync]. You should use the latest version of rsync.
 
 For your initial sync, you might speed up your transfer by using a nearby existing MacPorts mirror server. For subsequent scheduled syncing, use the master rsync server, rsync-origin.macports.org. 
 
-**Note:** If you are syncing from rsync.macports.org, distfiles.macports.org, packages.macports.org, or a specific IP address, please switch to rsync-origin.macports.org.
+**Note:** If you are syncing from a different hostname such as rsync.macports.org, or from a specific IP address, please switch to rsync-origin.macports.org.
 
 There is a sample script below for mirroring these modules via rsync. You don't have to use that script if you already have other arrangements for syncing, but please use the following `rsync` flags, for the following reasons:
 
@@ -62,17 +64,17 @@
 
 == Rsync server
 
-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.
-
-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.
-
-**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.
+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.
+
+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).
+
+**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.
 
 There is a sample rsyncd configuration below.
 
 == Web server
 
-MacPorts retrieves files from the ''packages'' and ''distfiles'' modules via http. MacPorts automatically downloads these files from whichever mirror is closest. So you should run a web server to make these modules available.
+MacPorts retrieves files from ''packages'' and ''distfiles'' via http. MacPorts automatically downloads these files from whichever mirror is closest. So you should run a web server to make these modules available.
 
 The contents of the ''packages'' module should be made available directly under !http://abc.xy.packages.macports.org/ and the contents of the ''distfiles'' module should be made available directly under !http://abc.xy.distfiles.macports.org/. It is not necessary to provide the contents of the ''release'' or ''trunk'' modules via http.
 
@@ -283,6 +285,79 @@
 
 === Sample rsyncd configuration
 
-{{{
-TODO
-}}}
+This sample rsyncd.conf file can be used to serve MacPorts files with the rsync daemon.
+
+{{{
+dont compress = 7z ace avi bin bz2 deb distz dmg gem gif gpg gz \
+    icns image img iso jar jpeg jpg lz lzma lzo mov mp3 mp4 mpkg msi \
+    ogg pdf pkg png rar rmd160 rpm rzip sig sit sitx smi tbz tbz2 \
+    tgz tlz ttf txz xz Z zip
+forward lookup = false
+gid = nobody
+list = true
+log file = /var/log/rsyncd/rsyncd.log
+max connections = 0
+pid file = /var/run/rsyncd.pid
+read only = true
+reverse lookup = false
+timeout = 600
+transfer logging = true
+uid = nobody
+use chroot = no
+
+[macports]
+    comment = MacPorts release, trunk, distfiles and packages
+    log file = /var/log/rsyncd/macports.log
+    path = /var/www/html/macports
+}}}
+
+Start rsync with:
+
+{{{
+rsync --daemon --config=/etc/rsyncd.conf
+}}}
+
+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:
+
+{{{
+cd /var/www/html
+mkdir macports
+mv packages distfiles release trunk macports/
+}}}
+
+Adjust your rsyncd.conf to the new directory locations:
+
+{{{
+[release]
+    comment = MacPorts release (deprecated; use "macports/release" instead)
+    log file = /var/log/rsyncd/macports.log
+    path = /var/www/html/macports/release
+
+[trunk]
+    comment = MacPorts trunk (deprecated; use "macports/trunk" instead)
+    log file = /var/log/rsyncd/macports.log
+    path = /var/www/html/macports/trunk
+
+[distfiles]
+    comment = MacPorts distfiles (deprecated; use "macports/distfiles" instead)
+    log file = /var/log/rsyncd/macports.log
+    path = /var/www/html/macports/distfiles
+
+[mpdistfiles]
+    comment = MacPorts distfiles (deprecated; use "macports/distfiles" instead)
+    log file = /var/log/rsyncd/macports.log
+    path = /var/www/html/macports/distfiles
+
+[packages]
+    comment = MacPorts packages (deprecated; use "macports/packages" instead)
+    log file = /var/log/rsyncd/macports.log
+    path = /var/www/html/macports/packages
+}}}
+
+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:
+
+{{{
+cd /var/www/html/macports
+mv mpdistfiles distfiles
+ln -s distfiles mpdistfiles
+}}}
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/Mirroring>
MacPorts <https://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'Mirroring' page.
If it was not you, please report to .


More information about the macports-changes mailing list