blob: 261c8859ab883fd43de9ae4615a65988cc11555e (
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
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
101
102
103
104
105
106
107
108
109
110
111
112
|
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
pkgname=sqlite
pkgver=3.25.3
pkgrel=4
pkgdesc="C library that implements an SQL database engine"
url="http://www.sqlite.org"
arch="all"
options=""
license="Public-Domain"
depends=""
makedepends="readline-dev"
subpackages="$pkgname-doc $pkgname-dev $pkgname-libs"
# compute _ver
_a=${pkgver%%.*}
_b=${pkgver#${_a}.}
_b=${_b%%.*}
_c=${pkgver#${_a}.${_b}.}
_c=${_c%%.*}
case $pkgver in
*.*.*.*)_d=${pkgver##*.};;
*.*.*) _d=0;;
esac
[ $_b -lt 10 ] && _b=0$_b
[ $_c -lt 10 ] && _c=0$_c
[ $_d -lt 10 ] && _d=0$_d
_ver=${_a}${_b}${_c}${_d}
# these variables depend on _ver being set
builddir="$srcdir/$pkgname-autoconf-$_ver"
source="http://www.sqlite.org/2018/$pkgname-autoconf-$_ver.tar.gz
license.txt
CVE-2019-8457.patch
CVE-2019-16168.patch
CVE-2019-19242.patch
CVE-2019-19244.patch
CVE-2020-11655.patch
"
# secfixes:
# 3.25.0-r4:
# - CVE-2020-11655
# 3.25.3-r3:
# - CVE-2019-19242
# - CVE-2019-19242
# 3.25.3-r2:
# - CVE-2018-20346
# 3.25.3-r1:
# - CVE-2019-8457
# 3.25.3-r0:
# - CVE-2018-20346
# additional CFLAGS to set
_amalgamation="-DSQLITE_ENABLE_FTS4 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS \
-DSQLITE_ENABLE_FTS5 \
-DSQLITE_ENABLE_COLUMN_METADATA \
-DSQLITE_SECURE_DELETE \
-DSQLITE_ENABLE_UNLOCK_NOTIFY \
-DSQLITE_ENABLE_RTREE \
-DSQLITE_USE_URI \
-DSQLITE_ENABLE_DBSTAT_VTAB \
-DSQLITE_MAX_VARIABLE_NUMBER=250000 \
-DSQLITE_ENABLE_JSON1"
build() {
cd "$builddir"
export CFLAGS="$CFLAGS $_amalgamation"
./configure \
--build="$CBUILD" \
--host="$CHOST" \
--prefix=/usr \
--enable-threadsafe \
--disable-static \
--enable-readline \
--enable-dynamic-extensions
# rpath removal
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make
}
package() {
cd "$builddir"
make -j1 DESTDIR="$pkgdir" install
install -Dm0644 sqlite3.1 \
"$pkgdir"/usr/share/man/man1/sqlite3.1
install -Dm644 "$srcdir"/license.txt \
"$pkgdir"/usr/share/licenses/$pkgname/license.txt
}
libs() {
replaces="sqlite"
pkgdesc="Sqlite3 library"
mkdir -p "$subpkgdir"/usr
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}
sha512sums="5bc501d15367e097f4070185974b0c3a8246c06b205fb2258ed18870ff3fbf120ac5e0ba031a6744af89f7659206e28e7de2f0367bdb190b8412e453b43de4ba sqlite-autoconf-3250300.tar.gz
5bde14bec5bf18cc686b8b90a8b2324c8c6600bca1ae56431a795bb34b8b5ae85527143f3b5f0c845c776bce60eaa537624104cefc3a47b3820d43083f40c6e9 license.txt
ab795b18d5426ff9ccad20f413de4f46fce7b532ebbf72dfbafc7db2d2e46453541abe992535c7aea598ec69c8557b477008e58299e3426afd2e8ab458c859e4 CVE-2019-8457.patch
19eb036e0d03543127a9ed67155522952cb7f3ce9da81ee49fba14a1c0bfc2cd0c86acab1b47b794043cac033959d861dce7ec97fca2293cb146a7ee1b83b8fa CVE-2019-16168.patch
7fc69d4d9f38b1142d86d3061a4d0168c3eebda5771e07d71a127121d7770f436e361f3e1f11f9a037b2ce9687092c9e2c808719e6b45125b9d953c636f3f6ec CVE-2019-19242.patch
e7982014a62b4fa465918fd65384cec406ea09598f3e0511eb2b68f618983b2f29a932267397aff9b88b97367dc8e05c4074fa8e276e3f4294ac019df498a724 CVE-2019-19244.patch
c9d9f440543fa59fb4cb75d069b69adcccfdeb1c31bc9bd8d2f27b178013ea72934f6301d3df28e37a67cb6dbc38b2fc7bf87bacd93d756a62f3bf59a52ab3f2 CVE-2020-11655.patch"
|