Hello, On Fri, Jul 03, 2015 at 09:41:22AM -0300, Antonio Terceiro wrote: > Hello, > > On Sun, May 10, 2015 at 08:02:55PM -0300, Antonio Terceiro wrote: > > Package: release.debian.org > > Severity: normal > > Tags: jessie > > User: release.debian.org@packages.debian.org > > Usertags: pu > > > > This release fixes several bugs related to upgrades from wheezy. The > > equivalent version is already in testing. I have tested it extensively, > > and received positive feedback from multiple bug submitters. > > > > debdiff attached. > > ping? > > Besides the testing I did myself, I pointed several people who reported > bugs against the version in jessie to a jessie build I provided at > people.debian.org, and they all gave me positive feedback. > > I realize that the debdiff is larger than what one would want, but some > serious effort was made into testing it. Since the last ping, I have released a new update to unstable which fixes upgrades from wheezy. I would really like to upload a jessie update with the attached diff. I have already pointed several users at such update I am serving from https://people.debian.org/~terceiro/redmine-jessie/ and most of them reported that it fixed their issues and noone reported additional problems with it. Can we please get this update in jessie? -- Antonio Terceiro <terceiro@debian.org>
diff --git a/debian/changelog b/debian/changelog
index 0277747..fcd92d6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,68 @@
+redmine (3.0~20140825-8~deb8u1) jessie; urgency=medium
+
+ * Backport as a stable update for Jessie.
+
+ -- Antonio Terceiro <terceiro@debian.org> Sun, 10 May 2015 19:26:43 -0300
+
+redmine (3.0~20140825-8) unstable; urgency=medium
+
+ * Replace "interest" triggers with "interest-nowait" ones to avoid trigger
+ loops (Closes: #786763)
+
+ -- Antonio Terceiro <terceiro@debian.org> Fri, 10 Jul 2015 20:07:20 -0300
+
+redmine (3.0~20140825-7) unstable; urgency=medium
+
+ * debian/postinst: always remove and recreate Gemfile.lock to handle the
+ case where dependencies are being upgraded.
+
+ -- Antonio Terceiro <terceiro@debian.org> Sun, 03 May 2015 19:18:34 -0300
+
+redmine (3.0~20140825-6) unstable; urgency=medium
+
+ * debian/doc/examples/apache2-host.conf: fix typo in package name user is
+ told to install Closes: #777736
+ * Fix upgrades when there are locally-installed plugins Closes: #779273
+ - debian/postinst: run rake under `bundle exec` to correctly handle
+ upgrades when the local admin installed non-packaged plugins (i.e.
+ ~100% of them).
+ - 2003_externalize_session_config.patch, 2002_FHS_through_env_vars.patch,
+ gemfile-adjustments.patch: always set RAILS_ETC, RAILS_* unconditionally
+ from X_DEBIAN_SITEID because the load order under `bundle exec` seems to
+ be a little different.
+ - change Gemfile.lock handling:
+ + symlink Gemfile.lock to /var/lib/redmine/Gemfile.lock
+ + always update it at the beginning of debian/postinst
+ + trigger postinst Ruby packages are upgraded
+ * Don't leave unowned files after purge. Closes: #781534
+ - debian/postinst:
+ - don't create files under /usr/share/redmine/app
+ - pass SCHEMA=/dev/null to rake `db:migrate` so it won't create
+ /usr/share/redmine/db/schema.rb
+ - debian/postrm: remove the aforementioned files
+ * debian/postinst: fix several programming errors
+ - initialize variable that will hold the return code of a potentially
+ failing command to 0 so it is not undefined if the command suceeeds.
+ Closes: #780894
+ - add missing quotes around $fHasOldSessionName
+ - fix logic when testing whether session.yml file exists
+ - restrict usage of $2 as a version number when triggered, since $2 will
+ contain the trigger names instead.
+ * debian/patches/fix-move-issue-between-projects.patch: applied patch by
+ Tristam Fenton-May to fix moving issues across projects (Closes: #783717)
+ * debian/install:
+ - install bin/ directory so rails detects redmine as a proper Rails app
+ + This fixes running `rails console`, `rails dbconsole` etc from within
+ the installed package at /usr/share/redmine.
+ - don't install deprecated script/ directory
+ * debian/doc/examples/apache2-passenger-*.conf: document line that must
+ be changed in extra instances.
+ * debian/patches/gemfile-adjustments.patch:
+ - bump dependency on redcarpet
+ - don't try to read database.yml is it's not readable
+
+ -- Antonio Terceiro <terceiro@debian.org> Sat, 02 May 2015 11:33:20 -0300
+
redmine (3.0~20140825-5) unstable; urgency=high
* debian/patches/0001-Escape-flash-messages-19117.patch
diff --git a/debian/control b/debian/control
index e6b2dfc..9314337 100644
--- a/debian/control
+++ b/debian/control
@@ -78,7 +78,7 @@ Depends: ruby-mysql2,
mysql-client | virtual-mysql-client,
${misc:Depends}
Recommends: redmine (= ${source:Version})
-Suggests: mysql-server
+Suggests: mysql-server | virtual-mysql-server
Description: metapackage providing MySQL dependencies for Redmine
This package only provides MySQL dependencies for Redmine, a
flexible project management web application. Install this
diff --git a/debian/doc/examples/apache2-host.conf b/debian/doc/examples/apache2-host.conf
index afa8091..b233e5d 100644
--- a/debian/doc/examples/apache2-host.conf
+++ b/debian/doc/examples/apache2-host.conf
@@ -1,5 +1,5 @@
# The modules rewrite (from the apache core) and fcgid (from the
-# libapache2-mod-fcdid package) must be enabled.
+# libapache2-mod-fcgid package) must be enabled.
<VirtualHost *:80>
# FcgidInitialEnv for module mod_fcgid
FcgidInitialEnv RAILS_ENV "production"
diff --git a/debian/doc/examples/apache2-passenger-alias.conf b/debian/doc/examples/apache2-passenger-alias.conf
index 3911794..1f93ab1 100644
--- a/debian/doc/examples/apache2-passenger-alias.conf
+++ b/debian/doc/examples/apache2-passenger-alias.conf
@@ -6,6 +6,8 @@
RailsEnv production
SetEnv X_DEBIAN_SITEID "default"
SetEnv RAILS_RELATIVE_URL_ROOT "/redmine"
+ # CHANGE PassengerAppGroupName FOR OTHER INSTANCES
+ PassengerAppGroupName redmine_default
PassengerDefaultUser www-data
# apache2 serves public files
Alias "/redmine/plugin_assets/" /var/cache/redmine/default/plugin_assets/
diff --git a/debian/doc/examples/apache2-passenger-host.conf b/debian/doc/examples/apache2-passenger-host.conf
index 4dc5394..9d5c677 100644
--- a/debian/doc/examples/apache2-passenger-host.conf
+++ b/debian/doc/examples/apache2-passenger-host.conf
@@ -5,6 +5,8 @@
# this is the passenger config
RailsEnv production
SetEnv X_DEBIAN_SITEID "default"
+ # CHANGE PassengerAppGroupName FOR OTHER INSTANCES
+ PassengerAppGroupName redmine_default
PassengerDefaultUser www-data
Alias "/plugin_assets/" /var/cache/redmine/default/plugin_assets/
DocumentRoot /usr/share/redmine/public
diff --git a/debian/install b/debian/install
index 041821e..38683c4 100644
--- a/debian/install
+++ b/debian/install
@@ -1,5 +1,6 @@
# Install the basic application files
app usr/share/redmine
+bin usr/share/redmine
config usr/share/redmine
db usr/share/redmine
extra usr/share/redmine
@@ -7,7 +8,6 @@ lib usr/share/redmine
public usr/share/redmine
Rakefile usr/share/redmine
Gemfile usr/share/redmine
-script usr/share/redmine
test usr/share/redmine
config.ru usr/share/redmine
lib/plugins/* usr/share/redmine/lib/plugins
diff --git a/debian/links b/debian/links
index 7268fbc..f296756 100644
--- a/debian/links
+++ b/debian/links
@@ -5,4 +5,4 @@ usr/share/javascript/scriptaculous/controls.js usr/share/redmine/public/javascri
usr/share/javascript/scriptaculous/dragdrop.js usr/share/redmine/public/javascripts/dragdrop.js
usr/share/javascript/scriptaculous/effects.js usr/share/redmine/public/javascripts/effects.js
-/dev/null usr/share/redmine/Gemfile.lock
+/var/lib/redmine/Gemfile.lock usr/share/redmine/Gemfile.lock
diff --git a/debian/patches/2002_FHS_through_env_vars.patch b/debian/patches/2002_FHS_through_env_vars.patch
index d2aeb7f..231e283 100644
--- a/debian/patches/2002_FHS_through_env_vars.patch
+++ b/debian/patches/2002_FHS_through_env_vars.patch
@@ -60,10 +60,10 @@ Last-Update: 2013-09-28
+# for debian package : setup proper environment variables and paths
+# To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian
+ENV['X_DEBIAN_SITEID'] ||= 'default'
-+ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
-+ENV['RAILS_TMP'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_ETC'] = "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_LOG'] = "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_VAR'] = "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_TMP'] = "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
+
Bundler.require(*Rails.groups)
diff --git a/debian/patches/2003_externalize_session_config.patch b/debian/patches/2003_externalize_session_config.patch
index 8046947..9412ed5 100644
--- a/debian/patches/2003_externalize_session_config.patch
+++ b/debian/patches/2003_externalize_session_config.patch
@@ -15,7 +15,7 @@ Last-Update: 2010-01-10
- f.write <<"EOF"
-# This file was generated by 'rake generate_secret_token', and should
+ENV['X_DEBIAN_SITEID'] ||= 'default'
-+ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_ETC'] = "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
+filename = ENV['YML_SESSION_FILENAME'] ? ENV['YML_SESSION_FILENAME'] : 'session.yml'
+path = File.join(ENV['RAILS_ETC'] ? ENV['RAILS_ETC'] : File.join(Rails.root, 'config'), filename)
+secret = SecureRandom.hex(40)
diff --git a/debian/patches/2009_FHS_thin_config.patch b/debian/patches/2009_FHS_thin_config.patch
index 1ad1d70..7f44a42 100644
--- a/debian/patches/2009_FHS_thin_config.patch
+++ b/debian/patches/2009_FHS_thin_config.patch
@@ -3,13 +3,13 @@ Description: FHS support for thin config
Forwarded: not-needed
Author: Jérémy Lal <kapouer@melix.org>
Last-Update: 2010-11-01
---- redmine.orig/config/application.rb
-+++ redmine/config/application.rb
+--- a/config/application.rb
++++ b/config/application.rb
@@ -7,6 +7,7 @@ Rails.env ||= ActiveSupport::StringInqui
# for debian package : setup proper environment variables and paths
# To run redmine as unprivileged user, see /usr/share/doc/redmine/README.Debian
+ObjectSpace.each_object(Thin::Runner){|x| ENV["X_DEBIAN_SITEID"] = x.options[:x_debian_siteid] if x.options[:x_debian_siteid]} if defined?(Thin)
ENV['X_DEBIAN_SITEID'] ||= 'default'
- ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
- ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
+ ENV['RAILS_ETC'] = "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
+ ENV['RAILS_LOG'] = "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
diff --git a/debian/patches/fix-move-issue-between-projects.patch b/debian/patches/fix-move-issue-between-projects.patch
new file mode 100644
index 0000000..234aace
--- /dev/null
+++ b/debian/patches/fix-move-issue-between-projects.patch
@@ -0,0 +1,47 @@
+Description: Fix moving issues between projects
+ For some reason this bug does not affect upstream. Probably the 3.0~20140825
+ snapshot was taken at a time when this was broken but the brokennes never made
+ it into a release.
+Author: Tristam Fenton-May <tfm-debian@earth.li>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783717
+Forwarded: not-needed
+Reviewed-by: Antonio Terceiro <terceiro@debian.org>
+Last-Update: 2015-05-02
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/app/controllers/issues_controller.rb
++++ b/app/controllers/issues_controller.rb
+@@ -21,7 +21,8 @@ class IssuesController < ApplicationCont
+
+ before_filter :find_issue, :only => [:show, :edit, :update]
+ before_filter :find_issues, :only => [:bulk_edit, :bulk_update, :destroy]
+- before_filter :find_project, :only => [:new, :create, :update_form]
++ before_filter :find_project, :only => [:new, :create]
++ before_filter :find_project_from_issue, :only => [:update_form]
+ before_filter :authorize, :except => [:index]
+ before_filter :find_optional_project, :only => [:index]
+ before_filter :check_for_default_issue_status, :only => [:new, :create]
+@@ -352,6 +353,13 @@ class IssuesController < ApplicationCont
+ render_404
+ end
+
++ def find_project_from_issue
++ project_id = (params[:issue] && params[:issue][:project_id])
++ @project = Project.find(project_id)
++ rescue ActiveRecord::RecordNotFound
++ render_404
++ end
++
+ def retrieve_previous_and_next_issue_ids
+ retrieve_query_from_session
+ if @query
+@@ -419,7 +427,7 @@ class IssuesController < ApplicationCont
+ end
+ @issue.project = @project
+ else
+- @issue = @project.issues.visible.find(params[:id])
++ @issue = Issue.visible.find(params[:id])
+ end
+
+ @issue.project = @project
diff --git a/debian/patches/gemfile-adjustments.patch b/debian/patches/gemfile-adjustments.patch
index 2d14466..3a2f6e1 100644
--- a/debian/patches/gemfile-adjustments.patch
+++ b/debian/patches/gemfile-adjustments.patch
@@ -28,18 +28,29 @@
gem "rack-openid"
end
-@@ -46,7 +46,10 @@ end
+@@ -32,7 +32,7 @@ platforms :mri, :mingw do
+
+ # Optional Markdown support, not for JRuby
+ group :markdown do
+- gem "redcarpet", "~> 3.1.2"
++ gem "redcarpet", "~> 3.1"
+ end
+ end
+
+@@ -46,8 +46,11 @@ end
# configuration file
require 'erb'
require 'yaml'
-database_file = File.join(File.dirname(__FILE__), "config/database.yml")
+-if File.exist?(database_file)
+# FIXME duplicating logic in config/application.rb
+ENV['X_DEBIAN_SITEID'] ||= 'default'
-+ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
++ENV['RAILS_ETC'] = "/etc/redmine/#{ENV['X_DEBIAN_SITEID']}"
+database_file = File.join(ENV['RAILS_ETC'], "database.yml")
- if File.exist?(database_file)
++if File.readable?(database_file)
database_config = YAML::load(ERB.new(IO.read(database_file)).result)
adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
+ if adapters.any?
@@ -78,21 +81,6 @@ else
warn("Please configure your config/database.yml first")
end
diff --git a/debian/patches/series b/debian/patches/series
index 16069f9..8311190 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -11,3 +11,4 @@ drop-update_all.patch
invalidate-language-cache-from-older-versions.diff
avoid-crash-on-issues.diff
0001-Escape-flash-messages-19117.patch
+fix-move-issue-between-projects.patch
diff --git a/debian/postinst b/debian/postinst
index 8615657..0abb494 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -10,6 +10,11 @@ RAKE_VERBOSE=false
. /usr/share/debconf/confmodule
+# update Gemfile.lock, always
+rm -f /var/lib/redmine/Gemfile.lock
+(cd /usr/share/redmine && bundle --local --quiet)
+chown www-data:www-data /var/lib/redmine/Gemfile.lock
+
# remove and purge old instances each time postinst is called
db_get redmine/old-instances || true
gOldInstances="${RET}"
@@ -75,12 +80,6 @@ case "$1" in
echo "Inconsistent link in vendor/rails, please remove manually"
fi
fi
- if [ ! -e app/views/members ]; then
- mkdir app/views/members
- fi
- if [ ! -e app/sweepers ]; then
- mkdir app/sweepers
- fi
# this directory should never be used: /usr not writable policy
if [ -e tmp ]; then
rm -rf tmp
@@ -214,7 +213,24 @@ for lInstance in $gInstances; do
fi
case "$1" in
configure|reconfigure|triggered)
- if dpkg --compare-versions "$2" lt "2.3.0+dfsg1-3~"; then
+
+ skip_db_upgrade_actions=false
+ if [ "$1" = triggered ]; then
+ # Skip the heavy operations below unless triggered by a plugin, in
+ # which case we do need to do all that.
+ skip_db_upgrade_actions=true
+ case " $2 " in
+ *' /usr/share/redmine/plugins '*)
+ echo "I: redmine plugins installed/upgraded, DB upgrade needed"
+ skip_db_upgrade_actions=false
+ ;;
+ esac
+ fi
+ if [ "$skip_db_upgrade_actions" = true ]; then
+ exit 0
+ fi
+
+ if [ "$1" != triggered ] && dpkg --compare-versions "$2" lt "2.3.0+dfsg1-3~"; then
rm -rf $fRailsCache
fi
# create directories
@@ -248,9 +264,9 @@ for lInstance in $gInstances; do
fi
#fi
# add secret key, set permissions, manage file with ucf
- # trigger when session file doesn't exist or we are upgrading from previous version
- if [ ! -f "${fRailsEtc}/session.yml" ] || dpkg --compare-versions "$2" lt "2.1.4+dfsg2-2~"; then
- rake -s generate_secret_token YML_SESSION_FILENAME="session.yml.new" RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" || true
+ # trigger when session file doesn't exist
+ if [ ! -f "${fRailsEtc}/session.yml" ]; then
+ bundle exec rake -s generate_secret_token YML_SESSION_FILENAME="session.yml.new" RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" || true
chown -f root:www-data ${fRailsEtc}/session.yml.new
chmod 640 ${fRailsEtc}/session.yml.new
ucf --debconf-ok ${fRailsEtc}/session.yml.new ${fRailsEtc}/session.yml
@@ -258,8 +274,7 @@ for lInstance in $gInstances; do
# move old session_store.rb
echo "A new secret session key has been generated in ${fRailsEtc}/session.yml"
else
- fHasOldSessionName=$(fgrep -c session_key "${fRailsEtc}/session.yml" || true)
- if [ $fHasOldSessionName -gt 0 ]; then
+ if ! grep -q session_key "${fRailsEtc}/session.yml"; then
# in-place, because ucf might be configured to keep the old version without asking
sed -i -r -e 's/session_key/key/g' ${fRailsEtc}/session.yml
fi
@@ -276,17 +291,17 @@ for lInstance in $gInstances; do
echo "Populating database for redmine instance \"${lInstance}\".
This may take a while."
fCode=0
- rake -s db:migrate RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE || fCode=$?
+ bundle exec rake -s db:migrate RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE SCHEMA=/dev/null || fCode=$?
if [ $fCode -eq 0 ]; then
echo "Done."
if [ $lInstall -eq 1 ]; then
- rake -s redmine:load_default_data RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" REDMINE_LANG=$DEFAULT_LANGUAGE || true
+ bundle exec rake -s redmine:load_default_data RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" REDMINE_LANG=$DEFAULT_LANGUAGE || true
# because rake task is executed as root here, and this file is used later by web server, make sure owner is www-data
touch ${fRailsLog}/production.log
chown -f www-data:www-data ${fRailsLog}/production.log
fi
# handle plugins migration
- rake -s redmine:plugins:migrate RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE || true
+ bundle exec rake -s redmine:plugins:migrate RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE SCHEMA=/dev/null || true
else
echo "Error when running rake db:migrate, check database configuration."
exit 1
@@ -296,7 +311,8 @@ This may take a while."
fi
echo "Clearing the cache directory for redmine instance \"${lInstance}\".
This may take a while."
- rake -s tmp:cache:clear RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE || fCode=$?
+ fCode=0
+ bundle exec rake -s tmp:cache:clear RAILS_ENV=$fRailsEnv X_DEBIAN_SITEID="${lInstance}" VERBOSE=$RAKE_VERBOSE || fCode=$?
if [ $fCode -ne 0 ]; then
echo "Error when clearing cache. You might need to clear the cache directory /var/cache/redmine/${lInstance}/ manually."
fi
diff --git a/debian/postrm b/debian/postrm
index 79c2cf0..a7fbd87 100644
--- a/debian/postrm
+++ b/debian/postrm
@@ -10,6 +10,10 @@ if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
+# remove files/dirs erroneusly created by redmine < 3.0~20140825-6:
+rm -f /usr/share/redmine/db/schema.rb
+rmdir /usr/share/redmine/app/sweepers 2>/dev/null || true
+
case "$1" in
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
@@ -81,6 +85,7 @@ case "$1" in
rm -rf /var/lib/redmine/*/sessions
rm -rf /var/cache/redmine
rm -rf /etc/redmine
+ rm -f /var/lib/redmine/Gemfile.lock
# user files are not
rmdir /var/lib/redmine/*/files || true
rmdir /var/lib/redmine/* || true
diff --git a/debian/redmine.triggers b/debian/redmine.triggers
index 2167263..db74880 100644
--- a/debian/redmine.triggers
+++ b/debian/redmine.triggers
@@ -1 +1,2 @@
-interest /usr/share/redmine/plugins
+interest-noawait /usr/share/redmine/plugins
+interest-noawait /usr/lib/ruby/vendor_ruby
Attachment:
signature.asc
Description: Digital signature