summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2018-12-11 11:32:36 +0100
committerHans de Graaff <graaff@gentoo.org>2018-12-11 11:32:54 +0100
commit6bb8646ba90649df00938a7919b985364558760e (patch)
treeb5e56fe04a0aa12f13972b15d3a776fe97ae232a /dev-util
parentmail-filter/spamassassin: Security cleanup (diff)
downloadgentoo-6bb8646ba90649df00938a7919b985364558760e.tar.gz
gentoo-6bb8646ba90649df00938a7919b985364558760e.tar.bz2
gentoo-6bb8646ba90649df00938a7919b985364558760e.zip
dev-util/jenkins-bin: use jenkins.conf also for systemd
Use the options specified in /etc/conf.d/jenkins.conf also for the systemd service, rather than hardcoding specific values. Thanks to Georg Voigtländer for providing the updated service file. Bug: https://bugs.gentoo.org/665030 Signed-off-by: Hans de Graaff <graaff@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/jenkins-bin/files/jenkins-bin.service211
-rw-r--r--dev-util/jenkins-bin/jenkins-bin-2.150.1-r1.ebuild46
-rw-r--r--dev-util/jenkins-bin/jenkins-bin-2.155-r1.ebuild46
3 files changed, 103 insertions, 0 deletions
diff --git a/dev-util/jenkins-bin/files/jenkins-bin.service2 b/dev-util/jenkins-bin/files/jenkins-bin.service2
new file mode 100644
index 000000000000..f109fac02cc9
--- /dev/null
+++ b/dev-util/jenkins-bin/files/jenkins-bin.service2
@@ -0,0 +1,11 @@
+[Unit]
+Description=Jenkins Daemon
+
+[Service]
+EnvironmentFile=/etc/conf.d/jenkins
+Type=forking
+ExecStart=/usr/bin/java ${JENKINS_JAVA_OPTIONS} -DJENKINS_HOME=${JENKINS_HOME} -jar ${JENKINS_WAR} --daemon --logfile=/var/log/jenkins/jenkins.log --httpPort=${JENKINS_PORT} --debug=${JENKINS_DEBUG_LEVEL} --handlerCountMax=100 --handlerCountMaxIdle=20 --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/jenkins/access_log ${JENKINS_ARGS}
+User=jenkins
+
+[Install]
+WantedBy=multi-user.target
diff --git a/dev-util/jenkins-bin/jenkins-bin-2.150.1-r1.ebuild b/dev-util/jenkins-bin/jenkins-bin-2.150.1-r1.ebuild
new file mode 100644
index 000000000000..c8cffcf979ac
--- /dev/null
+++ b/dev-util/jenkins-bin/jenkins-bin-2.150.1-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit user systemd
+
+DESCRIPTION="Extensible continuous integration server"
+HOMEPAGE="https://jenkins.io/"
+LICENSE="MIT"
+SRC_URI="http://mirrors.jenkins-ci.org/war-stable/${PV}/${PN/-bin/}.war -> ${P}.war"
+RESTRICT="mirror"
+SLOT="lts"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE=""
+
+RDEPEND="media-fonts/dejavu
+ media-libs/freetype
+ !dev-util/jenkins-bin:0
+ >=virtual/jre-1.8.0"
+
+S=${WORKDIR}
+
+JENKINS_DIR=/var/lib/jenkins
+
+pkg_setup() {
+ enewgroup jenkins
+ enewuser jenkins -1 -1 ${JENKINS_DIR} jenkins
+}
+
+src_install() {
+ keepdir /var/log/jenkins ${JENKINS_DIR}/backup ${JENKINS_DIR}/home
+
+ insinto /opt/jenkins
+ newins "${DISTDIR}"/${P}.war ${PN/-bin/}.war
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}-r1.logrotate ${PN/-bin/}
+
+ newinitd "${FILESDIR}"/${PN}.init2 jenkins
+ newconfd "${FILESDIR}"/${PN}.confd jenkins
+
+ systemd_newunit "${FILESDIR}"/${PN}.service2 jenkins.service
+
+ fowners jenkins:jenkins /var/log/jenkins ${JENKINS_DIR} ${JENKINS_DIR}/home ${JENKINS_DIR}/backup
+}
diff --git a/dev-util/jenkins-bin/jenkins-bin-2.155-r1.ebuild b/dev-util/jenkins-bin/jenkins-bin-2.155-r1.ebuild
new file mode 100644
index 000000000000..95c4fb759443
--- /dev/null
+++ b/dev-util/jenkins-bin/jenkins-bin-2.155-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit user systemd
+
+DESCRIPTION="Extensible continuous integration server"
+HOMEPAGE="https://jenkins.io/"
+LICENSE="MIT"
+SRC_URI="http://mirrors.jenkins-ci.org/war/${PV}/${PN/-bin/}.war -> ${P}.war"
+RESTRICT="mirror"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux"
+IUSE=""
+
+RDEPEND="media-fonts/dejavu
+ media-libs/freetype
+ !dev-util/jenkins-bin:lts
+ >=virtual/jre-1.8.0"
+
+S=${WORKDIR}
+
+JENKINS_DIR=/var/lib/jenkins
+
+pkg_setup() {
+ enewgroup jenkins
+ enewuser jenkins -1 -1 ${JENKINS_DIR} jenkins
+}
+
+src_install() {
+ keepdir /var/log/jenkins ${JENKINS_DIR}/backup ${JENKINS_DIR}/home
+
+ insinto /opt/jenkins
+ newins "${DISTDIR}"/${P}.war ${PN/-bin/}.war
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/${PN}-r1.logrotate ${PN/-bin/}
+
+ newinitd "${FILESDIR}"/${PN}.init2 jenkins
+ newconfd "${FILESDIR}"/${PN}.confd jenkins
+
+ systemd_newunit "${FILESDIR}"/${PN}.service2 jenkins.service
+
+ fowners jenkins:jenkins /var/log/jenkins ${JENKINS_DIR} ${JENKINS_DIR}/home ${JENKINS_DIR}/backup
+}