[copr] master: move jobsdir to /var/lib/copr/jobs (8833c1c)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8833c1c2373faa55301456db72370133dcd50e77
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Sep 19 11:20:35 2013 +0200
move jobsdir to /var/lib/copr/jobs
>---------------------------------------------------------------
copr-be.conf.example | 2 +-
copr.spec | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/copr-be.conf.example b/copr-be.conf.example
index fac35dc..f109cae 100644
--- a/copr-be.conf.example
+++ b/copr-be.conf.example
@@ -23,7 +23,7 @@ terminate_playbook=/srv/copr-work/provision/terminatepb.yml
# directory where jobs are stored
# no defaults
-jobsdir=/srv/copr-work/jobs
+jobsdir=/var/lib/copr/jobs
# directory where results are stored
# should be accessible from web using 'results_baseurl' URL
diff --git a/copr.spec b/copr.spec
index 4c016e8..7947319 100644
--- a/copr.spec
+++ b/copr.spec
@@ -159,6 +159,7 @@ popd
#backend
install -d %{buildroot}%{_sharedstatedir}/copr
+install -d %{buildroot}%{_sharedstatedir}/copr/jobs
install -d %{buildroot}%{_sharedstatedir}/copr/public_html/results
install -d %{buildroot}%{_var}/log/copr
install -d %{buildroot}%{_var}/log/copr/workers/
@@ -262,6 +263,7 @@ fi
%doc LICENSE README
%dir %{_datadir}/copr
%dir %{_sharedstatedir}/copr
+%dir %attr(0755, copr, copr) %{_sharedstatedir}/copr/jobs/
%dir %attr(0755, copr, copr) %{_sharedstatedir}/copr/public_html/
%dir %attr(0755, copr, copr) %{_sharedstatedir}/copr/public_html/results
%dir %attr(0755, copr, copr) %{_var}/log/copr
10 years, 7 months
[copr] master: correct playbooks path (a0a121e)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit a0a121e5740c089550d40dc1e443a95bae694e48
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Sep 19 11:17:11 2013 +0200
correct playbooks path
>---------------------------------------------------------------
copr-setup.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/copr-setup.txt b/copr-setup.txt
index d50c724..5296e6a 100644
--- a/copr-setup.txt
+++ b/copr-setup.txt
@@ -19,7 +19,7 @@ ansible playbook:
- frontend_auth must have same value as BACKEND_PASSWORD from have frontend in /etc/copr/copr.conf
- spawn_playbook - path to ansible playbook which spawns builder
- terminate_playbook - path to ansible playbook which terminate builder
- - you can see /usr/share/copr*/playbooks/ for examples
+ - you can see /usr/share/doc/copr*/playbooks/ for examples
- for Fedora copr playbook see FEDORA PLAYBOOK below
- others variables can be edited as well, but it is optional
- ntp should be enabled and started
10 years, 7 months
[copr] master: selinux with enforce can be used for frontend (dac9550)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit dac95504277cbe8f5f7a666eb6bbb308a26028b9
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 18 14:48:18 2013 +0200
selinux with enforce can be used for frontend
>---------------------------------------------------------------
copr-setup.txt | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/copr-setup.txt b/copr-setup.txt
index 1694351..d50c724 100644
--- a/copr-setup.txt
+++ b/copr-setup.txt
@@ -76,8 +76,6 @@ COPR_CONFIG=/etc/copr/copr_devel.conf ./manage.py create_db --alembic alembic.in
- for production is used ProductionConfig from coprs_frontend/coprs/config.py
-- setenforce 0 (sorry, putting on TODO)
-
- Add chroots. E.g:
su - copr-fe -c './manage.py create_chroot fedora-18-x86_64 fedora-18-i386'
10 years, 7 months
[copr] master: allow whooshee to get lock and update data dir (3cb85b5)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 3cb85b57cd2e3921844bd5ea78a9e0e04c273df0
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 18 14:45:12 2013 +0200
allow whooshee to get lock and update data dir
addressing:
type=AVC msg=audit(1379508148.749:13205): avc: denied { lock } for pid=9562 comm="/usr/sbin/httpd" path="/var/lib/copr/data/whooshee/copr_user_whoosheer/MAIN_WRITELOCK" dev="dm-0" ino=9439109 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=file
type=AVC msg=audit(1379508148.757:13206): avc: denied { create } for pid=9562 comm="/usr/sbin/httpd" name="MAIN.tmp" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=dir
type=AVC msg=audit(1379508148.797:13207): avc: denied { unlink } for pid=9562 comm="/usr/sbin/httpd" name="oylf6y572a6b8kryh547e4oqk9ue.ctmp" dev="dm-0" ino=9439149 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=file
type=AVC msg=audit(1379508148.807:13208): avc: denied { rmdir } for pid=9562 comm="/usr/sbin/httpd" name="MAIN.tmp" dev="dm-0" ino=9439148 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=dir
>---------------------------------------------------------------
selinux/copr.te | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/selinux/copr.te b/selinux/copr.te
index 9e9052d..ba7eb17 100644
--- a/selinux/copr.te
+++ b/selinux/copr.te
@@ -10,8 +10,8 @@ gen_tunable(copr_nfs_mountpoint,false)
require {
type httpd_t;
- class dir { write getattr read remove_name open add_name };
- class file { rename write getattr read create open };
+ class dir { write getattr read remove_name open add_name create rmdir};
+ class file { rename write getattr read create open lock unlink};
}
type copr_data_t;
@@ -20,6 +20,7 @@ files_type(copr_data_t);
type copr_httpd_log_t;
logging_log_file(copr_httpd_log_t);
-allow httpd_t copr_data_t:dir { write getattr read remove_name open add_name };
-allow httpd_t copr_data_t:file { rename write getattr read create open };
+#============= httpd_t ==============
+allow httpd_t copr_data_t:dir { write getattr read remove_name open add_name create rmdir};
+allow httpd_t copr_data_t:file { rename write getattr read create open lock unlink};
10 years, 7 months
[copr] master: allow whooshee to write to data directory (8ef07a8)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 8ef07a81785748c61120e2d03c48b747c9779baa
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 18 14:41:18 2013 +0200
allow whooshee to write to data directory
addressing:
type=AVC msg=audit(1379507871.144:13199): avc: denied { getattr } for pid=9562 comm="/usr/sbin/httpd" path="/var/lib/copr/data/whooshee" dev="dm-0" ino=9439140 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=dir
type=AVC msg=audit(1379507871.195:13200): avc: denied { read } for pid=9562 comm="/usr/sbin/httpd" name="copr_user_whoosheer" dev="dm-0" ino=9439147 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=dir
type=AVC msg=audit(1379507871.195:13200): avc: denied { open } for pid=9562 comm="/usr/sbin/httpd" path="/var/lib/copr/data/whooshee/copr_user_whoosheer" dev="dm-0" ino=9439147 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=dir
type=AVC msg=audit(1379507871.195:13201): avc: denied { write } for pid=9562 comm="/usr/sbin/httpd" name="copr_user_whoosheer" dev="dm-0" ino=9439147 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=dir
type=AVC msg=audit(1379507871.195:13201): avc: denied { add_name } for pid=9562 comm="/usr/sbin/httpd" name="_MAIN_0.toc.1379507871.2" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=dir
type=AVC msg=audit(1379507871.195:13201): avc: denied { create } for pid=9562 comm="/usr/sbin/httpd" name="_MAIN_0.toc.1379507871.2" scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=file
type=AVC msg=audit(1379507871.195:13201): avc: denied { write open } for pid=9562 comm="/usr/sbin/httpd" path="/var/lib/copr/data/whooshee/copr_user_whoosheer/_MAIN_0.toc.1379507871.2" dev="dm-0" ino=9439084 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=file
type=AVC msg=audit(1379507871.195:13202): avc: denied { getattr } for pid=9562 comm="/usr/sbin/httpd" path="/var/lib/copr/data/whooshee/copr_user_whoosheer/_MAIN_0.toc.1379507871.2" dev="dm-0" ino=9439084 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=file
type=AVC msg=audit(1379507871.197:13203): avc: denied { remove_name } for pid=9562 comm="/usr/sbin/httpd" name="_MAIN_0.toc.1379507871.2" dev="dm-0" ino=9439084 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=dir
type=AVC msg=audit(1379507871.197:13203): avc: denied { rename } for pid=9562 comm="/usr/sbin/httpd" name="_MAIN_0.toc.1379507871.2" dev="dm-0" ino=9439084 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=file
type=AVC msg=audit(1379507871.197:13204): avc: denied { read } for pid=9562 comm="/usr/sbin/httpd" name="_MAIN_0.toc" dev="dm-0" ino=9439084 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:copr_data_t:s0 tclass=file
>---------------------------------------------------------------
selinux/copr.te | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/selinux/copr.te b/selinux/copr.te
index 39f4cee..9e9052d 100644
--- a/selinux/copr.te
+++ b/selinux/copr.te
@@ -10,6 +10,8 @@ gen_tunable(copr_nfs_mountpoint,false)
require {
type httpd_t;
+ class dir { write getattr read remove_name open add_name };
+ class file { rename write getattr read create open };
}
type copr_data_t;
@@ -17,3 +19,7 @@ files_type(copr_data_t);
type copr_httpd_log_t;
logging_log_file(copr_httpd_log_t);
+
+allow httpd_t copr_data_t:dir { write getattr read remove_name open add_name };
+allow httpd_t copr_data_t:file { rename write getattr read create open };
+
10 years, 7 months
[copr] master: allow FE to run with NIS (e25085e)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit e25085ef34e6977c0f45b1d6441f011cc9b4203c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 18 14:29:52 2013 +0200
allow FE to run with NIS
addressing:
type=AVC msg=audit(1379507152.054:13186): avc: denied { name_bind } for pid=9417 comm="/usr/sbin/httpd" src=65527 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:unreserved_port_t:s0 tclass=udp_socket
>---------------------------------------------------------------
selinux/copr-selinux-enable | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/selinux/copr-selinux-enable b/selinux/copr-selinux-enable
index 1974de2..4fdc03e 100755
--- a/selinux/copr-selinux-enable
+++ b/selinux/copr-selinux-enable
@@ -9,5 +9,5 @@ done
/usr/sbin/setsebool -P httpd_enable_cgi 1
/usr/sbin/setsebool -P httpd_can_network_connect 1
/usr/sbin/setsebool -P httpd_can_sendmail 1
-
+/usr/sbin/setsebool -P nis_enabled 1
10 years, 7 months
[copr] master: Automatic commit of package [copr] release [1.6-1]. (bb29f60)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit bb29f60dd4595cd49ec4cf43c4e6622c891b99ab
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 18 11:02:15 2013 +0200
Automatic commit of package [copr] release [1.6-1].
>---------------------------------------------------------------
copr.spec | 8 +++++++-
rel-eng/packages/copr | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/copr.spec b/copr.spec
index 256f71e..4c016e8 100644
--- a/copr.spec
+++ b/copr.spec
@@ -5,7 +5,7 @@
%global modulename copr
Name: copr
-Version: 1.5
+Version: 1.6
Release: 1%{?dist}
Summary: Cool Other Package Repo
@@ -315,6 +315,12 @@ fi
%{_mandir}/man8/%{name}-selinux-relabel.8*
%changelog
+* Wed Sep 18 2013 Miroslav Suchý <msuchy(a)redhat.com> 1.6-1
+- add BR python-devel
+- generate selinux type for /var/lib/copr and /var/log/copr
+- clean up backend setup instructions
+- initial selinux subpackage
+
* Mon Sep 16 2013 Miroslav Suchý <msuchy(a)redhat.com> 1.5-1
- 1008532 - use __python2 instead of __python
- 1008532 - do not mark man page as doc
diff --git a/rel-eng/packages/copr b/rel-eng/packages/copr
index d52faa8..39f5bdf 100644
--- a/rel-eng/packages/copr
+++ b/rel-eng/packages/copr
@@ -1 +1 @@
-1.5-1 ./
+1.6-1 ./
10 years, 7 months
[copr] master: add BR python-devel (893633c)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 893633cfc21c9069ca945963d2992fcec2248628
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 18 11:01:10 2013 +0200
add BR python-devel
__python2 macro is provided by python-devel
addressing:
+ '%{__python2}' coprcli-setup.py install --root /builddir/build/BUILDROOT/copr-1.5-1.git.3.060dbcd.fc19.x86_64
/var/tmp/rpm-tmp.bC3oF8: line 75: fg: no job control
RPM build errors:
error: Bad exit status from /var/tmp/rpm-tmp.bC3oF8 (%install)
Bad exit status from /var/tmp/rpm-tmp.bC3oF8 (%install)
>---------------------------------------------------------------
copr.spec | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/copr.spec b/copr.spec
index cd12346..256f71e 100644
--- a/copr.spec
+++ b/copr.spec
@@ -26,6 +26,7 @@ BuildRequires: libxslt
BuildRequires: util-linux
BuildRequires: python-setuptools
BuildRequires: python-requests
+BuildRequires: python-devel
%if 0%{?rhel} < 7 && 0%{?rhel} > 0
BuildRequires: python-argparse
%endif
10 years, 7 months
[copr] master: generate selinux type for /var/lib/copr and /var/log/copr (060dbcd)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 060dbcd812e4bf285f73464b1fd321a037996cfa
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 18 09:42:18 2013 +0200
generate selinux type for /var/lib/copr and /var/log/copr
>---------------------------------------------------------------
selinux/copr.fc | 6 +++---
selinux/copr.te | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/selinux/copr.fc b/selinux/copr.fc
index fdff57a..d5ee0ad 100644
--- a/selinux/copr.fc
+++ b/selinux/copr.fc
@@ -1,3 +1,3 @@
-#
-# This file is currently intentionally left blank.
-#
+
+/var/lib/copr(/.*)? gen_context(system_u:object_r:copr_data_t,s0)
+/var/log/copr(/.*)? gen_context(system_u:object_r:copr_httpd_log_t,s0)
diff --git a/selinux/copr.te b/selinux/copr.te
index 4ffecc3..39f4cee 100644
--- a/selinux/copr.te
+++ b/selinux/copr.te
@@ -8,3 +8,12 @@ policy_module(copr,@@VERSION@@)
## </desc>
gen_tunable(copr_nfs_mountpoint,false)
+require {
+ type httpd_t;
+}
+
+type copr_data_t;
+files_type(copr_data_t);
+
+type copr_httpd_log_t;
+logging_log_file(copr_httpd_log_t);
10 years, 7 months
[copr] master: clean up backend setup instructions (5d4a8ff)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 5d4a8ff47b32bd2985b3aed671d4232c45aee011
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Sep 18 09:02:51 2013 +0200
clean up backend setup instructions
>---------------------------------------------------------------
copr-setup.txt | 50 +++++++++++++-------------------------------------
1 files changed, 13 insertions(+), 37 deletions(-)
diff --git a/copr-setup.txt b/copr-setup.txt
index 09a8d3d..1694351 100644
--- a/copr-setup.txt
+++ b/copr-setup.txt
@@ -4,9 +4,8 @@ WORK IN PROGRESS
- SEE README FOR OVERVIEW
-
- need at least 1 server
-- some instances/systems for builders
+- some instances/systems for builders (Fedora Copr use OpenStack)
Backend:
ansible playbook:
@@ -21,55 +20,32 @@ ansible playbook:
- spawn_playbook - path to ansible playbook which spawns builder
- terminate_playbook - path to ansible playbook which terminate builder
- you can see /usr/share/copr*/playbooks/ for examples
+ - for Fedora copr playbook see FEDORA PLAYBOOK below
- others variables can be edited as well, but it is optional
+ - ntp should be enabled and started
+ - ports 22, 80, 443 should be open
+ - cp /usr/share/doc/copr-*/lighttpd/* /etc/lighttpd/conf.d/
+ - edit file /etc/lighttpd/lighttpd.conf as follows:
+ -server.document-root = server_root + "/lighttpd"
+ +server.document-root = "/var/lib/copr/public_html"
+ this is recomended to be separate mount point
-Required pkgs:
- - ansible - 0.9 or higher
- - [lig]httpd
- - euca2ools (or other cloud tools)
- - rsync
- - openssh-clients
- - mock
- - yum-utils
- - createrepo
- - python-bunch
- - python-requests
-
-
-- add copr user
-- give write access to a dir somewhere not in your homedir
-- git clone git://git.fedorahosted.org/copr.git into that dir
-- setup copr-be.conf
-- dirs needed to be setup?
-- setup webserver - point to results path from copr-be.conf
-- dirindexes enabled
-
-- builder provisioning
-3. spawn instance playbook -
+FEDORA PLAYBOOK:
+1. spawn instance playbook -
http://infrastructure.fedoraproject.org/infra/ansible/files/copr/provisio...
- just an ansible playbook which sets up and provisions an instance
in our case it is using eucalyptus but it doesn't have to be
any cloud provider - it just needs to be able to get an ip an
ssh into it - cloud providers or private clouds just make more
sense
-4. provisioning dir
+2. provisioning dir [TODO - this playbook is old and need to be updated]
http://infrastructure.fedoraproject.org/infra/ansible/files/copr/provisio...
- what gets pushed to the other side - ssh keys, users, mock
configs, etc
-5. terminate instance playbook -
+3. terminate instance playbook -
http://infrastructure.fedoraproject.org/infra/ansible/files/copr/provisio...
-Backend manualy:
- - ntp should be enabled and started
- - ports 22, 80, 443 should be open
- - yum install copr-backend
- - cp /usr/share/doc/copr-*/lighttpd/* /etc/lighttpd/conf.d/
- - edit file /etc/lighttpd/lighttpd.conf as follows:
- -server.document-root = server_root + "/lighttpd"
- +server.document-root = "/var/lib/copr/public_html"
- this is recomended to be separate mount point
-
Frontend:
- if you run on EPEL - add epel repo
- add yum repository http://copr-be.cloud.fedoraproject.org/results/msuchy/copr/
10 years, 7 months