bin/run-mirrors: Run post scripts after mirror jobs.
[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.de.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"}
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 echo source
87 )
88
89 ## Do we have leaf mirror to signal we are done and they should sync?
90 ## If so set it to true and make sure you configure runmirrors.mirrors
91 ## and runmirrors.conf for your need.
92 #HUB=false
93
94 ## We do create three logfiles for every run. To save space we rotate them,
95 ## this defines how many we keep
96 #LOGROTATE=14
97
98 ## Our own lockfile (only one sync should run at any time)
99 #LOCK="${TO}/Archive-Update-in-Progress-${MIRRORNAME}"
100
101 ## Timeout for the lockfile, in case we have bash older than v4 (and no
102 ## /proc)
103 # LOCKTIMEOUT=${LOCKTIMEOUT:-3600}
104
105 ## The following file is used to make sure we will end up with a correctly
106 ## synced mirror even if we get multiple pushes in a short timeframe
107 #UPDATEREQUIRED="${TO}/Archive-Update-Required-${MIRRORNAME}"
108
109 ## The trace file is used by a mirror check tool to see when we last had a
110 ## successful mirror sync. Make sure that it always ends up in project/trace
111 ## and always shows the full hostname. This is *relative* to ${TO}
112 #TRACE="project/trace/${MIRRORNAME}"
113
114 ## We sync our mirror using rsync (everything else would be insane), so
115 ## we need a few options set.
116 ## The rsync program
117 : ${RSYNC="rsync"}
118
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 ## BE VERY CAREFUL WHEN YOU CHANGE THE RSYNC_OPTIONS! BETTER DON'T!
123
124 ## limit I/O bandwidth. Value is KBytes per second, unset or 0 means
125 ## unlimited
126 #RSYNC_BW=""
127
128 ## Default rsync options every rsync invocation sees.
129 #RSYNC_OPTIONS="-prltvHSB8192 --timeout 3600 --stats --exclude Archive-Update-in-Progress-${MIRRORNAME} --exclude ${TRACE} --exclude Archive-Update-Required-${MIRRORNAME}"
130
131 ## Options the first pass gets. We do not want the Packages/Source indices
132 ## here, and we also do not want to delete any files yet.
133 #RSYNC_OPTIONS1="--exclude Packages* --exclude Sources* --exclude Release* --exclude InRelease --exclude ls-lR*"
134
135 ## Options the second pass gets. Now we want the Packages/Source indices too
136 ## and we also want to delete files. We also want to delete files that are
137 ## excluded.
138 #RSYNC_OPTIONS2="--max-delete=40000 --delay-updates --delete --delete-after --delete-excluded"
139
140 ## You may establish the connection via a web proxy by setting the
141 ## environment variable RSYNC_PROXY to a hostname:port pair pointing to your
142 ## web proxy. Note that your web proxy's configuration must support proxy
143 ## connections to port 873.
144 # RSYNC_PROXY=
145
146 ## The following three options are used in case we want to "callback" the
147 ## host we got pushed from.
148 #CALLBACKUSER="archvsync"
149 #CALLBACKHOST="none"
150 #CALLBACKKEY="none"
151
152 ## Hook scripts can be run at various places during the sync.
153 ## Leave them blank if you don't want any
154 ## Hook1: After lock is acquired, before first rsync
155 ## Hook2: After first rsync, if successful
156 ## Hook3: After second rsync, if successful
157 ## Hook4: Right before leaf mirror triggering
158 ## Hook5: After leaf mirror trigger, only if we have slave mirrors (HUB=true)
159 ##
160 ## Note that Hook3 and Hook4 are likely to be called directly after each
161 ## other. Difference is: Hook3 is called *every* time the second rsync was
162 ## successful, but even if the mirroring needs to re-run thanks to a second
163 ## push. Hook4 is only effective if we are done with mirroring.
164 #HOOK1=
165 #HOOK2=
166 #HOOK3=
167 #HOOK4=
168 #HOOK5=