masatana opened a new pull request, #1298:
URL: https://github.com/apache/bigtop/pull/1298

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: 
https://cwiki.apache.org/confluence/display/BIGTOP/How+to+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 
'BIGTOP-3638: Your PR title ...'.
   -->
   
   ### Description of PR
   https://issues.apache.org/jira/browse/BIGTOP-4239
   
   I think it should always be possible to develop in a new development 
environment.
   
   ### How was this patch tested?
   
   I ran those commands on both Ubuntu 22.04, Ubuntu 24.04 & Rocky-8 and got 
BUILD SUCCESSFUL.
   
   ```
   $ sudo bigtop_toolchain/bin/puppetize.sh
   $ sudo apt install openjdk-8-jdk
   $ ./gradlew toolchain
   ```
   
   <details>
   <summary>The reason for code changes.</summary>
   
   #### gnupg.pp
   
   As of Puppet 8.4.0 (the latest version on Ubuntu 24.04), Package['gnupg'] 
already declares in `/usr/share/puppet/modules/apt/manifests/init.pp` like 
below:
   
   ```
   (snip)
     case $facts['os']['name'] {
       'Debian': {
         stdlib::ensure_packages(['gnupg'])
       }
       'Ubuntu': {
         stdlib::ensure_packages(['gnupg'])
       }
       default: {
         # Nothing in here
       }
     }
   (snip)
   ```
   
   Without the workaround, we got the error below:
   
   ```
   Error: Evaluation Error: Error while evaluating a Resource Statement, 
Duplicate declaration: Package[gnupg] is already declared at (file: 
/usr/share/puppet/modules/apt/manifests/init.pp, line: 399); cannot redeclare 
(file: /home/ubuntu/bigtop/bigtop_toolchain/manifests/gnupg.pp, line: 34) 
(file: /home/ubuntu/bigtop/bigtop_toolchain/manifests/gnupg.pp, line: 34, 
column: 5) on node ip-172-31-41-39.ap-northeast-1.compute.internal
   ```
   
   #### packages.gradle
   
   Theare is a behavior changes between Ubuntu 22.04 and Ubuntu 24.04. We have 
to use realpath as a workaround.
   
   * Ubuntu 22.04
   
   ```
   ubuntu@ip-172-31-30-135:~$ cat /etc/os-release
   PRETTY_NAME="Ubuntu 22.04.5 LTS"
   NAME="Ubuntu"
   VERSION_ID="22.04"
   VERSION="22.04.5 LTS (Jammy Jellyfish)"
   VERSION_CODENAME=jammy
   ID=ubuntu
   ID_LIKE=debian
   HOME_URL="https://www.ubuntu.com/";
   SUPPORT_URL="https://help.ubuntu.com/";
   BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/";
   
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy";
   UBUNTU_CODENAME=jammy
   ubuntu@ip-172-31-30-135:~$ dpkg-query -S `realpath /bin/sh`
   dpkg-query: no path found matching pattern /usr/bin/dash
   ubuntu@ip-172-31-30-135:~$ dpkg-query -S /bin/sh
   diversion by dash from: /bin/sh
   diversion by dash to: /bin/sh.distrib
   dash: /bin/sh
   ```
   
   * Ubuntu 24.04
   
   ```
   ubuntu@ip-172-31-41-39:~/bigtop$ cat /etc/os-release
   PRETTY_NAME="Ubuntu 24.04.1 LTS"
   NAME="Ubuntu"
   VERSION_ID="24.04"
   VERSION="24.04.1 LTS (Noble Numbat)"
   VERSION_CODENAME=noble
   ID=ubuntu
   ID_LIKE=debian
   HOME_URL="https://www.ubuntu.com/";
   SUPPORT_URL="https://help.ubuntu.com/";
   BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/";
   
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy";
   UBUNTU_CODENAME=noble
   LOGO=ubuntu-logo
   ubuntu@ip-172-31-41-39:~/bigtop$ dpkg-query -S `realpath /bin/sh`
   dash: /usr/bin/dash
   ubuntu@ip-172-31-41-39:~/bigtop$ dpkg-query -S /bin/sh
   dpkg-query: no path found matching pattern /bin/sh
   ```
   
   </details>
   
   
   ### For code changes:
   
   - [x] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'BIGTOP-3638. Your PR title ...')?
   - [x] Make sure that newly added files do not have any licensing issues. 
When in doubt refer to https://www.apache.org/licenses/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to