Bug#751984: devscripts: mk-origtargz do not handle xpi files correctly
Yann Amar
quidame at poivron.org
Wed Jun 18 13:39:24 UTC 2014
Package: devscripts
Version: 2.14.5
Severity: normal
Dear Maintainer,
* What led up to the situation?
I plan to package a mozilla addon; following xpi-repack(1) (from
mozilla-devscripts), here is my debian/watch file:
---------8<---------
quidame at sid:/tmp/profileswitcher$ cat debian/watch
version=3
https://freeshell.de/~kaosmos/profileswitcher-([\d\.]+)-tb\+fx\.xpi debian xpi-repack
--------->8---------
This works fine in wheezy; but when I run uscan in a fresh sid
environment, I get the following results:
---------8<---------
quidame at sid:/tmp/profileswitcher$ uscan --verbose
-- Scanning for watchfiles in .
-- Found watchfile in ./debian
-- In debian/watch, processing watchfile line:
https://freeshell.de/~kaosmos/profileswitcher-([\d\.]+)-tb\+fx\.xpi debian xpi-repack
-- Found the following matching hrefs:
profileswitcher-1.6.2-tb+fx.xpi (1.6.2)
Newest version on remote site is 1.6.2, local version is 1.6.1
=> Newer version available from
https://freeshell.de/~kaosmos/profileswitcher-1.6.2-tb+fx.xpi
-- Downloading updated package profileswitcher-1.6.2-tb+fx.xpi
-- Checking for common possible upstream OpenPGP signatures
-- Successfully downloaded updated package profileswitcher-1.6.2-tb+fx.xpi
-- Successfully repacked ../profileswitcher-1.6.2-tb+fx.xpi as ../profileswitcher_1.6.2.orig.tar.gz.
-- Executing user specified script
xpi-repack --upstream-version 1.6.2 ../profileswitcher_1.6.2.orig.tar.gz
Unpacking ../profileswitcher_1.6.2.orig.tar.gz
[../profileswitcher_1.6.2.orig.tar.gz]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of ../profileswitcher_1.6.2.orig.tar.gz or
../profileswitcher_1.6.2.orig.tar.gz.zip, and cannot find ../profileswitcher_1.6.2.orig.tar.gz.ZIP, period.
Unpacked xpi file.
-- Scan finished
quidame at sid:/tmp/profileswitcher$ ls -dl ../profileswitcher*
drwxr-xr-x 5 quidame quidame 220 May 25 09:47 ../profileswitcher
-rw-r--r-- 1 quidame quidame 82794 Jun 18 14:31 ../profileswitcher_1.6.2.orig.tar.gz
-rw-r--r-- 1 quidame quidame 188 Jun 18 14:31 ../profileswitcher_1.6.2.orig.tar.xz
-rw-r--r-- 1 quidame quidame 88737 Jun 18 14:22 ../profileswitcher-1.6.2-tb+fx.xpi
--------->8---------
It appears that uscan automatically calls mk-origtargz first, which
creates the *.orig.tar.gz file, then xpi-repack is callled with the new
archive name as argument instead of the upstream xpi file, so xpi-repack
fails: it creates the *.orig.tar.xz file, which contains only an empty
directory.
* What exactly did you do (or not do) that was effective (or
ineffective)?
Removing "debian xpi-repack" from the watch file does not help very
much, because the mk-origtargz handles the xpi file very poorly: in this
case case, it contains an unpacked .jar file and the source tree is at
the root of the archive, not in a main directory (in this case, it
should be 'profileswitcher-1.6.2').
XPI means "Cross Platform Installer"; it is an extension for zip
archives. Since mk-origtargz uses file's mime detection to detect zip
files [1], it handles xpi files instead of falling into error. But the
source archive it creates is wrong.
* What was the outcome of this action?
I have to run xpi-repack manually, with the proper arguments.
* What outcome did you expect instead?
I think mk-origtargz should skip xpi files without error, as it was the
case in wheezy (devscripts version 2.12.6+deb7u2); or uscan could also
have a --no-repack switch, or the repack action should not be performed
if the --repack option is not explicitly specified.
Thanks
quidame
[1] https://bugs.debian.org/748462
-- Package-specific info:
--- /etc/devscripts.conf ---
--- ~/.devscripts ---
Not present
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 3.14-1-486
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages devscripts depends on:
ii dpkg-dev 1.17.10
ii libc6 2.19-3
ii perl 5.18.2-4
ii python3 3.4.1-1
pn python3:any <none>
Versions of packages devscripts recommends:
ii at 3.1.14-1
ii dctrl-tools 2.23
ii debian-keyring 2014.04.25
ii dput 0.9.6.4
ii equivs 2.0.9
ii fakeroot 1.20-3
ii file 1:5.19-1
ii gnupg 1.4.16-1.1
ii libdistro-info-perl 0.13
ii libencode-locale-perl 1.03-1
ii libjson-perl 2.61-1
ii liblwp-protocol-https-perl 6.04-3
ii libparse-debcontrol-perl 2.005-4
ii libsoap-lite-perl 1.11-1
ii liburi-perl 1.60-1
ii libwww-perl 6.06-1
ii lintian 2.5.22.1
ii man-db 2.6.7.1-1
ii patch 2.7.1-5
ii patchutils 0.3.3-1
ii python3-debian 0.1.22
ii python3-magic 1:5.19-1
ii sensible-utils 0.0.9
ii strace 4.5.20-2.3
ii unzip 6.0-12
ii wdiff 1.2.2-1
ii wget 1.15-1+b1
ii xz-utils 5.1.1alpha+20120614-2
Versions of packages devscripts suggests:
ii bsd-mailx [mailx] 8.1.2-0.20131005cvs-1
ii build-essential 11.6
pn cvs-buildpackage <none>
pn devscripts-el <none>
pn gnuplot <none>
ii gpgv 1.4.16-1.1
ii libauthen-sasl-perl 2.1600-1
pn libfile-desktopentry-perl <none>
ii libnet-smtp-ssl-perl 1.01-3
pn libterm-size-perl <none>
ii libtimedate-perl 2.3000-2
pn libyaml-syck-perl <none>
ii mutt 1.5.23-1
ii openssh-client [ssh-client] 1:6.6p1-5
pn svn-buildpackage <none>
ii w3m 0.5.3-15
-- no debconf information
More information about the devscripts-devel
mailing list