Ticket #5429: 0004-Fix-for-issue-5429.patch

File 0004-Fix-for-issue-5429.patch, 11.8 KB (added by Saksham Agrawal, 9 years ago)
  • docs/source/siteadmin/configuration.rst

    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 b Making local copies  
    5858===================
    5959
    6060Let's assume you're doing the virtualenv setup described elsewhere in this
    61 manual, and you need to make local tweaks to the config files. How do you do
     61manual, and you need to make local tweaks to the config files. How do you do 
    6262that? Let's see.
    6363
     64To make changes to mediagoblin.ini ::
     65
     66    cp mediagoblin.ini mediagoblin_local.ini
     67
    6468To make changes to paste.ini ::
    6569
    6670    cp paste.ini paste_local.ini
  • docs/source/siteadmin/deploying.rst

    diff --git a/docs/source/siteadmin/deploying.rst b/docs/source/siteadmin/deploying.rst
    index 5ba9b05..47901da 100644
    a b approach, see our  
    4343    Throughout the documentation we use the ``sudo`` command to indicate that
    4444    an instruction requires elevated user privileges to run. You can issue
    4545    these commands as the ``root`` user if you prefer.
    46 
     46   
    4747    If you need help configuring ``sudo``, see the
    4848    `Debian wiki <https://wiki.debian.org/sudo/>`_ or the
    49     `Fedora Project wiki <https://fedoraproject.org/wiki/Configuring_Sudo/>`_.
     49    `Fedora Project wiki <https://fedoraproject.org/wiki/Configuring_Sudo/>`_. 
    5050
    5151
    5252Prepare System
    MediaGoblin does not require special permissions or elevated  
    161161access to run. As such, the preferred way to run MediaGoblin is to
    162162create a dedicated, unprivileged system user for the sole purpose of running
    163163MediaGoblin. Running MediaGoblin processes under an unprivileged system user
    164 helps to keep it more secure.
     164helps to keep it more secure. 
    165165
    166166The following command (entered as root or with sudo) will create a
    167167system account with a username of ``mediagoblin``. You may choose a different
    read the media files (images, videos, etc.) that users upload.  
    181181
    182182We will also create a ``mediagoblin`` group and associate the mediagoblin
    183183user with that group, as well::
    184 
     184 
    185185    sudo groupadd mediagoblin && sudo usermod --append -G mediagoblin mediagoblin
    186 
     186       
    187187No password will be assigned to this account, and you will not be able
    188188to log in as this user. To switch to this account, enter::
    189189
    Create a MediaGoblin Directory  
    198198~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    199199
    200200You should create a working directory for MediaGoblin. This document
    201 assumes your local git repository will be located at
     201assumes your local git repository will be located at 
    202202``/srv/mediagoblin.example.org/mediagoblin/``.
    203203Substitute your prefered local deployment path as needed.
    204204
    your preferred method.  
    286286
    287287   If you want to install all of MediaGoblin's libraries
    288288   independently, that's totally fine!  You can pass the flag
    289    ``--without-virtualenv`` which will skip this step.
     289   ``--without-virtualenv`` which will skip this step.   
    290290   But you will need to install all those libraries manually and make
    291291   sure they are on your ``PYTHONPATH`` yourself!  (You can still use
    292292   ``python setup.py develop`` to install some of those libraries,
    293293   but note that no ``./bin/python`` will be set up for you via this
    294294   method, since no virtualenv is set up for you!)
    295295
    296 This concludes the initial configuration of the MediaGoblin
     296This concludes the initial configuration of the MediaGoblin 
    297297environment. In the future, when you update your
    298298codebase, you should also run::
    299299
    Edit site configuration  
    314314~~~~~~~~~~~~~~~~~~~~~~~
    315315
    316316A few basic properties must be set before MediaGoblin will work. First
    317 make a copy of ``paste.ini`` for editing so the original
     317make a copy of ``mediagoblin.ini`` and ``paste.ini`` for editing so the original
    318318config files aren't lost (you likely won't need to edit the paste configuration,
    319319but we'll make a local copy of it just in case)::
    320320
    321     $ cp -av paste.ini paste_local.ini
     321    $ cp -av mediagoblin.ini mediagoblin_local.ini && cp -av paste.ini paste_local.ini
    322322
    323 Then edit mediagoblin.ini:
     323Then edit mediagoblin_local.ini:
    324324 - Set ``email_sender_address`` to the address you wish to be used as
    325325   the sender for system-generated emails
    326326 - Edit ``direct_remote_path``, ``base_dir``, and ``base_url`` if
    Configure MediaGoblin to use the PostgreSQL database  
    332332~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    333333
    334334If you are using postgres, edit the ``[mediagoblin]`` section in your
    335 ``mediagoblin.ini`` and put in::
     335``mediagoblin_local.ini`` and put in::
    336336
    337337    sql_engine = postgresql:///mediagoblin
    338338
    Visit the site you've set up in your browser by visiting  
    505505   smaller deployments. However, for larger production deployments
    506506   with larger processing requirements, see the
    507507   ":doc:`production-deployments`" documentation.
    508 
     508   
    509509
    510510Apache
    511511~~~~~~
  • docs/source/siteadmin/media-types.rst

    diff --git a/docs/source/siteadmin/media-types.rst b/docs/source/siteadmin/media-types.rst
    index 09c31e3..1498410 100644
    a b good/bad/ugly). On Debianoid systems  
    9898
    9999
    100100Add ``[[mediagoblin.media_types.video]]`` under the ``[plugins]`` section in
    101 your ``mediagoblin.ini`` and restart MediaGoblin.
     101your ``mediagoblin_local.ini`` and restart MediaGoblin.
    102102
    103103Run
    104104
    Then install ``scikits.audiolab`` for the spectrograms::  
    138138    ./bin/pip install scikits.audiolab
    139139
    140140Add ``[[mediagoblin.media_types.audio]]`` under the ``[plugins]`` section in your
    141 ``mediagoblin.ini`` and restart MediaGoblin.
     141``mediagoblin_local.ini`` and restart MediaGoblin.
    142142
    143143Run
    144144
    To enable raw image you need to install pyexiv2. On Debianoid systems  
    159159    sudo apt-get install python-pyexiv2
    160160
    161161Add ``[[mediagoblin.media_types.raw_image]]`` under the ``[plugins]``
    162 section in your ``mediagoblin.ini`` and restart MediaGoblin.
     162section in your ``mediagoblin_local.ini`` and restart MediaGoblin.
    163163
    164164Run
    165165
    library, which is necessary for creating thumbnails of ascii art  
    184184
    185185
    186186Next, modify (and possibly copy over from ``mediagoblin.ini``) your
    187 ``mediagoblin.ini``.  In the ``[plugins]`` section, add
     187``mediagoblin_local.ini``.  In the ``[plugins]`` section, add
    188188``[[mediagoblin.media_types.ascii]]``.
    189189
    190190Run
    It may work on some earlier versions, but that is not guaranteed (and  
    206206is surely not to work prior to Blender 2.5X).
    207207
    208208Add ``[[mediagoblin.media_types.stl]]`` under the ``[plugins]`` section in your
    209 ``mediagoblin.ini`` and restart MediaGoblin.
     209``mediagoblin_local.ini`` and restart MediaGoblin.
    210210
    211211Run
    212212
    This feature has been tested on Fedora with:  
    255255It may work on some earlier versions, but that is not guaranteed.
    256256
    257257Add ``[[mediagoblin.media_types.pdf]]`` under the ``[plugins]`` section in your
    258 ``mediagoblin.ini`` and restart MediaGoblin.
     258``mediagoblin_local.ini`` and restart MediaGoblin.
    259259
    260260Run
    261261
  • docs/source/siteadmin/production-deployments.rst

    diff --git a/docs/source/siteadmin/production-deployments.rst b/docs/source/siteadmin/production-deployments.rst
    index 81938f1..e65ac33 100644
    a b modify it to suit your environment's setup:  
    7373    ExecStartPre=/bin/mkdir -p /run/mediagoblin
    7474    ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin
    7575    # Celery process will run as the `mediagoblin` user after start.
    76     Environment=MEDIAGOBLIN_CONFIG=/srv/mediagoblin.example.org/mediagoblin/mediagoblin.ini \
     76    Environment=MEDIAGOBLIN_CONFIG=/srv/mediagoblin.example.org/mediagoblin/mediagoblin_local.ini \
    7777                CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery
    7878    ExecStart=/srv/mediagoblin.example.org/mediagoblin/bin/celery worker \
    7979                  --logfile=/var/log/mediagoblin/celery.log \
    8080                  --loglevel=INFO
    8181    PIDFile=/run/mediagoblin/mediagoblin-celeryd.pid
    82 
     82   
    8383    [Install]
    8484    WantedBy=multi-user.target
    8585
    The second file should be named ``mediagoblin-paster.service``:  
    9494    # If using Fedora/CentOS/Red Hat, mkdir and chown are located in /usr/bin/mkdir and /usr/bin/chown, respectively.
    9595    [Unit]
    9696    Description=Mediagoblin
    97 
     97   
    9898    [Service]
    9999    Type=forking
    100100    User=mediagoblin
    The second file should be named ``mediagoblin-paster.service``:  
    105105    PermissionsStartOnly=true
    106106    ExecStartPre=-/bin/mkdir -p /run/mediagoblin
    107107    ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin
    108 
     108   
    109109    ExecStart=/srv/mediagoblin.example.org/mediagoblin/bin/paster serve \
    110110                  /srv/mediagoblin.example.org/mediagoblin/paste_local.ini \
    111111                  --pid-file=/var/run/mediagoblin/mediagoblin.pid \
    The second file should be named ``mediagoblin-paster.service``:  
    116116                 --pid-file=/var/run/mediagoblin/mediagoblin.pid \
    117117                 /srv/mediagoblin.example.org/mediagoblin/paste_local.ini stop
    118118    PIDFile=/var/run/mediagoblin/mediagoblin.pid
    119 
     119   
    120120    [Install]
    121121    WantedBy=multi-user.target
    122122
  • docs/source/siteadmin/theming.rst

    diff --git a/docs/source/siteadmin/theming.rst b/docs/source/siteadmin/theming.rst
    index a0ce126..11ae387 100644
    a b want to install this theme! Don't worry, it's fairly painless.  
    43433. ``tar -xzvf <tar-archive>``
    4444
    45454. Open your configuration file (probably named
    46    ``mediagoblin.ini``) and set the theme name::
     46   ``mediagoblin_local.ini``) and set the theme name::
    4747
    4848       [mediagoblin]
    4949       # ...
    Other variables you may consider setting:  
    104104`theme_web_path`
    105105    When theme-specific assets are specified, this is where MediaGoblin
    106106    will set the urls.  By default this is ``"/theme_static/"`` so in
    107     the case that your theme was trying to access its file
     107    the case that your theme was trying to access its file 
    108108    ``"images/shiny_button.png"`` MediaGoblin would link
    109109    to ``/theme_static/images/shiny_button.png``.
    110110
  • mediagoblin/plugins/piwigo/README.rst

    diff --git a/mediagoblin/plugins/piwigo/README.rst b/mediagoblin/plugins/piwigo/README.rst
    index 2d81666..0c71ffb 100644
    a b  
    1212   It might even go away without any notice.
    1313
    1414Okay, so if you still want to test this plugin,
    15 add the following to your mediagoblin.ini:
     15add the following to your mediagoblin_local.ini:
    1616
    1717.. code-block:: ini
    1818
  • mediagoblin/plugins/trim_whitespace/README.rst

    diff --git a/mediagoblin/plugins/trim_whitespace/README.rst b/mediagoblin/plugins/trim_whitespace/README.rst
    index e7947e3..db9a0c5 100644
    a b objects.  
    1010
    1111Simply enable this plugin by putting it somewhere where Python can reach
    1212it and put it's path into the ``[plugins]`` section of your
    13 ``mediagoblin.ini`` like for example this:
     13``mediagoblin.ini`` or ``mediagoblin_local.ini`` like for example this:
    1414
    1515.. code-block:: ini
    1616
    other plugin writers.  
    2727
    2828It was originally conceived by Sebastian Spaeth. It is licensed under
    2929the GNU AGPL v3 (or any later version) license.
     30