Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | SUMMARY = "Common CA certificates" |
| 2 | DESCRIPTION = "This package includes PEM files of CA certificates to allow \ |
| 3 | SSL-based applications to check for the authenticity of SSL connections. \ |
| 4 | This derived from Debian's CA Certificates." |
| 5 | HOMEPAGE = "http://packages.debian.org/sid/ca-certificates" |
| 6 | SECTION = "misc" |
| 7 | LICENSE = "GPL-2.0+ & MPL-2.0" |
| 8 | LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7358b9541ccf3029e9705ed8de57968" |
| 9 | |
| 10 | # This is needed to ensure we can run the postinst at image creation time |
| 11 | DEPENDS = "" |
| 12 | DEPENDS_class-native = "openssl-native" |
| 13 | DEPENDS_class-nativesdk = "openssl-native" |
| 14 | # Need c_rehash from openssl and run-parts from debianutils |
| 15 | PACKAGE_WRITE_DEPS += "openssl-native debianutils-native" |
| 16 | |
| 17 | SRCREV = "34b8e19e541b8af4076616b2e170c7a70cdaded0" |
| 18 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | SRC_URI = "git://salsa.debian.org/debian/ca-certificates.git;protocol=https \ |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 20 | file://0002-update-ca-certificates-use-SYSROOT.patch \ |
| 21 | file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \ |
| 22 | file://update-ca-certificates-support-Toybox.patch \ |
| 23 | file://default-sysroot.patch \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 24 | file://sbindir.patch \ |
| 25 | file://0003-update-ca-certificates-use-relative-symlinks-from-ET.patch \ |
| 26 | " |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 27 | |
| 28 | S = "${WORKDIR}/git" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 29 | SYSROOT_DIRS_class-native += "${sysconfdir} ${datadir}/ca-certificates" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 30 | |
| 31 | inherit allarch |
| 32 | |
| 33 | EXTRA_OEMAKE = "\ |
| 34 | 'CERTSDIR=${datadir}/ca-certificates' \ |
| 35 | 'SBINDIR=${sbindir}' \ |
| 36 | " |
| 37 | |
| 38 | do_compile_prepend() { |
| 39 | oe_runmake clean |
| 40 | } |
| 41 | |
| 42 | do_install () { |
| 43 | install -d ${D}${datadir}/ca-certificates \ |
| 44 | ${D}${sysconfdir}/ssl/certs \ |
| 45 | ${D}${sysconfdir}/ca-certificates/update.d |
| 46 | oe_runmake 'DESTDIR=${D}' install |
| 47 | |
| 48 | install -d ${D}${mandir}/man8 |
| 49 | install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/ |
| 50 | |
| 51 | install -d ${D}${sysconfdir} |
| 52 | { |
| 53 | echo "# Lines starting with # will be ignored" |
| 54 | echo "# Lines starting with ! will remove certificate on next update" |
| 55 | echo "#" |
| 56 | find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \ |
| 57 | sed 's,^${D}${datadir}/ca-certificates/,,' |
| 58 | } >${D}${sysconfdir}/ca-certificates.conf |
| 59 | } |
| 60 | |
| 61 | do_install_append_class-target () { |
| 62 | sed -i -e 's,/etc/,${sysconfdir}/,' \ |
| 63 | -e 's,/usr/share/,${datadir}/,' \ |
| 64 | -e 's,/usr/local,${prefix}/local,' \ |
| 65 | ${D}${sbindir}/update-ca-certificates \ |
| 66 | ${D}${mandir}/man8/update-ca-certificates.8 |
| 67 | } |
| 68 | |
Brad Bishop | 0011132 | 2018-04-01 22:23:53 -0400 | [diff] [blame] | 69 | pkg_postinst_${PN}_class-target () { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 70 | SYSROOT="$D" $D${sbindir}/update-ca-certificates |
| 71 | } |
| 72 | |
| 73 | CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf" |
| 74 | |
Brad Bishop | 0011132 | 2018-04-01 22:23:53 -0400 | [diff] [blame] | 75 | # Rather than make a postinst script that works for both target and nativesdk, |
| 76 | # we just run update-ca-certificate from do_install() for nativesdk. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 77 | CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt" |
| 78 | do_install_append_class-nativesdk () { |
| 79 | SYSROOT="${D}${SDKPATHNATIVE}" ${D}${sbindir}/update-ca-certificates |
| 80 | } |
| 81 | |
| 82 | do_install_append_class-native () { |
| 83 | SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates |
| 84 | } |
| 85 | |
| 86 | RDEPENDS_${PN} += "openssl" |
| 87 | |
| 88 | BBCLASSEXTEND = "native nativesdk" |