1 |
commit: dd07e304958f28de7853f10ead8b241bee88c3a4 |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Sun Apr 19 21:51:23 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 13 13:16:46 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd07e304 |
7 |
|
8 |
www-apps/redmine: remove old versions |
9 |
|
10 |
Remove old versions (#717784) |
11 |
Bug: https://bugs.gentoo.org/717784 |
12 |
Package-Manager: Portage-2.3.89, Repoman-2.3.20 |
13 |
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> |
14 |
Closes: https://github.com/gentoo/gentoo/pull/15423 |
15 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
16 |
|
17 |
www-apps/redmine/Manifest | 1 - |
18 |
.../files/redmine-4.0.5_gemfile_versions.patch | 76 ------- |
19 |
www-apps/redmine/redmine-4.0.5-r1.ebuild | 228 --------------------- |
20 |
www-apps/redmine/redmine-4.0.5.ebuild | 224 -------------------- |
21 |
4 files changed, 529 deletions(-) |
22 |
|
23 |
diff --git a/www-apps/redmine/Manifest b/www-apps/redmine/Manifest |
24 |
index a23cf001f75..7c9d5ffd603 100644 |
25 |
--- a/www-apps/redmine/Manifest |
26 |
+++ b/www-apps/redmine/Manifest |
27 |
@@ -1,2 +1 @@ |
28 |
-DIST redmine-4.0.5.tar.gz 2519900 BLAKE2B ddc465f12030f3f672ea9bf6b825fd40344dcffd3b60907a42c4dbe57f209c54a12bbd3d59f886ff000ccbd43f6d1b9c1aacfbab653f2d81bb06d8d7189bd624 SHA512 a6aa3e2418fd83ed3783fc6644c339c54ebb1952b8c2c0be4b718fb296fdff64fb4116faa2c88f3e5c3c25d7c5b3c21cd7822ff9f99f6f67270e0b8b64053678 |
29 |
DIST redmine-4.1.1.tar.gz 2712056 BLAKE2B 767964ca455fdea081d3d409e91903367190ccce08474dd6c3bba8a3a89b7efd3846dbe1dd09039620591807dc44926744218f5db28a59ddb2da326a3f3f5b1d SHA512 fe691318fe8464de197a49ac172ecfcd65047ca62273226f63549620475557cd27cf8e193355a665abef64fc0c9e59556b4732cdcaa8061746918b06a7afcf81 |
30 |
|
31 |
diff --git a/www-apps/redmine/files/redmine-4.0.5_gemfile_versions.patch b/www-apps/redmine/files/redmine-4.0.5_gemfile_versions.patch |
32 |
deleted file mode 100644 |
33 |
index 46aebf2b825..00000000000 |
34 |
--- a/www-apps/redmine/files/redmine-4.0.5_gemfile_versions.patch |
35 |
+++ /dev/null |
36 |
@@ -1,76 +0,0 @@ |
37 |
-diff -Nuar redmine-4.0.5.orig/Gemfile redmine-4.0.5/Gemfile |
38 |
---- redmine-4.0.5.orig/Gemfile 2019-10-24 22:20:32.412728804 +0300 |
39 |
-+++ redmine-4.0.5/Gemfile 2019-10-24 22:27:40.356708042 +0300 |
40 |
-@@ -3,46 +3,45 @@ |
41 |
- gem "bundler", ">= 1.5.0" |
42 |
- |
43 |
- gem "rails", "5.2.3" |
44 |
--gem "rouge", "~> 3.3.0" |
45 |
-+gem "rouge", ">= 3.3.0" |
46 |
- gem "request_store", "1.0.5" |
47 |
--gem "mini_mime", "~> 1.0.1" |
48 |
-+gem "mini_mime", ">= 1.0.1" |
49 |
- gem "actionpack-xml_parser" |
50 |
--gem "roadie-rails", "~> 1.3.0" |
51 |
-+gem "roadie-rails", ">= 1.3.0" |
52 |
- gem "mimemagic" |
53 |
--gem "mail", "~> 2.7.1" |
54 |
--gem "csv", "~> 3.0.1" if RUBY_VERSION >= "2.3" && RUBY_VERSION < "2.6" |
55 |
-+gem "mail", ">= 2.7.1" |
56 |
- |
57 |
--gem "nokogiri", (RUBY_VERSION >= "2.3" ? "~> 1.10.0" : "~> 1.9.1") |
58 |
-+gem "nokogiri", (RUBY_VERSION >= "2.3" ? ">= 1.10.0" : "~> 1.9.1") |
59 |
- gem "i18n", "~> 0.7.0" |
60 |
- gem "xpath", "< 3.2.0" if RUBY_VERSION < "2.3" |
61 |
- |
62 |
- # TODO: Remove the following line when #32223 is fixed |
63 |
--gem "sprockets", "~> 3.7.2" |
64 |
-+gem "sprockets", ">= 3.7.2" |
65 |
- |
66 |
- # Windows does not include zoneinfo files, so bundle the tzinfo-data gem |
67 |
- gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] |
68 |
--gem "rbpdf", "~> 1.19.6" |
69 |
-+gem "rbpdf", ">= 1.19.6" |
70 |
- |
71 |
- # Optional gem for LDAP authentication |
72 |
- group :ldap do |
73 |
-- gem "net-ldap", "~> 0.16.0" |
74 |
-+ gem "net-ldap", ">= 0.16.0" |
75 |
- end |
76 |
- |
77 |
- # Optional gem for OpenID authentication |
78 |
- group :openid do |
79 |
-- gem "ruby-openid", "~> 2.9.2", :require => "openid" |
80 |
-+ gem "ruby-openid", ">= 2.9.2", :require => "openid" |
81 |
- gem "rack-openid" |
82 |
- end |
83 |
- |
84 |
- platforms :mri, :mingw, :x64_mingw do |
85 |
- # Optional gem for exporting the gantt to a PNG file, not supported with jruby |
86 |
- group :rmagick do |
87 |
-- gem "rmagick", "~> 2.16.0" |
88 |
-+ gem "rmagick", ">= 2.16.0" |
89 |
- end |
90 |
- |
91 |
- # Optional Markdown support, not for JRuby |
92 |
- group :markdown do |
93 |
-- gem "redcarpet", "~> 3.4.0" |
94 |
-+ gem "redcarpet", ">= 3.4.0" |
95 |
- end |
96 |
- end |
97 |
- |
98 |
-@@ -58,11 +57,11 @@ |
99 |
- adapters.each do |adapter| |
100 |
- case adapter |
101 |
- when 'mysql2' |
102 |
-- gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw] |
103 |
-+ gem "mysql2", ">= 0.5.0", :platforms => [:mri, :mingw, :x64_mingw] |
104 |
- when /postgresql/ |
105 |
-- gem "pg", "~> 1.1.4", :platforms => [:mri, :mingw, :x64_mingw] |
106 |
-+ gem "pg", ">= 1.1.4", :platforms => [:mri, :mingw, :x64_mingw] |
107 |
- when /sqlite3/ |
108 |
-- gem "sqlite3", "~>1.3.12", :platforms => [:mri, :mingw, :x64_mingw] |
109 |
-+ gem "sqlite3", ">= 1.3.12", :platforms => [:mri, :mingw, :x64_mingw] |
110 |
- when /sqlserver/ |
111 |
- gem "tiny_tds", "~> 1.0.5", :platforms => [:mri, :mingw, :x64_mingw] |
112 |
- gem "activerecord-sqlserver-adapter", :platforms => [:mri, :mingw, :x64_mingw] |
113 |
|
114 |
diff --git a/www-apps/redmine/redmine-4.0.5-r1.ebuild b/www-apps/redmine/redmine-4.0.5-r1.ebuild |
115 |
deleted file mode 100644 |
116 |
index b73f9df2d52..00000000000 |
117 |
--- a/www-apps/redmine/redmine-4.0.5-r1.ebuild |
118 |
+++ /dev/null |
119 |
@@ -1,228 +0,0 @@ |
120 |
-# Copyright 1999-2019 Gentoo Authors |
121 |
-# Distributed under the terms of the GNU General Public License v2 |
122 |
- |
123 |
-EAPI=6 |
124 |
- |
125 |
-USE_RUBY="ruby24" |
126 |
-inherit eutils depend.apache ruby-ng |
127 |
- |
128 |
-DESCRIPTION="Flexible project management web application using the Ruby on Rails framework" |
129 |
-HOMEPAGE="https://www.redmine.org/" |
130 |
-SRC_URI="https://www.redmine.org/releases/${P}.tar.gz" |
131 |
- |
132 |
-KEYWORDS="~amd64" |
133 |
-LICENSE="GPL-2" |
134 |
-SLOT="0" |
135 |
-IUSE="imagemagick fastcgi ldap markdown mysql passenger postgres sqlite" |
136 |
- |
137 |
-DEPS=" |
138 |
- fastcgi? ( dev-ruby/fcgi ) |
139 |
- imagemagick? ( dev-ruby/rmagick:0 ) |
140 |
- ldap? ( dev-ruby/ruby-net-ldap ) |
141 |
- markdown? ( >=dev-ruby/redcarpet-3.4.0 ) |
142 |
- mysql? ( >=dev-ruby/mysql2-0.5.0:0.5 ) |
143 |
- postgres? ( >=dev-ruby/pg-1.1.4:1 ) |
144 |
- sqlite? ( >=dev-ruby/sqlite3-1.3.12 ) |
145 |
- dev-ruby/actionpack-xml_parser:* |
146 |
- dev-ruby/i18n:0.7 |
147 |
- >=dev-ruby/mail-2.7.1 |
148 |
- dev-ruby/mimemagic |
149 |
- >=dev-ruby/mini_mime-1.0.1 |
150 |
- >=dev-ruby/nokogiri-1.10.0 |
151 |
- dev-ruby/rails:5.2 |
152 |
- >=dev-ruby/rbpdf-1.19.6 |
153 |
- dev-ruby/request_store:1.0.5 |
154 |
- >=dev-ruby/roadie-rails-1.3.0 |
155 |
- >=dev-ruby/rouge-3.6.0 |
156 |
- >=dev-ruby/ruby-openid-2.9.2 |
157 |
- dev-ruby/rack-openid |
158 |
-" |
159 |
- |
160 |
-ruby_add_rdepend "${DEPS}" |
161 |
-ruby_add_bdepend "${DEPS}" |
162 |
- |
163 |
-RDEPEND=" |
164 |
- acct-group/redmine |
165 |
- acct-user/redmine |
166 |
-" |
167 |
- |
168 |
-REDMINE_DIR="/var/lib/${PN}" |
169 |
- |
170 |
-all_ruby_prepare() { |
171 |
- rm -r log files/delete.me .github || die |
172 |
- |
173 |
- # bug #406605 |
174 |
- rm .{git,hg}ignore || die |
175 |
- |
176 |
- # newenvd not working here |
177 |
- cat > "${T}/50${PN}" <<-EOF || die |
178 |
- CONFIG_PROTECT="${EROOT%/}${REDMINE_DIR}/config" |
179 |
- CONFIG_PROTECT_MASK="${EROOT%/}${REDMINE_DIR}/config/locales ${EROOT%/}${REDMINE_DIR}/config/settings.yml" |
180 |
- EOF |
181 |
- |
182 |
- # Fixing versions in Gemfile |
183 |
- eapply "${FILESDIR}/${P}_gemfile_versions.patch" |
184 |
- |
185 |
- sed -i -e "/group :development do/,/end$/d" Gemfile || die |
186 |
- sed -i -e "/group :test do/,/end$/d" Gemfile || die |
187 |
- |
188 |
- if ! use imagemagick ; then |
189 |
- sed -i -e "/group :rmagick do/,/end$/d" Gemfile || die |
190 |
- fi |
191 |
- if ! use ldap ; then |
192 |
- # remove ldap stuff module if disabled to avoid #413779 |
193 |
- use ldap || rm app/models/auth_source_ldap.rb || die |
194 |
- sed -i -e "/group :ldap do/,/end$/d" Gemfile || die |
195 |
- fi |
196 |
- if ! use markdown ; then |
197 |
- sed -i -e "/group :markdown do/,/end$/d" Gemfile || die |
198 |
- fi |
199 |
-} |
200 |
- |
201 |
-all_ruby_install() { |
202 |
- dodoc doc/* README.rdoc |
203 |
- rm -r doc appveyor.yml CONTRIBUTING.md README.rdoc || die |
204 |
- |
205 |
- keepdir /var/log/${PN} |
206 |
- |
207 |
- # Additional dependency for Gemfile (#657156) |
208 |
- if use fastcgi; then |
209 |
- echo "gem \"fcgi\"" > Gemfile.local |
210 |
- fi |
211 |
- |
212 |
- insinto "${REDMINE_DIR}" |
213 |
- doins -r . |
214 |
- insinto "${REDMINE_DIR}/config" |
215 |
- doins "${FILESDIR}/additional_environment.rb" |
216 |
- keepdir "${REDMINE_DIR}/files" |
217 |
- keepdir "${REDMINE_DIR}/public/plugin_assets" |
218 |
- |
219 |
- fowners -R redmine:redmine \ |
220 |
- "${REDMINE_DIR}/config" \ |
221 |
- "${REDMINE_DIR}/files" \ |
222 |
- "${REDMINE_DIR}/public/plugin_assets" \ |
223 |
- "${REDMINE_DIR}/tmp" \ |
224 |
- /var/log/${PN} |
225 |
- |
226 |
- fowners redmine:redmine "${REDMINE_DIR}" |
227 |
- |
228 |
- # protect sensitive data, see bug #406605 |
229 |
- fperms -R go-rwx \ |
230 |
- "${REDMINE_DIR}/config" \ |
231 |
- "${REDMINE_DIR}/files" \ |
232 |
- "${REDMINE_DIR}/tmp" \ |
233 |
- /var/log/${PN} |
234 |
- |
235 |
- if use passenger; then |
236 |
- has_apache |
237 |
- insinto "${APACHE_VHOSTS_CONFDIR}" |
238 |
- doins "${FILESDIR}/10_redmine_vhost.conf" |
239 |
- fi |
240 |
- |
241 |
- # logrotate |
242 |
- insinto /etc/logrotate.d |
243 |
- newins "${FILESDIR}"/redmine.logrotate redmine |
244 |
- |
245 |
- newconfd "${FILESDIR}/${PN}.confd" ${PN} |
246 |
- newinitd "${FILESDIR}/${PN}-3.initd" ${PN} |
247 |
- doenvd "${T}/50${PN}" |
248 |
-} |
249 |
- |
250 |
-pkg_postinst() { |
251 |
- if [[ -e "${EROOT%/}${REDMINE_DIR}/config/initializers/session_store.rb" \ |
252 |
- || -e "${EROOT%/}${REDMINE_DIR}/config/initializers/secret_token.rb" ]] |
253 |
- then |
254 |
- elog "Execute the following command to upgrade environment:" |
255 |
- elog |
256 |
- elog "# emerge --config \"=${CATEGORY}/${PF}\"" |
257 |
- elog |
258 |
- elog "For upgrade instructions take a look at:" |
259 |
- elog "http://www.redmine.org/wiki/redmine/RedmineUpgrade" |
260 |
- else |
261 |
- elog "Execute the following command to initialize environment:" |
262 |
- elog |
263 |
- elog "# cd ${EROOT%/}${REDMINE_DIR}" |
264 |
- elog "# cp config/database.yml.example config/database.yml" |
265 |
- elog "# \${EDITOR} config/database.yml" |
266 |
- elog "# chown redmine:redmine config/database.yml" |
267 |
- elog "# emerge --config \"=${CATEGORY}/${PF}\"" |
268 |
- elog |
269 |
- elog "Installation notes are at official site" |
270 |
- elog "http://www.redmine.org/wiki/redmine/RedmineInstall" |
271 |
- fi |
272 |
-} |
273 |
- |
274 |
-pkg_config() { |
275 |
- # Remove old lock file |
276 |
- rm -f "${EROOT%/}${REDMINE_DIR}/Gemfile.lock" |
277 |
- |
278 |
- if [[ ! -e "${EROOT%/}${REDMINE_DIR}/config/database.yml" ]]; then |
279 |
- eerror "Copy ${EROOT%/}${REDMINE_DIR}/config/database.yml.example to" |
280 |
- eerror "${EROOT%/}${REDMINE_DIR}/config/database.yml then edit this" |
281 |
- eerror "file in order to configure your database settings for" |
282 |
- eerror "\"production\" environment." |
283 |
- die |
284 |
- fi |
285 |
- |
286 |
- local RAILS_ENV=${RAILS_ENV:-production} |
287 |
- if [[ ! -L /usr/bin/ruby ]]; then |
288 |
- eerror "/usr/bin/ruby is not a valid symlink to any ruby implementation." |
289 |
- eerror "Please update it via `eselect ruby`" |
290 |
- die |
291 |
- fi |
292 |
- if [[ $RUBY_TARGETS != *$( eselect ruby show | awk 'NR==2' | tr -d ' ' )* ]] |
293 |
- then |
294 |
- eerror "/usr/bin/ruby is currently not included in redmine's ruby targets:" |
295 |
- eerror "${RUBY_TARGETS}." |
296 |
- eerror "Please update it via `eselect ruby`" |
297 |
- die |
298 |
- fi |
299 |
- local RUBY=${RUBY:-ruby} |
300 |
- |
301 |
- cd "${EROOT%/}${REDMINE_DIR}" || die |
302 |
- if [[ -e "${EROOT%/}${REDMINE_DIR}/config/initializers/session_store.rb" ]] |
303 |
- then |
304 |
- einfo |
305 |
- einfo "Generating secret token." |
306 |
- einfo |
307 |
- rm config/initializers/session_store.rb || die |
308 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die |
309 |
- fi |
310 |
- if [[ -e "${EROOT%/}${REDMINE_DIR}/config/initializers/secret_token.rb" ]] |
311 |
- then |
312 |
- einfo |
313 |
- einfo "Upgrading database." |
314 |
- einfo |
315 |
- |
316 |
- einfo "Generating secret token." |
317 |
- # Migration from Redmine 2.x |
318 |
- rm config/initializers/secret_token.rb || die |
319 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die |
320 |
- |
321 |
- einfo "Migrating database." |
322 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die |
323 |
- einfo "Upgrading the plugin migrations." |
324 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:plugins:migrate || die |
325 |
- einfo "Clear the cache." |
326 |
- ${RUBY} -S rake tmp:cache:clear || die |
327 |
- else |
328 |
- einfo |
329 |
- einfo "Initializing database." |
330 |
- einfo |
331 |
- |
332 |
- einfo "Generating a session store secret." |
333 |
- ${RUBY} -S rake generate_secret_token || die |
334 |
- einfo "Creating the database structure." |
335 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die |
336 |
- einfo "Populating database with default configuration data." |
337 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:load_default_data || die |
338 |
- chown redmine:redmine -R "${EROOT%/}/var/log/redmine/" || die |
339 |
- einfo |
340 |
- einfo "If you use sqlite3, please do not forget to change the ownership" |
341 |
- einfo "of the sqlite files." |
342 |
- einfo |
343 |
- einfo "# cd \"${EROOT%/}${REDMINE_DIR}\"" |
344 |
- einfo "# chown redmine:redmine db/ db/*.sqlite3" |
345 |
- einfo |
346 |
- fi |
347 |
-} |
348 |
|
349 |
diff --git a/www-apps/redmine/redmine-4.0.5.ebuild b/www-apps/redmine/redmine-4.0.5.ebuild |
350 |
deleted file mode 100644 |
351 |
index 494fd300228..00000000000 |
352 |
--- a/www-apps/redmine/redmine-4.0.5.ebuild |
353 |
+++ /dev/null |
354 |
@@ -1,224 +0,0 @@ |
355 |
-# Copyright 1999-2019 Gentoo Authors |
356 |
-# Distributed under the terms of the GNU General Public License v2 |
357 |
- |
358 |
-EAPI=6 |
359 |
- |
360 |
-USE_RUBY="ruby24" |
361 |
-inherit eutils depend.apache ruby-ng |
362 |
- |
363 |
-DESCRIPTION="Flexible project management web application using the Ruby on Rails framework" |
364 |
-HOMEPAGE="https://www.redmine.org/" |
365 |
-SRC_URI="https://www.redmine.org/releases/${P}.tar.gz" |
366 |
- |
367 |
-KEYWORDS="~amd64" |
368 |
-LICENSE="GPL-2" |
369 |
-SLOT="0" |
370 |
-IUSE="imagemagick fastcgi ldap markdown mysql passenger postgres sqlite" |
371 |
- |
372 |
-ruby_add_rdepend " |
373 |
- imagemagick? ( dev-ruby/rmagick:0 ) |
374 |
- ldap? ( dev-ruby/ruby-net-ldap ) |
375 |
- markdown? ( >=dev-ruby/redcarpet-3.4.0 ) |
376 |
- mysql? ( >=dev-ruby/mysql2-0.5.0:0.5 ) |
377 |
- postgres? ( >=dev-ruby/pg-1.1.4:1 ) |
378 |
- sqlite? ( >=dev-ruby/sqlite3-1.3.12 ) |
379 |
- dev-ruby/actionpack-xml_parser:* |
380 |
- dev-ruby/i18n:0.7 |
381 |
- >=dev-ruby/mail-2.7.1 |
382 |
- dev-ruby/mimemagic |
383 |
- >=dev-ruby/mini_mime-1.0.1 |
384 |
- >=dev-ruby/nokogiri-1.10.0 |
385 |
- dev-ruby/rails:5.2 |
386 |
- >=dev-ruby/rbpdf-1.19.6 |
387 |
- dev-ruby/request_store:1.0.5 |
388 |
- >=dev-ruby/roadie-rails-1.3.0 |
389 |
- >=dev-ruby/rouge-3.6.0 |
390 |
- >=dev-ruby/ruby-openid-2.9.2 |
391 |
- dev-ruby/rack-openid |
392 |
-" |
393 |
- |
394 |
-RDEPEND=" |
395 |
- acct-group/redmine |
396 |
- acct-user/redmine |
397 |
-" |
398 |
- |
399 |
-REDMINE_DIR="/var/lib/${PN}" |
400 |
- |
401 |
-all_ruby_prepare() { |
402 |
- rm -r log files/delete.me .github || die |
403 |
- |
404 |
- # bug #406605 |
405 |
- rm .{git,hg}ignore || die |
406 |
- |
407 |
- # newenvd not working here |
408 |
- cat > "${T}/50${PN}" <<-EOF || die |
409 |
- CONFIG_PROTECT="${EROOT%/}${REDMINE_DIR}/config" |
410 |
- CONFIG_PROTECT_MASK="${EROOT%/}${REDMINE_DIR}/config/locales ${EROOT%/}${REDMINE_DIR}/config/settings.yml" |
411 |
- EOF |
412 |
- |
413 |
- # Fixing versions in Gemfile |
414 |
- eapply "${FILESDIR}/${P}_gemfile_versions.patch" |
415 |
- |
416 |
- sed -i -e "/group :development do/,/end$/d" Gemfile || die |
417 |
- sed -i -e "/group :test do/,/end$/d" Gemfile || die |
418 |
- |
419 |
- if ! use imagemagick ; then |
420 |
- sed -i -e "/group :rmagick do/,/end$/d" Gemfile || die |
421 |
- fi |
422 |
- if ! use ldap ; then |
423 |
- # remove ldap stuff module if disabled to avoid #413779 |
424 |
- use ldap || rm app/models/auth_source_ldap.rb || die |
425 |
- sed -i -e "/group :ldap do/,/end$/d" Gemfile || die |
426 |
- fi |
427 |
- if ! use markdown ; then |
428 |
- sed -i -e "/group :markdown do/,/end$/d" Gemfile || die |
429 |
- fi |
430 |
-} |
431 |
- |
432 |
-all_ruby_install() { |
433 |
- dodoc doc/* README.rdoc |
434 |
- rm -r doc appveyor.yml CONTRIBUTING.md README.rdoc || die |
435 |
- |
436 |
- keepdir /var/log/${PN} |
437 |
- |
438 |
- # Additional dependency for Gemfile (#657156) |
439 |
- if use fastcgi; then |
440 |
- echo "gem \"fcgi\"" > Gemfile.local |
441 |
- fi |
442 |
- |
443 |
- insinto "${REDMINE_DIR}" |
444 |
- doins -r . |
445 |
- insinto "${REDMINE_DIR}/config" |
446 |
- doins "${FILESDIR}/additional_environment.rb" |
447 |
- keepdir "${REDMINE_DIR}/files" |
448 |
- keepdir "${REDMINE_DIR}/public/plugin_assets" |
449 |
- |
450 |
- fowners -R redmine:redmine \ |
451 |
- "${REDMINE_DIR}/config" \ |
452 |
- "${REDMINE_DIR}/files" \ |
453 |
- "${REDMINE_DIR}/public/plugin_assets" \ |
454 |
- "${REDMINE_DIR}/tmp" \ |
455 |
- /var/log/${PN} |
456 |
- |
457 |
- fowners redmine:redmine "${REDMINE_DIR}" |
458 |
- |
459 |
- # protect sensitive data, see bug #406605 |
460 |
- fperms -R go-rwx \ |
461 |
- "${REDMINE_DIR}/config" \ |
462 |
- "${REDMINE_DIR}/files" \ |
463 |
- "${REDMINE_DIR}/tmp" \ |
464 |
- /var/log/${PN} |
465 |
- |
466 |
- if use passenger; then |
467 |
- has_apache |
468 |
- insinto "${APACHE_VHOSTS_CONFDIR}" |
469 |
- doins "${FILESDIR}/10_redmine_vhost.conf" |
470 |
- fi |
471 |
- |
472 |
- # logrotate |
473 |
- insinto /etc/logrotate.d |
474 |
- newins "${FILESDIR}"/redmine.logrotate redmine |
475 |
- |
476 |
- newconfd "${FILESDIR}/${PN}.confd" ${PN} |
477 |
- newinitd "${FILESDIR}/${PN}-3.initd" ${PN} |
478 |
- doenvd "${T}/50${PN}" |
479 |
-} |
480 |
- |
481 |
-pkg_postinst() { |
482 |
- if [[ -e "${EROOT%/}${REDMINE_DIR}/config/initializers/session_store.rb" \ |
483 |
- || -e "${EROOT%/}${REDMINE_DIR}/config/initializers/secret_token.rb" ]] |
484 |
- then |
485 |
- elog "Execute the following command to upgrade environment:" |
486 |
- elog |
487 |
- elog "# emerge --config \"=${CATEGORY}/${PF}\"" |
488 |
- elog |
489 |
- elog "For upgrade instructions take a look at:" |
490 |
- elog "http://www.redmine.org/wiki/redmine/RedmineUpgrade" |
491 |
- else |
492 |
- elog "Execute the following command to initialize environment:" |
493 |
- elog |
494 |
- elog "# cd ${EROOT%/}${REDMINE_DIR}" |
495 |
- elog "# cp config/database.yml.example config/database.yml" |
496 |
- elog "# \${EDITOR} config/database.yml" |
497 |
- elog "# chown redmine:redmine config/database.yml" |
498 |
- elog "# emerge --config \"=${CATEGORY}/${PF}\"" |
499 |
- elog |
500 |
- elog "Installation notes are at official site" |
501 |
- elog "http://www.redmine.org/wiki/redmine/RedmineInstall" |
502 |
- fi |
503 |
-} |
504 |
- |
505 |
-pkg_config() { |
506 |
- # Remove old lock file |
507 |
- rm -f "${EROOT%/}${REDMINE_DIR}/Gemfile.lock" |
508 |
- |
509 |
- if [[ ! -e "${EROOT%/}${REDMINE_DIR}/config/database.yml" ]]; then |
510 |
- eerror "Copy ${EROOT%/}${REDMINE_DIR}/config/database.yml.example to" |
511 |
- eerror "${EROOT%/}${REDMINE_DIR}/config/database.yml then edit this" |
512 |
- eerror "file in order to configure your database settings for" |
513 |
- eerror "\"production\" environment." |
514 |
- die |
515 |
- fi |
516 |
- |
517 |
- local RAILS_ENV=${RAILS_ENV:-production} |
518 |
- if [[ ! -L /usr/bin/ruby ]]; then |
519 |
- eerror "/usr/bin/ruby is not a valid symlink to any ruby implementation." |
520 |
- eerror "Please update it via `eselect ruby`" |
521 |
- die |
522 |
- fi |
523 |
- if [[ $RUBY_TARGETS != *$( eselect ruby show | awk 'NR==2' | tr -d ' ' )* ]] |
524 |
- then |
525 |
- eerror "/usr/bin/ruby is currently not included in redmine's ruby targets:" |
526 |
- eerror "${RUBY_TARGETS}." |
527 |
- eerror "Please update it via `eselect ruby`" |
528 |
- die |
529 |
- fi |
530 |
- local RUBY=${RUBY:-ruby} |
531 |
- |
532 |
- cd "${EROOT%/}${REDMINE_DIR}" || die |
533 |
- if [[ -e "${EROOT%/}${REDMINE_DIR}/config/initializers/session_store.rb" ]] |
534 |
- then |
535 |
- einfo |
536 |
- einfo "Generating secret token." |
537 |
- einfo |
538 |
- rm config/initializers/session_store.rb || die |
539 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die |
540 |
- fi |
541 |
- if [[ -e "${EROOT%/}${REDMINE_DIR}/config/initializers/secret_token.rb" ]] |
542 |
- then |
543 |
- einfo |
544 |
- einfo "Upgrading database." |
545 |
- einfo |
546 |
- |
547 |
- einfo "Generating secret token." |
548 |
- # Migration from Redmine 2.x |
549 |
- rm config/initializers/secret_token.rb || die |
550 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die |
551 |
- |
552 |
- einfo "Migrating database." |
553 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die |
554 |
- einfo "Upgrading the plugin migrations." |
555 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:plugins:migrate || die |
556 |
- einfo "Clear the cache." |
557 |
- ${RUBY} -S rake tmp:cache:clear || die |
558 |
- else |
559 |
- einfo |
560 |
- einfo "Initializing database." |
561 |
- einfo |
562 |
- |
563 |
- einfo "Generating a session store secret." |
564 |
- ${RUBY} -S rake generate_secret_token || die |
565 |
- einfo "Creating the database structure." |
566 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die |
567 |
- einfo "Populating database with default configuration data." |
568 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:load_default_data || die |
569 |
- chown redmine:redmine -R "${EROOT%/}/var/log/redmine/" || die |
570 |
- einfo |
571 |
- einfo "If you use sqlite3, please do not forget to change the ownership" |
572 |
- einfo "of the sqlite files." |
573 |
- einfo |
574 |
- einfo "# cd \"${EROOT%/}${REDMINE_DIR}\"" |
575 |
- einfo "# chown redmine:redmine db/ db/*.sqlite3" |
576 |
- einfo |
577 |
- fi |
578 |
-} |