CONTRIBUTING.rst 2.83 KB

Contribution Guide for libgcompat

Author:
  • A. Wilcox, documentation writer
Copyright: © 2016-2018 Adélie Linux and contributors. NCSA open source licence.

Introduction

This repository contains the libgcompat, a library providing GNU libc (glibc) compatibility for Linux computers using the musl libc.

Code style

Contributions are expected to maintain a consistent code style. This ensures readable and future maintainability, since all the code will look and feel the same. A few key notes about the C style used in this repository:

Include comments

When using the #include preprocessor directive, add a comment next to it detailing the interfaces used from that header. For example:

#include <stdlib.h>     /* getenv */

Tabs

Hard tabs (t) are used, and are 8 spaces. Where brace alignment is required, tabs are used to the nearest eighth space, followed by the requisite number of spaces.

Braces

Always use braces for blocks like if, while, for, even if the block only contains a single statement. This is to ensure that more complex decision trees do not have accidental side-effects.

Contributing Changes

This section describes the usual flows of contribution to this repository.

GitLab Pull Requests

  1. If you do not already have an Adélie GitLab_ account, you must create one.
  2. Create a fork of the gcompat repository. For more information, consult the GitLab online documentation.
  3. Clone your forked repository to your computer.
  4. Make your changes.
  5. Test your changes to ensure they are correct.
  6. Add (or remove) changed files using git add and git rm.
  7. Commit your changes to the tree using the command git commit and git push.
  8. Visit your forked repository in a Web browser.
  9. Choose the Create Pull Request button.
  10. Review your changes to ensure they are correct, and then submit the form.

Mailing List

  1. Clone the packages repository to your computer.

  2. Make your changes.

  3. Test your changes to ensure they are correct.

  4. Add (or remove) changed files using git add and git rm.

  5. Commit your changes to the tree using the command git commit.

  6. Use the command git format-patch HEAD^ to create a patch file for your commit.

    Note

    If you have made multiple commits to the tree, you will need to add an additional ^ for each commit you have made. For example, if you have made three commits, you will use the command git format-patch HEAD^^^.

  7. Email the resulting patch to the gcompat@lists.adelielinux.org mailing list, or use git send-email.