diff --git a/.licenseignore b/.licenseignore index 9f6fdaa..93e1672 100644 --- a/.licenseignore +++ b/.licenseignore @@ -3,7 +3,6 @@ .licenseignore .gitattributes .mailfilter -.mailmap .spi.yml .swift-format .editorconfig @@ -30,7 +29,6 @@ Makefile Dockerfile **/Dockerfile Snippets/* -dev/git.commit.template *.crt **/*.crt *.pem diff --git a/.mailmap b/.mailmap deleted file mode 100644 index 734fc30..0000000 --- a/.mailmap +++ /dev/null @@ -1,4 +0,0 @@ -Tomer Doron -Tomer Doron -Tomer Doron -Konrad `ktoso` Malawski diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 0776b8a..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,3 +0,0 @@ -# Code of Conduct - -The code of conduct for this project can be found at https://swift.org/code-of-conduct. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e2f4add..229bbde 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,54 +48,16 @@ Linux beefy.machine 4.4.0-101-generic #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 20 My system has IPv6 disabled. ``` -## Writing a Patch - -A good SwiftServiceLifecycle patch is: - -1. Concise, and contains as few changes as needed to achieve the end result. -2. Tested, ensuring that any tests provided failed before the patch and pass after it. -3. Documented, adding API documentation as needed to cover new functions and properties. -4. Accompanied by a great commit message, using our commit message template. - -### Commit Message Template - -We require that your commit messages match our template. The easiest way to do that is to get git to help you by explicitly using the template. To do that, `cd` to the root of our repository and run: - - git config commit.template dev/git.commit.template - -### Make sure Tests work on Linux - -SwiftServiceLifecycle uses XCTest to run tests on both macOS and Linux. While the macOS version of XCTest is able to use the Objective-C runtime to discover tests at execution time, the Linux version is not. -For this reason, whenever you add new tests **you have to run a script** that generates the hooks needed to run those tests on Linux, or our CI will complain that the tests are not all present on Linux. To do this, merely execute `ruby ./scripts/generate_linux_tests.rb` at the root of the package and check the changes it made. - -### Run `./scripts/soundness.sh` - -The scripts directory contains a [soundness.sh script](scripts/soundness.sh) -that enforces additional checks, like license headers and formatting style. -Please make sure to `./scripts/soundness.sh` before pushing a change upstream, otherwise it is likely the PR validation will fail -on minor changes such as a missing `self.` or similar formatting issues. - -> The script also executes the above mentioned `generate_linux_tests.rb`. - -For frequent contributors, we recommend adding the script as a [git pre-push hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks), which you can do via executing the following command -in the project root directory: - -```bash -cat << EOF > .git/hooks/pre-push -#!/bin/bash - -if [[ -f "scripts/soundness.sh" ]]; then - scripts/soundness.sh -fi -EOF -``` -Which makes the script execute, and only allow the `git push` to complete if the check has passed. - -In the case of formatting issues, you can then `git add` the formatting changes, and attempt the push again. - ## How to contribute your work -Please open a pull request at https://github.com/swift-server/swift-service-lifecycle. Make sure the CI passes, and then wait for code review. +For non-trivial changes that affect the public API, it is good practice to have a discussion phase before writing code. Please follow the [proposal process](Sources/ServiceLifecycle/Docs.docc/Proposals/Proposals.md) to gather feedback and align on the approach with other contributors. + +1. Prepare your change, keeping in mind that a good patch is: + - Concise, and contains as few changes as needed to achieve the end result. + - Tested, ensuring that any tests provided failed before the patch and pass after it. + - Documented, adding API documentation as needed to cover new functions and properties. + - Accompanied by a great commit message. +2. Open a pull request at https://github.com/swift-server/swift-service-lifecycle and wait for code review by the maintainers. ## Automated release process diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt deleted file mode 100644 index cfb1ddc..0000000 --- a/CONTRIBUTORS.txt +++ /dev/null @@ -1,21 +0,0 @@ -For the purpose of tracking copyright, this is the list of individuals and -organizations who have contributed source code to SwiftServiceLifecycle. - -For employees of an organization/company where the copyright of work done -by employees of that company is held by the company itself, only the company -needs to be listed here. - -## COPYRIGHT HOLDERS - -- Apple Inc. (all contributors with '@apple.com') - -### Contributors - -- Johannes Weiss -- Konrad `ktoso` Malawski -- Tomer Doron -- Yim Lee - -**Updating this list** - -Please do not edit this file manually. It is generated using `./scripts/generate_contributors_list.sh`. If a name is misspelled or appearing multiple times: add an entry in `./.mailmap` diff --git a/README.md b/README.md index b21c2e8..b11c8fa 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +[![](https://img.shields.io/badge/docc-read_documentation-blue)](https://swiftpackageindex.com/swift-server/swift-service-lifecycle/documentation) +[![](https://img.shields.io/github/v/release/swift-server/swift-service-lifecycle)](https://github.com/swift-server/swift-service-lifecycle/releases) +[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fswift-server%2Fswift-service-lifecycle%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/swift-server/swift-service-lifecycle) +[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fswift-server%2Fswift-service-lifecycle%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/swift-server/swift-service-lifecycle) + # Swift Service Lifecycle Swift Service Lifecycle provides a basic mechanism to cleanly start up and shut down an application, freeing resources in-order before exiting. @@ -96,4 +101,4 @@ struct Application { ## Security -Please see [SECURITY.md](SECURITY.md) for details on the security process. +For the security process, see https://github.com/apple/swift-log?tab=security-ov-file. diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index 1da67ee..0000000 --- a/SECURITY.md +++ /dev/null @@ -1,43 +0,0 @@ -# Security - -This document specifies the security process for the Swift Service Lifecycle project. - -## Disclosures - -### Private Disclosure Process - -The Swift Service Lifecycle maintainers ask that known and suspected vulnerabilities be -privately and responsibly disclosed by emailing -[sswg-security-reports@forums.swift.org](mailto:sswg-security-reports@forums.swift.org) -with the all the required detail. -**Do not file a public issue.** - -#### When to report a vulnerability - -* You think you have discovered a potential security vulnerability in Swift Service Lifecycle. -* You are unsure how a vulnerability affects Swift Service Lifecycle. - -#### What happens next? - -* A member of the team will acknowledge receipt of the report within 3 - working days (United States). This may include a request for additional - information about reproducing the vulnerability. -* We will privately inform the Swift Server Work Group ([SSWG][sswg]) of the - vulnerability within 10 days of the report as per their [security - guidelines][sswg-security]. -* Once we have identified a fix we may ask you to validate it. We aim to do this - within 30 days. In some cases this may not be possible, for example when the - vulnerability exists at the protocol level and the industry must coordinate on - the disclosure process. -* If a CVE number is required, one will be requested from [MITRE][mitre] - providing you with full credit for the discovery. -* We will decide on a planned release date and let you know when it is. -* Prior to release, we will inform major dependents that a security-related - patch is impending. -* Once the fix has been released we will publish a security advisory on GitHub - and in the Server → Security Updates category on the [Swift forums][swift-forums-sec]. - -[sswg]: https://github.com/swift-server/sswg -[sswg-security]: https://github.com/swift-server/sswg/blob/main/security/README.md -[swift-forums-sec]: https://forums.swift.org/c/server/security-updates/ -[mitre]: https://cveform.mitre.org/ diff --git a/dev/git.commit.template b/dev/git.commit.template deleted file mode 100644 index c52bfa1..0000000 --- a/dev/git.commit.template +++ /dev/null @@ -1,14 +0,0 @@ -One line description of your change - -Motivation: - -Explain here the context, and why you're making that change. -What is the problem you're trying to solve. - -Modifications: - -Describe the modifications you've done. - -Result: - -After your change, what will change.