[arch-dev-public] [namcap] version 3.0.2 in testing repo
On 2011/3/13 Rémy Oudompheng
Hello people,
namcap version 3.0.1 is now in testing. This is a quick bugfix followup release that corrects bugs FS#23258, FS#23259, FS#23260.
Sources are at the usual places ftp://ftp.archlinux.org/other/namcap/namcap-3.0.1.tar.gz http://projects.archlinux.org/namcap.git/tree/?id=3.0.1
Have fun with it and don't hesitate to report any other bugs or wrong behaviour.
Version 3.0.2 is released. It features two bug fixes : * crashes in non-English locales (reported by Pierre) * large amount of false positives in the extravars rules for multiline arrays (reported by Allan). I have not bothered having an exact parser for getting names of shell variables used in PKGBUILDs. I am not sure it is a priority, but any patches are welcome. If you find (non-forged) PKGBUILDs giving lots of false positives, put your hands up. -- Rémy.
On 15/03/11 08:50, Rémy Oudompheng wrote:
On 2011/3/13 Rémy Oudompheng
wrote: Hello people,
namcap version 3.0.1 is now in testing. This is a quick bugfix followup release that corrects bugs FS#23258, FS#23259, FS#23260.
Sources are at the usual places ftp://ftp.archlinux.org/other/namcap/namcap-3.0.1.tar.gz http://projects.archlinux.org/namcap.git/tree/?id=3.0.1
Have fun with it and don't hesitate to report any other bugs or wrong behaviour.
Version 3.0.2 is released. It features two bug fixes : * crashes in non-English locales (reported by Pierre) * large amount of false positives in the extravars rules for multiline arrays (reported by Allan).
This appears to have gotten worse: namcap-3.0.1:
find /var/abs/core -name PKGBUILD | xargs namcap | grep "Non standard variable" | wc -l 129
namcap-3.0.2:
find /var/abs/core -name PKGBUILD | xargs namcap | grep "Non standard variable" | wc -l 710
It turns out every PKGBUILD is giving the following warnings:
namcap /var/abs/core/tar/PKGBUILD PKGBUILD (tar) W: Non standard variable 'rootdelay' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'init' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'udevd_running' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'root' doesn't start with an underscore
On Mon, Mar 14, 2011 at 8:48 PM, Allan McRae
On 15/03/11 08:50, Rémy Oudompheng wrote:
On 2011/3/13 Rémy Oudompheng
wrote: Hello people,
namcap version 3.0.1 is now in testing. This is a quick bugfix followup release that corrects bugs FS#23258, FS#23259, FS#23260.
Sources are at the usual places ftp://ftp.archlinux.org/other/namcap/namcap-3.0.1.tar.gz http://projects.archlinux.org/namcap.git/tree/?id=3.0.1
Have fun with it and don't hesitate to report any other bugs or wrong behaviour.
Version 3.0.2 is released. It features two bug fixes : * crashes in non-English locales (reported by Pierre) * large amount of false positives in the extravars rules for multiline arrays (reported by Allan).
This appears to have gotten worse:
namcap-3.0.1:
find /var/abs/core -name PKGBUILD | xargs namcap | grep "Non standard variable" | wc -l 129
namcap-3.0.2:
find /var/abs/core -name PKGBUILD | xargs namcap | grep "Non standard variable" | wc -l 710
It turns out every PKGBUILD is giving the following warnings:
namcap /var/abs/core/tar/PKGBUILD PKGBUILD (tar) W: Non standard variable 'rootdelay' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'init' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'udevd_running' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'root' doesn't start with an underscore
Hmm: dmcgee@galway ~ $ namcap ~/projects/arch-repos/tar/trunk/PKGBUILD (no output here) I'm seeing some serious oddness...it matters what directory you are in as to how many errors get spewed out, and I don't see the ones you see at all above. dmcgee@galway ~ $ namcap projects/arch-repos/perl/trunk/PKGBUILD PKGBUILD (perl) W: Non standard variable 'arch_opts' doesn't start with an underscore dmcgee@galway ~ $ cd projects/pacman dmcgee@galway ~/projects/pacman (master) $ namcap ~/projects/arch-repos/perl/trunk/PKGBUILD PKGBUILD (perl) W: Non standard variable 'arch_opts' doesn't start with an underscore dmcgee@galway ~/projects/pacman (master) $ cd ../namcap/ dmcgee@galway ~/projects/namcap (master) $ namcap ~/projects/arch-repos/perl/trunk/PKGBUILD PKGBUILD (perl) W: Non standard variable 'perl-archive-extract' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-archive-tar' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-attribute-handlers' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-autodie' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-autoloader' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-base' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-b-debug' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-bignum' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-b-lint' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-cgi' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-class-isa' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-compress-raw-bzip2' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-compress-raw-zlib' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-constant' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-cpan' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-cpanplus' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-cpanplus-dist-build' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-data-dumper' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-db_file' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-devel-dprof' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-devel-peek' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-devel-ppport' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-digest' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-digest-md5' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-digest-sha' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-encode' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-encoding-warnings' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-exporter' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-extutils-cbuilder' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-extutils-command' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-extutils-constant' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-extutils-embed' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-extutils-install' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-extutils-makemaker' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-extutils-manifest' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-extutils-parsexs' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-file-fetch' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-file-path' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-file-temp' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-filter' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-filter-simple' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-getopt-long' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-if' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-io' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-io-compress' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perlio-via-quotedprint' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-io-zlib' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-ipc-cmd' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-ipc-sysv' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-libnet' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-locale-codes' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-locale-maketext' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-locale-maketext-simple' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-log-message' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-log-message-simple' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-math-bigint' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-math-bigint-fastcalc' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-math-bigrat' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-math-complex' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-memoize' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-mime-base64' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-module-build' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-module-corelist' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-module-load' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-module-load-conditional' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-module-loaded' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-module-pluggable' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-net-ping' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-next' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-object-accessor' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-package-constants' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-params-check' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-parent' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-parse-cpan-meta' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-pathtools' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-pod-escapes' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-pod-latex' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-podlators' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-pod-parser' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-pod-perldoc' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-pod-plainer' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-pod-simple' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-safe' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-scalar-list-utils' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-selfloader' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-shell' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-storable' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-switch' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-sys-syslog' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-term-ansicolor' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-term-cap' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-term-ui' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-test' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-test-harness' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-test-simple' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-text-balanced' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-text-parsewords' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-text-soundex' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-text-tabs+wraps' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-thread-queue' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-threads' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-thread-semaphore' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-threads-shared' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-tie-file' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-tie-refhash' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-time-hires' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-time-local' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-time-piece' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-unicode-collate' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-unicode-normalize' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-version' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-win32' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-win32api-file' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'perl-xsloader' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'arch_opts' doesn't start with an underscore PKGBUILD (perl) W: Non standard variable 'arch_opts' doesn't start with an underscore
On Mon, Mar 14, 2011 at 8:48 PM, Allan McRae
On 15/03/11 08:50, Rémy Oudompheng wrote:
On 2011/3/13 Rémy Oudompheng
wrote: Hello people,
namcap version 3.0.1 is now in testing. This is a quick bugfix followup release that corrects bugs FS#23258, FS#23259, FS#23260.
Sources are at the usual places ftp://ftp.archlinux.org/other/namcap/namcap-3.0.1.tar.gz http://projects.archlinux.org/namcap.git/tree/?id=3.0.1
Have fun with it and don't hesitate to report any other bugs or wrong behaviour.
Version 3.0.2 is released. It features two bug fixes : * crashes in non-English locales (reported by Pierre) * large amount of false positives in the extravars rules for multiline arrays (reported by Allan).
This appears to have gotten worse:
namcap-3.0.1:
find /var/abs/core -name PKGBUILD | xargs namcap | grep "Non standard variable" | wc -l 129
namcap-3.0.2:
find /var/abs/core -name PKGBUILD | xargs namcap | grep "Non standard variable" | wc -l 710
It turns out every PKGBUILD is giving the following warnings:
namcap /var/abs/core/tar/PKGBUILD PKGBUILD (tar) W: Non standard variable 'rootdelay' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'init' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'udevd_running' doesn't start with an underscore PKGBUILD (tar) W: Non standard variable 'root' doesn't start with an underscore
Note the original commit message on this rule, very telling...anyway,
I have a hopefully real fix for this mess on the way. I didn't even
realize I wasn't running the latest rule from my devel branch, but
what I've coded up is hopefully a lot more correct fix for the
problem.
commit c35379b4e1ba2721c20ae1735f5e8028baa9a942
Author: Jesse Young
This reverts the non-test portions of commit
e2044d4583f80cd6283a2f8d0ffa1d6f5d834123.
This is not the proper way to fix this, and we most definitely should
not have to parse, subprocess, or do anything with bash more than once,
especially in a rule. We also shouldn't assume everyone has a perfectly
clean environment with no extra variables exported and defined. Revert
the entire thing, minus the added test, with a better fix on the way.
Signed-off-by: Dan McGee
Add an additional fake package variable '%SETVARS%' that shows the
currently defined variables when processing a PKGBUILD. Use this list in
the extravars rule instead of broke-ass regex parsing that will never
catch every possible corner case.
Signed-off-by: Dan McGee
Add an additional fake package variable '%SETVARS%' that shows the
currently defined variables when processing a PKGBUILD. Use this list in
the extravars rule instead of broke-ass regex parsing that will never
catch every possible corner case.
Also update the tests accordingly. Variables defined inside a function
are nothing we are going to worry about at the moment, so safely ignore
them. Add a legal variable to ensure we don't have any false positives,
and fix our own misgivings in the PKGBUILD parser so we aren't polluting
the namespace.
Signed-off-by: Dan McGee
participants (4)
-
Allan McRae
-
Dan McGee
-
Dan McGee
-
Rémy Oudompheng