Skip to content

Commit 3f377e0

Browse files
authored
Merge pull request AdoptOpenJDK#561 from srbala/fix-478
Missing slim fixes to ubi, ubi-minimal, clefos
2 parents cacd234 + e624d43 commit 3f377e0

File tree

3 files changed

+78
-24
lines changed

3 files changed

+78
-24
lines changed

config/hotspot.config

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ OS_Family: linux
5252
Directory: 8/jdk/clefos
5353

5454
Build: releases nightly
55-
Type: full
55+
Type: full slim
5656
Architectures: aarch64 armv7l x86_64 ppc64le
5757
OS_Family: linux
5858
Directory: 8/jdk/leap
5959

6060
Build: releases nightly
61-
Type: full
61+
Type: full slim
6262
Architectures: aarch64 armv7l x86_64 ppc64le s390x
6363
OS_Family: linux
6464
Directory: 8/jdk/tumbleweed
6565

6666
Build: releases nightly
67-
Type: full
67+
Type: full slim
6868
Architectures: aarch64 x86_64 ppc64le s390x
6969
OS_Family: linux
7070
Directory: 8/jdk/ubi-minimal
@@ -268,19 +268,19 @@ OS_Family: linux
268268
Directory: 11/jdk/clefos
269269

270270
Build: releases nightly
271-
Type: full
271+
Type: full slim
272272
Architectures: aarch64 armv7l x86_64 ppc64le
273273
OS_Family: linux
274274
Directory: 11/jdk/leap
275275

276276
Build: releases nightly
277-
Type: full
277+
Type: full slim
278278
Architectures: aarch64 armv7l x86_64 ppc64le s390x
279279
OS_Family: linux
280280
Directory: 11/jdk/tumbleweed
281281

282282
Build: releases nightly
283-
Type: full
283+
Type: full slim
284284
Architectures: aarch64 x86_64 ppc64le s390x
285285
OS_Family: linux
286286
Directory: 11/jdk/ubi-minimal
@@ -474,7 +474,7 @@ OS_Family: linux
474474
Directory: 15/jdk/ubi
475475

476476
Build: releases nightly
477-
Type: full
477+
Type: full slim
478478
Architectures: aarch64 x86_64 ppc64le s390x
479479
OS_Family: linux
480480
Directory: 15/jdk/ubi-minimal
@@ -492,13 +492,13 @@ OS_Family: linux
492492
Directory: 15/jdk/clefos
493493

494494
Build: releases nightly
495-
Type: full
495+
Type: full slim
496496
Architectures: aarch64 armv7l x86_64 ppc64le
497497
OS_Family: linux
498498
Directory: 15/jdk/leap
499499

500500
Build: releases nightly
501-
Type: full
501+
Type: full slim
502502
Architectures: aarch64 armv7l x86_64 ppc64le s390x
503503
OS_Family: linux
504504
Directory: 15/jdk/tumbleweed
@@ -692,7 +692,7 @@ OS_Family: linux
692692
Directory: 16/jdk/ubi
693693

694694
Build: releases nightly
695-
Type: full
695+
Type: full slim
696696
Architectures: aarch64 x86_64 ppc64le s390x
697697
OS_Family: linux
698698
Directory: 16/jdk/ubi-minimal
@@ -710,13 +710,13 @@ OS_Family: linux
710710
Directory: 16/jdk/clefos
711711

712712
Build: releases nightly
713-
Type: full
713+
Type: full slim
714714
Architectures: aarch64 armv7l x86_64 ppc64le
715715
OS_Family: linux
716716
Directory: 16/jdk/leap
717717

718718
Build: releases nightly
719-
Type: full
719+
Type: full slim
720720
Architectures: aarch64 armv7l x86_64 ppc64le s390x
721721
OS_Family: linux
722722
Directory: 16/jdk/tumbleweed

config/openj9.config

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ OS_Family: linux
5454
Directory: 8/jdk/clefos
5555

5656
Build: releases nightly
57-
Type: full
57+
Type: full slim
5858
Architectures: x86_64 ppc64le
5959
OS_Family: linux
6060
Directory: 8/jdk/leap
6161

6262
Build: releases nightly
63-
Type: full
63+
Type: full slim
6464
Architectures: x86_64 ppc64le s390x
6565
OS_Family: linux
6666
Directory: 8/jdk/tumbleweed
6767

6868
Build: releases nightly
69-
Type: full
69+
Type: full slim
7070
Architectures: x86_64 ppc64le s390x
7171
OS_Family: linux
7272
Directory: 8/jdk/ubi-minimal
@@ -270,19 +270,19 @@ OS_Family: linux
270270
Directory: 11/jdk/clefos
271271

272272
Build: releases nightly
273-
Type: full
273+
Type: full slim
274274
Architectures: x86_64 ppc64le
275275
OS_Family: linux
276276
Directory: 11/jdk/leap
277277

278278
Build: releases nightly
279-
Type: full
279+
Type: full slim
280280
Architectures: x86_64 ppc64le s390x
281281
OS_Family: linux
282282
Directory: 11/jdk/tumbleweed
283283

