aboutsummaryrefslogtreecommitdiffstats
path: root/main/libarchive/APKBUILD
blob: 2afb869588dbd6add69aa901d259241d43aec1fa (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
# 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="https://libarchive.org/"
arch="all"
license="BSD-2-Clause BSD-3-Clause Apache-2.0"
makedepends="acl-dev bzip2-dev expat-dev lz4-dev openssl-dev xz-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://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.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"