From 814a54188dc66519bdc93757fc8e7566480504a4 Mon Sep 17 00:00:00 2001
From: saksham1115 <saksham115@gmail.com>
Date: Mon, 29 Feb 2016 18:55:13 +0530
Subject: [PATCH 4/4] Fix for issue #5429

---
 docs/source/siteadmin/configuration.rst          |  6 +++++-
 docs/source/siteadmin/deploying.rst              | 26 ++++++++++++------------
 docs/source/siteadmin/media-types.rst            | 12 +++++------
 docs/source/siteadmin/production-deployments.rst | 10 ++++-----
 docs/source/siteadmin/theming.rst                |  4 ++--
 mediagoblin/plugins/piwigo/README.rst            |  2 +-
 mediagoblin/plugins/trim_whitespace/README.rst   |  3 ++-
 7 files changed, 34 insertions(+), 29 deletions(-)

diff --git a/docs/source/siteadmin/configuration.rst b/docs/source/siteadmin/configuration.rst
index c2705b3..dd0d6cd 100644
--- a/docs/source/siteadmin/configuration.rst
+++ b/docs/source/siteadmin/configuration.rst
@@ -58,9 +58,13 @@ Making local copies
 ===================
 
 Let's assume you're doing the virtualenv setup described elsewhere in this
-manual, and you need to make local tweaks to the config files. How do you do
+manual, and you need to make local tweaks to the config files. How do you do 
 that? Let's see.
 
+To make changes to mediagoblin.ini ::
+
+    cp mediagoblin.ini mediagoblin_local.ini
+
 To make changes to paste.ini ::
 
     cp paste.ini paste_local.ini
diff --git a/docs/source/siteadmin/deploying.rst b/docs/source/siteadmin/deploying.rst
index 5ba9b05..47901da 100644
--- a/docs/source/siteadmin/deploying.rst
+++ b/docs/source/siteadmin/deploying.rst
@@ -43,10 +43,10 @@ approach, see our
     Throughout the documentation we use the ``sudo`` command to indicate that
     an instruction requires elevated user privileges to run. You can issue
     these commands as the ``root`` user if you prefer.
-
+    
     If you need help configuring ``sudo``, see the
     `Debian wiki <https://wiki.debian.org/sudo/>`_ or the
-    `Fedora Project wiki <https://fedoraproject.org/wiki/Configuring_Sudo/>`_.
+    `Fedora Project wiki <https://fedoraproject.org/wiki/Configuring_Sudo/>`_. 
 
 
 Prepare System
@@ -161,7 +161,7 @@ MediaGoblin does not require special permissions or elevated
 access to run. As such, the preferred way to run MediaGoblin is to
 create a dedicated, unprivileged system user for the sole purpose of running
 MediaGoblin. Running MediaGoblin processes under an unprivileged system user
-helps to keep it more secure.
+helps to keep it more secure. 
 
 The following command (entered as root or with sudo) will create a
 system account with a username of ``mediagoblin``. You may choose a different
@@ -181,9 +181,9 @@ read the media files (images, videos, etc.) that users upload.
 
 We will also create a ``mediagoblin`` group and associate the mediagoblin
 user with that group, as well::
-
+  
     sudo groupadd mediagoblin && sudo usermod --append -G mediagoblin mediagoblin
-
+       
 No password will be assigned to this account, and you will not be able
 to log in as this user. To switch to this account, enter::
 
@@ -198,7 +198,7 @@ Create a MediaGoblin Directory
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 You should create a working directory for MediaGoblin. This document
-assumes your local git repository will be located at
+assumes your local git repository will be located at 
 ``/srv/mediagoblin.example.org/mediagoblin/``.
 Substitute your prefered local deployment path as needed.
 
@@ -286,14 +286,14 @@ your preferred method.
 
    If you want to install all of MediaGoblin's libraries
    independently, that's totally fine!  You can pass the flag
-   ``--without-virtualenv`` which will skip this step.
+   ``--without-virtualenv`` which will skip this step.   
    But you will need to install all those libraries manually and make
    sure they are on your ``PYTHONPATH`` yourself!  (You can still use
    ``python setup.py develop`` to install some of those libraries,
    but note that no ``./bin/python`` will be set up for you via this
    method, since no virtualenv is set up for you!)
 
-This concludes the initial configuration of the MediaGoblin
+This concludes the initial configuration of the MediaGoblin 
 environment. In the future, when you update your
 codebase, you should also run::
 
