[DRE-maint] Bug#988449: redmine: run the testsuite during the build
Emilio Pozuelo Monfort
pochu at debian.org
Thu May 13 09:28:35 BST 2021
Package: redmine
Version: 4.0.7-1
Severity: normal
Tags: patch
Hi,
While backporting security fixes for redmine in stretch, I have enabled the
test suite during the build process, which has helped catch some issues in
the backports (such as usage of APIs from ruby 2.4+, not available in stretch).
The test suite seems quite reliable, so it'd be nice to get it running (and
eventually abort on test errors). Here's the patch I used for stretch, I tried
to make a patch for sid, but unfortunately there's a FTBFS issue right now due
to rails 6, so I couldn't.
Thanks,
Emilio
-------------- next part --------------
diff -Nru redmine-3.3.1/debian/changelog redmine-3.3.1/debian/changelog
--- redmine-3.3.1/debian/changelog 2019-11-18 22:46:42.000000000 +0100
+++ redmine-3.3.1/debian/changelog 2021-05-11 10:17:30.000000000 +0200
@@ -1,3 +1,10 @@
+redmine (3.3.1-4+deb9u3.1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload by the LTS team.
+ * Run the testsuite during the build.
+
+ -- Emilio Pozuelo Monfort <pochu at debian.org> Tue, 11 May 2021 10:17:30 +0200
+
redmine (3.3.1-4+deb9u3) stretch-security; urgency=high
* Fix CVE-2019-17427: persistent XSS exists due to textile formatting
diff -Nru redmine-3.3.1/debian/control redmine-3.3.1/debian/control
--- redmine-3.3.1/debian/control 2019-11-18 22:46:42.000000000 +0100
+++ redmine-3.3.1/debian/control 2021-05-11 10:17:30.000000000 +0200
@@ -26,7 +26,10 @@
ruby-redcarpet,
ruby-request-store,
ruby-rmagick,
- ruby-roadie-rails
+ ruby-roadie-rails,
+# for the test suite
+ ruby-mocha,
+ ruby-sqlite3,
Build-Depends-Indep: po-debconf
Standards-Version: 3.9.8
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/redmine.git
diff -Nru redmine-3.3.1/debian/database.test.yml redmine-3.3.1/debian/database.test.yml
--- redmine-3.3.1/debian/database.test.yml 1970-01-01 01:00:00.000000000 +0100
+++ redmine-3.3.1/debian/database.test.yml 2021-05-11 10:17:30.000000000 +0200
@@ -0,0 +1,3 @@
+test:
+ adapter: sqlite3
+ database: testdb/redmine.sqlite3
diff -Nru redmine-3.3.1/debian/rules redmine-3.3.1/debian/rules
--- redmine-3.3.1/debian/rules 2019-11-18 22:46:42.000000000 +0100
+++ redmine-3.3.1/debian/rules 2021-05-11 10:17:30.000000000 +0200
@@ -4,11 +4,25 @@
%:
dh $@
+override_dh_auto_clean:
+ rm -rf instances/default/config/ testdb/
+ dh_auto_clean
+
override_dh_auto_configure:
./debian/check-locales
bundle --local --quiet
rm -f Gemfile.lock
+override_dh_auto_test:
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+ mkdir -p instances/default/config/
+ mkdir -p testdb/
+ cp debian/database.test.yml instances/default/config/database.yml
+ bin/rake db:migrate RAILS_ENV=test
+ bin/rake test RAILS_ENV=test || true
+ rm db/schema.rb
+endif
+
override_dh_install:
dh_install
More information about the Pkg-ruby-extras-maintainers
mailing list