summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/ca-certificates
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2013-03-19 19:32:29 +0000
committerMartin Jansa <Martin.Jansa@gmail.com>2013-03-21 22:01:08 +0100
commit6a9359a4a6875cd18dfe4997b7e1e6876a0f0c20 (patch)
tree6e144899cdb7d8b85c14b7a5c596ac4ced0d27ec /meta-oe/recipes-support/ca-certificates
parent8a1c0ebb3d9447228fef5ec6de4077991b73edc4 (diff)
downloadmeta-openembedded-6a9359a4a6875cd18dfe4997b7e1e6876a0f0c20.tar.gz
ca-certificates: support running update-ca-certificates during do_rootfs
Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/ca-certificates')
-rw-r--r--meta-oe/recipes-support/ca-certificates/ca-certificates-20130119.inc15
-rw-r--r--meta-oe/recipes-support/ca-certificates/ca-certificates-cross_20130119.bb12
-rw-r--r--meta-oe/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch56
-rw-r--r--meta-oe/recipes-support/ca-certificates/ca-certificates_20130119.bb20
4 files changed, 87 insertions, 16 deletions
diff --git a/meta-oe/recipes-support/ca-certificates/ca-certificates-20130119.inc b/meta-oe/recipes-support/ca-certificates/ca-certificates-20130119.inc
new file mode 100644
index 000000000..ac993bc3c
--- /dev/null
+++ b/meta-oe/recipes-support/ca-certificates/ca-certificates-20130119.inc
@@ -0,0 +1,15 @@
1DESCRIPTION = "Common CA certificates"
2HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
3SECTION = "misc"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://debian/copyright;md5=6135800ff6d893c7904d7aad90972eb5"
6PR = "r1"
7
8SRC_URI = "${DEBIAN_MIRROR}/main/c/ca-certificates/ca-certificates_${PV}.tar.gz \
9 file://0001-update-ca-certificates-remove-c-rehash.patch \
10 file://0002-update-ca-certificates-use-SYSROOT.patch"
11
12SRC_URI[md5sum] = "1fbbec2028a33cf865b79c204aa2e626"
13SRC_URI[sha256sum] = "fb51ec9a2c551838cc1646a0b3c9e6bea5c1bb20ff5d71c542451fac4b191c22"
14
15inherit allarch
diff --git a/meta-oe/recipes-support/ca-certificates/ca-certificates-cross_20130119.bb b/meta-oe/recipes-support/ca-certificates/ca-certificates-cross_20130119.bb
new file mode 100644
index 000000000..8e344fd78
--- /dev/null
+++ b/meta-oe/recipes-support/ca-certificates/ca-certificates-cross_20130119.bb
@@ -0,0 +1,12 @@
1require ca-certificates-${PV}.inc
2
3do_install() {
4 install -d ${D}${bindir_crossscripts}
5 install -m755 ${S}/sbin/update-ca-certificates ${D}${bindir_crossscripts}
6}
7
8SYSROOT_PREPROCESS_FUNCS += "ca_certificates_sysroot_preprocess"
9
10ca_certificates_sysroot_preprocess() {
11 sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
12}
diff --git a/meta-oe/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch b/meta-oe/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch
new file mode 100644
index 000000000..689fdd90b
--- /dev/null
+++ b/meta-oe/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch
@@ -0,0 +1,56 @@
1Upstream-Status: Pending
2
3From 724cb153ca0f607fb38b3a8db3ebb2742601cd81 Mon Sep 17 00:00:00 2001
4From: Andreas Oberritter <obi@opendreambox.org>
5Date: Tue, 19 Mar 2013 17:14:33 +0100
6Subject: [PATCH 2/2] update-ca-certificates: use $SYSROOT
7
8Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
9---
10 sbin/update-ca-certificates | 14 +++++++-------
11 1 file changed, 7 insertions(+), 7 deletions(-)
12
13diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
14index c567e3d..923b68a 100755
15--- a/sbin/update-ca-certificates
16+++ b/sbin/update-ca-certificates
17@@ -37,11 +37,11 @@ do
18 shift
19 done
20
21-CERTSCONF=/etc/ca-certificates.conf
22-CERTSDIR=/usr/share/ca-certificates
23-LOCALCERTSDIR=/usr/local/share/ca-certificates
24+CERTSCONF=$SYSROOT/etc/ca-certificates.conf
25+CERTSDIR=$SYSROOT/usr/share/ca-certificates
26+LOCALCERTSDIR=$SYSROOT/usr/local/share/ca-certificates
27 CERTBUNDLE=ca-certificates.crt
28-ETCCERTSDIR=/etc/ssl/certs
29+ETCCERTSDIR=$SYSROOT/etc/ssl/certs
30
31 cleanup() {
32 rm -f "$TEMPBUNDLE"
33@@ -64,9 +64,9 @@ add() {
34 PEM="$ETCCERTSDIR/$(basename "$CERT" .crt | sed -e 's/ /_/g' \
35 -e 's/[()]/=/g' \
36 -e 's/,/_/g').pem"
37- if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ]
38+ if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "${CERT##$SYSROOT}" ]
39 then
40- ln -sf "$CERT" "$PEM"
41+ ln -sf "${CERT##$SYSROOT}" "$PEM"
42 echo +$PEM >> "$ADDED"
43 fi
44 cat "$CERT" >> "$TEMPBUNDLE"
45@@ -148,7 +148,7 @@ mv -f "$TEMPBUNDLE" "$CERTBUNDLE"
46
47 echo "$ADDED_CNT added, $REMOVED_CNT removed; done."
48
49-HOOKSDIR=/etc/ca-certificates/update.d
50+HOOKSDIR=$SYSROOT/etc/ca-certificates/update.d
51 echo -n "Running hooks in $HOOKSDIR...."
52 VERBOSE_ARG=
53 [ "$verbose" = 0 ] || VERBOSE_ARG=--verbose
54--
551.7.10.4
56
diff --git a/meta-oe/recipes-support/ca-certificates/ca-certificates_20130119.bb b/meta-oe/recipes-support/ca-certificates/ca-certificates_20130119.bb
index 5ad4485a0..a1eb1c478 100644
--- a/meta-oe/recipes-support/ca-certificates/ca-certificates_20130119.bb
+++ b/meta-oe/recipes-support/ca-certificates/ca-certificates_20130119.bb
@@ -1,16 +1,8 @@
1DESCRIPTION = "Common CA certificates" 1DEPENDS = "ca-certificates-cross"
2HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
3SECTION = "misc"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://debian/copyright;md5=6135800ff6d893c7904d7aad90972eb5"
6 2
7SRC_URI = "${DEBIAN_MIRROR}/main/c/ca-certificates/ca-certificates_${PV}.tar.gz \ 3require ca-certificates-${PV}.inc
8 file://0001-update-ca-certificates-remove-c-rehash.patch"
9 4
10SRC_URI[md5sum] = "1fbbec2028a33cf865b79c204aa2e626" 5inherit autotools
11SRC_URI[sha256sum] = "fb51ec9a2c551838cc1646a0b3c9e6bea5c1bb20ff5d71c542451fac4b191c22"
12
13inherit autotools allarch
14 6
15do_install_prepend() { 7do_install_prepend() {
16 mkdir -p ${D}/usr/share/ca-certificates 8 mkdir -p ${D}/usr/share/ca-certificates
@@ -32,11 +24,7 @@ do_install_append() {
32} 24}
33 25
34pkg_postinst_${PN} () { 26pkg_postinst_${PN} () {
35if [ -n "$D" ] ; then 27SYSROOT="$D" update-ca-certificates
36 exit 1
37fi
38
39${sbindir}/update-ca-certificates
40} 28}
41 29
42CONFFILES_${PN} = "/etc/ca-certificates.conf" 30CONFFILES_${PN} = "/etc/ca-certificates.conf"