Merge branch 'master' into distorted
[mirror-admin] / etc / ftpsync-common.conf
1 ### -*-sh-*-
2 ###
3 ### Common ftpsync configuration for Debian mirrors.
4 ###
5 ### This file is sourced by configuration scripts for specfic mirrors.
6
7 ###--------------------------------------------------------------------------
8 ### Settings expected from the calling script.
9
10 ## Mirrorname. This is used for things like the trace file and should always
11 ## be the full hostname of the mirror.
12 : ${MIRRORNAME=`hostname -f`}
13
14 ## Destination of the mirrored files. Should be an empty directory.
15 ## CAREFUL, this directory will contain the mirror. Everything else that
16 ## might have happened to be in there WILL BE GONE after the mirror sync!
17 : ${LABEL="debian"}
18 : ${TO="$MIRRORS/$LABEL/"}
19
20 ## The upstream name of the rsync share.
21 : ${RSYNC_PATH="$LABEL"}
22
23 ## The host we mirror from
24 : ${RSYNC_HOST=ftp.uk.debian.org}
25
26 ## In case we need a user to access the rsync share at our upstream host
27 : ${RSYNC_USER=}
28
29 ## If we need a user we also need a password
30 : ${RSYNC_PASSWORD=}
31
32 ## Architectures we want to carry.
33 : ${WANT_ARCH="i386:amd64:armel"}
34
35 ## Distributions to inspect for available architectures.
36 : ${SEARCH_DISTS="oldstable stable testing unstable experimental"}
37
38 ###--------------------------------------------------------------------------
39 ### Common settings.
40
41 ## In which directory should logfiles end up
42 ## Note that BASEDIR defaults to $HOME, but can be set before calling the
43 ## ftpsync script to any value you want (for example using pam_env)
44 #LOGDIR="${BASEDIR}/log"
45
46 ## Name of our own logfile.
47 ## Note that ${NAME} is set by the ftpsync script depending on the way it
48 ## is called. See README for a description of the multi-archive capability
49 ## and better always include ${NAME} in this path.
50 #LOG="${LOGDIR}/${NAME}.log"
51
52 ## The script can send logs (or error messages) to a mail address.
53 ## If this is unset it will default to the local root user unless it is run
54 ## on a .debian.org machine where it will default to the mirroradm people.
55 #MAILTO="root"
56
57 ## If you do want a mail about every single sync, set this to false
58 ## Everything else will only send mails if a mirror sync fails
59 #ERRORSONLY="true"
60
61 ## If you want the logs to also include output of rsync, set this to true.
62 ## Careful, the logs can get pretty big, especially if it is the first mirror
63 ## run
64 #FULLLOGS="false"
65
66 ## If you do want to exclude files from the mirror run, put --exclude
67 ## statements here. See rsync(1) for the exact syntax, these are passed to
68 ## rsync as written here. DO NOT TRY TO EXCLUDE ARCHITECTURES OR SUITES WITH
69 ## THIS, IT WILL NOT WORK!
70 #EXCLUDE=""
71
72 ## If you do want to exclude an architecture, this is for you.
73 ## Use as space seperated list.
74 ## Possible values are:
75 ## alpha, amd64, arm, armel, hppa, hurd-i386, i386, ia64, kfreebsd-amd64,
76 ## kfreebsd-i386, m68k, mipsel, mips, powerpc, s390, sh, sparc and source
77 ## eg. ARCH_EXCLUDE="alpha arm armel mipsel mips s390 sparc"
78 ## An unset value will mirror all architectures (default!)
79 #ARCH_EXCLUDE=""
80
81 ## Actually, no: we want to /include/ only some architectures. So we need to
82 ## find out which ones are available so that we can exclude the ones we don't
83 ## want. Crazy, no?
84 ARCH_EXCLUDE=$(
85 bin/debian-excludes $RSYNC_HOST $RSYNC_PATH $WANT_ARCH $SEARCH_DISTS
86 )
87
88 ## Do we have leaf mirror to signal we are done and they should sync?
89 ## If so set it to true and make sure you configure runmirrors.mirrors
90 ## and runmirrors.conf for your need.
91 #HUB=false
92
93 ## We do create three logfiles for every run. To save space we rotate them,
94 ## this defines how many we keep
95 #LOGROTATE=14
96
97 ## Our own lockfile (only one sync should run at any time)
98 #LOCK="${TO}/Archive-Update-in-Progress-${MIRRORNAME}"
99
100 ## Timeout for the lockfile, in case we have bash older than v4 (and no
101 ## /proc)
102 # LOCKTIMEOUT=${LOCKTIMEOUT:-3600}
103
104 ## The following file is used to make sure we will end up with a correctly
105 ## synced mirror even if we get multiple pushes in a short timeframe
106 #UPDATEREQUIRED="${TO}/Archive-Update-Required-${MIRRORNAME}"
107
108 ## The trace file is used by a mirror check tool to see when we last had a
109 ## successful mirror sync. Make sure that it always ends up in project/trace
110 ## and always shows the full hostname. This is *relative* to ${TO}
111 #TRACE="project/trace/${MIRRORNAME}"
112
113 ## We sync our mirror using rsync (everything else would be insane), so
114 ## we need a few options set.
115 ## The rsync program
116 : ${RSYNC="rsync"}
117
118 ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
119 ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
120 ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
121 ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
122
123 ## limit I/O bandwidth. Value is KBytes per second, unset or 0 means
124 ## unlimited
125 #RSYNC_BW=""
126
127 ## Default rsync options every rsync invocation sees.
128 #RSYNC_OPTIONS="-prltvHSB8192 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${MIRRORNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${MIRRORNAME}"
129
130 ## Options the first pass gets. We do not want the Packages/Source indices
131 ## here, and we also do not want to delete any files yet.
132 #RSYNC_OPTIONS1="--exclude Packages* --exclude Sources* --exclude Release* --exclude InRelease --exclude ls-lR*"
133
134 ## Options the second pass gets. Now we want the Packages/Source indices too
135 ## and we also want to delete files. We also want to delete files that are
136 ## excluded.
137 #RSYNC_OPTIONS2="--max-delete=40000 --delay-updates --delete --delete-after --delete-excluded"
138
139 ## You may establish the connection via a web proxy by setting the
140 ## environment variable RSYNC_PROXY to a hostname:port pair pointing to your
141 ## web proxy. Note that your web proxy's configuration must support proxy
142 ## connections to port 873.
143 # RSYNC_PROXY=
144
145 ## The following three options are used in case we want to "callback" the
146 ## host we got pushed from.
147 #CALLBACKUSER="archvsync"
148 #CALLBACKHOST="none"
149 #CALLBACKKEY="none"
150
151 ## Hook scripts can be run at various places during the sync.
152 ## Leave them blank if you don't want any
153 ## Hook1: After lock is acquired, before first rsync
154 ## Hook2: After first rsync, if successful
155 ## Hook3: After second rsync, if successful
156 ## Hook4: Right before leaf mirror triggering
157 ## Hook5: After leaf mirror trigger, only if we have slave mirrors (HUB=true)
158 ##
159 ## Note that Hook3 and Hook4 are likely to be called directly after each
160 ## other. Difference is: Hook3 is called *every* time the second rsync was
161 ## successful, but even if the mirroring needs to re-run thanks to a second
162 ## push. Hook4 is only effective if we are done with mirroring.
163 #HOOK1=
164 #HOOK2=
165 #HOOK3=
166 #HOOK4=
167 #HOOK5=