From c927c7bec1e41e759228ffbef18ca9186363eac8 Mon Sep 17 00:00:00 2001 From: Junchun Guan Date: Thu, 15 Jan 2015 11:46:39 +0800 Subject: [PATCH] Fix jenkins user not exist issue when installing gbs jenkins jobs and scripts Make gbs-jenkins-jobs and gbs-jenkins-scritps depend on jenkins Install jenkins from extra repo, this package will create jenkins user Modify packages files owner to jenkins user Fixes: #2311 Change-Id: I784306e66613cabe54e92276863834f452dd5749 Signed-off-by: Junchun Guan --- debian/control | 4 +++- debian/gbs-jenkins-jobs.postinst | 1 + debian/gbs-jenkins-scripts.postinst | 1 + packaging/.extra-repos | 10 ++++++++++ packaging/gbs.spec | 6 ++++-- 5 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 debian/gbs-jenkins-jobs.postinst create mode 100644 debian/gbs-jenkins-scripts.postinst create mode 100644 packaging/.extra-repos diff --git a/debian/control b/debian/control index 0615d64..9bff4e4 100644 --- a/debian/control +++ b/debian/control @@ -62,6 +62,7 @@ Description: GBS remotebuild API Package: gbs-jenkins-jobs Architecture: all Depends: ${misc:Depends}, + jenkins Description: GBS local full build jenkins jobs configurations. These jenkins jobs are used to build tizen source from scratch or only a part of packages, and create images finally. @@ -69,6 +70,7 @@ Package: gbs-jenkins-scripts Architecture: all Depends: ${misc:Depends}, gbs, - mic + mic, + jenkins Description: Jenkins scripts used by gbs-jenkins-job These scripts are used by GBS local full build jenkins jobs. These scripts should be installed on Jenkins slave nodes. diff --git a/debian/gbs-jenkins-jobs.postinst b/debian/gbs-jenkins-jobs.postinst new file mode 100644 index 0000000..48999c7 --- /dev/null +++ b/debian/gbs-jenkins-jobs.postinst @@ -0,0 +1 @@ +chown -R jenkins. /var/lib/jenkins/jobs diff --git a/debian/gbs-jenkins-scripts.postinst b/debian/gbs-jenkins-scripts.postinst new file mode 100644 index 0000000..9e40947 --- /dev/null +++ b/debian/gbs-jenkins-scripts.postinst @@ -0,0 +1 @@ +chown -R jenkins. /var/lib/jenkins/jenkins-scripts diff --git a/packaging/.extra-repos b/packaging/.extra-repos new file mode 100644 index 0000000..8179835 --- /dev/null +++ b/packaging/.extra-repos @@ -0,0 +1,10 @@ +openSUSE-12.3:http://linux-ftp.fi.intel.com/repo/jenkins/opensuse-stable +openSUSE-13.1:http://linux-ftp.fi.intel.com/repo/jenkins/opensuse-stable +Fedora-19:http://linux-ftp.fi.intel.com/repo/jenkins/redhat-stable +Fedora-20:http://linux-ftp.fi.intel.com/repo/jenkins/redhat-stable +CentOS-6.6:http://linux-ftp.fi.intel.com/repo/jenkins/redhat-stable +CentOS-7:http://linux-ftp.fi.intel.com/repo/jenkins/redhat-stable +Debian-7.8:deb http://linux-ftp.fi.intel.com/repo/jenkins/debian-stable / +Ubuntu-12.04:deb http://linux-ftp.fi.intel.com/repo/jenkins/debian-stable / +Ubuntu-14.04:deb http://linux-ftp.fi.intel.com/repo/jenkins/debian-stable / +Ubuntu-14.10:deb http://linux-ftp.fi.intel.com/repo/jenkins/debian-stable / diff --git a/packaging/gbs.spec b/packaging/gbs.spec index 7612f81..3741a0d 100644 --- a/packaging/gbs.spec +++ b/packaging/gbs.spec @@ -79,6 +79,7 @@ external software. %package jenkins-jobs Summary: GBS local full build jenkins jobs configurations. +Requires: jenkins %description jenkins-jobs These jenkins jobs are used to build tizen source from scratch or @@ -88,6 +89,7 @@ only a part of packages, and create images finally. Summary: Jenkins scripts used by gbs-jenkins-job Requires: gbs Requires: mic +Requires: jenkins %description jenkins-scripts These scripts are used by GBS local full build jenkins jobs. These @@ -160,7 +162,7 @@ rm -rf %{buildroot} %{python_sitelib}/gitbuildsys/cmd_remotebuild.py* %files jenkins-jobs -%defattr(-,root,root,-) +%defattr(-,jenkins,jenkins,-) %dir /var/lib/jenkins %dir %{jobs_dir} %dir %{jobs_dir}/GBS-local-full-build @@ -169,7 +171,7 @@ rm -rf %{buildroot} %{jobs_dir}/GBS-local-build-with-package-list/config.xml %files jenkins-scripts -%defattr(-,root,root,-) +%defattr(-,jenkins,jenkins,-) %dir /var/lib/jenkins %dir %{scripts_dir} %{scripts_dir}/job_local_full_build -- 2.34.1