Gentoo Archives: gentoo-commits

From: Alessandro Barbieri <lssndrbarbieri@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: www-servers/thin/, www-servers/thin/files/
Date: Thu, 02 Sep 2021 02:28:27
Message-Id: 1630549695.064ab08e7ff8dd3ade8df9c7886bc68c20d786ae.Alessandro-Barbieri@gentoo
1 commit: 064ab08e7ff8dd3ade8df9c7886bc68c20d786ae
2 Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
3 AuthorDate: Thu Sep 2 02:28:15 2021 +0000
4 Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
5 CommitDate: Thu Sep 2 02:28:15 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=064ab08e
7
8 www-servers/thin: treeclean
9
10 Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
11
12 www-servers/thin/Manifest | 1 -
13 www-servers/thin/files/thin.confd-2 | 39 ----------------
14 www-servers/thin/files/thin.initd-r4 | 87 -----------------------------------
15 www-servers/thin/metadata.xml | 8 ----
16 www-servers/thin/thin-1.8.0.ebuild | 89 ------------------------------------
17 5 files changed, 224 deletions(-)
18
19 diff --git a/www-servers/thin/Manifest b/www-servers/thin/Manifest
20 deleted file mode 100644
21 index 4f6c5df88..000000000
22 --- a/www-servers/thin/Manifest
23 +++ /dev/null
24 @@ -1 +0,0 @@
25 -DIST thin-1.8.0.tar.gz 181199 BLAKE2B d6e818d3d0c077ee54c8293e66f176e6c4d421af8fd906220371b84791bde8738aa252517582a52f898e0e6e8bc796deb1d31371ac1ebb0d56bfd40c31594175 SHA512 3166dbefcb4900a4cb839c8e3a36c5e27734980f8516547beb1732d446dd14e64b02936564cc5fe20b20c926185ca6a0114e6b246f038104a4891522e490d97f
26
27 diff --git a/www-servers/thin/files/thin.confd-2 b/www-servers/thin/files/thin.confd-2
28 deleted file mode 100644
29 index ca89c44cf..000000000
30 --- a/www-servers/thin/files/thin.confd-2
31 +++ /dev/null
32 @@ -1,39 +0,0 @@
33 -# /etc/conf.d/thin: Configuration for /etc/init.d/thin*
34 -# Copy this file to /etc/conf.d/thin.SERVERNAME for server specific options.
35 -
36 -# Set the configuration file location.
37 -# In start-all mode (/etc/init.d/thin), this must point to the directory where
38 -# all the thin configurations are located.
39 -# When starting a specific server (/etc/init.d/thin.SERVER), point to the exact
40 -# location of the .yml configuration file.
41 -# CONFIG="/etc/thin/${SVCNAME#*.}.yml"
42 -
43 -# Disable looking for a configuration file.
44 -# You can use THIN_OPTS instead for setting command line options.
45 -# NOCONFIG=0
46 -
47 -# Set the Ruby interpreter to use.
48 -# RUBY="/usr/bin/ruby"
49 -
50 -# Whether to start thin using `bundle exec'
51 -# DO_BUNDLER=0
52 -
53 -# What directory to cd into before starting thin
54 -# (useful for DO_BUNDLER)
55 -# CHDIR=
56 -
57 -# Set the user for this instance.
58 -# (Should mirror "user" value in /etc/thin/${SVCNAME#*.}.yml)
59 -# THIN_USER=
60 -
61 -# Set the group for this instance.
62 -# (Should mirror "group" value in /etc/thin/${SVCNAME#*.}.yml)
63 -# THIN_GROUP=
64 -
65 -# Set the pidfile for this instance.
66 -# (Should mirror "pid" value in /etc/thin/${SVCNAME#*.}.yml)
67 -# THIN_PID=
68 -
69 -# Set command line options to pass to thin.
70 -# In specific server mode, '--tag SERVER_NAME' is automatically appended.
71 -# THIN_OPTS=
72
73 diff --git a/www-servers/thin/files/thin.initd-r4 b/www-servers/thin/files/thin.initd-r4
74 deleted file mode 100644
75 index 9885a830e..000000000
76 --- a/www-servers/thin/files/thin.initd-r4
77 +++ /dev/null
78 @@ -1,87 +0,0 @@
79 -#!/sbin/openrc-run
80 -# Copyright 1999-2016 Gentoo Foundation
81 -# Distributed under the terms of the GNU General Public License v2
82 -
83 -SERVER=${SVCNAME#*.}
84 -if [ ${SERVER} != thin ]; then
85 - CONFIG=${CONFIG:-/etc/thin/${SERVER}.yml}
86 -else
87 - CONFIG=${CONFIG:-/etc/thin/}
88 -fi
89 -NOCONFIG=${NOCONFIG:-0}
90 -RUBY=${RUBY:-/usr/bin/ruby}
91 -DO_BUNDLER=${DO_BUNDLER:-0}
92 -CHDIR=${CHDIR:-}
93 -THIN_USER=${THIN_USER:-root}
94 -THIN_GROUP=${THIN_GROUP:-root}
95 -THIN_PID=${THIN_PID:-/var/run/thin/thin.pid}
96 -THIN_OPTS=${THIN_OPTS:-}
97 -
98 -depend() {
99 - need localmount
100 -}
101 -
102 -checkconfig() {
103 - if [ -n ${CHDIR} ]; then
104 - cd "${CHDIR}"
105 -
106 - if [ $? -ne 0 ]; then
107 - eerror "Cannot cd into requested directory"
108 - return 1
109 - fi
110 - fi
111 -
112 - [ ${SERVER} = thin -o ${NOCONFIG} != 0 ] && return 0
113 -
114 - if [ ! -f ${CONFIG} ]; then
115 - eerror "Unable to find the server configuration."
116 - eerror "Please set the CONFIG variable in /etc/conf.d/${SVCNAME} or"
117 - eerror "set NOCONFIG there to 1 to disable looking for a config file."
118 - return 1
119 - fi
120 -}
121 -
122 -buildargs() {
123 - if [ ${NOCONFIG} = 0 -a ${SERVER} != thin ]; then
124 - echo -n "-C ${CONFIG} "
125 - fi
126 -
127 - echo -n "${THIN_OPTS}"
128 -}
129 -
130 -action() {
131 - checkconfig || return 1
132 -
133 - [ ${DO_BUNDLER} -ne 0 ] && RUBY="${RUBY} /usr/bin/bundle exec"
134 -
135 - if [ ${SERVER} = thin ]; then
136 - ebegin "$2 all thin servers in ${CONFIG}"
137 - ${RUBY} /usr/bin/thin $1 $(buildargs) --all ${CONFIG}
138 - eend $?
139 - else
140 - ebegin "$2 thin server ${SERVER}"
141 - ${RUBY} /usr/bin/thin $(buildargs) --tag ${SERVER} $1
142 - eend $?
143 - fi
144 -}
145 -
146 -start() {
147 - action start 'Starting'
148 -}
149 -
150 -stop() {
151 - action stop 'Stopping'
152 -}
153 -
154 -restart() {
155 - action restart 'Restarting'
156 -}
157 -
158 -start_pre() {
159 - # If the path to the pidfile is /var/run/thin/foo/thin.pid
160 - # then checkpath will fail if /var/run/thin/ does not exist.
161 - # This caught infra...
162 - d=$(dirname ${THIN_PID})
163 - mkdir -p "$d"
164 - checkpath -d -m 0775 -o ${THIN_USER}:${THIN_GROUP} "$d"
165 -}
166
167 diff --git a/www-servers/thin/metadata.xml b/www-servers/thin/metadata.xml
168 deleted file mode 100644
169 index 55b9e5038..000000000
170 --- a/www-servers/thin/metadata.xml
171 +++ /dev/null
172 @@ -1,8 +0,0 @@
173 -<?xml version="1.0" encoding="UTF-8"?>
174 -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
175 -<pkgmetadata>
176 - <maintainer type="person">
177 - <email>andrea.postiglione@×××××.com</email>
178 - <name>Andrea Postiglione</name>
179 - </maintainer>
180 -</pkgmetadata>
181
182 diff --git a/www-servers/thin/thin-1.8.0.ebuild b/www-servers/thin/thin-1.8.0.ebuild
183 deleted file mode 100644
184 index d1d45d546..000000000
185 --- a/www-servers/thin/thin-1.8.0.ebuild
186 +++ /dev/null
187 @@ -1,89 +0,0 @@
188 -# Copyright 2020-2021 Gentoo Authors
189 -# Distributed under the terms of the GNU General Public License v2
190 -
191 -EAPI=7
192 -
193 -RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
194 -RUBY_FAKEGEM_RECIPE_TEST="rspec3"
195 -USE_RUBY="ruby26"
196 -
197 -inherit ruby-fakegem
198 -
199 -DESCRIPTION="This a Ruby gem that delivers a thin and fast web server"
200 -HOMEPAGE="https://github.com/macournoyer/thin"
201 -SRC_URI="https://github.com/macournoyer/thin/archive/v${PV}.tar.gz -> ${P}.tar.gz"
202 -
203 -LICENSE="Ruby"
204 -SLOT="0"
205 -KEYWORDS="~amd64 ~x86"
206 -IUSE="doc test"
207 -
208 -ruby_add_depend "
209 - dev-ruby/eventmachine
210 - dev-ruby/daemons
211 - dev-ruby/rack
212 -"
213 -
214 -all_ruby_prepare() {
215 - # Fix Ragel-based parser generation (uses a *very* old syntax that
216 - # is not supported in Gentoo)
217 - sed -i -e 's: | rlgen-cd::' Rakefile || die
218 -
219 - # Fix specs' dependencies so that the extension is not rebuilt
220 - # when running tests
221 - rm tasks/spec.rake || die
222 -
223 - # Fix rspec version to allow newer 2.x versions
224 - sed -i -e '/gem "rspec"/ s/1.2.9/2.0/' spec/spec_helper.rb || die
225 -
226 - # Avoid CLEAN since it may not be available and we don't need it.
227 - sed -i -e '/CLEAN/ s:^:#:' tasks/*.rake || die
228 -
229 - # Disable a test that is known for freezing the testsuite,
230 - # reported upstream. In thin 1.5.1 this just fails.
231 - sed -i \
232 - -e '/should force kill process in pid file/,/^ end/ s:^:#:' \
233 - spec/daemonizing_spec.rb || die
234 -
235 - sed -i \
236 - -e '/tracing routines (with NO custom logger)/,/^ end/ s:^:#:'\
237 - spec/logging_spec.rb || die
238 -
239 - # Remove failing perfomance tests
240 - rm -r spec/perf || die
241 -
242 - sed -i -e "s/Spec::Runner/Rspec/" spec/spec_helper.rb || die
243 - # nasty but too complex to fix up for now :(
244 - if ! use doc; then
245 - rm tasks/rdoc.rake || die
246 - fi
247 -}
248 -
249 -each_ruby_configure() {
250 - ${RUBY} -Cext/thin_parser extconf.rb || die
251 -}
252 -
253 -each_ruby_compile() {
254 - emake V=1 CFLAGS="${CFLAGS} -fPIC" DLDFLAGS="${LDFLAGS}" -Cext/thin_parser
255 - cp ext/thin_parser/thin_parser.so lib/ || die
256 -}
257 -
258 -all_ruby_install() {
259 - ruby_fakegem_binwrapper thin
260 -}
261 -
262 -all_ruby_install() {
263 - all_fakegem_install
264 -
265 - keepdir /etc/thin
266 - newinitd "${FILESDIR}/${PN}.initd-r4" "${PN}"
267 - newconfd "${FILESDIR}/${PN}.confd-2" "${PN}"
268 -
269 - einfo
270 - elog "Thin is now shipped with init scripts."
271 - elog "The default script (/etc/init.d/thin) will start all servers that have"
272 - elog "configuration files in /etc/thin/. You can symlink the init script to"
273 - elog "files of the format 'thin.SERVER' to be able to start individual servers."
274 - elog "See /etc/conf.d/thin for more configuration options."
275 - einfo
276 -}