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

Re: schleuder packaging: Searching for input to run the tests



On Thu, Dec 08, 2016 at 04:09:31PM +0100, georg@riseup.net wrote:
> Hi all,
> 
> As announced a while ago, I'm currently packaging schleuder, a GPG
> enabled mailing list manager. I'm nearly finished, and worked a lot with
> upstream these last days to fix various issues. 
> 
> For the moment I'm facing one last showstopper: There is one last
> hardcoded path inside the upstream code [1] which defines the locales
> dir path. I've tried to come up with a clever idea what to do with this
> for the last day but failed; so I'm searching for input and your
> collective wisdom now.
> 
> If I'm leaving this untouched / unpatched, 
> /usr/bin/ruby2.3 /usr/bin/gem2deb-test-runner 
> if called during the package build works. Great!
> 
> However, running 
> gem2deb-test-runner --autopkgtest --check-dependencies 2>&1 
> against the installed package fails obviously, the path is wrong at this
> time. because I'm installing the locales into /usr/share/schleuder/.
> 
> One idea we came up with is the following:
> 
> 	Patch the upstream src:
> 
> 	locales_dir = Dir["#{rootdir}/locales/*.yml"]
> 
> 	if ENV['SCHLEUDER_LOCALES_DIR']:
> 	locales_dir = ENV['SCHLEUDER_LOCALES_DIR']
> 
> 	I18n.load_path += locales_dir
> 
> 	--
> 
> 	Debian src:
> 
> 	Using quilt:
> 	- locales_dir = Dir["#{rootdir}/locales/*.yml"]
> 	+ locales_dir = Dir["/usr/share/schleuder/locales/*.yml"]
> 
> 	debian/ruby-tests.rake:
> 	ENV['SCHLEUDER_LOCALES_DIR'] = Dir["#{rootdir}/locales/*.yml"]
> 	if Dir.exists?('/etc/schleuder')
> 	ENV['SCHLEUDER_LOCALES_DIR'] = nil
> 
> Of course I'm happy to hear about different approaches, etc.

this should work. however, since that conversation we had on IRC about
dh_ruby --gem-install, I made some improvements to it in gem2deb 0.33
and 0.33.1 I would encourage you to give it a try; to do that just
change debian/rules to have

	export DH_RUBY = --gem-install

Using this, you avoid most of the situations where we need to patch
upstream sources to deal with the different layout in Debian packages. I
intend to make the template for new packages have that at some point,
maybe even before the release.

Is the latest version of the schleuder packaging in git?

Attachment: signature.asc
Description: PGP signature


Reply to: