@@ -5,15 +5,15 @@ from: {{ $.Root.BASE_ALT_P11 }}
5
5
final : false
6
6
7
7
git :
8
- - url : https://github.com /LINBIT/drbd-utils
8
+ - url : {{ $.Root.SOURCE_REPO }} /LINBIT/drbd-utils
9
9
add : /
10
10
to : /drbd-utils
11
11
tag : v{{ $.Versions.DRBD_UTILS }}
12
12
stageDependencies :
13
13
setup :
14
14
- " **/*"
15
15
16
- - url : https://github.com /LINBIT/thin-send-recv
16
+ - url : {{ $.Root.SOURCE_REPO }} /LINBIT/thin-send-recv
17
17
add : /
18
18
to : /thin-send-recv
19
19
tag : v{{ $.Versions.THIN_SEND_RECV }}
28
28
apt-get update \
29
29
&& apt-get -y install {{ $.Root.BUILD_PACKAGES }} flex clitest xsltproc locales libxml2 po4a bash-completion docbook-xsl udev asciidoctor libkeyutils-devel \
30
30
&& apt-get -y install ca-certificates \
31
- && update-ca-trust \
32
- && apt-get clean \
33
- && rm -rf /var/lib/apt/lists/*
31
+ && update-ca-trust
32
+ - {{ $.Root.ALT_CLEANUP_CMD }}
34
33
install :
35
34
{{- $ctx := dict }}
36
35
{{- include "utils:prepare-rpm-build" $ctx | nindent 2 }}
40
39
setup :
41
40
# clone drbd-utils git repo
42
41
{{- $ctx := dict }}
43
- {{- $_ := set $ctx "repo" "https://github.com/ LINBIT/drbd-utils" }}
42
+ {{- $_ := set $ctx "repo" (printf "%s/ LINBIT/drbd-utils" $.Root.SOURCE_REPO) }}
44
43
{{- $_ := set $ctx "branch" (printf "v%s" $.Versions.DRBD_UTILS) }}
45
44
{{- $_ := set $ctx "folder" "/drbd-utils" }}
46
45
{{- include "utils:checkout-git" $ctx | nindent 2 }}
63
62
64
63
# clone thin-send-recv git repo
65
64
{{- $ctx := dict }}
66
- {{- $_ := set $ctx "repo" "https://github.com/ LINBIT/thin-send-recv" }}
65
+ {{- $_ := set $ctx "repo" (printf "%s/ LINBIT/thin-send-recv" $.Root.SOURCE_REPO) }}
67
66
{{- $_ := set $ctx "branch" (printf "v%s" $.Versions.THIN_SEND_RECV) }}
68
67
{{- $_ := set $ctx "folder" "/thin-send-recv" }}
69
68
{{- include "utils:checkout-git" $ctx | nindent 2 }}
@@ -77,11 +76,9 @@ shell:
77
76
{{- include "utils:build-rpm-pkg" $ctx | nindent 2 }}
78
77
79
78
- ls -la /
80
- # drbd-9.28.0-1.x86_64.rpm
81
- # drbd-utils-9.28.0-1.x86_64.rpm
82
- # drbd-utils-debuginfo-9.28.0-1.x86_64.rpm
83
- # thin-send-recv-1.0.1-1.x86_64.rpm
84
- # thin-send-recv-debuginfo-1.0.1-1.x86_64.rpm
79
+ # drbd-9.30.0-1.x86_64.rpm
80
+ # drbd-utils-9.30.0-1.x86_64.rpm
81
+ # thin-send-recv-1.1.3-1.x86_64.rpm
85
82
86
83
---
87
84
# build drbd-reactor .rpm packages
@@ -90,7 +87,7 @@ from: {{ $.Root.BASE_ALT_P11 }}
90
87
final : false
91
88
92
89
git :
93
- - url : https://github.com /LINBIT/drbd-reactor
90
+ - url : {{ $.Root.SOURCE_REPO }} /LINBIT/drbd-reactor
94
91
add : /
95
92
to : /drbd-reactor
96
93
tag : v{{ $.Versions.DRBD_REACTOR }}
@@ -107,15 +104,19 @@ shell:
107
104
apt-get update \
108
105
&& apt-get -y install {{ $.Root.BUILD_PACKAGES }} rust-cargo bash-completion \
109
106
&& apt-get -y install ca-certificates \
110
- && update-ca-trust \
111
- && apt-get clean \
112
- && rm -rf /var/lib/apt/lists/*
107
+ && update-ca-trust
108
+ - {{ $.Root.ALT_CLEANUP_CMD }}
109
+ - |
110
+ cargo install cargo-sbom \
111
+ && cargo sbom -V \
112
+ && mv ~/.cargo/bin/cargo-sbom /usr/local/bin/ \
113
+ && rm -rf ~/.cargo
113
114
install :
114
115
{{- $ctx := dict }}
115
116
{{- include "utils:prepare-rpm-build" $ctx | nindent 2 }}
116
117
setup :
117
118
{{- $ctx := dict }}
118
- {{- $_ := set $ctx "repo" "https://github.com/ LINBIT/drbd-reactor" }}
119
+ {{- $_ := set $ctx "repo" (printf "%s/ LINBIT/drbd-reactor" $.Root.SOURCE_REPO) }}
119
120
{{- $_ := set $ctx "branch" (printf "v%s" $.Versions.DRBD_REACTOR) }}
120
121
{{- $_ := set $ctx "folder" "/drbd-reactor" }}
121
122
{{- include "utils:checkout-git" $ctx | nindent 2 }}
@@ -134,8 +135,7 @@ shell:
134
135
{{- include "utils:build-rpm-pkg" $ctx | nindent 2 }}
135
136
136
137
- ls -la /
137
- # drbd-reactor-1.4.0-1.x86_64.rpm
138
- # drbd-reactor-debuginfo-1.4.0-1.x86_64.rpm
138
+ # drbd-reactor-1.8.0-1.x86_64.rpm
139
139
140
140
---
141
141
# main almost distroless image
@@ -163,19 +163,16 @@ shell:
163
163
- export DEBIAN_FRONTEND=noninteractive
164
164
- |
165
165
apt-get update \
166
- && apt-get -y install libkeyutils kmod sysklogd \
167
- && apt-get clean
166
+ && apt-get -y install libkeyutils kmod sysklogd
167
+ - {{ $.Root.ALT_CLEANUP_CMD }}
168
168
setup :
169
169
- ls -la /packages
170
170
- |
171
171
for f in /packages/*.rpm; do
172
172
echo "Install ${f}"
173
173
rpm -ihv --nodeps --noscripts $f
174
174
done
175
-
176
175
- sed -i 's/usage-count yes;/usage-count no;/' /etc/drbd.d/global_common.conf
177
- # cleanup
178
- - rm -rf /var/lib/apt/lists/*
179
176
180
177
docker :
181
178
ENTRYPOINT : ["/usr/sbin/drbd-reactor"]
0 commit comments