Package: redmine
Version: 3.0~20140825-8~deb8u3
Severity: normal

Dear Maintainer,

I have installed several dozens of redmine instances interactively. I use a
similar database config for all installations: db type - mysql, access -
tcp/ip and the remote host name. All installations work fine. Recently I
tried to automate installation using debconf. I set
'redmine/instances/name_ins/default-language' in advance but "apt-get
install" or "dpkg-reconfigure" always clean this setting. If configuration
procedure performs "rake -s redmine:load_default_data" it always asks for a
language setting. It is not a problem for an interactive configuration but
automatic installation becomes imposible. I investigated file
/var/lib/dpkg/info/redmine.postinst. The variable 'DEFAULT_LANGUAGE' in
line 288: 'db_get redmine/instances/${lInstance}/default-language &&
DEFAULT_LANGUAGE="$RET"' always get an empty value. So line 298: 'bundle
exec rake -s redmine:load_default_data RAILS_ENV=$fRailsEnv
always asks for the language setting. I tried to modify
/var/lib/dpkg/info/redmine.postinst manually and set the variable
'DEFAULT_LANGUAGE' to a constant. In this case "dpkg-reconfigure" works
fine in non-interactive mode as well.
Probably problem is in line 93 of /var/lib/dpkg/info/redmine.config:
"db_input medium $questionLanguage || true". Because of db_input cannot be
performed in non-interactive mode and following do_go cleans appropriate
value. There is log:
+ db_input medium redmine/instances/default/default-language
+ _db_cmd INPUT medium redmine/instances/default/default-language
+ _db_internal_IFS=

+ IFS=
+ printf %s\n INPUT medium redmine/instances/default/default-language
+ IFS=

+ IFS=
 read -r _db_internal_line
+ RET=30 question skipped
+ return 30
+ true
So I suggest to check a return value of do_input and don't perform do_go if
the value equivalent to "30"

-- System Information:
Debian Release: 8.5
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages redmine depends on:
ii  bundler                         1.7.4-1
ii  dbconfig-common                 1.8.47+nmu3+deb8u1
ii  debconf [debconf-2.0]           1.5.56
ii  libjs-scriptaculous             1.9.0-2
ii  redmine-mysql                   3.0~20140825-8~deb8u3
ii  ruby                            1:2.1.5+deb8u2
ii  ruby-actionpack-action-caching  1.1.1-3
ii  ruby-awesome-nested-set         3.0.0-1
ii  ruby-coderay                    1.1.0-2
ii  ruby-i18n                       0.6.9-2
ii  ruby-jquery-rails               3.1.2-2
ii  ruby-mime-types                 1.25-2
ii  ruby-net-ldap                   0.8.0-1
ii  ruby-openid                     2.5.0debian-1
ii  ruby-protected-attributes       1.0.8-2
ii  ruby-rack                       1.5.2-3+deb8u1
ii  ruby-rack-openid                1.4.2-1
ii  ruby-rails                      2:4.1.8-1+deb8u4
ii  ruby-rails-observers            0.1.1-1
ii  ruby-redcarpet                  3.1.2-1
ii  ruby-request-store              1.1.0-1
ii  ruby-rmagick                    2.13.2-4+b1
ii  ruby2.1 [ruby-interpreter]      2.1.5-2+deb8u2

Versions of packages redmine recommends:
ii  libfcgi-ruby1.9.1    
ii  ruby-fcgi [libfcgi-ruby1.9.1]
ii  ruby-passenger                 4.0.53-1

Versions of packages redmine suggests:
pn  bzr         <none>
pn  cvs         <none>
pn  darcs       <none>
ii  git         1:2.1.4-2.1+deb8u2
pn  mercurial   <none>
pn  subversion  <none>

-- debconf information:
  redmine/instances/default/mysql/app-pass: (password omitted)
  redmine/instances/default/app-password-confirm: (password omitted)
  redmine/instances/default/mysql/admin-pass: (password omitted)
  redmine/instances/default/pgsql/app-pass: (password omitted)
  redmine/instances/default/pgsql/admin-pass: (password omitted)
  redmine/instances/default/password-confirm: (password omitted)
* redmine/instances/default/missing-db-package-error: abort
* redmine/instances/default/database-type: mysql
* redmine/instances/default/dbconfig-reinstall: true
* redmine/instances/default/dbconfig-install: true
  redmine/instances/default/internal/skip-preseed: false
* redmine/instances/default/db/app-user: redmine-test
  redmine/instances/default/pgsql/authmethod-user: password
* redmine/current-instances: default
* redmine/instances/default/remove-error: abort
* redmine/instances/default/db/dbname: redmine-test
* redmine/instances/default/upgrade-error: abort
* redmine/default-language: ${defaultLocale}
* redmine/instances/default/mysql/admin-user: root
* redmine/instances/default/remote/newhost: remote-host
* redmine/notify-migration:
  redmine/instances/default/pgsql/method: unix socket
  redmine/instances/default/pgsql/authmethod-admin: ident
* redmine/instances/default/dbconfig-upgrade: true
  redmine/instances/default/pgsql/changeconf: false
* redmine/instances/default/mysql/method: tcp/ip
* redmine/instances/default/install-error: abort
* redmine/instances/default/remote/port:
* redmine/old-instances:
  redmine/instances/default/purge: false
* redmine/instances/default/upgrade-backup: true
* redmine/instances/default/default-language:
* redmine/instances/default/internal/reconfiguring: false
  redmine/instances/default/pgsql/admin-user: postgres
* redmine/instances/default/remote/host: remote-host

Reply via email to