Skip to content

Commit

Permalink
Added attestion for gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Nov 10, 2023
1 parent fd0da24 commit d5cd104
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.jq-template.awk
.template-helper-functions.jq
3 changes: 2 additions & 1 deletion 10/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion 11/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion 12/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion 13/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion 9/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ include ".template-helper-functions" -}}
FROM buildpack-deps:{{ .debian.version }}

# https://gcc.gnu.org/mirrors.html
Expand Down Expand Up @@ -124,7 +125,20 @@ RUN set -ex; \
\
apt-mark auto '.*' > /dev/null; \
[ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
echo {{
{
name: "gcc",
version: .version,
params: {
os_name: "debian",
os_version: .debian.version
},
licenses: [
"Apache-2.0"
]
} | sbom | tostring | @sh
}} > /usr/local/gcc.spdx.json;

# gcc installs .so files in /usr/local/lib64 (and /usr/local/lib)...
RUN set -ex; \
Expand Down
7 changes: 7 additions & 0 deletions apply-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ elif [ "$BASH_SOURCE" -nt "$jqt" ]; then
wget -qO "$jqt" 'https://github.com/docker-library/bashbrew/raw/9f6a35772ac863a0241f147c820354e4008edf38/scripts/jq-template.awk'
fi

jqf='.template-helper-functions.jq'
if [ -n "${BASHBREW_SCRIPTS:-}" ]; then
jqf="$BASHBREW_SCRIPTS/template-helper-functions.jq"
elif [ "$BASH_SOURCE" -nt "$jqf" ]; then
wget -qO "$jqf" 'https://github.com/docker-library/bashbrew/raw/08c926140ad0af22de58c2a2656afda58082ba3e/scripts/template-helper-functions.jq'
fi

if [ "$#" -eq 0 ]; then
versions="$(jq -r 'keys | map(@sh) | join(" ")' versions.json)"
eval "set -- $versions"
Expand Down
2 changes: 1 addition & 1 deletion versions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -Eeuo pipefail

# the libc created by gcc might be too old for a newer Debian:
Expand Down

0 comments on commit d5cd104

Please sign in to comment.