ca-certificates: run c_rehash
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 26 Jul 2015 19:21:19 +0000 (22:21 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 26 Jul 2015 19:21:19 +0000 (22:21 +0300)
recipes/ca-certificates/ca-certificates_20141019.bb

index 3652277..0f960db 100644 (file)
@@ -11,11 +11,16 @@ LIC_FILES_CHKSUM = "file://debian/copyright;md5=48d2baf97986999e776b43c8dd9e0c5a
 DEPENDS = "ca-certificates-native"
 DEPENDS_virtclass-native = ""
 
+# pandora hack for c_rehash
+RDEPENDS = "perl openssl"
+
+PR = "r1"
+
 # tag: debian/20140325 + 2
 SRCREV = "2b8a047c78aadbecd90bf8e49ccf68898a211610"
 
 SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git;protocol=git \
-           file://0001-update-ca-certificates-remove-c-rehash.patch;patch=1 \
+#           file://0001-update-ca-certificates-remove-c-rehash.patch;patch=1 \
            file://0002-update-ca-certificates-use-SYSROOT.patch;patch=1 \
            file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch;patch=1 \
            file://default-sysroot.patch;patch=1 \
@@ -64,6 +69,11 @@ do_install_append_virtclass-target () {
 
 pkg_postinst_${PN} () {
     SYSROOT="$D" update-ca-certificates
+    # older ca-certificates did not run c_rehash, so run manually
+    if [ ! -h /etc/ssl/certs/578d5c04.0 -a -x /usr/bin/c_rehash ]; then
+        cd /etc/ssl/certs
+        /usr/bin/c_rehash .
+    fi
 }
 
 CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"