@@ -314,13 +314,13 @@ Edit site configuration
 ~~~~~~~~~~~~~~~~~~~~~~~
 
 A few basic properties must be set before MediaGoblin will work. First
-make a copy of ``paste.ini`` for editing so the original
+make a copy of ``mediagoblin.ini`` and ``paste.ini`` for editing so the original
 config files aren't lost (you likely won't need to edit the paste configuration,
 but we'll make a local copy of it just in case)::
 
-    $ cp -av paste.ini paste_local.ini
+    $ cp -av mediagoblin.ini mediagoblin_local.ini && cp -av paste.ini paste_local.ini
 
-Then edit mediagoblin.ini:
+Then edit mediagoblin_local.ini:
  - Set ``email_sender_address`` to the address you wish to be used as
    the sender for system-generated emails
  - Edit ``direct_remote_path``, ``base_dir``, and ``base_url`` if
@@ -332,7 +332,7 @@ Configure MediaGoblin to use the PostgreSQL database
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 If you are using postgres, edit the ``[mediagoblin]`` section in your
-``mediagoblin.ini`` and put in::
+``mediagoblin_local.ini`` and put in::
 
     sql_engine = postgresql:///mediagoblin
 
@@ -505,7 +505,7 @@ Visit the site you've set up in your browser by visiting
    smaller deployments. However, for larger production deployments
    with larger processing requirements, see the
    ":doc:`production-deployments`" documentation.
-
+   
 
 Apache
 ~~~~~~
diff --git a/docs/source/siteadmin/media-types.rst b/docs/source/siteadmin/media-types.rst
index 09c31e3..1498410 100644
--- a/docs/source/siteadmin/media-types.rst
+++ b/docs/source/siteadmin/media-types.rst
@@ -98,7 +98,7 @@ good/bad/ugly).  On Debianoid systems
 
 
 Add ``[[mediagoblin.media_types.video]]`` under the ``[plugins]`` section in
-your ``mediagoblin.ini`` and restart MediaGoblin.
+your ``mediagoblin_local.ini`` and restart MediaGoblin.
 
 Run
 
@@ -138,7 +138,7 @@ Then install ``scikits.audiolab`` for the spectrograms::
     ./bin/pip install scikits.audiolab
 
 Add ``[[mediagoblin.media_types.audio]]`` under the ``[plugins]`` section in your
-``mediagoblin.ini`` and restart MediaGoblin.
+``mediagoblin_local.ini`` and restart MediaGoblin.
 
 Run
 
@@ -159,7 +159,7 @@ To enable raw image you need to install pyexiv2.  On Debianoid systems
     sudo apt-get install python-pyexiv2
 
 Add ``[[mediagoblin.media_types.raw_image]]`` under the ``[plugins]``
-section in your ``mediagoblin.ini`` and restart MediaGoblin.
+section in your ``mediagoblin_local.ini`` and restart MediaGoblin.
 
 Run
 
@@ -184,7 +184,7 @@ library, which is necessary for creating thumbnails of ascii art
 
 
 Next, modify (and possibly copy over from ``mediagoblin.ini``) your
-``mediagoblin.ini``.  In the ``[plugins]`` section, add
+``mediagoblin_local.ini``.  In the ``[plugins]`` section, add
 ``[[mediagoblin.media_types.ascii]]``.
 
 Run
@@ -206,7 +206,7 @@ It may work on some earlier versions, but that is not guaranteed (and
 is surely not to work prior to Blender 2.5X).
 
 Add ``[[mediagoblin.media_types.stl]]`` under the ``[plugins]`` section in your
-``mediagoblin.ini`` and restart MediaGoblin.
+``mediagoblin_local.ini`` and restart MediaGoblin.
 
 Run
 
@@ -255,7 +255,7 @@ This feature has been tested on Fedora with:
 It may work on some earlier versions, but that is not guaranteed.
 
 Add ``[[mediagoblin.media_types.pdf]]`` under the ``[plugins]`` section in your
-``mediagoblin.ini`` and restart MediaGoblin.
+``mediagoblin_local.ini`` and restart MediaGoblin.
 
 Run
 
diff --git a/docs/source/siteadmin/production-deployments.rst b/docs/source/siteadmin/production-deployments.rst
index 81938f1..e65ac33 100644
--- a/docs/source/siteadmin/production-deployments.rst
+++ b/docs/source/siteadmin/production-deployments.rst
@@ -73,13 +73,13 @@ modify it to suit your environment's setup:
     ExecStartPre=/bin/mkdir -p /run/mediagoblin
     ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin
     # Celery process will run as the `mediagoblin` user after start.
