Skip to content

Commit b65aa32

Browse files
committed
.github: markdown syntax fixes and new section on code signing
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent c2e422a commit b65aa32

File tree

2 files changed

+184
-96
lines changed

2 files changed

+184
-96
lines changed

.github/CHECKLIST.md

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,39 @@ Checklists for Pull Requests and Releases
33

44
Maintainer checklists for reviewing pull requests and doing releases.
55

6-
76
Pull Requests
87
-------------
98

10-
- If applicable, is there a readable ChangeLog entry?
11-
- If any LICENSE file has been updated, has the `.hash` file been updated?
12-
- If any change to a Finit `.svc` file, does any run/task linger?
13-
I.e., is there a runlevel and/or condition defined to prevent them
14-
from running outside of their intended runlevel?
15-
- If any change to grub or qemu/qeneth setup, has it been tested in GNS3?
16-
- If any change to u-boot/buildroot, has it been tested with `<booloader>_defconfig`
17-
- If any change to logging, have the resulting logs been audited?
18-
- Check for duplicate entries, misspellings
19-
- Check for sneaky severity changes, e.g., error vs note, error vs warning
20-
- If new subsystem, or major changes to a subsystem, have the docs been updated?
21-
- If change to mDNS, has it been tested with netbrowse?
22-
- If change to `_defconfig`, verify `local.mk` and sync with other archs
23-
- Test manually as well, e.g., CLI changes do not have ha regression tests
24-
- Build from distclean, or use artifacts built by build servers, for manual tests
25-
9+
- If applicable, is there a readable ChangeLog entry?
10+
- If any LICENSE file has been updated, has the `.hash` file been updated?
11+
- If any change to a Finit `.svc` file, does any run/task linger?
12+
I.e., is there a runlevel and/or condition defined to prevent them
13+
from running outside of their intended runlevel?
14+
- If any change to grub or qemu/qeneth setup, has it been tested in GNS3?
15+
- If any change to u-boot/buildroot, has it been tested with `<booloader>_defconfig`
16+
- If any change to logging, have the resulting logs been audited?
17+
- Check for duplicate entries, misspellings
18+
- Check for sneaky severity changes, e.g., error vs note, error vs warning
19+
- If new subsystem, or major changes to a subsystem, have the docs been updated?
20+
- If change to mDNS, has it been tested with netbrowse?
21+
- If change to `_defconfig`, verify `local.mk` and sync with other archs
22+
- Test manually as well, e.g., CLI changes do not have ha regression tests
23+
- Build from distclean, or use artifacts built by build servers, for manual tests
2624

2725
Releases
2826
--------
2927

3028
Recommended checkpoints, use at your own discretion:
3129

