|
| 1 | +Contributing Guidelines |
| 2 | +======================= |
| 3 | + |
| 4 | +Thank you for taking the time to contribute to curiOS! |
| 5 | + |
| 6 | +We welcome any help in the form of bug reports, fixes, or patches to add |
| 7 | +new features. We prefer GitHub pull requests, but are open to other forms |
| 8 | +of collaboration as well. Let's talk! |
| 9 | + |
| 10 | + |
| 11 | +Getting Started |
| 12 | +--------------- |
| 13 | + |
| 14 | +If you are unsure how to start implementing an idea or fix: |
| 15 | + |
| 16 | + - Open an issue at <https://github.com/kernelkit/curiOS/issues> |
| 17 | + - Use the bug report template for bugs |
| 18 | + - Use the feature request template for new containers or features |
| 19 | + - Contact us via [KernelKit](https://kernelkit.org) |
| 20 | + |
| 21 | +> **Note:** Talking about code and problems first is often the best way |
| 22 | +> to get started before submitting a pull request. We have found it |
| 23 | +> always saves time, yours and ours. |
| 24 | +
|
| 25 | + |
| 26 | +General Guidelines |
| 27 | +------------------ |
| 28 | + |
| 29 | +When submitting bug reports or patches, please state which version the |
| 30 | +change is made against, what it does, and, more importantly **why** -- |
| 31 | +from your perspective, why is it a bug, why does the code need changing |
| 32 | +in this way. Start with why. |
| 33 | + |
| 34 | + - **Bug reports** need metadata like curiOS version or commit hash |
| 35 | + - **Bug fixes** also need version, and (preferably) a corresponding |
| 36 | + issue number for the ChangeLog |
| 37 | + - **New features** need discussion first! Please open an issue or |
| 38 | + contact us before starting work on major changes |
| 39 | + - **New containers** should follow the existing pattern: |
| 40 | + - Create defconfigs for both amd64 and arm64 |
| 41 | + - Add board-specific rootfs overlays if needed |
| 42 | + - Update the build workflow matrix |
| 43 | + - Document the container in README.md with examples |
| 44 | + |
| 45 | +Please take care to ensure you follow the project coding style and commit |
| 46 | +message format. If you follow these recommendations you help the |
| 47 | +maintainers and make it easier for them to include your contributions. |
| 48 | + |
| 49 | + |
| 50 | +Coding Style |
| 51 | +------------ |
| 52 | + |
| 53 | + - **Shell scripts**: Follow the existing style in `board/*/rootfs/` |
| 54 | + - Use POSIX sh when possible (not bash-specific features) |
| 55 | + - Use tabs for indentation |
| 56 | + - Keep scripts simple and maintainable |
| 57 | + |
| 58 | + - **Buildroot configs**: Follow Buildroot conventions |
| 59 | + - Use `make savedefconfig` to generate clean defconfigs |
| 60 | + - Keep configs minimal and focused |
| 61 | + |
| 62 | + - **Documentation**: Use clear, concise markdown |
| 63 | + - Include practical examples |
| 64 | + - Mention architecture support (amd64/arm64) |
| 65 | + - Document environment variables and volumes |
| 66 | + |
| 67 | + |
| 68 | +Commit Messages |
| 69 | +--------------- |
| 70 | + |
| 71 | +Please use the [Conventional Commits](https://www.conventionalcommits.org/) |
| 72 | +format for your commit messages. This helps us generate meaningful changelogs. |
| 73 | + |
| 74 | +Examples: |
| 75 | + |
| 76 | +``` |
| 77 | +board: add ENABLE_INTERFACES support to nftables container |
| 78 | +
|
| 79 | +Allow nftables container to automatically bring up and down network |
| 80 | +interfaces via the ENABLE_INTERFACES environment variable. |
| 81 | +
|
| 82 | +Fixes #20 |
| 83 | +``` |
| 84 | + |
| 85 | +``` |
| 86 | +workflows: fix tarball structure for podman/docker load |
| 87 | +
|
| 88 | +Remove directory wrapper from OCI tarballs to support podman load |
| 89 | +and docker load commands. |
| 90 | +
|
| 91 | +Fixes #21 |
| 92 | +``` |
| 93 | + |
| 94 | + - Use a short summary line (50-72 chars) |
| 95 | + - Add a blank line, then a more detailed description |
| 96 | + - Reference issue numbers with `Fixes #N` or `Closes #N` |
| 97 | + - Sign your commits with `Signed-off-by:` (use `git commit -s`) |
| 98 | + |
| 99 | + |
| 100 | +Testing Changes |
| 101 | +--------------- |
| 102 | + |
| 103 | +Before submitting a pull request: |
| 104 | + |
| 105 | +1. **Build test**: Ensure your changes build for both amd64 and arm64 |
| 106 | + ```bash |
| 107 | + make <container>_amd64_defconfig |
| 108 | + make |
| 109 | + make <container>_arm64_defconfig |
| 110 | + make |
| 111 | + ``` |
| 112 | + |
| 113 | +2. **Runtime test**: Test the resulting container image |
| 114 | + ```bash |
| 115 | + cd output/images |
| 116 | + podman load < rootfs-oci |
| 117 | + podman run --rm <image>:<tag> |
| 118 | + ``` |
| 119 | + |
| 120 | +3. **Documentation**: Update README.md if you've added features or |
| 121 | + changed behavior |
| 122 | + |
| 123 | + |
| 124 | +Pull Request Process |
| 125 | +--------------------- |
| 126 | + |
| 127 | +1. Fork the repository and create a branch for your changes |
| 128 | +2. Make your changes following the guidelines above |
| 129 | +3. Test your changes thoroughly |
| 130 | +4. Push to your fork and submit a pull request |
| 131 | +5. Address any review feedback |
| 132 | + |
| 133 | +We'll review your PR as soon as possible. Please be patient and responsive |
| 134 | +to feedback. |
| 135 | + |
| 136 | + |
| 137 | +License |
| 138 | +------- |
| 139 | + |
| 140 | +By contributing to curiOS, you agree that your contributions will be |
| 141 | +licensed under the GNU General Public License v2.0, the same license |
| 142 | +as the project itself. |
| 143 | + |
| 144 | + |
| 145 | +Questions? |
| 146 | +---------- |
| 147 | + |
| 148 | +If you have questions about contributing, please open an issue or |
| 149 | +contact us via [KernelKit](https://kernelkit.org). |
| 150 | + |
| 151 | +Thank you for helping make curiOS better! |
0 commit comments