[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#844161: jessie-pu: package redmine/3.0~20140825-8~deb8u4



Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

Hi,

I would like to update redmine in jessie.

redmine (3.0~20140825-8~deb8u4) jessie; urgency=medium

  * debian/postinst: handle dependency check failure when triggered, to avoid
    breaking in the middle of dist-upgrades.
  * gemfile-adjustments.patch: avoid opening database configuration that are
    not readable (Closes: #826663)

 -- Antonio Terceiro <terceiro@debian.org>  Sat, 12 Nov 2016 19:00:15 -0200

full diff attached

-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff --git a/debian/changelog b/debian/changelog
index ec0e42a..9a894b7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+redmine (3.0~20140825-8~deb8u4) jessie; urgency=medium
+
+  * debian/postinst: handle dependency check failure when triggered, to avoid
+    breaking in the middle of dist-upgrades.
+  * gemfile-adjustments.patch: avoid opening database configuration that are
+    not readable (Closes: #826663)
+
+ -- Antonio Terceiro <terceiro@debian.org>  Sat, 12 Nov 2016 19:00:15 -0200
+
 redmine (3.0~20140825-8~deb8u3) jessie; urgency=medium
 
   * gemfile-adjustments.patch: load all database drivers for all Redmine
diff --git a/debian/patches/gemfile-adjustments.patch b/debian/patches/gemfile-adjustments.patch
index 0db0aa3..f38d5e3 100644
--- a/debian/patches/gemfile-adjustments.patch
+++ b/debian/patches/gemfile-adjustments.patch
@@ -45,7 +45,7 @@
 -if File.exist?(database_file)
 +seen_adapters = {}
 +Dir['{config,/etc/redmine/*}/database.yml'].select do |f|
-+  File.exists?(f)
++  File.readable?(f)
 +end.each do |database_file|
    database_config = YAML::load(ERB.new(IO.read(database_file)).result)
    adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
diff --git a/debian/postinst b/debian/postinst
index 0abb494..2990058 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -12,7 +12,25 @@ RAKE_VERBOSE=false
 
 # update Gemfile.lock, always
 rm -f /var/lib/redmine/Gemfile.lock
-(cd /usr/share/redmine && bundle --local --quiet)
+cd /usr/share/redmine
+if ! bundle --local --quiet; then
+  if [ "$1" = "triggered" ]; then
+    # probably triggered in the middle of an system upgrade; ignore failure
+    # but abort here
+    echo "#########################################################################"
+    echo "# Failed to detect redmine dependencies; if you are in the middle of an #"
+    echo "# upgrade, this is probably fine, there will be another attempt later.  #"
+    echo "#                                                                       #"
+    echo "# If you are NOT in the middle of an upgrade, there is probably a real  #"
+    echo "# issue. Please report a bug.                                           #"
+    echo "#########################################################################"
+    exit 0
+  else
+    # something is really broken
+    exit 1
+  fi
+fi
+cd - >/dev/null
 chown www-data:www-data /var/lib/redmine/Gemfile.lock
 
 # remove and purge old instances each time postinst is called

Attachment: signature.asc
Description: PGP signature


Reply to: