Skip to content

Commit 98d4e8f

Browse files
committed
Trixe support
puppetlabs#613
1 parent e627cdb commit 98d4e8f

File tree

4 files changed

+93
-1
lines changed

4 files changed

+93
-1
lines changed

613.patch

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
From 76c39627ebc114913e532474f0c4e98c4fed3d14 Mon Sep 17 00:00:00 2001
2+
From: Michael Prokop <[email protected]>
3+
Date: Tue, 2 Sep 2025 12:14:35 +0200
4+
Subject: [PATCH] Add support for Debian 13 (trixie)
5+
6+
Debian v13 AKA trixie was released on 2025-08-09 as Debian's new stable
7+
release.
8+
---
9+
manifests/params.pp | 3 +++
10+
metadata.json | 3 ++-
11+
spec/classes/java_spec.rb | 18 ++++++++++++++++++
12+
3 files changed, 23 insertions(+), 1 deletion(-)
13+
14+
diff --git a/manifests/params.pp b/manifests/params.pp
15+
index 708d3e6f..fa352809 100644
16+
--- a/manifests/params.pp
17+
+++ b/manifests/params.pp
18+
@@ -58,6 +58,9 @@
19+
default => $facts['os']['architecture']
20+
}
21+
case $facts['os']['release']['major'] {
22+
+ '13': {
23+
+ $openjdk = 21
24+
+ }
25+
'12', '24.04': {
26+
$openjdk = 17
27+
}
28+
diff --git a/metadata.json b/metadata.json
29+
index 40bd8099..d1866765 100644
30+
--- a/metadata.json
31+
+++ b/metadata.json
32+
@@ -44,7 +44,8 @@
33+
"operatingsystemrelease": [
34+
"10",
35+
"11",
36+
- "12"
37+
+ "12",
38+
+ "13"
39+
]
40+
},
41+
{
42+
diff --git a/spec/classes/java_spec.rb b/spec/classes/java_spec.rb
43+
index 90efa9f5..dd51a098 100644
44+
--- a/spec/classes/java_spec.rb
45+
+++ b/spec/classes/java_spec.rb
46+
@@ -46,6 +46,24 @@
47+
end
48+
end
49+
50+
+ context 'on Debian Trixie (13)' do
51+
+ let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'trixie' }, release: { major: '13' }, architecture: 'amd64' } } }
52+
+
53+
+ context 'when selecting jdk' do
54+
+ let(:params) { { 'distribution' => 'jdk' } }
55+
+
56+
+ it { is_expected.to contain_package('java').with_name('openjdk-21-jdk') }
57+
+ it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.21.0-openjdk-amd64/') }
58+
+ end
59+
+
60+
+ context 'when selecting jre' do
61+
+ let(:params) { { 'distribution' => 'jre' } }
62+
+
63+
+ it { is_expected.to contain_package('java').with_name('openjdk-21-jre-headless') }
64+
+ it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.21.0-openjdk-amd64/') }
65+
+ end
66+
+ end
67+
+
68+
context 'on Ubuntu Bionic (18.04)' do
69+
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } }
70+

manifests/params.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
default => $facts['os']['architecture']
5959
}
6060
case $facts['os']['release']['major'] {
61+
'13': {
62+
$openjdk = 21
63+
}
6164
'12', '24.04': {
6265
$openjdk = 17
6366
}

metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"operatingsystemrelease": [
4545
"10",
4646
"11",
47-
"12"
47+
"12",
48+
"13"
4849
]
4950
},
5051
{

spec/classes/java_spec.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,24 @@
4646
end
4747
end
4848

49+
context 'on Debian Trixie (13)' do
50+
let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'trixie' }, release: { major: '13' }, architecture: 'amd64' } } }
51+
52+
context 'when selecting jdk' do
53+
let(:params) { { 'distribution' => 'jdk' } }
54+
55+
it { is_expected.to contain_package('java').with_name('openjdk-21-jdk') }
56+
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.21.0-openjdk-amd64/') }
57+
end
58+
59+
context 'when selecting jre' do
60+
let(:params) { { 'distribution' => 'jre' } }
61+
62+
it { is_expected.to contain_package('java').with_name('openjdk-21-jre-headless') }
63+
it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.21.0-openjdk-amd64/') }
64+
end
65+
end
66+
4967
context 'on Ubuntu Bionic (18.04)' do
5068
let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } }
5169

0 commit comments

Comments
 (0)