Last active
November 3, 2018 10:36
-
-
Save LeeiFrankJaw/a327e7d1beec6534d44daaf5b600f25f to your computer and use it in GitHub Desktop.
Set up pagure on Trisquel 8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Please refer to the manual section from the site | |
# https://pagure.io/pagure | |
# python3-gdbm is not found in trisquel by default but preinstalled on | |
# ubuntu. | |
sudo apt install python3-dev python3-pip python3-venv python3-gdbm \ | |
libgit2-dev redis-server libjpeg-dev libffi-dev | |
# I omitted git, python3, and gcc, since they seem to be preinstalled | |
# by Trisquel 8. If not, install them manually. | |
# sudo apt install git python3 gcc | |
# Retrieve the source repository. | |
if [ -d pagure ]; then | |
echo The directory pagure already exists. | |
else | |
git clone https://pagure.io/pagure.git | |
fi | |
cd pagure/ | |
# you have to checkout to a release, I tried the master branch and | |
# pagure won't start. | |
git checkout 5.1.4 | |
# Create the virtual environment. | |
python3 -m venv pagure_env | |
. ./pagure_env/bin/activate | |
# You need upgrade these, otherwise pygit2 won't install. | |
pip install --upgrade pip setuptools | |
# The version of pygit2 needs to match the version of libgit2-dev. | |
# At this time, it is 0.24.1 for both Ubuntu 16.04 and Trisquel 8. | |
pip install pygit2==0.24.1 | |
# Install dependences. | |
pip install -r requirements.txt | |
mkdir -p lcl/{repos,remotes,attachments,releases} | |
cp files/alembic.ini . | |
sed -i 's/script_location\ =\ \/usr\/share\/pagure\/alembic/script_location\ =\ alembic/' alembic.ini | |
# Initialize database schemas. | |
python createdb.py --initial alembic.ini | |
sudo systemctl enable redis-server.service | |
sudo systemctl start redis-server.service | |
# To start pagure, first start the worker and then start the server. | |
# ./runworker.py >> runworker.log 2>&1 & | |
# ./runserver.py >> runserver.log 2>&1 & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment