Skip to content

Commit 609451e

Browse files
authored
Merge pull request #138 from crazy-max/rockylinux
rpm: add rockylinux and almalinux
2 parents 15fbe4e + 84d036a commit 609451e

File tree

4 files changed

+92
-5
lines changed

4 files changed

+92
-5
lines changed

Makefile

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,25 @@
1313
# limitations under the License.
1414

1515
# Same as ones in docker-bake.hcl
16-
DISTROS_DEB ?= debian11 debian12 debian13 ubuntu2204 ubuntu2404 raspbian11 raspbian12
17-
DISTROS_RPM ?= centos9 fedora41 fedora42 oraclelinux8 oraclelinux9
18-
DISTROS_STATIC ?= static
19-
DISTROS ?= $(DISTROS_DEB) $(DISTROS_RPM) $(DISTROS_STATIC)
16+
DISTROS ?= static \
17+
\
18+
debian11 \
19+
debian12 \
20+
debian13 \
21+
raspbian11 \
22+
raspbian12 \
23+
ubuntu2204 \
24+
ubuntu2404 \
25+
\
26+
almalinux8 \
27+
almalinux9 \
28+
centos9 \
29+
fedora41 \
30+
fedora42 \
31+
oraclelinux8 \
32+
oraclelinux9 \
33+
rockylinux8 \
34+
rockylinux9
2035

2136
# Should match ones from docker-bake.hcl
2237
PKGS_RAW := $(notdir $(shell find "pkg/" -maxdepth 1 -type d))

docker-bake.hcl

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,24 @@ variable "DISTROS" {
1616
description = "List of supported distros. Don't forget to update _distro-* target if you add/remove a distro."
1717
default = [
1818
"static",
19+
1920
"debian11",
2021
"debian12",
2122
"debian13",
2223
"raspbian11",
2324
"raspbian12",
2425
"ubuntu2204",
2526
"ubuntu2404",
27+
28+
"almalinux8",
29+
"almalinux9",
2630
"centos9",
2731
"fedora41",
2832
"fedora42",
2933
"oraclelinux8",
30-
"oraclelinux9"
34+
"oraclelinux9",
35+
"rockylinux8",
36+
"rockylinux9"
3137
]
3238
}
3339

@@ -243,6 +249,28 @@ target "_distro-ubuntu2404" {
243249
}
244250
}
245251

