summaryrefslogtreecommitdiffstats
path: root/data/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'data/scripts')
-rw-r--r--data/scripts/interpreters108
-rw-r--r--data/scripts/maintainer-script-bad-command48
-rw-r--r--data/scripts/versioned-interpreters74
3 files changed, 230 insertions, 0 deletions
diff --git a/data/scripts/interpreters b/data/scripts/interpreters
new file mode 100644
index 0000000..7a21df0
--- /dev/null
+++ b/data/scripts/interpreters
@@ -0,0 +1,108 @@
+# Map interpreter to installation placement (and optionally
+# the dependency relation required to obtain the interpreter)
+#
+# syntax:
+# <interpreter> => <path>[, <dependency-relation>]
+#
+# an empty <dependency-relation> means the interpreter is provided
+# by an essential package or otherwise does not need a dependency.
+#
+# Do NOT list versioned interpreters here (such as pythonX.Y,
+# rubyX.Y, etc.). These are handled by the file
+# scripts/versioned-interpreters.
+#
+# Manually maintained table - please keep it sorted (by key,
+# insensitively)!
+#
+
+ash => /bin, ash:any
+awk => /usr/bin
+bash => /bin
+bltwish => /usr/bin, blt:any
+cfagent => /usr/sbin, cfengine2:any
+clisp => /usr/bin, clisp:any
+csh => /bin, tcsh:any | csh:any | c-shell:any
+cwl-runner => /usr/bin, cwltool:any | cwl-runner:any
+dash => /bin
+escript => /usr/bin, erlang-base:any | erlang-base-hipe:any
+expect => /usr/bin, expect:any
+expectk => /usr/bin, expectk:any
+falcon => /usr/bin, falconpl:any
+fish => /usr/bin, fish:any
+fontforge => /usr/bin, fontforge-nox:any | fontforge:any
+gawk => /usr/bin, gawk:any
+gbr2 => /usr/bin, gambas2-runtime:any
+gbr3 => /usr/bin, gambas3-runtime:any
+gbx => /usr/bin, gambas-runtime:any
+gbx2 => /usr/bin, gambas2-runtime:any
+gforth => /usr/bin, gforth:any
+gjs => /usr/bin, gjs:any
+gjs-console => /usr/bin, gjs:any
+gnuplot => /usr/bin, gnuplot:any
+gosh => /usr/bin, gauche:any
+hhvm => /usr/bin, hhvm:any
+icmake => /usr/bin, icmake:any
+init-d-script => /lib/init
+install-menu => /usr/bin
+invoke-run => /lib/runit
+ir => /usr/bin, ironruby:any
+jed => /usr/bin, jed:any
+jed-script => /usr/bin, jed:any | xjed:any
+julia => /usr/bin, julia:any
+jython => /usr/bin, jython:any
+kaptain => /usr/bin, kaptain:any
+ksh => /bin, ksh:any | mksh:any | pdksh:any | zsh:any
+lefty => /usr/bin, graphviz:any
+liquidsoap => /usr/bin, liquidsoap:any
+magicfilter => /usr/sbin, magicfilter:any
+make => /usr/bin, make:any | build-essential:any | dpkg-dev:any
+mawk => /usr/bin, mawk:any
+mksh => /bin, mksh:any
+mscgen => /usr/bin, mscgen:any
+newlisp => /usr/bin, newlisp:any
+ngraph => /usr/bin, ngraph-gtk:any
+nickle => /usr/bin, nickle:any
+node => /usr/bin, nodejs:any
+ocamlrun => /usr/bin, ocaml-base-nox:any | ocaml-base:any | ocaml-nox:any | ocaml:any
+pagsh => /usr/bin, openafs-client:any | heimdal-clients:any
+parrot => /usr/bin, parrot:any
+perl => /usr/bin
+perl6 => /usr/bin, rakudo:any
+perl6-m => /usr/bin, rakudo:any
+php => /usr/bin, php-cli:any
+plackup => /usr/bin, libplack-perl:any
+procmail => /usr/bin, procmail:any
+pypy3 => /usr/bin, pypy3:any
+python2 => /usr/bin, python2:any | python2-minimal:any
+python3 => /usr/bin, python3:any | python3-minimal:any
+pforth => /usr/bin, pforth:any
+racket => /usr/bin, racket:any
+rake => /usr/bin, rake:any
+raku => /usr/bin, rakudo:any
+r => /usr/bin, littler:any | r-cran-littler:any
+rackup => /usr/bin, ruby-rack:any
+rc => /usr/bin, rc:any
+regina => /usr/bin, regina-rexx:any
+rep => /usr/bin, rep:any
+rexx => /usr/bin, regina-rexx:any
+rrdcgi => /usr/bin, rrdtool:any
+Rscript => /usr/bin, r-base-core:any
+ruby => /usr/bin, ruby:any
+run => /lib/runit/invoke, runit:any (>= 2.1.2-23)
+runhaskell => /usr/bin, ghc:any | ghc6:any
+runhugs => /usr/bin, hugs:any | hugs98:any
+sed => /bin
+seed => /usr/bin, seed:any
+sh => /bin
+slsh => /usr/bin, slsh:any
+speedy => /usr/bin, speedy-cgi-perl:any
+stap => /usr/bin, systemtap:any
+swipl => /usr/bin, swi-prolog:any | swi-prolog-nox:any
+tcsh => /bin, tcsh:any
+texlua => /usr/bin, texlive-binaries:any (>= 2014.20140512.33982)
+tixwish => /usr/bin, tix:any
+trs => /usr/bin, konwert:any
+xjed => /usr/bin, xjed:any
+yforth => /usr/bin, yforth:any
+yorick => /usr/bin, yorick:any
+zsh => /bin, zsh:any | zsh-beta:any
diff --git a/data/scripts/maintainer-script-bad-command b/data/scripts/maintainer-script-bad-command
new file mode 100644
index 0000000..4a4226e
--- /dev/null
+++ b/data/scripts/maintainer-script-bad-command
@@ -0,0 +1,48 @@
+# complain (tag) when we encounters some commands on maintainer script
+# format is:
+# tag ~~in cat string ~~ package exception ~~ only in file ~~ regexp
+#
+# Where:
+# - tag is the tag to emit
+# - when in cat string is true check in HERE document
+# - ignore sections automatically generated by debhelper
+# - package exception is a regexp for checking only in some package
+# Use empty string for checking in all packages.
+# - only in file is a regexp for checking only in some maintainer script
+# Empty means check in all files.
+# - regexp is the regexp to check. First group ($1) will be printed if found as extra tag info
+# You could use the special variable ${LEADING_PATTERN} if needed (see below).
+#
+# ${LEADING_PATTERN}:
+# When detecting commands inside shell scripts, use this regex to match the
+# beginning of the command rather than checking whether the command is at the
+# beginning of a line.
+#
+# Please alpha sort by tag
+#
+# Please use maintainer-script-should-not- for tag name. This will
+# automatically pass the "tag coverage" tests.
+
+# ftpmaster auto reject so do not rename
+install-info-used-in-maintainer-script ~~ 1 ~~ 0 ~~ ~~ ~~\binstall-info\b
+# ftpmaster auto reject so do not rename
+maintainer-script-removes-device-files ~~ 0 ~~ 0 ~~ ~~ ~~^\s*rm\s+(?:[^>]*\s)?(/dev/(?!(?:shm/|\.[^.]+))[^/ ]+)
+
+maintainer-script-hides-init-failure ~~ 0 ~~ 0 ~~ ~~ ~~invoke-rc.d.*\|\| \s+ exit \s+ 0
+maintainer-script-changes-ld-so-conf ~~ 0 ~~ 0 ~~^libc ~~ ~~(?:\A\s*(?:cp|mv)\s+.*\s+|>\s*)/etc/ld\.so\.conf\s*(?:\s|\Z)
+maintainer-script-changes-netbase ~~ 0 ~~ 0 ~~ ~~ ~~(?:\A\s*(?:cp|mv)\s+.*\s+|>\s*)(/etc/(?:services|protocols|rpc))\s*(?:\s|\Z)
+maintainer-script-should-not-parse-etc-passwd-or-group ~~ 0 ~~ 0 ~~ ~~ ~~\b([ef]?grep\b.*/etc/(?:passwd|group))\b
+maintainer-script-lacks-home-in-adduser ~~ 1 ~~ 0 ~~ ~~ ~~(adduser\s(?:(?!.*(?<=\s)--home\s.*\s--system).*(?<=\s)--system(?=\s)(?!.*\s--home\s+(?:["]?/(?!home/)|["]?\$[\(\[\{]?))|--home\s+["]?/home/.*\s--system(?:\s|$)).*)
+maintainer-script-calls-chown-improperly ~~ 0 ~~ 0 ~~ ~~ ~~(chown(?:\s+--?[A-Za-z-]+)*\s+[-_A-Za-z0-9]+\.[-_A-Za-z0-9]+)\s+
+maintainer-script-should-not-use-dpkg-maintscript-helper ~~ 1 ~~ 1 ~~ ~~ ~~dpkg-maintscript-helper
+maintainer-script-updates-fontconfig-cache-improperly ~~ 0 ~~ 0 ~~^(fontconfig)$ ~~ ~~${LEADING_PATTERN}(?:/usr/bin/)?fc-cache(?:\s|\Z)
+maintainer-script-calls-gconftool ~~ 1 ~~ 0 ~~^(gconf\d)$ ~~ ~~(?:/usr/bin/)?gconftool(?:-\d)?(?:\s|\Z)
+maintainer-script-calls-install-sgmlcatalog ~~ 1 ~~ 0 ~~ ~~ ~~\binstall-sgmlcatalog\b
+recursive-privilege-change ~~ 1 ~~ 0 ~~ ~~ ~~\b(?:(?:chmod|chown).*(?:-R|--recursive)|find.*exec.*(?:chmod|chown))\b
+maintainer-script-should-not-use-piuparts-variable ~~ 0 ~~ 0 ~~ ~~ ~~(PIUPARTS_(?:TEST|OBJECTS|PHASE|DISTRIBUTION(?:_PREV|_NEXT)?))\b
+maintainer-script-calls-service ~~ 1 ~~ 0 ~~ ~~ ~~${LEADING_PATTERN}service\b
+maintainer-script-calls-start-stop-daemon ~~ 0 ~~ 0 ~~ ~~ ~~\bstart-stop-daemon(?=\s)(?!.*\s--stop\b)
+postrm-removes-alternative ~~ 1 ~~ 0 ~~ ~~^postrm$ ~~\b update\-alternatives\s+\-\-remove\b
+maintainer-script-sets-alternative-improperly ~~ 1 ~~ 0 ~~ ~~ ~~^(?!\s*echo\s+["'][^'"]*)\bupdate\-alternatives\s+\-\-(?:set|set\-selections|config)\b
+trailing-slash-for-dpkg-maintscript-helper-symlink_to_dir ~~ 1 ~~ 0 ~~ ~~ ~~ dpkg-maintscript-helper\s+symlink_to_dir\s+[^\s]+/\s
+maintainer-script-switches-dir-to-symlink-unsafely ~~ 1 ~~ 0 ~~ ~~ ~~ ln[ ]*-f?s.*doc
diff --git a/data/scripts/versioned-interpreters b/data/scripts/versioned-interpreters
new file mode 100644
index 0000000..4350b6a
--- /dev/null
+++ b/data/scripts/versioned-interpreters
@@ -0,0 +1,74 @@
+# Map interpreter to installation placement (and optionally
+# the dependency relation required to obtain the interpreter)
+#
+# Entries in this file are generally used for versioned interpreters,
+# but can also be used for unversioned ones (when there is no
+# definition in scripts/interpreters).
+# syntax:
+# <interpreter> => <path>, <regex>, <dependency-template>, <version-list>[, <dependency-relation>]
+#
+# <interpreter> is the "unversioned base name" of the interpreter. It is computed by
+# stripping any trailing dashes ("-"), digits ([0-9]) and dots ("."). As an example,
+# the unversioned base name for:
+# python2.6 is python
+# guile-1.6 is guile
+#
+# NB: If the <interpreter> is not listed in scripts/interpreters, the unversioned
+# ones are also looked up in this data file. For cases where this is undesired,
+# please use @SKIP_UNVERSIONED@ (as described below).
+#
+# <path> is the path in which the interpreter is installed (usually /usr/bin).
+#
+# <regex> is a regex for matching the full name of the interpreter *and* extracting
+# the version of it. It should have exactly one capture group, which captures the
+# version. If the regex does not match the interpreter or does not capture a version
+# in the <version-list>, the entry is assumed not to apply to this interpreter.
+# NB: The regex will be anchored and must match the /entire/ interpreter with version.
+# (e.g. guile-([\d\.]*) is matched as m/^guile-([\d\.]*)$/)
+#
+# <dependency-template> is a dependency template that will generate the dependency
+# relation from a version. The token "$1" is replaced with the version of the
+# interpreter. The template cannot contain commas (and therefore can only contain
+# predicates or "OR" relations).
+#
+# <version-list> is a space-separated list of known interpreter versions. It is used
+# both to generate the dependency relation for uses of the unversioned interpreter and
+# (together with <regex>) for ensuring the entry applies to the interpreter.
+#
+# NB: <dependency-relation> can be one of the following magic values:
+# * @SKIP_UNVERSIONED@
+# - Do not use this entry for unversioned interpreters. The common usage case
+# for this is when the interpreter is also listed in scripts/interpreters.
+#
+# When used on a versioned interpreter, Lintian will check for a dependency satisfying
+# the dependency generated by applying the version to the <dependency-template>.
+# Example:
+# Interpreter pike7.6 and template "pike$1 | pike$1-core" will make Lintian check
+# for the dependency:
+# "pike7.6 | pike7.6-core"
+#
+# When used on an unversioned interpreter, Lintian will check for a dependency satisfying
+# ANY of the versioned dependencies that can be generated from applying the versions from
+# <version-list> to <dependency-template>. Furthermore, also check for the dependency on
+# the <dependency-relation> (assuming it is not empty or one of the magic values).
+# Example:
+# Interpreter guile, template guile-$1, version list 1.6 1.8 and the dependency relation
+# guile will make Lintian check for the dependency:
+# "guile | guile-1.6 | guile-1.8"
+#
+# Manually maintained table - please keep it sorted (by key)!
+
+
+guile => /usr/bin, guile-([\d.]+), guile-$1:any, 2.2 3.0, guile:any
+jruby => /usr/bin, jruby([\d.]+), jruby$1:any, 1.0 1.1 1.2, jruby:any
+lua => /usr/bin, lua([\d.]+), lua$1:any, 40 50 5.1 5.2 5.3 5.4, lua:any
+octave => /usr/bin, octave([\d.]+), octave$1:any, 3.0 3.2, octave:any
+pike => /usr/bin, pike([\d.]+), pike$1:any | pike$1-core:any, 7.6 7.8
+python2 => /usr/bin, python([\d.]+), python$1:any | python$1-minimal:any, 2.7, @SKIP_UNVERSIONED@
+python3 => /usr/bin, python3([\d.]+), python3$1:any | python3$1-minimal:any, 3.4 3.5 3.7 3.8, @SKIP_UNVERSIONED@
+ruby => /usr/bin, ruby([\d.]+), ruby$1:any, 1.8 1.9, @SKIP_UNVERSIONED@
+runghc => /usr/bin, runghc(\d+), ghc$1:any, 6, ghc:any
+scsh => /usr/bin, scsh-([\d.]+), scsh-$1:any, 0.6, scsh:any
+tclsh => /usr/bin, tclsh([\d.]+), tcl$1:any, 8.3 8.4 8.5 8.6, tclsh:any | tcl:any
+wish => /usr/bin, wish([\d.]+), tk$1:any, 8.3 8.4 8.5 8.6, wish:any | tk:any
+