From 9a1e4f17199e8fc169fc0930977c2a391a1c40d7 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sun, 22 Mar 2015 00:15:21 +0000 Subject: Infra got bit by a missing directory causing the service to fail to start if the pid path has more dirs than the stock; add a workaround as checkpath does not have a --parents option Package-Manager: portage-2.2.17/cvs/Linux x86_64 --- www-servers/thin/ChangeLog | 10 +++- www-servers/thin/Manifest | 4 +- www-servers/thin/files/thin.initd-3 | 88 +++++++++++++++++++++++++++++++++++ www-servers/thin/thin-1.6.3-r1.ebuild | 84 +++++++++++++++++++++++++++++++++ 4 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 www-servers/thin/files/thin.initd-3 create mode 100644 www-servers/thin/thin-1.6.3-r1.ebuild (limited to 'www-servers') diff --git a/www-servers/thin/ChangeLog b/www-servers/thin/ChangeLog index 41532f73f928..56528d419631 100644 --- a/www-servers/thin/ChangeLog +++ b/www-servers/thin/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for www-servers/thin # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/thin/ChangeLog,v 1.35 2015/01/26 13:48:38 mrueg Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/thin/ChangeLog,v 1.36 2015/03/22 00:15:14 robbat2 Exp $ + +*thin-1.6.3-r1 (22 Mar 2015) + + 22 Mar 2015; Robin H. Johnson +files/thin.initd-3, + +thin-1.6.3-r1.ebuild: + Infra got bit by a missing directory causing the service to fail to start if + the pid path has more dirs than the stock; add a workaround as checkpath does + not have a --parents option 26 Jan 2015; Manuel RĂ¼ger -thin-1.5.1-r1.ebuild, -thin-1.5.1-r2.ebuild, -thin-1.5.1-r3.ebuild, -thin-1.6.2.ebuild: diff --git a/www-servers/thin/Manifest b/www-servers/thin/Manifest index c3e5a0053270..2cb7e6e95b37 100644 --- a/www-servers/thin/Manifest +++ b/www-servers/thin/Manifest @@ -4,7 +4,9 @@ AUX thin.confd-2 1251 SHA256 36ade83707fa363434485e83ede77379fb55300f7e00a3b4bbc AUX thin.initd 1591 SHA256 09f7be62b2231a9461b3aafcfddb95fe9ffadbfba1bb5b3044f27f72efe65fea SHA512 4dd33726d824aae7efea53de8065aaa6cc47785eebb5067e648c4f18632ae750ca51341943d7da5ab00cd06f5acfe6f7f30c7172ba70e7210e4bd299a41b85eb WHIRLPOOL f6548938215962b07ae82743dd505fad132927211e6b9d0c0414db896bf0fdd914f4af92fede07041420bebd6253b1f560eae8701f1f8844656fd69b320caeb2 AUX thin.initd-1 1792 SHA256 38f5faf3b383908535d5adfd1c525d655953351bbd9835850cb8883f3c50a192 SHA512 c29b78babb82069deffe8b03eef9ae20be93fda29acfbd429148647feea7a95ab53cc584731f398b41e142e74c2cf033f7a6fc61fd8fbf03f14f76e61cb8ae8f WHIRLPOOL 85c9f180a2744de1d3df6d1cfe253a26e3f204f4f3c5c1f51260d7fb22c7135f9d3fbe34b9ca1164f40a01b52396fc6478f808ce751d2cadb0685f00faedf97a AUX thin.initd-2 1766 SHA256 a507177c7cec2e5105613e8bdd164475b31e3c8422978d87af8ccc9915ee8466 SHA512 5a420bc20d1c9ac10ed7a6f533791720cf40dd776b613f729d48d869629b2d177ea7f7a5eaed0d0f006b50295ffb2b6da59926362711e97cbe43aafcfe277a02 WHIRLPOOL 3ccffe5c2ee24b34891fe29582ebc75c17d6e109af8ef1ba6c84a593e59719491f232840bbb909179fd2986ec28a7e5fe2c7d53fb2de00a48d60ccf16bfdc55c +AUX thin.initd-3 1938 SHA256 1047b01c130ed330f26ddd26e53f5caeb2d46c57233ab081cae8b1ac9a3c9965 SHA512 6dfe464d65564f07a25f40340383b7c6bc70b45672faedcc4e225385904c98dc049c2b5578f6a878f0c9959bc32e27f67c21e8f9c92629cdbc5ce62641dbe29c WHIRLPOOL 3c6cbdc1935e1e69341e00d0566d1f411fd4e4ba8528475999115a808d285b04a01f7c0ec08265c7d0ea4806ee2460cd76498885483ee80b789cd1045043fae9 DIST thin-1.6.3.tar.gz 180296 SHA256 67ad0865c75c09b454bdabfaf7943275282f4aa059a5fb38b9aef8f2c5f7f231 SHA512 de8c564a9af79d6b8ed849d39c2147745deca8744926a96fe9a5f81745ccab0df5f144d74f1a69fb31d61c8b229d9f51331ad39770d20015e7a4e6453b3abed0 WHIRLPOOL bda35046cb67042273cba973a015518d62dce63627d8c58f7ab57e0a2a6eb6398d17a6d2e0e16f6627714c3aca48bbf0260abd3d34790b76e071ea12f5083735 +EBUILD thin-1.6.3-r1.ebuild 2504 SHA256 0f8993a0a42b61420b3c60772ce7f9980e69ae13911b14b576503b8c2c5a03b6 SHA512 5650ab0c00a1ff5238bda54901447c4fff54b5162849323fcf62a8ec90590cc75965c46fb2466e4463f065e4b375121834ffbbca00a19b35443704374e67d6ff WHIRLPOOL e5bea7a3b4d6244ee3b9d319213bd9b2e4cf1d86e1a8b277634cbb8e8596814bc0189d58de921626d99261095f2b0e872a2db6b3952e4f554a66c9b5386cbb6d EBUILD thin-1.6.3.ebuild 2500 SHA256 802b7c00079ca09b758cb2e77162f15d87b62fc66ffbb1e93df98fd2629c9e10 SHA512 7ee6d485a5d52a2c6ce1405ccbbd01e16a6fbe3526f7311fe2c9de0098b2a073ca6443b0ebf5dce06ec94b46faeac194c015db6b4121a3d38f6387fef024cfbe WHIRLPOOL 374a33dd2b2e02e95b137af34e7f2fbcccbe3da7a891e4604db3f55538ffd5b3a37bae7b2950a786aaa280b78b9ac194577c39b19efd7bdda911ecede261aaa1 -MISC ChangeLog 5012 SHA256 115d6cb5156e9872b647babb18460c932899c9f933a321ee72d5349ec0ea7847 SHA512 222418c28596b9c1e2d3732937b544b1f1e56b9eedcb16ac3ce5c5ab96e2915a57d15ef6b55711ff16471dbee707a3aff23bd9cd907337d2afe458ff33e5606a WHIRLPOOL cc3f4600f385e25ac76499b9b8f0c5b978d0ff741aaafe6d59135e1331963aad11a72061cbca32ff27fd60948c479c7f68ce770f5830846edf4e69237480859c +MISC ChangeLog 5333 SHA256 46893ee18b5b3de7389e6e5aa95e802addb97011a4f12c26a37189b15ffcbba7 SHA512 5b7022bfeb4cbadda1aff9da08e3f6947a3a4ee8dacbce8e0ce2d0fc3cf6c65ee35134693d3bf093dc0002e3061f43b0ec9fee73dfc9c6b46b58ee03874d4441 WHIRLPOOL 777fb8f419b94294ccdc40449d8da0eb86304e7269629d3a9ba0f977b4cffa2981dfa88183164b7b3ca169da7de2f1e6c06a9d6be6a5f112d5449dbf0f02ba9e MISC metadata.xml 429 SHA256 f96f9c85284589d524a5b3f2ae0ffc9f370d729da95dc0c3e7beb6f32c7eb3cc SHA512 6f2c32a40d0e8ebf04e181459fc32e575a625d4f8c2858af607421b959f1c5d8069fc56a7c42a0e556ee7ca64c30b8524c6a69f4749c74fee5d67bccdf2a312c WHIRLPOOL e13401713e98316419b6557bd6f3d50162d6e1c2856c2397463f1b295f904c14255e4ed270e16c3e3a845c15841b97c9df4c2df404c074c8716d8d363638e1a4 diff --git a/www-servers/thin/files/thin.initd-3 b/www-servers/thin/files/thin.initd-3 new file mode 100644 index 000000000000..c926f0b56959 --- /dev/null +++ b/www-servers/thin/files/thin.initd-3 @@ -0,0 +1,88 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/thin/files/thin.initd-3,v 1.1 2015/03/22 00:15:14 robbat2 Exp $ + +SERVER=${SVCNAME#*.} +if [ ${SERVER} != thin ]; then + CONFIG=${CONFIG:-/etc/thin/${SERVER}.yml} +else + CONFIG=${CONFIG:-/etc/thin/} +fi +NOCONFIG=${NOCONFIG:-0} +RUBY=${RUBY:-/usr/bin/ruby} +DO_BUNDLER=${DO_BUNDLER:-0} +CHDIR=${CHDIR:-} +THIN_USER=${THIN_USER:-root} +THIN_GROUP=${THIN_GROUP:-root} +THIN_PID=${THIN_PID:-/var/run/thin/thin.pid} +THIN_OPTS=${THIN_OPTS:-} + +depend() { + need localmount +} + +checkconfig() { + if [ -n ${CHDIR} ]; then + cd "${CHDIR}" + + if [ $? -ne 0 ]; then + eerror "Cannot cd into requested directory" + return 1 + fi + fi + + [ ${SERVER} = thin -o ${NOCONFIG} != 0 ] && return 0 + + if [ ! -f ${CONFIG} ]; then + eerror "Unable to find the server configuration." + eerror "Please set the CONFIG variable in /etc/conf.d/${SVCNAME} or" + eerror "set NOCONFIG there to 1 to disable looking for a config file." + return 1 + fi +} + +buildargs() { + if [ ${NOCONFIG} = 0 -a ${SERVER} != thin ]; then + echo -n "-C ${CONFIG} " + fi + + echo -n "${THIN_OPTS}" +} + +action() { + checkconfig || return 1 + + [ ${DO_BUNDLER} -ne 0 ] && RUBY="${RUBY} /usr/bin/bundle exec" + + if [ ${SERVER} = thin ]; then + ebegin "$2 all thin servers in ${CONFIG}" + ${RUBY} /usr/bin/thin $1 $(buildargs) --all ${CONFIG} + eend $? + else + ebegin "$2 thin server ${SERVER}" + ${RUBY} /usr/bin/thin $(buildargs) --tag ${SERVER} $1 + eend $? + fi +} + +start() { + action start 'Starting' +} + +stop() { + action stop 'Stopping' +} + +restart() { + action restart 'Restarting' +} + +start_pre() { + # If the path to the pidfile is /var/run/thin/foo/thin.pid + # then checkpath will fail if /var/run/thin/ does not exist. + # This caught infra... + d=$(dirname ${THIN_PID}) + mkdir -p "$d" + checkpath -d -m 0775 -o ${THIN_USER}:${THIN_GROUP} "$d" +} diff --git a/www-servers/thin/thin-1.6.3-r1.ebuild b/www-servers/thin/thin-1.6.3-r1.ebuild new file mode 100644 index 000000000000..3ea9728b5658 --- /dev/null +++ b/www-servers/thin/thin-1.6.3-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/thin/thin-1.6.3-r1.ebuild,v 1.1 2015/03/22 00:15:14 robbat2 Exp $ + +EAPI=5 + +USE_RUBY="ruby19 ruby20 ruby21" + +RUBY_FAKEGEM_TASK_TEST="spec:main spec:group:0 spec:group:1 spec:group:2" + +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="A fast and very simple Ruby web server" +HOMEPAGE="http://code.macournoyer.com/thin/" +SRC_URI="https://github.com/macournoyer/thin/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Ruby" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="doc test" + +DEPEND="${DEPEND} + dev-util/ragel" +RDEPEND="${RDEPEND}" + +# The runtime dependencies are used at build-time as well since the +# Rakefile loads thin! +mydeps=">=dev-ruby/daemons-1.0.9 + >=dev-ruby/rack-1.0.0 + >=dev-ruby/eventmachine-1.0.0 + virtual/ruby-ssl" + +ruby_add_rdepend "${mydeps}" +ruby_add_bdepend "${mydeps} + dev-ruby/rake-compiler + test? ( dev-ruby/rspec:0 )" + +all_ruby_prepare() { + # Fix Ragel-based parser generation (uses a *very* old syntax that + # is not supported in Gentoo) + sed -i -e 's: | rlgen-cd::' Rakefile || die + + # Fix specs' dependencies so that the extension is not rebuilt + # when running tests + sed -i -e '/:spec =>/s:^:#:' tasks/spec.rake || die + + # Fix rspec version to allow newer 1.x versions + sed -i -e '/gem "rspec"/ s/1.2.9/1.0/' tasks/spec.rake spec/spec_helper.rb || die + + # Avoid CLEAN since it may not be available and we don't need it. + sed -i -e '/CLEAN/ s:^:#:' tasks/*.rake || die + + # Disable a test that is known for freezing the testsuite, + # reported upstream. In thin 1.5.1 this just fails. + sed -i \ + -e '/should force kill process in pid file/,/^ end/ s:^:#:' \ + spec/daemonizing_spec.rb || die + + # nasty but too complex to fix up for now :( + use doc || rm tasks/rdoc.rake + use test || rm tasks/spec.rake +} + +each_ruby_compile() { + ${RUBY} -S rake compile || die "rake compile failed" +} + +all_ruby_install() { + all_fakegem_install + + keepdir /etc/thin + newinitd "${FILESDIR}"/${PN}.initd-3 ${PN} + newconfd "${FILESDIR}"/${PN}.confd-2 ${PN} + + einfo + elog "Thin is now shipped with init scripts." + elog "The default script (/etc/init.d/thin) will start all servers that have" + elog "configuration files in /etc/thin/. You can symlink the init script to" + elog "files of the format 'thin.SERVER' to be able to start individual servers." + elog "See /etc/conf.d/thin for more configuration options." + einfo +} -- cgit v1.2.3-65-gdbad