diff options
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 0000000000..ac993bc3ca --- /dev/null +++ b/meta-oe/recipes-support/ca-certificates/ca-certificates-20130119.inc | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | DESCRIPTION = "Common CA certificates" | ||
| 2 | HOMEPAGE = "http://packages.debian.org/sid/ca-certificates" | ||
| 3 | SECTION = "misc" | ||
| 4 | LICENSE = "GPLv2+" | ||
| 5 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=6135800ff6d893c7904d7aad90972eb5" | ||
| 6 | PR = "r1" | ||
| 7 | |||
| 8 | SRC_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 | |||
| 12 | SRC_URI[md5sum] = "1fbbec2028a33cf865b79c204aa2e626" | ||
| 13 | SRC_URI[sha256sum] = "fb51ec9a2c551838cc1646a0b3c9e6bea5c1bb20ff5d71c542451fac4b191c22" | ||
| 14 | |||
| 15 | inherit 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 0000000000..8e344fd78d --- /dev/null +++ b/meta-oe/recipes-support/ca-certificates/ca-certificates-cross_20130119.bb | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | require ca-certificates-${PV}.inc | ||
| 2 | |||
| 3 | do_install() { | ||
| 4 | install -d ${D}${bindir_crossscripts} | ||
| 5 | install -m755 ${S}/sbin/update-ca-certificates ${D}${bindir_crossscripts} | ||
| 6 | } | ||
| 7 | |||
| 8 | SYSROOT_PREPROCESS_FUNCS += "ca_certificates_sysroot_preprocess" | ||
| 9 | |||
| 10 | ca_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 0000000000..689fdd90b7 --- /dev/null +++ b/meta-oe/recipes-support/ca-certificates/ca-certificates/0002-update-ca-certificates-use-SYSROOT.patch | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | From 724cb153ca0f607fb38b3a8db3ebb2742601cd81 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: Andreas Oberritter <obi@opendreambox.org> | ||
| 5 | Date: Tue, 19 Mar 2013 17:14:33 +0100 | ||
| 6 | Subject: [PATCH 2/2] update-ca-certificates: use $SYSROOT | ||
| 7 | |||
| 8 | Signed-off-by: Andreas Oberritter <obi@opendreambox.org> | ||
| 9 | --- | ||
| 10 | sbin/update-ca-certificates | 14 +++++++------- | ||
| 11 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates | ||
| 14 | index 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 | -- | ||
| 55 | 1.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 5ad4485a00..a1eb1c478e 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 @@ | |||
| 1 | DESCRIPTION = "Common CA certificates" | 1 | DEPENDS = "ca-certificates-cross" |
| 2 | HOMEPAGE = "http://packages.debian.org/sid/ca-certificates" | ||
| 3 | SECTION = "misc" | ||
| 4 | LICENSE = "GPLv2+" | ||
| 5 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=6135800ff6d893c7904d7aad90972eb5" | ||
| 6 | 2 | ||
| 7 | SRC_URI = "${DEBIAN_MIRROR}/main/c/ca-certificates/ca-certificates_${PV}.tar.gz \ | 3 | require ca-certificates-${PV}.inc |
| 8 | file://0001-update-ca-certificates-remove-c-rehash.patch" | ||
| 9 | 4 | ||
| 10 | SRC_URI[md5sum] = "1fbbec2028a33cf865b79c204aa2e626" | 5 | inherit autotools |
| 11 | SRC_URI[sha256sum] = "fb51ec9a2c551838cc1646a0b3c9e6bea5c1bb20ff5d71c542451fac4b191c22" | ||
| 12 | |||
| 13 | inherit autotools allarch | ||
| 14 | 6 | ||
| 15 | do_install_prepend() { | 7 | do_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 | ||
| 34 | pkg_postinst_${PN} () { | 26 | pkg_postinst_${PN} () { |
| 35 | if [ -n "$D" ] ; then | 27 | SYSROOT="$D" update-ca-certificates |
| 36 | exit 1 | ||
| 37 | fi | ||
| 38 | |||
| 39 | ${sbindir}/update-ca-certificates | ||
| 40 | } | 28 | } |
| 41 | 29 | ||
| 42 | CONFFILES_${PN} = "/etc/ca-certificates.conf" | 30 | CONFFILES_${PN} = "/etc/ca-certificates.conf" |
