Skip to content

Commit 7942cfa

Browse files
committed
app-misc/ca-certificates: Account for certs missing newlines
Concatenating certificates missing newlines naively with cat results in broken bundle. Fix the issue by using a sed expression that appends a trailing newline after the lastline if it is missing. Issue: flatcar/Flatcar#1601 Signed-off-by: Jeremi Piotrowski <[email protected]>
1 parent 707490d commit 7942cfa

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.108.ebuild renamed to sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/ca-certificates-3.108-r1.ebuild

File renamed without changes.

sdk_container/src/third_party/coreos-overlay/app-misc/ca-certificates/files/update-ca-certificates

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ if [[ ! -e "${CERTBUNDLE}" || "${CERTSDIR}" -nt "${CERTBUNDLE}" ]]; then
3232
trap "rm -f '${CERTSDIR}/${TEMPBUNDLE}'" EXIT
3333

3434
# Use .0 instead of .pem to pull in only what c_rehash validated
35-
cat "${CERTSDIR}"/*.[0-9] > "${TEMPBUNDLE}"
35+
sed --separate '$a\' "${CERTSDIR}"/*.[0-9] >"${TEMPBUNDLE}"
36+
3637
chmod 644 "${TEMPBUNDLE}"
3738
mv -f "${TEMPBUNDLE}" "${CERTBUNDLE}"
3839
trap - EXIT

0 commit comments

Comments
 (0)