1 |
commit: 9e3cd037131f18b31af0ac8b32aa59816d35b27c |
2 |
Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Sep 28 10:59:51 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 28 20:51:43 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9e3cd037 |
7 |
|
8 |
www-apps/redmine: remove old vulnerable version |
9 |
|
10 |
Bug: https://bugs.gentoo.org/786561 |
11 |
Bug: https://bugs.gentoo.org/806842 |
12 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
13 |
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> |
14 |
Closes: https://github.com/gentoo/gentoo/pull/22429 |
15 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
16 |
|
17 |
www-apps/redmine/Manifest | 1 - |
18 |
www-apps/redmine/redmine-4.1.2.ebuild | 231 ---------------------------------- |
19 |
2 files changed, 232 deletions(-) |
20 |
|
21 |
diff --git a/www-apps/redmine/Manifest b/www-apps/redmine/Manifest |
22 |
index f9c323ebe59..429e25eb863 100644 |
23 |
--- a/www-apps/redmine/Manifest |
24 |
+++ b/www-apps/redmine/Manifest |
25 |
@@ -1,3 +1,2 @@ |
26 |
-DIST redmine-4.1.2.tar.gz 2719030 BLAKE2B a169d024a76dc0b592a71da55e785152ba1cdb2203a864cff905571f1eae350d77e6955d819c660379e3e7b539664bf77a21f0f91ed5c4299f173221e763859c SHA512 a7ed547e8907d98c16c9d7c775fa3fcdb322d3e4494a1e5467cbc37c9710f04b9d5121fbdd9d8444b2028f7c8a842237ccc9d1b62c066c26bdc150cf408afb3b |
27 |
DIST redmine-4.1.4.tar.gz 2720709 BLAKE2B 9e0c2b990248c9000fd6062e3928bf4bc8e8043e0d9ceff13d5000da824cde027090121ce3a8be2f5d92eedb97b91629fb8b681ae5e380459fdb97904abd9b98 SHA512 93e46f2ed220c05b83b7bab34327891a7f05a46a01c6cbfc1a5c9bf18613e308d94d84fc3158a8bb7af740b8792448d935bc9d29795ee341bca577c82ac0619b |
28 |
DIST redmine-4.2.2.tar.gz 3038398 BLAKE2B 995179b6a5f75548525912dc20b4c0ded8709a12d6eb84873d899b20cf3b83469af7f14713187cce8ec720be4d501a9e7e890e1f38cbe2b118041dc91f555f53 SHA512 71155358ca68d9eb5bf6b79e26202c29ba3355d499662bfe659ff1672625a25d91694d5f1e4bb8db18456642470244aca914efe4456adef2850b70ff7eb216b2 |
29 |
|
30 |
diff --git a/www-apps/redmine/redmine-4.1.2.ebuild b/www-apps/redmine/redmine-4.1.2.ebuild |
31 |
deleted file mode 100644 |
32 |
index 6225d28927a..00000000000 |
33 |
--- a/www-apps/redmine/redmine-4.1.2.ebuild |
34 |
+++ /dev/null |
35 |
@@ -1,231 +0,0 @@ |
36 |
-# Copyright 1999-2021 Gentoo Authors |
37 |
-# Distributed under the terms of the GNU General Public License v2 |
38 |
- |
39 |
-EAPI=7 |
40 |
- |
41 |
-USE_RUBY="ruby25 ruby26" |
42 |
-inherit depend.apache ruby-ng |
43 |
- |
44 |
-DESCRIPTION="Flexible project management web application using the Ruby on Rails framework" |
45 |
-HOMEPAGE="https://www.redmine.org/" |
46 |
-SRC_URI="https://www.redmine.org/releases/${P}.tar.gz" |
47 |
- |
48 |
-KEYWORDS="~amd64" |
49 |
-LICENSE="GPL-2" |
50 |
-SLOT="0" |
51 |
-IUSE="imagemagick fastcgi ldap markdown mysql passenger postgres sqlite" |
52 |
- |
53 |
-DEPS=" |
54 |
- fastcgi? ( dev-ruby/fcgi ) |
55 |
- imagemagick? ( dev-ruby/mini_magick ) |
56 |
- ldap? ( dev-ruby/ruby-net-ldap ) |
57 |
- markdown? ( >=dev-ruby/redcarpet-3.5.1 ) |
58 |
- mysql? ( >=dev-ruby/mysql2-0.5.0:0.5 ) |
59 |
- passenger? ( www-apache/passenger ) |
60 |
- postgres? ( >=dev-ruby/pg-1.1.4:1 ) |
61 |
- sqlite? ( >=dev-ruby/sqlite3-1.4.0 ) |
62 |
- dev-ruby/actionpack-xml_parser:2 |
63 |
- >=dev-ruby/i18n-1.6.0:1 |
64 |
- >=dev-ruby/mail-2.7.1 |
65 |
- dev-ruby/mimemagic |
66 |
- >=dev-ruby/mini_mime-1.0.1 |
67 |
- >=dev-ruby/nokogiri-1.11.0 |
68 |
- dev-ruby/rails:5.2 |
69 |
- >=dev-ruby/rbpdf-1.20.0 |
70 |
- dev-ruby/request_store:0 |
71 |
- >=dev-ruby/roadie-rails-2.1.0 |
72 |
- >=dev-ruby/rouge-3.12.0 |
73 |
- >=dev-ruby/ruby-openid-2.9.2 |
74 |
- dev-ruby/rack-openid |
75 |
-" |
76 |
- |
77 |
-ruby_add_bdepend "${DEPS}" |
78 |
- |
79 |
-RDEPEND=" |
80 |
- acct-group/redmine |
81 |
- acct-user/redmine |
82 |
-" |
83 |
- |
84 |
-REDMINE_DIR="/var/lib/${PN}" |
85 |
- |
86 |
-all_ruby_prepare() { |
87 |
- rm -fr log files/delete.me .github || die |
88 |
- |
89 |
- # bug #406605 |
90 |
- rm .{git,hg}ignore || die |
91 |
- |
92 |
- # newenvd not working here |
93 |
- cat > "${T}/50${PN}" <<-EOF || die |
94 |
- CONFIG_PROTECT="${EROOT}/${REDMINE_DIR}/config" |
95 |
- CONFIG_PROTECT_MASK="${EROOT}/${REDMINE_DIR}/config/locales ${EROOT}/${REDMINE_DIR}/config/settings.yml" |
96 |
- EOF |
97 |
- |
98 |
- # Fixing versions in Gemfile |
99 |
- sed -i -e "s/~>/>=/g" Gemfile || die |
100 |
- # bug #724464 |
101 |
- sed -i -e "s/gem 'rails',.*/gem 'rails', '~>5.2.4'/" Gemfile || die |
102 |
- |
103 |
- sed -i -e "/csv/d" Gemfile || die |
104 |
- sed -i -e "/group :development do/,/end$/d" Gemfile || die |
105 |
- sed -i -e "/group :test do/,/end$/d" Gemfile || die |
106 |
- |
107 |
- if ! use imagemagick ; then |
108 |
- sed -i -e "/group :minimagick do/,/end$/d" Gemfile || die |
109 |
- fi |
110 |
- if ! use ldap ; then |
111 |
- # remove ldap stuff module if disabled to avoid #413779 |
112 |
- use ldap || rm app/models/auth_source_ldap.rb || die |
113 |
- sed -i -e "/group :ldap do/,/end$/d" Gemfile || die |
114 |
- fi |
115 |
- if ! use markdown ; then |
116 |
- sed -i -e "/group :markdown do/,/end$/d" Gemfile || die |
117 |
- fi |
118 |
- # Additional dependency for Gemfile (#657156) |
119 |
- if use fastcgi; then |
120 |
- echo "gem 'fcgi'" > Gemfile.local |
121 |
- fi |
122 |
-} |
123 |
- |
124 |
-all_ruby_install() { |
125 |
- dodoc doc/* README.rdoc |
126 |
- rm -r doc appveyor.yml CONTRIBUTING.md README.rdoc || die |
127 |
- |
128 |
- keepdir /var/log/${PN} |
129 |
- |
130 |
- insinto "${REDMINE_DIR}" |
131 |
- doins -r . |
132 |
- insinto "${REDMINE_DIR}/config" |
133 |
- doins "${FILESDIR}/additional_environment.rb" |
134 |
- keepdir "${REDMINE_DIR}/files" |
135 |
- keepdir "${REDMINE_DIR}/public/plugin_assets" |
136 |
- |
137 |
- fowners -R redmine:redmine \ |
138 |
- "${REDMINE_DIR}/config.ru" \ |
139 |
- "${REDMINE_DIR}/config" \ |
140 |
- "${REDMINE_DIR}/files" \ |
141 |
- "${REDMINE_DIR}/public/plugin_assets" \ |
142 |
- "${REDMINE_DIR}/tmp" \ |
143 |
- /var/log/${PN} |
144 |
- |
145 |
- fowners redmine:redmine "${REDMINE_DIR}" |
146 |
- |
147 |
- # protect sensitive data, see bug #406605 |
148 |
- fperms -R go-rwx \ |
149 |
- "${REDMINE_DIR}/config" \ |
150 |
- "${REDMINE_DIR}/files" \ |
151 |
- "${REDMINE_DIR}/tmp" \ |
152 |
- /var/log/${PN} |
153 |
- |
154 |
- if use passenger; then |
155 |
- has_apache |
156 |
- insinto "${APACHE_VHOSTS_CONFDIR}" |
157 |
- doins "${FILESDIR}/10_redmine_vhost.conf" |
158 |
- fi |
159 |
- |
160 |
- # logrotate |
161 |
- insinto /etc/logrotate.d |
162 |
- newins "${FILESDIR}"/redmine.logrotate redmine |
163 |
- |
164 |
- newconfd "${FILESDIR}/${PN}.confd" ${PN} |
165 |
- newinitd "${FILESDIR}/${PN}-3.initd" ${PN} |
166 |
- doenvd "${T}/50${PN}" |
167 |
-} |
168 |
- |
169 |
-pkg_postinst() { |
170 |
- if [[ -e "${EROOT}/${REDMINE_DIR}/config/initializers/session_store.rb" \ |
171 |
- || -e "${EROOT}/${REDMINE_DIR}/config/initializers/secret_token.rb" ]] |
172 |
- then |
173 |
- elog "Execute the following command to upgrade environment:" |
174 |
- elog |
175 |
- elog "# emerge --config \"=${CATEGORY}/${PF}\"" |
176 |
- elog |
177 |
- elog "For upgrade instructions take a look at:" |
178 |
- elog "http://www.redmine.org/wiki/redmine/RedmineUpgrade" |
179 |
- else |
180 |
- elog "Execute the following command to initialize environment:" |
181 |
- elog |
182 |
- elog "# cd ${EROOT}/${REDMINE_DIR}" |
183 |
- elog "# cp config/database.yml.example config/database.yml" |
184 |
- elog "# \${EDITOR} config/database.yml" |
185 |
- elog "# chown redmine:redmine config/database.yml" |
186 |
- elog "# emerge --config \"=${CATEGORY}/${PF}\"" |
187 |
- elog |
188 |
- elog "Installation notes are at official site" |
189 |
- elog "http://www.redmine.org/wiki/redmine/RedmineInstall" |
190 |
- fi |
191 |
-} |
192 |
- |
193 |
-pkg_config() { |
194 |
- # Remove old lock file |
195 |
- rm -f "${EROOT}/${REDMINE_DIR}/Gemfile.lock" |
196 |
- |
197 |
- if [[ ! -e "${EROOT}/${REDMINE_DIR}/config/database.yml" ]]; then |
198 |
- eerror "Copy ${EROOT}/${REDMINE_DIR}/config/database.yml.example to" |
199 |
- eerror "${EROOT}/${REDMINE_DIR}/config/database.yml then edit this" |
200 |
- eerror "file in order to configure your database settings for" |
201 |
- eerror "\"production\" environment." |
202 |
- die |
203 |
- fi |
204 |
- |
205 |
- local RAILS_ENV=${RAILS_ENV:-production} |
206 |
- if [[ ! -L /usr/bin/ruby ]]; then |
207 |
- eerror "/usr/bin/ruby is not a valid symlink to any ruby implementation." |
208 |
- eerror "Please update it via `eselect ruby`" |
209 |
- die |
210 |
- fi |
211 |
- if [[ $RUBY_TARGETS != *$( eselect ruby show | awk 'NR==2' | tr -d ' ' )* ]] |
212 |
- then |
213 |
- eerror "/usr/bin/ruby is currently not included in redmine's ruby targets:" |
214 |
- eerror "${RUBY_TARGETS}." |
215 |
- eerror "Please update it via `eselect ruby`" |
216 |
- die |
217 |
- fi |
218 |
- local RUBY=${RUBY:-ruby} |
219 |
- |
220 |
- cd "${EROOT}/${REDMINE_DIR}" || die |
221 |
- if [[ -e "${EROOT}/${REDMINE_DIR}/config/initializers/session_store.rb" ]] |
222 |
- then |
223 |
- einfo |
224 |
- einfo "Generating secret token." |
225 |
- einfo |
226 |
- rm config/initializers/session_store.rb || die |
227 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die |
228 |
- fi |
229 |
- if [[ -e "${EROOT}/${REDMINE_DIR}/config/initializers/secret_token.rb" ]] |
230 |
- then |
231 |
- einfo |
232 |
- einfo "Upgrading database." |
233 |
- einfo |
234 |
- |
235 |
- einfo "Generating secret token." |
236 |
- # Migration from Redmine 2.x |
237 |
- rm config/initializers/secret_token.rb || die |
238 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake generate_secret_token || die |
239 |
- |
240 |
- einfo "Migrating database." |
241 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die |
242 |
- einfo "Upgrading the plugin migrations." |
243 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:plugins:migrate || die |
244 |
- einfo "Clear the cache." |
245 |
- ${RUBY} -S rake tmp:cache:clear || die |
246 |
- else |
247 |
- einfo |
248 |
- einfo "Initializing database." |
249 |
- einfo |
250 |
- |
251 |
- einfo "Generating a session store secret." |
252 |
- ${RUBY} -S rake generate_secret_token || die |
253 |
- einfo "Creating the database structure." |
254 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake db:migrate || die |
255 |
- einfo "Populating database with default configuration data." |
256 |
- RAILS_ENV="${RAILS_ENV}" ${RUBY} -S rake redmine:load_default_data || die |
257 |
- chown redmine:redmine -R "${EROOT}//var/log/redmine/" || die |
258 |
- einfo |
259 |
- einfo "If you use sqlite3, please do not forget to change the ownership" |
260 |
- einfo "of the sqlite files." |
261 |
- einfo |
262 |
- einfo "# cd \"${EROOT}/${REDMINE_DIR}\"" |
263 |
- einfo "# chown redmine:redmine db/ db/*.sqlite3" |
264 |
- einfo |
265 |
- fi |
266 |
-} |