DUCK(1)
π¦ NAME π¦
okay so bestie, let me introduce you to duck β the Debian Url ChecKer. yes, that acronym is a whole stretch and we love that for it π
β¨ SYNOPSIS β¨
duck [ OPTION ]... [-f file] [-u file] [-c file] [URL]
πΈ DESCRIPTION πΈ
okay so duck goes on a lil scavenger hunt and extracts links, email address domains and VCS-* entries out of all these files:
debian/controldebian/upstream,debian/upstream-metadata.yamlanddebian/upstream/metadatadebian/copyright- DEP-3 patch files in every directory a series file is found
systemd.unitfiles (*.socket,*.device,*.mount,*.automount,*.swap,*.target,*.path,*.time,*.snapshot,*.slice,*.scope)- Appstream files (
*.appdata)
and if you hand it a URL? bestie it's not even gonna look at your current directory β it whips out dget to download that URL and processes the downloaded source package (the *.dsc file) instead π«Ά
then it literally goes and tries to access those VCS-* entries and URLs using the appropriate tool to figure out if each one is broken or working. and if errors get detected? it shows you the filename, fieldname and URL/email of the broken entry. no guessing games, it tells you exactly which one is giving nothing π
here's the chill part: duck searches for the default files (all listed above) and just skips them silently if they're not there. but β and this is the plot twist β if you give it specific filenames for the options -c, -f or -u, and one of those files can't be found, duck exits with exit code 2. it's not playing about your custom paths, periodt.
Email address domains get checked for existing MX records, A records, or AAAA records, in that exact order. if none of those 3 show up for a given domain, it's considered broken. sorry to that domain π
the 3 error levels π
Checks results are displayed with 3 different error levels:
O:β (OK) the check didn't result in an error. only shown if-nis used.I:β (Information) informational warnings, suchs as missing helper tools, plus failing checks based on searches in unstructured text files, which sometimes lead to false positives.E:β (Error) failing checks based on data from well-defined fields (e.g.Homepage:entry indebian/control).
and the 3 certainty levels π
certainβ data taken from well defined fields. since the format of that field is specified (e.g. Debian Policy, etc.), it can be checked by the appropriate tools. if the check then fails, the data in the field is certainly erroneous.possibleβ 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.wild-guessβ data extracted from websites, by using regular expressions. this is still experimental and probably buggy, hence the "wild-guess". it's giving chaos, honestly.
π OPTIONS π
-nβ dry run. doesn't run any checks, just shows you the entries that would be checked.-qβ quiet mode. suppresses all output.-vβ verbose mode. shows all URLs found and the checks run. the yapper mode, we stan.--modules-dir=DIRECTORYβ specify the 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*.pmfiles from/usr/share/duck/lib/checksto the directory specified.--color=[WHEN]β specify when to emit escape sequences to the output. available options are:autoβ 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.alwaysβ always emit color escape codes.neverβ never emit color escape codes.
--no-httpsβ do not try to find matching https URLs to http URLs. see also theDUCK_NOHTTPSenvironment variable.--no-check-certificateβ do not check if SSL certificates autenticity. this is highly discouraged! π¨ bestie do NOT--missing-helpersβ display list of missing external helper tools and exits.--versionβ display copyright and version information.-fβ specify path to control file. this overrides the defaultdebian/control.-Fβ skip processing of the control file.-uβ specify path to upstream metadata file. this overrides the default filesdebian/upstream,debian/upstream-metadata.yamlanddebian/upstream/metadata.-Uβ skip processing of the upstream metadata file.-cβ specify path to copyright file. this overrides the defaultdebian/copyright.-Cβ skip processing of copyright file.-Pβ skip processing of patch files.-Aβ skip processing of appstream metadata files.-Sβ skip processing ofsystemd.unitfiles.-lfilename β process URLs, email addresses,git://andsvn://entries from the file specified. specify one entry per line. this also disables all other check modules searching for entries in various files.--disable-urlfix=<fix1,...>β 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 enables all urlfixes minus the specified ones.--enable-urlfix=<fix1,...>β enables the specified url fix(es). using this parameter disabled all urlfixes minus the specified ones.
The following urlfixes are available:
TRAILING_COLONβ removes trailing colon":"character.TRAILING_PAREN_DOTβ removes the string")."from the end of the URL.TRAILING_PUNCTUATIONβ removes trailing"."and","characters.TRAILING_QUOTESβ removes trailing single quotes"'"characters. Note: double quotes (") are already correctly handled by the used perl regex matchers.TRAILING_SLASH_DOTβ removes the string"/."(without the quotes) from the end of the URL.TRAILING_SLASH_PARENβ removes the string"/)"(without the quotes) from the end of the URL.
--tasks=[number]β specify the number of checks allowed to run in parallel. default value is24. this value must be an integer value>0.
All urlfixes are enabled by default. π
π ENVIRONMENT VARIABLES π
DUCK_NOHTTPSβ if this variable is set, do not try to find matching https URLs to http URLs.XDG_CONFIG_HOMEβ if this variable is set, use the config file (if any)$XDG_HOME/duck/duck.conf. the default value is$HOME/.config/duck/duck.conf.XDG_CONFIG_DIRSβ defines the preference-ordered set of base directories to search for configuration files in addition to theXDG_CONFIG_HOMEbase directory. the directories inXDG_CONFIG_DIRSshould be separated with a colon':'.
π¦ EXAMPLE π¦
to run duck, change your working directory to an extracted Debian source package and run:
duck
that's it. that's the whole thing. go off π
π EXIT STATUS π
0β success, no errors πΈ1β error(s) detected π2β user-specified file not found π
π FILES π
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/usr/share/doc/duck/examples.duck.confβ config file which contains the regular expressions used to detect parked domains and redirected websites. the default file is in/etc/duck/duck.conf.duckalso honors the XDG Base Directory Specification, see the section ENVIRONMENT VARIABLES for details. search order forduck.confis:$XDG_CONFIG_HOME/duck/duck.conf(default:$HOME/.config/duck/duck.conf)/etc/duck/duck.conf/$XDG_CONFIG_DIRS(default:/etc/xdg/duck/duck.conf)
please see the XDG Base Directory Specification (https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html) for more details.
π SEE ALSO π
please see http://duck.debian.net/ for additional information as well as an overview of duck checks run on all source packages in Debian/unstable. it's lowkey iconic, go look π
and that's the whole page bestie π this one's from the General Commands Manual, dated 2017-08-10, filed under DUCK(1) β no cap, that's the whole vibe check, now go check some URLs π¦β¨
π¦ where this page comes from
- debian trixie: duck 0.14.4 Β· GPL-2.0-or-later
- ubuntu questing: duck 0.14.4
- ubuntu resolute: duck 0.14.4build1 Β· GPL-2.0-or-later
- ubuntu stonking: duck 0.14.4build1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms