mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #61321 from yland/add_copying
Automatic merge from submit-queue (batch tested with PRs 61396, 61321, 61443, 60911, 61461). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Add COPYING file name as valid license file **What this PR does / why we need it**: Some valuable libraries such as https://github.com/google/shlex which could be integrated into Kubernetes use COPYING for their License file name. This would be helpful in getting pull requests such as https://github.com/kubernetes/kubernetes/pull/59700 merged. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
commit
46c5bb9dcb
@ -37,7 +37,7 @@ export LC_ALL=C
|
||||
# Process package content
|
||||
#
|
||||
# @param package The incoming package name
|
||||
# @param type The type of content (LICENSE or COPYRIGHT)
|
||||
# @param type The type of content (LICENSE, COPYRIGHT or COPYING)
|
||||
#
|
||||
process_content () {
|
||||
local package=$1
|
||||
@ -65,6 +65,10 @@ process_content () {
|
||||
find_maxdepth=3
|
||||
ensure_pattern="copyright"
|
||||
;;
|
||||
COPYING) find_names=(-iname 'copying*')
|
||||
find_maxdepth=1
|
||||
ensure_pattern="license|copyright"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Start search at package root
|
||||
@ -159,6 +163,7 @@ for PACKAGE in $(cat Godeps/Godeps.json | \
|
||||
sort -f); do
|
||||
process_content ${PACKAGE} LICENSE
|
||||
process_content ${PACKAGE} COPYRIGHT
|
||||
process_content ${PACKAGE} COPYING
|
||||
|
||||
# display content
|
||||
echo
|
||||
@ -171,16 +176,18 @@ for PACKAGE in $(cat Godeps/Godeps.json | \
|
||||
file="${CONTENT[${PACKAGE}-LICENSE]-}"
|
||||
elif [[ -n "${CONTENT[${PACKAGE}-COPYRIGHT]-}" ]]; then
|
||||
file="${CONTENT[${PACKAGE}-COPYRIGHT]-}"
|
||||
elif [[ -n "${CONTENT[${PACKAGE}-COPYING]-}" ]]; then
|
||||
file="${CONTENT[${PACKAGE}-COPYING]-}"
|
||||
fi
|
||||
if [[ -z "${file}" ]]; then
|
||||
cat > /dev/stderr << __EOF__
|
||||
No license could be found for ${PACKAGE} - aborting.
|
||||
|
||||
Options:
|
||||
1. Check if the upstream repository has a newer version with LICENSE and/or
|
||||
COPYRIGHT files.
|
||||
2. Contact the author of the package to ensure there is a LICENSE and/or
|
||||
COPYRIGHT file present.
|
||||
1. Check if the upstream repository has a newer version with LICENSE, COPYRIGHT and/or
|
||||
COPYING files.
|
||||
2. Contact the author of the package to ensure there is a LICENSE, COPYRIGHT and/or
|
||||
COPYING file present.
|
||||
3. Do not use this package in Kubernetes.
|
||||
__EOF__
|
||||
exit 9
|
||||
|
Loading…
Reference in New Issue
Block a user