Commit dc93cc63 authored by Chris Lamb's avatar Chris Lamb 💬

Fix "compatibility" with perltidy 20180220-1 in sid.

parent f8c6c421
Pipeline #16412 passed with stage
in 0 seconds
......@@ -46,7 +46,7 @@ sub run {
if (
defined(
my $dir = $info->index_resolved_path('usr/share/applications/'))
) {
) {
for my $file ($dir->children('breadth-first')) {
$desktopfiles{$file} = 1 if ($file->is_file);
}
......
......@@ -316,7 +316,7 @@ sub run {
if ($multiarch eq 'same') {
unless ($fname
=~ m,\b$gnu_triplet_re(?:\b|_)|/(?:$ruby_triplet_re|java-\d+-openjdk-\Q$arch\E|\.build-id)/,
) {
) {
tag 'arch-dependent-file-not-in-arch-specific-directory',$file;
}
}
......@@ -483,7 +483,7 @@ sub run {
$fname =~ m,usr/lib/(?:pyshared/)?python2\.\d+/.*(?<!_d)\.so$,
or( $fname =~ m,usr/lib/python3/.+\.cpython-\d+([a-z]+)\.so$,
and $1 !~ /d/)
) {
) {
if (index($strings, 'numpy') > -1 and $strings =~ NUMPY_REGEX) {
$uses_numpy_c_abi = 1;
}
......
......@@ -173,7 +173,7 @@ sub run {
m/^changelog\.debian(?:\.gz)$/i;
}
@doc_files
) {
) {
tag 'wrong-name-for-changelog-of-native-package',
"usr/share/doc/$pkg/$chg";
} else {
......@@ -206,7 +206,7 @@ sub run {
m/^changelog\.debian(?:\.gz)?$/i;
}
@doc_files
) {
) {
tag 'wrong-name-for-debian-changelog-file',
"usr/share/doc/$pkg/$chg";
} else {
......@@ -405,7 +405,7 @@ sub run {
if (
$changes =~ /uploads? \s+ to \s+
(?'intended'testing|unstable|experimental|sid)/xi
){
){
my $intended = lc($+{intended});
if($intended eq 'sid') {
$intended = 'unstable';
......@@ -542,7 +542,7 @@ sub check_dch {
|| m/closes:\s*(?:bug)?\#?\s?\d+
(?:,\s*(?:bug)?\#?\s?\d+)*
(?:,\s*(((?:bug)?\#?\s?\d*)[[:alpha:]]\w*))/iox
) {
) {
tag 'wrong-bug-number-in-closes', "l$.:$1" if $2;
}
......
......@@ -81,7 +81,7 @@ sub run {
||($distribution eq 'wheezy-backports-sloppy'
&& $distnumber ne '7')
||($dist eq 'jessie' && $distnumber ne '8')
) {
) {
tag
'backports-upload-has-incorrect-version-number',
$info->field('version'),
......@@ -107,7 +107,7 @@ sub run {
# parse code here
if ($change_line
=~ m/^\s*(?:\w[-+0-9a-z.]*) \((?:[^\(\) \t]+)\)(?:(?:\s+[-+0-9a-z.]+)+)\;\s*(?:.*)$/i
) {
) {
$changes_versions++;
}
}
......@@ -134,7 +134,7 @@ sub run {
if ($changes
=~ m/^\s*(?:\w[-+0-9a-z.]*)\s*\([^\(\) \t]+\)\s*([-+0-9A-Za-z.]+)\s*;/
) {
) {
my $changesdist = $1;
if ($changesdist eq 'UNRELEASED') {
tag 'unreleased-changes';
......
......@@ -77,7 +77,7 @@ sub run {
m{\A \# \s* Vcs-(?:Git|Browser): \s*
(?:git|http)://git\.debian\.org/
(?:\?p=)?collab-maint/<pkg>\.git}osmx
) {
) {
# Emit it only once per package
tag 'control-file-contains-dh_make-vcs-comment'
unless $seen_vcs_comment++;
......@@ -189,7 +189,7 @@ sub run {
for my $field (
qw(build-depends build-depends-indep
build-conflicts build-conflicts-indep)
) {
) {
my $raw = $info->source_field($field);
my $rel;
next unless $raw;
......@@ -201,7 +201,7 @@ sub run {
for my $field (
qw(pre-depends depends recommends suggests breaks
conflicts provides replaces enhances)
) {
) {
my $raw = $info->binary_field($bin, $field);
my $rel;
next unless $raw;
......@@ -357,7 +357,7 @@ sub run {
)* # zero or more additional lists
\s*$ # trailing spaces at the end
}x
) {
) {
tag 'invalid-restriction-formula-in-build-profiles-field', $raw,
$bin;
} else {
......@@ -523,7 +523,7 @@ sub check_dev_depends {
&& $versions[1] =~ m/^\s*>[=>]\s* \$\{
(?: (?:binary|source):(?:Upstream-)?Version
|Source-Version)\}/xsm
) {
) {
tag 'weak-library-dev-dependency',
"$package on $depends[0], $depends[1]";
}
......@@ -554,7 +554,7 @@ sub check_relation {
(?:\w[^\s,|\$\(]+|\$\{\S+:Depends\})\s*
(?:\([^\)]*\)\s*)?
)/x
) {
) {
my ($prev, $next) = ($1, $2);
for ($prev, $next) {
rstrip;
......
......@@ -201,7 +201,7 @@ sub run {
\QDISTRIBUTION AND MODIFICATION\E\b/mx
or ( m/\bGNU GENERAL PUBLIC LICENSE\s*Version 3/
and m/\bTERMS AND CONDITIONS\s/))
) {
) {
tag 'copyright-file-contains-full-gpl-license';
$gpl = 1;
}
......@@ -246,27 +246,27 @@ sub run {
|| m/means\s+either\s+the\s+GNU\s+General\s+Public\s+License/
|| $wrong_directory_detected
)
) {
) {
if (
check_names_texts(
qr/\b(?:GFDL|gnu[-_]free[-_]documentation[-_]license)\b/i,
qr/GNU Free Documentation License|(?-i:\bGFDL\b)/i
)
) {
) {
tag 'copyright-should-refer-to-common-license-file-for-gfdl';
}elsif (
check_names_texts(
qr/\b(?:LGPL|gnu[-_](?:lesser|library)[-_]general[-_]public[-_]license)\b/i,
qr/GNU (?:Lesser|Library) General Public License|(?-i:\bLGPL\b)/i
)
) {
) {
tag 'copyright-should-refer-to-common-license-file-for-lgpl';
}elsif (
check_names_texts(
qr/\b(?:GPL|gnu[-_]general[-_]public[-_]license)\b/i,
qr/GNU General Public License|(?-i:\bGPL\b)/i
)
) {
) {
tag 'copyright-should-refer-to-common-license-file-for-gpl';
$gpl = 1;
}elsif (
......@@ -274,7 +274,7 @@ qr/GNU (?:Lesser|Library) General Public License|(?-i:\bLGPL\b)/i
qr/\bapache[-_]2/i,
qr/\bApache License\s*,?\s*Version 2|\b(?-i:Apache)-2/i
)
) {
) {
tag 'copyright-should-refer-to-common-license-file-for-apache-2';
}
}
......@@ -286,7 +286,7 @@ qr/GNU (?:Lesser|Library) General Public License|(?-i:\bLGPL\b)/i
/(?:under )?(?:the )?(?:same )?(?:terms )?as Perl itself\b/i
&&!m,usr/share/common-licenses/,;
})
) {
) {
tag 'copyright-file-lacks-pointer-to-perl-license';
}
......@@ -306,7 +306,7 @@ qr/GNU (?:Lesser|Library) General Public License|(?-i:\bLGPL\b)/i
\Qin control file>\E,ox
or m,\<Including paragraphs\>,o
or m,\<likewise for another author\>,o
) {
) {
tag 'helper-templates-in-copyright';
}
......
......@@ -670,7 +670,7 @@ sub find_cruft {
$name, $md5sum, $NON_DISTRIBUTABLE_FILES,
'license-problem-md5sum-non-distributable-file'
)
) {
) {
next ENTRY;
}
unless ($info->is_non_free) {
......@@ -779,7 +779,7 @@ sub find_cruft {
if (
index($contents,
'You WILL either need to modify or delete this file') >= 0
) {
) {
tag 'readme-source-is-dh_make-template';
}
}
......@@ -983,7 +983,7 @@ sub full_text_check {
$blocknumber,\$cleanedblock,
\%matchedkeyword,\%licenseproblemhash
)
){
){
last BLOCK;
}
......@@ -1007,7 +1007,7 @@ sub full_text_check {
$entry, $info, $source_pkg,$name,
$basename,$dirname,$block,$blocknumber
) < 0
) {
) {
$skiphtml = 1;
}
}
......@@ -1074,7 +1074,7 @@ sub _check_js_script {
my $firstline = '';
foreach (split /\n/, $lcscript) {
if ($_ =~ m/^\s*$/) {
next
next;
}else {
$firstline=$_;
last;
......@@ -1232,7 +1232,7 @@ sub _detect_browserify {
if($block =~ m{$regex}) {
my $extra = (defined $1) ? 'code fragment:'.$1 : '';
tag 'source-contains-browserified-javascript', $name, $extra;
last
last;
}
}
return;
......@@ -1371,7 +1371,7 @@ sub _check_gfdl_license_problem {
unless(
defined(
$licenseproblemhash->{'license-problem-gfdl-invariants-empty'})
) {
) {
if ($gfdlsections eq '') {
# lie in order to check more part
tag 'license-problem-gfdl-invariants-empty', $name;
......@@ -1387,7 +1387,7 @@ sub _check_gfdl_license_problem {
[ ]? no [ ] front(?:[ ]?-[ ]?|[ ])cover [ ] texts[ ]?,?
[ ]? and [ ] no [ ] back(?:[ ]?-?[ ]?|[ ])cover [ ] texts
\Z/xso
) {
) {
return 0;
}
......@@ -1399,7 +1399,7 @@ sub _check_gfdl_license_problem {
(?:[ ] using [ ] all [ ] the [ ] features? [ ] of [ ] the [ ] gfdl)?
)?
)? [ ]? [,:]? \Z/xso
){
){
return 0;
}
......@@ -1541,7 +1541,7 @@ sub _clean_block {
$text =~ s{</?a[^>]*?>}{ }gxms; # a link
$text =~ s{<br\s*/?>}{ }gxms; # (X)?HTML line
# breaks
# breaks
$text =~ s{</?citetitle[^>]*?>}{ }gxms; # DocBook citation title
$text =~ s{</?div[^>]*?>}{ }gxms; # html style
$text =~ s{</?font[^>]*?>}{ }gxms; # bold
......
......@@ -61,7 +61,7 @@ sub run {
substr($_, 0, 1) eq '_';
}
@members
) {
) {
# Fairly common case - if there are only 3 members without
# "_", we can trivially determine their (expected)
# positions. We only use this case when there are no
......@@ -122,7 +122,7 @@ sub run {
if (
$ctrl_member !~ m/\A
control\.tar(?:\.(?:gz|xz))? \Z/xsm
) {
) {
tag 'malformed-deb-archive',
join(' ',
"second (official) member $ctrl_member",
......@@ -145,7 +145,7 @@ sub run {
if (
$data_member !~ m/\A
data\.tar(?:\.(?:gz|bz2|xz|lzma))? \Z/xsm
) {
) {
# wasn't okay after all
tag 'malformed-deb-archive',
join(' ',
......
......@@ -299,7 +299,7 @@ sub run {
$short
&& ( $short !~ m/:$/
|| $short =~ m/^(what|who|when|where|which|how)/i)
) {
) {
tag 'malformed-prompt-in-templates', $template->{template};
}
}
......@@ -332,7 +332,7 @@ sub run {
if (defined $template->{description}) {
if ($template->{description}
=~ /(\A|\s)(I|[Mm]y|[Ww]e|[Oo]ur|[Oo]urs|mine|myself|ourself|me|us)(\Z|\s)/
) {
) {
tag 'using-first-person-in-templates',
$template->{template};
}
......@@ -403,7 +403,7 @@ sub run {
not $obsoleteconfmodule
and m,(/usr/share/debconf/confmodule\.sh|
Debian::DebConf::Client::ConfModule),x
) {
) {
my $cmod = $1;
tag 'loads-obsolete-confmodule', "$file:$. $cmod";
$usesconfmodule = 1;
......@@ -427,7 +427,7 @@ sub run {
if (
m/\A \s*(?:db_input|db_text)\s+
[\"\']? (\S+?) [\"\']? \s+ (\S+)\s/xsm
) {
) {
my ($priority, $template) = ($1, $2);
$templates_used{$template} = 1;
if ($priority !~ /^\$\S+$/) {
......@@ -446,7 +446,7 @@ sub run {
if (
m/ \A \s* (?:db_get|db_set(?:title)?) \s+
[\"\']? (\S+?) [\"\']? (?:\s|\Z)/xsm
) {
) {
$templates_used{$1} = 1;
}
# Try to handle Perl somewhat.
......
......@@ -226,7 +226,7 @@ sub run {
|blends-dev/rules
)
}xsm
) {
) {
# All of these indirectly use dh.
$build_systems{'dh'} = 1;
delete($build_systems{'debhelper'});
......@@ -235,7 +235,7 @@ sub run {
^include \s+
/usr/share/pkg-kde-tools/qt-kde-team/\d+/debian-qt-kde\.mk
}xsm
) {
) {
$build_systems{'dhmk'} = 1;
delete($build_systems{'debhelper'});
}
......@@ -580,7 +580,7 @@ sub _check_dh_exec {
ARCH (?: _OS|_CPU|_BITS|_ENDIAN )?
|GNU_ (?:CPU|SYSTEM|TYPE)|MULTIARCH
) \Z}xsm
) {
) {
tag 'dh-exec-subst-unknown-variable', $path, $sv;
}
}
......@@ -601,7 +601,7 @@ sub _check_dh_exec {
ARCH (?: _OS|_CPU|_BITS|_ENDIAN )?
|GNU_ (?:CPU|SYSTEM|TYPE)|MULTIARCH
) \Z}xsm
) {
) {
if (defined($dv)) {
$dhe_useless = ($sv eq $dv);
} else {
......
......@@ -219,7 +219,7 @@ sub run {
|home\s+page|further\s+information|more\s+info
|official\s+site|project\s+home/xi
and $description =~ m,\b(https?://[a-z0-9][^>\s]+),i
) {
) {
tag 'description-possibly-contains-homepage', $1;
} elsif ($description =~ m,\b(https?://[a-z0-9][^>\s]+)>?\.?\s*\z,i) {
tag 'description-possibly-contains-homepage', $1;
......
......@@ -167,7 +167,7 @@ my %VCS_CANONIFY = (
if (
$_[0] =~ s{\@(?:cvs\.alioth|anonscm)\.debian\.org:/cvsroot/}
{\@anonscm.debian.org:/cvs/}
) {
) {
$_[1] = 'vcs-field-bitrotted';
}
$_[0]=~ s{\@\Qcvs.alioth.debian.org:/cvs/}{\@anonscm.debian.org:/cvs/};
......@@ -186,7 +186,7 @@ my %VCS_CANONIFY = (
if (
$_[0] =~ s{git://(?:git|anonscm)\.debian\.org/~}
{https://anonscm.debian.org/git/users/}
) {
) {
$_[1] = 'vcs-git-uses-invalid-user-uri';
}
$_[0] =~ s{https?\Q://git.debian.org/\E(?:git/?)?}
......@@ -311,7 +311,7 @@ sub run {
&& $debian =~ m/\A
(?:[^.]+ubuntu[^.]+)(?:\.\d+){1,3}(\..*)?
\Z/oxsm
) {
) {
$ubuntu = 1;
$extra = $1;
}
......@@ -333,7 +333,7 @@ sub run {
(rc|alpha|beta|pre(?:view|release)?)
([^a-z].*|\Z)
/xsm
) {
) {
my $expected = $upstream;
my $rc = $1;
my $rest = $2//'';
......@@ -553,7 +553,7 @@ sub run {
\s*
# Optional Version e.g. (1.0)
(?:\((?:\d+:)?(?:[-\.+:a-zA-Z0-9~]+?)(?:-[\.+a-zA-Z0-9~]+)?\))?\s*$/x
) {
) {
tag 'source-field-malformed', $source;
}
}
......@@ -762,7 +762,7 @@ sub run {
$javalib = 1 if($pkg =~ m/^lib.*-java$/o);
for my $field (
qw(depends pre-depends recommends suggests conflicts provides enhances replaces breaks)
) {
) {
next unless defined $info->field($field);
#Get data and clean it
my $data = $info->field($field);
......@@ -1076,7 +1076,7 @@ sub run {
my %depend;
for my $field (
qw(build-depends build-depends-indep build-depends-arch build-conflicts build-conflicts-indep build-conflicts-arch)
) {
) {
if (defined $info->field($field)) {
#Get data and clean it
my $data = $info->field($field);
......@@ -1236,7 +1236,7 @@ sub run {
$depend{'build-conflicts'},
$depend{'build-conflicts-indep'},
$depend{'build-conflicts-arch'}
) {
) {
next unless $_;
for my $conflict (split /\s*,\s*/, $_) {
if ($build_all->implies($conflict)) {
......
......@@ -464,7 +464,7 @@ sub run {
$file->gid < 100
|| $file->gid == 65_534
|| ($file->gid >= 60_000 && $file->gid < 65_000))
) {
) {
tag 'wrong-file-owner-uid-or-gid', $file,
$file->uid . '/' . $file->gid;
}
......@@ -498,7 +498,7 @@ sub run {
if(index($fname,'oui') > -1 || index($fname,'iab') > -1) {
if($fname
=~ m,/(?:[^/]-)?(?:oui|iab)(?:\.(txt|idx|db))?(?:\.$COMPRESS_FILE_EXTENSIONS_OR_ALL)?\Z,x
) {
) {
unless ($source_pkg eq 'ieee-data') {
tag 'package-installs-ieee-data', $file;
}
......@@ -531,7 +531,7 @@ sub run {
# ---------------- /etc/cron.daily, etc.
elsif ($fname
=~ m,^etc/cron\.(?:daily|hourly|monthly|weekly|d)/[^\.].*[\+\.],
) {
) {
# NB: cron ships ".placeholder" files, which shouldn't be run.
tag 'run-parts-cron-filename-contains-illegal-chars', $file;
}
......@@ -695,7 +695,7 @@ sub run {
|macosx|netbsd|openbsd|osf|redhat|sco|sgi
|solaris|suse|sun|vms|win32|win9x|windows
)(?:\.txt)?(?:\.gz)?$,xi
) {
) {
#<<< No tidy (tag name too long)
tag 'package-contains-readme-for-other-platform-or-distro',
$file;
......@@ -773,7 +773,7 @@ sub run {
if ( $file->is_file
&& $fname
=~ m,^usr/lib/debug/usr/lib/pyshared/(python\d?(?:\.\d+))/(.++)$,o
) {
) {
my $correct = "usr/lib/debug/usr/lib/pymodules/$1/$2";
tag 'python-debug-in-wrong-location', $file, $correct;
}
......@@ -888,7 +888,7 @@ sub run {
&& $fname !~ m{\A usr/share/p11-kit/modules/
[[:alnum:]][[:alnum:]_.-]*\.module\Z
}xsm
) {
) {
tag 'incorrect-naming-of-pkcs11-module', $file;
}
# ---------------- /usr/share/vim
......@@ -927,7 +927,7 @@ sub run {
and ( index($block,'flag')>-1
or index($block,'/include/') > -1
or index($block,'pkg-config') > -1)
) {
) {
tag 'old-style-config-script',$file;
# could be ok but only if multi-arch: no
if($multiarch ne 'no' or $arch eq 'all') {
......@@ -977,7 +977,7 @@ sub run {
lib|
local|sbin|share|
src|spool|tmp)/,x
) {
) {
if ($fname =~ m,^usr/lib(?'libsuffix'64|x?32)/,) {
my $libsuffix = $+{libsuffix};
# eglibc exception is due to FHS. Other are
......@@ -1043,7 +1043,7 @@ sub run {
|lock|log|opt|run|spool|state
|tmp|www|yp)/
}xsm
) {
) {
tag 'non-standard-dir-in-var', $file;
}
......@@ -1104,7 +1104,7 @@ sub run {
|mnt|opt|root|run|sbin|srv|sys
|tmp|usr|var) /
}oxsm
) {
) {
# Make an exception for the base-files package here and
# other similar packages because they install a slew of
# top-level directories for setting up the base system.
......@@ -1153,7 +1153,7 @@ sub run {
or $fname =~ m{\A (?:
build|home|mnt|opt|root|run|srv
|(?:(?:usr|var)/)?tmp)|var/www/}xsm
) {
) {
tag 'file-in-unusual-dir', $file;
}
......@@ -1202,7 +1202,7 @@ sub run {
&& ( $fname =~ m,^usr/lib/python\d+(?:\.\d+/),o
|| $fname =~ m,^usr/lib/pyshared,o
|| $fname =~ m,^usr/share/,o)
) {
) {
tag 'package-installs-python-egg', $file;
}
......@@ -1269,7 +1269,7 @@ sub run {
# ... so they end with ".pl" rather than ".pm"
\.pl['"]
}xsm
) {
) {
tag 'perl-module-uses-perl4-libs-without-dep',
"$file:$. ${1}.pl";
}
......@@ -1335,7 +1335,7 @@ sub run {
and not defined $link
# Sphinx includes various license files
and not $fname =~ m,/_sources/license(\.rst)?\.txt$,oi
) {
) {
# okay, we cannot rule it out based on file name; but if
# it is an elf or a static library, we also skip it. (In
......@@ -1353,7 +1353,7 @@ sub run {
# check later to see if it's in a symlinked directory.
and not $fname =~ m,^usr/share/(?:devhelp/books|gtk-doc/html)/,
and not $fname =~ m,^usr/share/doc/[^/]+/examples/,
) {
) {
push(@devhelp, $fname);
}
......@@ -1387,7 +1387,7 @@ sub run {
if (
$fname =~ m,^usr/share/doc/(?:.+/)?(?:doxygen|html)/
.*\.map\.$COMPRESS_FILE_EXTENSIONS_OR_ALL,x
) {
) {
tag 'file-should-not-be-compressed', $file;
}
......@@ -1410,7 +1410,7 @@ sub run {
usr/lib/python (\d+(?:\.\d+)?)/
(site|dist)-packages/(.++)
\Z}oxsm
){
){
my ($debug, $pyver, $loc, $rest) = ($1, $2, $3, $4);
my ($pmaj, $pmin) = split(m/\./o, $pyver, 2);
my @correction;
......@@ -1526,7 +1526,7 @@ sub run {
(?:usr/)?(?:s?bin|games)/[^/]+\.
(?:p[ly]|php|rb|[bc]?sh|tcl)
\Z}xsm
) {
) {
tag 'script-with-language-extension', $file;
}
......@@ -1600,7 +1600,7 @@ sub run {
$line =~ m{\A [%\s]*
All\s*Rights\s*Reserved\.?\s*
\Z}xsmi
) {
) {
#<<< No perltidy - tag name too long
tag 'license-problem-font-adobe-copyrighted-fragment',
$file;
......@@ -1615,7 +1615,7 @@ sub run {
[%\s]*Copyright\s*\(c\) \s*
19\d{2}[\-\s]19\d{2}\s*
Adobe\s*Systems\s*Incorporated\.?\s*\Z}xsmi
) {
) {
$foundadobeline = 1;
}
# If copy pasted from black book they are
......@@ -1797,7 +1797,7 @@ sub run {
)
and $operm == 01777
and $owner eq 'root/root'
) {
) {
# actually shipping files here is warned about elsewhere
} elsif ($fname eq 'usr/src/'
and $operm == 02775
......@@ -2285,7 +2285,7 @@ sub detect_privacy_breach {
qw(src="http src="ftp src="// data-href="http data-href="ftp
data-href="// codebase="http codebase="ftp codebase="// data="http
data="ftp data="// poster="http poster="ftp poster="// <link @import)
) {
) {
next if index($block, $x) == -1;
detect_generic_privacy_breach($block,\%privacybreachhash,$file);
last;
......
......@@ -191,7 +191,7 @@ sub run {
not $initd_path
or ( not $info->is_conffile($initd_path->name)
and not $initd_path->is_symlink)
) {
) {
tag 'init.d-script-not-marked-as-conffile',
"etc/init.d/$initd_file";
}
......@@ -441,7 +441,7 @@ sub check_init {
if (
none { /^(?:\$(?:local|remote)_fs|\$all|umountn?fs)\z/ }
@required
) {
) {
tag 'init.d-script-missing-dependency-on-local_fs',
"${initd_path}: required-stop";
}
......
......@@ -149,7 +149,7 @@ sub run {
&& $jar_file!~m#\.source_[^/]+.jar#
)
|| $cp
) {
) {
tag 'codeless-jar', $jar_file;
}
}
......
......@@ -58,7 +58,7 @@ sub run {
or ($path eq 'usr/bin/mh/')
or ($path eq 'usr/sbin/')
or ($path eq 'usr/games/'))
) {
) {
my $bin = $fname;
$binary{$bin} = $file;
......@@ -146,7 +146,7 @@ sub run {
or $link =~ m,^\.\./\.\./\.\./share/man/man[237]/undocumented\.[237]\.gz$,o
or $link =~ m,^\.\./\.\./\.\./\.\./usr/share/man/man[237]/undocumented\.[237]\.gz$,o
#>>>
) {
) {
tag 'link-to-undocumented-manpage', $file;
} else {
tag 'bad-link-to-undocumented-manpage', $file;
......
......@@ -69,7 +69,7 @@ sub run {
next LINE if $line =~ m/^\s*$/;
if ($line
=~ m{^(?'escaped'\\)?(?'md5sum'[a-f0-9]+)\s*(?:\./)?(?'name'\S.*)$}
) {
) {
my $md5sum = $+{'md5sum'};
if(length($md5sum) != 32) {
tag 'malformed-md5sums-control-file', "line $.";
......
......@@ -328,7 +328,7 @@ sub verify_line {
)
)
/ogcx
) {
) {
my $tag = $1;
my $value = $2;
......
......@@ -87,7 +87,7 @@ sub run {
my $operm = $file->operm;
if ($file->is_file) { # file checks
# menu file?
# menu file?
if ($file =~ m,^usr/(lib|share)/menu/\S,o) { # correct permissions?
if ($operm & 0111) {
tag 'executable-menu-file',
......@@ -136,7 +136,7 @@ sub run {
$file =~ m{ \A usr/share/doc/(?:[^/]+/)?
(.+\.(?:html|pdf))(?:\.gz)?
\Z}xsmo
) {
) {
my $name = $1;
unless