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 c5aeb5e2a BIGTOP-4239. Add Ubuntu24.04 as a development enviornment 
(#1298)
c5aeb5e2a is described below

commit c5aeb5e2a072c11ddd9bad6cfc1c45b5c368e97f
Author: masatana <[email protected]>
AuthorDate: Sun Oct 20 20:31:34 2024 +0900

    BIGTOP-4239. Add Ubuntu24.04 as a development enviornment (#1298)
---
 bigtop_toolchain/bin/puppetize.sh    |  5 +++++
 bigtop_toolchain/manifests/gnupg.pp  |  6 ++++--
 bigtop_toolchain/manifests/python.pp | 33 ++++++++++-----------------------
 packages.gradle                      |  2 +-
 4 files changed, 20 insertions(+), 26 deletions(-)

diff --git a/bigtop_toolchain/bin/puppetize.sh 
b/bigtop_toolchain/bin/puppetize.sh
index 071062443..6eb8369aa 100755
--- a/bigtop_toolchain/bin/puppetize.sh
+++ b/bigtop_toolchain/bin/puppetize.sh
@@ -35,6 +35,11 @@ case ${ID}-${VERSION_ID} in
         apt-get update
         apt-get -y install wget curl sudo unzip puppet 
software-properties-common puppet-module-puppetlabs-apt 
puppet-module-puppetlabs-stdlib systemd-sysv
         ;;
+    ubuntu-24.04)
+        apt-get update
+        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*)
         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/gnupg.pp 
b/bigtop_toolchain/manifests/gnupg.pp
index 655f55f08..7e42915e8 100644
--- a/bigtop_toolchain/manifests/gnupg.pp
+++ b/bigtop_toolchain/manifests/gnupg.pp
@@ -30,7 +30,9 @@ class bigtop_toolchain::gnupg {
     }
   }
 
-  package { $pkg:
-    ensure => installed
+  if !defined(Package[$pkg]) {
+    package { $pkg:
+      ensure => installed
+    }
   }
 }
diff --git a/bigtop_toolchain/manifests/python.pp 
b/bigtop_toolchain/manifests/python.pp
index 21a34a812..a02af79e2 100644
--- a/bigtop_toolchain/manifests/python.pp
+++ b/bigtop_toolchain/manifests/python.pp
@@ -24,15 +24,22 @@ class bigtop_toolchain::python {
       package { 'dh-python' :
         ensure => present
       }
-      package { 'python-setuptools' :
-        ensure => present
-      }
       package { 'python3-dev' :
         ensure => present
       }
     }
   }
 
+  package { 'python3-setuptools' :
+    ensure => present
+  }
+  package { 'python3-wheel' :
+    ensure => present
+  }
+  package { 'python3-flake8' :
+    ensure => present
+  }
+
   if ($architecture in ['aarch64']) {
     case $operatingsystem{
       /(?i:(fedora|ubuntu|debian))/: {
@@ -50,26 +57,6 @@ class bigtop_toolchain::python {
     }
   }
 
-  # BIGTOP-3364: Failed to install setuptools by pip/pip2
-  # on Ubuntu-16.04/18.04 and centos-7.
-  # From 
https://packaging.python.org/tutorials/installing-packages/#requirements-for-installing-packages,
-  # it suggests to leverage python3/pip3 to install setuptools.
-  #
-  # "provider => 'pip3'" is not available for puppet 3.8.5,
-  #  Workaround: Exec {pip3 install setuptools} directly insead of Package{}.
-  package { 'python3-pip':
-    ensure => installed
-  }
-
-  exec { "Setuptools Installation":
-    command => "/usr/bin/pip3 install -q --upgrade setuptools",
-    require => Package['python3-pip']
-  }
-
-  exec { "flake8 and whell Installation":
-    command => "/usr/bin/pip3 freeze --all; /usr/bin/pip3 --version; 
/usr/bin/pip3 install -q flake8 wheel",
-    require => Package['python3-pip']
-  }
 
   # The rpm-build package had installed brp-python-bytecompile
   # just under /usr/lib/rpm until Fedora 34,
diff --git a/packages.gradle b/packages.gradle
index fbd19a5fa..29286653d 100644
--- a/packages.gradle
+++ b/packages.gradle
@@ -144,7 +144,7 @@ def devNull = new OutputStream() {
 def nativePackaging = {
   def result = exec {
     commandLine "/bin/bash", "-c",
-    """dpkg-query -S /bin/sh && exit 1
+    """(dpkg-query -S `realpath /bin/sh` || dpkg-query -S /bin/sh) && exit 1
        rpm -qf /bin/sh && exit 2
        exit 0
     """

Reply via email to