Repository navigation
Expand file tree
/
Copy pathTaskfile.yml
More file actions
62 lines (60 loc) · 3.27 KB
/
Copy pathTaskfile.yml
File metadata and controls
62 lines (60 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This mirror keeps a copy of GNU's release tree, ftp.gnu.org/gnu, in a Cloudflare R2
# bucket. Twice a day, a run compares the listing of ftp.gnu.org with the state that the
# last run put in the bucket (a list diff).
#
# The toolbox and the rsync engine are from katoptra/lib. Its README shows the items that
# each one supplies. This file includes them below the vars, at v2, with `flatten: true`.
#
# The values in this file are for this mirror only:
# - SOURCE, HOST and BUCKET identify the mirror.
# - CEILING_GB and LIST_FLOOR are the limits for a run.
# - INDEX and PAGE_FOOT are for the directory pages.
# - CANARY and FRESH_KEY are for the checks at the end of each run. The engine also sends
# the FRESH_KEY file to the bucket last.
# - NAME and DESC are for the menu.
#
# The secrets are the names in op.env. The toolbox gets their values from the vault in
# 1Password. It gives each value to the image with its name, not on a command line.
version: '3'
vars:
# SOURCE is ftp.gnu.org, the primary site of GNU. A secondary mirror gets a change
# approximately 2 h after ftp.gnu.org.
SOURCE: rsync://ftp.gnu.org/gnu/
HOST: gnu.katoptra.org # A fork changes this line and the address in PAGE_FOOT.
# BUCKET is the name of the bucket. The objects are at its root, and their keys are GNU's
# paths.
BUCKET: gnu
# If upstream has more than this number of decimal GB, the run stops with an error.
# Upstream had approximately 275 GB in September 2026.
CEILING_GB: 350
# A listing must have more lines than this value, or it is a truncated listing. The tree
# has approximately 43,850 files.
LIST_FLOOR: 40000
# INDEX is the key suffix of the directory pages. The rsync mirrors of katoptra use one
# name, and the Transform Rules of the zone use it for their hosts. If an upstream file has
# this name, the bucket keeps the page, not the file.
INDEX: katoptra.org.directory.index.html
# INDEX_FILES are the upstream index files, in sequence. The page key of a directory with
# such a file is a copy of that file. Thus, the URL of that directory serves the file.
INDEX_FILES: index.html index.htm
# PAGE_FOOT is the last line of each directory page. In GNU's mirror guidelines, text
# must be short and "strictly explanatory". The only link that is permitted is a link for
# bug reports. That link is an email address, which must receive mail.
PAGE_FOOT: 'A mirror of https://ftp.gnu.org/gnu/, updated twice a day. Sizes in bytes, times as upstream lists them. Report a problem to <a href="mailto:gnu@katoptra.org">gnu@katoptra.org</a>.'
# CANARY is a file with 8 http:// links. If the zone uses an HTML rewriter, the rewriter
# can change these links.
CANARY: aspell/dict/0index.html
# FRESH_KEY is the file with ftp.gnu.org's clock, in Unix time. If that time is more than
# 24 h before the check, the run stops with an error. The engine also sends this file to
# the bucket last.
FRESH_KEY: mirror-updated-timestamp.txt
includes:
toolbox:
taskfile: https://raw.githubusercontent.com/katoptra/lib/v2/toolbox.yml
flatten: true
vars:
NAME: gnu
DESC: a twice-daily mirror of ftp.gnu.org/gnu, from {{.SOURCE}}, at https://{{.HOST}}/
rsync:
taskfile: https://raw.githubusercontent.com/katoptra/lib/v2/engines/rsync.yml
flatten: true