This is an automated email from the ASF dual-hosted git repository.

iwasakims pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bigtop.git


The following commit(s) were added to refs/heads/master by this push:
     new 98d15c830 BIGTOP-3990. Add Debian 12 (bookworm) as a development 
environment (#1303)
98d15c830 is described below

commit 98d15c8308a11c27d8e9829431e1a4815bb9c7e3
Author: Ben Tullis <[email protected]>
AuthorDate: Mon Nov 18 04:09:27 2024 +0000

    BIGTOP-3990. Add Debian 12 (bookworm) as a development environment (#1303)
---
 bigtop_toolchain/bin/puppetize.sh   |  2 +-
 bigtop_toolchain/manifests/jdk.pp   | 10 ----------
 bigtop_toolchain/manifests/jdk11.pp | 25 ++++++++++++++++++++++++-
 3 files changed, 25 insertions(+), 12 deletions(-)

diff --git a/bigtop_toolchain/bin/puppetize.sh 
b/bigtop_toolchain/bin/puppetize.sh
index 6eb8369aa..9ff775dbb 100755
--- a/bigtop_toolchain/bin/puppetize.sh
+++ b/bigtop_toolchain/bin/puppetize.sh
@@ -40,7 +40,7 @@ case ${ID}-${VERSION_ID} in
         apt-get -y install wget curl sudo unzip puppet 
software-properties-common puppet-module-puppetlabs-apt 
puppet-module-puppetlabs-stdlib systemd-sysv
         echo 'include_legacy_facts=true' >> /etc/puppet/puppet.conf
         ;;
-    debian-11*)
+    debian-11*|debian-12)
         apt-get update
         apt-get -y install wget curl sudo unzip puppet 
puppet-module-puppetlabs-apt puppet-module-puppetlabs-stdlib systemd-sysv gnupg 
procps
         ;;
diff --git a/bigtop_toolchain/manifests/jdk.pp 
b/bigtop_toolchain/manifests/jdk.pp
index a5dfc3c54..c72b3721e 100644
--- a/bigtop_toolchain/manifests/jdk.pp
+++ b/bigtop_toolchain/manifests/jdk.pp
@@ -16,18 +16,8 @@
 class bigtop_toolchain::jdk {
   case $::operatingsystem {
     /Debian/: {
-      # We need JDK 8, but Debian 10+ only provides the openjdk-11-jdk package 
(or greater) in the official repo.
-      # So we use Eclipse Temurin instead, following the steps described on:
-      # 
https://adoptium.net/installation/linux/#_deb_installation_on_debian_or_ubuntu
       include apt
 
-      apt::source { 'adoptium':
-        location => 'https://packages.adoptium.net/artifactory/deb/',
-        key      => {
-          id     => '3B04D753C9050D9A5D343F39843C48A565F8F04B',
-          source => 
'https://packages.adoptium.net/artifactory/api/gpg/key/public',
-        },
-      } ->
       package { 'temurin-8-jdk' :
         ensure => present,
       }
diff --git a/bigtop_toolchain/manifests/jdk11.pp 
b/bigtop_toolchain/manifests/jdk11.pp
index afd537609..886b6b6b3 100644
--- a/bigtop_toolchain/manifests/jdk11.pp
+++ b/bigtop_toolchain/manifests/jdk11.pp
@@ -15,7 +15,30 @@
 
 class bigtop_toolchain::jdk11 {
   case $::operatingsystem {
-    /(Debian|Ubuntu)/: {
+    /Debian/: {
+      # We need JDK 11, but Debian 12 only provides the openjdk-17-jdk package 
(or greater) in the official repo.
+      # So we use Eclipse Temurin instead, following the steps described on:
+      # 
https://adoptium.net/installation/linux/#_deb_installation_on_debian_or_ubuntu
+      include apt
+
+      apt::source { 'adoptium':
+        location => 'https://packages.adoptium.net/artifactory/deb/',
+        key      => {
+          id     => '3B04D753C9050D9A5D343F39843C48A565F8F04B',
+          source => 
'https://packages.adoptium.net/artifactory/api/gpg/key/public',
+        },
+      } -> if $::operatingsystemmajrelease =~ /^1[^1\D]$/ {
+        package { 'temurin-11-jdk' :
+          ensure => present,
+        }
+      }
+      else {
+        package { 'openjdk-11-jdk' :
+          ensure => present,
+        }
+      }
+    }
+    /(Ubuntu)/: {
       include apt
 
       package { 'openjdk-11-jdk' :

Reply via email to