diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2014-10-21 08:38:23 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2014-10-21 08:38:23 +0000 |
commit | 074afca91bf54e79a18f92b4a9805b423231d584 (patch) | |
tree | 6894188674a6bc52483c70a590540bf84e36b835 /dev-util/jenkins-bin | |
parent | Remove old development versions (diff) | |
download | historical-074afca91bf54e79a18f92b4a9805b423231d584.tar.gz historical-074afca91bf54e79a18f92b4a9805b423231d584.tar.bz2 historical-074afca91bf54e79a18f92b4a9805b423231d584.zip |
Logrotate snippet as written by Travis Hansen in bug #526166. Stop attempting to create a /var/run directory structure, those sands have shifted. Enhance init script to create home directory if missing. Do not assign the jenkins user a shell as it is not needed, as per Agostino "ago" Sarubbo on #gentoo-dev. Remove older revision.
Package-Manager: portage-2.2.14/cvs/Linux x86_64
Manifest-Sign-Key: 0xB5058F9A
Diffstat (limited to 'dev-util/jenkins-bin')
-rw-r--r-- | dev-util/jenkins-bin/ChangeLog | 13 | ||||
-rw-r--r-- | dev-util/jenkins-bin/Manifest | 16 | ||||
-rw-r--r-- | dev-util/jenkins-bin/files/jenkins-bin.init2 | 52 | ||||
-rw-r--r-- | dev-util/jenkins-bin/files/jenkins-bin.logrotate | 17 | ||||
-rw-r--r-- | dev-util/jenkins-bin/jenkins-bin-1.584-r1.ebuild (renamed from dev-util/jenkins-bin/jenkins-bin-1.584.ebuild) | 14 |
5 files changed, 103 insertions, 9 deletions
diff --git a/dev-util/jenkins-bin/ChangeLog b/dev-util/jenkins-bin/ChangeLog index 6e467f3937e2..0578fb01d43a 100644 --- a/dev-util/jenkins-bin/ChangeLog +++ b/dev-util/jenkins-bin/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for dev-util/jenkins-bin # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/jenkins-bin/ChangeLog,v 1.2 2014/10/20 23:18:28 mrueg Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/jenkins-bin/ChangeLog,v 1.3 2014/10/21 08:38:20 chainsaw Exp $ + +*jenkins-bin-1.584-r1 (21 Oct 2014) + + 21 Oct 2014; Tony Vroon <chainsaw@gentoo.org> -jenkins-bin-1.584.ebuild, + +jenkins-bin-1.584-r1.ebuild, +files/jenkins-bin.init2, + +files/jenkins-bin.logrotate: + Logrotate snippet as written by Travis Hansen in bug #526166. Stop attempting + to create a /var/run directory structure, those sands have shifted. Enhance + init script to create home directory if missing. Do not assign the jenkins + user a shell as it is not needed, as per Agostino "ago" Sarubbo on + #gentoo-dev. Remove older revision. 20 Oct 2014; Manuel Rüger <mrueg@gentoo.org> jenkins-bin-1.584.ebuild: Fix install. diff --git a/dev-util/jenkins-bin/Manifest b/dev-util/jenkins-bin/Manifest index b5072c41d9d2..c401b918b7a2 100644 --- a/dev-util/jenkins-bin/Manifest +++ b/dev-util/jenkins-bin/Manifest @@ -1,6 +1,18 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX jenkins-bin.confd 998 SHA256 8cd3e217ae11f47b73f8a3f28beb2f94b14e24da4e822f7209b19a2f14dccb3b SHA512 465ade6325efa05b4a150234f847ad19b9824f667fdc8f783af3d9842afc2815ee3d20dfd9566348701102bf28e1e0627af27ae43d055a9a6279ed638d8ece8b WHIRLPOOL 5c0dee7d648c22c65fcad7ec678ac839d1ab2d61aa52c8e54dccb6a9d58bcda5cca9685e570f0fe5b5f0fd6dd6ce0a47acc616cb9c5f6568758f92125a38f8c8 AUX jenkins-bin.init 1789 SHA256 b1f16088b389615a3deebb499d0fc090b8a663b97b1909524fe5f6ce4528063b SHA512 9bee38239a765ee1d61f0b8953de8795823641d68ef6c2593d44d1f8db293c0414a633f35e3776883018a749c4670826bc7a84f8bfb243b554d5b71fef39ee35 WHIRLPOOL f3b4d8de5a4f44e5c161e79c360f0fd67fd1d1810f7b6813af7d66423f1cf565fd6c291a12ef383f43d6952f08295115d1436e0c3ef4c2030bd63b7e1c1c8e07 +AUX jenkins-bin.init2 1781 SHA256 75f8a4dc5c3c03b2f3ac52860b11bf2a245976b4b726b35cfe20ec2acbbb7e08 SHA512 edd83f1d92433441ee2021ab096367ffa17808a4e5564cabec8d9e00276abaec8916bb55bc842ad49ffc9fe6f5b24b8e93a20b247100e96f667fb90f87e6e33c WHIRLPOOL 22735e7b9ad35cec7b7a6e9ba146345786e0d3abf25b8c7d7b93228a779e99458b10831edacc372cef62770687835f7f4096cff3ebdc2b0dfc398e2da6d31996 +AUX jenkins-bin.logrotate 502 SHA256 2c18c2a6757246fe4a1e87191ac6ca529126ab6f0b85c48f6d350c4802a71194 SHA512 86262c89495ed26b4996a55b39bd7f57826010500ef5f668ea28ffcdc3bbce73481158340d24876a3dfc6f7ea6ec872edd40f89bfd9a0bea3aa2d61eeeeddbdd WHIRLPOOL 920b5fe2e776c0a43c964c0c43209c7f2d7cef4bb2a9bfc0a4a4d99797f4be9c78b489b76c3928248ccfeadb10213d643eb12e6ffeb45824ef4f92e9d7924582 DIST jenkins-bin-1.584.war 67869658 SHA256 cd89d8b7fb0fa792abe86a5c7d4c7ac751d4e5fe49ca427fbaa6824f05d7782e SHA512 2e9e31e1fd5aa7fab17bc6b528dad78f4e513b4e77f7141578916cdb4a6de96bda92f102cfe0078a269cbd4163d5704df0e1cf3e5bc8db68f30f2544c0602a4a WHIRLPOOL 165cebd1a832c878a6caa0b37fa0433c30d0f0755d01e2518dde8469688544d2375c29ed22d8e2026dc0478010e26d51134b1f7cd1d3b52137f99c7ba515fbf7 -EBUILD jenkins-bin-1.584.ebuild 1059 SHA256 fa400a95d2c91218ec7bb6f0799c3b8cea7d4f0a31b2a88f9f75c0be676c165f SHA512 d5e435072f69d96ef45591237b80f9807c3bb51344288baebd7513cd4bc172bbfbc19fd56a176ae00b5ab5687dfade0e0ba493603ec22755467fb97d5d074d86 WHIRLPOOL 09953a7ae22ffa2e531c8af34105a930ba7593213ab90daf1ff6cf32d680558df59878ec9b7a87d8e77946715a7dec39a828c454a4602e858d85f0657d3344b2 -MISC ChangeLog 573 SHA256 e8789cc55e7aa8e8b4f6f623fe425c30432438a4c5da4b9c50905c6e8c545ae9 SHA512 97a2ad4e4db408e022c3be55c02e7b13c66bc42a5ce74cc0e838908b53ca1c7841e6254538f214cfede760499db4ee24b8df6833787cf9ff49f6c9f0be2b45b6 WHIRLPOOL 68ff3d4b852dead3d66c029e47b17d821924616886459c70b034e139242d5444f003f62eeae1673ddfb1aabf11f48daf92e5e29082ba0481ed7b4a5436051bb5 +EBUILD jenkins-bin-1.584-r1.ebuild 1098 SHA256 cc9e29b06e350b76fdba7d235613ecf9f87c067ec75c9aa1d98a19ac94dfbdc7 SHA512 eef1f1712b9d6f7b66bd0b73b2ba99af3c548a544a9131a62feb7a6f6be21c47d2a20145691fe91856d74f4ddc160fabc9513455a1c08d2a967106ffb0dca035 WHIRLPOOL f8e3e996b457b7c7ccc89d299bfbb3ffa737840821e60b5132bf92cbcd0b70ffd12077f2131bca47d564abb1686443dc40e45af6e5792b24d7084c8a94063e8d +MISC ChangeLog 1121 SHA256 8663a743ef9ef7a5b53e93a51dc40a9502f03d22fad66ad06ca9972071004839 SHA512 7b75ff298fd6a334325b5179cbd2affc296d1258a7571eb94eede31948cc20b6c3165376043ab915ff599dbfe9dffb4734e60d21a10608cb6d8d372d0ba1f1c4 WHIRLPOOL f65316d8c4427f3d17f0f88ecd6574d8a4cffb9d977caf7b794e5f50c7ee1f680cf31606a811cc0b106eda30629c8c251dd2f056052e142844d9087d8a19f3d6 MISC metadata.xml 323 SHA256 1fe2512e65f90ccec2e80123923bdb2c3cb6f597c45754f6c9f8246761234a48 SHA512 3d0a3145eca160f429e10f2b48ae1415143f2175cc06a3569a8d7fb646dd14fab750c8f8df4ad71ae085915bc075fa0e3ed35ee20a84fd04deb9590bed8fd940 WHIRLPOOL 830a0c6f0046034b335756b21f7a00b081254e190e288db88161fc26ceb48f0652b2418b67022ec394489b1e23028e50bef67e808d771518bf4ac2076d7f403b +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2 + +iEYEAREIAAYFAlRGG34ACgkQp5vW4rUFj5ouJACeOpSoPudWa+HpFou8WN2DgObK +sFgAnii9rmHgWaPicdsr6XFUXj1aUoM8 +=Jsxg +-----END PGP SIGNATURE----- diff --git a/dev-util/jenkins-bin/files/jenkins-bin.init2 b/dev-util/jenkins-bin/files/jenkins-bin.init2 new file mode 100644 index 000000000000..9e326a569350 --- /dev/null +++ b/dev-util/jenkins-bin/files/jenkins-bin.init2 @@ -0,0 +1,52 @@ +#!/sbin/runscript + +depend() { + need net + use dns logger mysql postgresql +} + +checkconfig() { + if [ ! -n "$JENKINS_HOME" ] ; then + eerror "JENKINS_HOME not configured" + return 1 + fi + if [ ! -d "$JENKINS_HOME" ] ; then + checkpath -q -d -o jenkins:jenkins -m 0755 "$JENKINS_HOME" || return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + + JAVA_HOME=`java-config --jre-home` + COMMAND=$JAVA_HOME/bin/java + + JAVA_PARAMS="$JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR" + + # Don't use --daemon here, because in this case stop will not work + PARAMS="--logfile=/var/log/jenkins/jenkins.log" + [ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_PORT" + [ -n "$JENKINS_DEBUG_LEVEL" ] && PARAMS="$PARAMS --debug=$JENKINS_DEBUG_LEVEL" + [ -n "$JENKINS_HANDLER_STARTUP" ] && PARAMS="$PARAMS --handlerCountStartup=$JENKINS_HANDLER_STARTUP" + [ -n "$JENKINS_HANDLER_MAX" ] && PARAMS="$PARAMS --handlerCountMax=$JENKINS_HANDLER_MAX" + [ -n "$JENKINS_HANDLER_IDLE" ] && PARAMS="$PARAMS --handlerCountMaxIdle=$JENKINS_HANDLER_IDLE" + [ -n "$JENKINS_ARGS" ] && PARAMS="$PARAMS $JENKINS_ARGS" + + if [ "$JENKINS_ENABLE_ACCESS_LOG" = "yes" ]; then + PARAMS="$PARAMS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=/var/log/jenkins/access_log" + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet --background \ + --make-pidfile --pidfile $JENKINS_PIDFILE \ + --user ${JENKINS_USER} \ + --exec "${COMMAND}" -- $JAVA_PARAMS $PARAMS + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --pidfile $JENKINS_PIDFILE + eend $? +} diff --git a/dev-util/jenkins-bin/files/jenkins-bin.logrotate b/dev-util/jenkins-bin/files/jenkins-bin.logrotate new file mode 100644 index 000000000000..1a9497aa02a4 --- /dev/null +++ b/dev-util/jenkins-bin/files/jenkins-bin.logrotate @@ -0,0 +1,17 @@ +/var/log/jenkins/jenkins.log /var/log/jenkins/access_log { + compress + dateext + maxage 365 + rotate 99 + size=+4096k + notifempty + missingok + create 644 + postrotate + [ -r /etc/conf.d/jenkins ] && source /etc/conf.d/jenkins + if [ -s /var/run/jenkins/jenkins.pid ]; then + JPID=`cat /var/run/jenkins/jenkins.pid` + test -n "`find /proc/$JPID -maxdepth 0 -user ${RUN_AS:-jenkins} 2>/dev/null`" && kill -s ALRM $JPID || : + fi + endscript +} diff --git a/dev-util/jenkins-bin/jenkins-bin-1.584.ebuild b/dev-util/jenkins-bin/jenkins-bin-1.584-r1.ebuild index e5fd7fdd2084..381b4caea003 100644 --- a/dev-util/jenkins-bin/jenkins-bin-1.584.ebuild +++ b/dev-util/jenkins-bin/jenkins-bin-1.584-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/jenkins-bin/jenkins-bin-1.584.ebuild,v 1.2 2014/10/20 23:18:28 mrueg Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/jenkins-bin/jenkins-bin-1.584-r1.ebuild,v 1.1 2014/10/21 08:38:20 chainsaw Exp $ EAPI=5 @@ -23,18 +23,20 @@ S=${WORKDIR} pkg_setup() { enewgroup jenkins - enewuser jenkins -1 /bin/bash /var/lib/jenkins jenkins + enewuser jenkins -1 /sbin/nologin /var/lib/jenkins jenkins } src_install() { - keepdir /var/run/jenkins /var/log/jenkins - keepdir /var/lib/jenkins/home /var/lib/jenkins/backup + keepdir /var/log/jenkins /var/lib/jenkins/backup /var/lib/jenkins/home insinto /opt/jenkins newins "${DISTDIR}"/${P}.war ${PN/-bin/}.war - newinitd "${FILESDIR}"/${PN}.init jenkins + insinto /etc/logrotate.d + newins "${FILESDIR}"/${PN}.logrotate ${PN} + + newinitd "${FILESDIR}"/${PN}.init2 jenkins newconfd "${FILESDIR}"/${PN}.confd jenkins - fowners jenkins:jenkins /var/run/jenkins /var/log/jenkins /var/lib/jenkins /var/lib/jenkins/home /var/lib/jenkins/backup + fowners jenkins:jenkins /var/log/jenkins /var/lib/jenkins /var/lib/jenkins/home /var/lib/jenkins/backup } |