Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(24.04): reorganise ca-certificates slice(s) #266

Merged
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions slices/ca-certificates.yaml
zhijie-yang marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ essential:

slices:
data:
zhijie-yang marked this conversation as resolved.
Show resolved Hide resolved
zhijie-yang marked this conversation as resolved.
Show resolved Hide resolved
essential:
# This adds the symlink at `etc/ssl/certs.pem` for OpenSSL to look up the
# bundled certificate file. See `openssl_data` for details.
- openssl_data
contents:
# This bundle of certificates and the config are the results of running
# the `update-ca-certificates` script. This script is run by default
# by the postinst maintainer script when installed as a deb package.
/etc/ca-certificates.conf: {text: FIXME, mutable: true}
zhijie-yang marked this conversation as resolved.
Show resolved Hide resolved
/etc/ssl/certs/ca-certificates.crt: {text: FIXME, mutable: true}
/usr/share/ca-certificates/mozilla/: {until: mutate}
/usr/share/ca-certificates/mozilla/*: {until: mutate}
Expand All @@ -15,6 +23,29 @@ slices:
content.read(certs_dir + path) for path in content.list(certs_dir)
]
content.write("/etc/ssl/certs/ca-certificates.crt", "".join(certs))
names = [
"mozilla/{}".format(name) for name in content.list(certs_dir)
]
content.write("/etc/ca-certificates.conf", "\n".join(names))
cjdcordeiro marked this conversation as resolved.
Show resolved Hide resolved

# The `_data` slice only provides the bundled certificates and the config file.
# To keep the individual certificates, this slice should be included.
data-with-certs:
essential:
- ca-certificates_data
contents:
/usr/share/ca-certificates/mozilla/*:
zhijie-yang marked this conversation as resolved.
Show resolved Hide resolved
zhijie-yang marked this conversation as resolved.
Show resolved Hide resolved

bins:
zhijie-yang marked this conversation as resolved.
Show resolved Hide resolved
essential:
- openssl_bins
# The `/usr/sbin/update-ca-certificates` script requires sed to run.
- sed_bins
contents:
# To run update-ca-certificates without breaking the default certificates
# at /etc/ssl/certs/ca-certificates.crt, the `_data-with-certs` slice should
# also be included. For details, see the `update-ca-certificates` script.
/usr/sbin/update-ca-certificates:

copyright:
contents:
Expand Down
Loading