aboutsummaryrefslogtreecommitdiffstats
path: root/main/libarchive/APKBUILD
blob: 14b0ad1dd5af517ca5ed7d980e237863a71ba667 (plain)
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
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libarchive
pkgver=3.3.3
pkgrel=2
pkgdesc="library that can create and read several streaming archive formats"
url="http://libarchive.org/"
arch="all"
license="BSD"
makedepends="zlib-dev bzip2-dev xz-dev lz4-dev acl-dev openssl-dev expat-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="http://www.libarchive.org/downloads/$pkgname-$pkgver.tar.gz
	CVE-2019-18408.patch::https://github.com/libarchive/libarchive/commit/b8592ecba2f9e451e1f5cb7ab6dcee8b8e7b3f60.patch
	CVE-2020-19221.patch::https://github.com/libarchive/libarchive/commit/22b1db9d46654afc6f0c28f90af8cdc84a199f41.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   3.3.3-r2:
#     - CVE-2020-19221
#   3.3.3-r1:
#     - CVE-2019-18408
#   3.3.3-r0:
#     - CVE-2017-14501
#     - CVE-2017-14502
#     - CVE-2017-14503
#   3.3.2-r1:
#     - CVE-2017-14166

build () {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--without-xml2
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="libarchive tools bsdtar and bsdcpio"

	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="9d12b47d6976efa9f98e62c25d8b85fd745d4e9ca7b7e6d36bfe095dfe5c4db017d4e785d110f3758f5938dad6f1a1b009267fd7e82cb7212e93e1aea237bab7  libarchive-3.3.3.tar.gz
4807e01dffb83ff4ef430c66339157e9f7a61db4fc5cec2812c3ee5ad130b4fc2d3c1cbeea87930c76cd8ec3e66272e20622a48edf0c66215b626c4e0db99cab  CVE-2019-18408.patch
5ffd3838b3ddbbae5613bf2a75583dd513942b804cd8fed11d24d38adc9c81d7fa739b94cc2d9d0621a93909f4b7b4ec2632cdd8e3e66c1ffd89440e5e3168de  CVE-2020-19221.patch"