[DRE-maint] Bug#974065: Bug#974065: rails: nocheck builds should not depend on qunit-selenium

Antonio Terceiro terceiro at debian.org
Tue Dec 1 23:09:15 GMT 2020


On Mon, Nov 09, 2020 at 03:40:15PM +0100, Sven Mueller wrote:
> Package: rails
> Version: 2:6.0.3.4+dfsg-1
> Tags: patch
> 
> Turns out that this isn't needed and pulls in a lot of dependencies if the
> build is done without tests.
> 
> The attached patch moves the start of the redis server (only needed for
> tests) inside the override_dh_auto_test section in debian/rules (I suspect
> that the redis server was also only pulled in via the qunit-selenium
> dependency? - without this move, the resulting build failed). The
> dependency on qunit-selenium is marked as <!nocheck> so it is now only
> pulled in if tests are enabled.
> 
> Please consider merging this. The change is trivial and I don't believe it
> would create any copyright concerns, but just in case a license would
> actually be required, I license this under the Expat license or CC-BY 3.0
> or CC-BY-SA-4.0, the choice of license is left to the receiver of the
> license and should  be fully compatible with the Debian packaging as well
> as upstream (though this only affects the packaging, so I doubt they care).

> diff --git a/debian/control b/debian/control
> index 59d14bfe..3d067e13 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -18,7 +18,7 @@ Build-Depends: debhelper-compat (= 12),
>                 ruby-byebug,
>  # Ruby packages - from Gemfile
>                 puma (>= 4.1~),
> -               qunit-selenium,
> +               qunit-selenium <!nocheck>,
>                 racc (>= 1.4.6),
>                 rake (>= 11.1),
>                 ruby-bcrypt (<< 3.2),
> diff --git a/debian/rules b/debian/rules
> index d3747fee..41bfe45a 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -20,17 +20,17 @@ override_dh_clean:
>  	debian/stop-redis-server.sh || true
>  	
>  override_dh_auto_install:
> -	# start redis server for tests
> -	debian/start-redis-server.sh
>  	# auto install
>  	dh_auto_install -O--buildsystem=ruby
> -	# kill redis server used for tests
> -	debian/stop-redis-server.sh	
>  	$(RM) debian/ruby-activesupport/usr/bin/generate_tables
>  	$(RM) debian/*/usr/bin/test
>  	rmdir debian/*/usr/bin || true
>  
>  override_dh_auto_test:
>  ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),)
> +	# start redis server for tests
> +	debian/start-redis-server.sh
>  	dh_auto_test
> +	# kill redis server used for tests
> +	debian/stop-redis-server.sh	
>  endif

Did you test this on a full build? gem2deb has a limitation/bug that
causes the tests to be executed during the install target, and not the
test one.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-ruby-extras-maintainers/attachments/20201201/61e75bed/attachment.sig>


More information about the Pkg-ruby-extras-maintainers mailing list