@@ -19,6 +19,18 @@ job "build-rsyncd" {
1919 read_only = false
2020 }
2121
22+ volume "root_mirror" {
23+ type = " host"
24+ source = " root_mirror"
25+ read_only = false
26+ }
27+
28+ volume "incoming_pkgs" {
29+ type = " host"
30+ source = " incoming_pkgs"
31+ read_only = false
32+ }
33+
2234 service {
2335 provider = " nomad"
2436 name = " build-rsyncd"
@@ -29,8 +41,7 @@ job "build-rsyncd" {
2941 driver = " docker"
3042
3143 config {
32- image = " ghcr.io/void-linux/infra-rsync:20240709R1"
33- volumes = [ " local/buildsync.conf:/etc/rsyncd.conf.d/buildsync.conf" ]
44+ image = " ghcr.io/void-linux/infra-rsync:20251102R1"
3445 }
3546
3647 resources {
@@ -43,17 +54,26 @@ job "build-rsyncd" {
4354 destination = " /hostdir"
4455 }
4556
57+ volume_mount {
58+ volume = " root_mirror"
59+ destination = " /mirror"
60+ }
61+
62+ volume_mount {
63+ volume = " incoming_pkgs"
64+ destination = " /incoming"
65+ }
66+
4667 template {
47- data = file (" xbps-clean-sigs " )
48- destination = " local/xbps-clean-sigs "
68+ data = file (" rsync-post-xfer " )
69+ destination = " local/rsync-post-xfer "
4970 perms = " 0755"
5071 }
5172
5273 template {
5374 data = << EOF
5475{{- with nomadVar "nomad/jobs/buildsync" }}
55- buildsync-aarch64:{{ .aarch64_password }}
56- buildsync-musl:{{ .musl_password }}
76+ buildsync:{{ .password }}
5777{{- end }}
5878EOF
5979 destination = " secrets/buildsync.secrets"
@@ -75,21 +95,30 @@ incoming chmod = D0755,F0644
7595[sources]
7696path = /hostdir/sources
7797filter = - by_sha256/ - .* - *.part
78- auth users = buildsync-*:rw
79-
80- [aarch64]
81- path = /hostdir/binpkgs/aarch64
82- auth users = buildsync-aarch64:rw
83- filter = + */ + *-repodata + otime + *.xbps - *.sig - *.sig2 - *-repodata.* - *-stagedata.* - *.x86_64* - x86_64*-repodata - .*
84- post-xfer exec = /local/xbps-clean-sigs
85-
86- [musl]
87- path = /hostdir/binpkgs/musl
88- auth users = buildsync-musl:rw
89- filter = + */ + *-repodata + otime + *.xbps - *.sig - *.sig2 - *-repodata.* - *-stagedata.* - .*
90- post-xfer exec = /local/xbps-clean-sigs
98+ auth users = buildsync:rw
99+
100+ &merge /local/rsyncd.conf.d
101+ EOF
102+ destination = " local/rsyncd.conf.d/buildsync.conf"
103+ }
104+
105+ dynamic "template" {
106+ for_each = [
107+ " x86_64" , " i686" , " armv7l" , " armv6l" ,
108+ " x86_64-musl" , " armv7l-musl" , " armv6l-musl" ,
109+ " aarch64" , " aarch64-musl" ,
110+ ]
111+
112+ content {
113+ data = << EOF
114+ [incoming-${ template . value } ]
115+ path = /incoming/${ template . value }
116+ auth users = buildsync:rw
117+ filter = + */ + *.${ template . value } .xbps - *.sig - *.sig2 - *-repodata* - .*
118+ post-xfer exec = /local/rsync-post-xfer
91119EOF
92- destination = " local/buildsync.conf"
120+ destination = " local/rsyncd.conf.d/${ template . value } .conf.inc"
121+ }
93122 }
94123 }
95124 }
0 commit comments