#54 Fix spelling mistakes; Merge old wiki info for GitHub workflow
Closed 6 years ago by jhrozek. Opened 6 years ago by sobek.
SSSD/ sobek/docs fix-spelling-mistakes  into  master

file modified
+5 -5
@@ -4,27 +4,27 @@ 

  contribute to SSSD by improving the documentation!

  

  If you are looking for the rendered documentation in HTML format, please see

- the [docs link on the sssd pagure instance](https://pagure.io/docs/SSSD/sssd/).

+ the [docs link on SSSD's Pagure instance](https://pagure.io/docs/SSSD/sssd/).

  

  ## Contributing to the SSSD documentation

  

  The SSSD documentation is written in RST. To contribute to the documentation:

  

  1. Make sure Sphinx is installed (`dnf install python-sphinx graphviz` on Fedora)

- 2. Fork [this repository](https://pagure.io/SSSD/docs) on pagure

- 3. Add your content.  The [sphinx documentation](http://www.sphinx-doc.org/en/stable/contents.html)

+ 2. Fork [this repository](https://pagure.io/SSSD/docs) on Pagure

+ 3. Add your content.  The [Sphinx documentation](http://www.sphinx-doc.org/en/stable/contents.html)

     might prove useful. If you are adding a new page, don't forget to add it to

     an index!

  4. Build the HTML pages with `make html`

  5. Inspect that the result looks good. The HTML result is located in the `_build` directory

  6. Create a local commit with your changes

- 7. Push it to your pagure fork

+ 7. Push it to your Pagure fork

  8. Create a pull request

  

  One of the SSSD maintainers will then review the pull request.

  

  For fixing trivial issues like typos, you can also use the "Fork and edit"

- button in the [sssd docs repository](https://pagure.io/SSSD/docs) or just the

+ button in the [SSSD docs repository](https://pagure.io/SSSD/docs) or just the

  "Edit" button in your fork.

  

  ## Building the SSSD documentation

@@ -31,7 +31,7 @@ 

  ------------------------

  Most of the low-level functionality in the sysdb layer had been developed

  for many years for use in the ``local`` provider. At the same time, there

- are also most of the infrastrucure ready in the LDAP provider and the

+ are also most of the infrastructure ready in the LDAP provider and the

  NSS responder, because the automatic private groups are used by default

  already for trusted domains with ID mapping enabled.

  
@@ -56,7 +56,7 @@ 

  option that would be understood by admins better, such as

  ``auto_private_groups``. The new option must be read on SSSD startup and set

  the ``sss_domain_info->mpg`` flag, which is currently auto-enabled with

- sudomains only.

+ subdomains only.

  

  The code branch that saves the user (currently ``sdap_save_user``) must be

  extended to allow setting the GID number to be the same as UID number for
@@ -84,16 +84,16 @@ 

  How To Test

  -----------

  The primary use-cases are SSSD being a client of a generic LDAP server

- and SSSD on a Linux machine directly joined to an AD domain with

+ and SSSD on a GNU/Linux machine directly joined to an AD domain with

  ``id_provider=ad``.

  

  In both cases, setting the ``auto_private_groups`` option to  ``true``

  should result in the ``initgroups`` call returning the primary GID number

  of the user with the same value and resolving to the same name as the

- primary UID namber and the username.

+ primary UID number and the username.

  

- Other intefaces should produce symmetrical results, although at least in

- the case of the D-Bus based IFP interface, is it currently not the case,

+ Other interfaces should produce symmetrical results, although at least in

+ the case of the D-Bus based IFP interface, it is currently not the case,

  see `ticket #3543 <https://pagure.io/SSSD/sssd/issue/3543>`_.

  

  For example, here is an output of a test user with private groups autogenerated::

file modified
+54 -11
@@ -6,7 +6,8 @@ 

  There are many ways you can contribute to the System Security Services

  Daemon. This page should provide some basic pointers.

  

- SSSD development discussions occur either on the `SSSD development list

+ SSSD development discussions occur either on the `SSSD development

+ (sssd-devel) mailing list

  <https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org/>`__

  or on the `#sssd IRC channel <irc://irc.freenode.net/sssd>`__ on

  `freenode <http://freenode.net/>`__. Keep in mind that SSSD developers
@@ -39,25 +40,39 @@ 

  

  For the SSSD project, we use the

  `Git <http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html>`__

- source control system. ::

+ source control system.

+ 

+ Hosted on `Pagure <https://pagure.io/SSSD/sssd>`__ are the `documentation

+ <https://pagure.io/SSSD/docs>`__, the `issue tracker

+ <https://pagure.io/SSSD/sssd/issues>`__, and the referential repository: ::

  

      https://pagure.io/SSSD/sssd.git

  

- We also maintain a read-only mirror on GitHub. ::

+ SSSD's repository on Pagure is mirrored to GitHub and maintained as read-only instance: ::

  

      https://github.com/SSSD/sssd

  

+ The preferred way for sending patches is to create pull requests either

+ on Pagure or GitHub.

+ You can also e-mail your patch as an attachment to the `sssd-devel

+ <https://docs.pagure.org/SSSD.sssd/developers/contribute.html#contribute>`__

+ mailing list.

+ A guide for a `GitHub workflow

+ <https://docs.pagure.org/SSSD.sssd/newcomers/getting_started.html#github-workflow>`__

+ is available. The paragraphs below assume you are using Pagure.

+ 

  Tasks for newcomers

  -------------------

  

  We try to mark tickets that don't require too much existing knowledge

- with the ``easyfix`` keyword in Trac. We also prepared `a Pagure query

+ with the ``easyfix`` keyword in our issue tracker. We also prepared `a query

  <https://pagure.io/SSSD/sssd/issues?status=Open&tags=easyfix>`__ that

  lists the easy fixes.

  Before starting the work on any of these tickets, it might be a good idea

- to contact the SSSD developers on the `sssd-devel list

- <https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org/>`__

- and check if the ticket is still valid or ask for guidance in general.

+ to contact the SSSD developers on the `sssd-devel 

+ <https://docs.pagure.org/SSSD.sssd/developers/contribute.html#contribute>`__

+ mailing list and check if the ticket is still valid or ask for guidance in

+ general.

  

  Getting the source

  ~~~~~~~~~~~~~~~~~~
@@ -106,7 +121,6 @@ 

  

      git config commit.template .git-commit-template

  

- 

  Building SSSD

  -------------

  
@@ -232,9 +246,39 @@ 

  <https://docs.pagure.org/SSSD.sssd/developers/coding_style.html>`__

  was written for SSSD.

  

+ Spell-checker

+ ~~~~~~~~~~~~~

+ 

+ Please, check the spelling before submitting.

+ 

+ Use your favorite spell-checker. Checking with LibreOffice can be done like:

+ 

+ * open file(s) that contain(s) changes with "LibreOffice Writer"

+ 

+ * set the document language to "English (USA)"

+   (either `Tools -- Language -- For all Text`

+   or select whole text with keyboard shortcut Ctrl+A, then click at

+   the bottom in the middle)

+ 

+ * to start the check press F7

+   (equals `Tools -- Spelling and Grammar ...`)

+ 

+ * press [Ignore Once] for spelling mistakes

+   press [Ignore All] to ignore the known good string until LibreOffice is closed

+   press [Add to Dictionary] to add the word to the known good list

+ 

+ * fix spelling mistake with editor, not LibreOffice

+ 

+ * in terminal run `fgrep -ri ${BADWORD}` or `egrep -r 'REGEXP'`

+   to double-check and find other instances of problem

+ 

  Submitting

  ~~~~~~~~~~

  

+ Please, read the `basic etiquette` paragraph of the `GitHub workflow

+ <https://docs.pagure.org/SSSD.sssd/newcomers/getting_started.html#github-workflow>`__

+ before submitting.

+ 

  Make your changes and then add any new or modified files to a change-set

  with the command: ::

  
@@ -264,8 +308,7 @@ 

  patch makes the ``resolv_is_address()`` function public with tests and the

  other adds the function in the SSSD providers.

  

- Once your changes are ready for submission, submit it via a `GitHub pull

- request <https://docs.pagure.org/SSSD.sssd/newcomers/getting_started.html#github-workflow>`__.

+ Once your changes are ready for submission, submit it via a pull request.

  

  If a patch isn't accepted on the first review, you will need to modify

  it and resubmit it. When this happens, you will want to amend your
@@ -281,7 +324,7 @@ 

  and follow the directions in the interactive rebase to modify specific

  patches.

  

- Then just re-push the patches to GitHub, the pull request will be

+ Then just re-push the patches, the pull request will be

  refreshed automatically.

  

  Patch metadata

file modified
+2 -2
@@ -17,8 +17,8 @@ 

   * `Bug tracker <https://pagure.io/SSSD/sssd/issues>`_

   * `Mailing list for SSSD users discussion <https://lists.fedorahosted.org/admin/lists/sssd-users.lists.fedorahosted.org/>`_

   * `Mailing list for SSSD development discussion <https://lists.fedorahosted.org/admin/lists/sssd-devel.lists.fedorahosted.org/>`_

-  * `Github mirror <https://github.com/SSSD/sssd>`_

-  * `Github pull requests <https://github.com/SSSD/sssd/pulls>`_

+  * `GitHub mirror <https://github.com/SSSD/sssd>`_

+  * `GitHub pull requests <https://github.com/SSSD/sssd/pulls>`_

  

  Contents:

  

file modified
+125 -27
@@ -3,7 +3,7 @@ 

  Getting started with SSSD

  =========================

  

- This document will describe the step-by-step to "How to make your first

+ This document is a step-by-step guide for "How to make your first

  contribution to SSSD project".

  

  Setting up an environment for development
@@ -55,40 +55,49 @@ 

      dnssec-validation no;

  

  - Restart the named-pkcs11.service:

-   ``sudo systemctl restart named-pkcs11.service``

+   ``$ sudo systemctl restart named-pkcs11.service``

  

  GitHub workflow

  ---------------

  

- SSSD is hosted on `pagure.io <https://pagure.io/SSSD/sssd>`_ but the

- development happens on `GitHub <https://github.com/SSSD/sssd>`__.

+ For general information about SSSD hosting see the paragraph

+ `Source Code Repository <https://docs.pagure.org/SSSD.sssd/developers/contribute.html#source-code-repository>`__.

+ It covers using SSSD's Pagure repository.

  

- So, the first thing to contribute to SSSD is forking our `GitHub

- <https://github.com/SSSD/sssd>`__ repository.

+ This section assumes you use GitHub.

  

- In order to do so, go to our `SSSD's github page

- <https://github.com/SSSD/sssd>`__, log in with your GitHub account

- and click in the ``Fork`` button. It will create a sssd fork in your

- own GitHub account. Once it's done ...

+ At first some general information. All pull request activity generates

+ an e-mail notification to the `sssd-devel

+ <https://docs.pagure.org/SSSD.sssd/developers/contribute.html#contribute>`__

+ mailing list so that we keep the development history outside GitHub.

+ 

+ These are the steps to contribute to SSSD:

+ 

+ At first fork our GitHub repository. In order to do so, go to the

+ `SSSD GitHub page <https://github.com/SSSD/sssd>`__, log in with

+ your GitHub account and click on the ``Fork`` button. It will create

+ a fork in your own GitHub account. Once it's done ...

  

  - Clone your own SSSD fork:

    ``$ git clone git@github.com:<your_username>/sssd.git``

  

- - Add `SSSD's github repo <https://github.com/SSSD/sssd>`__ as a

-   remote repo: ``$ git remote add github https://github.com/SSSD/sssd``

+ - Add SSSD's GitHub repo as a remote repo:

+   ``$ git remote add github https://github.com/SSSD/sssd``

  

+ Using ``https://`` will ensure you don't push to SSSD's GitHub repo by mistake.

  Once those two steps are done, you're good to go and start hacking on

- your task. We strongly recommend to that in local branches!

+ your task. We strongly recommend to do that in local branches!

  

- - Create your local branch: ``git checkout -b wip/meaningful_name``

+ - Create your local branch:

+   ``$ git checkout -b wip/meaningful_name``

  

  Considering you have built SSSD following the instructions provided

  in our `Contribute page

- <https://docs.pagure.org/SSSD.sssd/developers/contribute.html>`__ ,

+ <https://docs.pagure.org/SSSD.sssd/developers/contribute.html>`__,

  have made your changes following our `Coding guidelines

- <https://docs.pagure.org/SSSD.sssd/developers/coding_style.html>`__ and

+ <https://docs.pagure.org/SSSD.sssd/developers/coding_style.html>`__,

  have committed your changes following our `git-commit-template

- <https://github.com/SSSD/sssd/blob/master/.git-commit-template>`__ and

+ <https://github.com/SSSD/sssd/blob/master/.git-commit-template>`__, and

  have implemented some unit/integration tests to ensure we're never hit

  by this very same issue again in the future ... now is time to open your

  pull-request.
@@ -98,9 +107,12 @@ 

  - Push the changes to *your* SSSD repo:

    ``$ git push origin wip/meaningful_name``

  

- - Go to your GitHub page;

+ - Open the Pull Request either:

  

- - Open the Pull Request by using GitHub's web UI.

+   - by using GitHub's web UI on your GitHub page, or

+ 

+   - by using the `hub <https://github.com/github/hub>`__ tool:

+     ``$ hub pull-request``

  

  Here, I'd like to add some really basic etiquette rules for opening the

  pull-request:
@@ -114,14 +126,15 @@ 

    reproduce the issue you're fixing and/or to reproduce the feature

    you're implementing.

  

- Okay. Now your pull-request is opened and will be reviewed by one of

+ Click on **[Create pull request]**.

+ Now your pull-request has been created and will be reviewed by one of

  the core SSSD developers.

  

- Please, keep in mind that as the most part of the developers may also

- be quite busy with their day-to-day job and may take some time till

- someone actually review your pull-request. Sending a "ping"/"bump" is

+ Please, keep in mind that the developers may also

+ be quite busy with their day-to-day job and it may take some time till

+ someone actually reviews your pull-request. Sending a "ping"/"bump" is

  totally fine, but only after a week or so (in other words, not

- immediately after the pull-request has been opened).

+ immediately after the pull-request has been created).

  

  Once your code is reviewed, a few different things may happen:

  
@@ -149,12 +162,12 @@ 

    - Squash the changes to the original patches;

  

    - Rebase your work on top of SSSD's git master:

-     ``git rebase github/master``;

+     ``$ git rebase github/master``

  

      - Please, do *not* merge the branches!

  

    - Update the pull-request with the new patchset:

-     ``git push -f origin wip/meaningful_name``

+     ``$ git push -f origin wip/meaningful_name``

  

    - Leave a message in GitHub mentioning that your patchset has been

      updated.
@@ -166,6 +179,91 @@ 

      add another core developer to the discussion. Usually democracy

      wins! :-)

  

+ Notes for Maintainers

+ ~~~~~~~~~~~~~~~~~~~~~

+ 

+ Reviewing pull requests

+ ^^^^^^^^^^^^^^^^^^^^^^^

+ 

+ The list of open pull requests can be found at

+ `https://github.com/SSSD/sssd/pulls <https://github.com/SSSD/sssd/pulls>`__.

+ 

+ Any GitHub user can comment on the code:

+ 

+ - either add a comment to the text field, or

+ 

+ - click on the individual commit links and add comments inline to the diff.

+ 

+ Only collaborators can self-assign a pull requests and add labels. If you

+ would like to be added as a collaborator, please send an e-mail to `sssd-devel

+ <https://docs.pagure.org/SSSD.sssd/developers/contribute.html#contribute>`__

+ and ask to be added.

+ 

+ If you want to formally review a pull request, please assign the pull request

+ to yourself. This indicates that you'll be working with the submitter on

+ pushing their pull requests upstream. You don't need to assign the pull

+ request if you just want to add a one-time comment. The pull-request

+ assignee(s) will be added as ``Reviewed-By`` tags when pushing to the Pagure

+ repository.

+ 

+ If there is an issue in the code that you feel warrants a patch respin, add

+ the ``changes requested`` label to the pull request.

+ 

+ Once you agree with the pull request, add the ``accepted`` label to the pull

+ request. One of the gatekeepers will then push the pull request to the

+ sssd repository manually.

+ 

+ If a pull-request is submitted by someone from outside the core team,

+ the CI tests won't run to make sure some potentially malicious code

+ is not ran on the CI nodes. To allow the code to be tested, one of

+ the core developers must add: ::

+ 

+     ok to test

+ 

+ as a comment to the pull request. An example of one such pull request

+ can be found `here <https://github.com/SSSD/sssd/pull/35>`__.

+ 

+ **Pro-tips:**

+ 

+ - Pressing ``l`` on the request allows to set labels without reaching

+   for the mouse. You can also set assignee by pressing ``a``.

+ 

+ - You can add pull requests as refs and check them out as branches locally.

+   To do that, add another ``fetch`` directive to your GitHub remote definition

+   using ``$ git config``. ::

+ 

+     GITHUB_REMOTE="github"

+     git config --add remote.${GITHUB_REMOTE}.fetch "+refs/pull/*/head:refs/remotes/${GITHUB_REMOTE}/pull/*"

+ 

+   Then you can fetch and checkout the pull requests with: ::

+ 

+     git fetch github

+     git checkout -b pr7review --track github/pull/7

+ 

+ Pushing a pull request

+ ^^^^^^^^^^^^^^^^^^^^^^

+ 

+ Only pull requests with an ``ack`` label can be pushed.

+ 

+ To push a patch, first apply it, for example: ::

+ 

+     hub am https://github.com/SSSD/sssd/pull/5

+ 

+ Don't forget to add the ``Reviewed-By``  tags, based on the pull request

+ assignee. It's recommended to use the pre-push hook from ``contrib/git/pre-push``

+ that rejects any pushes without a ``Reviewed-By`` tag.

+ 

+ Then check again what patches would be pushed: ::

+ 

+     git push -n github master

+ 

+ And if the hashes look OK, finally push the patches: ::

+ 

+     git push github master

+ 

+ Finally, add the commit hashes to the pull request page, add the label

+ ``pushed`` and close the pull request.

+ 

  Notes

  -----

  
@@ -175,4 +273,4 @@ 

  

  In case you spot something wrong in this page, please, open an issue

  and/or a pull-request to our `sssd-docs

- repo <https://pagure.io/SSSD/docs>`__

+ repo <https://pagure.io/SSSD/docs>`__.

file modified
+1 -2
@@ -2,8 +2,7 @@ 

  ===============

  

  This guide describes the best practices for newcomers who are willing to

- contribute to the SSSD project.

- and troubleshoot SSSD.

+ contribute to the SSSD project, and troubleshoot SSSD.

  

  .. toctree::

     :maxdepth: 1

file modified
+2 -2
@@ -396,7 +396,7 @@ 

  

  If you think you have found a bug or would like to file an enhancement

  request, create a `new issue

- <https://pagure.io/SSSD/sssd/new_issue>`__ in the SSSD's Pagure instance.

- Logging into the Trac instance requires a Fedora Account System login.

+ <https://pagure.io/SSSD/sssd/new_issue>`__.

+ Logging into the issue tracker requires a Fedora Account System login.

  To create one, use the `FAS interface

  <https://admin.fedoraproject.org/accounts/>`__.

file modified
+2 -2
@@ -14,7 +14,7 @@ 

  

  You'll need a `Fedora Account System <https://admin.fedoraproject.org/accounts>`_

  login to file a bug. When you have one, navigate to

- `the new ticket form <https://pagure.io/SSSD/sssd/new_issue>`_

+ `the new ticket form <https://pagure.io/SSSD/sssd/new_issue>`_.

  

  Some bugs will be automatically cloned from distribution bug-trackers,

  such as http://bugzilla.redhat.com.
@@ -103,7 +103,7 @@ 

  

  Then attach the core file and the backtrace.

  

- When connecting to a sssd process with ``gdb``, you should increase the

+ When connecting to an sssd process with ``gdb``, you should increase the

  ``timeout`` option in the debugged process's section up from its default

  value, such as::

  

Please note, at "Pushing a pull request" I changed from:

git push -n origin master
git push origin master

to:

git push -n github master
git push github master

as it matches the setup from the above sections. I hope this is alright.

I have a question for the file design_pages/auto_private_groups.rst.
In the section Overview of the solution you can read:

Most of the low-level functionality in the sysdb layer had been developed ...

has 'had been' been used intentionally? If sysdb layer is still being developed 'has been' should be used, from my point of view.

rebased onto 2c229a4b5930c5cd8ad88369aa8135e2e8ef75af

6 years ago

rebased onto 8b877a20e96cbfc848f9008bb4a9363da9ff8b11

6 years ago

Could you split it into two commits?
One with grammar fixes and another with new content.

@sobek btw how do you find the typos? If there is some aspell or similar command that is easy to run, perhaps we could amend the howto to also include this step so that everyone could check e.g. newly submitted design pages for typos.

I would like to request a small change here. Could you explicitly add that this is the preferred way?

Did you mean to say "assume you are using github" here?

In the meantime, we started using "changes requested" and "accepted" labels instead of "nack" and "ack" because they sound a bit more polite.

I left a couple of comments inline. Thank you very much for the contribution. I agree with @lslebodn it would be nice to split your commit into two, but if it's too much hassle, I could also live with a single commit.

rebased onto b734302

6 years ago

No, because on line 113 git clone uses Pagure. I thought this file is for Pagure, the other for GitHub. Of course, both share information, hence the linking.

You are welcome.
The commits have been split in two with the help of git reset --soft HEAD~1.
The changes have been made and pushed.

@jhrozek I added the paragraph "Spell-checker" to the file developers/contribute.rst.
My workflow for finding typos is at first do a mass scan:

  • open one file with LibreOffice Writer

  • select whole text with keyboard shortcut Ctrl+A

  • at the bottom in the middle set the language to "English (USA)" (equals Tools -- Language -- For all Text -- English (USA))

  • press F7 (equals: Tools -- Spelling and Grammar ...)

  • press [Ignore Once] for known bad words; press [Ignore All] to ignore the word until LibreOffice is closed; press [Add to Dictionary] to add it to known word list

  • fix problem with command line text editor

  • in the terminal go to directory with source code; run fgrep -ri ${BADWORD} or egrep -r 'REGEXP' to find other instances of problem

  • do not close LibreOffice, open next file and check it

To follow up after mass scanning:

  • I run git log and search for the hash of my latest commit

  • then rungit diff HASH to get the changes

  • copy-Pasting the output and check it

Finding other problems, f.e. "he its" => "he is)", by careful reading.

I tried aspell in the past but could not find out how to manage dictionaries. I did not spend time to find out because LibreOffice was working for me.

2 new commits added

  • Merge old wiki info for GitHub workflow
  • Fix spelling mistakes
6 years ago

I'm sorry for the long wait, I pushed the patches now.

Thanks for the contribution!

Pull-Request has been closed by jhrozek

6 years ago