diff options
Diffstat (limited to 'meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch')
-rw-r--r-- | meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch b/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch new file mode 100644 index 0000000000..7e0ee4cd24 --- /dev/null +++ b/meta/recipes-support/ca-certificates/ca-certificates/default-sysroot.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | update-ca-certificates: find SYSROOT relative to its own location | ||
4 | |||
5 | This makes the script relocatable. | ||
6 | |||
7 | --- ca-certificates-20130119.orig/sbin/update-ca-certificates | ||
8 | +++ ca-certificates-20130119/sbin/update-ca-certificates | ||
9 | @@ -37,11 +37,44 @@ do | ||
10 | shift | ||
11 | done | ||
12 | |||
13 | -CERTSCONF=$SYSROOT/etc/ca-certificates.conf | ||
14 | +if [ -z "$SYSROOT" ]; then | ||
15 | + local_which () { | ||
16 | + if [ $# -lt 1 ]; then | ||
17 | + return 1 | ||
18 | + fi | ||
19 | + | ||
20 | + ( | ||
21 | + IFS=: | ||
22 | + for entry in $PATH; do | ||
23 | + if [ -x "$entry/$1" ]; then | ||
24 | + echo "$entry/$1" | ||
25 | + exit 0 | ||
26 | + fi | ||
27 | + done | ||
28 | + exit 1 | ||
29 | + ) | ||
30 | + } | ||
31 | + | ||
32 | + case "$0" in | ||
33 | + */*) | ||
34 | + sbindir=$(cd ${0%/*} && pwd) | ||
35 | + ;; | ||
36 | + *) | ||
37 | + sbindir=$(cd $(dirname $(local_which $0)) && pwd) | ||
38 | + ;; | ||
39 | + esac | ||
40 | + prefix=${sbindir%/*} | ||
41 | + SYSROOT=${prefix%/*} | ||
42 | + if [ ! -d "$SYSROOT/usr/share/ca-certificates" ]; then | ||
43 | + SYSROOT= | ||
44 | + fi | ||
45 | +fi | ||
46 | + | ||
47 | CERTSDIR=$SYSROOT/usr/share/ca-certificates | ||
48 | +CERTSCONF=$SYSROOT/etc/ca-certificates.conf | ||
49 | +ETCCERTSDIR=$SYSROOT/etc/ssl/certs | ||
50 | LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates | ||
51 | CERTBUNDLE=ca-certificates.crt | ||
52 | -ETCCERTSDIR=$SYSROOT/etc/ssl/certs | ||
53 | |||
54 | cleanup() { | ||
55 | rm -f "$TEMPBUNDLE" | ||