77- [ Requirements] ( #requirements )
88- [ Quickstart] ( #quickstart )
99- [ Handbook] ( #handbook )
10+ - [ Troubleshooting] ( #troubleshooting )
11+ - [ Development] ( #development )
1012
1113Sync local repositories with remote.
1214
@@ -17,10 +19,14 @@ Sync local repositories with remote.
1719
1820## Quickstart
1921
20- Download the binaries from the [ Release] ( https://github.com/ustclug/Yuki/releases ) page, for example:
22+ Download the binaries from the [ Release] ( https://github.com/ustclug/Yuki/releases ) page. For example:
2123
2224``` bash
23- wget https://github.com/ustclug/Yuki/releases/download/v0.2.2/yuki-v0.2.2-linux-amd64.tar.gz
25+ wget https://github.com/ustclug/Yuki/releases/latest/download/yukictl_linux_amd64
26+ wget https://github.com/ustclug/Yuki/releases/latest/download/yukid_linux_amd64
27+
28+ sudo cp yukictl_linux_amd64 /usr/local/bin/yukictl
29+ sudo cp yukid_linux_amd64 /usr/local/bin/yukid
2430```
2531
2632Configure yukid:
4248Configure systemd service:
4349
4450``` bash
45- curl ' https://raw.githubusercontent.com/ustclug/Yuki/master /deploy/yukid.service' | sudo tee /etc/systemd/system/yukid.service
51+ curl ' https://raw.githubusercontent.com/ustclug/Yuki/main /deploy/yukid.service' | sudo tee /etc/systemd/system/yukid.service
4652systemctl enable yukid
4753systemctl start yukid
4854systemctl status yukid
@@ -52,14 +58,14 @@ Setup repository:
5258
5359``` bash
5460# The repository directory must be created in advance
55- mkdir /tmp/repos /docker-ce
61+ mkdir /tmp/repo-data /docker-ce
5662
5763# Sync docker-ce repository from rsync.mirrors.ustc.edu.cn
5864cat << EOF > /tmp/repo-configs/docker-ce.yaml
5965name: docker-ce
6066# every 1 hour
6167cron: "0 * * * *"
62- storageDir: /tmp/repos /docker-ce
68+ storageDir: /tmp/repo-data /docker-ce
6369image: ustcmirror/rsync:latest
6470logRotCycle: 2
6571envs:
@@ -101,3 +107,47 @@ sed -i.bak 's/interval/cron/' /path/to/repo/configs/*.yaml
101107For post sync hook, the environment variables that are passed to the hook script are changed:
102108* ` Dir ` -> ` DIR ` : the directory of the repository
103109* ` Name ` -> ` NAME ` : the name of the repository
110+
111+ ## Troubleshooting
112+
113+ ### version `GLIBC_2.XX' not found
114+
115+ You might encounter the following error when running yukid:
116+
117+ ```
118+ $ ./yukid -V
119+ ./yukid: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by ./yukid)
120+ ./yukid: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by ./yukid)
121+ ./yukid: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./yukid)
122+ ```
123+
124+ This is because ` yukid ` is complied with CGO enabled, which is required by https://github.com/mattn/go-sqlite3 .
125+ The version of glibc that is linked to ` yukid ` might differ from the actual one that exists on your current machine.
126+ You will need to compile ` yukid ` on your current machine or run ` yukid ` in container.
127+
128+ Tips:
129+ * To check your current glibc version:
130+ ```
131+ $ /lib/x86_64-linux-gnu/libc.so.6 | grep -i glibc
132+ ```
133+ * The docker images of ` yukid ` : https://github.com/ustclug/Yuki/pkgs/container/yukid
134+
135+ ## Development
136+
137+ * Build ` yukid ` :
138+
139+ ```
140+ make yukid
141+ ```
142+
143+ * Build ` yukictl ` :
144+
145+ ```
146+ make yukictl
147+ ```
148+
149+ * Lint the whole project:
150+
151+ ```
152+ make lint
153+ ```
0 commit comments