Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Openjdk-2587] reinstall tzdata rpm for ubi8 #427

Merged
merged 3 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions modules/util/tzdata/execute.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail

for candidate in yum dnf microdnf; do
if command -v "$candidate"; then
mgr="$(command -v "$candidate")"
"$mgr" reinstall tzdata -y && \
"$mgr" -y clean all
exit
fi
done

echo "cannot find a package manager" >&2
exit 1
7 changes: 7 additions & 0 deletions modules/util/tzdata/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
schema_version: 1
name: jboss.container.util.tzdata
version: '1.0'
description: Reinstall the tzdata package, to ensure zoneinfo is present

execute:
- script: execute.sh
9 changes: 8 additions & 1 deletion tests/features/java/openjdk.feature
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,16 @@ Feature: Miscellaneous OpenJDK-related unit tests
Then container log should not contain libxkbcommon
Then container log should not contain kbd

@ubi8
Scenario: Ensure tzdata RPM is properly installed (OPENJDK-2587)
When container is started with args
| arg | value |
| command | rpm -V tzdata |
Then available container log should not contain missing

@ubi8
Scenario: Ensure tar is installed (OPENJDK-2588)
When container is started with args
| arg | value |
| command | tar |
Then available container log should not contain command not found
Then available container log should not contain command not found
1 change: 1 addition & 0 deletions ubi8-openjdk-11-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ modules:
- name: jboss.container.util.pkg-update
- name: jboss.container.openjdk.jre
version: "11"
- name: jboss.container.util.tzdata
- name: jboss.container.tar
- name: jboss.container.java.jre.run

Expand Down
1 change: 1 addition & 0 deletions ubi8-openjdk-11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ modules:
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
1 change: 1 addition & 0 deletions ubi8-openjdk-17-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ modules:
- name: jboss.container.util.pkg-update
- name: jboss.container.openjdk.jre
version: "17"
- name: jboss.container.util.tzdata
- name: jboss.container.tar
- name: jboss.container.java.jre.run

Expand Down
1 change: 1 addition & 0 deletions ubi8-openjdk-17.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ modules:
version: "8.6.17"
- name: jboss.container.maven
version: "3.8.17"
- name: jboss.container.util.tzdata
- name: jboss.container.java.s2i.bash
- name: jboss.container.util.pkg-update

Expand Down
1 change: 1 addition & 0 deletions ubi8-openjdk-21-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ modules:
- name: jboss.container.tar
- name: jboss.container.openjdk.jre
version: "21"
- name: jboss.container.util.tzdata
- name: jboss.container.java.jre.run

help:
Expand Down
1 change: 1 addition & 0 deletions ubi8-openjdk-21.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ modules:
version: "21"
- name: jboss.container.maven
version: "3.8.17"
- name: jboss.container.util.tzdata
- name: jboss.container.java.s2i.bash
- name: jboss.container.java.singleton-jdk

Expand Down
1 change: 1 addition & 0 deletions ubi8-openjdk-8-runtime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ modules:
- name: jboss.container.java.jre.run
- name: jboss.container.tar
- name: jboss.container.util.pkg-update
- name: jboss.container.util.tzdata

help:
add: true
Expand Down
1 change: 1 addition & 0 deletions ubi8-openjdk-8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ modules:
version: "3.8.8"
- name: jboss.container.java.s2i.bash
- name: jboss.container.util.pkg-update
- name: jboss.container.util.tzdata

help:
add: true
Expand Down
Loading