aboutsummaryrefslogtreecommitdiffstats
path: root/main/rsync/APKBUILD
blob: 144eff8bd111655a29c53751833450e5caba8ba4 (plain) (blame)
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
63
64
65
66
67
68
69
70
71
72
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=rsync
pkgver=3.1.3
pkgrel=3
pkgdesc="A file transfer program to keep remote files in sync"
url="https://rsync.samba.org/"
arch="all"
license="GPL-3.0-or-later"
makedepends="perl acl-dev attr-dev popt-dev zlib-dev"
subpackages="$pkgname-doc $pkgname-openrc rrsync"
source="https://download.samba.org/pub/rsync/rsync-$pkgver.tar.gz
	rsyncd.initd
	rsyncd.confd
	rsyncd.conf
	rsyncd.logrotate
	"

# secfixes:
#   3.1.2-r7:
#     - CVE-2017-16548
#     - CVE-2017-17433
#     - CVE-2017-17434

# delete the itemize test because it is flawed and depends on filesystem-specific behavior
prepare() {
	default_prepare
	rm testsuite/itemize.test
}

build() {
	# Force IPv6 enabled, upstream bug https://bugzilla.samba.org/show_bug.cgi?id=10715
	CFLAGS="$CFLAGS -DINET6" \

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-acl-support \
		--enable-xattr-support
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm755 "$srcdir"/rsyncd.initd "$pkgdir"/etc/init.d/rsyncd
	install -Dm644 "$srcdir"/rsyncd.conf "$pkgdir"/etc/rsyncd.conf
	install -Dm644 "$srcdir"/rsyncd.confd "$pkgdir"/etc/conf.d/rsyncd
	install -Dm644 "$srcdir"/rsyncd.logrotate "$pkgdir"/etc/logrotate.d/rsyncd
}

rrsync() {
	pkgdesc="Restricted rsync, restricts rsync to a subdir declared in .ssh/authorized_keys"
	depends="rsync perl"
	arch="noarch"

	cd "$builddir"
	install -D -m 755 ./support/rrsync "$subpkgdir"/usr/bin/rrsync
}

sha512sums="8385f4c0ea37e7a1da3cf45794154f5bc4d1c49bc625ba3b5f85adaf3eafe6d71c15bdcb1410bde731e5d4c19aff3331606637462fa27a68dc3e13192dd78f99  rsync-3.1.3.tar.gz
a970a1a991df32ea28678791d6599f3302e32e2c5c53f44fae567c191db7951bc07e4001f34864fec63e0005dcaa5dc939e77edf652481ff8820e7f422895dfb  rsyncd.initd
94308fa7c0f80156d0863a446ec4630afeafed7b458c6c83e93aba41192327d113b712cde875ce2967bc98cd8fb6a9ebc57841d58ae9759aa232643fb72fb005  rsyncd.confd
3db8a2b364fc89132af6143af90513deb6be3a78c8180d47c969e33cb5edde9db88aad27758a6911f93781e3c9846aeadc80fffc761c355d6a28358853156b62  rsyncd.conf
b8d6c0bb467a5c963317dc55478d2c10874564cd264d943d4a42037e2fce134fe001fabc92af5c6b5775e84dc310b1c8da147afaa61c99e5663c36580d8651a5  rsyncd.logrotate"