Extend Fedora Dockerfile, add sourcehut builds for Debian and Fedora.

Previously had partial docs for Fedora 31. This updates to Fedora 33, adds
support for audio and video and adds dependencies to allow the test suite to run
to completion.
This commit is contained in:
Ben Sturmfels 2021-03-09 09:54:48 +11:00
parent 4f53c4b17c
commit 7e2a2ecfdc
6 changed files with 160 additions and 26 deletions

View File

@ -0,0 +1,59 @@
image: debian/buster
packages:
# Install bootstrap and configure dependencies.
- automake
- nodejs
- npm
- python3-dev
- virtualenv
# Install make and runtime dependencies.
- python3-alembic
- python3-jsonschema
- python3-kombu
- python3-lxml
- python3-migrate
- python3-pillow
- python3-py
- python3-pytest
- python3-pytest-xdist
- python3-snowballstemmer
- python3-sphinx
- python3-sphinxcontrib.websupport
- python3-webtest
# Install audio dependencies.
- gstreamer1.0-libav
- gstreamer1.0-plugins-bad
- gstreamer1.0-plugins-base
- gstreamer1.0-plugins-good
- gstreamer1.0-plugins-ugly
- python3-gst-1.0
- python3-numpy
# Install video dependencies.
- gir1.2-gst-plugins-base-1.0
- gir1.2-gstreamer-1.0
- gstreamer1.0-tools
- python3-gi
# Install raw image dependencies.
- libexiv2-dev
- libboost-python-dev
# Install document (PDF-only) dependencies.
- poppler-utils
tasks:
- core: |
cd mediagoblin
git show --oneline --no-patch
./bootstrap.sh
VIRTUALENV_FLAGS='--system-site-packages' ./configure
make
# Install raw image library from PyPI as not available in Debian 10.
./bin/pip install py3exiv2
# Run the tests, explicitly listing out skipped tests.
./bin/python -m pytest -rs ./mediagoblin/tests --boxed

View File

@ -0,0 +1,61 @@
image: fedora/33
packages:
# Install bootstrap and configure dependencies.
- automake
# - gcc
# - make
- nodejs
- npm
- python3-devel
- virtualenv
# Install make and runtime dependencies.
# - findutils
- python3-alembic
- python3-celery
- python3-jsonschema
- python3-kombu
- python3-lxml
- python3-migrate
- python3-pillow
- python3-py
- python3-pytest
- python3-pytest-xdist
- python3-snowballstemmer
- python3-sphinx
- python3-webtest
- libffi-devel
# - which
# Install audio dependencies.
- gstreamer1-plugins-base
- gstreamer1-plugins-bad-free
- gstreamer1-plugins-good
- gstreamer1-plugins-ugly-free
- python3-numpy
# Install video dependencies.
- python3-gobject
- python3-gstreamer1
- gstreamer1-plugin-openh264
# # Install raw image dependencies.
# - libexiv2-dev
# - libboost-python-dev
# # Install document (PDF-only) dependencies.
# - poppler-utils
tasks:
- core: |
cd mediagoblin
git show --oneline --no-patch
./bootstrap.sh
VIRTUALENV_FLAGS='--system-site-packages' ./configure
make
# # Install raw image library from PyPI as not available in Debian 10.
# ./bin/pip install py3exiv2
# Run the tests, explicitly listing out skipped tests.
./bin/python -m pytest -rs ./mediagoblin/tests --boxed

View File

