diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a72e209..a679ac7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,4 +73,86 @@ and you have fixed an error, the commit or merge request should look like this: `mail-client/freelook-bin: fix QA - EROOT missing slash` -**This system also applies on your metadata.xml and Manifest.** \ No newline at end of file +**This system also applies on your metadata.xml and Manifest.** + +## Development workflow + +### Add the overlay to the system +Edit /etc/portage/repos.conf/src_prepare-overlay.conf (as root) +```toml +[src_prepare-overlay] +auto-sync = yes +location = /var/db/repos/src_prepare-overlay +sync-git-clone-extra-opts = --depth=999999999 --no-shallow-submodules --no-single-branch --verbose +sync-git-pull-extra-opts = --depth=999999999 --verbose +sync-type = git +sync-uri = git@gitlab.com:src_prepare/src_prepare-overlay.git +sync-user = :portage +``` +If you dont have write access to the cloned branch yet use "sync-uri = https://gitlab.com/src_prepare/src_prepare-overlay.git" instead. + +### Sync the overlay +As root +```bash +emaint sync -r src_prepare-overlay +``` + +### Add new package + +#### Basics +As user +```bash +cd /var/db/repos/src_prepare-overlay +mkdir -p category/package-name +cd category/package-name +touch metadata.xml +touch package-name-package-version.ebuild +``` +Now edit the ebuild and metadata files accordingly. +[https://devmanual.gentoo.org/](For ebuild developemnt details look here) + +#### Tests +If a package's upstream has tests don't forget to enable them. +If they fail describe why in the comments inside the ebuild +(but please make the descriptions reasonably short). + +##### Package testing +Make sure you have FEATURES="test" enabled in the make.conf +```bash +echo 'FEATURES="${FEATURES} test"' >> make.conf +``` +And then, as root +```bash +echo "categroy/package-name test" >> /etc/portage/package.use/development-tests +``` + +##### Ebuild testing +repoman (app-portage/repoman) and pkgcheck (dev-util/pkgcheck) +will give you a report of what should be fixed. +```bash +repoman -Idx full +pkgcheck scan +``` + +#### Metadata +metadata.xml should contain at least these lines: +```xml + + + + + organization-or-user/package + + +``` +Adjust the "type" and "organization-or-user/package" accordingly. + +#### Installation +If the (system wide) repository is set up correctly you should be able to just emerge the package you added right away +```bash +emegre --ask --verbose --jobs=1 --quiet-build=n categroy/package-name +``` + +#### Git +Follow the rules described in "Submitting Merge Requests" section. +GPG signing is not required but encouraged. Gentoo Wiki provides a great example [https://wiki.gentoo.org/wiki/Project:Infrastructure/Generating_GLEP_63_based_OpenPGP_keys](how to create a strong key). diff --git a/README.md b/README.md index 426e9a2..1ae3cf6 100644 --- a/README.md +++ b/README.md @@ -88,13 +88,3 @@ See [examples/package.accept_keywords/src_prepare-overlay](https://gitlab.com/sr ## Contributing We appreciate and encourage for contribution. If you want a specific package or want to create a package for us to maintain, see [CONTRIBUTING.md](/CONTRIBUTING.md). - - -## Quick maintainer guide - -### Testing ebuilds - -``` sh -repoman manifest -ebuild FILE clean merge -```