284284
Build: releases nightly
285-
Type: full
285+
Type: full slim
286286
Architectures: x86_64 ppc64le s390x
287287
OS_Family: linux
288288
Directory: 11/jdk/ubi-minimal
@@ -476,7 +476,7 @@ OS_Family: linux
476476
Directory: 15/jdk/ubi
477477

478478
Build: releases nightly
479-
Type: full
479+
Type: full slim
480480
Architectures: x86_64 ppc64le s390x
481481
OS_Family: linux
482482
Directory: 15/jdk/ubi-minimal
@@ -494,13 +494,13 @@ OS_Family: linux
494494
Directory: 15/jdk/clefos
495495

496496
Build: releases nightly
497-
Type: full
497+
Type: full slim
498498
Architectures: x86_64 ppc64le
499499
OS_Family: linux
500500
Directory: 15/jdk/leap
501501

502502
Build: releases nightly
503-
Type: full
503+
Type: full slim
504504
Architectures: x86_64 ppc64le s390x
505505
OS_Family: linux
506506
Directory: 15/jdk/tumbleweed
@@ -694,7 +694,7 @@ OS_Family: linux
694694
Directory: 16/jdk/ubi
695695

696696
Build: releases nightly
697-
Type: full
697+
Type: full slim
698698
Architectures: x86_64 ppc64le s390x
699699
OS_Family: linux
700700
Directory: 16/jdk/ubi-minimal
@@ -712,13 +712,13 @@ OS_Family: linux
712712
Directory: 16/jdk/clefos
713713

714714
Build: releases nightly
715-
Type: full
715+
Type: full slim
716716
Architectures: x86_64 ppc64le
717717
OS_Family: linux
718718
Directory: 16/jdk/leap
719719

720720
Build: releases nightly
721-
Type: full
721+
Type: full slim
722722
Architectures: x86_64 ppc64le s390x
723723
OS_Family: linux
724724
Directory: 16/jdk/tumbleweed

dockerfile_functions.sh

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,47 @@ print_alpine_slim_package() {
476476
EOI
477477
}
478478

479+
# Call the script to create the slim package for Ubi
480+
print_ubi_slim_package() {
481+
cat >> "$1" <<-EOI
482+
export PATH="${jhome}/bin:\$PATH"; \\
483+
dnf install -y binutils; \\
484+
/usr/local/bin/slim-java.sh ${jhome}; \\
485+
dnf remove -y binutils; \\
486+
dnf clean all; \\
487+
EOI
488+
}
489+
490+
# Call the script to create the slim package for Ubi-minimal
491+
print_ubi-minimal_slim_package() {
492+
cat >> "$1" <<-EOI
493+
export PATH="${jhome}/bin:\$PATH"; \\
494+
microdnf install -y binutils; \\
495+
/usr/local/bin/slim-java.sh ${jhome}; \\
496+
microdnf remove -y binutils; \\
497+
microdnf clean all; \\
498+
EOI
499+
}
500+
501+
# Call the script to create the slim package for leap & tumbleweed
502+
print_leap_slim_package() {
503+
cat >> "$1" <<-EOI
504+
export PATH="${jhome}/bin:\$PATH"; \\
505+
zypper install --no-recommends -y binutils; \\
506+
/usr/local/bin/slim-java.sh ${jhome}; \\
507+
zypper remove -y binutils; \\
508+
zypper clean --all; \\
509+
EOI
510+
}
511+
512+
# Call the script to create the slim package for Centos & clefos
513+
print_centos_slim_package() {
514+
cat >> "$1" <<-EOI
515+
export PATH="${jhome}/bin:\$PATH"; \\
516+
/usr/local/bin/slim-java.sh ${jhome}; \\
517+
EOI
518+
}
519+
479520
# Print the main RUN command that installs Java on ubuntu.
480521
print_ubuntu_java_install() {
481522
local pkg=$2
@@ -651,6 +692,13 @@ RUN set -eux; \\
651692
case "\${ARCH}" in \\
652693
EOI
653694
print_java_install_pre "${file}" "${pkg}" "${bld}" "${btype}" "${osfamily}" "${os}"
695+
if [ "${btype}" == "slim" ]; then
696+
if [ "${os}" == "ubi" ]; then
697+
print_ubi_slim_package "$1"
698+
elif [ "${os}" == "ubi-minimal" ]; then
699+
print_ubi-minimal_slim_package "$1"
700+
fi
701+
fi
654702
print_java_install_post "$1"
655703
}
656704

@@ -673,6 +721,9 @@ RUN set -eux; \\
673721
case "\${ARCH}" in \\
674722
EOI
675723
print_java_install_pre "${file}" "${pkg}" "${bld}" "${btype}" "${osfamily}" "${os}"
724+
if [ "${btype}" == "slim" ]; then
725+
print_centos_slim_package "$1"
726+
fi
676727
print_java_install_post "$1"
677728
}
678729

@@ -692,6 +743,9 @@ RUN set -eux; \\
692743
case "\${ARCH}" in \\
693744
EOI
694745
print_java_install_pre "${file}" "${pkg}" "${bld}" "${btype}" "${osfamily}" "${os}"
746+
if [ "${btype}" == "slim" ]; then
747+
print_leap_slim_package "$1"
748+
fi
695749
print_java_install_post "$1"
696750
}
697751

0 commit comments

Comments
 (0)