Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RHEL-40924) doc: add downstream CONTRIBUTING document #12

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/advanced-commit-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ policy:
- github: systemd/systemd
exception:
note:
- 'rhel-only: (feature|bugfix|doc|workaround|ci|test|other)'
- 'RHEL-only: (feature|bugfix|doc|workaround|ci|test|other)'
- 'rhel-only: (feature|bugfix|policy|doc|workaround|ci|test|other)'
- 'RHEL-only: (feature|bugfix|policy|doc|workaround|ci|test|other)'
tracker:
- keyword:
- 'Resolves: '
Expand Down
76 changes: 76 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributing

Welcome to systemd source-git for CentOS Stream and RHEL. When contributing, please follow the guide below.

## Workflow

```mermaid
flowchart LR
A(Issue) --> B{is fixed\nupstream}
B -->|YES| C(backport\nupstream patch)
B -->|NO| D(upstream\nsubmit issue or PR)
D --> E{accepted\nand fixed}
E -->|YES| C
E -->|NO| F(rhel-only patch) --> G
C --> G(submit PR)
```

## Filing issues

When you find an issue with systemd used in **CentOS Stream** or **RHEL**, please file an issue in Red Hat [Jira ticket system](https://issues.redhat.com/secure/CreateIssueDetails!init.jspa?pid=12332745&issuetype=1&components=12380515).

GitHub Issues are not supported tracking system. If your issue is reproducible using the latest upstream version of systemd, please consider creating [upstream issue](https://github.com/systemd/systemd/issues/new/choose).

## Posting Pull Requests

Every Pull Request has to comply with the following rules:

- Each commit has to reference [upstream](https://github.com/systemd/systemd) commit.
- Each commit has to reference the approved issue/tracker.
- Pull requests have to pass mandatory CI validation and testing
- Pull requests have to be approved by at least one systemd downstream maintainer

### Upstream reference

When doing a back-port of an upstream commit, always use `cherry-pick -x <sha>`. Consider proposing a change upstream first when an upstream commit doesn't exist.
If the change isn't upstream relevant or accepted by upstream, mark the commit with the `rhel-only: <parameter>` string, where a `<parameter>` is:

- `feature` - for feature-related commits (cross-version)
- `bugfix` - for bugfix-related commits (cross-version)
- `policy` - for policy-related commits (cross-version)
- `doc` - for documentation-related commits (usually version-specific)
- `workaround` - for workaround-related commits (usually version-specific)
- `ci` - for CI-related commits (version-specific)
- `test` - for test-related commits (version-specific)
- `other` - for commits that do not fit into any of the above categories (version-specific)
jamacku marked this conversation as resolved.
Show resolved Hide resolved

```md
doc: Fix TYPO

rhel-only: doc

Resolves: RHEL-678
```

### Issue reference

Each commit has to reference the relevant approved systemd issue (see: [Filling issues section](#filing-issues)). For referencing issues, we use the following keywords:

- **Resolves** for commits that directly resolve issues described in a referenced tracker
- **Related** for commits related to the referenced issue, but they don't fix it. Usually, tests and documentation.
- **Reverts** for commits that reverts previously merged commit

When referencing issues, use the following structure: `<keyword>: <issue ID>`. See the example below:

```md
doc: Fix TYPO

(cherry picked from commit c5afbac31bb33e7b1f4d59b253425af991a630a4)

Resolves: RHEL-678
```

### Validation and testing

Each Pull Request has to pass all enabled tests that are automatically run using GitHub Actions, CentOS Stream CI, and others.
If CI failure is unrelated to the change introduced in Pull Request, the downstream maintainer will set the `ci-waived` label and explain why CI was waived.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Please see the [Code Map](docs/ARCHITECTURE.md) for information about this repos

Please see the [Hacking guide](docs/HACKING.md) for information on how to hack on systemd and test your modifications.

Please see our [Contribution Guidelines](docs/CONTRIBUTING.md) for more information about filing GitHub Issues and posting GitHub Pull Requests.
Please see our [Contribution Guidelines](CONTRIBUTING.md) for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our [Coding Style Guidelines](docs/CODING_STYLE.md).

Expand Down