From cf5c1e94a08dcd8c42fbf55e99aa33317ca3130c Mon Sep 17 00:00:00 2001 From: bretton Date: Sat, 2 Nov 2024 14:36:20 +0200 Subject: [PATCH 1/2] Add contributions guide starting point --- CONTRIBUTING.md | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 +-- 2 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..ec1563de --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,96 @@ +# Contributing + +To contribute to this repository, please review the following basic guidelines, and then make a pull request. + +## Versioning + +Building of images for [potluck.honeyguide.net](https://potluck.honeyguide.net) happens after git update, where flavours with a higher version number than before get built. + +The version must be set in the `flavour-name.ini` manifest file. + +The basic structure of the versioning is as follows: + +``` +X.Y.Z / 0.0.1 + +X = Major version +Y = Minor version +Z = Build updates +``` + +Minor tweaks and changes increment the final digit. For example, a typo is fixed, or a config file changed to include an option. Then increment final digit to force a rebuild of the image. + +``` +1.1.1 --> 1.1.2 +``` + +Many images are layered images that use a base jail. When there is a new base image, dependent pot images need to be rebuilt for it. + +The current practise of the maintainer is to increment the second last digit, and set the final digit to 1. For example: + +``` +1.1.3 --> 1.2.1 # new base image +``` + +Minor adjustments on the new base image will then increment the final digit. + +## Changelog + +To try and keep changes to a short format, it's preferred to list multiple changelog items under a single Major.Minor version. + +Do not include the (X.Y.Z) shown here to demonstrate an example progression. + +``` +1.3 + +* Version bump for new base image (1.3.1) +* Enable milliseconds in syslog-ng for all log timestamps (1.3.2) +* Change port to 8080 (1.3.3) + +--- + +1.2 + +* Version bump for new base image 14.1 +* Extra steps to trim image size +* Fix spelling errors +* Adjust version of package + +--- + +1.1 + +* Version bump for new base image + +``` + +## Pkg steps + +Avoid installing multiple packages in a single line like this: + +``` +step "Install packages" +pkg install -y sudo nano rsync +``` + +Instead break it up to individual packages like this + +``` +step "Install sudo" +pkg install -y sudo + +step "Install nano" +pkg install -y nano + +step "Install rsync" +pkg install -y rsync +``` + +This is easier to debug during testing or the build process. Can easily comment out problem packages. + +## Checklist + +Many flavours have a `CHECKLIST.md` file with specific things to check when updating that flavour. + +An upgrade of `php` or `python` can cause problems, and these should be identified in the check list file. + diff --git a/README.md b/README.md index da1e1fcc..5762ada6 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ To learn about pot & pot flavours, go to [pot.pizzamig.dev](https://pot.pizzamig To learn how to use these pot flavours & images (spoiler alert: it is just one command...), go to [potluck.honeyguide.net](https://potluck.honeyguide.net). - - **Additional flavours or fixes/updates to existing flavours are very welcome via pull requests!** +Please see [CONTRIBUTING.md](https://github.com/bsdpot/potluck/CONTRIBUTING.md) for useful contribution info. + For a relatively easy way to create new flavours based on our code, [see our howto](https://potluck.honeyguide.net/howto/). If you want to provide an additional flavour, please provide one or both "flavour" and "flavour".sh files as well as a short README.md. From 1dc60ce14cb1768f26ebe2a9bcb630a3778020a6 Mon Sep 17 00:00:00 2001 From: bretton Date: Sat, 22 Feb 2025 17:22:05 +0200 Subject: [PATCH 2/2] Update with comments from https://github.com/bsdpot/potluck/pull/133#issuecomment-2676246926 --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ec1563de..bf0890c6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,3 +94,12 @@ Many flavours have a `CHECKLIST.md` file with specific things to check when upda An upgrade of `php` or `python` can cause problems, and these should be identified in the check list file. +## Commit messages + +Naming convention for commits is suggested as follows: +``` +: +``` + +When doing a batch of updates collectively, use a label like `hashicluster` or `honeyguide`. +