-    Environment=MEDIAGOBLIN_CONFIG=/srv/mediagoblin.example.org/mediagoblin/mediagoblin.ini \
+    Environment=MEDIAGOBLIN_CONFIG=/srv/mediagoblin.example.org/mediagoblin/mediagoblin_local.ini \
                 CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery
     ExecStart=/srv/mediagoblin.example.org/mediagoblin/bin/celery worker \
                   --logfile=/var/log/mediagoblin/celery.log \
                   --loglevel=INFO
     PIDFile=/run/mediagoblin/mediagoblin-celeryd.pid
-
+    
     [Install]
     WantedBy=multi-user.target
 
@@ -94,7 +94,7 @@ The second file should be named ``mediagoblin-paster.service``:
     # If using Fedora/CentOS/Red Hat, mkdir and chown are located in /usr/bin/mkdir and /usr/bin/chown, respectively.
     [Unit]
     Description=Mediagoblin
-
+    
     [Service]
     Type=forking
     User=mediagoblin
@@ -105,7 +105,7 @@ The second file should be named ``mediagoblin-paster.service``:
     PermissionsStartOnly=true
     ExecStartPre=-/bin/mkdir -p /run/mediagoblin
     ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin
-
+    
     ExecStart=/srv/mediagoblin.example.org/mediagoblin/bin/paster serve \
                   /srv/mediagoblin.example.org/mediagoblin/paste_local.ini \
                   --pid-file=/var/run/mediagoblin/mediagoblin.pid \
@@ -116,7 +116,7 @@ The second file should be named ``mediagoblin-paster.service``:
                  --pid-file=/var/run/mediagoblin/mediagoblin.pid \
                  /srv/mediagoblin.example.org/mediagoblin/paste_local.ini stop
     PIDFile=/var/run/mediagoblin/mediagoblin.pid
-
+    
     [Install]
     WantedBy=multi-user.target
 
diff --git a/docs/source/siteadmin/theming.rst b/docs/source/siteadmin/theming.rst
index a0ce126..11ae387 100644
--- a/docs/source/siteadmin/theming.rst
+++ b/docs/source/siteadmin/theming.rst
@@ -43,7 +43,7 @@ want to install this theme!  Don't worry, it's fairly painless.
 3. ``tar -xzvf <tar-archive>``
 
 4. Open your configuration file (probably named
-   ``mediagoblin.ini``) and set the theme name::
+   ``mediagoblin_local.ini``) and set the theme name::
 
        [mediagoblin]
        # ...
@@ -104,7 +104,7 @@ Other variables you may consider setting:
 `theme_web_path`
     When theme-specific assets are specified, this is where MediaGoblin
     will set the urls.  By default this is ``"/theme_static/"`` so in
-    the case that your theme was trying to access its file
+    the case that your theme was trying to access its file 
     ``"images/shiny_button.png"`` MediaGoblin would link
     to ``/theme_static/images/shiny_button.png``.
 
diff --git a/mediagoblin/plugins/piwigo/README.rst b/mediagoblin/plugins/piwigo/README.rst
index 2d81666..0c71ffb 100644
--- a/mediagoblin/plugins/piwigo/README.rst
+++ b/mediagoblin/plugins/piwigo/README.rst
@@ -12,7 +12,7 @@
    It might even go away without any notice.
 
 Okay, so if you still want to test this plugin,
-add the following to your mediagoblin.ini:
+add the following to your mediagoblin_local.ini:
 
 .. code-block:: ini
 
diff --git a/mediagoblin/plugins/trim_whitespace/README.rst b/mediagoblin/plugins/trim_whitespace/README.rst
index e7947e3..db9a0c5 100644
--- a/mediagoblin/plugins/trim_whitespace/README.rst
+++ b/mediagoblin/plugins/trim_whitespace/README.rst
@@ -10,7 +10,7 @@ objects.
 
 Simply enable this plugin by putting it somewhere where Python can reach
 it and put it's path into the ``[plugins]`` section of your
-``mediagoblin.ini`` like for example this:
+``mediagoblin.ini`` or ``mediagoblin_local.ini`` like for example this:
 
 .. code-block:: ini
 
@@ -27,3 +27,4 @@ other plugin writers.
 
 It was originally conceived by Sebastian Spaeth. It is licensed under
 the GNU AGPL v3 (or any later version) license.
+
-- 
1.9.1

