Skip to content

Commit

Permalink
[OPENJDK-2587] Ensure pkg-update runs before tzdata module
Browse files Browse the repository at this point in the history
The tzdata module, which calls "microdnf reinstall tzdata", may
fail if the base image has an installed tzdata RPM that is no
longer available on the mirrors / is out-of-date. For example

    base image installed RPM: tzdata-2023d-1.el8.noarch
    attempt to build ubi8-openjdk-17 (where tzdata module is first)
    "Installed package tzdata-2023d-1.el8.noarch not available"

The fix is to move the pkg-update module to be earlier. Do this
for all images, for consistency, place pkg-update first. (This
matches the ubi9 images)

I have not included a unit test as I am not sure how to approach
mocking older/newer RPM versions in a controllable way.

Signed-off-by: Jonathan Dowland <[email protected]>
  • Loading branch information
jmtd committed Feb 13, 2024
1 parent 3c8da9c commit cf906c7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ubi8-openjdk-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ modules:
repositories:
- path: modules
install:
- name: jboss.container.util.pkg-update
- name: jboss.container.openjdk.jdk
version: "11"
- name: jboss.container.prometheus
Expand All @@ -55,7 +56,6 @@ modules:
- name: jboss.container.maven
version: "3.8.11"
- name: jboss.container.java.s2i.bash
- name: jboss.container.util.pkg-update
- name: jboss.container.util.tzdata
# required due to jolokia
- name: jboss.container.java.singleton-jdk
Expand Down
2 changes: 1 addition & 1 deletion ubi8-openjdk-17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ modules:
repositories:
- path: modules
install:
- name: jboss.container.util.pkg-update
- name: jboss.container.openjdk.jdk
version: "17"
- name: jboss.container.prometheus
Expand All @@ -55,7 +56,6 @@ modules:
version: "3.8.17"
- name: jboss.container.util.tzdata
- name: jboss.container.java.s2i.bash
- name: jboss.container.util.pkg-update

help:
add: true
Expand Down
2 changes: 1 addition & 1 deletion ubi8-openjdk-8-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ modules:
repositories:
- path: modules
install:
- name: jboss.container.util.pkg-update
- name: jboss.container.openjdk.jre
version: "8"
- name: jboss.container.java.jre.run
- name: jboss.container.tar
- name: jboss.container.util.pkg-update
- name: jboss.container.util.tzdata

help:
Expand Down
2 changes: 1 addition & 1 deletion ubi8-openjdk-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ modules:
repositories:
- path: modules
install:
- name: jboss.container.util.pkg-update
- name: jboss.container.openjdk.jdk
version: "8"
- name: jboss.container.prometheus
Expand All @@ -55,7 +56,6 @@ modules:
- name: jboss.container.maven
version: "3.8.8"
- name: jboss.container.java.s2i.bash
- name: jboss.container.util.pkg-update
- name: jboss.container.util.tzdata

help:
Expand Down

0 comments on commit cf906c7

Please sign in to comment.