Commit 27f81db53cf56982d8e1634697f9d2ec5eb0220e
Committed by
Rodrigo Siqueira de Melo
1 parent
209378d3
Exists in
master
and in
54 other branches
Added gunicorn to colab package
Signed-off-by: Sergio Oliveira <sergio@tracy.com.br>
Showing
1 changed file
with
7 additions
and
4 deletions
Show diff stats
colab/colab.spec
| @@ -43,13 +43,17 @@ rm -f cleanup.list | @@ -43,13 +43,17 @@ rm -f cleanup.list | ||
| 43 | find %{buildvenv} -type d -empty -delete | 43 | find %{buildvenv} -type d -empty -delete |
| 44 | 44 | ||
| 45 | %install | 45 | %install |
| 46 | -mkdir -p %{buildroot}/etc/colab | ||
| 47 | -mkdir -p %{buildroot}/usr/lib | 46 | + |
| 47 | +# install config file | ||
| 48 | +install -d -m 0755 %{buildroot}/etc/colab | ||
| 49 | +install -m 0644 misc/etc/colab/gunicorn.py %{buildroot}/etc/colab | ||
| 48 | 50 | ||
| 49 | # install virtualenv | 51 | # install virtualenv |
| 52 | +install -d -m 0755 %{buildroot}/usr/lib | ||
| 50 | rm -rf %{buildroot}/usr/lib/colab | 53 | rm -rf %{buildroot}/usr/lib/colab |
| 51 | cp -r %{buildvenv} %{buildroot}/usr/lib/colab | 54 | cp -r %{buildvenv} %{buildroot}/usr/lib/colab |
| 52 | mkdir -p %{buildroot}/%{_bindir} | 55 | mkdir -p %{buildroot}/%{_bindir} |
| 56 | + | ||
| 53 | cat > %{buildroot}/%{_bindir}/colab-admin <<EOF | 57 | cat > %{buildroot}/%{_bindir}/colab-admin <<EOF |
| 54 | #!/bin/sh | 58 | #!/bin/sh |
| 55 | set -e | 59 | set -e |
| @@ -77,6 +81,7 @@ rm -rf %{buildvenv} | @@ -77,6 +81,7 @@ rm -rf %{buildvenv} | ||
| 77 | /usr/lib/colab | 81 | /usr/lib/colab |
| 78 | %{_bindir}/* | 82 | %{_bindir}/* |
| 79 | /etc/cron.d/colab | 83 | /etc/cron.d/colab |
| 84 | +/etc/colab/gunicorn.py | ||
| 80 | /lib/systemd/system/colab.service | 85 | /lib/systemd/system/colab.service |
| 81 | 86 | ||
| 82 | %post | 87 | %post |
| @@ -85,8 +90,6 @@ if ! id colab; then | @@ -85,8 +90,6 @@ if ! id colab; then | ||
| 85 | useradd --system --gid colab --home-dir /usr/lib/colab --no-create-home colab | 90 | useradd --system --gid colab --home-dir /usr/lib/colab --no-create-home colab |
| 86 | fi | 91 | fi |
| 87 | 92 | ||
| 88 | -mkdir -p /etc/colab | ||
| 89 | - | ||
| 90 | if [ ! -f /etc/colab/settings.yaml ]; then | 93 | if [ ! -f /etc/colab/settings.yaml ]; then |
| 91 | SECRET_KEY=$(openssl rand -hex 32) | 94 | SECRET_KEY=$(openssl rand -hex 32) |
| 92 | cat > /etc/colab/settings.yaml <<EOF | 95 | cat > /etc/colab/settings.yaml <<EOF |