diff options
author | Alex Legler <a3li@gentoo.org> | 2013-11-11 14:19:36 +0000 |
---|---|---|
committer | Alex Legler <a3li@gentoo.org> | 2013-11-11 14:19:36 +0000 |
commit | f852d1e8952da04af811963035493c1db56ddca8 (patch) | |
tree | 50fcfe8927dcc8936fe3e9e7b8ff3f238b4f7383 /www-servers | |
parent | Make it possible to satisfy the emul-linux package with virtual/udev-204. (diff) | |
download | historical-f852d1e8952da04af811963035493c1db56ddca8.tar.gz historical-f852d1e8952da04af811963035493c1db56ddca8.tar.bz2 historical-f852d1e8952da04af811963035493c1db56ddca8.zip |
Adding -r3 adding bundler support to the init script; dropping 'need net' as thin defaults to 0.0.0.0; taking over maintenance
Package-Manager: portage-2.2.0_alpha161/cvs/Linux x86_64
Manifest-Sign-Key: 0x8E740238
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/thin/ChangeLog | 9 | ||||
-rw-r--r-- | www-servers/thin/Manifest | 15 | ||||
-rw-r--r-- | www-servers/thin/files/thin.confd-2 | 39 | ||||
-rw-r--r-- | www-servers/thin/files/thin.initd-2 | 83 | ||||
-rw-r--r-- | www-servers/thin/metadata.xml | 2 | ||||
-rw-r--r-- | www-servers/thin/thin-1.5.1-r3.ebuild | 83 |
6 files changed, 223 insertions, 8 deletions
diff --git a/www-servers/thin/ChangeLog b/www-servers/thin/ChangeLog index 6f68b0caf738..99ec2a8bf1be 100644 --- a/www-servers/thin/ChangeLog +++ b/www-servers/thin/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for www-servers/thin # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/thin/ChangeLog,v 1.26 2013/08/11 07:12:25 graaff Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/thin/ChangeLog,v 1.27 2013/11/11 14:19:29 a3li Exp $ + +*thin-1.5.1-r3 (11 Nov 2013) + + 11 Nov 2013; Alex Legler <a3li@gentoo.org> +thin-1.5.1-r3.ebuild, + +files/thin.confd-2, +files/thin.initd-2, metadata.xml: + Adding -r3 adding bundler support to the init script; dropping 'need net' as + thin defaults to 0.0.0.0; taking over maintenance 11 Aug 2013; Hans de Graaff <graaff@gentoo.org> metadata.xml: Drop package from ruby herd as per 2013-07-21 announcement. diff --git a/www-servers/thin/Manifest b/www-servers/thin/Manifest index 9ebb705574b0..253110322231 100644 --- a/www-servers/thin/Manifest +++ b/www-servers/thin/Manifest @@ -3,17 +3,20 @@ Hash: SHA256 AUX thin.confd 772 SHA256 0c6d12deb82208da1acb5ee1f55ed9a5df159ea0f31db9a99b416ca3956a1772 SHA512 f7c1a9fdafb34b9587c10ed058e4b3094042b55c08715230f22a23e3bc5b383a80970848c0d1b2936b33f29fb6c460d834b38e6bfec59b36d2cfe8c3115840cd WHIRLPOOL b7ebe2b567545331f0969f8dd2e4afaac89b1216a351d8c38c73fab8aaa875a4c478a781ea0455a7c8de0d7bfd67042210927cea4bd375936c0e7a659c4e666d AUX thin.confd-1 1106 SHA256 8da66b4cd3c51b7d811c9505bf306fa90ccc400569d4b77086a456f19edf7547 SHA512 7fa42fcafdc1a25eecdafd96b2fbf8555fa4f757a111fdb1927d92f19c320c915d3212cdb3edaf526b74e76cbcc246c417ec194ae1e1fc1b85c82eb62a1d5c76 WHIRLPOOL 1420d82903804c0106b633a0e0bf157b0c9e4d0f0ff2ca2f51072ca0263f1ade848d9030b4a9c872783e481e263c4bc46cc29d4085d60de9954c33271dd4649d +AUX thin.confd-2 1251 SHA256 36ade83707fa363434485e83ede77379fb55300f7e00a3b4bbc8f11cf1249c18 SHA512 b3e02dd2c13871068f47241a73ac4d9f0a98932fc263303913a48dbd5d4b95148dcdb7ebced7ac5f2d853e33c1a9214467375b72b3fbee0bc0354f97f96f6891 WHIRLPOOL 15bb001460aa34c03c1ebde665f0c17d50c491d9ee6ffba4d5462cd67ca3699ee4b0443ec2bbe730e736aa8d3cd9987a893d5c9a54ad11bcb9e18cba41eca83a 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 1757 SHA256 c6c31f79deea1c221e88fdcea3179ce8a5800435df59f1bc94ead94f1aea8a31 SHA512 61f7a3fbcd5dee394fa236e54120b018937385f16804562e22a72edefb00f556246bd615eaebf60592f350d71454e34fc8c60852e85eecbddb3a979151276cd0 WHIRLPOOL ec245e7a406d2424b5bcf9f99fe75811ab08c1fa0108b663d747217bbbcd1753719481f140ed96ee5aa6b34dde3ae47b7826e42d3f0d3cad3459d8914b532d16 DIST thin-1.5.1.tar.gz 176614 SHA256 523eb77709cc3427279df658f566a1c4eeaf85825ba2747f599eabf1fcb83bb3 SHA512 f691569eab296f4bcc11599da8c5a0715ce3b681dd616b09a9e245e67953e4f34e7a0a9a66d85b6cdef27ce3e9d569b09f21039802ccfeaf8d02c649b39356d8 WHIRLPOOL ee832d8a3ff3c1bbbc9d3dab414a1f6798445480e24df92afe39d0fdc14a27034e3dc1c3c12c7101866fdeb1f1b8f80b86c825e2a919593af495e059e7b85f57 EBUILD thin-1.5.1-r1.ebuild 2410 SHA256 aeafd7c9412856de7caa9675be3e26f49b190e1efec700349f0195262cb8b161 SHA512 60e2ca4bb87d503d9fc0d391c776fd97e13407ee25d19aed1e63c63782e4e596d9577fa0e000b6e175dbd341be31783543a5b63ae3f1ca3501c8193c5f0c61f8 WHIRLPOOL 8b0741efc4e5f6d4ab3c4993cc6a77f19c338f71858fe9254f3e20268651ce2703f78bdfbf99aa620b8a54cb2728092f390794d1c884dcf22612531d41731c1f EBUILD thin-1.5.1-r2.ebuild 2414 SHA256 b8e1c6d2d4d7a5cc9d0b89e7815e08889853b5dc9e560b3208c0b454daedfc1f SHA512 6ba93f9b11381b87cddde19d97df4b3455c22ca485990279c8ae71f64ba024e55acc6ce889ca8710d5a9f0d6c5739ccbdb043682ab06c740b6a6fa16a40b9bc9 WHIRLPOOL c5861a61ce1fc69c13d9a6514b8de1d2622da821596b34b7259ed32447ab95376c764a8a7a6e7abe0c40cadd740f8736bcfdea4a93889aa97aeb147a77014205 -MISC ChangeLog 3770 SHA256 8036eadc41153e2ea8dfbe1ebfa80feefa3ec6a6a19846e92e5e19f18ebcac99 SHA512 5b2293813ed71113d63a10f0d245aa775f245a6df55604b90c4251c785868917088cfbe34c07d966a48307f55c93b7579628cb5809b8dfb212f24c6046c4b381 WHIRLPOOL 43717736caf537e1944ada680776ea018da37335693bd55f31ec5bd3023112a2936014cbec919b7e2258fb125e8b026729a40674d1d37ef2dec22bcd3b7971f9 -MISC metadata.xml 498 SHA256 be6c64a4e6a09bda44c9f5013616d3d0e44fd9bdd3e71ac4c790b2a783723c71 SHA512 929d0634d139ed28bee6346f03949493666f2ed2362a629b3ca150d6947e67b9a0c8e38c194e923fee4797d84b573499c8f6680476fbb5256a75ed9e33b8354c WHIRLPOOL 6aac4a7f4b0f10febd139bae723825670ef2b46b6dceb0177ddda192738ae20680d8c9c926922ef13e27e126dd3e9858ff254ecfb32e79fd6a689346db4e6d2e +EBUILD thin-1.5.1-r3.ebuild 2412 SHA256 52fb1e9d49e7c0092c15d2e596593084ea4b8d7adcdd1732cba762983879092d SHA512 f9cea918850b43a719326134c758230091f5a4da8a86e6d638e9a2d805fbc3ed36c2c584b8692f4c97c380000cc50d26c6aacd5dcc11c548fe95180afefc1fff WHIRLPOOL dc151446091e7d086632cb8adc1d885947b81fb4ebc69d31203ffaaf98828869c82ac3813071c531bb40422ed1692499e4b2308e97293c984ba27d40eae71003 +MISC ChangeLog 4056 SHA256 b0cfb815222a0bbeaa5002ca04cfee643d58d30ee86eaa1cacd33f8bacb08c14 SHA512 09ebc3b7db8f2cbf2e09a4c0e3847686d11a96ac5f0b00895966042ac8a828e8b9004e6413f8a9180c431240f9ce6bd7efc38af3814d0446683810f447e8dcae WHIRLPOOL 69d2a568fdc2e54a351b2c675b4b24b06fd3bc6f9c5c716d0dd3cfbf2ce361dd96c71664fd2f2131b908912ec337c399974902346f7bcc26c3562b81a5bef97b +MISC metadata.xml 485 SHA256 d5a8e7b9abedd72e3437697cfcb37a206c72d633fa3ecd99d0f338ed87d2532d SHA512 e3867d5631b3cfc7dae8feed1d7ef5c8940069bfdf9c0c5d3e290ecddae567d5ef78889f7cdee0c6deffd53e43aaaa8b52dcb248f56e83c6da02babc87d8fd7a WHIRLPOOL 014077ced626f20092de567e74ed9a9b3df1245ae6f91fb8787295de2ede49031fc99346227935d529f05fe4a7cdec6e3a5e8151459272f33556c1c52ec91bfc -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.20 (GNU/Linux) +Version: GnuPG v2.0.19 (GNU/Linux) -iF4EAREIAAYFAlIHOVoACgkQiIP6VqMIqNeoiwEAjvbMJjt61pRnKuHgvhFdzNw4 -Z0VDzaJP7MS8DutxS50A/jelmCnI6X6/GfxwDaC1aBjl+jdzHtjFNPtCZcfloY/e -=YI+D +iEYEAREIAAYFAlKA53QACgkQTEkQYPgooqEqcwCfcwTuQ0qpxPLEK9rpr41rpl93 +9toAnjWn9gg9oSExxV8S0ZDfSIQFkl0Z +=b999 -----END PGP SIGNATURE----- diff --git a/www-servers/thin/files/thin.confd-2 b/www-servers/thin/files/thin.confd-2 new file mode 100644 index 000000000000..ca89c44cfd0e --- /dev/null +++ b/www-servers/thin/files/thin.confd-2 @@ -0,0 +1,39 @@ +# /etc/conf.d/thin: Configuration for /etc/init.d/thin* +# Copy this file to /etc/conf.d/thin.SERVERNAME for server specific options. + +# Set the configuration file location. +# In start-all mode (/etc/init.d/thin), this must point to the directory where +# all the thin configurations are located. +# When starting a specific server (/etc/init.d/thin.SERVER), point to the exact +# location of the .yml configuration file. +# CONFIG="/etc/thin/${SVCNAME#*.}.yml" + +# Disable looking for a configuration file. +# You can use THIN_OPTS instead for setting command line options. +# NOCONFIG=0 + +# Set the Ruby interpreter to use. +# RUBY="/usr/bin/ruby" + +# Whether to start thin using `bundle exec' +# DO_BUNDLER=0 + +# What directory to cd into before starting thin +# (useful for DO_BUNDLER) +# CHDIR= + +# Set the user for this instance. +# (Should mirror "user" value in /etc/thin/${SVCNAME#*.}.yml) +# THIN_USER= + +# Set the group for this instance. +# (Should mirror "group" value in /etc/thin/${SVCNAME#*.}.yml) +# THIN_GROUP= + +# Set the pidfile for this instance. +# (Should mirror "pid" value in /etc/thin/${SVCNAME#*.}.yml) +# THIN_PID= + +# Set command line options to pass to thin. +# In specific server mode, '--tag SERVER_NAME' is automatically appended. +# THIN_OPTS= diff --git a/www-servers/thin/files/thin.initd-2 b/www-servers/thin/files/thin.initd-2 new file mode 100644 index 000000000000..af87f0eb1692 --- /dev/null +++ b/www-servers/thin/files/thin.initd-2 @@ -0,0 +1,83 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/thin/files/thin.initd-2,v 1.1 2013/11/11 14:19:30 a3li 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} 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() { + checkpath -d -m 0775 -o ${THIN_USER}:${THIN_GROUP} $(dirname ${THIN_PID}) +} diff --git a/www-servers/thin/metadata.xml b/www-servers/thin/metadata.xml index 8fb3ff5e0bf0..e0cd5cb5157f 100644 --- a/www-servers/thin/metadata.xml +++ b/www-servers/thin/metadata.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> -<maintainer><email>maintainer-needed@gentoo.org</email></maintainer> +<maintainer><email>a3li@gentoo.org</email></maintainer> <herd>ruby</herd> <longdescription> Thin is a very simple web server written in Ruby. It's single-threaded, which diff --git a/www-servers/thin/thin-1.5.1-r3.ebuild b/www-servers/thin/thin-1.5.1-r3.ebuild new file mode 100644 index 000000000000..29f6a9095ef6 --- /dev/null +++ b/www-servers/thin/thin-1.5.1-r3.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/thin/thin-1.5.1-r3.ebuild,v 1.1 2013/11/11 14:19:30 a3li Exp $ + +EAPI=5 + +USE_RUBY="ruby18 ruby19" + +RUBY_FAKEGEM_TASK_TEST="spec" + +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="" + +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-0.12.6 + 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 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-2 ${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 +} |