Skip to content

Commit

Permalink
add security manifest (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabello authored Dec 7, 2023
1 parent ef7801b commit 55604b2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
12 changes: 10 additions & 2 deletions 0.25.0/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ base: ubuntu:22.04
license: Apache-2.0
# Replicate the tree structure of the original image
# https://github.com/prometheus/alertmanager/blob/main/Dockerfile

# /
# ├── bin
# │ ├── alertmanager
# │ └── amtool
# └── etc
# └── alertmanager
# └── alertmanager.yml

services:
alertmanager:
command: /bin/alertmanager --config.file=/etc/alertmanager/alertmanager.yml --storage.path=/alertmanager
Expand Down Expand Up @@ -61,3 +59,13 @@ parts:
ca-certs:
plugin: nil
stage-packages: [ca-certificates]
# The security manifest is required when .deb packages are added to the ROCK
deb-security-manifest:
plugin: nil
after:
- alertmanager
- ca-certs
override-prime: |
set -x
mkdir -p $CRAFT_PRIME/usr/share/rocks/
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query --admindir=$CRAFT_PRIME/var/lib/dpkg/ -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > $CRAFT_PRIME/usr/share/rocks/dpkg.query
11 changes: 10 additions & 1 deletion 0.26.0/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ base: ubuntu:22.04
license: Apache-2.0
# Replicate the tree structure of the original image
# https://github.com/prometheus/alertmanager/blob/main/Dockerfile

# /
# ├── bin
# │ ├── alertmanager
Expand Down Expand Up @@ -60,3 +59,13 @@ parts:
ca-certs:
plugin: nil
stage-packages: [ca-certificates]
# The security manifest is required when .deb packages are added to the ROCK
deb-security-manifest:
plugin: nil
after:
- alertmanager
- ca-certs
override-prime: |
set -x
mkdir -p $CRAFT_PRIME/usr/share/rocks/
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query --admindir=$CRAFT_PRIME/var/lib/dpkg/ -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > $CRAFT_PRIME/usr/share/rocks/dpkg.query

0 comments on commit 55604b2

Please sign in to comment.