.TH "DUCK" 1 "2017-08-10" .SH NAME duck - the Debian Url ChecKer .SH SYNOPSIS \fB duck \fR [ \fIOPTION\fR ]... [\fI-f file\fR] [\fI-u file\fR] [\fI-c file\fR] [\fIURL\fR] .SH DESCRIPTION \fBduck\fR extracts links, email address domains and VCS-* entries from the following files: .PP .IP o \fIdebian/control\fR .IP o \fIdebian/upstream\fr, \fIdebian/upstream-metadata.yaml\fR and \fIdebian/upstream/metadata\fR .IP o \fIdebian/copyright\fR .IP o DEP-3 patch files in every directory a \fIseries\fR file is found .IP o systemd.unit files (\fI*.socket\fR, \fI*.device\fR, \fI*.mount\fR, \fI*.automount\fR, \fI*.swap\fR, \fI*.target\fR, \fI*.path\fR, \fI*.time\fR, \fI*.snapshot\fR, \fI*.slice\fR, \fI*.scope\fR) .IP o Appstream files (\fI*.appdata\fR) .PP If an \fIURL\fR is supplied, duck uses \fBdget\fR to download the specified URL and processes the downloaded source package (*.dsc file) instead of working on the current directory. .PP It tries to access those VCS-* entries and URLs using the appropriate tool to find out whether the given URLs or entries are broken or working. If errors are detected, the filename, fieldname and URL/email of the broken entry are displayed. \fBduck\fR will search for the default files (see above) and skip them silently, if they cannot be found. If specific filenames for options \fB-c\fR, \fB-f\fR or \fB-u\fR are given, and one of those files cannot be found, \fBduck\fR exits with exit code \fB2\fR. Email address domains are checked for existing \fIMX\fR records, \fIA\fR records, or \fIAAAA\fR records, in this order. If none of these 3 are found for a given domain, it is considered broken. Checks results are displayed with 3 different error levels .PP .IP \fBO:\fR (OK) Indicates that the given check did not result in an error. Only shown if \fI-n\fR is used. .IP \fBI:\fR (Information) Indicates informational warnings, suchs as missing helper tools as well as failing checks based on searches in unstructured text files, which sometimes lead to false positives. .IP \fBE:\fR (Error) Indicates failing checks based on data from well-defined fields (e.g. Homepage: entry in \fIdebian/control\fR). .PP and 3 different certainty-levels .PP .IP \fBcertain\fR Data taken from well defined fields. As the format of this field is specified (e.g. Debian Policy, etc.), it can be checked by the appropriate tools. If this check then fails, the data in the field is certainly erroneous. .IP \fBpossible\fR Data extracted using regular expressions (e.g. email addresses, URLs). This might lead to false positives, so the check result is possibly a false positive. .IP \fBwild-guess\fR Data extracted from websites, by using regular expressions. This is still experimental and probably buggy, hence the "wild-guess". .PP .SH "OPTIONS" .TP \fB\-n\fR dry run. Don't run any checks, just show entries to be checked. .TP \fB\-q\fR quiet mode. Suppress all output. .TP \fB\-v\fR verbose mode. This shows all URLs found and the checks run. .TP \fB\--modules-dir=\fRDIRECTORY specify modules directory. Mostly useful for developing new checks. If this parameter is specified, only modules defined in this directory are used. You have to copy all \fI*.pm\fR files from \fI/usr/share/duck/lib/checks\fR to the directory specified. .TP \fB\--color=\fR[WHEN] Specify when to emit escape sequences to the output. Available options are: .IP "" 15 \fBauto\fR Emit color escape codes on STDOUT/STDERR, no color if output is piped to a file or the current terminal is not capable of displaying colors. .IP "" 15 .IP "" 15 \fBalways\fR Always emit color escape codes. .IP "" 15 .IP "" 15 \fBnever\fR Never emit color escape codes. .IP "" 15 .TP \fB\--no-https\fR do not try to find matching https URLs to http URLs. See also the \fIDUCK_NOHTTPS\fR environment variable. .TP \fB\--no-check-certificate\fR do not check if SSL certificates autenticity. \fBThis is highly discouraged!\fR .TP \fB\--missing-helpers\fR display list of missing external helper tools and exits. .TP \fB\--version\fR display copyright and version information .TP \fB\-f\fR specify path to control file. This overrides the default \fIdebian/control\fR. .TP \fB\-F\fR skip processing of the control file. .TP \fB\-u\fR specify path to upstream metadata file. This overrides the default files \fIdebian/upstream\fr, \fIdebian/upstream-metadata.yaml\fR and \fIdebian/upstream/metadata\fR. .TP \fB\-U\fR skip processing of the upstream metadata file. .TP \fB\-c\fR specify path to copyright file. This overrides the default \fIdebian/copyright\fR. .TP \fB\-C\fR skip processing of copyright file. .TP \fB\-P\fR skip processing of patch files. .TP \fB-A\fR skip processing of appstream metadata files. .TP \fB-S\fR skip processing of systemd.unit files. .TP \fB-l\fR filename Process URLs, email addresses, git:// and svn:// entries from the file specified. Specify one entry per line. This also disables all other check modules searching for entries in various files. .TP \fB--disable-urlfix=\fR disables the specified url fix(es). An urlfix tries to remove leading/trailing characters from extracted URLs, like trailing dots or parentheses. Using this parameter \fBenables all\fR urlfixes minus the specified ones. .TP \fB--enable-urlfix=\fR enables the specified url fix(es). Using this parameter \fBdisabled all\fR urlfixes minus the specified ones. The following urlfixes are available: .IP "" 15 \fBTRAILING_COLON\fR Removes trailing colon ":" character. .IP "" 15 \fBTRAILING_PAREN_DOT\fR Removes the string "\fB).\fR" from the end of the URL. .IP "" 15 \fBTRAILING_PUNCTUATION\fR Removes trailing "\fB.\fR" and "\fB,\fR" characters. .IP "" 15 \fBTRAILING_QUOTES\fR Removes trailing single quotes "\fB'\fR" characters. Note: Double quotes (\fB"\fR) are already correctly handled by the used perl regex matchers. .IP "" 15 \fBTRAILING_SLASH_DOT\fR Removes the string "\fB/.\fR" (without the quotes) from the end of the URL. .IP "" 15 \fBTRAILING_SLASH_PAREN\fR Removes the string "\fB/)\fR" (without the quotes) from the end of the URL. .TP \fB--tasks=[number]\fR Specify the number of checks allowed to run in parallel. Default value is 24. This value must be an integer value >0. .PP All urlfixes are \fBenabled by default\fR. .SH "ENVIRONMENT VARIABLES" .TP \fIDUCK_NOHTTPS\fR If this variable is set, do not try to find matching https URLs to http URLs. .TP \fIXDG_CONFIG_HOME\fR if this variable is set, use the config file (if any) \fI$XDG_HOME/duck/duck.conf\fR. The default value is \fI$HOME/.config/duck/duck.conf\fR . .TP \fIXDG_CONFIG_DIRS\fR defines the preference-ordered set of base directories to search for configuration files in addition to the \fBXDG_CONFIG_HOME\fR base directory. The directories in \fBXDG_CONFIG_DIRS\fR should be separated with a colon '\fB:\fR'. .SH "EXAMPLE" To run duck, change your working directory to an extracted Debian source package and run: . \fB duck .SH "EXIT STATUS" .PP .IP "\fB0\fP" Success, no errors .IP "\fB1\fP" Error(s) detected .IP "\fB2\fP" User-specified file not found .SH "FILES" .TP .I debian/duck-overrides Overrides-file in the Debian package source tree. This files contains a list of URL regexs which should not be reported as down/broken. This might be useful in cases, where URLs are extracted from old/outdated copyright-files or patches, which will never ever be working, and which will then lead to false positives. Please see an example in \fI/usr/share/doc/duck/examples\fR. .TP \fIduck.conf\fR Config file which contains the regular expressions used to detect parked domains and redirected websites. The default file is in \fI/etc/duck/duck.conf\fR. duck also honors the XDG Base Directory Specification, see the section \fBENVIRONMENT VARIABLES\fR for details. . Search order for \fIduck.conf\fR is: \fI$XDG_CONFIG_HOME/duck/duck.conf\fR (default: $HOME/.config/duck/duck.conf) \fI/etc/duck/duck.conf\fR \fI/$XDG_CONFIG_DIRS\fR (default: /etc/xdg/duck/duck.conf) Please see the \fBXDG Base Directory Specification\fR (\fIhttps://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html\fR) for more details. .PP .SH "SEE ALSO" Please see \fIhttp://duck.debian.net/\fR for additional information as well as an overview of duck checks run on all source packages in \fIDebian/unstable\fR.