]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
ca-certificates: use relative symlinks from $ETCCERTSDIR
authorAndré Draszik <andre.draszik@jci.com>
Thu, 29 Mar 2018 15:43:19 +0000 (16:43 +0100)
committerAndreas Oberritter <obi@opendreambox.org>
Mon, 1 Jun 2020 14:40:16 +0000 (16:40 +0200)
commit5138e1c6fb1bc8c5e12aaec79372b4065b4aafa3
tree258de4ef2640bc3d617c7f7ac0f3ed4a34b1b20b
parenta20d128f0b07692119507348f2cb3211ad05b047
ca-certificates: use relative symlinks from $ETCCERTSDIR

update-ca-certificates symlinks (trusted) certificates
from $CERTSDIR or $LOCALCERTSDIR into $ETCCERTSDIR.
update-ca-certificates can call hook scripts installed
into /etc/ca-certificates/update.d. Those scripts are
passed the pem file in /etc/ssl/certs/ that was added or
removed in this run and those pem files are absolute
symlinks into $CERTSDIR or $LOCALCERTSDIR at the moment.

When running update-ca-certificates during image build
time, they thusly all point into the host's file system,
not into the $SYSROOT. This means:
* the host's file system layout must match the one
  produced by OE, and
* it also means that the host must have installed the same
  (or more) certificates as the target in $CERTSDIR and
  $LOCALCERTSDIR

This is a problem when wanting to execute hook scripts,
because they all need to be taught about $SYSROOT, and
behave differently depending on whether they're called
at image build time, or on the target, as otherwise they
will be trying to actually read the host's certificates
from $CERTSDIR or $LOCALCERTSDIR.

This also is a problem when running anything else during
image build time that depends on the trusted CA
certificates.

Changing the symlink to be relative solves all of these
problems. At the same time, we have to make sure to add
$CERTSDIR to SYSROOT_DIRS, so that the symlinks are still
valid when somebody DEPENDS on ca-certificates-native. As
a side-effect, this also fixes a problem in meta-java,
where some recipes (e.g. openjdk-8-native) try to access
certificates from $CERTSDIR to generate the java trustStore
at build time.

Do so.

Upstream-Status: Inappropriate [OE-specific]
Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 09bb7718d74573be9a5db4d0737fb14126f6489c)
Signed-off-by: Andreas Oberritter <obi@opendreambox.org> [edited]
meta/recipes-support/ca-certificates/ca-certificates/0003-update-ca-certificates-use-relative-symlinks-from-ET.patch [new file with mode: 0644]
meta/recipes-support/ca-certificates/ca-certificates_20170717.bb