@ -8,7 +8,7 @@
#
# See Dockerfile-debian-python3-sqlite for details.
FROM fedora:31
FROM fedora:33
RUN dnf -y install \
automake \
@ -39,22 +39,23 @@ python3-sphinx \
# python3-sphinxcontrib.websupport \
python3-webtest \
# Fedora only
which
which \
# To build waitress on Fedora 33 (not required for 31)
libffi-devel
# RUN dnf -y install \
# gstreamer1.0-libav \
# gstreamer1.0-plugins-bad \
# gstreamer1.0-plugins-base \
# gstreamer1.0-plugins-good \
# gstreamer1.0-plugins-ugly \
# python3-gst-1.0 \
# python3-numpy
RUN dnf -y install \
gstreamer1-plugins-base \
gstreamer1-plugins-bad-free \
gstreamer1-plugins-good \
gstreamer1-plugins-ugly-free \
python3-numpy
# RUN apt-get install -y \
# gir1.2-gst-plugins-base-1.0 \
# gir1.2-gstreamer-1.0 \
# gstreamer1.0-tools \
# python3-gi
RUN dnf search gst
RUN dnf -y install \
python3-gobject \
python3-gstreamer1 \
gstreamer1-plugin-openh264
# RUN apt-get install -y \
# poppler-utils
@ -72,7 +73,7 @@ RUN chown root:www-data /var/www
USER www-data
RUN git clone --depth=1 git://git.savannah.gnu.org/mediagoblin.git --branch master .
RUN git clone --depth=1 https://git.sr.ht/~mediagoblin/mediagoblin --branch ci .
RUN git show --oneline --no-patch
RUN ./bootstrap.sh
@ -81,8 +82,8 @@ RUN make
RUN ./bin/python -m pytest ./mediagoblin/tests --boxed
# RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini
# RUN echo '[[mediagoblin.media_types.video]]' >> mediagoblin.ini
RUN echo '[[mediagoblin.media_types.audio]]' >> mediagoblin.ini
RUN echo '[[mediagoblin.media_types.video]]' >> mediagoblin.ini
# Fedora only
RUN ./bin/pip install certifi
@ -90,6 +91,12 @@ RUN ./bin/gmg dbupdate
RUN ./bin/gmg adduser --username admin --password a --email admin@example.com
RUN ./bin/gmg makeadmin admin
# Without the following we get "ModuleNotFoundError: No module named
# 'paste.script'" when running ./lazyserver.sh. Not sure why as PasteScript is
# in the setup.py requirements. Before this we have Paste==3.4.0; after we have
# Paste==3.5.0.
RUN ./bin/pip install PasteScript --force-reinstall
EXPOSE 6543/tcp
CMD ["./lazyserver.sh", "--server-name=broadcast"]

View File

@ -65,7 +65,7 @@ MediaGoblin has the following core dependencies:
- `Node.js <https://nodejs.org>`_
These instructions have been tested on Debian 10, CentOS 8 and
Fedora 31. These instructions should approximately translate to recent
Fedora 33. These instructions should approximately translate to recent
Debian derivatives such as Ubuntu 18.04 and Trisquel 8, and to relatives of
Fedora such as CentOS 8.
@ -75,12 +75,13 @@ Issue the following commands:
# Debian 10
sudo apt update
sudo apt install automake git nodejs npm python3-dev python3-gi \
sudo apt install automake git nodejs npm python3-dev \
python3-gst-1.0 python3-lxml python3-pil virtualenv
# Fedora 31
sudo dnf install automake gcc git-core make nodejs npm python3-devel \
python3-lxml python3-pillow virtualenv
# Fedora 33
sudo dnf install automake gcc git-core make nodejs npm \
libffi-devel python3-devel python3-lxml python3-pillow \
virtualenv
For a production deployment, you'll also need Nginx as frontend web
server and RabbitMQ to store the media processing queue::

View File

@ -90,11 +90,11 @@ as whatever GStreamer plugins you want, good/bad/ugly):
.. code-block:: bash
# Debian and co.
# Debian
sudo apt install python3-gst-1.0 gstreamer1.0-plugins-{base,bad,good,ugly} \
gstreamer1.0-libav python3-numpy
# Fedora and co.
# Fedora
sudo dnf install gstreamer1-plugins-{base,bad-free,good,ugly-free} \
python3-numpy
@ -130,11 +130,15 @@ good/bad/ugly):
.. code-block:: bash
# Debian and co.
# Debian
sudo apt install python3-gi gstreamer1.0-tools gir1.2-gstreamer-1.0 \
gir1.2-gst-plugins-base-1.0 gstreamer1.0-plugins-{good,bad,ugly} \
gstreamer1.0-libav python3-gst-1.0
# Fedora
sudo dnf install gstreamer1-plugins-{base,bad-free,good,ugly-free,openh264} \
python3-gobject python3-gstreamer1
.. note::
We unfortunately do not have working installation instructions for Fedora and

View File

@ -29,6 +29,8 @@ carefully, or at least skim over it.
**Improvements:**
- Add Debian and Fedora CI builds for sourcehut (Ben Sturmfels)
- Extend Fedora install docs and development Dockerfile to support audio/video (Ben Sturmfels)
- Remove Python 2 installation and compatibility code (Ben Sturmfels)
- Reinstate Python 3 audio spectrograms [#5610] (Fernando Gutierrez)