[Bug 1351380] Re: Lintian crashes with "undefined value" if deb lacks intermediate directories
Launchpad Bug Tracker
1351380 at bugs.launchpad.net
Tue Jul 7 05:28:55 UTC 2015
This bug was fixed in the package lintian - 2.5.32ubuntu1
---------------
lintian (2.5.32ubuntu1) wily; urgency=low
* Merge from Debian unstable. Remaining changes:
- Ship pre-uglified json.js to avoid build-dep on nodejs for the tests.
lintian (2.5.32) unstable; urgency=medium
* Summary of tag changes:
+ Added:
- changelog-empty-entry
- dh-manual-sequence-control-obsolete
- license-problem-non-free-img-lenna
- missing-intermediate-directory
- package-contains-cmake-private-file
- package-contains-mime-file-outside-package-dir
- package-install-apt-preferences
- package-install-apt-sources
- package-install-ieee-data
- service-key-has-whitespace
- source-contains-autogenerated-gperf-data
- source-contains-data-from-ieee-data-oui-db
- static-library-has-unneeded-section
+ Removed:
- hyphen-used-as-minus-sign
* checks/*.pm:
+ [NT] Rewrite to handle new check_spelling{,_picky}
* checks/binaries.pm:
+ [NT] Also apply the binary-has-unneeded-section check on
static libs. (See #662998)
* checks/cruft.{desc,pm}:
+ [BR] Detect non free lenna file based on filename and filetype.
(Closes: #771191).
+ [BR] Avoid a false positive for autogenerated index in dx package
for source-is-missing.
* checks/changes-file.{desc,pm}:
+ [NT] Downgrade backports-changes-missing to a wishlist (I) tag.
Thanks to Vincent Cheng for the report. (Closes: #785084)
* checks/changelog-file.{desc,pm}:
+ [BR] Detect empty changelog entry. (Closes: #763457)
* checks/debhelper.{desc,pm}:
+ [NT] Warn about using dh --{until,before,after,remaining} as
these are deprecated and have been since debhelper/8.9.4.
+ [NT] Permit the use of dh-exec-install in ".manpages" as well
since dh-exec now advertises this as acceptable. Thanks to
Andreas Henriksson for reporting this. (Closes: #788796)
* checks/fields.pm:
+ [BR] Detect double comma in uploaders fields.
(Closes: #783628).
* checks/files.{desc,pm}:
+ [NT] Apply patch from Tomasz Buchert to avoid false-positive
package-contains-timestamped-gzip in some cases.
(Closes: #762105)
+ [BR] Detects // tricks in privacy breach test.
(Closes: #786362)
+ [BR] Apply patch from Lisandro Damián Nicanor Pérez Meyer
for detecting private cmake file.
(Closes: #785329).
+ [BR] Detect package shipping apt_preferences(5) file.
(Closes: #786533).
+ [BR] Detect package shipping oui or iab ieee database.
(Closes: #785662).
+ [NT] Add a check for packages without intermediate
directories.
+ [BR] Avoid a false positive in jsom for defaultpresets.xml
from openmapstreet.
+ [NT] Tweak the "extra-license-file" check to avoid some
common false-positives.
+ [BR] Raise severity of package-contains-timestamped-gzip.
(Closes: #778328).
+ [BR] Detect package shipping apt_sources(5) file.
(Closes: #646965).
+ [BR] Warn about files installed in /usr/share/mime/ other
than in packages/. (Closes: #761649).
* checks/java.pm:
+ [NT] Fix "off-by-one" in the check for the maximum permitted
Java major version.
* checks/manpages.{desc,pm}:
+ [NT] Retire the hyphen-used-as-minus-sign tag as upstream now
renders both "-" and "\-" as HYPHEN-MINUS. (Closes: #785353)
* checks/po-debconf.pm:
+ [JW] Use TMPDIR rather than TEMPDIR for temporary files.
(Closes: #787930)
* checks/source-copyright.pm:
+ [NT] Apply patch from Evgeni Golov to permit multiple
different "public-domain licenses", as they are expected to
describe why the affected files are in public domain.
(Closes: #787248)
* checks/systemd.{desc,pm}:
+ [NT] Apply patch from Felipe Sateler to mark service files in
/usr/lib as invalid. (Closes: #788629)
+ [NT] Apply patch from Felipe Sateler to detect service files
that use spaces around the = in the key definition.
(Closes: #786421)
* collection/{debfiles,doc-base-files,init.d,menu-files}{,.desc}:
+ [NT] Remove deprecated and unused collections. These were
deprecated in 2.5.28. Note that debfiles was omitted in the
deprecation list by mistake in the original 2.5.28 release.
* collection/objdump-info:
+ [NT] Also analyse static libraries.
* collection/unpacked:
+ [NT] Apply patch from Tomasz Buchert to extract the full time
in UTC.
* commands/reporting-sync-state.pm:
+ [NT] Read mirror files as UTF-8 files to avoid mojibake in
maintainer names. Once again, thanks to Andreas Rönnquist
for the report.
* commands/spellintian.pm:
+ [JW,NT] Import Jakub Wilk's spellintian tool with minor
modifications.
* data/binaries/embedded-libs:
+ [BR] Detect embedded ieee-data package.
* data/cruft/non-free-license:
+ [BR] Detect autogenerated gperf data. (Closes: #762179).
+ [BR] Detect ieee oui db in source files.
* data/cruft/missing-dir-search-path:
+ [BR] Fix a false positive in fspy for source-is-missing.
* data/cruft/warn-file-type:
+ [BR] Fix a false positive source-is-missing by checking
-nc.js suffix.
+ [BR] Fix a false positive source-is-missing in zivot
package by adding .e as binary suffix.
+ [BR] Fix a false positive source-is-missing by adding
yorick source file as source.
+ [BR] Fix a false positive source-is-missing in
haskell-pretty-show by adding -src.js suffix.
+ [BR] Fix a false positive source-is-missing in
iceweasel by adding -prod.js suffix.
* data/debhelper/*:
+ [NT] Refresh against unstable to pick up the rename of
libaqbanking-dev. Thanks to Micha Lenk for the reminder.
(Closes: #787937)
* data/debhelper/filename-config-files:
+ [NT] Add "links" file.
* data/fields/archive-sections:
+ [NT] Pre-emptively support the "debugsym" section, which is
expected to be used by debhelper for "ddebs".
* data/files/js-libraries:
+ [NT] Apply patch from Jean-Michael Vourgère to detect
embedded versions of libjs-raphael. (Closes: #788839)
* data/files/privacy-breaker-websites:
+ [BR] Detect mascot as logos.
* data/java/constants:
+ [NT] Accept Java7 class files without warning as OpenJDK-7
is now the default implementation. Thanks to Markus
Koschany for the report. (Closes: #786895)
* debian/changelog:
+ [NT] Add missing list of new / removed tags to the
entry for the previous release.
+ [NT] Add missing "debfiles" in the list of collections
deprecated in 2.5.28. It was deprecated in that release
despite the omission.
* debian/copyright:
+ [NT] Document new text case being under the Expat license.
* debian/{lintian.links,manpages}:
+ [NT] Install spellintian in PATH and install its manpage.
Thanks to Paul Wise for the suggestion. (Closes: #767867)
* debian/rules:
+ [NT] Generate the spellintian manpage during build.
* frontend/spellintian:
+ [NT] Add symlink to dplint.
* helpers/coll/objdump-info-helper:
+ [NT] Collect readelf output from static libraries.
+ [NT] Fix bug that caused lintian to ignore the up to 10
valid named sections.
* lib/Lintian/Check.pm:
+ [NT] Rewrite check_spelling{,_picky} with a new interface,
which is better suited for additional purposes than just
emitting Lintian tags.
+ [JW, NT] Normalise spaces a bit better in check_spelling to
catch some "multi-word" misspellings, where said words are
not on the same line. (Closes: #763456)
* lib/Lintian/Collect/Binary.pm:
+ [JW, NT] Make is_pkg_class case-insensitive to avoid some
false-positive "empty-binary-package" warnings.
(Closes: #789151)
+ [NT] Make data from static libraries available.
* lib/Lintian/Collect/Package.pm:
+ [NT] Create "faux" Lintian::Path entries for missing
intermediate directories. This avoids a crash and made
some checks work correctly even in the absence of such
immediate directories. (Closes: LP: #1351380)
* lib/Lintian/Path.pm:
+ [NT] Apply patch from Tomasz Buchert to add "timestamp"
method.
+ [NT] Add "faux" method that returns at truth value for
path entries, which Lintian has created from templates
to fully connect all path entries in the package.
* lib/Lintian/Tag/Info.pm:
+ [NT] Expand BTS links using https rather than http.
* lib/Test/Lintian.pm:
+ [NT] Output spelling mistakes as "diag()" messages now.
* mail-templates/source-is-missing:
+ [BR] Apply patch from Holger Levsen improving language.
* profiles/debian/ftp-master-auto-reject.profile:
+ [NT] Refresh against current rule set.
* t/scripts/spellintian.t:
+ [JW,NT] Import spellintian test case.
-- Micah Gersten <micahg at ubuntu.com> Mon, 06 Jul 2015 21:36:58 -0500
** Changed in: lintian (Ubuntu)
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lintian in Ubuntu.
https://bugs.launchpad.net/bugs/1351380
Title:
Lintian crashes with "undefined value" if deb lacks intermediate
directories
Status in lintian package in Ubuntu:
Fix Released
Bug description:
If I create a deb with install4j that installs to /opt/test/ - then
lintian crashes:
stain at stain-VirtualBox:~$ lintian lintian-test-intermediate-folders_linux_0_1_0.deb
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 2.
warning: collect info md5sums about package lintian-test-intermediate-folders failed
warning: skipping check of binary package lintian-test-intermediate-folders
If I make it install to /opt instead, lintian is happy (but reports the missing bits as it should):
stain at stain-VirtualBox:~$ lintian lintian-test-intermediate-folders_linux_0_2_0.deb
E: lintian-test-intermediate-folders: changelog-file-missing-in-native-package
W: lintian-test-intermediate-folders: control-file-is-empty md5sums
E: lintian-test-intermediate-folders: no-copyright-file
E: lintian-test-intermediate-folders: description-starts-with-package-name
E: lintian-test-intermediate-folders: extended-description-is-empty
E: lintian-test-intermediate-folders: maintainer-name-missing
E: lintian-test-intermediate-folders: maintainer-address-missing
W: lintian-test-intermediate-folders: no-section-field
W: lintian-test-intermediate-folders: empty-binary-package
E: lintian-test-intermediate-folders: dir-or-file-in-opt opt/test/
W: lintian-test-intermediate-folders: maintainer-script-ignores-errors prerm
W: lintian-test-intermediate-folders: maintainer-script-ignores-errors postinst
This causes install4j debian packages - including install4j to not install in Ubuntu Software Centre, as it will report the equivalent of:
The package is of bad quality.
The installation of a package which violates the quality standards isn't allowed. This could cause serious problems on your computer. Please contact the person or organisation who provided this package file and include the details beneath.
Lintian check results for /home/scmjpg/Desktop/taverna-workbench-biodiversity-2.5.0-linux_amd64.deb:
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 2853.
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 2853.
warning: collect info md5sums about package taverna-workbench-biodiversity failed
warning: skipping check of binary package taverna-workbench-biodiversity
warning: collect info scripts about package taverna-workbench-biodiversity failed
warning: skipping check of binary package taverna-workbench-biodiversity
Can't use an undefined value as an ARRAY reference at /usr/share/perl5/Lintian/Collect/Package.pm line 513, <$_[...]> line 2853.
warning: collect info file-info about package taverna-workbench-biodiversity failed
warning: skipping check of binary package taverna-workbench-biodiversity
Looking at /usr/share/perl5/Lintian/Collect/Package.pm , the bug seems
to be caused by the deb from install4j not listing the intermediate
directories to the target directory, causing $children{$file} to be
unitialized. This is otherwise initialized as a side-effect of
$children{$parent} = [] unless exists $children{$parent};
but lint does also a special case if the root entry is missing:
if (!exists($idxh{''})) {
# The index did not include a "root" dir, so fake one.
# Note we have to do a copy here, since we will eventually
# add a "children" field.
my %cpy = %ROOT_INDEX_TEMPLATE;
if ($num_idx) {
$cpy{'uid'} = 0;
$cpy{'gid'} = 0;
}
$idxh{''} = \%cpy;
}
However no special case is done for the missing intermediate
directories, and the above does not initialize.
Adding so it ends with:
$idxh{''} = \%cpy;
$children{''} = [] unless exists $children{''};
}
Fixes the problem:
stain at stain-VirtualBox:~$ lintian lintian-test-intermediate-folders_linux_0_1_0.deb
E: lintian-test-intermediate-folders: changelog-file-missing-in-native-package
W: lintian-test-intermediate-folders: control-file-is-empty md5sums
E: lintian-test-intermediate-folders: no-copyright-file
E: lintian-test-intermediate-folders: description-starts-with-package-name
E: lintian-test-intermediate-folders: extended-description-is-empty
E: lintian-test-intermediate-folders: maintainer-name-missing
E: lintian-test-intermediate-folders: maintainer-address-missing
W: lintian-test-intermediate-folders: no-section-field
W: lintian-test-intermediate-folders: empty-binary-package
Use of uninitialized value in exists at /usr/share/lintian/checks/files.pm line 339.
E: lintian-test-intermediate-folders: dir-or-file-in-opt opt/lint-test/
E: lintian-test-intermediate-folders: dir-or-file-in-opt opt/lint-test/test/
W: lintian-test-intermediate-folders: maintainer-script-ignores-errors prerm
W: lintian-test-intermediate-folders: maintainer-script-ignores-errors postinst
and thus after this the deb can be installed in Ubuntu Software
Centre.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: lintian 2.5.22ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Aug 1 17:12:48 2014
InstallationDate: Installed on 2014-08-01 (0 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
PackageArchitecture: all
SourcePackage: lintian
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lintian/+bug/1351380/+subscriptions
More information about the foundations-bugs
mailing list