[copr] master: move frontend to /usr/share/copr/coprs_frontend (c1540a0)

msuchy at fedoraproject.org msuchy at fedoraproject.org
Tue Jun 18 11:56:31 UTC 2013

Repository : http://git.fedorahosted.org/cgit/copr.git

On branch  : master


commit c1540a07a3882af6ce519863c667e1209d2f8206
Author: Miroslav Suchý <msuchy at redhat.com>
Date:   Tue Jun 18 13:51:57 2013 +0200

    move frontend to /usr/share/copr/coprs_frontend
    move it from /usr/share/coprs_frontend to /usr/share/copr/coprs_frontend - this will
    have two benefits
    a) allow to install backend and frontend together if needed
    b) data directory will be in /usr/share/copr/data instead of too general /usr/share/data


 copr.spec |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/copr.spec b/copr.spec
index 10c4c4f..238f7e8 100644
--- a/copr.spec
+++ b/copr.spec
@@ -84,10 +84,13 @@ a2x -d manpage -f manpage man/copr-cli.1.asciidoc
-install -d %{buildroot}%{_datadir}/coprs_frontend
-cp -a coprs_frontend/* %{buildroot}%{_datadir}/coprs_frontend
-mv %{buildroot}%{_datadir}/coprs_frontend/coprs.conf.example ./
-rm %{buildroot}%{_datadir}/coprs_frontend/CONTRIBUTION_GUIDELINES
+install -d %{buildroot}%{_datadir}/copr/coprs_frontend
+install -d %{buildroot}%{_datadir}/copr/data/openid_store
+install -d %{buildroot}%{_datadir}/copr/data/whooshee
+cp -a coprs_frontend/* %{buildroot}%{_datadir}/copr/coprs_frontend
+mv %{buildroot}%{_datadir}/copr/coprs_frontend/coprs.conf.example ./
+rm %{buildroot}%{_datadir}/copr/coprs_frontend/CONTRIBUTION_GUIDELINES
+touch %{buildroot}%{_datadir}/copr/data/copr.db
 %{__python} coprcli-setup.py install --root %{buildroot}
@@ -97,22 +100,28 @@ install -m 644 man/copr-cli.1 %{buildroot}/%{_mandir}/man1/
 %pre backend
 getent group copr >/dev/null || groupadd -r copr
 getent passwd copr >/dev/null || \
-useradd -r -g copr -G apache -d %{_var}/lib/copr -s /bin/bash -c "COPR user" copr
+useradd -r -g copr -G apache -d %{_datadir}/copr -s /bin/bash -c "COPR user" copr
 /usr/bin/passwd -l copr >/dev/null
 %pre frontend
 getent group copr-fe >/dev/null || groupadd -r copr-fe
 getent passwd copr-fe >/dev/null || \
-useradd -r -g copr-fe -G copr-fe -d %{_datadir}/coprs_frontend -s /bin/bash -c "COPR frontend user" copr-fe
+useradd -r -g copr-fe -G copr-fe -d %{_datadir}/copr/coprs_frontend -s /bin/bash -c "COPR frontend user" copr-fe
 /usr/bin/passwd -l copr-fe >/dev/null
 %files backend
+%dir %{_datadir}/copr
 %files frontend
 %doc LICENSE coprs.conf.example
 %defattr(-, copr-fe, copr-fe, -)
+%dir %{_datadir}/copr
+%dir %{_datadir}/copr/data
+%dir %{_datadir}/copr/data/openid_store
+%dir %{_datadir}/copr/data/whooshee
+%ghost %{_datadir}/copr/data/copr.db
 %files cli

More information about the copr-devel mailing list