From 48230f380499efecd663fdc6749a2cbaf2f8ed76 Mon Sep 17 00:00:00 2001 From: Dmitry Kovba Date: Thu, 2 Oct 2025 09:42:24 -0700 Subject: [PATCH] Update license headers in C files (#693) ## Type of Change - [x] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Documentation update ## Motivation and Context There was a duplicated and outdated license header in some files. ## Testing - [x] Tested locally - [ ] Added/updated tests - [ ] Added/updated docs --- Sources/CVersion/Version.c | 35 ++++++------------- Sources/CVersion/include/Version.h | 34 ++++++------------ Sources/ContainerCommands/Application.swift | 2 -- Sources/ContainerCommands/Codable+JSON.swift | 2 -- .../Container/ProcessUtils.swift | 2 -- Sources/ContainerLog/OSLogHandler.swift | 2 -- Sources/ContainerLog/StderrLogHandler.swift | 2 -- Sources/ContainerPlugin/Plugin.swift | 2 -- Sources/ContainerPlugin/PluginFactory.swift | 2 -- Sources/DNSServer/Types.swift | 2 -- .../Subcommands/Build/CLIBuildBase.swift | 2 -- .../Build/CLIBuilderLifecycleTest.swift | 2 -- .../Build/CLIBuilderLocalOutputTest.swift | 2 -- .../Subcommands/Build/CLIBuilderTest.swift | 2 -- .../Subcommands/Build/CLIRunBase.swift | 2 -- .../Subcommands/Build/TestCLITermIO.swift | 2 -- .../Subcommands/Containers/TestCLIExec.swift | 2 -- .../Containers/TestCLIRmRace.swift | 2 -- .../Subcommands/Networks/TestCLINetwork.swift | 2 -- .../Subcommands/Run/TestCLIRunOptions.swift | 2 -- Tests/CLITests/Utilities/CLITest.swift | 2 -- Tests/ContainerBuildTests/GlobberTests.swift | 2 -- .../HostDNSResolverTest.swift | 2 -- Tests/ContainerClientTests/ParserTest.swift | 2 -- .../RequestSchemeTests.swift | 2 -- .../NetworkConfigurationTest.swift | 2 -- .../MockPluginFactory.swift | 2 -- .../PluginConfigTest.swift | 2 -- .../PluginFactoryTest.swift | 2 -- .../PluginLoaderTest.swift | 2 -- Tests/ContainerPluginTests/PluginTest.swift | 2 -- .../CompositeResolverTest.swift | 2 -- .../HostTableResolverTest.swift | 2 -- Tests/DNSServerTests/MockHandlers.swift | 2 -- .../DNSServerTests/NxDomainResolverTest.swift | 2 -- .../StandardQueryValidatorTest.swift | 2 -- .../ProgressBarTests.swift | 2 -- licenserc.toml | 2 +- 38 files changed, 21 insertions(+), 120 deletions(-) diff --git a/Sources/CVersion/Version.c b/Sources/CVersion/Version.c index e579378d..b266a8ec 100644 --- a/Sources/CVersion/Version.c +++ b/Sources/CVersion/Version.c @@ -1,33 +1,18 @@ -/* - * Copyright © 2025 Apple Inc. and the container project 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 - * - * https://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. - */ - //===----------------------------------------------------------------------===// +// Copyright © 2025 Apple Inc. and the container project authors. All rights reserved. // -// This source file is part of the container open source project +// 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 // -// Copyright (c) 2025 Apple Inc. and the container project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.md for the list of container project authors -// -// SPDX-License-Identifier: Apache-2.0 +// https://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. //===----------------------------------------------------------------------===// -// #include "Version.h" diff --git a/Sources/CVersion/include/Version.h b/Sources/CVersion/include/Version.h index c5b17d19..b9543167 100644 --- a/Sources/CVersion/include/Version.h +++ b/Sources/CVersion/include/Version.h @@ -1,31 +1,17 @@ -/* - * Copyright © 2025 Apple Inc. and the container project 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 - * - * https://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. - */ - //===----------------------------------------------------------------------===// +// Copyright © 2025 Apple Inc. and the container project authors. All rights reserved. // -// This source file is part of the container open source project +// 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 // -// Copyright (c) 2025 Apple Inc. and the container project authors -// Licensed under Apache License v2.0 -// -// See LICENSE.txt for license information -// See CONTRIBUTORS.md for the list of container project authors -// -// SPDX-License-Identifier: Apache-2.0 +// https://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. //===----------------------------------------------------------------------===// #ifndef CZ_VERSION diff --git a/Sources/ContainerCommands/Application.swift b/Sources/ContainerCommands/Application.swift index eec44439..be03e5e0 100644 --- a/Sources/ContainerCommands/Application.swift +++ b/Sources/ContainerCommands/Application.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ArgumentParser import ContainerClient import ContainerLog diff --git a/Sources/ContainerCommands/Codable+JSON.swift b/Sources/ContainerCommands/Codable+JSON.swift index 60cbd04d..2cea662a 100644 --- a/Sources/ContainerCommands/Codable+JSON.swift +++ b/Sources/ContainerCommands/Codable+JSON.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation extension [any Codable] { diff --git a/Sources/ContainerCommands/Container/ProcessUtils.swift b/Sources/ContainerCommands/Container/ProcessUtils.swift index d4dda6a2..fc8096ed 100644 --- a/Sources/ContainerCommands/Container/ProcessUtils.swift +++ b/Sources/ContainerCommands/Container/ProcessUtils.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerClient import Containerization import ContainerizationError diff --git a/Sources/ContainerLog/OSLogHandler.swift b/Sources/ContainerLog/OSLogHandler.swift index 1d871458..793a9577 100644 --- a/Sources/ContainerLog/OSLogHandler.swift +++ b/Sources/ContainerLog/OSLogHandler.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Logging import os diff --git a/Sources/ContainerLog/StderrLogHandler.swift b/Sources/ContainerLog/StderrLogHandler.swift index 28d5fcab..96204408 100644 --- a/Sources/ContainerLog/StderrLogHandler.swift +++ b/Sources/ContainerLog/StderrLogHandler.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Logging diff --git a/Sources/ContainerPlugin/Plugin.swift b/Sources/ContainerPlugin/Plugin.swift index 98a11e88..4e920af0 100644 --- a/Sources/ContainerPlugin/Plugin.swift +++ b/Sources/ContainerPlugin/Plugin.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation /// Value type that contains the plugin configuration, the parsed name of the diff --git a/Sources/ContainerPlugin/PluginFactory.swift b/Sources/ContainerPlugin/PluginFactory.swift index 7e5ea721..7ccf6992 100644 --- a/Sources/ContainerPlugin/PluginFactory.swift +++ b/Sources/ContainerPlugin/PluginFactory.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation private let configFilename: String = "config.json" diff --git a/Sources/DNSServer/Types.swift b/Sources/DNSServer/Types.swift index 72dbc53c..5d9579c5 100644 --- a/Sources/DNSServer/Types.swift +++ b/Sources/DNSServer/Types.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import DNS import Foundation diff --git a/Tests/CLITests/Subcommands/Build/CLIBuildBase.swift b/Tests/CLITests/Subcommands/Build/CLIBuildBase.swift index 407a07b4..1f9b6b40 100644 --- a/Tests/CLITests/Subcommands/Build/CLIBuildBase.swift +++ b/Tests/CLITests/Subcommands/Build/CLIBuildBase.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/CLITests/Subcommands/Build/CLIBuilderLifecycleTest.swift b/Tests/CLITests/Subcommands/Build/CLIBuilderLifecycleTest.swift index dbee0cc4..926a15cb 100644 --- a/Tests/CLITests/Subcommands/Build/CLIBuilderLifecycleTest.swift +++ b/Tests/CLITests/Subcommands/Build/CLIBuilderLifecycleTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/CLITests/Subcommands/Build/CLIBuilderLocalOutputTest.swift b/Tests/CLITests/Subcommands/Build/CLIBuilderLocalOutputTest.swift index 110f25a6..b18703f9 100644 --- a/Tests/CLITests/Subcommands/Build/CLIBuilderLocalOutputTest.swift +++ b/Tests/CLITests/Subcommands/Build/CLIBuilderLocalOutputTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/CLITests/Subcommands/Build/CLIBuilderTest.swift b/Tests/CLITests/Subcommands/Build/CLIBuilderTest.swift index 986e316a..d40302d8 100644 --- a/Tests/CLITests/Subcommands/Build/CLIBuilderTest.swift +++ b/Tests/CLITests/Subcommands/Build/CLIBuilderTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerizationOCI import Foundation import Testing diff --git a/Tests/CLITests/Subcommands/Build/CLIRunBase.swift b/Tests/CLITests/Subcommands/Build/CLIRunBase.swift index 82ea0132..fcad4f37 100644 --- a/Tests/CLITests/Subcommands/Build/CLIRunBase.swift +++ b/Tests/CLITests/Subcommands/Build/CLIRunBase.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerizationOS import Foundation import Testing diff --git a/Tests/CLITests/Subcommands/Build/TestCLITermIO.swift b/Tests/CLITests/Subcommands/Build/TestCLITermIO.swift index 35519f67..477e2667 100644 --- a/Tests/CLITests/Subcommands/Build/TestCLITermIO.swift +++ b/Tests/CLITests/Subcommands/Build/TestCLITermIO.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerizationOS import Foundation import Testing diff --git a/Tests/CLITests/Subcommands/Containers/TestCLIExec.swift b/Tests/CLITests/Subcommands/Containers/TestCLIExec.swift index 6ed44836..b6e1de2b 100644 --- a/Tests/CLITests/Subcommands/Containers/TestCLIExec.swift +++ b/Tests/CLITests/Subcommands/Containers/TestCLIExec.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/CLITests/Subcommands/Containers/TestCLIRmRace.swift b/Tests/CLITests/Subcommands/Containers/TestCLIRmRace.swift index 1a51229a..d40d9e44 100644 --- a/Tests/CLITests/Subcommands/Containers/TestCLIRmRace.swift +++ b/Tests/CLITests/Subcommands/Containers/TestCLIRmRace.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/CLITests/Subcommands/Networks/TestCLINetwork.swift b/Tests/CLITests/Subcommands/Networks/TestCLINetwork.swift index b3b09788..16e1ca3a 100644 --- a/Tests/CLITests/Subcommands/Networks/TestCLINetwork.swift +++ b/Tests/CLITests/Subcommands/Networks/TestCLINetwork.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import AsyncHTTPClient import ContainerClient import ContainerizationError diff --git a/Tests/CLITests/Subcommands/Run/TestCLIRunOptions.swift b/Tests/CLITests/Subcommands/Run/TestCLIRunOptions.swift index 787a8b52..0b594b75 100644 --- a/Tests/CLITests/Subcommands/Run/TestCLIRunOptions.swift +++ b/Tests/CLITests/Subcommands/Run/TestCLIRunOptions.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import AsyncHTTPClient import ContainerClient import ContainerizationExtras diff --git a/Tests/CLITests/Utilities/CLITest.swift b/Tests/CLITests/Utilities/CLITest.swift index 96051ff9..501884c9 100644 --- a/Tests/CLITests/Utilities/CLITest.swift +++ b/Tests/CLITests/Utilities/CLITest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import AsyncHTTPClient import ContainerClient import ContainerNetworkService diff --git a/Tests/ContainerBuildTests/GlobberTests.swift b/Tests/ContainerBuildTests/GlobberTests.swift index 9ddcc111..eca6cdfb 100644 --- a/Tests/ContainerBuildTests/GlobberTests.swift +++ b/Tests/ContainerBuildTests/GlobberTests.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/ContainerClientTests/HostDNSResolverTest.swift b/Tests/ContainerClientTests/HostDNSResolverTest.swift index 61abcf38..8e0add79 100644 --- a/Tests/ContainerClientTests/HostDNSResolverTest.swift +++ b/Tests/ContainerClientTests/HostDNSResolverTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerizationError import Foundation import Testing diff --git a/Tests/ContainerClientTests/ParserTest.swift b/Tests/ContainerClientTests/ParserTest.swift index f561569b..a200e85c 100644 --- a/Tests/ContainerClientTests/ParserTest.swift +++ b/Tests/ContainerClientTests/ParserTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerizationError import Foundation import Testing diff --git a/Tests/ContainerClientTests/RequestSchemeTests.swift b/Tests/ContainerClientTests/RequestSchemeTests.swift index 28cbc019..43ce3f61 100644 --- a/Tests/ContainerClientTests/RequestSchemeTests.swift +++ b/Tests/ContainerClientTests/RequestSchemeTests.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerPersistence import ContainerizationError import Foundation diff --git a/Tests/ContainerNetworkServiceTests/NetworkConfigurationTest.swift b/Tests/ContainerNetworkServiceTests/NetworkConfigurationTest.swift index dfcc4ac3..e1f1556b 100644 --- a/Tests/ContainerNetworkServiceTests/NetworkConfigurationTest.swift +++ b/Tests/ContainerNetworkServiceTests/NetworkConfigurationTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerizationError import ContainerizationExtras import Testing diff --git a/Tests/ContainerPluginTests/MockPluginFactory.swift b/Tests/ContainerPluginTests/MockPluginFactory.swift index 1a7b4724..a180f6d2 100644 --- a/Tests/ContainerPluginTests/MockPluginFactory.swift +++ b/Tests/ContainerPluginTests/MockPluginFactory.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import ContainerPlugin import Foundation import Testing diff --git a/Tests/ContainerPluginTests/PluginConfigTest.swift b/Tests/ContainerPluginTests/PluginConfigTest.swift index b069151c..0b58a826 100644 --- a/Tests/ContainerPluginTests/PluginConfigTest.swift +++ b/Tests/ContainerPluginTests/PluginConfigTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/ContainerPluginTests/PluginFactoryTest.swift b/Tests/ContainerPluginTests/PluginFactoryTest.swift index 6762f00e..b748bb11 100644 --- a/Tests/ContainerPluginTests/PluginFactoryTest.swift +++ b/Tests/ContainerPluginTests/PluginFactoryTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/ContainerPluginTests/PluginLoaderTest.swift b/Tests/ContainerPluginTests/PluginLoaderTest.swift index c395b677..595b4dc9 100644 --- a/Tests/ContainerPluginTests/PluginLoaderTest.swift +++ b/Tests/ContainerPluginTests/PluginLoaderTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/ContainerPluginTests/PluginTest.swift b/Tests/ContainerPluginTests/PluginTest.swift index 17dc02b7..794218b5 100644 --- a/Tests/ContainerPluginTests/PluginTest.swift +++ b/Tests/ContainerPluginTests/PluginTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import Foundation import Testing diff --git a/Tests/DNSServerTests/CompositeResolverTest.swift b/Tests/DNSServerTests/CompositeResolverTest.swift index de7a50b4..6a403eb0 100644 --- a/Tests/DNSServerTests/CompositeResolverTest.swift +++ b/Tests/DNSServerTests/CompositeResolverTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import DNS import Testing diff --git a/Tests/DNSServerTests/HostTableResolverTest.swift b/Tests/DNSServerTests/HostTableResolverTest.swift index 0b766360..75863e48 100644 --- a/Tests/DNSServerTests/HostTableResolverTest.swift +++ b/Tests/DNSServerTests/HostTableResolverTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import DNS import Testing diff --git a/Tests/DNSServerTests/MockHandlers.swift b/Tests/DNSServerTests/MockHandlers.swift index 04aac09f..5086bb9a 100644 --- a/Tests/DNSServerTests/MockHandlers.swift +++ b/Tests/DNSServerTests/MockHandlers.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import DNS import Testing diff --git a/Tests/DNSServerTests/NxDomainResolverTest.swift b/Tests/DNSServerTests/NxDomainResolverTest.swift index 73479617..212dcf8e 100644 --- a/Tests/DNSServerTests/NxDomainResolverTest.swift +++ b/Tests/DNSServerTests/NxDomainResolverTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import DNS import Testing diff --git a/Tests/DNSServerTests/StandardQueryValidatorTest.swift b/Tests/DNSServerTests/StandardQueryValidatorTest.swift index d89b6cf8..00547582 100644 --- a/Tests/DNSServerTests/StandardQueryValidatorTest.swift +++ b/Tests/DNSServerTests/StandardQueryValidatorTest.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import DNS import Testing diff --git a/Tests/TerminalProgressTests/ProgressBarTests.swift b/Tests/TerminalProgressTests/ProgressBarTests.swift index 2b432e03..fd540c76 100644 --- a/Tests/TerminalProgressTests/ProgressBarTests.swift +++ b/Tests/TerminalProgressTests/ProgressBarTests.swift @@ -14,8 +14,6 @@ // limitations under the License. //===----------------------------------------------------------------------===// -// - import XCTest @testable import TerminalProgress diff --git a/licenserc.toml b/licenserc.toml index 0fe46b77..43b2fd25 100644 --- a/licenserc.toml +++ b/licenserc.toml @@ -22,4 +22,4 @@ ignore = 'enable' copyrightOwner = "Apple Inc. and the container project authors" [mapping.SWIFT_STYLE] -extensions = ["swift"] +extensions = ["swift", "c", "h"]