Ticket #5429: 0002-Second-fix-for-the-issue-5429.patch

File 0002-Second-fix-for-the-issue-5429.patch, 14.5 KB (added by Saksham Agrawal, 8 years ago)
  • docs/source/siteadmin/configuration.rst

    From c1bf89f64e86c1fe04ad4f85e8fda3804af62dec Mon Sep 17 00:00:00 2001
    From: saksham1115 <saksham115@gmail.com>
    Date: Mon, 29 Feb 2016 18:30:33 +0530
    Subject: [PATCH 2/3] Second fix for the 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/relnotes.rst               | 16 +++++----------
     docs/source/siteadmin/theming.rst                |  4 ++--
     mediagoblin/plugins/piwigo/README.rst            |  2 +-
     mediagoblin/plugins/trim_whitespace/README.rst   |  3 +--
     8 files changed, 34 insertions(+), 45 deletions(-)
    
    diff --git a/docs/source/siteadmin/configuration.rst b/docs/source/siteadmin/configuration.rst
    index dd0d6cd..c2705b3 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
    64 To make changes to mediagoblin.ini ::
    65 
    66     cp mediagoblin.ini mediagoblin_local.ini
    67 
    6864To make changes to paste.ini ::
    6965
    7066    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 47901da..5ba9b05 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 ``mediagoblin.ini`` and ``paste.ini`` for editing so the original
     317make a copy of ``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 mediagoblin.ini mediagoblin_local.ini && cp -av paste.ini paste_local.ini
     321    $ cp -av paste.ini paste_local.ini
    322322
    323 Then edit mediagoblin_local.ini:
     323Then edit mediagoblin.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_local.ini`` and put in::
     335``mediagoblin.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 34faef1..712c5c4 100644
    a b good/bad/ugly). On Debianoid systems  
    9898
    9999
    100100Add ``[[mediagoblin.media_types.video]]`` under the ``[plugins]`` section in
    101 your ``mediagoblin_local.ini`` and restart MediaGoblin.
     101your ``mediagoblin.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_local.ini`` and restart MediaGoblin.
     141``mediagoblin.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_local.ini`` and restart MediaGoblin.
     162section in your ``mediagoblin.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_local.ini``.  In the ``[plugins]`` section, add
     187``mediagoblin.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_local.ini`` and restart MediaGoblin.
     209``mediagoblin.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_local.ini`` and restart MediaGoblin.
     258``mediagoblin.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 e65ac33..81938f1 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_local.ini \
     76    Environment=MEDIAGOBLIN_CONFIG=/srv/mediagoblin.example.org/mediagoblin/mediagoblin.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/relnotes.rst

    diff --git a/docs/source/siteadmin/relnotes.rst b/docs/source/siteadmin/relnotes.rst
    index 41d8f62..957e264 100644
    a b Additionally:  
    148148  future mitration work
    149149- Automatically create a fresh mediagoblin.ini from
    150150  mediagoblin.ini.example
    151 - no more need for mediagoblin_local.ini (though it's still supported)
    152151- Fix lowercasing of username in auth steps
    153152- Slowly moving towards removing global state (a source of many bugs)
    154153
    That's it, probably! If you run into problems, don't hesitate to  
    227226  (which will be the foundation for MediaGoblin's federation)
    228227- New theme: Sandy 70s Speedboat!
    229228
    230 - Metadata features!  We also now have a json-ld context. 
     229- Metadata features!  We also now have a json-ld context.
    231230
    232231- Many improvements for archival institutions, including metadata
    233232  support and featuring items on the homepage.  With the (new!)
    now. Otherwise, jump in and have fun! :)  
    397396.. mention something about new, experimental configure && make support
    398397
    3993982. Note that a couple of things have changed with ``mediagoblin.ini``. First
    400    we have a new Authentication System. You need to add 
    401    ``[[mediagoblin.plugins.basic_auth]]`` under the ``[plugins]`` section of 
     399   we have a new Authentication System. You need to add
     400   ``[[mediagoblin.plugins.basic_auth]]`` under the ``[plugins]`` section of
    402401   your config file. Second, media types are now plugins, so you need to add
    403402   each media type under the ``[plugins]`` section of your config file.
    404403
    405404
    406 3. We have made a script to transition your ``mediagoblin_local.ini`` file for
    407    you. This script can be found at:
    408    
    409    http://mediagoblin.org/download/0.5.0_config_converter.py
    410 
    411405If you run into problems, don't hesitate to
    412406`contact us <http://mediagoblin.org/pages/join.html>`_
    413407(IRC is often best).
    If you run into problems, don't hesitate to  
    415409**New features**
    416410
    417411* As mentioned above, we now have a plugable Authentication system. You can
    418   use any combination of the multiple authentication systems 
     412  use any combination of the multiple authentication systems
    419413  (:ref:`basic_auth-chapter`, :ref:`persona-chapter`, :ref:`openid-chapter`)
    420414  or write your own!
    421415* Media types are now plugins!  This means that new media types will
    MongoDB-based MediaGoblin instance to the newer SQL-based system.  
    612606
    613607    # perform any needed database updates
    614608    bin/gmg dbupdate
    615    
     609
    616610    # restart your servers however you do that, e.g.,
    617611    sudo service mediagoblin-paster restart
    618612    sudo service mediagoblin-celeryd restart
  • docs/source/siteadmin/theming.rst

    diff --git a/docs/source/siteadmin/theming.rst b/docs/source/siteadmin/theming.rst
    index 11ae387..a0ce126 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_local.ini``) and set the theme name::
     46   ``mediagoblin.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 0c71ffb..2d81666 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_local.ini:
     15add the following to your mediagoblin.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 db9a0c5..e7947e3 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`` or ``mediagoblin_local.ini`` like for example this:
     13``mediagoblin.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