aboutsummaryrefslogtreecommitdiffstats
path: root/main/curl/APKBUILD
blob: 6727620332559917afddfd31b56bdf7b5585fb56 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
# Contributor: Sergey Lukin <sergej.lukin@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=curl
pkgver=7.55.0
pkgrel=1
pkgdesc="An URL retrival utility and library"
url="http://curl.haxx.se"
arch="all"
license="MIT"
depends="ca-certificates"
depends_dev="zlib-dev openssl-dev libssh2-dev"
makedepends="groff $depends_dev perl"
subpackages="$pkgname-doc $pkgname-dev"
source="http://curl.haxx.se/download/curl-$pkgver.tar.bz2
	curl-do-bounds-check-using-a-double-comparison.patch
	CVE-2017-1000254.patch
	"

_builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   7.55.0-r1:
#     - CVE-2017-1000254
#   7.55.0-r0:
#     - CVE-2017-1000099
#     - CVE-2017-1000100
#     - CVE-2017-1000101
#   7.52.1-r1:
#     - CVE-2017-7468
#     - CVE-2017-7407
#     - CVE-2017-2629
#   7.52.1-r0:
#     - CVE-2016-9594
#     - CVE-2016-9586
#     - CVE-2016-9952
#     - CVE-2016-9953
#   7.49.1-r4:
#     - CVE-2016-8615
#     - CVE-2016-8616
#     - CVE-2016-8617
#     - CVE-2016-8618
#     - CVE-2016-8619
#     - CVE-2016-8620
#     - CVE-2016-8621
#     - CVE-2016-8622
#     - CVE-2016-8623
#     - CVE-2016-8624
#   7.49.1-r3:
#     - CVE-2016-7167
#   7.49.1-r2:
#     - CVE-2016-7141
#   7.49.1-r1:
#     - CVE-2016-5419
#     - CVE-2016-5420
#     - CVE-2016-5421

prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"

	# see https://curl.haxx.se/mail/lib-2017-08/0050.html
	rm docs/libcurl/opts/CURLOPT_STRIP_PATH_SLASH.3

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--without-libidn \
		--enable-ipv6 \
		--enable-unix-sockets \
		--disable-ldap \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

md5sums="90cd4d6b20fa7655d2b75efe09fd7bfe  curl-7.55.0.tar.bz2
feda61a45b36819f4fd5c7a6fadeaf8c  curl-do-bounds-check-using-a-double-comparison.patch
2e67e36a5b8582ce5fed4e56811aa55e  CVE-2017-1000254.patch"
sha256sums="af1d69ec6f15fe70a2cabaa98309732bf035ef2a735e4e1a3e08754d2780e5b1  curl-7.55.0.tar.bz2
de1bc7dfc6bad0f67743e4a0e5707458e7607cbacf61de51eaeb597cd07710d7  curl-do-bounds-check-using-a-double-comparison.patch
b6c62ea72cd02e7d35280fad8b77007be4f8527debd1f8a6b201a8b00ed1359c  CVE-2017-1000254.patch"
sha512sums="4975864621219e937585aaf5a9a54bba112b58bbf5a8acd92e1e972ea747a15a5564143548c5d8930b8c0d0e9d27d28225d0c81e52a1ba71e4c6f9e3859c978b  curl-7.55.0.tar.bz2
d0f102fdbc2174169b2fea9248c3187d8c546d3a788447769dceec5fb7e063adbebbc967b88d208af1355cfda600f837abdae6d2e057a096eededc1857d2b8d3  curl-do-bounds-check-using-a-double-comparison.patch
9ffb77d823eed786ed2dc03ab01948761e754ed74be3dde8d8fac7f3ec77f997826f5908a45d042c359d16d2ce300612ea694f89f46c995825733272ae7d0326  CVE-2017-1000254.patch"