This is an automated email from the ASF dual-hosted git repository.
tuhaihe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry-go-libs.git
The following commit(s) were added to refs/heads/main by this push:
new b2dee8a ASF: update files for compliance (#20)
b2dee8a is described below
commit b2dee8a6ae5448bebfc2db2ee8fd0c1ccd0a0620
Author: Dianjin Wang <[email protected]>
AuthorDate: Sat May 16 19:27:23 2026 +0800
ASF: update files for compliance (#20)
---
.github/ISSUE_TEMPLATE/bug-report.yml | 28 +++-
.github/ISSUE_TEMPLATE/config.yml | 37 ++++-
.github/pull_request_template.md | 13 +-
.github/workflows/apache-rat-audit.yml | 274 +++++++++++++++++++++++++++++++++
CODE_OF_CONDUCT.md | 158 ++++---------------
CONTRIBUTING.md | 50 ++++--
DISCLAIMER | 9 ++
NOTICE | 25 +--
README.apache.md | 44 ++++++
README.md | 56 +++++--
SECURITY.md | 99 ++++++------
pom.xml | 166 ++++++++++++++++++++
12 files changed, 712 insertions(+), 247 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml
b/.github/ISSUE_TEMPLATE/bug-report.yml
index 965783d..a4f3393 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -1,14 +1,34 @@
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+
name: "\U0001F41B Bug Report"
-description: Problems and issues with code in gp-common-go-libs for
CloudberryDB.
+description: Problems and issues with code in cloudberry-go-libs for Apache
Cloudberry.
title: "[Bug] "
labels: ["type: Bug"]
body:
- type: markdown
attributes:
- value: "Thank you for reporting the problem! We really appreciate your
efforts to improve Cloudberry Database. Before reporting it, please (ideally)
test on the latest release or main to see if the issue is fixed."
+ value: "Thank you for reporting the problem! We really appreciate your
efforts to improve Apache Cloudberry. Before reporting it, please (ideally)
test on the latest release or main to see if the issue is fixed."
- type: textarea
attributes:
- label: Cloudberry Database version
+ label: Apache Cloudberry version
description: What version are you using?
- type: textarea
attributes:
@@ -56,7 +76,7 @@ body:
options:
- label: >
I agree to follow this project's
- [Code of Conduct](https://cloudberrydb.org/community/coc).
+ [Code of
Conduct](https://github.com/apache/cloudberry/blob/main/CODE_OF_CONDUCT.md).
required: true
- type: markdown
attributes:
diff --git a/.github/ISSUE_TEMPLATE/config.yml
b/.github/ISSUE_TEMPLATE/config.yml
index a3a57eb..b9a5157 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,14 +1,37 @@
-blank_issues_enabled: false
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+
+blank_issues_enabled: true
contact_links:
- name: 🙏🏻 Q&A
- url: https://github.com/orgs/cloudberrydb/discussions/categories/q-a
- about: Ask for help when running/developing Cloudberry Database.
+ url: https://github.com/apache/cloudberry/discussions/categories/q-a
+ about: Ask for help when running/developing Apache Cloudberry.
- name: 💡️ New Ideas / Feature Requests
- url:
https://github.com/orgs/cloudberrydb/discussions/categories/ideas-feature-requests
+ url:
https://github.com/apache/cloudberry/discussions/categories/ideas-feature-requests
about: Share ideas for new features.
- name: 🎙️ Submit Your Proposal
- url: https://github.com/orgs/cloudberrydb/discussions/categories/proposal
- about: As a developer, proposing any major change or enhancement to
Cloudberry Database.
+ url: https://github.com/apache/cloudberry/discussions/categories/proposal
+ about: As a developer, proposing any major change or enhancement to Apache
Cloudberry.
- name: 💬️ Join Slack for Real-time Chat
- url: https://communityinviter.com/apps/cloudberrydb/welcome
+ url: https://inviter.co/apache-cloudberry
about: Real-time chat including QA, Dev, Events and more.
+ - name: 🪲 Issues for Website, Docs
+ url: https://github.com/apache/cloudberry-site/issues
+ about: Hey, we have one dedicated repo for the website and docs.
\ No newline at end of file
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 0dfb7e8..18c97eb 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,6 +1,7 @@
<!--Thank you for contributing! -->
+
<!--In case of an existing issue or discussions, please reference it-->
-fix #ISSUE_Number
+closes: #ISSUE_Number
<!--Remove this section if no corresponding issue.-->
---
@@ -13,8 +14,8 @@ fix #ISSUE_Number
Here are some reminders before you submit your pull request:
-* Make sure that your Pull Request has a clear title and commit message. You
can take the [Git commit
template](https://github.com/cloudberrydb/cloudberrydb/blob/main/.gitmessage)
as a reference.
-* Sign the Contributor License Agreement as prompted for your first-time
contribution (*One-time setup*).
-* Learn the [code contribution](https://cloudberrydb.org/contribute/code) and
[doc contribution](https://cloudberrydb.org/contribute/doc) guides for better
collaboration.
-* List your communications in the [GitHub
Issues](https://github.com/cloudberrydb/cloudberrydb-site/issues) or
[Discussions](https://github.com/orgs/cloudberrydb/discussions) (if has or
needed).
-* Feel free to ask for the cloudberrydb team to help review and approve.
+* Make sure that your Pull Request has a clear title and commit message. You
can take the [Git commit
template](https://github.com/apache/cloudberry/blob/main/.gitmessage) as a
reference.
+* Learn the [code contribution](https://cloudberry.apache.org/contribute/code)
and [doc contribution](https://cloudberry.apache.org/contribute/doc) guides for
better collaboration.
+* Make sure that CICD workflow is successful.
+* List your communications in the [GitHub
Issues](https://github.com/apache/cloudberry-go-libs/issues) or
[Discussions](https://github.com/apache/cloudberry/discussions) (if has or
needed).
+* Feel free to ask for the [cloudberry
committers](https://github.com/orgs/apache/teams/cloudberry-committers) or
other people to help review and approve.
\ No newline at end of file
diff --git a/.github/workflows/apache-rat-audit.yml
b/.github/workflows/apache-rat-audit.yml
new file mode 100644
index 0000000..ef6b44e
--- /dev/null
+++ b/.github/workflows/apache-rat-audit.yml
@@ -0,0 +1,274 @@
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+# Apache Cloudberry Go-libs (Incubating) Compliance Workflow
+#
+# Comprehensive compliance checks for Apache Cloudberry Go-libs:
+# 1. Apache RAT license header validation
+# 2. Copyright year verification (NOTICE)
+# 3. Binary file presence detection
+#
+# Based on Apache Rat tool, run locally with:
+# `mvn clean verify -Drat.consoleOutput=true`
+# --------------------------------------------------------------------
+
+name: Apache Rat License Check
+
+on:
+ push:
+ branches: [main, REL_2_STABLE]
+ pull_request:
+ branches: [main, REL_2_STABLE]
+ types: [opened, synchronize, reopened, edited]
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ rat-check:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+
+ steps:
+ - name: Check out repository
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 1
+
+ - name: Set up Java and Maven
+ uses: actions/setup-java@v3
+ with:
+ distribution: 'temurin'
+ java-version: '11'
+ cache: maven
+
+ - name: Run Apache Rat check
+ run: |
+ echo "Running Apache Rat license check..."
+ mvn clean verify -Drat.consoleOutput=true
+
+ # Check for build failure
+ if grep -q "\[INFO\] BUILD FAILURE" target/rat.txt; then
+ echo "::error::Apache Rat check failed - build failure detected"
+ echo "RAT_CHECK=fail" >> $GITHUB_ENV
+ else
+ echo "RAT_CHECK=pass" >> $GITHUB_ENV
+ echo "Apache Rat check passed successfully"
+ fi
+
+ - name: Check copyright years are up-to-date
+ run: |
+ echo "Checking copyright years..."
+ current_year=$(date -u +"%Y")
+ echo "CURRENT_YEAR=$current_year" >> $GITHUB_ENV
+
+ # Initialize to pass, will be updated if checks fail
+ echo "NOTICE_CHECK=pass" >> $GITHUB_ENV
+
+ # Check NOTICE file
+ echo "Checking NOTICE file..."
+ if ! grep -q "Copyright 2024-$current_year The Apache Software
Foundation" NOTICE; then
+ echo "::error::NOTICE file does not contain the current year
($current_year)"
+ echo "NOTICE_CHECK=fail" >> $GITHUB_ENV
+ else
+ echo "PASS: NOTICE file contains the current year ($current_year)"
+ fi
+
+ # Continue execution even if checks fail
+ if [ "$NOTICE_CHECK" = "pass" ]; then
+ echo "All copyright year checks passed"
+ else
+ echo "Copyright year checks completed with errors"
+ fi
+
+ - name: Check for binary files
+ run: |
+ echo "Checking for binary files..."
+ echo "Checking extensions: class, jar, tar, tgz, zip, exe, dll, so,
gz, bz2"
+ echo
"----------------------------------------------------------------------"
+
+ # Check for specific binary file extensions
+ binary_extensions="class jar tar tgz zip exe dll so gz bz2"
+ echo "BINARY_EXTENSIONS=${binary_extensions}" >> $GITHUB_ENV
+ binary_results=""
+ binaryfiles_found=false
+
+ for extension in ${binary_extensions}; do
+ printf "Checking *.%-4s files..." "${extension}"
+ found=$(find . -name "*.${extension}" -type f || true)
+
+ if [ -n "$found" ]; then
+ echo "FOUND"
+ echo "::error::${extension} files should not exist"
+ echo "For ASF compatibility: the source tree should not contain"
+ echo "binary files as users have a hard time verifying their
contents."
+ echo "Found files:"
+ echo "$found" | sed 's/^/ /'
+ echo "${extension}:${found}" >> binary_results.txt
+ binaryfiles_found=true
+ else
+ echo "NONE"
+ echo "${extension}:none" >> binary_results.txt
+ fi
+ done
+
+ echo
"----------------------------------------------------------------------"
+ if [ "$binaryfiles_found" = true ]; then
+ echo "ERROR: Binary files were found in the source tree"
+ echo "BINARY_CHECK=fail" >> $GITHUB_ENV
+ else
+ echo "PASS: No binary files found"
+ echo "BINARY_CHECK=pass" >> $GITHUB_ENV
+ fi
+
+ - name: Upload Rat check results
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: rat-check-results
+ path: target/rat.txt
+ retention-days: 7
+
+ - name: Generate Job Summary
+ if: always()
+ run: |
+ {
+ echo "## Apache Cloudberry Go-libs Compliance Audit Results"
+ echo "- Run Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
+ echo ""
+
+ # Copyright Year Check Summary
+ echo "### Copyright Year Checks"
+ echo "**NOTICE file:**"
+ if [ "$NOTICE_CHECK" = "pass" ]; then
+ echo "PASS: Contains current year ($CURRENT_YEAR)"
+ else
+ echo "ERROR: Does not contain current year ($CURRENT_YEAR)"
+ fi
+ echo ""
+
+ # Binary Files Check Summary
+ echo "### Binary Files Check"
+ echo "Checked extensions: \`${BINARY_EXTENSIONS}\`"
+ echo ""
+ echo "Results:"
+ echo "\`\`\`"
+ if [ -f binary_results.txt ]; then
+ while IFS=: read -r ext files; do
+ if [ "$files" = "none" ]; then
+ echo "PASS: No .${ext} files found"
+ else
+ echo "ERROR: Found .${ext} files:"
+ echo "$files" | sed 's/^/ /'
+ fi
+ done < binary_results.txt
+ fi
+ echo "\`\`\`"
+ echo ""
+
+ # Rat check summary
+ if [[ -f target/rat.txt ]]; then
+ # First extract and display summary statistics (only once)
+ if grep -q "Rat check: Summary over all files" target/rat.txt;
then
+ echo "### License Header Check"
+ summary_line=$(grep "Rat check: Summary over all files"
target/rat.txt)
+ echo "\`\`\`"
+ echo "$summary_line"
+ echo "\`\`\`"
+ echo ""
+ fi
+
+ # Then determine the result status
+ if [ "$RAT_CHECK" = "fail" ]; then
+ echo "#### Check Failed - License Compliance Issues Detected"
+ echo ""
+
+ # Extract and display files with unapproved licenses
+ if grep -q "Files with unapproved licenses:" target/rat.txt;
then
+ echo "##### Files with Unapproved Licenses"
+ echo "\`\`\`"
+ # Get the line with "Files with unapproved licenses:" and
all following lines until the dashed line
+ sed -n '/Files with unapproved licenses:/,/\[INFO\]
------------------------------------------------------------------------/p'
target/rat.txt | \
+ grep -v "\[INFO\]
------------------------------------------------------------------------" | \
+ grep -v "^$" | \
+ head -20
+ echo "\`\`\`"
+ echo ""
+ fi
+
+ echo "**How to fix:**"
+ echo ""
+ echo "**For new original files you created:**"
+ echo "- Add the standard Apache License header to each file"
+ echo ""
+ echo "**For third-party files with different licenses:**"
+ echo "- Add the file to exclusion list in \`pom.xml\` under
the rat-maven-plugin configuration"
+ echo "- Ensure the license is compatible with Apache License
2.0"
+ echo "- Avoid introducing components with incompatible
licenses"
+ echo ""
+ echo "**Need help?**"
+ echo "- Run \`mvn clean verify -Drat.consoleOutput=true\`
locally for the full report"
+ echo "- Email [email protected] if you have questions
about license compatibility"
+
+ elif [ "$RAT_CHECK" = "pass" ]; then
+ echo "#### Check Passed - All Files Comply with Apache License
Requirements"
+ fi
+ fi
+ } >> "$GITHUB_STEP_SUMMARY"
+
+ - name: Report Status
+ if: always()
+ shell: bash {0}
+ run: |
+ # Check overall status of all checks
+ overall_status=0
+
+ # Check Apache RAT status
+ if [ "$RAT_CHECK" = "fail" ]; then
+ echo "ERROR: Apache Rat check failed"
+ overall_status=1
+ elif [ "$RAT_CHECK" = "pass" ]; then
+ echo "Apache Rat check passed"
+ fi
+
+ # Check copyright year status
+ if [ -n "$NOTICE_CHECK" ] && [ "$NOTICE_CHECK" = "fail" ]; then
+ echo "ERROR: NOTICE file copyright year check failed"
+ overall_status=1
+ fi
+
+ # Check binary files status (if this variable exists)
+ if [ -n "$BINARY_CHECK" ] && [ "$BINARY_CHECK" = "fail" ]; then
+ echo "ERROR: Binary files check failed"
+ overall_status=1
+ fi
+
+ # Exit with appropriate status
+ if [ $overall_status -eq 0 ]; then
+ echo "SUCCESS: All checks passed"
+ exit 0
+ else
+ echo "FAILURE: One or more checks failed"
+ exit 1
+ fi
\ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 922d7f5..8c56ac8 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,131 +1,27 @@
-# Contributor Covenant Code of Conduct
-
-## Our Pledge
-
-We as members, contributors, and leaders pledge to make participation in our
-community a harassment-free experience for everyone, regardless of age, body
-size, visible or invisible disability, ethnicity, sex characteristics, gender
-identity and expression, level of experience, education, socio-economic status,
-nationality, personal appearance, race, caste, color, religion, or sexual
-identity and orientation.
-
-We pledge to act and interact in ways that contribute to an open, welcoming,
-diverse, inclusive, and healthy community.
-
-## Our Standards
-
-Examples of behavior that contributes to a positive environment for our
-community include:
-
-* Demonstrating empathy and kindness toward other people
-* Being respectful of differing opinions, viewpoints, and experiences
-* Giving and gracefully accepting constructive feedback
-* Accepting responsibility and apologizing to those affected by our mistakes,
- and learning from the experience
-* Focusing on what is best not just for us as individuals, but for the overall
- community
-
-Examples of unacceptable behavior include:
-
-* The use of sexualized language or imagery, and sexual attention or advances
of
- any kind
-* Trolling, insulting or derogatory comments, and personal or political attacks
-* Public or private harassment
-* Publishing others' private information, such as a physical or email address,
- without their explicit permission
-* Other conduct which could reasonably be considered inappropriate in a
- professional setting
-
-## Enforcement Responsibilities
-
-Community leaders are responsible for clarifying and enforcing our standards of
-acceptable behavior and will take appropriate and fair corrective action in
-response to any behavior that they deem inappropriate, threatening, offensive,
-or harmful.
-
-Community leaders have the right and responsibility to remove, edit, or reject
-comments, commits, code, wiki edits, issues, and other contributions that are
-not aligned to this Code of Conduct, and will communicate reasons for
moderation
-decisions when appropriate.
-
-## Scope
-
-This Code of Conduct applies within all community spaces, and also applies when
-an individual is officially representing the community in public spaces.
-Examples of representing our community include using an official e-mail
address,
-posting via an official social media account, or acting as an appointed
-representative at an online or offline event.
-
-## Enforcement
-
-Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported to the community leaders responsible for enforcement at
[email protected].
-All complaints will be reviewed and investigated promptly and fairly.
-
-All community leaders are obligated to respect the privacy and security of the
-reporter of any incident.
-
-## Enforcement Guidelines
-
-Community leaders will follow these Community Impact Guidelines in determining
-the consequences for any action they deem in violation of this Code of Conduct:
-
-### 1. Correction
-
-**Community Impact**: Use of inappropriate language or other behavior deemed
-unprofessional or unwelcome in the community.
-
-**Consequence**: A private, written warning from community leaders, providing
-clarity around the nature of the violation and an explanation of why the
-behavior was inappropriate. A public apology may be requested.
-
-### 2. Warning
-
-**Community Impact**: A violation through a single incident or series of
-actions.
-
-**Consequence**: A warning with consequences for continued behavior. No
-interaction with the people involved, including unsolicited interaction with
-those enforcing the Code of Conduct, for a specified period of time. This
-includes avoiding interactions in community spaces as well as external channels
-like social media. Violating these terms may lead to a temporary or permanent
-ban.
-
-### 3. Temporary Ban
-
-**Community Impact**: A serious violation of community standards, including
-sustained inappropriate behavior.
-
-**Consequence**: A temporary ban from any sort of interaction or public
-communication with the community for a specified period of time. No public or
-private interaction with the people involved, including unsolicited interaction
-with those enforcing the Code of Conduct, is allowed during this period.
-Violating these terms may lead to a permanent ban.
-
-### 4. Permanent Ban
-
-**Community Impact**: Demonstrating a pattern of violation of community
-standards, including sustained inappropriate behavior, harassment of an
-individual, or aggression toward or disparagement of classes of individuals.
-
-**Consequence**: A permanent ban from any sort of public interaction within the
-community.
-
-## Attribution
-
-This Code of Conduct is adapted from the [Contributor Covenant][homepage],
-version 2.1, available at
-[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
-
-Community Impact Guidelines were inspired by
-[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
-
-For answers to common questions about this code of conduct, see the FAQ at
-[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
-[https://www.contributor-covenant.org/translations][translations].
-
-[homepage]: https://www.contributor-covenant.org
-[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
-[Mozilla CoC]: https://github.com/mozilla/diversity
-[FAQ]: https://www.contributor-covenant.org/faq
-[translations]: https://www.contributor-covenant.org/translations
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Code of Conduct
+
+Apache Cloudberry (Incubating) follows the ASF [Code of
+Conduct](https://www.apache.org/foundation/policies/conduct).
+
+If you observe behavior that violates those rules please follow the
+[ASF reporting
+guidelines](https://www.apache.org/foundation/policies/conduct#reporting-guidelines).
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 882aebb..0672875 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,10 +1,29 @@
-Cloudberry Database community welcomes contributions from anyone, new and
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+Apache Cloudberry community welcomes contributions from anyone, new and
experienced! We appreciate your interest in contributing. This guide will help
you get started with the contribution.
## Code of Conduct
-Everyone who participates in Cloudberry Database, either as a user or a
+Everyone who participates in Apache Cloudberry, either as a user or a
contributor, is obliged to follow our community [Code of
Conduct](./CODE_OF_CONDUCT.md). Every violation against it will be reviewed
and investigated and will result in a response that is deemed necessary and
@@ -13,10 +32,10 @@ confidentiality regarding the reporter of an incident.
Some behaviors that contribute to creating a positive environment include:
-* Use welcoming and inclusive language.
-* Respect differing viewpoints and experiences.
-* Accept constructive criticism gracefully.
-* Foster what's best for the community.
+* Use welcoming and inclusive language.
+* Respect differing viewpoints and experiences.
+* Accept constructive criticism gracefully.
+* Foster what's best for the community.
* Show empathy for community members.
## GitHub Contribution Workflow
@@ -24,27 +43,28 @@ Some behaviors that contribute to creating a positive
environment include:
1. Fork this repo to your own GitHub account.
2. Clone down the repo to your local system.
-```
+```
git clone https://github.com/your-user-name/cloudberry-go-libs.git
```
3. Add the upstream repo. (You only have to do this once, not every time.)
-```
+```
git remote add upstream https://github.com/apache/cloudberry-go-libs.git
```
4. Create a new branch to hold your work.
-```
+```
git checkout -b new-branch-name
```
-5. Work on your new code.
+5. Work on your new code.
+
6. Commit your changes.
-```
-git add <the change files>
+```
+git add <the change files>
git commit
```
@@ -71,9 +91,7 @@ Before working on your next contribution, make sure your
local repository is
up to date:
```
-git checkout main
-git fetch upstream
+git checkout main
+git fetch upstream
git rebase upstream/main
```
-
-```
diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 0000000..2390116
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,9 @@
+Apache Cloudberry is an effort undergoing incubation at The Apache
+Software Foundation (ASF), sponsored by the Apache
+Incubator. Incubation is required of all newly accepted projects until
+a further review indicates that the infrastructure, communications,
+and decision making process have stabilized in a manner consistent
+with other successful ASF projects. While incubation status is not
+necessarily a reflection of the completeness or stability of the code,
+it does indicate that the project has yet to be fully endorsed by the
+ASF.
diff --git a/NOTICE b/NOTICE
index d776753..873f1a7 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,25 +1,12 @@
-gp-common-go-libs for CloudberryDB
+Apache Cloudberry (Incubating)
+Copyright 2024-2026 The Apache Software Foundation
-Portions Copyright 2016-2023 HashData Technology Limited. or its affiliates.
-All Rights Reserved.
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
+---------------------------------------------------------------------------
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-This product may include a number of subcomponents with separate copyright
-notices and license terms. Your use of these subcomponents is subject to the
-terms and conditions of the subcomponent's license.
-
---------------------------------------
+This product includes software originally developed by VMware.
Greenplum Database Common Go Libraries
diff --git a/README.apache.md b/README.apache.md
new file mode 100644
index 0000000..020dd78
--- /dev/null
+++ b/README.apache.md
@@ -0,0 +1,44 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Apache Cloudberry Go-libs (Incubating) License Audit Notes
+
+This file documents licensing clarifications and exceptions as part of ASF
+release readiness for Apache Cloudberry Go-libs (Incubating).
+
+## Historical Attribution Under Apache License 2.0
+
+The following entities have contributed to the Greenplum Database Common Go
+Libraries source code under the Apache License 2.0:
+
+- Greenplum, Inc.
+- EMC Corporation
+- VMware, Inc.
+- Pivotal Software
+
+RAT matchers are used to classify their license headers accordingly.
+
+## Binary Files in Source
+
+This project does not include any binary files in the source tree. All files
+are source code files with Apache License 2.0 headers.
+
+## Compressed Files in Source
+
+This project does not include any compressed/archived files in the source tree.
diff --git a/README.md b/README.md
index 19aa595..c2c0d94 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,54 @@
-# go-libs for Apache Cloudberry (Incubating)
-
-[](https://communityinviter.com/apps/cloudberrydb/welcome)
-[](https://twitter.com/cloudberrydb)
-[](https://cloudberry.apache.org)
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Go Libraries for Apache Cloudberry (Incubating)
+
+[](https://cloudberry.apache.org)
+[](https://cloudberry.apache.org/docs)
+[](https://inviter.co/apache-cloudberry)
+[](https://twitter.com/ASFCloudberry)
+[](https://cloudberry.apache.org/community/wechat)
+[](https://youtube.com/@ApacheCloudberry)
+[](https://github.com/apache/cloudberry/discussions)
---
-This project is a fork of the `Greenplum gp-common-go-libs`, which is a
-dependency for the [gpbackup](https://github.com/cloudberrydb/gpbackup)
-utility in Cloudberry.
+## Introduction
+
+This repository contains the Go libraries used by Apache Cloudberry
(Incubating)
+and its ecosystem projects. It provides common utilities and functionality that
+are shared across multiple Cloudberry components.
-Please note that this repository is only maintained for Cloudberry 1.0 and
-its later versions.
+## Contribution
+
+See [CONTRIBUTING.md](./CONTRIBUTING.md) for how to make contributions to this
+repository. We welcome all types of contributions including code enhancements,
+bug fixes, documentation improvements, and more.
## License
-Licensed under Apache License Version 2.0. For more details, please refer to
-the [LICENSE](./LICENSE).
+Cloudberry is licensed under the Apache License, Version 2.0. For details, see
+the [LICENSE](./LICENSE) file.
## Acknowledgment
-Thanks to all the gp-common-go-libs contributors, more details in its [GitHub
+This project is derived from
[greenplum/gp-common-go-libs](https://github.com/greenplum-db/gp-common-go-libs)
and customized for Apache Cloudberry.
+
+Thanks to all the `gp-common-go-libs` contributors, more details in its [GitHub
page](https://github.com/greenplum-db/gp-common-go-libs).
diff --git a/SECURITY.md b/SECURITY.md
index 36b4887..a85186f 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -1,63 +1,60 @@
-Thanks for helping make Cloudberry Database safe!
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+# Security Policy
+
+The Apache Security Team handles all security issues across Apache projects and
+coordinates the response to vulnerabilities. For details on the vulnerability
+handling process, supported versions, and what is considered a security issue,
+visit: https://www.apache.org/security/.
----
-
-## Reporting Security Issues
-
-To report a security issue, please email
-[[email protected]](mailto:[email protected]). This
-project follows a 90-day disclosure timeline. We will publish the
-[security
-advisories](https://github.com/cloudberrydb/cloudberrydb/security/advisories)
-via GitHub.
-
-You should receive a response within 2 weeks. If for some reason you
-do not, please follow up via email to ensure we received your original
-message.
-
-Please include the requested information listed below (as much as you
-can provide) to help us better understand the nature and scope of the
-possible issue:
+## Do not
-* Type of issue (e.g. buffer overflow, SQL injection, cross-site
- scripting, etc.)
-* Full paths of source file(s) related to the manifestation of the
- issue
-* The location of the affected source code (tag/branch/commit or
- direct URL)
-* Any special configuration required to reproduce the issue
-* Step-by-step instructions to reproduce the issue
-* Proof-of-concept or exploit code (if possible)
-* Impact of the issue, including how an attacker might exploit the
- issue
+For better collaboration, we hope you:
-This information will help us triage your report more quickly.
+- DO NOT report non-security-impacting bugs through this channel. If you have
+ any questions on using, development, please use [GitHub
+ Issues](https://github.com/apache/cloudberry-go-libs/issues),
+ [Discussions](https://github.com/apache/cloudberry-go-libs/discussions),
[Dev mailing
+ list](https://cloudberry.apache.org/community/mailing-lists) or
+ [Slack](https://inviter.co/apache-cloudberry) instead.
+- DO NOT report security issues on public GitHub Issues, Jira tickets, mailing
+ lists, or other public forums.
-## Do not
+## Reporting Security Issues
-For better collaboration, we hope you:
+Send your report to: [[email protected]](mailto:[email protected]).
-- Do not file public issues on GitHub for security vulnerabilities.
-- Do not report non-security-impacting bugs through this channel. If
- you have any questions on using, development, please use [GitHub
- Issues, Discussions or
- Slack](https://github.com/cloudberrydb/cloudberrydb/issues/new/choose)
- instead.
+Please send one plain-text email per vulnerability with the following and
+additional information as necessary (as much as you can provide):
-## Handling Process
+- Description of the vulnerability
+- Steps to reproduce
+- Affected versions
+- Potential impact
+- Any known mitigations
+- (Optional) Suggested fix
-Here's an overview of the security issues handling process:
+## Public Discussion
-* The reporter reports the security issues to the Cloudberry Database
- team.
-* The Cloudberry Database team investigates the report and decides to
- accept or reject the report. If our team rejects the report, the
- team will explain why to the reporter. If we accept the report, our
- team will work privately with the reporter to fix the security
- issues.
-* Release the new version of the Cloudberry Database that includes the
- fix.
-* Public the security issues.
+For general security questions or discussions, please use the development
+mailing list: [[email protected]](mailto:[email protected])
## Preferred Languages
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..c9cbd64
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to you under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+Usage:
+This pom.xml file defines the Apache RAT license matching rules used to
+validate the source tree for Apache Cloudberry Go-libs (Incubating).
+
+Do not modify matcher categories without reviewing their use across the
+source tree. Add new license matchers as needed when introducing third-party
+code or new licensing patterns.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.cloudberry</groupId>
+ <artifactId>apache-cloudberry-go-libs-incubating</artifactId>
+ <version>2.1.0-incubating</version>
+ <packaging>pom</packaging>
+
+ <name>Apache Cloudberry Go-libs (Incubating)</name>
+ <description>Go Libraries for Apache Cloudberry (Incubating)</description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.16.1</version>
+ <configuration>
+ <consoleOutput>true</consoleOutput>
+ <excludes>
+ <!--
+ The following files are part of the original Greenplum
+ Database Common Go Libraries open-source files, licensed
+ under the Apache License 2.0 by Greenplum/Pivotal/VMware.
+
+ Original files located:
+ https://github.com/greenplum-db/gp-common-go-libs
+
+ These files do not contain license headers or recognizable
+ license markers, but are Apache-licensed by virtue of their
+ inclusion in the upstream Greenplum project. We exclude them
+ from Apache RAT scans to avoid false positives, while
+ retaining them in the source distribution.
+ -->
+
+ <!-- cluster package -->
+ <exclude>cluster/cluster.go</exclude>
+ <exclude>cluster/cluster_test.go</exclude>
+
+ <!-- conv package -->
+ <exclude>conv/const.go</exclude>
+ <exclude>conv/conv_suite_test.go</exclude>
+ <exclude>conv/float.go</exclude>
+ <exclude>conv/float_test.go</exclude>
+ <exclude>conv/int.go</exclude>
+ <exclude>conv/int_test.go</exclude>
+ <exclude>conv/md5.go</exclude>
+ <exclude>conv/md5_test.go</exclude>
+ <exclude>conv/README.md</exclude>
+ <exclude>conv/uint.go</exclude>
+ <exclude>conv/uint_test.go</exclude>
+
+ <!-- dbconn package -->
+ <exclude>dbconn/dbconn.go</exclude>
+ <exclude>dbconn/dbconn_test.go</exclude>
+ <exclude>dbconn/version.go</exclude>
+ <exclude>dbconn/version_test.go</exclude>
+
+ <!-- gperror package -->
+ <exclude>gperror/gperror.go</exclude>
+ <exclude>gperror/gperror_test.go</exclude>
+
+ <!-- gplog package -->
+ <exclude>gplog/gplog.go</exclude>
+ <exclude>gplog/gplog_test.go</exclude>
+
+ <!-- iohelper package -->
+ <exclude>iohelper/iohelper.go</exclude>
+ <exclude>iohelper/iohelper_test.go</exclude>
+
+ <!-- operating package -->
+ <exclude>operating/operating.go</exclude>
+
+ <!-- structmatcher package -->
+ <exclude>structmatcher/structmatcher.go</exclude>
+ <exclude>structmatcher/structmatcher_test.go</exclude>
+
+ <!-- testhelper package -->
+ <exclude>testhelper/functions.go</exclude>
+ <exclude>testhelper/structs.go</exclude>
+
+ <!-- Root level files -->
+ <exclude>Makefile</exclude>
+ <exclude>go.mod</exclude>
+ <exclude>go.sum</exclude>
+ <exclude>show_coverage.sh</exclude>
+
+ <!-- End of the legacy Greenplum Go-libs files -->
+
+ <!-- The following files are introduced by Cloudberry,
+ but need to be excluded from the RAT scan.
+ -->
+ <exclude>.github/pull_request_template.md</exclude>
+
+ </excludes>
+
+ <licenses>
+
+ <license
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
+ <licenseFamilyName>Apache License
(Greenplum-derived)</licenseFamilyName>
+ <licenseFamilyCategory>GRPM</licenseFamilyCategory>
+ <patterns>
+ <pattern>copyright (c) 2007, 2008, 2009 GreenPlum. All rights
reserved.</pattern>
+ </patterns>
+ </license>
+
+ <license
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
+ <licenseFamilyName>Apache License
(VMware-derived)</licenseFamilyName>
+ <licenseFamilyCategory>VMW</licenseFamilyCategory>
+ <patterns>
+ <pattern>Copyright 2017-Present VMware, Inc. or its
affiliates.</pattern>
+ <pattern>Portions Copyright (c) 2023 VMware, Inc. or its
affiliates.</pattern>
+ </patterns>
+ </license>
+
+ </licenses>
+
+ <licenseFamilies>
+ <licenseFamily
implementation="org.apache.rat.license.SimpleLicenseFamily">
+ <familyName>Apache License (Greenplum-derived)</familyName>
+ </licenseFamily>
+ <licenseFamily
implementation="org.apache.rat.license.SimpleLicenseFamily">
+ <familyName>Apache License (VMware-derived)</familyName>
+ </licenseFamily>
+ </licenseFamilies>
+
+ </configuration>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]