252+
target "_distro-almalinux8" {
253+
args = {
254+
DISTRO_NAME = "almalinux8"
255+
DISTRO_TYPE = "rpm"
256+
DISTRO_RELEASE = "almalinux"
257+
DISTRO_ID = "8"
258+
DISTRO_SUITE = "8"
259+
DISTRO_IMAGE = DISTRO_IMAGE != null ? DISTRO_IMAGE : "almalinux:8"
260+
}
261+
}
262+
263+
target "_distro-almalinux9" {
264+
args = {
265+
DISTRO_NAME = "almalinux9"
266+
DISTRO_TYPE = "rpm"
267+
DISTRO_RELEASE = "almalinux"
268+
DISTRO_ID = "9"
269+
DISTRO_SUITE = "9"
270+
DISTRO_IMAGE = DISTRO_IMAGE != null ? DISTRO_IMAGE : "almalinux:9"
271+
}
272+
}
273+
246274
target "_distro-centos9" {
247275
args = {
248276
DISTRO_NAME = "centos9"
@@ -298,6 +326,28 @@ target "_distro-oraclelinux9" {
298326
}
299327
}
300328

329+
target "_distro-rockylinux8" {
330+
args = {
331+
DISTRO_NAME = "rockylinux8"
332+
DISTRO_TYPE = "rpm"
333+
DISTRO_RELEASE = "rockylinux"
334+
DISTRO_ID = "8"
335+
DISTRO_SUITE = "8"
336+
DISTRO_IMAGE = DISTRO_IMAGE != null ? DISTRO_IMAGE : "rockylinux/rockylinux:8"
337+
}
338+
}
339+
340+
target "_distro-rockylinux9" {
341+
args = {
342+
DISTRO_NAME = "rockylinux9"
343+
DISTRO_TYPE = "rpm"
344+
DISTRO_RELEASE = "rockylinux"
345+
DISTRO_ID = "9"
346+
DISTRO_SUITE = "9"
347+
DISTRO_IMAGE = DISTRO_IMAGE != null ? DISTRO_IMAGE : "rockylinux/rockylinux:9"
348+
}
349+
}
350+
301351
# Returns the list of supported platforms for a given distro and package.
302352
# The result is the intersection of the platforms supported by the distro
303353
# and the platforms supported by the package. Except for static distro,
@@ -309,18 +359,24 @@ function "distroPlatforms" {
309359
setintersection(
310360
lookup({
311361
static = pkgPlatforms(pkg)
362+
312363
debian11 = ["linux/386", "linux/amd64", "linux/arm64", "linux/arm/v7", "linux/mips64le", "linux/ppc64le", "linux/s390x"]
313364
debian12 = ["linux/386", "linux/amd64", "linux/arm64", "linux/arm/v7", "linux/mips64le", "linux/ppc64le", "linux/s390x"]
314365
debian13 = ["linux/386", "linux/amd64", "linux/arm64", "linux/arm/v7", "linux/mips64le", "linux/ppc64le", "linux/riscv64", "linux/s390x"]
315366
raspbian11 = ["linux/arm/v7"]
316367
raspbian12 = ["linux/arm/v7"]
317368
ubuntu2204 = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/ppc64le", "linux/s390x"]
318369
ubuntu2404 = ["linux/amd64", "linux/arm64", "linux/arm/v7", "linux/ppc64le", "linux/riscv64", "linux/s390x"]
370+
371+
almalinux8 = ["linux/amd64", "linux/arm64", "linux/ppc64le", "linux/s390x"]
372+
almalinux9 = ["linux/amd64", "linux/arm64", "linux/ppc64le", "linux/s390x"]
319373
centos9 = ["linux/amd64", "linux/arm64", "linux/ppc64le"]
320374
fedora41 = ["linux/amd64", "linux/arm64", "linux/ppc64le", "linux/s390x"]
321375
fedora42 = ["linux/amd64", "linux/arm64", "linux/ppc64le", "linux/s390x"]
322376
oraclelinux8 = ["linux/amd64", "linux/arm64"]
323377
oraclelinux9 = ["linux/amd64", "linux/arm64"]
378+
rockylinux8 = ["linux/amd64", "linux/arm64"]
379+
rockylinux9 = ["linux/amd64", "linux/arm64"]
324380
}, distro, []),
325381
pkgPlatforms(pkg)
326382
),

hack/scripts/rpm-init.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,12 @@ case "$pkgrelease" in
5151
fedora*)
5252
dnf install -y git rpm-build rpmlint dnf-plugins-core
5353
;;
54+
rockylinux8|almalinux8)
55+
dnf install -y git rpm-build rpmlint dnf-plugins-core epel-release
56+
dnf config-manager --set-enabled powertools
57+
;;
58+
rockylinux*|almalinux*)
59+
dnf install -y git rpm-build rpmlint dnf-plugins-core epel-release
60+
dnf config-manager --set-enabled crb
61+
;;
5462
esac

hack/scripts/verify-rpm-init.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,12 @@ case "$pkgrelease" in
4040
fedora*)
4141
dnf install -y findutils dnf-plugins-core
4242
;;
43+
rockylinux8|almalinux8)
44+
dnf install -y findutils dnf-plugins-core epel-release
45+
dnf config-manager --set-enabled powertools
46+
;;
47+
rockylinux*|almalinux*)
48+
dnf install -y findutils dnf-plugins-core epel-release
49+
dnf config-manager --set-enabled crb
50+
;;
4351
esac

0 commit comments

Comments
 (0)