Isolated job_submitobs to separate package
authorEd Bartosh <eduard.bartosh@intel.com>
Sun, 6 Oct 2013 17:21:09 +0000 (20:21 +0300)
committerGerrit Code Review <gerrit2@otctools.jf.intel.com>
Wed, 9 Oct 2013 18:20:12 +0000 (11:20 -0700)
This change resolves conflicting runtime dependencies:

jenkins-scripts-tzs -> jenkins-scripts-common(with job_submitobs) -> gbs
-> depanneur -> modified build and obs-server -> build

The reason of the conflict is that jenkins-scripts-tzs package has to be
installed on the same host as obs-server because tzs appliance is one
computer with all services(Jenkins, OBS, Gerrit) installed on it.

So, job_submitobs should be removed from -common to avoid conflicts
between our modified build and non-modified build, required by
obs-server.

This complicated packaging issue can be resolved by moving job_submitobs
to separate package jenkins-scripts-submitobs.

This is funny in a sense that jenkins-scripts doesn't require gbs build
functionality, which depends on depanneur and build.

Note that this is temporary solution. There are at least 2 solutions to
this issue:

1. Upgrade our build package to the version, required by obs-server
(also temporary until the time when OBS depends on newer build)

2. - Move gbs remotebuild API to separate package
   - Add dependency to gbs-remotebuid to jenkins-scripts
   - Use gbs export and gbs remotebuild API in jenkinkins scripts
   - Move job_sumbitobs back to jenkins-scripts-common

Even better would be to start using gbs service instead of gbs export in
job_submitobs. gbs remotebuild is still required, but gbs export is not
required in this case.

Change-Id: I0395e69000bc5695546c719a020cacf2bb77c3bc
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
packaging/jenkins-scripts.spec

index 8232c07..aad6a76 100644 (file)
@@ -15,6 +15,8 @@ Url:            http://www.tizen.org
 Group:          Development/Tools/Building
 Source:         %{name}-%{version}.tar.gz
 Requires:       %{name}-common = %{version}-%{release}
+Requires:       %{name}-submitobs = %{version}-%{release}
+Requires:       gbs >= 0.17
 BuildArch:      noarch
 
 %define destdir /var/lib/jenkins/%{name}
@@ -32,7 +34,6 @@ Requires:   git-buildpackage-common
 Requires:   python-cheetah
 Requires:   python-redis
 Requires:   python-yaml
-Requires:   gbs >= 0.17
 Requires:   gbs-api
 
 %description common
@@ -41,7 +42,8 @@ Common part of jenkins scripts
 %package sync
 Summary:    Scripts for tizendev/tizen.org Jenkins instance
 Group:      Development/Tools/Building
-Requires:   %{name}-common = %{version}
+Requires:   %{name}-common = %{version}-%{release}
+Requires:   %{name}-submitobs = %{version}-%{release}
 
 %description sync
 Jenkins scripts for tizendev/tizen.org Jenkins instance
@@ -54,6 +56,15 @@ Requires:   %{name}-common = %{version}-%{release}
 %description tzs
 Jenkins scripts for tzs customer appliance instance
 
+%package submitobs
+Summary:    Temporary package to isolate job_submitobs
+Group:      Development/Tools/Building
+Requires:   gbs >= 0.17
+Requires:   %{name}-common = %{version}-%{release}
+
+%description submitobs
+Isolated job_submitobs to avoid package installation conflicts
+
 %prep
 %setup -q
 
@@ -101,7 +112,6 @@ cp -r job_*.py common requests %{buildroot}%{destdir}/
 %{destdir}/job_imager.py
 %{destdir}/job_mail_sender.py
 %{destdir}/job_load_repos.yaml.py
-%{destdir}/job_submitobs.py
 %{destdir}/job_update_local_git.py
 
 %files sync
@@ -112,5 +122,9 @@ cp -r job_*.py common requests %{buildroot}%{destdir}/
 %defattr(-,jenkins,jenkins)
 %{destdir}/job_submit.py
 
+%files submitobs
+%defattr(-,jenkins,jenkins)
+%{destdir}/job_submitobs.py
+
 
 %changelog