From 0222a95f29e97153d59309b6c80a8c27a5b68cc2 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Thu, 27 May 2021 08:43:30 -0700 Subject: [PATCH] Make sure all code files have headers --- _test_tools/ncsvr/Dockerfile | 14 ++++++++++++++ _test_tools/ncsvr/ncsvr.sh | 15 +++++++++++++++ _test_tools/sshd/Dockerfile | 14 ++++++++++++++ _test_tools/sshd/sshd.sh | 15 +++++++++++++++ askpass_git.sh | 15 +++++++++++++++ cmd/git-sync/webhook.go | 16 ++++++++++++++++ cmd/git-sync/webhook_test.go | 16 ++++++++++++++++ pkg/pid1/pid1.go | 16 ++++++++++++++++ pkg/pid1/test/fast-exit/Dockerfile | 14 ++++++++++++++ pkg/pid1/test/fast-exit/main.go | 16 ++++++++++++++++ pkg/pid1/test/fast-exit/test.sh | 15 +++++++++++++++ slow_git.sh | 15 +++++++++++++++ test_e2e.sh | 14 ++++++++++++++ test_sync_hook_command.sh | 15 +++++++++++++++ 14 files changed, 210 insertions(+) diff --git a/_test_tools/ncsvr/Dockerfile b/_test_tools/ncsvr/Dockerfile index 3a7abd1..ef3e23a 100644 --- a/_test_tools/ncsvr/Dockerfile +++ b/_test_tools/ncsvr/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2019 The Kubernetes Authors. +# +# 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. + # Stolen from https://github.com/linuxkit/linuxkit/tree/master/pkg/sshd/ FROM alpine AS base diff --git a/_test_tools/ncsvr/ncsvr.sh b/_test_tools/ncsvr/ncsvr.sh index 3ec4f81..9ced7a7 100755 --- a/_test_tools/ncsvr/ncsvr.sh +++ b/_test_tools/ncsvr/ncsvr.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Copyright 2020 The Kubernetes Authors. +# +# 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. + if [ -z "$1" -o -z "$2" ]; then echo "usage: $0 " diff --git a/_test_tools/sshd/Dockerfile b/_test_tools/sshd/Dockerfile index 31efc1a..9878794 100644 --- a/_test_tools/sshd/Dockerfile +++ b/_test_tools/sshd/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2019 The Kubernetes Authors. +# +# 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. + # Stolen from https://github.com/linuxkit/linuxkit/tree/master/pkg/sshd/ FROM alpine AS base diff --git a/_test_tools/sshd/sshd.sh b/_test_tools/sshd/sshd.sh index 757f5fe..0472de2 100755 --- a/_test_tools/sshd/sshd.sh +++ b/_test_tools/sshd/sshd.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Copyright 2020 The Kubernetes Authors. +# +# 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. + KEYS=$(find /etc/ssh -name 'ssh_host_*_key') [ -z "$KEYS" ] && ssh-keygen -A >/dev/null 2>/dev/null diff --git a/askpass_git.sh b/askpass_git.sh index 9cb2afd..c6230f0 100755 --- a/askpass_git.sh +++ b/askpass_git.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Copyright 2019 The Kubernetes Authors. +# +# 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. + # Ask pass when cloning new repo, fail if it mismatched the magic password. mkdir -p "${XDG_CONFIG_HOME}/git/" diff --git a/cmd/git-sync/webhook.go b/cmd/git-sync/webhook.go index ecc389e..22e1ed9 100644 --- a/cmd/git-sync/webhook.go +++ b/cmd/git-sync/webhook.go @@ -1,3 +1,19 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +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. +*/ + package main import ( diff --git a/cmd/git-sync/webhook_test.go b/cmd/git-sync/webhook_test.go index 47ed385..aecba68 100644 --- a/cmd/git-sync/webhook_test.go +++ b/cmd/git-sync/webhook_test.go @@ -1,3 +1,19 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +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. +*/ + package main import ( diff --git a/pkg/pid1/pid1.go b/pkg/pid1/pid1.go index fc3abc1..0352830 100644 --- a/pkg/pid1/pid1.go +++ b/pkg/pid1/pid1.go @@ -1,3 +1,19 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +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. +*/ + package pid1 import ( diff --git a/pkg/pid1/test/fast-exit/Dockerfile b/pkg/pid1/test/fast-exit/Dockerfile index 305261b..8403c5f 100644 --- a/pkg/pid1/test/fast-exit/Dockerfile +++ b/pkg/pid1/test/fast-exit/Dockerfile @@ -1,3 +1,17 @@ +# Copyright 2019 The Kubernetes Authors. +# +# 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. + FROM debian RUN apt-get update && apt-get install -y bash procps psmisc psutils COPY fast-exit /fast-exit diff --git a/pkg/pid1/test/fast-exit/main.go b/pkg/pid1/test/fast-exit/main.go index 25f9c6b..e317e9c 100644 --- a/pkg/pid1/test/fast-exit/main.go +++ b/pkg/pid1/test/fast-exit/main.go @@ -1,3 +1,19 @@ +/* +Copyright 2019 The Kubernetes Authors All rights reserved. + +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. +*/ + // A do-nothing app to test pid1.ReRun(). package main diff --git a/pkg/pid1/test/fast-exit/test.sh b/pkg/pid1/test/fast-exit/test.sh index 8d06d1f..8b4e7ae 100755 --- a/pkg/pid1/test/fast-exit/test.sh +++ b/pkg/pid1/test/fast-exit/test.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Copyright 2020 The Kubernetes Authors. +# +# 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. + go build docker build -t example.com/fast-exit . diff --git a/slow_git.sh b/slow_git.sh index 5646878..0724cdb 100755 --- a/slow_git.sh +++ b/slow_git.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Copyright 2020 The Kubernetes Authors. +# +# 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. + if [ "$1" != "clone" ]; then git "$@" diff --git a/test_e2e.sh b/test_e2e.sh index 69857d1..5f82c0e 100755 --- a/test_e2e.sh +++ b/test_e2e.sh @@ -1,4 +1,18 @@ #!/bin/bash +# +# Copyright 2016 The Kubernetes Authors. +# +# 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. set -o errexit set -o nounset diff --git a/test_sync_hook_command.sh b/test_sync_hook_command.sh index fb3684f..f3a80fe 100755 --- a/test_sync_hook_command.sh +++ b/test_sync_hook_command.sh @@ -1,4 +1,19 @@ #!/bin/sh +# +# Copyright 2020 The Kubernetes Authors. +# +# 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. + # Use for e2e test of --sync-hook-command. # This option takes no command arguments, so requires a wrapper script.