Commit d0365c2d8838b0614172b5345e1aa1fe1f1aaecf
1 parent
b29028d6
Exists in
colab-master
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
@@ -44,13 +44,17 @@ rm -f cleanup.list | @@ -44,13 +44,17 @@ rm -f cleanup.list | ||
44 | find %{buildvenv} -type d -empty -delete | 44 | find %{buildvenv} -type d -empty -delete |
45 | 45 | ||
46 | %install | 46 | %install |
47 | -mkdir -p %{buildroot}/etc/colab | ||
48 | -mkdir -p %{buildroot}/usr/lib | 47 | + |
48 | +# install config file | ||
49 | +install -d -m 0755 %{buildroot}/etc/colab | ||
50 | +install -m 0644 misc/etc/colab/gunicorn.py %{buildroot}/etc/colab | ||
49 | 51 | ||
50 | # install virtualenv | 52 | # install virtualenv |
53 | +install -d -m 0755 %{buildroot}/usr/lib | ||
51 | rm -rf %{buildroot}/usr/lib/colab | 54 | rm -rf %{buildroot}/usr/lib/colab |
52 | cp -r %{buildvenv} %{buildroot}/usr/lib/colab | 55 | cp -r %{buildvenv} %{buildroot}/usr/lib/colab |
53 | mkdir -p %{buildroot}/%{_bindir} | 56 | mkdir -p %{buildroot}/%{_bindir} |
57 | + | ||
54 | cat > %{buildroot}/%{_bindir}/colab-admin <<EOF | 58 | cat > %{buildroot}/%{_bindir}/colab-admin <<EOF |
55 | #!/bin/sh | 59 | #!/bin/sh |
56 | set -e | 60 | set -e |
@@ -78,6 +82,7 @@ rm -rf %{buildvenv} | @@ -78,6 +82,7 @@ rm -rf %{buildvenv} | ||
78 | /usr/lib/colab | 82 | /usr/lib/colab |
79 | %{_bindir}/* | 83 | %{_bindir}/* |
80 | /etc/cron.d/colab | 84 | /etc/cron.d/colab |
85 | +/etc/colab/gunicorn.py | ||
81 | /lib/systemd/system/colab.service | 86 | /lib/systemd/system/colab.service |
82 | 87 | ||
83 | %post | 88 | %post |
@@ -86,8 +91,6 @@ if ! id colab; then | @@ -86,8 +91,6 @@ if ! id colab; then | ||
86 | useradd --system --gid colab --home-dir /usr/lib/colab --no-create-home colab | 91 | useradd --system --gid colab --home-dir /usr/lib/colab --no-create-home colab |
87 | fi | 92 | fi |
88 | 93 | ||
89 | -mkdir -p /etc/colab | ||
90 | - | ||
91 | if [ ! -f /etc/colab/settings.yaml ]; then | 94 | if [ ! -f /etc/colab/settings.yaml ]; then |
92 | SECRET_KEY=$(openssl rand -hex 32) | 95 | SECRET_KEY=$(openssl rand -hex 32) |
93 | cat > /etc/colab/settings.yaml <<EOF | 96 | cat > /etc/colab/settings.yaml <<EOF |