32-
- Make at least one -betaN release to verify the GitHub workflow well in time release day
33-
- Stuff happens, remember kernelkit/infix#735
34-
- Make at least one -rcN to flush out any issues in customer repos
35-
- Easy to forget adaptations/hacks in customer repos -- may need Infix change/support
36-
- Verify release artifacts (checksums, completeness, no corrupted files)
37-
- Test on actual hardware for at least one architecture
38-
- Review ChangeLog for completeness
39-
- Check for release-blocking issues
40-
- Verify generated GNS3 appliance, no marketplace update on -rc builds
41-
- Ensure the markdown link for the release diff is updated
42-
- Ensure subrepos are tagged (can be automated, see kernelkit/infix#393)
43-
- Sync tags for all repo. sync activities
30+
- Make at least one -betaN release to verify the GitHub workflow well in time release day
31+
- Stuff happens, remember kernelkit/infix#735
32+
- Make at least one -rcN to flush out any issues in customer repos
33+
- Easy to forget adaptations/hacks in customer repos -- may need Infix change/support
34+
- Verify release artifacts (checksums, completeness, no corrupted files)
35+
- Test on actual hardware for at least one architecture
36+
- Review ChangeLog for completeness
37+
- Check for release-blocking issues
38+
- Verify generated GNS3 appliance, no marketplace update on -rc builds
39+
- Ensure the markdown link for the release diff is updated
40+
- Ensure subrepos are tagged (can be automated, see kernelkit/infix#393)
41+
- Sync tags for all repo. sync activities

.github/CONTRIBUTING.md

Lines changed: 157 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ forms of collaboration as well. [Let's talk!][support] :handshake:
99

1010
If you are unsure how to start implementing an idea or fix:
1111

12-
- :bug: open an issue, there are human friendly templates for _bugs_
13-
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
14-
- :speech_balloon: use the [Q&A Forum][discuss]
15-
- :technologist: The [Developer's Guide][devguide] is also a useful start
12+
- :bug: open an issue, there are human friendly templates for _bugs_
13+
and _feature requests_ at <https://github.com/kernelkit/infix/issues>
14+
- :speech_balloon: use the [Q&A Forum][discuss]
15+
- :technologist: The [Developer's Guide][devguide] is also a useful start
1616

17-
> _Talking about code and problems first is often the best way to get
17+
> [!IMPORTANT]
18+
> Talking about code and problems first is often the best way to get
1819
> started before submitting a pull request. We have found it always
19-
> saves time, yours and ours._
20-
20+
> saves time, yours and ours.
2121
2222
:sparkles: General Guidelines
2323
-----------------------------
@@ -27,21 +27,20 @@ version the change is made against, what it does, and, more importantly
2727
*why* -- from your perspective, why is it a bug, why does the code need
2828
changing in this way. Start with why.
2929

30-
- :bug: Bug reports need metadata like Infix version or commit hash
31-
- :adhesive_bandage: Bug fixes also need version, and (preferably) a
32-
corresponding issue number for the ChangeLog
33-
- :new: New features, you need to get approval of the YANG model first!
34-
:speech_balloon: Please use the [Forum][discuss], e.g., category:
35-
*Ideas*, or open a :pray: feature request issue
36-
- :white_check_mark: New features also need new regression tests, this
37-
can be basic tests or more complex use-case tests comprising multiple
38-
subsystems, see [Testing Changes](#test_tube-testing-changes), below
30+
- :bug: Bug reports need metadata like Infix version or commit hash
31+
- :adhesive_bandage: Bug fixes also need version, and (preferably) a
32+
corresponding issue number for the ChangeLog
33+
- :new: New features, you need to get approval of the YANG model first!
34+
:speech_balloon: Please use the [Forum][discuss], e.g., category:
35+
*Ideas*, or open a :pray: feature request issue
36+
- :white_check_mark: New features also need new regression tests, this
37+
can be basic tests or more complex use-case tests comprising multiple
38+
subsystems, see [Testing Changes](#test_tube-testing-changes), below
3939

4040
Please take care to ensure you follow the project coding style and the
4141
commit message format. If you follow these recommendations you help
4242
the maintainers and make it easier for them to include your code.
4343

44-
4544
:woman_technologist: Coding Style
4645
---------------------------------
4746

@@ -51,39 +50,40 @@ and it is expected that you provide a human-readable summary for the
5150
release notes (ChangeLog) and at least a configuration example in the
5251
manual for new features.
5352

54-
> **Tip:** consider ["Readme driven development"][RDD] for new features.
55-
> It is amazing how many flaws in your own bright ideas come to bare
56-
> when you suddenly have to explain them to someone else!
53+
> [!TIP]
54+
> Consider ["Readme driven development"][RDD] for new features. It is
55+
> amazing how many flaws in your own bright ideas come to bare when you
56+
> suddenly have to explain them to someone else!
5757
5858
We expect code contributions for:
5959

60-
- C code in [Linux Coding Style][Linux]
61-
- Python code should follow [PEP-8][]
60+
- C code in [Linux Coding Style][Linux]
61+
- Python code should follow [PEP-8][]
6262

63+
> [!IMPORTANT]
6364
> **However,** always submit code that follows the style of surrounding
6465
> code! Legacy takes precedence, and remember, we read code a lot more
6566
> than write it, so legibility is important.
6667
6768
The ChangeLog deserves a separate mention:
6869

69-
- Releases are listed in reverse chronological order order, so the
70-
latest/next release is at the beginning of the file
71-
- Only *user-facing bugs and features* are detailed, so code refactor,
72-
new tests, etc. are not listed.
73-
- Add your changes/features to the Changes section
74-
- Add your Fix line in the Fixes section, in numeric order
75-
- Changes and fixes without an issue number are listed after all
76-
numbered ones
77-
- YANG model changes are documented in their respective model, for
78-
standard models, e.g., for `ietf-interfaces.yang`, the corresponding
79-
`infix-interfaces.yang` detail augments/deviations as revisions.
70+
- Releases are listed in reverse chronological order order, so the
71+
latest/next release is at the beginning of the file
72+
- Only *user-facing bugs and features* are detailed, so code refactor,
73+
new tests, etc. are not listed.
74+
- Add your changes/features to the Changes section
75+
- Add your Fix line in the Fixes section, in numeric order
76+
- Changes and fixes without an issue number are listed after all
77+
numbered ones
78+
- YANG model changes are documented in their respective model, for
79+
standard models, e.g., for `ietf-interfaces.yang`, the corresponding
80+
`infix-interfaces.yang` detail augments/deviations as revisions.
8081

8182
A final note, lines of code are allowed to be longer than 72 characters
8283
these days, unless you live by PEP-8 (see above). There is no enforced
8384
maximum, but the team usually keep it around 100 characters for both C
8485
and Python.
8586

86-
8787
:test_tube: Testing Changes
8888
---------------------------
8989

@@ -97,9 +97,8 @@ the same pull request.
9797

9898
For help getting started with testing, see the following resources:
9999

100-
- [Developer's Guide][devguide]
101-
- [Regression Testing][testing]
102-
100+
- [Developer's Guide][devguide]
101+
- [Regression Testing][testing]
103102

104103
:memo: Commit Messages
105104
----------------------
@@ -110,45 +109,135 @@ proud of your work and set up a proper GIT identity for your commits:
110109

111110
<img src="../doc/jack.png" width=70 align="right">
112111

113-
$ git config --global user.name "Jacky Linker"
114-
$ git config --global user.email [email protected]
112+
```bash
113+
$ git config --global user.name "Jacky Linker"
114+
$ git config --global user.email [email protected]
115+
```
115116

116117
Example commit message from one of many [online guides][cbeams]. Use
117118
`git commit -s` to automatically add a `Signed-off-by` for proof of
118119
origin, see [DCO][] for more info.
119120

120-
subsystem: brief, but clear and concise summary of changes
121-
122-
More detailed explanatory text, if necessary. Wrap it to about 72
123-
characters or so. In some contexts, the first line is treated as
124-
the subject of an email and the rest of the text as the body. The
125-
empty line separating summary from body is critical. Tools like
126-
rebase can get confused if the empty line is missing.
127-
128-
Further paragraphs should be separated with empty lines.
129-
130-
- Bullet points are okay, too
131-
132-
- Typically a hyphen or asterisk is used for the bullet, preceded
133-
by a single space, with blank lines in between, but conventions
134-
vary here
135-
136-
If you use an issue tracker, put references to them at the bottom,
137-
like this:
138-
139-
Resolves: #123
140-
See also: #456, #789
141-
142-
Signed-off-by: Jacky Linker <[email protected]>
121+
```text
122+
subsystem: brief, but clear and concise summary of changes
123+
124+
More detailed explanatory text, if necessary. Wrap it to about 72
125+
characters or so. In some contexts, the first line is treated as
126+
the subject of an email and the rest of the text as the body. The
127+
empty line separating summary from body is critical. Tools like
128+
rebase can get confused if the empty line is missing.
129+
130+
Further paragraphs should be separated with empty lines.
131+
132+
- Bullet points are okay, too
133+
134+
- Typically a hyphen or asterisk is used for the bullet, preceded
135+
by a single space, with blank lines in between, but conventions
136+
vary here
137+
138+
If you use an issue tracker, put references to them at the bottom,
139+
like this:
140+
141+
Resolves: #123
142+
See also: #456, #789
143+
144+
Signed-off-by: Jacky Linker <[email protected]>
145+
```
143146

144147
This is an example of how to [automatically close][closing] an issue
145148
when the commit is merged to mainline. Several keywords are available.
146149

150+
:lock_with_ink_pen: Signing Commits with GPG
151+
---------------------------------------------
152+
153+
To ensure the authenticity and integrity of your contributions, we
154+
**require** all commits to be signed with GPG. This cryptographically
155+
verifies that commits come from a trusted source.
156+
157+
### Generating a GPG Key
158+
159+
If you don't already have a GPG key, generate one:
160+
161+
```bash
162+
$ gpg --full-generate-key
163+
```
164+
165+
When prompted, choose:
166+
- Key type: `RSA and RSA` (default)
167+
- Key size: `4096` bits (recommended for security)
168+
- Expiration: `0` (key does not expire)
169+
- Real name and email: Use the same email as your Git configuration
170+
171+
> [!NOTE]
172+
> We recommend keys that do not expire for signing commits. Expiration
173+
> creates a "usability time bomb" without providing meaningful security
174+
> benefits for code signing. See [this article][pgpfan] for details.
175+
176+
### Configuring Git to Sign Commits
177+
178+
First, find your GPG key ID:
179+
180+
```bash
181+
$ gpg --list-secret-keys --keyid-format=long
182+
```
183+
184+
Look for the line starting with `sec`, the key ID is the part after the `/`.
185+
For example, in `sec rsa4096/ABCD1234EFGH5678`, the key ID is `ABCD1234EFGH5678`.
186+
187+
Configure Git to use your GPG key:
188+
189+
```bash
190+
$ git config --global user.signingkey ABCD1234EFGH5678
191+
$ git config --global commit.gpgsign true
192+
```
193+
194+
The second command enables automatic signing for all commits. Alternatively,
195+
you can sign individual commits with `git commit -S`.
196+
197+
### Publishing Your Public Key
198+
199+
To allow others to verify your signatures, publish your public key to a
200+
keyserver:
201+
202+
```bash
203+
$ gpg --keyserver hkps://keys.openpgp.org --send-keys ABCD1234EFGH5678
204+
```
205+
206+
> [!IMPORTANT]
207+
> The keyserver will send a verification email to the address associated
208+
> with your key. You **must** click the link in that email to confirm
209+
> ownership before your key becomes searchable by email address.
210+
211+
Alternative keyservers you can use:
212+
- `hkps://keyserver.ubuntu.com`
213+
- `hkps://pgp.mit.edu`
214+
215+
### Adding Your GPG Key to GitHub
216+
217+
For GitHub to show your commits as "Verified", you need to add your public
218+
key to your account:
219+
220+
1. Export your public key:
221+
```bash
222+
$ gpg --armor --export ABCD1234EFGH5678
223+
```
224+
225+
2. Copy the entire output, including the `-----BEGIN PGP PUBLIC KEY BLOCK-----`
226+
and `-----END PGP PUBLIC KEY BLOCK-----` lines.
227+
228+
3. Go to [GitHub Settings → SSH and GPG keys](https://github.com/settings/keys)
229+
230+
4. Click **New GPG key** and paste your public key.
231+
232+
Now your signed commits will display a "Verified" badge on GitHub! :white_check_mark:
233+
234+
For more details, see GitHub's [official documentation on commit signature verification][gpg-verify].
147235

148236
:twisted_rightwards_arrows: Pull Requests
149237
-----------------------------------------
150238

151-
> _The git repository is the canonical location for information._
239+
> [!NOTE]
240+
> _The git repository is the canonical location for all information._
152241
153242
A pull request should preferably address a single issue or change. This
154243
may of course include multiple related changes, but what is important to
@@ -167,7 +256,6 @@ Buildroot, consider the pull request message body similar to the cover
167256
letter for a series of patches -- it's a summary of changes, and it is
168257
lost when the changes are merged to the mainline branch.
169258

170-
171259
:balance_scale: Code of Conduct
172260
-------------------------------
173261

@@ -184,6 +272,8 @@ other contributions that are not aligned to this Code of Conduct."*
184272
[PEP-8]: https://peps.python.org/pep-0008/
185273
[RDD]: https://tom.preston-werner.com/2010/08/23/readme-driven-development
186274
[cbeams]: https://cbea.ms/git-commit/#seven-rules
187-
[conduct]: CODE-OF-CONDUCT.md
188-
[DCO]: https://developercertificate.org/
189-
[closing]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
275+
[conduct]: CODE-OF-CONDUCT.md
276+
[DCO]: https://developercertificate.org/
277+
[closing]: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
278+
[gpg-verify]: https://docs.github.com/en/authentication/managing-commit-signature-verification
279+
[pgpfan]: https://articles.59.ca/doku.php?id=pgpfan:expire

0 commit comments

Comments
 (0)