Skip to content

Commit

Permalink
feat: add update-ca-certificates script to final image
Browse files Browse the repository at this point in the history
  • Loading branch information
shipperizer committed Dec 8, 2023
1 parent c2a6e5a commit 0e8f912
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,33 @@ services:
parts:
certificates:
plugin: nil
stage-packages:
build-packages:
- ca-certificates

override-build: |
mkdir -p $CRAFT_PART_INSTALL/etc/ssl/certs
mkdir -p $CRAFT_PART_INSTALL/usr/share/ca-certificates/mozilla/
mkdir -p $CRAFT_PART_INSTALL/usr/sbin
mkdir -p $CRAFT_PART_INSTALL/tmp
touch $CRAFT_PART_INSTALL/etc/ssl/certs/ca-certificates.crt
touch $CRAFT_PART_INSTALL/etc/ca-certificates.conf
for cert in /usr/share/ca-certificates/mozilla/* ; do
echo "mozilla/$(basename $cert)" >> $CRAFT_PART_INSTALL/etc/ca-certificates.conf
cat "$cert" >> $CRAFT_PART_INSTALL/etc/ssl/certs/ca-certificates.crt
done
cp /usr/share/ca-certificates/mozilla/* $CRAFT_PART_INSTALL/usr/share/ca-certificates/mozilla
cp /usr/sbin/update-ca-certificates $CRAFT_PART_INSTALL/usr/sbin/update-ca-certificates
chmod 777 $CRAFT_PART_INSTALL/tmp
chmod -R 777 $CRAFT_PART_INSTALL/etc/ssl/certs
prime:
- usr/sbin/update-ca-certificates
sed:
plugin: nil
stage-packages:
- sed
find:
plugin: nil
stage-packages:
- findutils
oathkeeper:
plugin: go
build-snaps:
Expand Down

0 comments on commit 0e8f912

Please sign in to comment.